camstreamerlib 4.0.0-beta.37 → 4.0.0-beta.38

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 (75) hide show
  1. package/cjs/CamOverlayAPI.js +42 -69
  2. package/cjs/CamScripterAPI.js +30 -24
  3. package/cjs/CamStreamerAPI.js +30 -33
  4. package/cjs/CamSwitcherAPI.js +57 -52
  5. package/cjs/PlaneTrackerAPI.js +55 -66
  6. package/cjs/VapixAPI.js +23 -22
  7. package/cjs/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
  8. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +4 -14
  9. package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
  10. package/cjs/{VapixEvents.js → node/VapixEvents.js} +1 -1
  11. package/cjs/node/events/GenetecAgent.js +5 -27
  12. package/cjs/node/index.js +17 -0
  13. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
  14. package/cjs/types/CamOverlayPainter.js +12 -0
  15. package/cjs/types/CamScripterAPICameraEventsGenerator.js +2 -0
  16. package/cjs/types/CamSwitcherAPI.js +38 -1
  17. package/cjs/types/GenetecAgent.js +31 -0
  18. package/cjs/types/PlaneTrackerAPI.js +277 -0
  19. package/cjs/types/VapixAPI.js +20 -2
  20. package/cjs/types/VapixEvents.js +2 -0
  21. package/esm/CamOverlayAPI.js +43 -70
  22. package/esm/CamScripterAPI.js +30 -24
  23. package/esm/CamStreamerAPI.js +30 -30
  24. package/esm/CamSwitcherAPI.js +58 -53
  25. package/esm/PlaneTrackerAPI.js +56 -67
  26. package/esm/VapixAPI.js +24 -23
  27. package/esm/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
  28. package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +1 -11
  29. package/esm/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
  30. package/esm/{VapixEvents.js → node/VapixEvents.js} +1 -1
  31. package/esm/node/events/GenetecAgent.js +1 -23
  32. package/esm/node/index.js +10 -0
  33. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +1 -1
  34. package/esm/types/CamOverlayPainter.js +11 -1
  35. package/esm/types/CamSwitcherAPI.js +38 -1
  36. package/esm/types/GenetecAgent.js +28 -0
  37. package/esm/types/PlaneTrackerAPI.js +276 -1
  38. package/esm/types/VapixAPI.js +19 -1
  39. package/esm/types/VapixEvents.js +1 -0
  40. package/package.json +1 -1
  41. package/types/CamOverlayAPI.d.ts +16 -6
  42. package/types/CamScripterAPI.d.ts +34 -9
  43. package/types/CamStreamerAPI.d.ts +27 -5
  44. package/types/CamSwitcherAPI.d.ts +136 -23
  45. package/types/PlaneTrackerAPI.d.ts +201 -20
  46. package/types/VapixAPI.d.ts +46 -12
  47. package/types/bin/CreatePackage.d.ts +1 -0
  48. package/types/{CamOverlayDrawingAPI.d.ts → node/CamOverlayDrawingAPI.d.ts} +1 -1
  49. package/types/{CamOverlayPainter → node/CamOverlayPainter}/Frame.d.ts +2 -2
  50. package/types/{CamOverlayPainter → node/CamOverlayPainter}/Painter.d.ts +2 -13
  51. package/types/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.d.ts +1 -1
  52. package/types/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
  53. package/types/node/VapixEvents.d.ts +16 -0
  54. package/types/node/events/GenetecAgent.d.ts +1 -144
  55. package/types/node/index.d.ts +10 -0
  56. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +2 -2
  57. package/types/types/CamOverlayDrawingAPI.d.ts +3 -13
  58. package/types/types/CamOverlayPainter.d.ts +12 -10
  59. package/types/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
  60. package/types/types/CamStreamerAPI.d.ts +2 -2
  61. package/types/types/CamSwitcherAPI.d.ts +111 -30
  62. package/types/types/GenetecAgent.d.ts +174 -0
  63. package/types/types/PlaneTrackerAPI.d.ts +859 -0
  64. package/types/types/VapixAPI.d.ts +54 -8
  65. package/types/types/VapixEvents.d.ts +15 -0
  66. package/types/types/common.d.ts +1 -0
  67. package/types/CamScripterAPICameraEventsGenerator.d.ts +0 -74
  68. package/types/VapixEvents.d.ts +0 -43
  69. /package/cjs/{CreatePackage.js → bin/CreatePackage.js} +0 -0
  70. /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
  71. /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
  72. /package/esm/{CreatePackage.js → bin/CreatePackage.js} +0 -0
  73. /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
  74. /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
  75. /package/{types/CreatePackage.d.ts → esm/types/CamScripterAPICameraEventsGenerator.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { IClient, TParameters, TResponse } from './internal/types';
2
- import { TAudioSampleRates, TSDCardInfo, TPtzOverview, TCameraPTZItem, TCameraPTZItemData, TAudioDevice, TPortSetSchema, TPortSequenceStateSchema } from './types/VapixAPI';
2
+ import { TAudioDevice, TPortSetSchema, TPortSequenceStateSchema } from './types/VapixAPI';
3
3
  import { ProxyClient } from './internal/ProxyClient';
4
4
  import { TCameraImageConfig, THttpRequestOptions, TProxyParams } from './types/common';
5
5
  export declare class VapixAPI<Client extends IClient<TResponse, any>> {
@@ -14,9 +14,16 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> {
14
14
  postJson(path: string, jsonData: Record<string, any>, headers?: Record<string, string>, options?: THttpRequestOptions): Promise<TResponse>;
15
15
  getCameraImage(parameters: TCameraImageConfig, options?: THttpRequestOptions): Promise<ReturnType<Client["get"]>>;
16
16
  getEventDeclarations(options?: THttpRequestOptions): Promise<string>;
17
- getSupportedAudioSampleRate(options?: THttpRequestOptions): Promise<TAudioSampleRates[]>;
17
+ getSupportedAudioSampleRate(options?: THttpRequestOptions): Promise<{
18
+ sampleRate: number;
19
+ bitRates: number[];
20
+ }[]>;
18
21
  performAutofocus(options?: THttpRequestOptions): Promise<void>;
19
- checkSDCard(options?: THttpRequestOptions): Promise<TSDCardInfo>;
22
+ checkSDCard(options?: THttpRequestOptions): Promise<{
23
+ status: "OK" | "connected" | "disconnected";
24
+ totalSize: number;
25
+ freeSize: number;
26
+ }>;
20
27
  mountSDCard(options?: THttpRequestOptions): Promise<number>;
21
28
  unmountSDCard(options?: THttpRequestOptions): Promise<number>;
22
29
  private _doSDCardMountAction;
@@ -54,13 +61,28 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> {
54
61
  camNbr?: unknown;
55
62
  randomEnabled?: unknown;
56
63
  timeBetweenSequences?: unknown;
57
- }[]>;
58
- setGuardTourEnabled(guardTourID: string, enable: boolean, options?: THttpRequestOptions): Promise<void>;
64
+ }>;
65
+ setGuardTourEnabled(guardTourId: string, enable: boolean, options?: THttpRequestOptions): Promise<void>;
59
66
  getPTZPresetList(channel: number, options?: THttpRequestOptions): Promise<string[]>;
60
- listPTZ(camera: number, options?: THttpRequestOptions): Promise<TCameraPTZItem[]>;
61
- listPtzVideoSourceOverview(options?: THttpRequestOptions): Promise<TPtzOverview>;
67
+ listPTZ(camera: number, options?: THttpRequestOptions): Promise<{
68
+ name: string;
69
+ id: number;
70
+ data: {
71
+ pan?: number | undefined;
72
+ tilt?: number | undefined;
73
+ zoom?: number | undefined;
74
+ };
75
+ }[]>;
76
+ listPtzVideoSourceOverview(options?: THttpRequestOptions): Promise<Record<number, {
77
+ name: string;
78
+ id: number;
79
+ }[]>>;
62
80
  goToPreset(channel: number, presetName: string, options?: THttpRequestOptions): Promise<TResponse>;
63
- getPtzPosition(camera: number, options?: THttpRequestOptions): Promise<TCameraPTZItemData>;
81
+ getPtzPosition(camera: number, options?: THttpRequestOptions): Promise<{
82
+ pan?: number | undefined;
83
+ tilt?: number | undefined;
84
+ zoom?: number | undefined;
85
+ }>;
64
86
  getPorts(options?: THttpRequestOptions): Promise<{
65
87
  name: string;
66
88
  port: string;
@@ -73,10 +95,22 @@ export declare class VapixAPI<Client extends IClient<TResponse, any>> {
73
95
  }[]>;
74
96
  setPorts(ports: TPortSetSchema[], options?: THttpRequestOptions): Promise<void>;
75
97
  setPortStateSequence(port: number, sequence: TPortSequenceStateSchema[], options?: THttpRequestOptions): Promise<void>;
76
- getApplicationList(options?: THttpRequestOptions): Promise<any>;
77
- startApplication(applicationID: string, options?: THttpRequestOptions): Promise<void>;
78
- restartApplication(applicationID: string, options?: THttpRequestOptions): Promise<void>;
79
- stopApplication(applicationID: string, options?: THttpRequestOptions): Promise<void>;
98
+ getApplicationList(options?: THttpRequestOptions): Promise<{
99
+ Name: string;
100
+ NiceName: string;
101
+ Vendor: string;
102
+ Version: string;
103
+ License: string;
104
+ Status: string;
105
+ appId: "CamStreamer" | "CamSwitcher" | "CamOverlay" | "CamScripter" | "PlaneTracker" | "Ndihxplugin" | "SportTracker" | null;
106
+ ApplicationID?: string | undefined;
107
+ ConfigurationPage?: string | undefined;
108
+ VendorHomePage?: string | undefined;
109
+ LicenseName?: string | undefined;
110
+ }[]>;
111
+ startApplication(applicationId: string, options?: THttpRequestOptions): Promise<void>;
112
+ restartApplication(applicationId: string, options?: THttpRequestOptions): Promise<void>;
113
+ stopApplication(applicationId: string, options?: THttpRequestOptions): Promise<void>;
80
114
  installApplication(data: Parameters<typeof FormData.prototype.append>[1], fileName: string, options?: THttpRequestOptions): Promise<void>;
81
115
  private static parseParameters;
82
116
  private static parseCameraPtzResponse;
@@ -0,0 +1 @@
1
+ export {};
@@ -2,7 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
4
  import EventEmitter from 'events';
5
- import { CamOverlayDrawingOptions, TCairoCreateResponse, TCairoResponse, TUploadImageResponse, TWriteTextParams } from './types/CamOverlayDrawingAPI';
5
+ import { CamOverlayDrawingOptions, TCairoCreateResponse, TCairoResponse, TUploadImageResponse, TWriteTextParams } from '../types/CamOverlayDrawingAPI';
6
6
  export declare class CamOverlayDrawingAPI extends EventEmitter {
7
7
  private tls;
8
8
  private tlsInsecure;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { EventEmitter } from 'events';
3
3
  import { CamOverlayDrawingAPI } from '../CamOverlayDrawingAPI';
4
- import { TAlign, TCairoCreateResponse, TUploadImageResponse } from '../types/CamOverlayDrawingAPI';
4
+ import { TAlign, TCairoCreateResponse, TUploadImageResponse } from '../../types/CamOverlayDrawingAPI';
5
5
  import { ResourceManager } from './ResourceManager';
6
- import { TBg, TBorder, TDrawingCallback, TFrame, TFrameOptions, TObjectFitType, TRgb, TRgba, TText, TTmf } from '../types/CamOverlayPainter';
6
+ import { TBg, TBorder, TDrawingCallback, TFrame, TFrameOptions, TObjectFitType, TRgb, TRgba, TText, TTmf } from '../../types/CamOverlayPainter';
7
7
  export declare class Frame extends EventEmitter {
8
8
  protected enabled: boolean;
9
9
  protected posX: number;
@@ -1,19 +1,8 @@
1
1
  import { CamOverlayDrawingAPI } from '../CamOverlayDrawingAPI';
2
- import { CamOverlayDrawingOptions } from '../types/CamOverlayDrawingAPI';
2
+ import { CamOverlayDrawingOptions } from '../../types/CamOverlayDrawingAPI';
3
3
  import { ResourceManager } from './ResourceManager';
4
4
  import { Frame } from './Frame';
5
- import { TCoAlignment, TPainterOptions } from '../types/CamOverlayPainter';
6
- export declare const COORD: {
7
- readonly top_left: readonly [-1, -1];
8
- readonly center_left: readonly [-1, 0];
9
- readonly bottom_left: readonly [-1, 1];
10
- readonly top_center: readonly [0, -1];
11
- readonly center: readonly [0, 0];
12
- readonly bottom_center: readonly [0, 1];
13
- readonly top_right: readonly [1, -1];
14
- readonly center_right: readonly [1, 0];
15
- readonly bottom_right: readonly [1, 1];
16
- };
5
+ import { TCoAlignment, TPainterOptions } from '../../types/CamOverlayPainter';
17
6
  export declare class Painter extends Frame {
18
7
  private screenWidth;
19
8
  private screenHeight;
@@ -1,5 +1,5 @@
1
1
  import { CamOverlayDrawingAPI } from '../CamOverlayDrawingAPI';
2
- import { TUploadImageResponse, TCairoCreateResponse } from '../types/CamOverlayDrawingAPI';
2
+ import { TUploadImageResponse, TCairoCreateResponse } from '../../types/CamOverlayDrawingAPI';
3
3
  export declare class ResourceManager {
4
4
  private co;
5
5
  private imgFileNames;
@@ -0,0 +1,31 @@
1
+ /// <reference types="node" />
2
+ import EventEmitter from 'events';
3
+ import { WsOptions } from '../internal/types';
4
+ import { TCamScripterEvent, TEventDeclaration, TEventUndeclaration, TCamScripterResponse } from '../types/CamScripterAPICameraEventsGenerator';
5
+ export declare class CamScripterAPICameraEventsGenerator extends EventEmitter {
6
+ private tls;
7
+ private tlsInsecure;
8
+ private ip;
9
+ private port;
10
+ private user;
11
+ private pass;
12
+ private callId;
13
+ private sendMessages;
14
+ private timeoutCheckTimer;
15
+ private wsConnected;
16
+ private ws;
17
+ constructor(options?: WsOptions);
18
+ connect(): void;
19
+ disconnect(): void;
20
+ declareEvent(eventDeclaration: TEventDeclaration): Promise<TCamScripterResponse>;
21
+ undeclareEvent(eventUndeclaration: TEventUndeclaration): Promise<TCamScripterResponse>;
22
+ sendEvent(event: TCamScripterEvent): Promise<TCamScripterResponse>;
23
+ private createWsClient;
24
+ private incomingWsMessageHandler;
25
+ private sendMessage;
26
+ private startMsgsTimeoutCheck;
27
+ private stopMsgsTimeoutCheck;
28
+ private reconnectWithError;
29
+ private reportErr;
30
+ private reportClose;
31
+ }
@@ -0,0 +1,16 @@
1
+ import { EventEmitter2 as EventEmitter } from 'eventemitter2';
2
+ import { WsOptions } from '../internal/types';
3
+ export declare class VapixEvents extends EventEmitter {
4
+ private tls;
5
+ private tlsInsecure;
6
+ private ip;
7
+ private port;
8
+ private user;
9
+ private pass;
10
+ private ws;
11
+ constructor(options?: WsOptions);
12
+ connect(): void;
13
+ disconnect(): void;
14
+ private createWsClient;
15
+ private isReservedEventName;
16
+ }
@@ -1,146 +1,4 @@
1
- import { z } from 'zod';
2
- declare const cameraGuidsResponseSchema: z.ZodObject<{
3
- Rsp: z.ZodObject<{
4
- Status: z.ZodLiteral<"Ok">;
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: "Ok";
14
- Result: {
15
- Guid: string;
16
- }[];
17
- }, {
18
- Status: "Ok";
19
- Result: {
20
- Guid: string;
21
- }[];
22
- }>;
23
- }, "strip", z.ZodTypeAny, {
24
- Rsp: {
25
- Status: "Ok";
26
- Result: {
27
- Guid: string;
28
- }[];
29
- };
30
- }, {
31
- Rsp: {
32
- Status: "Ok";
33
- Result: {
34
- Guid: string;
35
- }[];
36
- };
37
- }>;
38
- export type TCameraGuidsResponse = z.infer<typeof cameraGuidsResponseSchema>;
39
- declare const cameraDetailSchema: z.ZodObject<{
40
- Guid: z.ZodOptional<z.ZodString>;
41
- Name: z.ZodOptional<z.ZodString>;
42
- EntityType: z.ZodOptional<z.ZodString>;
43
- }, "strip", z.ZodTypeAny, {
44
- Name?: string | undefined;
45
- Guid?: string | undefined;
46
- EntityType?: string | undefined;
47
- }, {
48
- Name?: string | undefined;
49
- Guid?: string | undefined;
50
- EntityType?: string | undefined;
51
- }>;
52
- declare const cameraDetailsResponseSchema: z.ZodObject<{
53
- Rsp: z.ZodObject<{
54
- Status: z.ZodLiteral<"Ok">;
55
- Result: z.ZodUnion<[z.ZodArray<z.ZodObject<{
56
- Guid: z.ZodOptional<z.ZodString>;
57
- Name: z.ZodOptional<z.ZodString>;
58
- EntityType: z.ZodOptional<z.ZodString>;
59
- }, "strip", z.ZodTypeAny, {
60
- Name?: string | undefined;
61
- Guid?: string | undefined;
62
- EntityType?: string | undefined;
63
- }, {
64
- Name?: string | undefined;
65
- Guid?: string | undefined;
66
- EntityType?: string | undefined;
67
- }>, "many">, z.ZodObject<{
68
- Guid: z.ZodOptional<z.ZodString>;
69
- Name: z.ZodOptional<z.ZodString>;
70
- EntityType: z.ZodOptional<z.ZodString>;
71
- }, "strip", z.ZodTypeAny, {
72
- Name?: string | undefined;
73
- Guid?: string | undefined;
74
- EntityType?: string | undefined;
75
- }, {
76
- Name?: string | undefined;
77
- Guid?: string | undefined;
78
- EntityType?: string | undefined;
79
- }>]>;
80
- }, "strip", z.ZodTypeAny, {
81
- Status: "Ok";
82
- Result: {
83
- Name?: string | undefined;
84
- Guid?: string | undefined;
85
- EntityType?: string | undefined;
86
- } | {
87
- Name?: string | undefined;
88
- Guid?: string | undefined;
89
- EntityType?: string | undefined;
90
- }[];
91
- }, {
92
- Status: "Ok";
93
- Result: {
94
- Name?: string | undefined;
95
- Guid?: string | undefined;
96
- EntityType?: string | undefined;
97
- } | {
98
- Name?: string | undefined;
99
- Guid?: string | undefined;
100
- EntityType?: string | undefined;
101
- }[];
102
- }>;
103
- }, "strip", z.ZodTypeAny, {
104
- Rsp: {
105
- Status: "Ok";
106
- Result: {
107
- Name?: string | undefined;
108
- Guid?: string | undefined;
109
- EntityType?: string | undefined;
110
- } | {
111
- Name?: string | undefined;
112
- Guid?: string | undefined;
113
- EntityType?: string | undefined;
114
- }[];
115
- };
116
- }, {
117
- Rsp: {
118
- Status: "Ok";
119
- Result: {
120
- Name?: string | undefined;
121
- Guid?: string | undefined;
122
- EntityType?: string | undefined;
123
- } | {
124
- Name?: string | undefined;
125
- Guid?: string | undefined;
126
- EntityType?: string | undefined;
127
- }[];
128
- };
129
- }>;
130
- export type TCameraDetailsResponse = z.infer<typeof cameraDetailsResponseSchema>;
131
- export type TCameraDetail = z.infer<typeof cameraDetailSchema>;
132
- export type TParams = Array<'Guid' | 'Name' | 'EntityType'>;
133
- export type TProtocol = 'http' | 'https' | 'https_insecure';
134
- export type GenetecAgentOptions = {
135
- protocol?: TProtocol;
136
- ip?: string;
137
- port?: number;
138
- baseUri?: string;
139
- user?: string;
140
- pass?: string;
141
- appId?: string;
142
- timeout?: number;
143
- };
1
+ import { GenetecAgentOptions, TCameraDetail, TCameraGuidsResponse, TParams } from '../../types/GenetecAgent';
144
2
  export declare class GenetecAgent {
145
3
  private settings;
146
4
  private baseUrl;
@@ -156,4 +14,3 @@ export declare class GenetecAgent {
156
14
  private getTimeStamp;
157
15
  private fetchWithTimeout;
158
16
  }
159
- export {};
@@ -3,3 +3,13 @@ export * from './WsClient';
3
3
  export * from './HttpServer';
4
4
  export * from './events/AxisCameraStationEvents';
5
5
  export * from './events/GenetecAgent';
6
+ export { ResourceManager } from './CamOverlayPainter/ResourceManager';
7
+ export { Painter } from './CamOverlayPainter/Painter';
8
+ export { Frame } from './CamOverlayPainter/Frame';
9
+ export * from '../types/CamOverlayPainter';
10
+ export { CamOverlayDrawingAPI } from './CamOverlayDrawingAPI';
11
+ export * from '../types/CamOverlayDrawingAPI';
12
+ export { CamScripterAPICameraEventsGenerator } from './CamScripterAPICameraEventsGenerator';
13
+ export * from '../types/CamScripterAPICameraEventsGenerator';
14
+ export { VapixEvents } from './VapixEvents';
15
+ export * from '../types/VapixEvents';
@@ -10,7 +10,7 @@ import { screenSharingSchema } from './screenSharingSchema';
10
10
  import { webCameraSharingSchema } from './webCameraSharingSchema';
11
11
  import { overlaySchema } from './serviceCommonTypes';
12
12
  import { baseballScoreBoardAutomaticSchema, baseballScoreBoardSchema, scoreBoardSchema, scoreOverviewSchema } from './scoreBoardSchema';
13
- export declare const WSResponseSchema: z.ZodObject<{
13
+ export declare const wsResponseSchema: z.ZodObject<{
14
14
  status: z.ZodNumber;
15
15
  message: z.ZodString;
16
16
  }, "strip", z.ZodTypeAny, {
@@ -20,7 +20,7 @@ export declare const WSResponseSchema: z.ZodObject<{
20
20
  status: number;
21
21
  message: string;
22
22
  }>;
23
- export type TWSResponse = z.infer<typeof WSResponseSchema>;
23
+ export type TWSResponse = z.infer<typeof wsResponseSchema>;
24
24
  export declare const servicesSchema: z.ZodDiscriminatedUnion<"name", [z.ZodObject<{
25
25
  id: z.ZodNumber;
26
26
  enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
@@ -26,7 +26,7 @@ export type TErrorResponse = {
26
26
  error: string;
27
27
  call_id?: number;
28
28
  };
29
- export type TService = {
29
+ export type TCoService = {
30
30
  id: number;
31
31
  enabled: number;
32
32
  schedule: string;
@@ -34,8 +34,8 @@ export type TService = {
34
34
  identifier: string;
35
35
  cameraList: number[];
36
36
  };
37
- export type TServiceList = {
38
- services: TService[];
37
+ export type TCoServiceList = {
38
+ services: TCoService[];
39
39
  };
40
40
  export type TAlign = 'A_RIGHT' | 'A_LEFT' | 'A_CENTER';
41
41
  export type TextFit = 'TFM_SCALE' | 'TFM_TRUNCATE' | 'TFM_OVERFLOW';
@@ -46,13 +46,3 @@ export type AsyncMessage = {
46
46
  reject: (reason: Error) => void;
47
47
  sentTimestamp: number;
48
48
  };
49
- export interface CamOverlayDrawingAPI {
50
- on(event: 'open', listener: () => void): this;
51
- on(event: 'close', listener: () => void): this;
52
- on(event: 'error', listener: (err: Error) => void): this;
53
- on(event: 'message', listener: (msg: string) => void): this;
54
- emit(event: 'open'): boolean;
55
- emit(event: 'close'): boolean;
56
- emit(event: 'error', err: Error): boolean;
57
- emit(event: 'message', msg: string): boolean;
58
- }
@@ -1,6 +1,16 @@
1
- import { CamOverlayDrawingAPI } from '../CamOverlayDrawingAPI';
2
- import { COORD } from '../CamOverlayPainter/Painter';
1
+ import { CamOverlayDrawingAPI } from '../node/CamOverlayDrawingAPI';
3
2
  import { TAlign, TCairoCreateResponse, TUploadImageResponse } from './CamOverlayDrawingAPI';
3
+ export declare const COORD: {
4
+ readonly top_left: readonly [-1, -1];
5
+ readonly center_left: readonly [-1, 0];
6
+ readonly bottom_left: readonly [-1, 1];
7
+ readonly top_center: readonly [0, -1];
8
+ readonly center: readonly [0, 0];
9
+ readonly bottom_center: readonly [0, 1];
10
+ readonly top_right: readonly [1, -1];
11
+ readonly center_right: readonly [1, 0];
12
+ readonly bottom_right: readonly [1, 1];
13
+ };
4
14
  export type TRgb = [number, number, number];
5
15
  export type TRgba = [number, number, number, number];
6
16
  export type TTmf = 'TFM_OVERFLOW' | 'TFM_SCALE' | 'TFM_TRUNCATE';
@@ -53,14 +63,6 @@ export type TBorder = {
53
63
  borderWidth: number;
54
64
  borderColor: TRgba;
55
65
  };
56
- export interface Frame {
57
- on(event: 'open', listener: () => void): this;
58
- on(event: 'close', listener: () => void): this;
59
- on(event: 'layoutChanged', listener: () => void): this;
60
- emit(event: 'open'): boolean;
61
- emit(event: 'close'): boolean;
62
- emit(event: 'layoutChanged'): boolean;
63
- }
64
66
  export type TCoAlignment = keyof typeof COORD;
65
67
  export type TPainterOptions = TFrameOptions & {
66
68
  screenWidth: number;
@@ -0,0 +1,45 @@
1
+ export type TDeclaration = {
2
+ type?: '' | 'SOURCE' | 'DATA';
3
+ namespace: string;
4
+ key: string;
5
+ value: string | boolean | number;
6
+ value_type: 'STRING' | 'INT' | 'BOOL' | 'DOUBLE';
7
+ key_nice_name?: string;
8
+ value_nice_name?: string;
9
+ };
10
+ export type TEventDeclaration = {
11
+ declaration_id: string;
12
+ stateless: boolean;
13
+ declaration: TDeclaration[];
14
+ };
15
+ export type TEventUndeclaration = {
16
+ declaration_id: string;
17
+ };
18
+ export type TEventData = {
19
+ namespace: string;
20
+ key: string;
21
+ value: string | boolean | number;
22
+ value_type: 'STRING' | 'INT' | 'BOOL' | 'DOUBLE';
23
+ };
24
+ export type TCamScripterEvent = {
25
+ declaration_id: string;
26
+ event_data: TEventData[];
27
+ };
28
+ export type TCamScripterResponse = {
29
+ call_id: number;
30
+ message: string;
31
+ };
32
+ export type TCamScripterErrorResponse = {
33
+ error: string;
34
+ call_id?: number;
35
+ };
36
+ export type TCamScripterMessage = {
37
+ call_id: number;
38
+ command: string;
39
+ data: unknown;
40
+ };
41
+ export type TAsyncMessage = {
42
+ resolve: (value: TCamScripterResponse) => void;
43
+ reject: (reason?: any) => void;
44
+ sentTimestamp: number;
45
+ };
@@ -100,7 +100,7 @@ export declare const streamSchema: z.ZodObject<{
100
100
  internalVapixParameters: string;
101
101
  userVapixParameters: string;
102
102
  outputParameters: string;
103
- outputType: "video" | "images" | "none";
103
+ outputType: "video" | "none" | "images";
104
104
  mediaServerUrl: string;
105
105
  inputType: "RTSP_URL" | "CSw" | "CRS";
106
106
  inputUrl: string;
@@ -122,7 +122,7 @@ export declare const streamSchema: z.ZodObject<{
122
122
  internalVapixParameters: string;
123
123
  userVapixParameters: string;
124
124
  outputParameters: string;
125
- outputType: "video" | "images" | "none";
125
+ outputType: "video" | "none" | "images";
126
126
  mediaServerUrl: string;
127
127
  inputType: "RTSP_URL" | "CSw" | "CRS";
128
128
  inputUrl: string;