camstreamerlib 4.0.0-beta.101 → 4.0.0-beta.102

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.
@@ -7,6 +7,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
7
7
  private client;
8
8
  constructor(client: Client);
9
9
  static getProxyPath: () => string;
10
+ static getWsEventsPath: () => string;
10
11
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
11
12
  wsAuthorization(options?: THttpRequestOptions): Promise<string>;
12
13
  getUtcTime(options?: THttpRequestOptions): Promise<number>;
@@ -14,6 +14,7 @@ class CamStreamerAPI {
14
14
  this.client = client;
15
15
  }
16
16
  static getProxyPath = () => `${BASE_PATH}/proxy.cgi`;
17
+ static getWsEventsPath = () => `${BASE_PATH}/events`;
17
18
  getClient(proxyParams) {
18
19
  return proxyParams ? new ProxyClient_1.ProxyClient(this.client, proxyParams) : this.client;
19
20
  }
@@ -30,6 +30,7 @@ export declare class WsEvents<T extends {
30
30
  resendInitData(): void;
31
31
  addListener<Type extends TEventType<T>>(type: Type, listener: TListenerFunction<T, Type>, id: string): void;
32
32
  removeListener<Type extends TEventType<T>>(type: Type, id: string): void;
33
+ removeAllListenersForId(id: string): void;
33
34
  private onMessage;
34
35
  private processMessage;
35
36
  destroy(): void;
@@ -37,6 +37,11 @@ class WsEvents {
37
37
  }
38
38
  }
39
39
  }
40
+ removeAllListenersForId(id) {
41
+ for (const type in this.listeners) {
42
+ this.removeListener(type, id);
43
+ }
44
+ }
40
45
  onMessage(incomeData) {
41
46
  if (this.isDestroyed) {
42
47
  return;
@@ -11,56 +11,53 @@ declare const csEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
11
11
  }>, z.ZodObject<{
12
12
  type: z.ZodLiteral<"StreamState">;
13
13
  streamID: z.ZodNumber;
14
- enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
15
- active: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
16
- automationState: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
17
- isStreaming: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
14
+ isStreaming: z.ZodBoolean;
15
+ active: z.ZodBoolean;
16
+ enabled: z.ZodBoolean;
18
17
  }, "strip", z.ZodTypeAny, {
19
18
  type: "StreamState";
20
- enabled: 0 | 1;
21
- active: 0 | 1;
19
+ enabled: boolean;
20
+ active: boolean;
22
21
  streamID: number;
23
- automationState: 0 | 1;
24
- isStreaming: 0 | 1;
22
+ isStreaming: boolean;
25
23
  }, {
26
24
  type: "StreamState";
27
- enabled: 0 | 1;
28
- active: 0 | 1;
25
+ enabled: boolean;
26
+ active: boolean;
29
27
  streamID: number;
30
- automationState: 0 | 1;
31
- isStreaming: 0 | 1;
28
+ isStreaming: boolean;
32
29
  }>, z.ZodObject<{
33
30
  type: z.ZodLiteral<"CS_API_SUCCESS">;
34
31
  apiCall: z.ZodString;
35
32
  message: z.ZodString;
36
- streamID: z.ZodString;
33
+ streamID: z.ZodNumber;
37
34
  }, "strip", z.ZodTypeAny, {
38
35
  message: string;
39
36
  type: "CS_API_SUCCESS";
40
- streamID: string;
37
+ streamID: number;
41
38
  apiCall: string;
42
39
  }, {
43
40
  message: string;
44
41
  type: "CS_API_SUCCESS";
45
- streamID: string;
42
+ streamID: number;
46
43
  apiCall: string;
47
44
  }>, z.ZodObject<{
48
45
  type: z.ZodLiteral<"CS_API_ERROR">;
49
46
  apiCall: z.ZodString;
50
47
  message: z.ZodString;
51
- streamID: z.ZodString;
48
+ streamID: z.ZodNumber;
52
49
  code: z.ZodString;
53
50
  }, "strip", z.ZodTypeAny, {
54
51
  code: string;
55
52
  message: string;
56
53
  type: "CS_API_ERROR";
57
- streamID: string;
54
+ streamID: number;
58
55
  apiCall: string;
59
56
  }, {
60
57
  code: string;
61
58
  message: string;
62
59
  type: "CS_API_ERROR";
63
- streamID: string;
60
+ streamID: number;
64
61
  apiCall: string;
65
62
  }>]>;
66
63
  export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -77,56 +74,53 @@ export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
77
74
  }>, z.ZodObject<{
78
75
  type: z.ZodLiteral<"StreamState">;
79
76
  streamID: z.ZodNumber;
80
- enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
81
- active: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
82
- automationState: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
83
- isStreaming: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
77
+ isStreaming: z.ZodBoolean;
78
+ active: z.ZodBoolean;
79
+ enabled: z.ZodBoolean;
84
80
  }, "strip", z.ZodTypeAny, {
85
81
  type: "StreamState";
86
- enabled: 0 | 1;
87
- active: 0 | 1;
82
+ enabled: boolean;
83
+ active: boolean;
88
84
  streamID: number;
89
- automationState: 0 | 1;
90
- isStreaming: 0 | 1;
85
+ isStreaming: boolean;
91
86
  }, {
92
87
  type: "StreamState";
93
- enabled: 0 | 1;
94
- active: 0 | 1;
88
+ enabled: boolean;
89
+ active: boolean;
95
90
  streamID: number;
96
- automationState: 0 | 1;
97
- isStreaming: 0 | 1;
91
+ isStreaming: boolean;
98
92
  }>, z.ZodObject<{
99
93
  type: z.ZodLiteral<"CS_API_SUCCESS">;
100
94
  apiCall: z.ZodString;
101
95
  message: z.ZodString;
102
- streamID: z.ZodString;
96
+ streamID: z.ZodNumber;
103
97
  }, "strip", z.ZodTypeAny, {
104
98
  message: string;
105
99
  type: "CS_API_SUCCESS";
106
- streamID: string;
100
+ streamID: number;
107
101
  apiCall: string;
108
102
  }, {
109
103
  message: string;
110
104
  type: "CS_API_SUCCESS";
111
- streamID: string;
105
+ streamID: number;
112
106
  apiCall: string;
113
107
  }>, z.ZodObject<{
114
108
  type: z.ZodLiteral<"CS_API_ERROR">;
115
109
  apiCall: z.ZodString;
116
110
  message: z.ZodString;
117
- streamID: z.ZodString;
111
+ streamID: z.ZodNumber;
118
112
  code: z.ZodString;
119
113
  }, "strip", z.ZodTypeAny, {
120
114
  code: string;
121
115
  message: string;
122
116
  type: "CS_API_ERROR";
123
- streamID: string;
117
+ streamID: number;
124
118
  apiCall: string;
125
119
  }, {
126
120
  code: string;
127
121
  message: string;
128
122
  type: "CS_API_ERROR";
129
- streamID: string;
123
+ streamID: number;
130
124
  apiCall: string;
131
125
  }>]>;
132
126
  }, "strip", z.ZodTypeAny, {
@@ -136,21 +130,20 @@ export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
136
130
  state: string;
137
131
  } | {
138
132
  type: "StreamState";
139
- enabled: 0 | 1;
140
- active: 0 | 1;
133
+ enabled: boolean;
134
+ active: boolean;
141
135
  streamID: number;
142
- automationState: 0 | 1;
143
- isStreaming: 0 | 1;
136
+ isStreaming: boolean;
144
137
  } | {
145
138
  message: string;
146
139
  type: "CS_API_SUCCESS";
147
- streamID: string;
140
+ streamID: number;
148
141
  apiCall: string;
149
142
  } | {
150
143
  code: string;
151
144
  message: string;
152
145
  type: "CS_API_ERROR";
153
- streamID: string;
146
+ streamID: number;
154
147
  apiCall: string;
155
148
  };
156
149
  }, {
@@ -160,21 +153,20 @@ export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
160
153
  state: string;
161
154
  } | {
162
155
  type: "StreamState";
163
- enabled: 0 | 1;
164
- active: 0 | 1;
156
+ enabled: boolean;
157
+ active: boolean;
165
158
  streamID: number;
166
- automationState: 0 | 1;
167
- isStreaming: 0 | 1;
159
+ isStreaming: boolean;
168
160
  } | {
169
161
  message: string;
170
162
  type: "CS_API_SUCCESS";
171
- streamID: string;
163
+ streamID: number;
172
164
  apiCall: string;
173
165
  } | {
174
166
  code: string;
175
167
  message: string;
176
168
  type: "CS_API_ERROR";
177
- streamID: string;
169
+ streamID: number;
178
170
  apiCall: string;
179
171
  };
180
172
  }>, z.ZodObject<{
@@ -189,56 +181,53 @@ export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
189
181
  }>, z.ZodObject<{
190
182
  type: z.ZodLiteral<"StreamState">;
191
183
  streamID: z.ZodNumber;
192
- enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
193
- active: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
194
- automationState: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
195
- isStreaming: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
184
+ isStreaming: z.ZodBoolean;
185
+ active: z.ZodBoolean;
186
+ enabled: z.ZodBoolean;
196
187
  }, "strip", z.ZodTypeAny, {
197
188
  type: "StreamState";
198
- enabled: 0 | 1;
199
- active: 0 | 1;
189
+ enabled: boolean;
190
+ active: boolean;
200
191
  streamID: number;
201
- automationState: 0 | 1;
202
- isStreaming: 0 | 1;
192
+ isStreaming: boolean;
203
193
  }, {
204
194
  type: "StreamState";
205
- enabled: 0 | 1;
206
- active: 0 | 1;
195
+ enabled: boolean;
196
+ active: boolean;
207
197
  streamID: number;
208
- automationState: 0 | 1;
209
- isStreaming: 0 | 1;
198
+ isStreaming: boolean;
210
199
  }>, z.ZodObject<{
211
200
  type: z.ZodLiteral<"CS_API_SUCCESS">;
212
201
  apiCall: z.ZodString;
213
202
  message: z.ZodString;
214
- streamID: z.ZodString;
203
+ streamID: z.ZodNumber;
215
204
  }, "strip", z.ZodTypeAny, {
216
205
  message: string;
217
206
  type: "CS_API_SUCCESS";
218
- streamID: string;
207
+ streamID: number;
219
208
  apiCall: string;
220
209
  }, {
221
210
  message: string;
222
211
  type: "CS_API_SUCCESS";
223
- streamID: string;
212
+ streamID: number;
224
213
  apiCall: string;
225
214
  }>, z.ZodObject<{
226
215
  type: z.ZodLiteral<"CS_API_ERROR">;
227
216
  apiCall: z.ZodString;
228
217
  message: z.ZodString;
229
- streamID: z.ZodString;
218
+ streamID: z.ZodNumber;
230
219
  code: z.ZodString;
231
220
  }, "strip", z.ZodTypeAny, {
232
221
  code: string;
233
222
  message: string;
234
223
  type: "CS_API_ERROR";
235
- streamID: string;
224
+ streamID: number;
236
225
  apiCall: string;
237
226
  }, {
238
227
  code: string;
239
228
  message: string;
240
229
  type: "CS_API_ERROR";
241
- streamID: string;
230
+ streamID: number;
242
231
  apiCall: string;
243
232
  }>]>;
244
233
  export type TCamStreamerEvent = z.infer<typeof csEventsDataSchema>;
@@ -7,22 +7,21 @@ const csEventsDataSchema = zod_1.z.discriminatedUnion('type', [
7
7
  zod_1.z.object({
8
8
  type: zod_1.z.literal('StreamState'),
9
9
  streamID: zod_1.z.number(),
10
- enabled: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]),
11
- active: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]),
12
- automationState: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]),
13
- isStreaming: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]),
10
+ isStreaming: zod_1.z.boolean(),
11
+ active: zod_1.z.boolean(),
12
+ enabled: zod_1.z.boolean(),
14
13
  }),
15
14
  zod_1.z.object({
16
15
  type: zod_1.z.literal('CS_API_SUCCESS'),
17
16
  apiCall: zod_1.z.string(),
18
17
  message: zod_1.z.string(),
19
- streamID: zod_1.z.string(),
18
+ streamID: zod_1.z.number(),
20
19
  }),
21
20
  zod_1.z.object({
22
21
  type: zod_1.z.literal('CS_API_ERROR'),
23
22
  apiCall: zod_1.z.string(),
24
23
  message: zod_1.z.string(),
25
- streamID: zod_1.z.string(),
24
+ streamID: zod_1.z.number(),
26
25
  code: zod_1.z.string(),
27
26
  }),
28
27
  ]);
@@ -11,6 +11,7 @@ export class CamStreamerAPI {
11
11
  this.client = client;
12
12
  }
13
13
  static getProxyPath = () => `${BASE_PATH}/proxy.cgi`;
14
+ static getWsEventsPath = () => `${BASE_PATH}/events`;
14
15
  getClient(proxyParams) {
15
16
  return proxyParams ? new ProxyClient(this.client, proxyParams) : this.client;
16
17
  }
@@ -34,6 +34,11 @@ export class WsEvents {
34
34
  }
35
35
  }
36
36
  }
37
+ removeAllListenersForId(id) {
38
+ for (const type in this.listeners) {
39
+ this.removeListener(type, id);
40
+ }
41
+ }
37
42
  onMessage(incomeData) {
38
43
  if (this.isDestroyed) {
39
44
  return;
@@ -4,22 +4,21 @@ const csEventsDataSchema = z.discriminatedUnion('type', [
4
4
  z.object({
5
5
  type: z.literal('StreamState'),
6
6
  streamID: z.number(),
7
- enabled: z.union([z.literal(0), z.literal(1)]),
8
- active: z.union([z.literal(0), z.literal(1)]),
9
- automationState: z.union([z.literal(0), z.literal(1)]),
10
- isStreaming: z.union([z.literal(0), z.literal(1)]),
7
+ isStreaming: z.boolean(),
8
+ active: z.boolean(),
9
+ enabled: z.boolean(),
11
10
  }),
12
11
  z.object({
13
12
  type: z.literal('CS_API_SUCCESS'),
14
13
  apiCall: z.string(),
15
14
  message: z.string(),
16
- streamID: z.string(),
15
+ streamID: z.number(),
17
16
  }),
18
17
  z.object({
19
18
  type: z.literal('CS_API_ERROR'),
20
19
  apiCall: z.string(),
21
20
  message: z.string(),
22
- streamID: z.string(),
21
+ streamID: z.number(),
23
22
  code: z.string(),
24
23
  }),
25
24
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.101",
3
+ "version": "4.0.0-beta.102",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "engine": {
@@ -7,6 +7,7 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
7
7
  private client;
8
8
  constructor(client: Client);
9
9
  static getProxyPath: () => string;
10
+ static getWsEventsPath: () => string;
10
11
  getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
11
12
  wsAuthorization(options?: THttpRequestOptions): Promise<string>;
12
13
  getUtcTime(options?: THttpRequestOptions): Promise<number>;
@@ -30,6 +30,7 @@ export declare class WsEvents<T extends {
30
30
  resendInitData(): void;
31
31
  addListener<Type extends TEventType<T>>(type: Type, listener: TListenerFunction<T, Type>, id: string): void;
32
32
  removeListener<Type extends TEventType<T>>(type: Type, id: string): void;
33
+ removeAllListenersForId(id: string): void;
33
34
  private onMessage;
34
35
  private processMessage;
35
36
  destroy(): void;
@@ -11,56 +11,53 @@ declare const csEventsDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
11
11
  }>, z.ZodObject<{
12
12
  type: z.ZodLiteral<"StreamState">;
13
13
  streamID: z.ZodNumber;
14
- enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
15
- active: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
16
- automationState: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
17
- isStreaming: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
14
+ isStreaming: z.ZodBoolean;
15
+ active: z.ZodBoolean;
16
+ enabled: z.ZodBoolean;
18
17
  }, "strip", z.ZodTypeAny, {
19
18
  type: "StreamState";
20
- enabled: 0 | 1;
21
- active: 0 | 1;
19
+ enabled: boolean;
20
+ active: boolean;
22
21
  streamID: number;
23
- automationState: 0 | 1;
24
- isStreaming: 0 | 1;
22
+ isStreaming: boolean;
25
23
  }, {
26
24
  type: "StreamState";
27
- enabled: 0 | 1;
28
- active: 0 | 1;
25
+ enabled: boolean;
26
+ active: boolean;
29
27
  streamID: number;
30
- automationState: 0 | 1;
31
- isStreaming: 0 | 1;
28
+ isStreaming: boolean;
32
29
  }>, z.ZodObject<{
33
30
  type: z.ZodLiteral<"CS_API_SUCCESS">;
34
31
  apiCall: z.ZodString;
35
32
  message: z.ZodString;
36
- streamID: z.ZodString;
33
+ streamID: z.ZodNumber;
37
34
  }, "strip", z.ZodTypeAny, {
38
35
  message: string;
39
36
  type: "CS_API_SUCCESS";
40
- streamID: string;
37
+ streamID: number;
41
38
  apiCall: string;
42
39
  }, {
43
40
  message: string;
44
41
  type: "CS_API_SUCCESS";
45
- streamID: string;
42
+ streamID: number;
46
43
  apiCall: string;
47
44
  }>, z.ZodObject<{
48
45
  type: z.ZodLiteral<"CS_API_ERROR">;
49
46
  apiCall: z.ZodString;
50
47
  message: z.ZodString;
51
- streamID: z.ZodString;
48
+ streamID: z.ZodNumber;
52
49
  code: z.ZodString;
53
50
  }, "strip", z.ZodTypeAny, {
54
51
  code: string;
55
52
  message: string;
56
53
  type: "CS_API_ERROR";
57
- streamID: string;
54
+ streamID: number;
58
55
  apiCall: string;
59
56
  }, {
60
57
  code: string;
61
58
  message: string;
62
59
  type: "CS_API_ERROR";
63
- streamID: string;
60
+ streamID: number;
64
61
  apiCall: string;
65
62
  }>]>;
66
63
  export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -77,56 +74,53 @@ export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
77
74
  }>, z.ZodObject<{
78
75
  type: z.ZodLiteral<"StreamState">;
79
76
  streamID: z.ZodNumber;
80
- enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
81
- active: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
82
- automationState: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
83
- isStreaming: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
77
+ isStreaming: z.ZodBoolean;
78
+ active: z.ZodBoolean;
79
+ enabled: z.ZodBoolean;
84
80
  }, "strip", z.ZodTypeAny, {
85
81
  type: "StreamState";
86
- enabled: 0 | 1;
87
- active: 0 | 1;
82
+ enabled: boolean;
83
+ active: boolean;
88
84
  streamID: number;
89
- automationState: 0 | 1;
90
- isStreaming: 0 | 1;
85
+ isStreaming: boolean;
91
86
  }, {
92
87
  type: "StreamState";
93
- enabled: 0 | 1;
94
- active: 0 | 1;
88
+ enabled: boolean;
89
+ active: boolean;
95
90
  streamID: number;
96
- automationState: 0 | 1;
97
- isStreaming: 0 | 1;
91
+ isStreaming: boolean;
98
92
  }>, z.ZodObject<{
99
93
  type: z.ZodLiteral<"CS_API_SUCCESS">;
100
94
  apiCall: z.ZodString;
101
95
  message: z.ZodString;
102
- streamID: z.ZodString;
96
+ streamID: z.ZodNumber;
103
97
  }, "strip", z.ZodTypeAny, {
104
98
  message: string;
105
99
  type: "CS_API_SUCCESS";
106
- streamID: string;
100
+ streamID: number;
107
101
  apiCall: string;
108
102
  }, {
109
103
  message: string;
110
104
  type: "CS_API_SUCCESS";
111
- streamID: string;
105
+ streamID: number;
112
106
  apiCall: string;
113
107
  }>, z.ZodObject<{
114
108
  type: z.ZodLiteral<"CS_API_ERROR">;
115
109
  apiCall: z.ZodString;
116
110
  message: z.ZodString;
117
- streamID: z.ZodString;
111
+ streamID: z.ZodNumber;
118
112
  code: z.ZodString;
119
113
  }, "strip", z.ZodTypeAny, {
120
114
  code: string;
121
115
  message: string;
122
116
  type: "CS_API_ERROR";
123
- streamID: string;
117
+ streamID: number;
124
118
  apiCall: string;
125
119
  }, {
126
120
  code: string;
127
121
  message: string;
128
122
  type: "CS_API_ERROR";
129
- streamID: string;
123
+ streamID: number;
130
124
  apiCall: string;
131
125
  }>]>;
132
126
  }, "strip", z.ZodTypeAny, {
@@ -136,21 +130,20 @@ export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
136
130
  state: string;
137
131
  } | {
138
132
  type: "StreamState";
139
- enabled: 0 | 1;
140
- active: 0 | 1;
133
+ enabled: boolean;
134
+ active: boolean;
141
135
  streamID: number;
142
- automationState: 0 | 1;
143
- isStreaming: 0 | 1;
136
+ isStreaming: boolean;
144
137
  } | {
145
138
  message: string;
146
139
  type: "CS_API_SUCCESS";
147
- streamID: string;
140
+ streamID: number;
148
141
  apiCall: string;
149
142
  } | {
150
143
  code: string;
151
144
  message: string;
152
145
  type: "CS_API_ERROR";
153
- streamID: string;
146
+ streamID: number;
154
147
  apiCall: string;
155
148
  };
156
149
  }, {
@@ -160,21 +153,20 @@ export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
160
153
  state: string;
161
154
  } | {
162
155
  type: "StreamState";
163
- enabled: 0 | 1;
164
- active: 0 | 1;
156
+ enabled: boolean;
157
+ active: boolean;
165
158
  streamID: number;
166
- automationState: 0 | 1;
167
- isStreaming: 0 | 1;
159
+ isStreaming: boolean;
168
160
  } | {
169
161
  message: string;
170
162
  type: "CS_API_SUCCESS";
171
- streamID: string;
163
+ streamID: number;
172
164
  apiCall: string;
173
165
  } | {
174
166
  code: string;
175
167
  message: string;
176
168
  type: "CS_API_ERROR";
177
- streamID: string;
169
+ streamID: number;
178
170
  apiCall: string;
179
171
  };
180
172
  }>, z.ZodObject<{
@@ -189,56 +181,53 @@ export declare const csEventsSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
189
181
  }>, z.ZodObject<{
190
182
  type: z.ZodLiteral<"StreamState">;
191
183
  streamID: z.ZodNumber;
192
- enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
193
- active: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
194
- automationState: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
195
- isStreaming: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
184
+ isStreaming: z.ZodBoolean;
185
+ active: z.ZodBoolean;
186
+ enabled: z.ZodBoolean;
196
187
  }, "strip", z.ZodTypeAny, {
197
188
  type: "StreamState";
198
- enabled: 0 | 1;
199
- active: 0 | 1;
189
+ enabled: boolean;
190
+ active: boolean;
200
191
  streamID: number;
201
- automationState: 0 | 1;
202
- isStreaming: 0 | 1;
192
+ isStreaming: boolean;
203
193
  }, {
204
194
  type: "StreamState";
205
- enabled: 0 | 1;
206
- active: 0 | 1;
195
+ enabled: boolean;
196
+ active: boolean;
207
197
  streamID: number;
208
- automationState: 0 | 1;
209
- isStreaming: 0 | 1;
198
+ isStreaming: boolean;
210
199
  }>, z.ZodObject<{
211
200
  type: z.ZodLiteral<"CS_API_SUCCESS">;
212
201
  apiCall: z.ZodString;
213
202
  message: z.ZodString;
214
- streamID: z.ZodString;
203
+ streamID: z.ZodNumber;
215
204
  }, "strip", z.ZodTypeAny, {
216
205
  message: string;
217
206
  type: "CS_API_SUCCESS";
218
- streamID: string;
207
+ streamID: number;
219
208
  apiCall: string;
220
209
  }, {
221
210
  message: string;
222
211
  type: "CS_API_SUCCESS";
223
- streamID: string;
212
+ streamID: number;
224
213
  apiCall: string;
225
214
  }>, z.ZodObject<{
226
215
  type: z.ZodLiteral<"CS_API_ERROR">;
227
216
  apiCall: z.ZodString;
228
217
  message: z.ZodString;
229
- streamID: z.ZodString;
218
+ streamID: z.ZodNumber;
230
219
  code: z.ZodString;
231
220
  }, "strip", z.ZodTypeAny, {
232
221
  code: string;
233
222
  message: string;
234
223
  type: "CS_API_ERROR";
235
- streamID: string;
224
+ streamID: number;
236
225
  apiCall: string;
237
226
  }, {
238
227
  code: string;
239
228
  message: string;
240
229
  type: "CS_API_ERROR";
241
- streamID: string;
230
+ streamID: number;
242
231
  apiCall: string;
243
232
  }>]>;
244
233
  export type TCamStreamerEvent = z.infer<typeof csEventsDataSchema>;