@stream-io/node-sdk 0.4.4 → 0.4.5
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/dist/index.cjs.js +692 -340
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +692 -341
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +28 -2
- package/dist/src/gen/models/index.d.ts +585 -194
- package/dist/src/gen/moderation/ModerationApi.d.ts +5 -1
- package/dist/src/gen/video/CallApi.d.ts +4 -2
- package/dist/src/gen/video/VideoApi.d.ts +10 -2
- package/package.json +1 -1
- package/src/gen/chat/ChatApi.ts +225 -2
- package/src/gen/model-decoders/index.ts +330 -136
- package/src/gen/models/index.ts +1007 -293
- package/src/gen/moderation/ModerationApi.ts +51 -5
- package/src/gen/video/CallApi.ts +19 -2
- package/src/gen/video/VideoApi.ts +57 -2
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
CheckResponse,
|
|
8
8
|
CustomCheckRequest,
|
|
9
9
|
CustomCheckResponse,
|
|
10
|
+
DeleteModerationConfigResponse,
|
|
10
11
|
DeleteModerationTemplateResponse,
|
|
11
12
|
FlagRequest,
|
|
12
13
|
FlagResponse,
|
|
@@ -17,6 +18,8 @@ import {
|
|
|
17
18
|
MuteRequest,
|
|
18
19
|
MuteResponse,
|
|
19
20
|
QueryFeedModerationTemplatesResponse,
|
|
21
|
+
QueryModerationConfigsRequest,
|
|
22
|
+
QueryModerationConfigsResponse,
|
|
20
23
|
QueryModerationLogsRequest,
|
|
21
24
|
QueryModerationLogsResponse,
|
|
22
25
|
QueryReviewQueueRequest,
|
|
@@ -71,6 +74,7 @@ export class ModerationApi extends BaseApi {
|
|
|
71
74
|
entity_creator_id: request?.entity_creator_id,
|
|
72
75
|
entity_id: request?.entity_id,
|
|
73
76
|
entity_type: request?.entity_type,
|
|
77
|
+
test_mode: request?.test_mode,
|
|
74
78
|
user_id: request?.user_id,
|
|
75
79
|
moderation_payload: request?.moderation_payload,
|
|
76
80
|
options: request?.options,
|
|
@@ -96,14 +100,16 @@ export class ModerationApi extends BaseApi {
|
|
|
96
100
|
const body = {
|
|
97
101
|
key: request?.key,
|
|
98
102
|
async: request?.async,
|
|
103
|
+
ai_image_config: request?.ai_image_config,
|
|
104
|
+
ai_text_config: request?.ai_text_config,
|
|
99
105
|
automod_platform_circumvention_config:
|
|
100
106
|
request?.automod_platform_circumvention_config,
|
|
101
107
|
automod_semantic_filters_config: request?.automod_semantic_filters_config,
|
|
102
108
|
automod_toxicity_config: request?.automod_toxicity_config,
|
|
103
|
-
|
|
109
|
+
aws_rekognition_config: request?.aws_rekognition_config,
|
|
104
110
|
block_list_config: request?.block_list_config,
|
|
105
111
|
bodyguard_config: request?.bodyguard_config,
|
|
106
|
-
|
|
112
|
+
google_vision_config: request?.google_vision_config,
|
|
107
113
|
velocity_filter_config: request?.velocity_filter_config,
|
|
108
114
|
};
|
|
109
115
|
|
|
@@ -116,6 +122,22 @@ export class ModerationApi extends BaseApi {
|
|
|
116
122
|
return { ...response.body, metadata: response.metadata };
|
|
117
123
|
};
|
|
118
124
|
|
|
125
|
+
deleteConfig = async (request: {
|
|
126
|
+
key: string;
|
|
127
|
+
}): Promise<StreamResponse<DeleteModerationConfigResponse>> => {
|
|
128
|
+
const pathParams = {
|
|
129
|
+
key: request?.key,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const response = await this.sendRequest<
|
|
133
|
+
StreamResponse<DeleteModerationConfigResponse>
|
|
134
|
+
>('DELETE', '/api/v2/moderation/config/{key}', pathParams, undefined);
|
|
135
|
+
|
|
136
|
+
decoders.DeleteModerationConfigResponse?.(response.body);
|
|
137
|
+
|
|
138
|
+
return { ...response.body, metadata: response.metadata };
|
|
139
|
+
};
|
|
140
|
+
|
|
119
141
|
getConfig = async (request: {
|
|
120
142
|
key: string;
|
|
121
143
|
}): Promise<StreamResponse<GetConfigResponse>> => {
|
|
@@ -135,6 +157,28 @@ export class ModerationApi extends BaseApi {
|
|
|
135
157
|
return { ...response.body, metadata: response.metadata };
|
|
136
158
|
};
|
|
137
159
|
|
|
160
|
+
queryModerationConfigs = async (
|
|
161
|
+
request?: QueryModerationConfigsRequest,
|
|
162
|
+
): Promise<StreamResponse<QueryModerationConfigsResponse>> => {
|
|
163
|
+
const body = {
|
|
164
|
+
limit: request?.limit,
|
|
165
|
+
next: request?.next,
|
|
166
|
+
prev: request?.prev,
|
|
167
|
+
user_id: request?.user_id,
|
|
168
|
+
sort: request?.sort,
|
|
169
|
+
filter: request?.filter,
|
|
170
|
+
user: request?.user,
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const response = await this.sendRequest<
|
|
174
|
+
StreamResponse<QueryModerationConfigsResponse>
|
|
175
|
+
>('POST', '/api/v2/moderation/configs', undefined, undefined, body);
|
|
176
|
+
|
|
177
|
+
decoders.QueryModerationConfigsResponse?.(response.body);
|
|
178
|
+
|
|
179
|
+
return { ...response.body, metadata: response.metadata };
|
|
180
|
+
};
|
|
181
|
+
|
|
138
182
|
customCheck = async (
|
|
139
183
|
request: CustomCheckRequest,
|
|
140
184
|
): Promise<StreamResponse<CustomCheckResponse>> => {
|
|
@@ -222,8 +266,8 @@ export class ModerationApi extends BaseApi {
|
|
|
222
266
|
const body = {
|
|
223
267
|
entity_id: request?.entity_id,
|
|
224
268
|
entity_type: request?.entity_type,
|
|
225
|
-
reason: request?.reason,
|
|
226
269
|
entity_creator_id: request?.entity_creator_id,
|
|
270
|
+
reason: request?.reason,
|
|
227
271
|
user_id: request?.user_id,
|
|
228
272
|
custom: request?.custom,
|
|
229
273
|
moderation_payload: request?.moderation_payload,
|
|
@@ -318,8 +362,9 @@ export class ModerationApi extends BaseApi {
|
|
|
318
362
|
): Promise<StreamResponse<QueryReviewQueueResponse>> => {
|
|
319
363
|
const body = {
|
|
320
364
|
limit: request?.limit,
|
|
321
|
-
|
|
322
|
-
|
|
365
|
+
lock_count: request?.lock_count,
|
|
366
|
+
lock_duration: request?.lock_duration,
|
|
367
|
+
lock_items: request?.lock_items,
|
|
323
368
|
next: request?.next,
|
|
324
369
|
prev: request?.prev,
|
|
325
370
|
stats_only: request?.stats_only,
|
|
@@ -367,6 +412,7 @@ export class ModerationApi extends BaseApi {
|
|
|
367
412
|
delete_message: request?.delete_message,
|
|
368
413
|
delete_reaction: request?.delete_reaction,
|
|
369
414
|
delete_user: request?.delete_user,
|
|
415
|
+
mark_reviewed: request?.mark_reviewed,
|
|
370
416
|
unban: request?.unban,
|
|
371
417
|
user: request?.user,
|
|
372
418
|
};
|
package/src/gen/video/CallApi.ts
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
PinResponse,
|
|
25
25
|
SendCallEventRequest,
|
|
26
26
|
SendCallEventResponse,
|
|
27
|
+
StartClosedCaptionsResponse,
|
|
27
28
|
StartHLSBroadcastingResponse,
|
|
28
29
|
StartRTMPBroadcastsRequest,
|
|
29
30
|
StartRTMPBroadcastsResponse,
|
|
@@ -32,7 +33,9 @@ import {
|
|
|
32
33
|
StartTranscriptionRequest,
|
|
33
34
|
StartTranscriptionResponse,
|
|
34
35
|
StopAllRTMPBroadcastsResponse,
|
|
36
|
+
StopClosedCaptionsResponse,
|
|
35
37
|
StopHLSBroadcastingResponse,
|
|
38
|
+
StopLiveRequest,
|
|
36
39
|
StopLiveResponse,
|
|
37
40
|
StopRTMPBroadcastsRequest,
|
|
38
41
|
StopRTMPBroadcastsResponse,
|
|
@@ -199,6 +202,12 @@ export class CallApi {
|
|
|
199
202
|
return this.videoApi.startHLSBroadcasting({ id: this.id, type: this.type });
|
|
200
203
|
};
|
|
201
204
|
|
|
205
|
+
startClosedCaptions = (): Promise<
|
|
206
|
+
StreamResponse<StartClosedCaptionsResponse>
|
|
207
|
+
> => {
|
|
208
|
+
return this.videoApi.startClosedCaptions({ id: this.id, type: this.type });
|
|
209
|
+
};
|
|
210
|
+
|
|
202
211
|
startRecording = (
|
|
203
212
|
request?: StartRecordingRequest,
|
|
204
213
|
): Promise<StreamResponse<StartRecordingResponse>> => {
|
|
@@ -235,8 +244,16 @@ export class CallApi {
|
|
|
235
244
|
return this.videoApi.stopHLSBroadcasting({ id: this.id, type: this.type });
|
|
236
245
|
};
|
|
237
246
|
|
|
238
|
-
|
|
239
|
-
|
|
247
|
+
stopClosedCaptions = (): Promise<
|
|
248
|
+
StreamResponse<StopClosedCaptionsResponse>
|
|
249
|
+
> => {
|
|
250
|
+
return this.videoApi.stopClosedCaptions({ id: this.id, type: this.type });
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
stopLive = (
|
|
254
|
+
request?: StopLiveRequest,
|
|
255
|
+
): Promise<StreamResponse<StopLiveResponse>> => {
|
|
256
|
+
return this.videoApi.stopLive({ id: this.id, type: this.type, ...request });
|
|
240
257
|
};
|
|
241
258
|
|
|
242
259
|
stopRecording = (): Promise<StreamResponse<StopRecordingResponse>> => {
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
Response,
|
|
37
37
|
SendCallEventRequest,
|
|
38
38
|
SendCallEventResponse,
|
|
39
|
+
StartClosedCaptionsResponse,
|
|
39
40
|
StartHLSBroadcastingResponse,
|
|
40
41
|
StartRTMPBroadcastsRequest,
|
|
41
42
|
StartRTMPBroadcastsResponse,
|
|
@@ -44,7 +45,9 @@ import {
|
|
|
44
45
|
StartTranscriptionRequest,
|
|
45
46
|
StartTranscriptionResponse,
|
|
46
47
|
StopAllRTMPBroadcastsResponse,
|
|
48
|
+
StopClosedCaptionsResponse,
|
|
47
49
|
StopHLSBroadcastingResponse,
|
|
50
|
+
StopLiveRequest,
|
|
48
51
|
StopLiveResponse,
|
|
49
52
|
StopRTMPBroadcastsRequest,
|
|
50
53
|
StopRTMPBroadcastsResponse,
|
|
@@ -558,6 +561,29 @@ export class VideoApi extends BaseApi {
|
|
|
558
561
|
return { ...response.body, metadata: response.metadata };
|
|
559
562
|
};
|
|
560
563
|
|
|
564
|
+
startClosedCaptions = async (request: {
|
|
565
|
+
type: string;
|
|
566
|
+
id: string;
|
|
567
|
+
}): Promise<StreamResponse<StartClosedCaptionsResponse>> => {
|
|
568
|
+
const pathParams = {
|
|
569
|
+
type: request?.type,
|
|
570
|
+
id: request?.id,
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
const response = await this.sendRequest<
|
|
574
|
+
StreamResponse<StartClosedCaptionsResponse>
|
|
575
|
+
>(
|
|
576
|
+
'POST',
|
|
577
|
+
'/api/v2/video/call/{type}/{id}/start_closed_captions',
|
|
578
|
+
pathParams,
|
|
579
|
+
undefined,
|
|
580
|
+
);
|
|
581
|
+
|
|
582
|
+
decoders.StartClosedCaptionsResponse?.(response.body);
|
|
583
|
+
|
|
584
|
+
return { ...response.body, metadata: response.metadata };
|
|
585
|
+
};
|
|
586
|
+
|
|
561
587
|
startRecording = async (
|
|
562
588
|
request: StartRecordingRequest & { type: string; id: string },
|
|
563
589
|
): Promise<StreamResponse<StartRecordingResponse>> => {
|
|
@@ -658,20 +684,49 @@ export class VideoApi extends BaseApi {
|
|
|
658
684
|
return { ...response.body, metadata: response.metadata };
|
|
659
685
|
};
|
|
660
686
|
|
|
661
|
-
|
|
687
|
+
stopClosedCaptions = async (request: {
|
|
662
688
|
type: string;
|
|
663
689
|
id: string;
|
|
664
|
-
}): Promise<StreamResponse<
|
|
690
|
+
}): Promise<StreamResponse<StopClosedCaptionsResponse>> => {
|
|
665
691
|
const pathParams = {
|
|
666
692
|
type: request?.type,
|
|
667
693
|
id: request?.id,
|
|
668
694
|
};
|
|
669
695
|
|
|
696
|
+
const response = await this.sendRequest<
|
|
697
|
+
StreamResponse<StopClosedCaptionsResponse>
|
|
698
|
+
>(
|
|
699
|
+
'POST',
|
|
700
|
+
'/api/v2/video/call/{type}/{id}/stop_closed_captions',
|
|
701
|
+
pathParams,
|
|
702
|
+
undefined,
|
|
703
|
+
);
|
|
704
|
+
|
|
705
|
+
decoders.StopClosedCaptionsResponse?.(response.body);
|
|
706
|
+
|
|
707
|
+
return { ...response.body, metadata: response.metadata };
|
|
708
|
+
};
|
|
709
|
+
|
|
710
|
+
stopLive = async (
|
|
711
|
+
request: StopLiveRequest & { type: string; id: string },
|
|
712
|
+
): Promise<StreamResponse<StopLiveResponse>> => {
|
|
713
|
+
const pathParams = {
|
|
714
|
+
type: request?.type,
|
|
715
|
+
id: request?.id,
|
|
716
|
+
};
|
|
717
|
+
const body = {
|
|
718
|
+
continue_hls: request?.continue_hls,
|
|
719
|
+
continue_recording: request?.continue_recording,
|
|
720
|
+
continue_rtmp_broadcast: request?.continue_rtmp_broadcast,
|
|
721
|
+
continue_transcription: request?.continue_transcription,
|
|
722
|
+
};
|
|
723
|
+
|
|
670
724
|
const response = await this.sendRequest<StreamResponse<StopLiveResponse>>(
|
|
671
725
|
'POST',
|
|
672
726
|
'/api/v2/video/call/{type}/{id}/stop_live',
|
|
673
727
|
pathParams,
|
|
674
728
|
undefined,
|
|
729
|
+
body,
|
|
675
730
|
);
|
|
676
731
|
|
|
677
732
|
decoders.StopLiveResponse?.(response.body);
|