@stream-io/node-sdk 0.7.44 → 0.7.45
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 +114 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +114 -15
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +2 -1
- package/dist/src/gen/common/CommonApi.d.ts +4 -4
- package/dist/src/gen/feeds/FeedsApi.d.ts +6 -1
- package/dist/src/gen/models/index.d.ts +190 -5
- package/dist/src/gen/moderation/ModerationApi.d.ts +2 -1
- package/dist/src/gen/video/VideoApi.d.ts +2 -1
- package/package.json +26 -26
- package/src/ApiClient.ts +3 -3
- package/src/gen/chat/ChatApi.ts +30 -0
- package/src/gen/common/CommonApi.ts +27 -12
- package/src/gen/feeds/FeedsApi.ts +90 -0
- package/src/gen/model-decoders/decoders.ts +31 -7
- package/src/gen/models/index.ts +342 -9
- package/src/gen/moderation/ModerationApi.ts +25 -0
- package/src/gen/video/VideoApi.ts +35 -2
package/dist/index.es.mjs
CHANGED
|
@@ -527,6 +527,7 @@ decoders.CallEndedEvent = (input) => {
|
|
|
527
527
|
const typeMappings = {
|
|
528
528
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
529
529
|
call: { type: 'CallResponse', isSingle: true },
|
|
530
|
+
members: { type: 'MemberResponse', isSingle: false },
|
|
530
531
|
user: { type: 'UserResponse', isSingle: true },
|
|
531
532
|
};
|
|
532
533
|
return decode(typeMappings, input);
|
|
@@ -1167,12 +1168,6 @@ decoders.ChatActivityStatsResponse = (input) => {
|
|
|
1167
1168
|
};
|
|
1168
1169
|
return decode(typeMappings, input);
|
|
1169
1170
|
};
|
|
1170
|
-
decoders.CheckResponse = (input) => {
|
|
1171
|
-
const typeMappings = {
|
|
1172
|
-
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
1173
|
-
};
|
|
1174
|
-
return decode(typeMappings, input);
|
|
1175
|
-
};
|
|
1176
1171
|
decoders.ClosedCaptionEvent = (input) => {
|
|
1177
1172
|
const typeMappings = {
|
|
1178
1173
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1257,6 +1252,15 @@ decoders.CommentResponse = (input) => {
|
|
|
1257
1252
|
};
|
|
1258
1253
|
return decode(typeMappings, input);
|
|
1259
1254
|
};
|
|
1255
|
+
decoders.CommentRestoredEvent = (input) => {
|
|
1256
|
+
const typeMappings = {
|
|
1257
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1258
|
+
comment: { type: 'CommentResponse', isSingle: true },
|
|
1259
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
1260
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
1261
|
+
};
|
|
1262
|
+
return decode(typeMappings, input);
|
|
1263
|
+
};
|
|
1260
1264
|
decoders.CommentUpdatedEvent = (input) => {
|
|
1261
1265
|
const typeMappings = {
|
|
1262
1266
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2769,6 +2773,12 @@ decoders.QueryCampaignsResponse = (input) => {
|
|
|
2769
2773
|
};
|
|
2770
2774
|
return decode(typeMappings, input);
|
|
2771
2775
|
};
|
|
2776
|
+
decoders.QueryCollectionsResponse = (input) => {
|
|
2777
|
+
const typeMappings = {
|
|
2778
|
+
collections: { type: 'CollectionResponse', isSingle: false },
|
|
2779
|
+
};
|
|
2780
|
+
return decode(typeMappings, input);
|
|
2781
|
+
};
|
|
2772
2782
|
decoders.QueryCommentReactionsResponse = (input) => {
|
|
2773
2783
|
const typeMappings = {
|
|
2774
2784
|
reactions: { type: 'FeedsReactionResponse', isSingle: false },
|
|
@@ -3066,6 +3076,13 @@ decoders.RestoreActivityResponse = (input) => {
|
|
|
3066
3076
|
};
|
|
3067
3077
|
return decode(typeMappings, input);
|
|
3068
3078
|
};
|
|
3079
|
+
decoders.RestoreCommentResponse = (input) => {
|
|
3080
|
+
const typeMappings = {
|
|
3081
|
+
activity: { type: 'ActivityResponse', isSingle: true },
|
|
3082
|
+
comment: { type: 'CommentResponse', isSingle: true },
|
|
3083
|
+
};
|
|
3084
|
+
return decode(typeMappings, input);
|
|
3085
|
+
};
|
|
3069
3086
|
decoders.RestoreFeedGroupResponse = (input) => {
|
|
3070
3087
|
const typeMappings = {
|
|
3071
3088
|
feed_group: { type: 'FeedGroupResponse', isSingle: true },
|
|
@@ -3898,6 +3915,7 @@ class CommonApi {
|
|
|
3898
3915
|
migrate_permissions_to_v2: request?.migrate_permissions_to_v2,
|
|
3899
3916
|
moderation_analytics_enabled: request?.moderation_analytics_enabled,
|
|
3900
3917
|
moderation_enabled: request?.moderation_enabled,
|
|
3918
|
+
moderation_s3_image_access_role_arn: request?.moderation_s3_image_access_role_arn,
|
|
3901
3919
|
moderation_webhook_url: request?.moderation_webhook_url,
|
|
3902
3920
|
multi_tenant_enabled: request?.multi_tenant_enabled,
|
|
3903
3921
|
permission_version: request?.permission_version,
|
|
@@ -3918,6 +3936,7 @@ class CommonApi {
|
|
|
3918
3936
|
image_moderation_labels: request?.image_moderation_labels,
|
|
3919
3937
|
user_search_disallowed_roles: request?.user_search_disallowed_roles,
|
|
3920
3938
|
webhook_events: request?.webhook_events,
|
|
3939
|
+
activity_metrics_config: request?.activity_metrics_config,
|
|
3921
3940
|
apn_config: request?.apn_config,
|
|
3922
3941
|
async_moderation_config: request?.async_moderation_config,
|
|
3923
3942
|
datadog_info: request?.datadog_info,
|
|
@@ -4571,15 +4590,19 @@ class CommonApi {
|
|
|
4571
4590
|
decoders.UpdateUserGroupResponse?.(response.body);
|
|
4572
4591
|
return { ...response.body, metadata: response.metadata };
|
|
4573
4592
|
}
|
|
4574
|
-
async
|
|
4593
|
+
async addUserGroupMembers(request) {
|
|
4575
4594
|
const pathParams = {
|
|
4576
4595
|
id: request?.id,
|
|
4577
4596
|
};
|
|
4578
|
-
const
|
|
4579
|
-
|
|
4597
|
+
const body = {
|
|
4598
|
+
member_ids: request?.member_ids,
|
|
4599
|
+
team_id: request?.team_id,
|
|
4600
|
+
};
|
|
4601
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/usergroups/{id}/members', pathParams, undefined, body, 'application/json');
|
|
4602
|
+
decoders.AddUserGroupMembersResponse?.(response.body);
|
|
4580
4603
|
return { ...response.body, metadata: response.metadata };
|
|
4581
4604
|
}
|
|
4582
|
-
async
|
|
4605
|
+
async removeUserGroupMembers(request) {
|
|
4583
4606
|
const pathParams = {
|
|
4584
4607
|
id: request?.id,
|
|
4585
4608
|
};
|
|
@@ -4587,8 +4610,8 @@ class CommonApi {
|
|
|
4587
4610
|
member_ids: request?.member_ids,
|
|
4588
4611
|
team_id: request?.team_id,
|
|
4589
4612
|
};
|
|
4590
|
-
const response = await this.apiClient.sendRequest('POST', '/api/v2/usergroups/{id}/members', pathParams, undefined, body, 'application/json');
|
|
4591
|
-
decoders.
|
|
4613
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/usergroups/{id}/members/delete', pathParams, undefined, body, 'application/json');
|
|
4614
|
+
decoders.RemoveUserGroupMembersResponse?.(response.body);
|
|
4592
4615
|
return { ...response.body, metadata: response.metadata };
|
|
4593
4616
|
}
|
|
4594
4617
|
async queryUsers(request) {
|
|
@@ -5454,6 +5477,17 @@ class VideoApi {
|
|
|
5454
5477
|
decoders.GetEdgesResponse?.(response.body);
|
|
5455
5478
|
return { ...response.body, metadata: response.metadata };
|
|
5456
5479
|
}
|
|
5480
|
+
async resolveSipAuth(request) {
|
|
5481
|
+
const body = {
|
|
5482
|
+
sip_caller_number: request?.sip_caller_number,
|
|
5483
|
+
sip_trunk_number: request?.sip_trunk_number,
|
|
5484
|
+
from_host: request?.from_host,
|
|
5485
|
+
source_ip: request?.source_ip,
|
|
5486
|
+
};
|
|
5487
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/sip/auth', undefined, undefined, body, 'application/json');
|
|
5488
|
+
decoders.ResolveSipAuthResponse?.(response.body);
|
|
5489
|
+
return { ...response.body, metadata: response.metadata };
|
|
5490
|
+
}
|
|
5457
5491
|
async listSIPInboundRoutingRule() {
|
|
5458
5492
|
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/sip/inbound_routing_rules', undefined, undefined);
|
|
5459
5493
|
decoders.ListSIPInboundRoutingRuleResponse?.(response.body);
|
|
@@ -5489,9 +5523,9 @@ class VideoApi {
|
|
|
5489
5523
|
};
|
|
5490
5524
|
const body = {
|
|
5491
5525
|
name: request?.name,
|
|
5492
|
-
called_numbers: request?.called_numbers,
|
|
5493
5526
|
trunk_ids: request?.trunk_ids,
|
|
5494
5527
|
caller_configs: request?.caller_configs,
|
|
5528
|
+
called_numbers: request?.called_numbers,
|
|
5495
5529
|
caller_numbers: request?.caller_numbers,
|
|
5496
5530
|
call_configs: request?.call_configs,
|
|
5497
5531
|
direct_routing_configs: request?.direct_routing_configs,
|
|
@@ -5511,6 +5545,8 @@ class VideoApi {
|
|
|
5511
5545
|
const body = {
|
|
5512
5546
|
name: request?.name,
|
|
5513
5547
|
numbers: request?.numbers,
|
|
5548
|
+
password: request?.password,
|
|
5549
|
+
allowed_ips: request?.allowed_ips,
|
|
5514
5550
|
};
|
|
5515
5551
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/sip/inbound_trunks', undefined, undefined, body, 'application/json');
|
|
5516
5552
|
decoders.CreateSIPTrunkResponse?.(response.body);
|
|
@@ -5531,6 +5567,8 @@ class VideoApi {
|
|
|
5531
5567
|
const body = {
|
|
5532
5568
|
name: request?.name,
|
|
5533
5569
|
numbers: request?.numbers,
|
|
5570
|
+
password: request?.password,
|
|
5571
|
+
allowed_ips: request?.allowed_ips,
|
|
5534
5572
|
};
|
|
5535
5573
|
const response = await this.apiClient.sendRequest('PUT', '/api/v2/video/sip/inbound_trunks/{id}', pathParams, undefined, body, 'application/json');
|
|
5536
5574
|
decoders.UpdateSIPTrunkResponse?.(response.body);
|
|
@@ -5540,8 +5578,9 @@ class VideoApi {
|
|
|
5540
5578
|
const body = {
|
|
5541
5579
|
sip_caller_number: request?.sip_caller_number,
|
|
5542
5580
|
sip_trunk_number: request?.sip_trunk_number,
|
|
5543
|
-
challenge: request?.challenge,
|
|
5544
5581
|
routing_number: request?.routing_number,
|
|
5582
|
+
trunk_id: request?.trunk_id,
|
|
5583
|
+
challenge: request?.challenge,
|
|
5545
5584
|
sip_headers: request?.sip_headers,
|
|
5546
5585
|
};
|
|
5547
5586
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/sip/resolve', undefined, undefined, body, 'application/json');
|
|
@@ -5954,6 +5993,17 @@ class ChatApi {
|
|
|
5954
5993
|
decoders.QueryChannelsResponse?.(response.body);
|
|
5955
5994
|
return { ...response.body, metadata: response.metadata };
|
|
5956
5995
|
}
|
|
5996
|
+
async channelBatchUpdate(request) {
|
|
5997
|
+
const body = {
|
|
5998
|
+
operation: request?.operation,
|
|
5999
|
+
filter: request?.filter,
|
|
6000
|
+
members: request?.members,
|
|
6001
|
+
data: request?.data,
|
|
6002
|
+
};
|
|
6003
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/chat/channels/batch', undefined, undefined, body, 'application/json');
|
|
6004
|
+
decoders.ChannelBatchUpdateResponse?.(response.body);
|
|
6005
|
+
return { ...response.body, metadata: response.metadata };
|
|
6006
|
+
}
|
|
5957
6007
|
async deleteChannels(request) {
|
|
5958
6008
|
const body = {
|
|
5959
6009
|
cids: request?.cids,
|
|
@@ -6324,6 +6374,7 @@ class ChatApi {
|
|
|
6324
6374
|
blocklists: request?.blocklists,
|
|
6325
6375
|
commands: request?.commands,
|
|
6326
6376
|
permissions: request?.permissions,
|
|
6377
|
+
chat_preferences: request?.chat_preferences,
|
|
6327
6378
|
grants: request?.grants,
|
|
6328
6379
|
};
|
|
6329
6380
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/channeltypes', undefined, undefined, body, 'application/json');
|
|
@@ -6384,6 +6435,7 @@ class ChatApi {
|
|
|
6384
6435
|
commands: request?.commands,
|
|
6385
6436
|
permissions: request?.permissions,
|
|
6386
6437
|
automod_thresholds: request?.automod_thresholds,
|
|
6438
|
+
chat_preferences: request?.chat_preferences,
|
|
6387
6439
|
grants: request?.grants,
|
|
6388
6440
|
};
|
|
6389
6441
|
const response = await this.apiClient.sendRequest('PUT', '/api/v2/chat/channeltypes/{name}', pathParams, undefined, body, 'application/json');
|
|
@@ -7260,6 +7312,14 @@ class ModerationApi {
|
|
|
7260
7312
|
decoders.CheckResponse?.(response.body);
|
|
7261
7313
|
return { ...response.body, metadata: response.metadata };
|
|
7262
7314
|
}
|
|
7315
|
+
async checkS3Access(request) {
|
|
7316
|
+
const body = {
|
|
7317
|
+
s3_url: request?.s3_url,
|
|
7318
|
+
};
|
|
7319
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/check_s3_access', undefined, undefined, body, 'application/json');
|
|
7320
|
+
decoders.CheckS3AccessResponse?.(response.body);
|
|
7321
|
+
return { ...response.body, metadata: response.metadata };
|
|
7322
|
+
}
|
|
7263
7323
|
async upsertConfig(request) {
|
|
7264
7324
|
const body = {
|
|
7265
7325
|
key: request?.key,
|
|
@@ -7579,7 +7639,7 @@ class ApiClient {
|
|
|
7579
7639
|
const headers = {
|
|
7580
7640
|
Authorization: this.apiConfig.token,
|
|
7581
7641
|
'stream-auth-type': 'jwt',
|
|
7582
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7642
|
+
'X-Stream-Client': 'stream-node-' + "0.7.45",
|
|
7583
7643
|
'Accept-Encoding': 'gzip',
|
|
7584
7644
|
'x-client-request-id': clientRequestId,
|
|
7585
7645
|
};
|
|
@@ -7731,6 +7791,16 @@ class FeedsApi {
|
|
|
7731
7791
|
decoders.DeleteActivitiesResponse?.(response.body);
|
|
7732
7792
|
return { ...response.body, metadata: response.metadata };
|
|
7733
7793
|
}
|
|
7794
|
+
async trackActivityMetrics(request) {
|
|
7795
|
+
const body = {
|
|
7796
|
+
events: request?.events,
|
|
7797
|
+
user_id: request?.user_id,
|
|
7798
|
+
user: request?.user,
|
|
7799
|
+
};
|
|
7800
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/activities/metrics/track', undefined, undefined, body, 'application/json');
|
|
7801
|
+
decoders.TrackActivityMetricsResponse?.(response.body);
|
|
7802
|
+
return { ...response.body, metadata: response.metadata };
|
|
7803
|
+
}
|
|
7734
7804
|
async queryActivities(request) {
|
|
7735
7805
|
const body = {
|
|
7736
7806
|
enrich_own_fields: request?.enrich_own_fields,
|
|
@@ -8056,6 +8126,20 @@ class FeedsApi {
|
|
|
8056
8126
|
decoders.UpsertCollectionsResponse?.(response.body);
|
|
8057
8127
|
return { ...response.body, metadata: response.metadata };
|
|
8058
8128
|
}
|
|
8129
|
+
async queryCollections(request) {
|
|
8130
|
+
const body = {
|
|
8131
|
+
limit: request?.limit,
|
|
8132
|
+
next: request?.next,
|
|
8133
|
+
prev: request?.prev,
|
|
8134
|
+
user_id: request?.user_id,
|
|
8135
|
+
sort: request?.sort,
|
|
8136
|
+
filter: request?.filter,
|
|
8137
|
+
user: request?.user,
|
|
8138
|
+
};
|
|
8139
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/collections/query', undefined, undefined, body, 'application/json');
|
|
8140
|
+
decoders.QueryCollectionsResponse?.(response.body);
|
|
8141
|
+
return { ...response.body, metadata: response.metadata };
|
|
8142
|
+
}
|
|
8059
8143
|
async getComments(request) {
|
|
8060
8144
|
const queryParams = {
|
|
8061
8145
|
object_id: request?.object_id,
|
|
@@ -8104,10 +8188,13 @@ class FeedsApi {
|
|
|
8104
8188
|
async queryComments(request) {
|
|
8105
8189
|
const body = {
|
|
8106
8190
|
filter: request?.filter,
|
|
8191
|
+
id_around: request?.id_around,
|
|
8107
8192
|
limit: request?.limit,
|
|
8108
8193
|
next: request?.next,
|
|
8109
8194
|
prev: request?.prev,
|
|
8110
8195
|
sort: request?.sort,
|
|
8196
|
+
user_id: request?.user_id,
|
|
8197
|
+
user: request?.user,
|
|
8111
8198
|
};
|
|
8112
8199
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/comments/query', undefined, undefined, body, 'application/json');
|
|
8113
8200
|
decoders.QueryCommentsResponse?.(response.body);
|
|
@@ -8216,6 +8303,18 @@ class FeedsApi {
|
|
|
8216
8303
|
decoders.GetCommentRepliesResponse?.(response.body);
|
|
8217
8304
|
return { ...response.body, metadata: response.metadata };
|
|
8218
8305
|
}
|
|
8306
|
+
async restoreComment(request) {
|
|
8307
|
+
const pathParams = {
|
|
8308
|
+
id: request?.id,
|
|
8309
|
+
};
|
|
8310
|
+
const body = {
|
|
8311
|
+
user_id: request?.user_id,
|
|
8312
|
+
user: request?.user,
|
|
8313
|
+
};
|
|
8314
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/comments/{id}/restore', pathParams, undefined, body, 'application/json');
|
|
8315
|
+
decoders.RestoreCommentResponse?.(response.body);
|
|
8316
|
+
return { ...response.body, metadata: response.metadata };
|
|
8317
|
+
}
|
|
8219
8318
|
async listFeedGroups(request) {
|
|
8220
8319
|
const queryParams = {
|
|
8221
8320
|
include_soft_deleted: request?.include_soft_deleted,
|