@stream-io/node-sdk 0.6.2 → 0.6.3
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 +242 -114
- 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 +401 -164
- 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.cjs.js
CHANGED
|
@@ -954,20 +954,6 @@ decoders.ChannelMember = (input) => {
|
|
|
954
954
|
};
|
|
955
955
|
return decode(typeMappings, input);
|
|
956
956
|
};
|
|
957
|
-
decoders.ChannelMemberResponse = (input) => {
|
|
958
|
-
const typeMappings = {
|
|
959
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
960
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
961
|
-
archived_at: { type: 'DatetimeType', isSingle: true },
|
|
962
|
-
ban_expires: { type: 'DatetimeType', isSingle: true },
|
|
963
|
-
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
964
|
-
invite_accepted_at: { type: 'DatetimeType', isSingle: true },
|
|
965
|
-
invite_rejected_at: { type: 'DatetimeType', isSingle: true },
|
|
966
|
-
pinned_at: { type: 'DatetimeType', isSingle: true },
|
|
967
|
-
user: { type: 'UserResponse', isSingle: true },
|
|
968
|
-
};
|
|
969
|
-
return decode(typeMappings, input);
|
|
970
|
-
};
|
|
971
957
|
decoders.ChannelMute = (input) => {
|
|
972
958
|
const typeMappings = {
|
|
973
959
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1119,6 +1105,7 @@ decoders.Command = (input) => {
|
|
|
1119
1105
|
decoders.CommentAddedEvent = (input) => {
|
|
1120
1106
|
const typeMappings = {
|
|
1121
1107
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1108
|
+
activity: { type: 'ActivityResponse', isSingle: true },
|
|
1122
1109
|
comment: { type: 'CommentResponse', isSingle: true },
|
|
1123
1110
|
received_at: { type: 'DatetimeType', isSingle: true },
|
|
1124
1111
|
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
@@ -1137,6 +1124,7 @@ decoders.CommentDeletedEvent = (input) => {
|
|
|
1137
1124
|
decoders.CommentReactionAddedEvent = (input) => {
|
|
1138
1125
|
const typeMappings = {
|
|
1139
1126
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1127
|
+
activity: { type: 'ActivityResponse', isSingle: true },
|
|
1140
1128
|
comment: { type: 'CommentResponse', isSingle: true },
|
|
1141
1129
|
reaction: { type: 'FeedsReactionResponse', isSingle: true },
|
|
1142
1130
|
received_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1156,6 +1144,7 @@ decoders.CommentReactionDeletedEvent = (input) => {
|
|
|
1156
1144
|
decoders.CommentReactionUpdatedEvent = (input) => {
|
|
1157
1145
|
const typeMappings = {
|
|
1158
1146
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1147
|
+
activity: { type: 'ActivityResponse', isSingle: true },
|
|
1159
1148
|
comment: { type: 'CommentResponse', isSingle: true },
|
|
1160
1149
|
reaction: { type: 'FeedsReactionResponse', isSingle: true },
|
|
1161
1150
|
received_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1725,6 +1714,12 @@ decoders.GetMessageResponse = (input) => {
|
|
|
1725
1714
|
};
|
|
1726
1715
|
return decode(typeMappings, input);
|
|
1727
1716
|
};
|
|
1717
|
+
decoders.GetModerationRuleResponse = (input) => {
|
|
1718
|
+
const typeMappings = {
|
|
1719
|
+
rule: { type: 'ModerationRuleV2Response', isSingle: true },
|
|
1720
|
+
};
|
|
1721
|
+
return decode(typeMappings, input);
|
|
1722
|
+
};
|
|
1728
1723
|
decoders.GetOrCreateCallResponse = (input) => {
|
|
1729
1724
|
const typeMappings = {
|
|
1730
1725
|
members: { type: 'MemberResponse', isSingle: false },
|
|
@@ -1970,6 +1965,7 @@ decoders.Message = (input) => {
|
|
|
1970
1965
|
pin_expires: { type: 'DatetimeType', isSingle: true },
|
|
1971
1966
|
pinned_at: { type: 'DatetimeType', isSingle: true },
|
|
1972
1967
|
thread_participants: { type: 'User', isSingle: false },
|
|
1968
|
+
member: { type: 'ChannelMember', isSingle: true },
|
|
1973
1969
|
pinned_by: { type: 'User', isSingle: true },
|
|
1974
1970
|
poll: { type: 'Poll', isSingle: true },
|
|
1975
1971
|
quoted_message: { type: 'Message', isSingle: true },
|
|
@@ -2152,6 +2148,8 @@ decoders.ModerationCustomActionEvent = (input) => {
|
|
|
2152
2148
|
};
|
|
2153
2149
|
decoders.ModerationFlagResponse = (input) => {
|
|
2154
2150
|
const typeMappings = {
|
|
2151
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2152
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2155
2153
|
review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
2156
2154
|
user: { type: 'UserResponse', isSingle: true },
|
|
2157
2155
|
};
|
|
@@ -2172,6 +2170,13 @@ decoders.ModerationMarkReviewedEvent = (input) => {
|
|
|
2172
2170
|
};
|
|
2173
2171
|
return decode(typeMappings, input);
|
|
2174
2172
|
};
|
|
2173
|
+
decoders.ModerationRuleV2Response = (input) => {
|
|
2174
|
+
const typeMappings = {
|
|
2175
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2176
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2177
|
+
};
|
|
2178
|
+
return decode(typeMappings, input);
|
|
2179
|
+
};
|
|
2175
2180
|
decoders.MuteChannelResponse = (input) => {
|
|
2176
2181
|
const typeMappings = {
|
|
2177
2182
|
channel_mutes: { type: 'ChannelMute', isSingle: false },
|
|
@@ -2539,6 +2544,12 @@ decoders.QueryModerationLogsResponse = (input) => {
|
|
|
2539
2544
|
};
|
|
2540
2545
|
return decode(typeMappings, input);
|
|
2541
2546
|
};
|
|
2547
|
+
decoders.QueryModerationRulesResponse = (input) => {
|
|
2548
|
+
const typeMappings = {
|
|
2549
|
+
rules: { type: 'ModerationRuleV2Response', isSingle: false },
|
|
2550
|
+
};
|
|
2551
|
+
return decode(typeMappings, input);
|
|
2552
|
+
};
|
|
2542
2553
|
decoders.QueryPollsResponse = (input) => {
|
|
2543
2554
|
const typeMappings = {
|
|
2544
2555
|
polls: { type: 'PollResponseData', isSingle: false },
|
|
@@ -3044,7 +3055,6 @@ decoders.UpdateCallTypeResponse = (input) => {
|
|
|
3044
3055
|
};
|
|
3045
3056
|
decoders.UpdateChannelPartialResponse = (input) => {
|
|
3046
3057
|
const typeMappings = {
|
|
3047
|
-
members: { type: 'ChannelMemberResponse', isSingle: false },
|
|
3048
3058
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
3049
3059
|
};
|
|
3050
3060
|
return decode(typeMappings, input);
|
|
@@ -3107,12 +3117,6 @@ decoders.UpdateFollowResponse = (input) => {
|
|
|
3107
3117
|
};
|
|
3108
3118
|
return decode(typeMappings, input);
|
|
3109
3119
|
};
|
|
3110
|
-
decoders.UpdateMemberPartialResponse = (input) => {
|
|
3111
|
-
const typeMappings = {
|
|
3112
|
-
channel_member: { type: 'ChannelMemberResponse', isSingle: true },
|
|
3113
|
-
};
|
|
3114
|
-
return decode(typeMappings, input);
|
|
3115
|
-
};
|
|
3116
3120
|
decoders.UpdateMembershipLevelResponse = (input) => {
|
|
3117
3121
|
const typeMappings = {
|
|
3118
3122
|
membership_level: { type: 'MembershipLevelResponse', isSingle: true },
|
|
@@ -3168,6 +3172,12 @@ decoders.UpsertConfigResponse = (input) => {
|
|
|
3168
3172
|
};
|
|
3169
3173
|
return decode(typeMappings, input);
|
|
3170
3174
|
};
|
|
3175
|
+
decoders.UpsertModerationRuleResponse = (input) => {
|
|
3176
|
+
const typeMappings = {
|
|
3177
|
+
rule: { type: 'ModerationRuleV2Response', isSingle: true },
|
|
3178
|
+
};
|
|
3179
|
+
return decode(typeMappings, input);
|
|
3180
|
+
};
|
|
3171
3181
|
decoders.UpsertModerationTemplateResponse = (input) => {
|
|
3172
3182
|
const typeMappings = {
|
|
3173
3183
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -4194,6 +4204,26 @@ class VideoApi {
|
|
|
4194
4204
|
decoders.BlockUserResponse?.(response.body);
|
|
4195
4205
|
return { ...response.body, metadata: response.metadata };
|
|
4196
4206
|
}
|
|
4207
|
+
async sendClosedCaption(request) {
|
|
4208
|
+
const pathParams = {
|
|
4209
|
+
type: request?.type,
|
|
4210
|
+
id: request?.id,
|
|
4211
|
+
};
|
|
4212
|
+
const body = {
|
|
4213
|
+
speaker_id: request?.speaker_id,
|
|
4214
|
+
text: request?.text,
|
|
4215
|
+
end_time: request?.end_time,
|
|
4216
|
+
language: request?.language,
|
|
4217
|
+
service: request?.service,
|
|
4218
|
+
start_time: request?.start_time,
|
|
4219
|
+
translated: request?.translated,
|
|
4220
|
+
user_id: request?.user_id,
|
|
4221
|
+
user: request?.user,
|
|
4222
|
+
};
|
|
4223
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/call/{type}/{id}/closed_captions', pathParams, undefined, body, 'application/json');
|
|
4224
|
+
decoders.SendClosedCaptionResponse?.(response.body);
|
|
4225
|
+
return { ...response.body, metadata: response.metadata };
|
|
4226
|
+
}
|
|
4197
4227
|
async deleteCall(request) {
|
|
4198
4228
|
const pathParams = {
|
|
4199
4229
|
type: request?.type,
|
|
@@ -4695,6 +4725,13 @@ class CallApi {
|
|
|
4695
4725
|
...request,
|
|
4696
4726
|
});
|
|
4697
4727
|
}
|
|
4728
|
+
sendClosedCaption(request) {
|
|
4729
|
+
return this.videoApi.sendClosedCaption({
|
|
4730
|
+
id: this.id,
|
|
4731
|
+
type: this.type,
|
|
4732
|
+
...request,
|
|
4733
|
+
});
|
|
4734
|
+
}
|
|
4698
4735
|
delete(request) {
|
|
4699
4736
|
return this.videoApi.deleteCall({
|
|
4700
4737
|
id: this.id,
|
|
@@ -6230,13 +6267,14 @@ class ModerationApi {
|
|
|
6230
6267
|
}
|
|
6231
6268
|
async check(request) {
|
|
6232
6269
|
const body = {
|
|
6233
|
-
config_key: request?.config_key,
|
|
6234
6270
|
entity_creator_id: request?.entity_creator_id,
|
|
6235
6271
|
entity_id: request?.entity_id,
|
|
6236
6272
|
entity_type: request?.entity_type,
|
|
6273
|
+
config_key: request?.config_key,
|
|
6237
6274
|
config_team: request?.config_team,
|
|
6238
6275
|
test_mode: request?.test_mode,
|
|
6239
6276
|
user_id: request?.user_id,
|
|
6277
|
+
config: request?.config,
|
|
6240
6278
|
moderation_payload: request?.moderation_payload,
|
|
6241
6279
|
options: request?.options,
|
|
6242
6280
|
user: request?.user,
|
|
@@ -6381,6 +6419,48 @@ class ModerationApi {
|
|
|
6381
6419
|
decoders.QueryModerationLogsResponse?.(response.body);
|
|
6382
6420
|
return { ...response.body, metadata: response.metadata };
|
|
6383
6421
|
}
|
|
6422
|
+
async upsertModerationRule(request) {
|
|
6423
|
+
const body = {
|
|
6424
|
+
name: request?.name,
|
|
6425
|
+
rule_type: request?.rule_type,
|
|
6426
|
+
action: request?.action,
|
|
6427
|
+
cooldown_period: request?.cooldown_period,
|
|
6428
|
+
description: request?.description,
|
|
6429
|
+
enabled: request?.enabled,
|
|
6430
|
+
logic: request?.logic,
|
|
6431
|
+
team: request?.team,
|
|
6432
|
+
conditions: request?.conditions,
|
|
6433
|
+
config_keys: request?.config_keys,
|
|
6434
|
+
groups: request?.groups,
|
|
6435
|
+
};
|
|
6436
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/moderation_rule', undefined, undefined, body, 'application/json');
|
|
6437
|
+
decoders.UpsertModerationRuleResponse?.(response.body);
|
|
6438
|
+
return { ...response.body, metadata: response.metadata };
|
|
6439
|
+
}
|
|
6440
|
+
async deleteModerationRule() {
|
|
6441
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/moderation/moderation_rule/{id}', undefined, undefined);
|
|
6442
|
+
decoders.DeleteModerationRuleResponse?.(response.body);
|
|
6443
|
+
return { ...response.body, metadata: response.metadata };
|
|
6444
|
+
}
|
|
6445
|
+
async getModerationRule() {
|
|
6446
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/moderation/moderation_rule/{id}', undefined, undefined);
|
|
6447
|
+
decoders.GetModerationRuleResponse?.(response.body);
|
|
6448
|
+
return { ...response.body, metadata: response.metadata };
|
|
6449
|
+
}
|
|
6450
|
+
async queryModerationRules(request) {
|
|
6451
|
+
const body = {
|
|
6452
|
+
limit: request?.limit,
|
|
6453
|
+
next: request?.next,
|
|
6454
|
+
prev: request?.prev,
|
|
6455
|
+
user_id: request?.user_id,
|
|
6456
|
+
sort: request?.sort,
|
|
6457
|
+
filter: request?.filter,
|
|
6458
|
+
user: request?.user,
|
|
6459
|
+
};
|
|
6460
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/moderation_rules', undefined, undefined, body, 'application/json');
|
|
6461
|
+
decoders.QueryModerationRulesResponse?.(response.body);
|
|
6462
|
+
return { ...response.body, metadata: response.metadata };
|
|
6463
|
+
}
|
|
6384
6464
|
async mute(request) {
|
|
6385
6465
|
const body = {
|
|
6386
6466
|
target_ids: request?.target_ids,
|
|
@@ -6513,7 +6593,7 @@ class ApiClient {
|
|
|
6513
6593
|
const headers = {
|
|
6514
6594
|
Authorization: this.apiConfig.token,
|
|
6515
6595
|
'stream-auth-type': 'jwt',
|
|
6516
|
-
'X-Stream-Client': 'stream-node-' + "0.6.
|
|
6596
|
+
'X-Stream-Client': 'stream-node-' + "0.6.3",
|
|
6517
6597
|
'Accept-Encoding': 'gzip',
|
|
6518
6598
|
'x-client-request-id': clientRequestId,
|
|
6519
6599
|
};
|
|
@@ -6754,6 +6834,7 @@ class FeedsApi {
|
|
|
6754
6834
|
const body = {
|
|
6755
6835
|
type: request?.type,
|
|
6756
6836
|
create_notification_activity: request?.create_notification_activity,
|
|
6837
|
+
skip_push: request?.skip_push,
|
|
6757
6838
|
user_id: request?.user_id,
|
|
6758
6839
|
custom: request?.custom,
|
|
6759
6840
|
user: request?.user,
|
|
@@ -6911,6 +6992,7 @@ class FeedsApi {
|
|
|
6911
6992
|
object_type: request?.object_type,
|
|
6912
6993
|
create_notification_activity: request?.create_notification_activity,
|
|
6913
6994
|
parent_id: request?.parent_id,
|
|
6995
|
+
skip_push: request?.skip_push,
|
|
6914
6996
|
user_id: request?.user_id,
|
|
6915
6997
|
attachments: request?.attachments,
|
|
6916
6998
|
mentioned_user_ids: request?.mentioned_user_ids,
|
|
@@ -6966,6 +7048,7 @@ class FeedsApi {
|
|
|
6966
7048
|
};
|
|
6967
7049
|
const body = {
|
|
6968
7050
|
comment: request?.comment,
|
|
7051
|
+
skip_push: request?.skip_push,
|
|
6969
7052
|
custom: request?.custom,
|
|
6970
7053
|
};
|
|
6971
7054
|
const response = await this.apiClient.sendRequest('PATCH', '/api/v2/feeds/comments/{id}', pathParams, undefined, body, 'application/json');
|
|
@@ -6979,6 +7062,7 @@ class FeedsApi {
|
|
|
6979
7062
|
const body = {
|
|
6980
7063
|
type: request?.type,
|
|
6981
7064
|
create_notification_activity: request?.create_notification_activity,
|
|
7065
|
+
skip_push: request?.skip_push,
|
|
6982
7066
|
user_id: request?.user_id,
|
|
6983
7067
|
custom: request?.custom,
|
|
6984
7068
|
user: request?.user,
|
|
@@ -7044,6 +7128,7 @@ class FeedsApi {
|
|
|
7044
7128
|
aggregation: request?.aggregation,
|
|
7045
7129
|
custom: request?.custom,
|
|
7046
7130
|
notification: request?.notification,
|
|
7131
|
+
push_notification: request?.push_notification,
|
|
7047
7132
|
ranking: request?.ranking,
|
|
7048
7133
|
};
|
|
7049
7134
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feed_groups', undefined, undefined, body, 'application/json');
|
|
@@ -7246,6 +7331,7 @@ class FeedsApi {
|
|
|
7246
7331
|
aggregation: request?.aggregation,
|
|
7247
7332
|
custom: request?.custom,
|
|
7248
7333
|
notification: request?.notification,
|
|
7334
|
+
push_notification: request?.push_notification,
|
|
7249
7335
|
ranking: request?.ranking,
|
|
7250
7336
|
};
|
|
7251
7337
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feed_groups/{id}', pathParams, undefined, body, 'application/json');
|
|
@@ -7262,6 +7348,7 @@ class FeedsApi {
|
|
|
7262
7348
|
aggregation: request?.aggregation,
|
|
7263
7349
|
custom: request?.custom,
|
|
7264
7350
|
notification: request?.notification,
|
|
7351
|
+
push_notification: request?.push_notification,
|
|
7265
7352
|
ranking: request?.ranking,
|
|
7266
7353
|
};
|
|
7267
7354
|
const response = await this.apiClient.sendRequest('PUT', '/api/v2/feeds/feed_groups/{id}', pathParams, undefined, body, 'application/json');
|
|
@@ -7357,6 +7444,7 @@ class FeedsApi {
|
|
|
7357
7444
|
create_notification_activity: request?.create_notification_activity,
|
|
7358
7445
|
follower_role: request?.follower_role,
|
|
7359
7446
|
push_preference: request?.push_preference,
|
|
7447
|
+
skip_push: request?.skip_push,
|
|
7360
7448
|
custom: request?.custom,
|
|
7361
7449
|
};
|
|
7362
7450
|
const response = await this.apiClient.sendRequest('PATCH', '/api/v2/feeds/follows', undefined, undefined, body, 'application/json');
|
|
@@ -7369,6 +7457,7 @@ class FeedsApi {
|
|
|
7369
7457
|
target: request?.target,
|
|
7370
7458
|
create_notification_activity: request?.create_notification_activity,
|
|
7371
7459
|
push_preference: request?.push_preference,
|
|
7460
|
+
skip_push: request?.skip_push,
|
|
7372
7461
|
custom: request?.custom,
|
|
7373
7462
|
};
|
|
7374
7463
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/follows', undefined, undefined, body, 'application/json');
|
|
@@ -7840,6 +7929,7 @@ const OwnCapability = {
|
|
|
7840
7929
|
REMOVE_CALL_MEMBER: 'remove-call-member',
|
|
7841
7930
|
SCREENSHARE: 'screenshare',
|
|
7842
7931
|
SEND_AUDIO: 'send-audio',
|
|
7932
|
+
SEND_CLOSED_CAPTIONS_CALL: 'send-closed-captions-call',
|
|
7843
7933
|
SEND_VIDEO: 'send-video',
|
|
7844
7934
|
START_BROADCAST_CALL: 'start-broadcast-call',
|
|
7845
7935
|
START_CLOSED_CAPTIONS_CALL: 'start-closed-captions-call',
|