camstreamerlib 4.0.0-beta.37 → 4.0.0-beta.39

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 (79) hide show
  1. package/README.md +38 -27
  2. package/cjs/CamOverlayAPI.js +42 -75
  3. package/cjs/CamScripterAPI.js +30 -24
  4. package/cjs/CamStreamerAPI.js +30 -33
  5. package/cjs/CamSwitcherAPI.js +57 -52
  6. package/cjs/PlaneTrackerAPI.js +55 -66
  7. package/cjs/VapixAPI.js +23 -22
  8. package/cjs/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
  9. package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +4 -14
  10. package/cjs/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
  11. package/cjs/{VapixEvents.js → node/VapixEvents.js} +1 -1
  12. package/cjs/node/events/GenetecAgent.js +5 -27
  13. package/cjs/node/index.js +17 -0
  14. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
  15. package/cjs/types/CamOverlayAPI/scoreBoardSchema.js +6 -1
  16. package/cjs/types/CamOverlayPainter.js +12 -0
  17. package/cjs/types/CamScripterAPICameraEventsGenerator.js +2 -0
  18. package/cjs/types/CamSwitcherAPI.js +38 -1
  19. package/cjs/types/GenetecAgent.js +31 -0
  20. package/cjs/types/PlaneTrackerAPI.js +277 -0
  21. package/cjs/types/VapixAPI.js +20 -2
  22. package/cjs/types/VapixEvents.js +2 -0
  23. package/esm/CamOverlayAPI.js +43 -76
  24. package/esm/CamScripterAPI.js +30 -24
  25. package/esm/CamStreamerAPI.js +30 -30
  26. package/esm/CamSwitcherAPI.js +58 -53
  27. package/esm/PlaneTrackerAPI.js +56 -67
  28. package/esm/VapixAPI.js +24 -23
  29. package/esm/{CamOverlayDrawingAPI.js → node/CamOverlayDrawingAPI.js} +1 -1
  30. package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Painter.js +1 -11
  31. package/esm/{CamScripterAPICameraEventsGenerator.js → node/CamScripterAPICameraEventsGenerator.js} +1 -1
  32. package/esm/{VapixEvents.js → node/VapixEvents.js} +1 -1
  33. package/esm/node/events/GenetecAgent.js +1 -23
  34. package/esm/node/index.js +10 -0
  35. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +1 -1
  36. package/esm/types/CamOverlayAPI/scoreBoardSchema.js +6 -1
  37. package/esm/types/CamOverlayPainter.js +11 -1
  38. package/esm/types/CamSwitcherAPI.js +38 -1
  39. package/esm/types/GenetecAgent.js +28 -0
  40. package/esm/types/PlaneTrackerAPI.js +276 -1
  41. package/esm/types/VapixAPI.js +19 -1
  42. package/esm/types/VapixEvents.js +1 -0
  43. package/package.json +1 -1
  44. package/types/CamOverlayAPI.d.ts +24 -14
  45. package/types/CamScripterAPI.d.ts +34 -9
  46. package/types/CamStreamerAPI.d.ts +27 -5
  47. package/types/CamSwitcherAPI.d.ts +136 -23
  48. package/types/PlaneTrackerAPI.d.ts +201 -20
  49. package/types/VapixAPI.d.ts +46 -12
  50. package/types/bin/CreatePackage.d.ts +1 -0
  51. package/types/{CamOverlayDrawingAPI.d.ts → node/CamOverlayDrawingAPI.d.ts} +1 -1
  52. package/types/{CamOverlayPainter → node/CamOverlayPainter}/Frame.d.ts +2 -2
  53. package/types/{CamOverlayPainter → node/CamOverlayPainter}/Painter.d.ts +2 -13
  54. package/types/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.d.ts +1 -1
  55. package/types/node/CamScripterAPICameraEventsGenerator.d.ts +31 -0
  56. package/types/node/VapixEvents.d.ts +16 -0
  57. package/types/node/events/GenetecAgent.d.ts +1 -144
  58. package/types/node/index.d.ts +10 -0
  59. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +38 -38
  60. package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +13 -13
  61. package/types/types/CamOverlayDrawingAPI.d.ts +3 -13
  62. package/types/types/CamOverlayPainter.d.ts +12 -10
  63. package/types/types/CamScripterAPICameraEventsGenerator.d.ts +45 -0
  64. package/types/types/CamStreamerAPI.d.ts +2 -2
  65. package/types/types/CamSwitcherAPI.d.ts +111 -30
  66. package/types/types/GenetecAgent.d.ts +174 -0
  67. package/types/types/PlaneTrackerAPI.d.ts +859 -0
  68. package/types/types/VapixAPI.d.ts +54 -8
  69. package/types/types/VapixEvents.d.ts +15 -0
  70. package/types/types/common.d.ts +1 -0
  71. package/types/CamScripterAPICameraEventsGenerator.d.ts +0 -74
  72. package/types/VapixEvents.d.ts +0 -43
  73. /package/cjs/{CreatePackage.js → bin/CreatePackage.js} +0 -0
  74. /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
  75. /package/cjs/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
  76. /package/esm/{CreatePackage.js → bin/CreatePackage.js} +0 -0
  77. /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/Frame.js +0 -0
  78. /package/esm/{CamOverlayPainter → node/CamOverlayPainter}/ResourceManager.js +0 -0
  79. /package/{types/CreatePackage.d.ts → esm/types/CamScripterAPICameraEventsGenerator.js} +0 -0
@@ -33,11 +33,48 @@ export declare const applicationSchema: z.ZodObject<{
33
33
  VendorHomePage?: string | undefined;
34
34
  LicenseName?: string | undefined;
35
35
  }>;
36
+ export declare const applicationListSchema: z.ZodArray<z.ZodObject<{
37
+ Name: z.ZodString;
38
+ NiceName: z.ZodString;
39
+ Vendor: z.ZodString;
40
+ Version: z.ZodString;
41
+ ApplicationID: z.ZodOptional<z.ZodString>;
42
+ License: z.ZodString;
43
+ Status: z.ZodString;
44
+ ConfigurationPage: z.ZodOptional<z.ZodString>;
45
+ VendorHomePage: z.ZodOptional<z.ZodString>;
46
+ LicenseName: z.ZodOptional<z.ZodString>;
47
+ } & {
48
+ appId: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"CamStreamer">, z.ZodLiteral<"CamSwitcher">, z.ZodLiteral<"CamOverlay">, z.ZodLiteral<"CamScripter">, z.ZodLiteral<"PlaneTracker">, z.ZodLiteral<"Ndihxplugin">, z.ZodLiteral<"SportTracker">]>>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ Name: string;
51
+ NiceName: string;
52
+ Vendor: string;
53
+ Version: string;
54
+ License: string;
55
+ Status: string;
56
+ appId: "CamStreamer" | "CamSwitcher" | "CamOverlay" | "CamScripter" | "PlaneTracker" | "Ndihxplugin" | "SportTracker" | null;
57
+ ApplicationID?: string | undefined;
58
+ ConfigurationPage?: string | undefined;
59
+ VendorHomePage?: string | undefined;
60
+ LicenseName?: string | undefined;
61
+ }, {
62
+ Name: string;
63
+ NiceName: string;
64
+ Vendor: string;
65
+ Version: string;
66
+ License: string;
67
+ Status: string;
68
+ appId: "CamStreamer" | "CamSwitcher" | "CamOverlay" | "CamScripter" | "PlaneTracker" | "Ndihxplugin" | "SportTracker" | null;
69
+ ApplicationID?: string | undefined;
70
+ ConfigurationPage?: string | undefined;
71
+ VendorHomePage?: string | undefined;
72
+ LicenseName?: string | undefined;
73
+ }>, "many">;
36
74
  export declare const APP_IDS: readonly ["CamStreamer", "CamSwitcher", "CamOverlay", "CamScripter", "PlaneTracker", "Ndihxplugin", "SportTracker"];
37
75
  export type TApplicationId = (typeof APP_IDS)[number];
38
- export type TApplication = z.infer<typeof applicationSchema> & {
39
- appId: null | TApplicationId;
40
- };
76
+ export type TApplicationList = z.infer<typeof applicationListSchema>;
77
+ export type TApplication = z.infer<typeof applicationListSchema>[number];
41
78
  export declare const guardTourSchema: z.ZodObject<{
42
79
  id: z.ZodString;
43
80
  camNbr: z.ZodUnknown;
@@ -112,12 +149,21 @@ declare const audioSampleRatesOutSchema: z.ZodEffects<z.ZodObject<{
112
149
  }>;
113
150
  export type TAudioSampleRates = z.infer<typeof audioSampleRatesOutSchema>;
114
151
  export declare const sdCardWatchedStatuses: readonly ["OK", "connected", "disconnected"];
115
- export type TSDCardInfo = {
116
- status: (typeof sdCardWatchedStatuses)[number];
152
+ export declare const sdCardInfoSchema: z.ZodObject<{
153
+ status: z.ZodEnum<["OK", "connected", "disconnected"]>;
154
+ totalSize: z.ZodNumber;
155
+ freeSize: z.ZodNumber;
156
+ }, "strip", z.ZodTypeAny, {
157
+ status: "OK" | "connected" | "disconnected";
117
158
  totalSize: number;
118
159
  freeSize: number;
119
- };
120
- export declare const PtzOverviewSchema: z.ZodRecord<z.ZodNumber, z.ZodArray<z.ZodObject<{
160
+ }, {
161
+ status: "OK" | "connected" | "disconnected";
162
+ totalSize: number;
163
+ freeSize: number;
164
+ }>;
165
+ export type TSDCardInfo = z.infer<typeof sdCardInfoSchema>;
166
+ export declare const ptzOverviewSchema: z.ZodRecord<z.ZodNumber, z.ZodArray<z.ZodObject<{
121
167
  id: z.ZodNumber;
122
168
  name: z.ZodString;
123
169
  }, "strip", z.ZodTypeAny, {
@@ -127,7 +173,7 @@ export declare const PtzOverviewSchema: z.ZodRecord<z.ZodNumber, z.ZodArray<z.Zo
127
173
  name: string;
128
174
  id: number;
129
175
  }>, "many">>;
130
- export type TPtzOverview = z.infer<typeof PtzOverviewSchema>;
176
+ export type TPtzOverview = z.infer<typeof ptzOverviewSchema>;
131
177
  export declare const cameraPTZItemDataSchema: z.ZodObject<{
132
178
  pan: z.ZodOptional<z.ZodNumber>;
133
179
  tilt: z.ZodOptional<z.ZodNumber>;
@@ -0,0 +1,15 @@
1
+ export type TVapixEventMessage = {
2
+ apiVersion: string;
3
+ method: string;
4
+ params: {
5
+ notification: {
6
+ timestamp: number;
7
+ topic: string;
8
+ message: {
9
+ source: Record<string, string>;
10
+ data: Record<string, string>;
11
+ key: Record<string, string>;
12
+ };
13
+ };
14
+ };
15
+ };
@@ -17,6 +17,7 @@ export declare const networkCameraListSchema: z.ZodArray<z.ZodObject<{
17
17
  name: string;
18
18
  ip: string;
19
19
  }>, "many">;
20
+ export type TNetworkCameraList = z.infer<typeof networkCameraListSchema>;
20
21
  export type TNetworkCamera = z.infer<typeof networkCameraListSchema>[number];
21
22
  export declare const keyboardShortcutSchema: z.ZodNullable<z.ZodString>;
22
23
  export declare const keyboardShortcutsSchema: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
@@ -1,74 +0,0 @@
1
- /// <reference types="node" />
2
- import EventEmitter from 'events';
3
- import { WsOptions } from './internal/types';
4
- export type CamScripterOptions = WsOptions;
5
- export type TDeclaration = {
6
- type?: '' | 'SOURCE' | 'DATA';
7
- namespace: string;
8
- key: string;
9
- value: string | boolean | number;
10
- value_type: 'STRING' | 'INT' | 'BOOL' | 'DOUBLE';
11
- key_nice_name?: string;
12
- value_nice_name?: string;
13
- };
14
- export type TEventDeclaration = {
15
- declaration_id: string;
16
- stateless: boolean;
17
- declaration: TDeclaration[];
18
- };
19
- export type TEventUndeclaration = {
20
- declaration_id: string;
21
- };
22
- export type TEventData = {
23
- namespace: string;
24
- key: string;
25
- value: string | boolean | number;
26
- value_type: 'STRING' | 'INT' | 'BOOL' | 'DOUBLE';
27
- };
28
- export type TEvent = {
29
- declaration_id: string;
30
- event_data: TEventData[];
31
- };
32
- export type TResponse = {
33
- call_id: number;
34
- message: string;
35
- };
36
- export type TErrorResponse = {
37
- error: string;
38
- call_id?: number;
39
- };
40
- export interface CamScripterAPICameraEventsGenerator {
41
- on(event: 'open', listener: () => void): this;
42
- on(event: 'close', listener: () => void): this;
43
- on(event: 'error', listener: (err: Error) => void): this;
44
- emit(event: 'open'): boolean;
45
- emit(event: 'close'): boolean;
46
- emit(event: 'error', err: Error): boolean;
47
- }
48
- export declare class CamScripterAPICameraEventsGenerator extends EventEmitter {
49
- private tls;
50
- private tlsInsecure;
51
- private ip;
52
- private port;
53
- private user;
54
- private pass;
55
- private callId;
56
- private sendMessages;
57
- private timeoutCheckTimer;
58
- private wsConnected;
59
- private ws;
60
- constructor(options?: CamScripterOptions);
61
- connect(): void;
62
- disconnect(): void;
63
- declareEvent(eventDeclaration: TEventDeclaration): Promise<TResponse>;
64
- undeclareEvent(eventUndeclaration: TEventUndeclaration): Promise<TResponse>;
65
- sendEvent(event: TEvent): Promise<TResponse>;
66
- private createWsClient;
67
- private incomingWsMessageHandler;
68
- private sendMessage;
69
- private startMsgsTimeoutCheck;
70
- private stopMsgsTimeoutCheck;
71
- private reconnectWithError;
72
- private reportErr;
73
- private reportClose;
74
- }
@@ -1,43 +0,0 @@
1
- import { EventEmitter2 as EventEmitter } from 'eventemitter2';
2
- import { WsOptions } from './internal/types';
3
- export type VapixEventsOptions = WsOptions;
4
- type TEventMessage = {
5
- apiVersion: string;
6
- method: string;
7
- params: {
8
- notification: {
9
- timestamp: number;
10
- topic: string;
11
- message: {
12
- source: Record<string, string>;
13
- data: Record<string, string>;
14
- key: Record<string, string>;
15
- };
16
- };
17
- };
18
- };
19
- export interface VapixEvents {
20
- on(event: 'open', listener: () => void): this;
21
- on(event: 'close', listener: () => void): this;
22
- on(event: 'error', listener: (err: Error) => void): this;
23
- on(event: string, listener: (data: TEventMessage) => void): this;
24
- emit(event: 'open'): boolean;
25
- emit(event: 'close'): boolean;
26
- emit(event: 'error', err: Error): boolean;
27
- emit(event: string, msg: TEventMessage): boolean;
28
- }
29
- export declare class VapixEvents extends EventEmitter {
30
- private tls;
31
- private tlsInsecure;
32
- private ip;
33
- private port;
34
- private user;
35
- private pass;
36
- private ws;
37
- constructor(options?: VapixEventsOptions);
38
- connect(): void;
39
- disconnect(): void;
40
- private createWsClient;
41
- private isReservedEventName;
42
- }
43
- export {};
File without changes
File without changes