@stream-io/node-sdk 0.6.2 → 0.6.4
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 +113 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +113 -23
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +1 -1
- package/dist/src/gen/common/CommonApi.d.ts +1 -1
- package/dist/src/gen/models/index.d.ts +249 -115
- package/dist/src/gen/moderation/ModerationApi.d.ts +5 -1
- package/dist/src/gen/video/CallApi.d.ts +2 -1
- package/dist/src/gen/video/VideoApi.d.ts +5 -1
- package/package.json +1 -1
- package/src/gen/chat/ChatApi.ts +2 -2
- package/src/gen/common/CommonApi.ts +2 -2
- package/src/gen/feeds/FeedsApi.ts +9 -0
- package/src/gen/model-decoders/decoders.ts +42 -32
- package/src/gen/models/index.ts +415 -166
- package/src/gen/moderation/ModerationApi.ts +99 -1
- package/src/gen/video/CallApi.ts +15 -3
- package/src/gen/video/VideoApi.ts +42 -5
package/dist/index.es.mjs
CHANGED
|
@@ -935,20 +935,6 @@ decoders.ChannelMember = (input) => {
|
|
|
935
935
|
};
|
|
936
936
|
return decode(typeMappings, input);
|
|
937
937
|
};
|
|
938
|
-
decoders.ChannelMemberResponse = (input) => {
|
|
939
|
-
const typeMappings = {
|
|
940
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
941
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
942
|
-
archived_at: { type: 'DatetimeType', isSingle: true },
|
|
943
|
-
ban_expires: { type: 'DatetimeType', isSingle: true },
|
|
944
|
-
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
945
|
-
invite_accepted_at: { type: 'DatetimeType', isSingle: true },
|
|
946
|
-
invite_rejected_at: { type: 'DatetimeType', isSingle: true },
|
|
947
|
-
pinned_at: { type: 'DatetimeType', isSingle: true },
|
|
948
|
-
user: { type: 'UserResponse', isSingle: true },
|
|
949
|
-
};
|
|
950
|
-
return decode(typeMappings, input);
|
|
951
|
-
};
|
|
952
938
|
decoders.ChannelMute = (input) => {
|
|
953
939
|
const typeMappings = {
|
|
954
940
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1100,6 +1086,7 @@ decoders.Command = (input) => {
|
|
|
1100
1086
|
decoders.CommentAddedEvent = (input) => {
|
|
1101
1087
|
const typeMappings = {
|
|
1102
1088
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1089
|
+
activity: { type: 'ActivityResponse', isSingle: true },
|
|
1103
1090
|
comment: { type: 'CommentResponse', isSingle: true },
|
|
1104
1091
|
received_at: { type: 'DatetimeType', isSingle: true },
|
|
1105
1092
|
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
@@ -1118,6 +1105,7 @@ decoders.CommentDeletedEvent = (input) => {
|
|
|
1118
1105
|
decoders.CommentReactionAddedEvent = (input) => {
|
|
1119
1106
|
const typeMappings = {
|
|
1120
1107
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1108
|
+
activity: { type: 'ActivityResponse', isSingle: true },
|
|
1121
1109
|
comment: { type: 'CommentResponse', isSingle: true },
|
|
1122
1110
|
reaction: { type: 'FeedsReactionResponse', isSingle: true },
|
|
1123
1111
|
received_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1137,6 +1125,7 @@ decoders.CommentReactionDeletedEvent = (input) => {
|
|
|
1137
1125
|
decoders.CommentReactionUpdatedEvent = (input) => {
|
|
1138
1126
|
const typeMappings = {
|
|
1139
1127
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1128
|
+
activity: { type: 'ActivityResponse', isSingle: true },
|
|
1140
1129
|
comment: { type: 'CommentResponse', isSingle: true },
|
|
1141
1130
|
reaction: { type: 'FeedsReactionResponse', isSingle: true },
|
|
1142
1131
|
received_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1706,6 +1695,12 @@ decoders.GetMessageResponse = (input) => {
|
|
|
1706
1695
|
};
|
|
1707
1696
|
return decode(typeMappings, input);
|
|
1708
1697
|
};
|
|
1698
|
+
decoders.GetModerationRuleResponse = (input) => {
|
|
1699
|
+
const typeMappings = {
|
|
1700
|
+
rule: { type: 'ModerationRuleV2Response', isSingle: true },
|
|
1701
|
+
};
|
|
1702
|
+
return decode(typeMappings, input);
|
|
1703
|
+
};
|
|
1709
1704
|
decoders.GetOrCreateCallResponse = (input) => {
|
|
1710
1705
|
const typeMappings = {
|
|
1711
1706
|
members: { type: 'MemberResponse', isSingle: false },
|
|
@@ -1951,6 +1946,7 @@ decoders.Message = (input) => {
|
|
|
1951
1946
|
pin_expires: { type: 'DatetimeType', isSingle: true },
|
|
1952
1947
|
pinned_at: { type: 'DatetimeType', isSingle: true },
|
|
1953
1948
|
thread_participants: { type: 'User', isSingle: false },
|
|
1949
|
+
member: { type: 'ChannelMember', isSingle: true },
|
|
1954
1950
|
pinned_by: { type: 'User', isSingle: true },
|
|
1955
1951
|
poll: { type: 'Poll', isSingle: true },
|
|
1956
1952
|
quoted_message: { type: 'Message', isSingle: true },
|
|
@@ -2133,6 +2129,8 @@ decoders.ModerationCustomActionEvent = (input) => {
|
|
|
2133
2129
|
};
|
|
2134
2130
|
decoders.ModerationFlagResponse = (input) => {
|
|
2135
2131
|
const typeMappings = {
|
|
2132
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2133
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2136
2134
|
review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
2137
2135
|
user: { type: 'UserResponse', isSingle: true },
|
|
2138
2136
|
};
|
|
@@ -2153,6 +2151,13 @@ decoders.ModerationMarkReviewedEvent = (input) => {
|
|
|
2153
2151
|
};
|
|
2154
2152
|
return decode(typeMappings, input);
|
|
2155
2153
|
};
|
|
2154
|
+
decoders.ModerationRuleV2Response = (input) => {
|
|
2155
|
+
const typeMappings = {
|
|
2156
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2157
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2158
|
+
};
|
|
2159
|
+
return decode(typeMappings, input);
|
|
2160
|
+
};
|
|
2156
2161
|
decoders.MuteChannelResponse = (input) => {
|
|
2157
2162
|
const typeMappings = {
|
|
2158
2163
|
channel_mutes: { type: 'ChannelMute', isSingle: false },
|
|
@@ -2520,6 +2525,12 @@ decoders.QueryModerationLogsResponse = (input) => {
|
|
|
2520
2525
|
};
|
|
2521
2526
|
return decode(typeMappings, input);
|
|
2522
2527
|
};
|
|
2528
|
+
decoders.QueryModerationRulesResponse = (input) => {
|
|
2529
|
+
const typeMappings = {
|
|
2530
|
+
rules: { type: 'ModerationRuleV2Response', isSingle: false },
|
|
2531
|
+
};
|
|
2532
|
+
return decode(typeMappings, input);
|
|
2533
|
+
};
|
|
2523
2534
|
decoders.QueryPollsResponse = (input) => {
|
|
2524
2535
|
const typeMappings = {
|
|
2525
2536
|
polls: { type: 'PollResponseData', isSingle: false },
|
|
@@ -3025,7 +3036,6 @@ decoders.UpdateCallTypeResponse = (input) => {
|
|
|
3025
3036
|
};
|
|
3026
3037
|
decoders.UpdateChannelPartialResponse = (input) => {
|
|
3027
3038
|
const typeMappings = {
|
|
3028
|
-
members: { type: 'ChannelMemberResponse', isSingle: false },
|
|
3029
3039
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
3030
3040
|
};
|
|
3031
3041
|
return decode(typeMappings, input);
|
|
@@ -3088,12 +3098,6 @@ decoders.UpdateFollowResponse = (input) => {
|
|
|
3088
3098
|
};
|
|
3089
3099
|
return decode(typeMappings, input);
|
|
3090
3100
|
};
|
|
3091
|
-
decoders.UpdateMemberPartialResponse = (input) => {
|
|
3092
|
-
const typeMappings = {
|
|
3093
|
-
channel_member: { type: 'ChannelMemberResponse', isSingle: true },
|
|
3094
|
-
};
|
|
3095
|
-
return decode(typeMappings, input);
|
|
3096
|
-
};
|
|
3097
3101
|
decoders.UpdateMembershipLevelResponse = (input) => {
|
|
3098
3102
|
const typeMappings = {
|
|
3099
3103
|
membership_level: { type: 'MembershipLevelResponse', isSingle: true },
|
|
@@ -3149,6 +3153,12 @@ decoders.UpsertConfigResponse = (input) => {
|
|
|
3149
3153
|
};
|
|
3150
3154
|
return decode(typeMappings, input);
|
|
3151
3155
|
};
|
|
3156
|
+
decoders.UpsertModerationRuleResponse = (input) => {
|
|
3157
|
+
const typeMappings = {
|
|
3158
|
+
rule: { type: 'ModerationRuleV2Response', isSingle: true },
|
|
3159
|
+
};
|
|
3160
|
+
return decode(typeMappings, input);
|
|
3161
|
+
};
|
|
3152
3162
|
decoders.UpsertModerationTemplateResponse = (input) => {
|
|
3153
3163
|
const typeMappings = {
|
|
3154
3164
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -4175,6 +4185,26 @@ class VideoApi {
|
|
|
4175
4185
|
decoders.BlockUserResponse?.(response.body);
|
|
4176
4186
|
return { ...response.body, metadata: response.metadata };
|
|
4177
4187
|
}
|
|
4188
|
+
async sendClosedCaption(request) {
|
|
4189
|
+
const pathParams = {
|
|
4190
|
+
type: request?.type,
|
|
4191
|
+
id: request?.id,
|
|
4192
|
+
};
|
|
4193
|
+
const body = {
|
|
4194
|
+
speaker_id: request?.speaker_id,
|
|
4195
|
+
text: request?.text,
|
|
4196
|
+
end_time: request?.end_time,
|
|
4197
|
+
language: request?.language,
|
|
4198
|
+
service: request?.service,
|
|
4199
|
+
start_time: request?.start_time,
|
|
4200
|
+
translated: request?.translated,
|
|
4201
|
+
user_id: request?.user_id,
|
|
4202
|
+
user: request?.user,
|
|
4203
|
+
};
|
|
4204
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/call/{type}/{id}/closed_captions', pathParams, undefined, body, 'application/json');
|
|
4205
|
+
decoders.SendClosedCaptionResponse?.(response.body);
|
|
4206
|
+
return { ...response.body, metadata: response.metadata };
|
|
4207
|
+
}
|
|
4178
4208
|
async deleteCall(request) {
|
|
4179
4209
|
const pathParams = {
|
|
4180
4210
|
type: request?.type,
|
|
@@ -4676,6 +4706,13 @@ class CallApi {
|
|
|
4676
4706
|
...request,
|
|
4677
4707
|
});
|
|
4678
4708
|
}
|
|
4709
|
+
sendClosedCaption(request) {
|
|
4710
|
+
return this.videoApi.sendClosedCaption({
|
|
4711
|
+
id: this.id,
|
|
4712
|
+
type: this.type,
|
|
4713
|
+
...request,
|
|
4714
|
+
});
|
|
4715
|
+
}
|
|
4679
4716
|
delete(request) {
|
|
4680
4717
|
return this.videoApi.deleteCall({
|
|
4681
4718
|
id: this.id,
|
|
@@ -6211,13 +6248,14 @@ class ModerationApi {
|
|
|
6211
6248
|
}
|
|
6212
6249
|
async check(request) {
|
|
6213
6250
|
const body = {
|
|
6214
|
-
config_key: request?.config_key,
|
|
6215
6251
|
entity_creator_id: request?.entity_creator_id,
|
|
6216
6252
|
entity_id: request?.entity_id,
|
|
6217
6253
|
entity_type: request?.entity_type,
|
|
6254
|
+
config_key: request?.config_key,
|
|
6218
6255
|
config_team: request?.config_team,
|
|
6219
6256
|
test_mode: request?.test_mode,
|
|
6220
6257
|
user_id: request?.user_id,
|
|
6258
|
+
config: request?.config,
|
|
6221
6259
|
moderation_payload: request?.moderation_payload,
|
|
6222
6260
|
options: request?.options,
|
|
6223
6261
|
user: request?.user,
|
|
@@ -6362,6 +6400,48 @@ class ModerationApi {
|
|
|
6362
6400
|
decoders.QueryModerationLogsResponse?.(response.body);
|
|
6363
6401
|
return { ...response.body, metadata: response.metadata };
|
|
6364
6402
|
}
|
|
6403
|
+
async upsertModerationRule(request) {
|
|
6404
|
+
const body = {
|
|
6405
|
+
name: request?.name,
|
|
6406
|
+
rule_type: request?.rule_type,
|
|
6407
|
+
action: request?.action,
|
|
6408
|
+
cooldown_period: request?.cooldown_period,
|
|
6409
|
+
description: request?.description,
|
|
6410
|
+
enabled: request?.enabled,
|
|
6411
|
+
logic: request?.logic,
|
|
6412
|
+
team: request?.team,
|
|
6413
|
+
conditions: request?.conditions,
|
|
6414
|
+
config_keys: request?.config_keys,
|
|
6415
|
+
groups: request?.groups,
|
|
6416
|
+
};
|
|
6417
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/moderation_rule', undefined, undefined, body, 'application/json');
|
|
6418
|
+
decoders.UpsertModerationRuleResponse?.(response.body);
|
|
6419
|
+
return { ...response.body, metadata: response.metadata };
|
|
6420
|
+
}
|
|
6421
|
+
async deleteModerationRule() {
|
|
6422
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/moderation/moderation_rule/{id}', undefined, undefined);
|
|
6423
|
+
decoders.DeleteModerationRuleResponse?.(response.body);
|
|
6424
|
+
return { ...response.body, metadata: response.metadata };
|
|
6425
|
+
}
|
|
6426
|
+
async getModerationRule() {
|
|
6427
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/moderation/moderation_rule/{id}', undefined, undefined);
|
|
6428
|
+
decoders.GetModerationRuleResponse?.(response.body);
|
|
6429
|
+
return { ...response.body, metadata: response.metadata };
|
|
6430
|
+
}
|
|
6431
|
+
async queryModerationRules(request) {
|
|
6432
|
+
const body = {
|
|
6433
|
+
limit: request?.limit,
|
|
6434
|
+
next: request?.next,
|
|
6435
|
+
prev: request?.prev,
|
|
6436
|
+
user_id: request?.user_id,
|
|
6437
|
+
sort: request?.sort,
|
|
6438
|
+
filter: request?.filter,
|
|
6439
|
+
user: request?.user,
|
|
6440
|
+
};
|
|
6441
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/moderation_rules', undefined, undefined, body, 'application/json');
|
|
6442
|
+
decoders.QueryModerationRulesResponse?.(response.body);
|
|
6443
|
+
return { ...response.body, metadata: response.metadata };
|
|
6444
|
+
}
|
|
6365
6445
|
async mute(request) {
|
|
6366
6446
|
const body = {
|
|
6367
6447
|
target_ids: request?.target_ids,
|
|
@@ -6494,7 +6574,7 @@ class ApiClient {
|
|
|
6494
6574
|
const headers = {
|
|
6495
6575
|
Authorization: this.apiConfig.token,
|
|
6496
6576
|
'stream-auth-type': 'jwt',
|
|
6497
|
-
'X-Stream-Client': 'stream-node-' + "0.6.
|
|
6577
|
+
'X-Stream-Client': 'stream-node-' + "0.6.4",
|
|
6498
6578
|
'Accept-Encoding': 'gzip',
|
|
6499
6579
|
'x-client-request-id': clientRequestId,
|
|
6500
6580
|
};
|
|
@@ -6735,6 +6815,7 @@ class FeedsApi {
|
|
|
6735
6815
|
const body = {
|
|
6736
6816
|
type: request?.type,
|
|
6737
6817
|
create_notification_activity: request?.create_notification_activity,
|
|
6818
|
+
skip_push: request?.skip_push,
|
|
6738
6819
|
user_id: request?.user_id,
|
|
6739
6820
|
custom: request?.custom,
|
|
6740
6821
|
user: request?.user,
|
|
@@ -6892,6 +6973,7 @@ class FeedsApi {
|
|
|
6892
6973
|
object_type: request?.object_type,
|
|
6893
6974
|
create_notification_activity: request?.create_notification_activity,
|
|
6894
6975
|
parent_id: request?.parent_id,
|
|
6976
|
+
skip_push: request?.skip_push,
|
|
6895
6977
|
user_id: request?.user_id,
|
|
6896
6978
|
attachments: request?.attachments,
|
|
6897
6979
|
mentioned_user_ids: request?.mentioned_user_ids,
|
|
@@ -6947,6 +7029,7 @@ class FeedsApi {
|
|
|
6947
7029
|
};
|
|
6948
7030
|
const body = {
|
|
6949
7031
|
comment: request?.comment,
|
|
7032
|
+
skip_push: request?.skip_push,
|
|
6950
7033
|
custom: request?.custom,
|
|
6951
7034
|
};
|
|
6952
7035
|
const response = await this.apiClient.sendRequest('PATCH', '/api/v2/feeds/comments/{id}', pathParams, undefined, body, 'application/json');
|
|
@@ -6960,6 +7043,7 @@ class FeedsApi {
|
|
|
6960
7043
|
const body = {
|
|
6961
7044
|
type: request?.type,
|
|
6962
7045
|
create_notification_activity: request?.create_notification_activity,
|
|
7046
|
+
skip_push: request?.skip_push,
|
|
6963
7047
|
user_id: request?.user_id,
|
|
6964
7048
|
custom: request?.custom,
|
|
6965
7049
|
user: request?.user,
|
|
@@ -7025,6 +7109,7 @@ class FeedsApi {
|
|
|
7025
7109
|
aggregation: request?.aggregation,
|
|
7026
7110
|
custom: request?.custom,
|
|
7027
7111
|
notification: request?.notification,
|
|
7112
|
+
push_notification: request?.push_notification,
|
|
7028
7113
|
ranking: request?.ranking,
|
|
7029
7114
|
};
|
|
7030
7115
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feed_groups', undefined, undefined, body, 'application/json');
|
|
@@ -7227,6 +7312,7 @@ class FeedsApi {
|
|
|
7227
7312
|
aggregation: request?.aggregation,
|
|
7228
7313
|
custom: request?.custom,
|
|
7229
7314
|
notification: request?.notification,
|
|
7315
|
+
push_notification: request?.push_notification,
|
|
7230
7316
|
ranking: request?.ranking,
|
|
7231
7317
|
};
|
|
7232
7318
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feed_groups/{id}', pathParams, undefined, body, 'application/json');
|
|
@@ -7243,6 +7329,7 @@ class FeedsApi {
|
|
|
7243
7329
|
aggregation: request?.aggregation,
|
|
7244
7330
|
custom: request?.custom,
|
|
7245
7331
|
notification: request?.notification,
|
|
7332
|
+
push_notification: request?.push_notification,
|
|
7246
7333
|
ranking: request?.ranking,
|
|
7247
7334
|
};
|
|
7248
7335
|
const response = await this.apiClient.sendRequest('PUT', '/api/v2/feeds/feed_groups/{id}', pathParams, undefined, body, 'application/json');
|
|
@@ -7338,6 +7425,7 @@ class FeedsApi {
|
|
|
7338
7425
|
create_notification_activity: request?.create_notification_activity,
|
|
7339
7426
|
follower_role: request?.follower_role,
|
|
7340
7427
|
push_preference: request?.push_preference,
|
|
7428
|
+
skip_push: request?.skip_push,
|
|
7341
7429
|
custom: request?.custom,
|
|
7342
7430
|
};
|
|
7343
7431
|
const response = await this.apiClient.sendRequest('PATCH', '/api/v2/feeds/follows', undefined, undefined, body, 'application/json');
|
|
@@ -7350,6 +7438,7 @@ class FeedsApi {
|
|
|
7350
7438
|
target: request?.target,
|
|
7351
7439
|
create_notification_activity: request?.create_notification_activity,
|
|
7352
7440
|
push_preference: request?.push_preference,
|
|
7441
|
+
skip_push: request?.skip_push,
|
|
7353
7442
|
custom: request?.custom,
|
|
7354
7443
|
};
|
|
7355
7444
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/follows', undefined, undefined, body, 'application/json');
|
|
@@ -7821,6 +7910,7 @@ const OwnCapability = {
|
|
|
7821
7910
|
REMOVE_CALL_MEMBER: 'remove-call-member',
|
|
7822
7911
|
SCREENSHARE: 'screenshare',
|
|
7823
7912
|
SEND_AUDIO: 'send-audio',
|
|
7913
|
+
SEND_CLOSED_CAPTIONS_CALL: 'send-closed-captions-call',
|
|
7824
7914
|
SEND_VIDEO: 'send-video',
|
|
7825
7915
|
START_BROADCAST_CALL: 'start-broadcast-call',
|
|
7826
7916
|
START_CLOSED_CAPTIONS_CALL: 'start-closed-captions-call',
|