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.
- package/cjs/CamStreamerAPI.d.ts +1 -0
- package/cjs/CamStreamerAPI.js +1 -0
- package/cjs/internal/WsEvents.d.ts +1 -0
- package/cjs/internal/WsEvents.js +5 -0
- package/cjs/types/ws/CamStreamerEvents.d.ts +55 -66
- package/cjs/types/ws/CamStreamerEvents.js +5 -6
- package/esm/CamStreamerAPI.js +1 -0
- package/esm/internal/WsEvents.js +5 -0
- package/esm/types/ws/CamStreamerEvents.js +5 -6
- package/package.json +1 -1
- package/types/CamStreamerAPI.d.ts +1 -0
- package/types/internal/WsEvents.d.ts +1 -0
- package/types/types/ws/CamStreamerEvents.d.ts +55 -66
package/cjs/CamStreamerAPI.d.ts
CHANGED
|
@@ -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>;
|
package/cjs/CamStreamerAPI.js
CHANGED
|
@@ -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;
|
package/cjs/internal/WsEvents.js
CHANGED
|
@@ -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
|
-
|
|
15
|
-
active: z.
|
|
16
|
-
|
|
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:
|
|
21
|
-
active:
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
active: boolean;
|
|
22
21
|
streamID: number;
|
|
23
|
-
|
|
24
|
-
isStreaming: 0 | 1;
|
|
22
|
+
isStreaming: boolean;
|
|
25
23
|
}, {
|
|
26
24
|
type: "StreamState";
|
|
27
|
-
enabled:
|
|
28
|
-
active:
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
active: boolean;
|
|
29
27
|
streamID: number;
|
|
30
|
-
|
|
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.
|
|
33
|
+
streamID: z.ZodNumber;
|
|
37
34
|
}, "strip", z.ZodTypeAny, {
|
|
38
35
|
message: string;
|
|
39
36
|
type: "CS_API_SUCCESS";
|
|
40
|
-
streamID:
|
|
37
|
+
streamID: number;
|
|
41
38
|
apiCall: string;
|
|
42
39
|
}, {
|
|
43
40
|
message: string;
|
|
44
41
|
type: "CS_API_SUCCESS";
|
|
45
|
-
streamID:
|
|
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.
|
|
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:
|
|
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:
|
|
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
|
-
|
|
81
|
-
active: z.
|
|
82
|
-
|
|
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:
|
|
87
|
-
active:
|
|
82
|
+
enabled: boolean;
|
|
83
|
+
active: boolean;
|
|
88
84
|
streamID: number;
|
|
89
|
-
|
|
90
|
-
isStreaming: 0 | 1;
|
|
85
|
+
isStreaming: boolean;
|
|
91
86
|
}, {
|
|
92
87
|
type: "StreamState";
|
|
93
|
-
enabled:
|
|
94
|
-
active:
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
active: boolean;
|
|
95
90
|
streamID: number;
|
|
96
|
-
|
|
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.
|
|
96
|
+
streamID: z.ZodNumber;
|
|
103
97
|
}, "strip", z.ZodTypeAny, {
|
|
104
98
|
message: string;
|
|
105
99
|
type: "CS_API_SUCCESS";
|
|
106
|
-
streamID:
|
|
100
|
+
streamID: number;
|
|
107
101
|
apiCall: string;
|
|
108
102
|
}, {
|
|
109
103
|
message: string;
|
|
110
104
|
type: "CS_API_SUCCESS";
|
|
111
|
-
streamID:
|
|
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.
|
|
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:
|
|
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:
|
|
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:
|
|
140
|
-
active:
|
|
133
|
+
enabled: boolean;
|
|
134
|
+
active: boolean;
|
|
141
135
|
streamID: number;
|
|
142
|
-
|
|
143
|
-
isStreaming: 0 | 1;
|
|
136
|
+
isStreaming: boolean;
|
|
144
137
|
} | {
|
|
145
138
|
message: string;
|
|
146
139
|
type: "CS_API_SUCCESS";
|
|
147
|
-
streamID:
|
|
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:
|
|
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:
|
|
164
|
-
active:
|
|
156
|
+
enabled: boolean;
|
|
157
|
+
active: boolean;
|
|
165
158
|
streamID: number;
|
|
166
|
-
|
|
167
|
-
isStreaming: 0 | 1;
|
|
159
|
+
isStreaming: boolean;
|
|
168
160
|
} | {
|
|
169
161
|
message: string;
|
|
170
162
|
type: "CS_API_SUCCESS";
|
|
171
|
-
streamID:
|
|
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:
|
|
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
|
-
|
|
193
|
-
active: z.
|
|
194
|
-
|
|
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:
|
|
199
|
-
active:
|
|
189
|
+
enabled: boolean;
|
|
190
|
+
active: boolean;
|
|
200
191
|
streamID: number;
|
|
201
|
-
|
|
202
|
-
isStreaming: 0 | 1;
|
|
192
|
+
isStreaming: boolean;
|
|
203
193
|
}, {
|
|
204
194
|
type: "StreamState";
|
|
205
|
-
enabled:
|
|
206
|
-
active:
|
|
195
|
+
enabled: boolean;
|
|
196
|
+
active: boolean;
|
|
207
197
|
streamID: number;
|
|
208
|
-
|
|
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.
|
|
203
|
+
streamID: z.ZodNumber;
|
|
215
204
|
}, "strip", z.ZodTypeAny, {
|
|
216
205
|
message: string;
|
|
217
206
|
type: "CS_API_SUCCESS";
|
|
218
|
-
streamID:
|
|
207
|
+
streamID: number;
|
|
219
208
|
apiCall: string;
|
|
220
209
|
}, {
|
|
221
210
|
message: string;
|
|
222
211
|
type: "CS_API_SUCCESS";
|
|
223
|
-
streamID:
|
|
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.
|
|
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:
|
|
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:
|
|
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
|
-
|
|
11
|
-
active: zod_1.z.
|
|
12
|
-
|
|
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.
|
|
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.
|
|
24
|
+
streamID: zod_1.z.number(),
|
|
26
25
|
code: zod_1.z.string(),
|
|
27
26
|
}),
|
|
28
27
|
]);
|
package/esm/CamStreamerAPI.js
CHANGED
|
@@ -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
|
}
|
package/esm/internal/WsEvents.js
CHANGED
|
@@ -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
|
-
|
|
8
|
-
active: z.
|
|
9
|
-
|
|
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.
|
|
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.
|
|
21
|
+
streamID: z.number(),
|
|
23
22
|
code: z.string(),
|
|
24
23
|
}),
|
|
25
24
|
]);
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
15
|
-
active: z.
|
|
16
|
-
|
|
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:
|
|
21
|
-
active:
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
active: boolean;
|
|
22
21
|
streamID: number;
|
|
23
|
-
|
|
24
|
-
isStreaming: 0 | 1;
|
|
22
|
+
isStreaming: boolean;
|
|
25
23
|
}, {
|
|
26
24
|
type: "StreamState";
|
|
27
|
-
enabled:
|
|
28
|
-
active:
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
active: boolean;
|
|
29
27
|
streamID: number;
|
|
30
|
-
|
|
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.
|
|
33
|
+
streamID: z.ZodNumber;
|
|
37
34
|
}, "strip", z.ZodTypeAny, {
|
|
38
35
|
message: string;
|
|
39
36
|
type: "CS_API_SUCCESS";
|
|
40
|
-
streamID:
|
|
37
|
+
streamID: number;
|
|
41
38
|
apiCall: string;
|
|
42
39
|
}, {
|
|
43
40
|
message: string;
|
|
44
41
|
type: "CS_API_SUCCESS";
|
|
45
|
-
streamID:
|
|
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.
|
|
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:
|
|
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:
|
|
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
|
-
|
|
81
|
-
active: z.
|
|
82
|
-
|
|
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:
|
|
87
|
-
active:
|
|
82
|
+
enabled: boolean;
|
|
83
|
+
active: boolean;
|
|
88
84
|
streamID: number;
|
|
89
|
-
|
|
90
|
-
isStreaming: 0 | 1;
|
|
85
|
+
isStreaming: boolean;
|
|
91
86
|
}, {
|
|
92
87
|
type: "StreamState";
|
|
93
|
-
enabled:
|
|
94
|
-
active:
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
active: boolean;
|
|
95
90
|
streamID: number;
|
|
96
|
-
|
|
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.
|
|
96
|
+
streamID: z.ZodNumber;
|
|
103
97
|
}, "strip", z.ZodTypeAny, {
|
|
104
98
|
message: string;
|
|
105
99
|
type: "CS_API_SUCCESS";
|
|
106
|
-
streamID:
|
|
100
|
+
streamID: number;
|
|
107
101
|
apiCall: string;
|
|
108
102
|
}, {
|
|
109
103
|
message: string;
|
|
110
104
|
type: "CS_API_SUCCESS";
|
|
111
|
-
streamID:
|
|
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.
|
|
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:
|
|
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:
|
|
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:
|
|
140
|
-
active:
|
|
133
|
+
enabled: boolean;
|
|
134
|
+
active: boolean;
|
|
141
135
|
streamID: number;
|
|
142
|
-
|
|
143
|
-
isStreaming: 0 | 1;
|
|
136
|
+
isStreaming: boolean;
|
|
144
137
|
} | {
|
|
145
138
|
message: string;
|
|
146
139
|
type: "CS_API_SUCCESS";
|
|
147
|
-
streamID:
|
|
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:
|
|
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:
|
|
164
|
-
active:
|
|
156
|
+
enabled: boolean;
|
|
157
|
+
active: boolean;
|
|
165
158
|
streamID: number;
|
|
166
|
-
|
|
167
|
-
isStreaming: 0 | 1;
|
|
159
|
+
isStreaming: boolean;
|
|
168
160
|
} | {
|
|
169
161
|
message: string;
|
|
170
162
|
type: "CS_API_SUCCESS";
|
|
171
|
-
streamID:
|
|
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:
|
|
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
|
-
|
|
193
|
-
active: z.
|
|
194
|
-
|
|
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:
|
|
199
|
-
active:
|
|
189
|
+
enabled: boolean;
|
|
190
|
+
active: boolean;
|
|
200
191
|
streamID: number;
|
|
201
|
-
|
|
202
|
-
isStreaming: 0 | 1;
|
|
192
|
+
isStreaming: boolean;
|
|
203
193
|
}, {
|
|
204
194
|
type: "StreamState";
|
|
205
|
-
enabled:
|
|
206
|
-
active:
|
|
195
|
+
enabled: boolean;
|
|
196
|
+
active: boolean;
|
|
207
197
|
streamID: number;
|
|
208
|
-
|
|
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.
|
|
203
|
+
streamID: z.ZodNumber;
|
|
215
204
|
}, "strip", z.ZodTypeAny, {
|
|
216
205
|
message: string;
|
|
217
206
|
type: "CS_API_SUCCESS";
|
|
218
|
-
streamID:
|
|
207
|
+
streamID: number;
|
|
219
208
|
apiCall: string;
|
|
220
209
|
}, {
|
|
221
210
|
message: string;
|
|
222
211
|
type: "CS_API_SUCCESS";
|
|
223
|
-
streamID:
|
|
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.
|
|
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:
|
|
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:
|
|
230
|
+
streamID: number;
|
|
242
231
|
apiCall: string;
|
|
243
232
|
}>]>;
|
|
244
233
|
export type TCamStreamerEvent = z.infer<typeof csEventsDataSchema>;
|