camstreamerlib 4.0.0-beta.32 → 4.0.0-beta.34

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.
Files changed (155) hide show
  1. package/cjs/CamOverlayAPI.js +2 -2
  2. package/cjs/CamStreamerAPI.js +54 -11
  3. package/cjs/CamSwitcherAPI.js +7 -7
  4. package/cjs/CamSwitcherEvents.js +4 -60
  5. package/cjs/PlaneTrackerAPI.js +52 -52
  6. package/cjs/VapixAPI.js +10 -7
  7. package/cjs/index.js +2 -11
  8. package/cjs/internal/ProxyClient.js +6 -6
  9. package/cjs/internal/WsEvents.js +72 -0
  10. package/cjs/node/DefaultClient.js +4 -4
  11. package/cjs/node/HttpRequestSender.js +1 -1
  12. package/cjs/node/WsClient.js +1 -1
  13. package/cjs/{events → node/events}/AxisCameraStationEvents.js +4 -4
  14. package/cjs/{events → node/events}/GenetecAgent.js +43 -32
  15. package/cjs/node/index.js +5 -8
  16. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +14 -1
  17. package/cjs/types/CamOverlayAPI/scoreBoardSchema.js +127 -0
  18. package/cjs/types/CamStreamerAPI.js +30 -3
  19. package/esm/CamOverlayAPI.js +2 -2
  20. package/esm/CamStreamerAPI.js +53 -11
  21. package/esm/CamSwitcherAPI.js +7 -7
  22. package/esm/CamSwitcherEvents.js +5 -61
  23. package/esm/PlaneTrackerAPI.js +52 -52
  24. package/esm/VapixAPI.js +10 -7
  25. package/esm/index.js +1 -6
  26. package/esm/internal/ProxyClient.js +6 -6
  27. package/esm/internal/WsEvents.js +68 -0
  28. package/esm/node/DefaultClient.js +4 -4
  29. package/esm/node/HttpRequestSender.js +1 -1
  30. package/esm/node/WsClient.js +1 -1
  31. package/esm/{events → node/events}/AxisCameraStationEvents.js +3 -3
  32. package/esm/{events → node/events}/GenetecAgent.js +41 -30
  33. package/esm/node/index.js +5 -4
  34. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +9 -0
  35. package/esm/types/CamOverlayAPI/scoreBoardSchema.js +124 -0
  36. package/esm/types/CamStreamerAPI.js +29 -2
  37. package/package.json +22 -2
  38. package/{cjs → types}/CamOverlayAPI.d.ts +3 -5
  39. package/{esm → types}/CamScripterAPI.d.ts +4 -4
  40. package/types/CamStreamerAPI.d.ts +48 -0
  41. package/{esm → types}/CamSwitcherAPI.d.ts +8 -8
  42. package/types/CamSwitcherEvents.d.ts +8 -0
  43. package/types/PlaneTrackerAPI.d.ts +43 -0
  44. package/{cjs → types}/VapixAPI.d.ts +11 -7
  45. package/{cjs → types}/index.d.ts +1 -6
  46. package/{esm → types}/internal/ProxyClient.d.ts +4 -4
  47. package/types/internal/WsEvents.d.ts +41 -0
  48. package/{esm → types}/internal/types.d.ts +12 -9
  49. package/{cjs → types}/node/DefaultClient.d.ts +6 -4
  50. package/{esm → types/node}/events/AxisCameraStationEvents.d.ts +4 -4
  51. package/{esm → types/node}/events/GenetecAgent.d.ts +14 -32
  52. package/types/node/index.d.ts +5 -0
  53. package/{cjs → types}/types/CamOverlayAPI/CamOverlayAPI.d.ts +1071 -7
  54. package/{esm → types}/types/CamOverlayAPI/infotickerSchema.d.ts +2 -2
  55. package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
  56. package/types/types/CamStreamerAPI.d.ts +274 -0
  57. package/types/web/DefaultClient.d.ts +6 -0
  58. package/cjs/CamScripterAPI.d.ts +0 -37
  59. package/cjs/CamStreamerAPI.d.ts +0 -19
  60. package/cjs/CamSwitcherAPI.d.ts +0 -54
  61. package/cjs/CamSwitcherEvents.d.ts +0 -18
  62. package/cjs/PlaneTrackerAPI.d.ts +0 -43
  63. package/cjs/events/AxisCameraStationEvents.d.ts +0 -12
  64. package/cjs/events/GenetecAgent.d.ts +0 -177
  65. package/cjs/internal/ProxyClient.d.ts +0 -10
  66. package/cjs/internal/types.d.ts +0 -42
  67. package/cjs/node/index.d.ts +0 -4
  68. package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +0 -96
  69. package/cjs/types/CamStreamerAPI.d.ts +0 -150
  70. package/cjs/web/DefaultClient.d.ts +0 -6
  71. package/esm/CamOverlayAPI.d.ts +0 -41
  72. package/esm/CamOverlayDrawingAPI.d.ts +0 -41
  73. package/esm/CamOverlayPainter/Frame.d.ts +0 -67
  74. package/esm/CamOverlayPainter/Painter.d.ts +0 -43
  75. package/esm/CamOverlayPainter/ResourceManager.d.ts +0 -15
  76. package/esm/CamScripterAPICameraEventsGenerator.d.ts +0 -74
  77. package/esm/CamStreamerAPI.d.ts +0 -19
  78. package/esm/CamSwitcherEvents.d.ts +0 -18
  79. package/esm/CreatePackage.d.ts +0 -1
  80. package/esm/PlaneTrackerAPI.d.ts +0 -43
  81. package/esm/VapixAPI.d.ts +0 -80
  82. package/esm/VapixEvents.d.ts +0 -43
  83. package/esm/errors/errors.d.ts +0 -37
  84. package/esm/index.d.ts +0 -23
  85. package/esm/internal/Digest.d.ts +0 -4
  86. package/esm/internal/constants.d.ts +0 -1
  87. package/esm/internal/transformers.d.ts +0 -5
  88. package/esm/internal/utils.d.ts +0 -14
  89. package/esm/internal/versionCompare.d.ts +0 -6
  90. package/esm/node/DefaultClient.d.ts +0 -14
  91. package/esm/node/HttpRequestSender.d.ts +0 -29
  92. package/esm/node/HttpServer.d.ts +0 -21
  93. package/esm/node/WsClient.d.ts +0 -40
  94. package/esm/node/index.d.ts +0 -4
  95. package/esm/types/CamOverlayAPI/CamOverlayAPI.d.ts +0 -3260
  96. package/esm/types/CamOverlayAPI/accuweatherSchema.d.ts +0 -84
  97. package/esm/types/CamOverlayAPI/customGraphicsSchema.d.ts +0 -700
  98. package/esm/types/CamOverlayAPI/imagesSchema.d.ts +0 -95
  99. package/esm/types/CamOverlayAPI/index.d.ts +0 -11
  100. package/esm/types/CamOverlayAPI/pipSchema.d.ts +0 -125
  101. package/esm/types/CamOverlayAPI/ptzCompassSchema.d.ts +0 -93
  102. package/esm/types/CamOverlayAPI/ptzSchema.d.ts +0 -118
  103. package/esm/types/CamOverlayAPI/screenSharingSchema.d.ts +0 -58
  104. package/esm/types/CamOverlayAPI/webCameraSharingSchema.d.ts +0 -58
  105. package/esm/types/CamOverlayAPI/widgetCommonTypes.d.ts +0 -141
  106. package/esm/types/CamOverlayDrawingAPI.d.ts +0 -58
  107. package/esm/types/CamOverlayPainter.d.ts +0 -74
  108. package/esm/types/CamScripterAPI.d.ts +0 -132
  109. package/esm/types/CamStreamerAPI.d.ts +0 -150
  110. package/esm/types/CamSwitcherAPI.d.ts +0 -812
  111. package/esm/types/CamSwitcherEvents.d.ts +0 -568
  112. package/esm/types/PlaneTrackerAPI.d.ts +0 -8
  113. package/esm/types/VapixAPI.d.ts +0 -1819
  114. package/esm/types/common.d.ts +0 -46
  115. package/esm/web/DefaultClient.d.ts +0 -6
  116. package/esm/web/WsClient.d.ts +0 -13
  117. package/esm/web/index.d.ts +0 -2
  118. /package/cjs/{internal → node}/Digest.js +0 -0
  119. /package/esm/{internal → node}/Digest.js +0 -0
  120. /package/{cjs → types}/CamOverlayDrawingAPI.d.ts +0 -0
  121. /package/{cjs → types}/CamOverlayPainter/Frame.d.ts +0 -0
  122. /package/{cjs → types}/CamOverlayPainter/Painter.d.ts +0 -0
  123. /package/{cjs → types}/CamOverlayPainter/ResourceManager.d.ts +0 -0
  124. /package/{cjs → types}/CamScripterAPICameraEventsGenerator.d.ts +0 -0
  125. /package/{cjs → types}/CreatePackage.d.ts +0 -0
  126. /package/{cjs → types}/VapixEvents.d.ts +0 -0
  127. /package/{cjs → types}/errors/errors.d.ts +0 -0
  128. /package/{cjs → types}/internal/constants.d.ts +0 -0
  129. /package/{cjs → types}/internal/transformers.d.ts +0 -0
  130. /package/{cjs → types}/internal/utils.d.ts +0 -0
  131. /package/{cjs → types}/internal/versionCompare.d.ts +0 -0
  132. /package/{cjs/internal → types/node}/Digest.d.ts +0 -0
  133. /package/{cjs → types}/node/HttpRequestSender.d.ts +0 -0
  134. /package/{cjs → types}/node/HttpServer.d.ts +0 -0
  135. /package/{cjs → types}/node/WsClient.d.ts +0 -0
  136. /package/{cjs → types}/types/CamOverlayAPI/accuweatherSchema.d.ts +0 -0
  137. /package/{cjs → types}/types/CamOverlayAPI/customGraphicsSchema.d.ts +0 -0
  138. /package/{cjs → types}/types/CamOverlayAPI/imagesSchema.d.ts +0 -0
  139. /package/{cjs → types}/types/CamOverlayAPI/index.d.ts +0 -0
  140. /package/{cjs → types}/types/CamOverlayAPI/pipSchema.d.ts +0 -0
  141. /package/{cjs → types}/types/CamOverlayAPI/ptzCompassSchema.d.ts +0 -0
  142. /package/{cjs → types}/types/CamOverlayAPI/ptzSchema.d.ts +0 -0
  143. /package/{cjs → types}/types/CamOverlayAPI/screenSharingSchema.d.ts +0 -0
  144. /package/{cjs → types}/types/CamOverlayAPI/webCameraSharingSchema.d.ts +0 -0
  145. /package/{cjs → types}/types/CamOverlayAPI/widgetCommonTypes.d.ts +0 -0
  146. /package/{cjs → types}/types/CamOverlayDrawingAPI.d.ts +0 -0
  147. /package/{cjs → types}/types/CamOverlayPainter.d.ts +0 -0
  148. /package/{cjs → types}/types/CamScripterAPI.d.ts +0 -0
  149. /package/{cjs → types}/types/CamSwitcherAPI.d.ts +0 -0
  150. /package/{cjs → types}/types/CamSwitcherEvents.d.ts +0 -0
  151. /package/{cjs → types}/types/PlaneTrackerAPI.d.ts +0 -0
  152. /package/{cjs → types}/types/VapixAPI.d.ts +0 -0
  153. /package/{cjs → types}/types/common.d.ts +0 -0
  154. /package/{cjs → types}/web/WsClient.d.ts +0 -0
  155. /package/{cjs → types}/web/index.d.ts +0 -0
@@ -1,19 +0,0 @@
1
- import { ProxyClient } from './internal/ProxyClient';
2
- import { IClient, TResponse } from './internal/types';
3
- import { TStreamAttributes, TStreamList } from './types/CamStreamerAPI';
4
- import { THttpRequestOptions, TProxyParams } from './types/common';
5
- export declare class CamStreamerAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
6
- client: Client;
7
- constructor(client: Client);
8
- getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
9
- getStreamList(options?: THttpRequestOptions): Promise<TStreamList>;
10
- getStream(streamId: string, options?: THttpRequestOptions): Promise<TStreamAttributes>;
11
- getStreamParameter(streamId: string, paramName: string, options?: THttpRequestOptions): Promise<string>;
12
- setStream(streamId: string, params: Partial<TStreamAttributes>, options?: THttpRequestOptions): Promise<void>;
13
- setStreamParameter(streamId: string, paramName: string, value: string, options?: THttpRequestOptions): Promise<void>;
14
- isStreaming(streamId: string, options?: THttpRequestOptions): Promise<boolean>;
15
- deleteStream(streamId: string, options?: THttpRequestOptions): Promise<void>;
16
- wsAuthorization(options?: THttpRequestOptions): Promise<string>;
17
- getUtcTime(options?: THttpRequestOptions): Promise<number>;
18
- private get;
19
- }
@@ -1,54 +0,0 @@
1
- import { IClient, TResponse } from './internal/types';
2
- import { TAudioPushInfo, TOutputInfo, TStorageInfo, TStreamSaveList, TClipList, TStreamSaveLoadList, TClipSaveLoadList, TPlaylistSaveLoadList, TTrackerSaveList, TrackerSaveLoadList, TClipSaveList, TPlaylistSaveList, TCameraOptions, TGlobalAudioSettings, TSecondaryAudioSettings } from './types/CamSwitcherAPI';
3
- import { TAudioChannel, THttpRequestOptions, TNetworkCamera, TProxyParams, TStorageType } from './types/common';
4
- import { ProxyClient } from './internal/ProxyClient';
5
- export declare class CamSwitcherAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
6
- client: Client;
7
- private CustomFormData;
8
- private vapixAgent;
9
- constructor(client: Client, CustomFormData?: {
10
- new (form?: HTMLFormElement | undefined, submitter?: HTMLElement | null | undefined): FormData;
11
- prototype: FormData;
12
- });
13
- static getProxyUrlPath: () => string;
14
- static getWsEventsUrlPath: () => string;
15
- static getClipPreviewUrlPath: (id: string, storage: TStorageType) => string;
16
- getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
17
- generateSilence(sampleRate: number, channels: TAudioChannel, options?: THttpRequestOptions): Promise<void>;
18
- checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
19
- getNetworkCameraList(options?: THttpRequestOptions): Promise<TNetworkCamera[]>;
20
- getMaxFps(source: number, options?: THttpRequestOptions): Promise<number>;
21
- getStorageInfo(options?: THttpRequestOptions): Promise<TStorageInfo[]>;
22
- wsAuthorization(options?: THttpRequestOptions): Promise<string>;
23
- getOutputInfo(options?: THttpRequestOptions): Promise<TOutputInfo>;
24
- getAudioPushInfo(options?: THttpRequestOptions): Promise<TAudioPushInfo>;
25
- getStreamSaveList(options?: THttpRequestOptions): Promise<TStreamSaveLoadList>;
26
- getClipSaveList(options?: THttpRequestOptions): Promise<TClipSaveLoadList>;
27
- getPlaylistSaveList(options?: THttpRequestOptions): Promise<TPlaylistSaveLoadList>;
28
- getTrackerSaveList(options?: THttpRequestOptions): Promise<TrackerSaveLoadList>;
29
- setStreamSaveList(data: TStreamSaveList, options?: THttpRequestOptions): Promise<boolean>;
30
- setClipSaveList(data: TClipSaveList, options?: THttpRequestOptions): Promise<boolean>;
31
- setPlaylistSaveList(data: TPlaylistSaveList, options?: THttpRequestOptions): Promise<boolean>;
32
- setTrackerSaveList(data: TTrackerSaveList, options?: THttpRequestOptions): Promise<boolean>;
33
- playlistSwitch(playlistName: string, options?: THttpRequestOptions): Promise<void>;
34
- playlistQueuePush(playlistName: string, options?: THttpRequestOptions): Promise<void>;
35
- playlistQueueClear(options?: THttpRequestOptions): Promise<void>;
36
- playlistQueueList(options?: THttpRequestOptions): Promise<string[]>;
37
- playlistQueuePlayNext(options?: THttpRequestOptions): Promise<void>;
38
- addNewClip(file: any, clipType: 'video' | 'audio', storage: TStorageType, id: string, fileName?: string, options?: THttpRequestOptions): Promise<void>;
39
- removeClip(id: string, storage: TStorageType, options?: THttpRequestOptions): Promise<any>;
40
- getClipList(options?: THttpRequestOptions): Promise<TClipList>;
41
- setCamSwitchOptions(data: TCameraOptions, cameraFWVersion: string, options?: THttpRequestOptions): Promise<boolean>;
42
- setGlobalAudioSettings(settings: TGlobalAudioSettings, options?: THttpRequestOptions): Promise<boolean>;
43
- setSecondaryAudioSettings(settings: TSecondaryAudioSettings, options?: THttpRequestOptions): Promise<boolean>;
44
- setDefaultPlaylist(id: string, options?: THttpRequestOptions): Promise<boolean>;
45
- setPermanentRtspUrlToken(token: string, options?: THttpRequestOptions): Promise<boolean>;
46
- getCamSwitchOptions(options?: THttpRequestOptions): Promise<Partial<TCameraOptions>>;
47
- getGlobalAudioSettings(options?: THttpRequestOptions): Promise<TGlobalAudioSettings>;
48
- getSecondaryAudioSettings(options?: THttpRequestOptions): Promise<TSecondaryAudioSettings>;
49
- getPermanentRtspUrlToken(options?: THttpRequestOptions): Promise<string>;
50
- private get;
51
- private set;
52
- private setParamFromCameraJSON;
53
- private getParamFromCameraAndJSONParse;
54
- }
@@ -1,18 +0,0 @@
1
- import { IWebsocket } from './internal/types';
2
- import { TCamSwitcherEventOfType, TCamSwitcherEventType } from './types/CamSwitcherEvents';
3
- type TListenerFunction<T extends TCamSwitcherEventType> = (data: TCamSwitcherEventOfType<T>, isInit: boolean) => void;
4
- export declare class CamSwitcherEvents<Event extends {
5
- data: string;
6
- }> {
7
- isDestroyed: boolean;
8
- private ws;
9
- private listeners;
10
- setWebsocket(ws: IWebsocket<Event>): void;
11
- resendInitData(): void;
12
- addListener<T extends TCamSwitcherEventType>(type: T, listener: TListenerFunction<T>, id: string): void;
13
- removeListener<T extends TCamSwitcherEventType>(type: T, id: string): void;
14
- private onMessage;
15
- private processMessage;
16
- destroy(): void;
17
- }
18
- export {};
@@ -1,43 +0,0 @@
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> = IClient<TResponse>> {
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: FormData, 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
- }
@@ -1,12 +0,0 @@
1
- import { HttpOptions } from '../internal/types';
2
- import { THttpRequestOptions, TProxyParams } from '../types/common';
3
- import { ProxyClient } from '../internal/ProxyClient';
4
- import { DefaultClient } from '../node';
5
- export declare class AxisCameraStationEvents {
6
- private sourceKey;
7
- private client;
8
- constructor(clientOptions: HttpOptions, sourceKey: string);
9
- getClient(proxyParams?: TProxyParams): DefaultClient | ProxyClient<DefaultClient>;
10
- sendEvent(data: Record<string, string>, eventType: string, options?: THttpRequestOptions): Promise<void>;
11
- private getDate;
12
- }
@@ -1,177 +0,0 @@
1
- import { z } from 'zod';
2
- declare const cameraGuidsResponseSchema: z.ZodObject<{
3
- Rsp: z.ZodObject<{
4
- Status: z.ZodString;
5
- Result: z.ZodArray<z.ZodObject<{
6
- Guid: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- Guid: string;
9
- }, {
10
- Guid: string;
11
- }>, "many">;
12
- }, "strip", z.ZodTypeAny, {
13
- Status: string;
14
- Result: {
15
- Guid: string;
16
- }[];
17
- }, {
18
- Status: string;
19
- Result: {
20
- Guid: string;
21
- }[];
22
- }>;
23
- }, "strip", z.ZodTypeAny, {
24
- Rsp: {
25
- Status: string;
26
- Result: {
27
- Guid: string;
28
- }[];
29
- };
30
- }, {
31
- Rsp: {
32
- Status: string;
33
- Result: {
34
- Guid: string;
35
- }[];
36
- };
37
- }>;
38
- export type TCameraGuidsResponse = z.infer<typeof cameraGuidsResponseSchema>;
39
- declare const connectionResponseSchema: z.ZodObject<{
40
- Rsp: z.ZodObject<{
41
- Status: z.ZodString;
42
- }, "strip", z.ZodTypeAny, {
43
- Status: string;
44
- }, {
45
- Status: string;
46
- }>;
47
- }, "strip", z.ZodTypeAny, {
48
- Rsp: {
49
- Status: string;
50
- };
51
- }, {
52
- Rsp: {
53
- Status: string;
54
- };
55
- }>;
56
- export type TConnectionResponse = z.infer<typeof connectionResponseSchema>;
57
- export declare const cameraDetailSchema: z.ZodObject<{
58
- Guid: z.ZodOptional<z.ZodString>;
59
- Name: z.ZodOptional<z.ZodString>;
60
- EntityType: z.ZodOptional<z.ZodString>;
61
- }, "strip", z.ZodTypeAny, {
62
- Name?: string | undefined;
63
- Guid?: string | undefined;
64
- EntityType?: string | undefined;
65
- }, {
66
- Name?: string | undefined;
67
- Guid?: string | undefined;
68
- EntityType?: string | undefined;
69
- }>;
70
- export declare const cameraDetailsResponseSchema: z.ZodObject<{
71
- Rsp: z.ZodObject<{
72
- Status: z.ZodString;
73
- Result: z.ZodUnion<[z.ZodArray<z.ZodObject<{
74
- Guid: z.ZodOptional<z.ZodString>;
75
- Name: z.ZodOptional<z.ZodString>;
76
- EntityType: z.ZodOptional<z.ZodString>;
77
- }, "strip", z.ZodTypeAny, {
78
- Name?: string | undefined;
79
- Guid?: string | undefined;
80
- EntityType?: string | undefined;
81
- }, {
82
- Name?: string | undefined;
83
- Guid?: string | undefined;
84
- EntityType?: string | undefined;
85
- }>, "many">, z.ZodObject<{
86
- Guid: z.ZodOptional<z.ZodString>;
87
- Name: z.ZodOptional<z.ZodString>;
88
- EntityType: z.ZodOptional<z.ZodString>;
89
- }, "strip", z.ZodTypeAny, {
90
- Name?: string | undefined;
91
- Guid?: string | undefined;
92
- EntityType?: string | undefined;
93
- }, {
94
- Name?: string | undefined;
95
- Guid?: string | undefined;
96
- EntityType?: string | undefined;
97
- }>]>;
98
- }, "strip", z.ZodTypeAny, {
99
- Status: string;
100
- Result: {
101
- Name?: string | undefined;
102
- Guid?: string | undefined;
103
- EntityType?: string | undefined;
104
- } | {
105
- Name?: string | undefined;
106
- Guid?: string | undefined;
107
- EntityType?: string | undefined;
108
- }[];
109
- }, {
110
- Status: string;
111
- Result: {
112
- Name?: string | undefined;
113
- Guid?: string | undefined;
114
- EntityType?: string | undefined;
115
- } | {
116
- Name?: string | undefined;
117
- Guid?: string | undefined;
118
- EntityType?: string | undefined;
119
- }[];
120
- }>;
121
- }, "strip", z.ZodTypeAny, {
122
- Rsp: {
123
- Status: string;
124
- Result: {
125
- Name?: string | undefined;
126
- Guid?: string | undefined;
127
- EntityType?: string | undefined;
128
- } | {
129
- Name?: string | undefined;
130
- Guid?: string | undefined;
131
- EntityType?: string | undefined;
132
- }[];
133
- };
134
- }, {
135
- Rsp: {
136
- Status: string;
137
- Result: {
138
- Name?: string | undefined;
139
- Guid?: string | undefined;
140
- EntityType?: string | undefined;
141
- } | {
142
- Name?: string | undefined;
143
- Guid?: string | undefined;
144
- EntityType?: string | undefined;
145
- }[];
146
- };
147
- }>;
148
- export type TCameraDetailsResponse = z.infer<typeof cameraDetailsResponseSchema>;
149
- export type TCameraDetail = z.infer<typeof cameraDetailSchema>;
150
- export type TParams = Array<'Guid' | 'Name' | 'EntityType'>;
151
- export type TProtocol = 'http' | 'https' | 'https_insecure';
152
- export type GenetecAgentOptions = {
153
- protocol?: TProtocol;
154
- ip?: string;
155
- port?: number;
156
- baseUri?: string;
157
- user?: string;
158
- pass?: string;
159
- appId?: string;
160
- timeout?: number;
161
- };
162
- export declare class GenetecAgent {
163
- private settings;
164
- private baseUrl;
165
- private credentials;
166
- constructor(options?: GenetecAgentOptions);
167
- checkConnection(): Promise<TConnectionResponse>;
168
- getAllCameraGuids(): Promise<TCameraGuidsResponse>;
169
- getCameraDetails(guids: {
170
- Guid: string;
171
- }[], parameters: TParams): Promise<TCameraDetail[]>;
172
- sendBookmark(guids: string[], bookmarkText: string): Promise<Response>;
173
- private getRequestOptions;
174
- private getTimeStamp;
175
- private fetchWithTimeout;
176
- }
177
- export {};
@@ -1,10 +0,0 @@
1
- import { IClient, TGetParams, TPostParams, TResponse } from './types';
2
- import { TProxyParams } from '../types/common';
3
- export declare class ProxyClient<Client extends IClient<TResponse> = IClient<TResponse>> {
4
- private client;
5
- private proxyParams;
6
- constructor(client: Client, proxyParams: TProxyParams);
7
- get: (params: TGetParams) => Promise<TResponse>;
8
- post: (params: TPostParams) => Promise<TResponse>;
9
- private getReal;
10
- }
@@ -1,42 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { Response as UndiciResponse } from 'undici';
4
- export type Options = {
5
- ip?: string;
6
- port?: number;
7
- user?: string;
8
- pass?: string;
9
- tls?: boolean;
10
- tlsInsecure?: boolean;
11
- };
12
- export type HttpOptions = Options & {
13
- keepAlive?: boolean;
14
- };
15
- export type WsOptions = Options;
16
- export type TParameters = Record<string, string | number | boolean | null | undefined>;
17
- export type TResponse = Response | UndiciResponse;
18
- export type TGetParams = {
19
- path: string;
20
- parameters?: TParameters;
21
- headers?: Record<string, string>;
22
- timeout?: number;
23
- };
24
- export type TPostParams = {
25
- path: string;
26
- data: string | Buffer | FormData;
27
- parameters?: TParameters;
28
- headers?: Record<string, string>;
29
- timeout?: number;
30
- };
31
- export interface IClient<TRes extends TResponse> {
32
- get: (params: TGetParams) => Promise<TRes>;
33
- post: (params: TPostParams) => Promise<TRes>;
34
- }
35
- export type TBlobResponse<Client extends IClient<TResponse>> = Awaited<ReturnType<Awaited<ReturnType<Client['get']>>['blob']>>;
36
- export interface IWebsocket<Event extends {
37
- readonly data: string;
38
- }> {
39
- destroy: () => void;
40
- onmessage: null | ((event: Event) => void);
41
- send: (data: string) => void;
42
- }
@@ -1,4 +0,0 @@
1
- export { DefaultClient } from './DefaultClient';
2
- export { WsClient } from './WsClient';
3
- export { AxisCameraStationEvents } from '../events/AxisCameraStationEvents';
4
- export * from '../events/GenetecAgent';
@@ -1,96 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const infoTickerSchema: z.ZodObject<{
3
- id: z.ZodNumber;
4
- enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
5
- automationType: z.ZodUnion<[z.ZodLiteral<"time">, z.ZodLiteral<"manual">, z.ZodLiteral<"schedule">, z.ZodType<`input${number}`, z.ZodTypeDef, `input${number}`>]>;
6
- invertInput: z.ZodOptional<z.ZodBoolean>;
7
- cameraList: z.ZodArray<z.ZodNumber, "many">;
8
- camera: z.ZodOptional<z.ZodNumber>;
9
- schedule: z.ZodOptional<z.ZodString>;
10
- customName: z.ZodString;
11
- zIndex: z.ZodOptional<z.ZodNumber>;
12
- width: z.ZodNumber;
13
- height: z.ZodNumber;
14
- } & {
15
- name: z.ZodLiteral<"infoticker">;
16
- showClock: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
17
- clockType: z.ZodUnion<[z.ZodLiteral<"12h">, z.ZodLiteral<"24h">]>;
18
- textColor: z.ZodString;
19
- bgColor: z.ZodString;
20
- weatherLocation: z.ZodString;
21
- weatherLocationName: z.ZodString;
22
- weatherLang: z.ZodUnion<[z.ZodLiteral<"en-us">, z.ZodLiteral<"fr-fr">, z.ZodLiteral<"ja-jp">, z.ZodLiteral<"pt-pt">, z.ZodLiteral<"es-es">, z.ZodLiteral<"de-de">, z.ZodLiteral<"ko-kr">, z.ZodLiteral<"zh-hk">, z.ZodLiteral<"zh-cn">, z.ZodLiteral<"nl-nl">, z.ZodLiteral<"cs-cz">, z.ZodLiteral<"ru-ru">, z.ZodLiteral<"sv-se">]>;
23
- weatherUnits: z.ZodUnion<[z.ZodLiteral<"Metric">, z.ZodLiteral<"Imperial">]>;
24
- numberOfLines: z.ZodNumber;
25
- switchingTime: z.ZodNumber;
26
- crawlLeft: z.ZodBoolean;
27
- crawlSpeed: z.ZodNumber;
28
- coordSystem: z.ZodUnion<[z.ZodLiteral<"top">, z.ZodLiteral<"bottom">]>;
29
- pos_y: z.ZodNumber;
30
- font: z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"digital">, z.ZodType<string, z.ZodTypeDef, string>]>;
31
- fontSize: z.ZodNumber;
32
- sourceType: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"url">]>;
33
- source: z.ZodString;
34
- }, "strip", z.ZodTypeAny, {
35
- name: "infoticker";
36
- enabled: 0 | 1;
37
- id: number;
38
- width: number;
39
- height: number;
40
- source: string;
41
- automationType: "time" | "manual" | "schedule" | `input${number}`;
42
- cameraList: number[];
43
- customName: string;
44
- pos_y: number;
45
- coordSystem: "top" | "bottom";
46
- showClock: 0 | 1;
47
- clockType: "12h" | "24h";
48
- textColor: string;
49
- bgColor: string;
50
- weatherLocation: string;
51
- weatherLocationName: string;
52
- weatherLang: "en-us" | "fr-fr" | "ja-jp" | "pt-pt" | "es-es" | "de-de" | "ko-kr" | "zh-hk" | "zh-cn" | "nl-nl" | "cs-cz" | "ru-ru" | "sv-se";
53
- weatherUnits: "Metric" | "Imperial";
54
- numberOfLines: number;
55
- switchingTime: number;
56
- crawlLeft: boolean;
57
- crawlSpeed: number;
58
- font: string;
59
- fontSize: number;
60
- sourceType: "url" | "text";
61
- camera?: number | undefined;
62
- schedule?: string | undefined;
63
- invertInput?: boolean | undefined;
64
- zIndex?: number | undefined;
65
- }, {
66
- name: "infoticker";
67
- enabled: 0 | 1;
68
- id: number;
69
- width: number;
70
- height: number;
71
- source: string;
72
- automationType: "time" | "manual" | "schedule" | `input${number}`;
73
- cameraList: number[];
74
- customName: string;
75
- pos_y: number;
76
- coordSystem: "top" | "bottom";
77
- showClock: 0 | 1;
78
- clockType: "12h" | "24h";
79
- textColor: string;
80
- bgColor: string;
81
- weatherLocation: string;
82
- weatherLocationName: string;
83
- weatherLang: "en-us" | "fr-fr" | "ja-jp" | "pt-pt" | "es-es" | "de-de" | "ko-kr" | "zh-hk" | "zh-cn" | "nl-nl" | "cs-cz" | "ru-ru" | "sv-se";
84
- weatherUnits: "Metric" | "Imperial";
85
- numberOfLines: number;
86
- switchingTime: number;
87
- crawlLeft: boolean;
88
- crawlSpeed: number;
89
- font: string;
90
- fontSize: number;
91
- sourceType: "url" | "text";
92
- camera?: number | undefined;
93
- schedule?: string | undefined;
94
- invertInput?: boolean | undefined;
95
- zIndex?: number | undefined;
96
- }>;
@@ -1,150 +0,0 @@
1
- import { HttpOptions } from '../internal/types';
2
- import { z } from 'zod';
3
- export type CamStreamerAPIOptions = HttpOptions;
4
- export declare const streamAttributesSchema: z.ZodObject<{
5
- enabled: z.ZodString;
6
- active: z.ZodString;
7
- audioSource: z.ZodString;
8
- avSyncMsec: z.ZodString;
9
- internalVapixParameters: z.ZodString;
10
- userVapixParameters: z.ZodString;
11
- outputParameters: z.ZodString;
12
- outputType: z.ZodString;
13
- mediaServerUrl: z.ZodString;
14
- inputType: z.ZodString;
15
- inputUrl: z.ZodString;
16
- forceStereo: z.ZodString;
17
- streamDelay: z.ZodString;
18
- statusLed: z.ZodString;
19
- statusPort: z.ZodString;
20
- callApi: z.ZodString;
21
- trigger: z.ZodString;
22
- schedule: z.ZodString;
23
- prepareAhead: z.ZodString;
24
- startTime: z.ZodString;
25
- stopTime: z.ZodString;
26
- }, "strip", z.ZodTypeAny, {
27
- enabled: string;
28
- schedule: string;
29
- active: string;
30
- audioSource: string;
31
- avSyncMsec: string;
32
- internalVapixParameters: string;
33
- userVapixParameters: string;
34
- outputParameters: string;
35
- outputType: string;
36
- mediaServerUrl: string;
37
- inputType: string;
38
- inputUrl: string;
39
- forceStereo: string;
40
- streamDelay: string;
41
- statusLed: string;
42
- statusPort: string;
43
- callApi: string;
44
- trigger: string;
45
- prepareAhead: string;
46
- startTime: string;
47
- stopTime: string;
48
- }, {
49
- enabled: string;
50
- schedule: string;
51
- active: string;
52
- audioSource: string;
53
- avSyncMsec: string;
54
- internalVapixParameters: string;
55
- userVapixParameters: string;
56
- outputParameters: string;
57
- outputType: string;
58
- mediaServerUrl: string;
59
- inputType: string;
60
- inputUrl: string;
61
- forceStereo: string;
62
- streamDelay: string;
63
- statusLed: string;
64
- statusPort: string;
65
- callApi: string;
66
- trigger: string;
67
- prepareAhead: string;
68
- startTime: string;
69
- stopTime: string;
70
- }>;
71
- export type TStreamAttributes = z.infer<typeof streamAttributesSchema>;
72
- export declare const streamListSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
73
- enabled: z.ZodString;
74
- active: z.ZodString;
75
- audioSource: z.ZodString;
76
- avSyncMsec: z.ZodString;
77
- internalVapixParameters: z.ZodString;
78
- userVapixParameters: z.ZodString;
79
- outputParameters: z.ZodString;
80
- outputType: z.ZodString;
81
- mediaServerUrl: z.ZodString;
82
- inputType: z.ZodString;
83
- inputUrl: z.ZodString;
84
- forceStereo: z.ZodString;
85
- streamDelay: z.ZodString;
86
- statusLed: z.ZodString;
87
- statusPort: z.ZodString;
88
- callApi: z.ZodString;
89
- trigger: z.ZodString;
90
- schedule: z.ZodString;
91
- prepareAhead: z.ZodString;
92
- startTime: z.ZodString;
93
- stopTime: z.ZodString;
94
- }, "strip", z.ZodTypeAny, {
95
- enabled: string;
96
- schedule: string;
97
- active: string;
98
- audioSource: string;
99
- avSyncMsec: string;
100
- internalVapixParameters: string;
101
- userVapixParameters: string;
102
- outputParameters: string;
103
- outputType: string;
104
- mediaServerUrl: string;
105
- inputType: string;
106
- inputUrl: string;
107
- forceStereo: string;
108
- streamDelay: string;
109
- statusLed: string;
110
- statusPort: string;
111
- callApi: string;
112
- trigger: string;
113
- prepareAhead: string;
114
- startTime: string;
115
- stopTime: string;
116
- }, {
117
- enabled: string;
118
- schedule: string;
119
- active: string;
120
- audioSource: string;
121
- avSyncMsec: string;
122
- internalVapixParameters: string;
123
- userVapixParameters: string;
124
- outputParameters: string;
125
- outputType: string;
126
- mediaServerUrl: string;
127
- inputType: string;
128
- inputUrl: string;
129
- forceStereo: string;
130
- streamDelay: string;
131
- statusLed: string;
132
- statusPort: string;
133
- callApi: string;
134
- trigger: string;
135
- prepareAhead: string;
136
- startTime: string;
137
- stopTime: string;
138
- }>>;
139
- export type TStreamList = z.infer<typeof streamListSchema>;
140
- export declare const camstreamerServerResponseSchema: z.ZodObject<{
141
- code: z.ZodNumber;
142
- message: z.ZodString;
143
- }, "strip", z.ZodTypeAny, {
144
- code: number;
145
- message: string;
146
- }, {
147
- code: number;
148
- message: string;
149
- }>;
150
- export type TCamstreamerServerResponse = z.infer<typeof camstreamerServerResponseSchema>;
@@ -1,6 +0,0 @@
1
- import { IClient, TGetParams, TPostParams } from '../internal/types';
2
- export declare class DefaultClient implements IClient<Response> {
3
- get: (params: TGetParams) => Promise<Response>;
4
- post: (params: TPostParams) => Promise<Response>;
5
- private fetchWithTimeout;
6
- }