camstreamerlib 4.0.37 → 5.0.0-4d910ae

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 (134) hide show
  1. package/README.md +39 -2
  2. package/cjs/CamOverlayAPI.d.ts +204 -204
  3. package/cjs/CamStreamerAPI.d.ts +311 -311
  4. package/cjs/CamStreamerAPI.js +1 -1
  5. package/cjs/CamSwitcherAPI.d.ts +32 -31
  6. package/cjs/CamSwitcherAPI.js +2 -0
  7. package/cjs/PlaneTrackerAPI.d.ts +25 -28
  8. package/cjs/VapixAPI.d.ts +15 -15
  9. package/cjs/VapixAPI.js +2 -2
  10. package/cjs/bin/CreatePackage.js +17 -7
  11. package/cjs/internal/transformers.d.ts +4 -4
  12. package/cjs/internal/utils.js +3 -3
  13. package/cjs/internal/versionCompare.d.ts +2 -2
  14. package/cjs/node/CamOverlayDrawingAPI.d.ts +0 -3
  15. package/cjs/node/CamOverlayPainter/Frame.d.ts +0 -1
  16. package/cjs/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
  17. package/cjs/node/CamOverlayPainter/ResourceManager.js +17 -7
  18. package/cjs/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
  19. package/cjs/node/DefaultClient.d.ts +0 -2
  20. package/cjs/node/Digest.js +17 -7
  21. package/cjs/node/HttpRequestSender.d.ts +0 -2
  22. package/cjs/node/HttpRequestSender.test.js +17 -7
  23. package/cjs/node/HttpServer.d.ts +0 -2
  24. package/cjs/node/HttpServer.js +17 -7
  25. package/cjs/node/TimeZoneDaemon.js +1 -2
  26. package/cjs/node/VapixEvents.js +1 -1
  27. package/cjs/node/WsClient.js +1 -1
  28. package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +320 -4097
  29. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
  30. package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +12 -67
  31. package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +40 -572
  32. package/cjs/types/CamOverlayAPI/htmlOverlaySchema.d.ts +6 -59
  33. package/cjs/types/CamOverlayAPI/htmlOverlaySchema.js +1 -1
  34. package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +6 -75
  35. package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +11 -74
  36. package/cjs/types/CamOverlayAPI/pipSchema.d.ts +12 -97
  37. package/cjs/types/CamOverlayAPI/pipSchema.js +2 -2
  38. package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +12 -71
  39. package/cjs/types/CamOverlayAPI/ptzCompassSchema.js +1 -1
  40. package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +8 -99
  41. package/cjs/types/CamOverlayAPI/scoreBoardSchema.d.ts +20 -254
  42. package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +5 -43
  43. package/cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts +15 -94
  44. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +5 -43
  45. package/cjs/types/CamScripterAPI.d.ts +11 -81
  46. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +1095 -24193
  47. package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +32 -509
  48. package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +8 -143
  49. package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +32 -493
  50. package/cjs/types/CamStreamerAPI/streamsSchema.d.ts +425 -7786
  51. package/cjs/types/CamStreamerAPI/windySchema.d.ts +36 -476
  52. package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +32 -487
  53. package/cjs/types/CamStreamerAPI/youtubeSchema.js +1 -1
  54. package/cjs/types/CamSwitcherAPI.d.ts +75 -700
  55. package/cjs/types/CamSwitcherAPI.js +1 -0
  56. package/cjs/types/GenetecAgent.d.ts +12 -132
  57. package/cjs/types/MilestoneAgent.d.ts +4 -46
  58. package/cjs/types/PlaneTrackerAPI.d.ts +265 -1205
  59. package/cjs/types/PlaneTrackerAPI.js +5 -5
  60. package/cjs/types/VapixAPI.d.ts +129 -1653
  61. package/cjs/types/VapixAPI.js +1 -1
  62. package/cjs/types/common.d.ts +11 -35
  63. package/cjs/types/common.js +1 -1
  64. package/cjs/types/ws/CamOverlayEvents.d.ts +9 -69
  65. package/cjs/types/ws/CamStreamerEvents.d.ts +22 -217
  66. package/cjs/types/ws/CamStreamerEvents.js +1 -0
  67. package/cjs/types/ws/CamSwitcherEvents.d.ts +46 -452
  68. package/cjs/types/ws/PlaneTrackerEvents.d.ts +361 -3522
  69. package/cjs/types/ws/PlaneTrackerEvents.js +1 -1
  70. package/cjs/web/WsClient.js +1 -1
  71. package/esm/CamStreamerAPI.js +1 -1
  72. package/esm/CamSwitcherAPI.js +2 -0
  73. package/esm/VapixAPI.js +2 -2
  74. package/esm/node/TimeZoneDaemon.js +1 -2
  75. package/esm/node/VapixEvents.js +1 -1
  76. package/esm/node/WsClient.js +1 -1
  77. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
  78. package/esm/types/CamOverlayAPI/htmlOverlaySchema.js +1 -1
  79. package/esm/types/CamOverlayAPI/pipSchema.js +2 -2
  80. package/esm/types/CamOverlayAPI/ptzCompassSchema.js +1 -1
  81. package/esm/types/CamStreamerAPI/youtubeSchema.js +1 -1
  82. package/esm/types/CamSwitcherAPI.js +1 -0
  83. package/esm/types/PlaneTrackerAPI.js +5 -5
  84. package/esm/types/VapixAPI.js +1 -1
  85. package/esm/types/common.js +1 -1
  86. package/esm/types/ws/CamStreamerEvents.js +1 -0
  87. package/esm/types/ws/PlaneTrackerEvents.js +1 -1
  88. package/esm/web/WsClient.js +1 -1
  89. package/package.json +106 -107
  90. package/types/CamOverlayAPI.d.ts +204 -204
  91. package/types/CamStreamerAPI.d.ts +311 -311
  92. package/types/CamSwitcherAPI.d.ts +32 -31
  93. package/types/PlaneTrackerAPI.d.ts +25 -28
  94. package/types/VapixAPI.d.ts +15 -15
  95. package/types/internal/transformers.d.ts +4 -4
  96. package/types/internal/versionCompare.d.ts +2 -2
  97. package/types/node/CamOverlayDrawingAPI.d.ts +0 -3
  98. package/types/node/CamOverlayPainter/Frame.d.ts +0 -1
  99. package/types/node/CamOverlayPainter/ResourceManager.d.ts +2 -2
  100. package/types/node/CamScripterAPICameraEventsGenerator.d.ts +0 -1
  101. package/types/node/DefaultClient.d.ts +0 -2
  102. package/types/node/HttpRequestSender.d.ts +0 -2
  103. package/types/node/HttpServer.d.ts +0 -2
  104. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +320 -4097
  105. package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +12 -67
  106. package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +40 -572
  107. package/types/types/CamOverlayAPI/htmlOverlaySchema.d.ts +6 -59
  108. package/types/types/CamOverlayAPI/imagesSchema.d.ts +6 -75
  109. package/types/types/CamOverlayAPI/infotickerSchema.d.ts +11 -74
  110. package/types/types/CamOverlayAPI/pipSchema.d.ts +12 -97
  111. package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +12 -71
  112. package/types/types/CamOverlayAPI/ptzSchema.d.ts +8 -99
  113. package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +20 -254
  114. package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +5 -43
  115. package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +15 -94
  116. package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +5 -43
  117. package/types/types/CamScripterAPI.d.ts +11 -81
  118. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +1095 -24193
  119. package/types/types/CamStreamerAPI/facebookSchema.d.ts +32 -509
  120. package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +8 -143
  121. package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +32 -493
  122. package/types/types/CamStreamerAPI/streamsSchema.d.ts +425 -7786
  123. package/types/types/CamStreamerAPI/windySchema.d.ts +36 -476
  124. package/types/types/CamStreamerAPI/youtubeSchema.d.ts +32 -487
  125. package/types/types/CamSwitcherAPI.d.ts +75 -700
  126. package/types/types/GenetecAgent.d.ts +12 -132
  127. package/types/types/MilestoneAgent.d.ts +4 -46
  128. package/types/types/PlaneTrackerAPI.d.ts +265 -1205
  129. package/types/types/VapixAPI.d.ts +129 -1653
  130. package/types/types/common.d.ts +11 -35
  131. package/types/types/ws/CamOverlayEvents.d.ts +9 -69
  132. package/types/types/ws/CamStreamerEvents.d.ts +22 -217
  133. package/types/types/ws/CamSwitcherEvents.d.ts +46 -452
  134. package/types/types/ws/PlaneTrackerEvents.d.ts +361 -3522
@@ -198,6 +198,6 @@ exports.portSequenceStateSchema = zod_1.z.object({
198
198
  exports.recordingConfigItemSchema = zod_1.z.object({
199
199
  diskid: zod_1.z.string(),
200
200
  eventid: zod_1.z.string(),
201
- options: zod_1.z.record(zod_1.z.string()),
201
+ options: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
202
202
  profile: zod_1.z.string(),
203
203
  });
@@ -1,25 +1,19 @@
1
1
  import { z } from 'zod';
2
- export declare const booleanSchema: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
3
- export declare const audioChannelSchema: z.ZodUnion<[z.ZodLiteral<"mono">, z.ZodLiteral<"stereo">]>;
2
+ export declare const booleanSchema: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
3
+ export declare const audioChannelSchema: z.ZodUnion<readonly [z.ZodLiteral<"mono">, z.ZodLiteral<"stereo">]>;
4
4
  export type TAudioChannel = z.infer<typeof audioChannelSchema>;
5
- export declare const audioChannelCountSchema: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>;
5
+ export declare const audioChannelCountSchema: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
6
6
  export type TAudioChannelCount = z.infer<typeof audioChannelCountSchema>;
7
- export declare const h264ProfileSchema: z.ZodUnion<[z.ZodLiteral<"high">, z.ZodLiteral<"main">, z.ZodLiteral<"baseline">]>;
7
+ export declare const h264ProfileSchema: z.ZodUnion<readonly [z.ZodLiteral<"high">, z.ZodLiteral<"main">, z.ZodLiteral<"baseline">]>;
8
8
  export type TH264Profile = z.infer<typeof h264ProfileSchema>;
9
9
  export declare const flashStorageTypeSchema: z.ZodLiteral<"FLASH">;
10
10
  export declare const sdCardStorageTypeSchema: z.ZodLiteral<"SD_DISK">;
11
- export declare const storageTypeSchema: z.ZodUnion<[z.ZodLiteral<"SD_DISK">, z.ZodLiteral<"FLASH">]>;
11
+ export declare const storageTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"SD_DISK">, z.ZodLiteral<"FLASH">]>;
12
12
  export type TStorageType = z.infer<typeof storageTypeSchema>;
13
13
  export declare const networkCameraListSchema: z.ZodArray<z.ZodObject<{
14
14
  name: z.ZodString;
15
15
  ip: z.ZodString;
16
- }, "strip", z.ZodTypeAny, {
17
- name: string;
18
- ip: string;
19
- }, {
20
- name: string;
21
- ip: string;
22
- }>, "many">;
16
+ }, z.core.$strip>>;
23
17
  export type TNetworkCameraList = z.infer<typeof networkCameraListSchema>;
24
18
  export type TNetworkCamera = z.infer<typeof networkCameraListSchema>[number];
25
19
  export declare const keyboardShortcutSchema: z.ZodNullable<z.ZodString>;
@@ -30,15 +24,7 @@ export declare const wsAliasResponseSchema: z.ZodObject<{
30
24
  alias: z.ZodString;
31
25
  ws: z.ZodString;
32
26
  ws_initial_message: z.ZodString;
33
- }, "strip", z.ZodTypeAny, {
34
- alias: string;
35
- ws: string;
36
- ws_initial_message: string;
37
- }, {
38
- alias: string;
39
- ws: string;
40
- ws_initial_message: string;
41
- }>;
27
+ }, z.core.$strip>;
42
28
  export type TProxyTarget = {
43
29
  ip: string;
44
30
  mdnsName: string;
@@ -61,24 +47,14 @@ export type TCameraImageConfig = {
61
47
  overlays?: string;
62
48
  [key: string]: string | number | undefined;
63
49
  };
64
- export declare const bitrateModeSchema: z.ZodUnion<[z.ZodLiteral<"VBR">, z.ZodLiteral<"MBR">, z.ZodLiteral<"ABR">]>;
50
+ export declare const bitrateModeSchema: z.ZodUnion<readonly [z.ZodLiteral<"VBR">, z.ZodLiteral<"MBR">, z.ZodLiteral<"ABR">]>;
65
51
  export type TBitrateMode = z.infer<typeof bitrateModeSchema>;
66
52
  export declare const bitrateVapixParamsSchema: z.ZodObject<{
67
- bitrateMode: z.ZodUnion<[z.ZodLiteral<"VBR">, z.ZodLiteral<"MBR">, z.ZodLiteral<"ABR">]>;
53
+ bitrateMode: z.ZodUnion<readonly [z.ZodLiteral<"VBR">, z.ZodLiteral<"MBR">, z.ZodLiteral<"ABR">]>;
68
54
  maximumBitRate: z.ZodNumber;
69
55
  retentionTime: z.ZodNumber;
70
56
  bitRateLimit: z.ZodNumber;
71
- }, "strip", z.ZodTypeAny, {
72
- bitrateMode: "VBR" | "MBR" | "ABR";
73
- maximumBitRate: number;
74
- retentionTime: number;
75
- bitRateLimit: number;
76
- }, {
77
- bitrateMode: "VBR" | "MBR" | "ABR";
78
- maximumBitRate: number;
79
- retentionTime: number;
80
- bitRateLimit: number;
81
- }>;
57
+ }, z.core.$strip>;
82
58
  export type TBitrateVapixParams = z.infer<typeof bitrateVapixParamsSchema>;
83
59
  export type FileLike = typeof File extends {
84
60
  prototype: infer T;
@@ -87,4 +63,4 @@ export type FileLike = typeof File extends {
87
63
  size: number;
88
64
  type: string;
89
65
  };
90
- export declare const fileSchema: z.ZodType<File, z.ZodTypeDef, File>;
66
+ export declare const fileSchema: z.ZodCustom<File, File>;
@@ -14,7 +14,7 @@ exports.networkCameraListSchema = zod_1.z.array(zod_1.z.object({
14
14
  ip: zod_1.z.string(),
15
15
  }));
16
16
  exports.keyboardShortcutSchema = zod_1.z.string().nullable();
17
- exports.keyboardShortcutsSchema = zod_1.z.record(exports.keyboardShortcutSchema);
17
+ exports.keyboardShortcutsSchema = zod_1.z.record(zod_1.z.string(), exports.keyboardShortcutSchema);
18
18
  exports.wsAliasResponseSchema = zod_1.z.object({
19
19
  alias: zod_1.z.string(),
20
20
  ws: zod_1.z.string(),
@@ -1,86 +1,26 @@
1
1
  import { z } from 'zod';
2
- export declare const coEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2
+ export declare const coEventsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
3
  type: z.ZodLiteral<"init">;
4
- data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4
+ data: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
5
  type: z.ZodLiteral<"authorization">;
6
6
  state: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- type: "authorization";
9
- state: string;
10
- }, {
11
- type: "authorization";
12
- state: string;
13
- }>, z.ZodObject<{
7
+ }, z.core.$strip>, z.ZodObject<{
14
8
  type: z.ZodLiteral<"ServiceStart">;
15
9
  serviceId: z.ZodNumber;
16
- }, "strip", z.ZodTypeAny, {
17
- type: "ServiceStart";
18
- serviceId: number;
19
- }, {
20
- type: "ServiceStart";
21
- serviceId: number;
22
- }>, z.ZodObject<{
10
+ }, z.core.$strip>, z.ZodObject<{
23
11
  type: z.ZodLiteral<"ServiceStop">;
24
12
  serviceId: z.ZodNumber;
25
- }, "strip", z.ZodTypeAny, {
26
- type: "ServiceStop";
27
- serviceId: number;
28
- }, {
29
- type: "ServiceStop";
30
- serviceId: number;
31
- }>]>;
32
- }, "strip", z.ZodTypeAny, {
33
- type: "init";
34
- data: {
35
- type: "authorization";
36
- state: string;
37
- } | {
38
- type: "ServiceStart";
39
- serviceId: number;
40
- } | {
41
- type: "ServiceStop";
42
- serviceId: number;
43
- };
44
- }, {
45
- type: "init";
46
- data: {
47
- type: "authorization";
48
- state: string;
49
- } | {
50
- type: "ServiceStart";
51
- serviceId: number;
52
- } | {
53
- type: "ServiceStop";
54
- serviceId: number;
55
- };
56
- }>, z.ZodObject<{
13
+ }, z.core.$strip>], "type">;
14
+ }, z.core.$strip>, z.ZodObject<{
57
15
  type: z.ZodLiteral<"authorization">;
58
16
  state: z.ZodString;
59
- }, "strip", z.ZodTypeAny, {
60
- type: "authorization";
61
- state: string;
62
- }, {
63
- type: "authorization";
64
- state: string;
65
- }>, z.ZodObject<{
17
+ }, z.core.$strip>, z.ZodObject<{
66
18
  type: z.ZodLiteral<"ServiceStart">;
67
19
  serviceId: z.ZodNumber;
68
- }, "strip", z.ZodTypeAny, {
69
- type: "ServiceStart";
70
- serviceId: number;
71
- }, {
72
- type: "ServiceStart";
73
- serviceId: number;
74
- }>, z.ZodObject<{
20
+ }, z.core.$strip>, z.ZodObject<{
75
21
  type: z.ZodLiteral<"ServiceStop">;
76
22
  serviceId: z.ZodNumber;
77
- }, "strip", z.ZodTypeAny, {
78
- type: "ServiceStop";
79
- serviceId: number;
80
- }, {
81
- type: "ServiceStop";
82
- serviceId: number;
83
- }>]>;
23
+ }, z.core.$strip>], "type">;
84
24
  export type TCamOverlayEvent = z.infer<typeof coEventsSchema>;
85
25
  export type TCamOverlayEventType = TCamOverlayEvent['type'];
86
26
  export type TCamOverlayEventOfType<T extends TCamOverlayEventType> = Extract<TCamOverlayEvent, {
@@ -1,279 +1,84 @@
1
1
  import { z } from 'zod';
2
- declare const csEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2
+ declare const csEventsDataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
3
  type: z.ZodLiteral<"authorization">;
4
4
  state: z.ZodString;
5
- }, "strip", z.ZodTypeAny, {
6
- type: "authorization";
7
- state: string;
8
- }, {
9
- type: "authorization";
10
- state: string;
11
- }>, z.ZodObject<{
5
+ }, z.core.$strip>, z.ZodObject<{
12
6
  type: z.ZodLiteral<"StreamState">;
13
7
  streamId: z.ZodString;
14
8
  isStreaming: z.ZodBoolean;
15
9
  active: z.ZodBoolean;
16
10
  enabled: z.ZodBoolean;
17
- }, "strip", z.ZodTypeAny, {
18
- type: "StreamState";
19
- streamId: string;
20
- enabled: boolean;
21
- active: boolean;
22
- isStreaming: boolean;
23
- }, {
24
- type: "StreamState";
25
- streamId: string;
26
- enabled: boolean;
27
- active: boolean;
28
- isStreaming: boolean;
29
- }>, z.ZodObject<{
11
+ }, z.core.$strip>, z.ZodObject<{
30
12
  type: z.ZodLiteral<"CS_API_SUCCESS">;
31
13
  apiCall: z.ZodString;
32
14
  message: z.ZodString;
33
15
  streamId: z.ZodString;
34
- }, "strip", z.ZodTypeAny, {
35
- message: string;
36
- type: "CS_API_SUCCESS";
37
- streamId: string;
38
- apiCall: string;
39
- }, {
40
- message: string;
41
- type: "CS_API_SUCCESS";
42
- streamId: string;
43
- apiCall: string;
44
- }>, z.ZodObject<{
16
+ }, z.core.$strip>, z.ZodObject<{
45
17
  type: z.ZodLiteral<"CS_API_ERROR">;
46
18
  apiCall: z.ZodString;
47
19
  message: z.ZodString;
48
20
  streamId: z.ZodString;
49
21
  code: z.ZodString;
50
- }, "strip", z.ZodTypeAny, {
51
- code: string;
52
- message: string;
53
- type: "CS_API_ERROR";
54
- streamId: string;
55
- apiCall: string;
56
- }, {
57
- code: string;
58
- message: string;
59
- type: "CS_API_ERROR";
60
- streamId: string;
61
- apiCall: string;
62
- }>, z.ZodObject<{
22
+ reason: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>, z.ZodObject<{
63
24
  type: z.ZodLiteral<"PortChanged">;
64
25
  port: z.ZodNumber;
65
26
  value: z.ZodBoolean;
66
- }, "strip", z.ZodTypeAny, {
67
- value: boolean;
68
- type: "PortChanged";
69
- port: number;
70
- }, {
71
- value: boolean;
72
- type: "PortChanged";
73
- port: number;
74
- }>]>;
75
- export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
27
+ }, z.core.$strip>], "type">;
28
+ export declare const csEventsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
76
29
  type: z.ZodLiteral<"init">;
77
- data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
30
+ data: z.ZodDiscriminatedUnion<[z.ZodObject<{
78
31
  type: z.ZodLiteral<"authorization">;
79
32
  state: z.ZodString;
80
- }, "strip", z.ZodTypeAny, {
81
- type: "authorization";
82
- state: string;
83
- }, {
84
- type: "authorization";
85
- state: string;
86
- }>, z.ZodObject<{
33
+ }, z.core.$strip>, z.ZodObject<{
87
34
  type: z.ZodLiteral<"StreamState">;
88
35
  streamId: z.ZodString;
89
36
  isStreaming: z.ZodBoolean;
90
37
  active: z.ZodBoolean;
91
38
  enabled: z.ZodBoolean;
92
- }, "strip", z.ZodTypeAny, {
93
- type: "StreamState";
94
- streamId: string;
95
- enabled: boolean;
96
- active: boolean;
97
- isStreaming: boolean;
98
- }, {
99
- type: "StreamState";
100
- streamId: string;
101
- enabled: boolean;
102
- active: boolean;
103
- isStreaming: boolean;
104
- }>, z.ZodObject<{
39
+ }, z.core.$strip>, z.ZodObject<{
105
40
  type: z.ZodLiteral<"CS_API_SUCCESS">;
106
41
  apiCall: z.ZodString;
107
42
  message: z.ZodString;
108
43
  streamId: z.ZodString;
109
- }, "strip", z.ZodTypeAny, {
110
- message: string;
111
- type: "CS_API_SUCCESS";
112
- streamId: string;
113
- apiCall: string;
114
- }, {
115
- message: string;
116
- type: "CS_API_SUCCESS";
117
- streamId: string;
118
- apiCall: string;
119
- }>, z.ZodObject<{
44
+ }, z.core.$strip>, z.ZodObject<{
120
45
  type: z.ZodLiteral<"CS_API_ERROR">;
121
46
  apiCall: z.ZodString;
122
47
  message: z.ZodString;
123
48
  streamId: z.ZodString;
124
49
  code: z.ZodString;
125
- }, "strip", z.ZodTypeAny, {
126
- code: string;
127
- message: string;
128
- type: "CS_API_ERROR";
129
- streamId: string;
130
- apiCall: string;
131
- }, {
132
- code: string;
133
- message: string;
134
- type: "CS_API_ERROR";
135
- streamId: string;
136
- apiCall: string;
137
- }>, z.ZodObject<{
50
+ reason: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$strip>, z.ZodObject<{
138
52
  type: z.ZodLiteral<"PortChanged">;
139
53
  port: z.ZodNumber;
140
54
  value: z.ZodBoolean;
141
- }, "strip", z.ZodTypeAny, {
142
- value: boolean;
143
- type: "PortChanged";
144
- port: number;
145
- }, {
146
- value: boolean;
147
- type: "PortChanged";
148
- port: number;
149
- }>]>;
150
- }, "strip", z.ZodTypeAny, {
151
- type: "init";
152
- data: {
153
- type: "authorization";
154
- state: string;
155
- } | {
156
- type: "StreamState";
157
- streamId: string;
158
- enabled: boolean;
159
- active: boolean;
160
- isStreaming: boolean;
161
- } | {
162
- message: string;
163
- type: "CS_API_SUCCESS";
164
- streamId: string;
165
- apiCall: string;
166
- } | {
167
- code: string;
168
- message: string;
169
- type: "CS_API_ERROR";
170
- streamId: string;
171
- apiCall: string;
172
- } | {
173
- value: boolean;
174
- type: "PortChanged";
175
- port: number;
176
- };
177
- }, {
178
- type: "init";
179
- data: {
180
- type: "authorization";
181
- state: string;
182
- } | {
183
- type: "StreamState";
184
- streamId: string;
185
- enabled: boolean;
186
- active: boolean;
187
- isStreaming: boolean;
188
- } | {
189
- message: string;
190
- type: "CS_API_SUCCESS";
191
- streamId: string;
192
- apiCall: string;
193
- } | {
194
- code: string;
195
- message: string;
196
- type: "CS_API_ERROR";
197
- streamId: string;
198
- apiCall: string;
199
- } | {
200
- value: boolean;
201
- type: "PortChanged";
202
- port: number;
203
- };
204
- }>, z.ZodObject<{
55
+ }, z.core.$strip>], "type">;
56
+ }, z.core.$strip>, z.ZodObject<{
205
57
  type: z.ZodLiteral<"authorization">;
206
58
  state: z.ZodString;
207
- }, "strip", z.ZodTypeAny, {
208
- type: "authorization";
209
- state: string;
210
- }, {
211
- type: "authorization";
212
- state: string;
213
- }>, z.ZodObject<{
59
+ }, z.core.$strip>, z.ZodObject<{
214
60
  type: z.ZodLiteral<"StreamState">;
215
61
  streamId: z.ZodString;
216
62
  isStreaming: z.ZodBoolean;
217
63
  active: z.ZodBoolean;
218
64
  enabled: z.ZodBoolean;
219
- }, "strip", z.ZodTypeAny, {
220
- type: "StreamState";
221
- streamId: string;
222
- enabled: boolean;
223
- active: boolean;
224
- isStreaming: boolean;
225
- }, {
226
- type: "StreamState";
227
- streamId: string;
228
- enabled: boolean;
229
- active: boolean;
230
- isStreaming: boolean;
231
- }>, z.ZodObject<{
65
+ }, z.core.$strip>, z.ZodObject<{
232
66
  type: z.ZodLiteral<"CS_API_SUCCESS">;
233
67
  apiCall: z.ZodString;
234
68
  message: z.ZodString;
235
69
  streamId: z.ZodString;
236
- }, "strip", z.ZodTypeAny, {
237
- message: string;
238
- type: "CS_API_SUCCESS";
239
- streamId: string;
240
- apiCall: string;
241
- }, {
242
- message: string;
243
- type: "CS_API_SUCCESS";
244
- streamId: string;
245
- apiCall: string;
246
- }>, z.ZodObject<{
70
+ }, z.core.$strip>, z.ZodObject<{
247
71
  type: z.ZodLiteral<"CS_API_ERROR">;
248
72
  apiCall: z.ZodString;
249
73
  message: z.ZodString;
250
74
  streamId: z.ZodString;
251
75
  code: z.ZodString;
252
- }, "strip", z.ZodTypeAny, {
253
- code: string;
254
- message: string;
255
- type: "CS_API_ERROR";
256
- streamId: string;
257
- apiCall: string;
258
- }, {
259
- code: string;
260
- message: string;
261
- type: "CS_API_ERROR";
262
- streamId: string;
263
- apiCall: string;
264
- }>, z.ZodObject<{
76
+ reason: z.ZodOptional<z.ZodString>;
77
+ }, z.core.$strip>, z.ZodObject<{
265
78
  type: z.ZodLiteral<"PortChanged">;
266
79
  port: z.ZodNumber;
267
80
  value: z.ZodBoolean;
268
- }, "strip", z.ZodTypeAny, {
269
- value: boolean;
270
- type: "PortChanged";
271
- port: number;
272
- }, {
273
- value: boolean;
274
- type: "PortChanged";
275
- port: number;
276
- }>]>;
81
+ }, z.core.$strip>], "type">;
277
82
  export type TCamStreamerEvent = z.infer<typeof csEventsDataSchema>;
278
83
  export type TCamStreamerEventType = TCamStreamerEvent['type'];
279
84
  export type TCamStreamerEventOfType<T extends TCamStreamerEventType> = Extract<TCamStreamerEvent, {
@@ -23,6 +23,7 @@ const csEventsDataSchema = zod_1.z.discriminatedUnion('type', [
23
23
  message: zod_1.z.string(),
24
24
  streamId: zod_1.z.string(),
25
25
  code: zod_1.z.string(),
26
+ reason: zod_1.z.string().optional(),
26
27
  }),
27
28
  zod_1.z.object({
28
29
  type: zod_1.z.literal('PortChanged'),