@stream-io/node-sdk 0.7.25 → 0.7.27
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 +87 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +87 -4
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/StreamFeedsClient.d.ts +9 -1
- package/dist/src/gen/feeds/FeedsApi.d.ts +5 -2
- package/dist/src/gen/models/index.d.ts +107 -3
- package/dist/src/gen/video/VideoApi.d.ts +11 -1
- package/package.json +1 -1
- package/src/StreamFeedsClient.ts +20 -1
- package/src/gen/feeds/FeedsApi.ts +82 -8
- package/src/gen/model-decoders/decoders.ts +39 -0
- package/src/gen/models/index.ts +183 -3
- package/src/gen/video/VideoApi.ts +38 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1583,12 +1583,21 @@ decoders.FeedMemberUpdatedEvent = (input) => {
|
|
|
1583
1583
|
};
|
|
1584
1584
|
return decode(typeMappings, input);
|
|
1585
1585
|
};
|
|
1586
|
+
decoders.FeedOwnData = (input) => {
|
|
1587
|
+
const typeMappings = {
|
|
1588
|
+
own_followings: { type: 'FollowResponse', isSingle: false },
|
|
1589
|
+
own_follows: { type: 'FollowResponse', isSingle: false },
|
|
1590
|
+
own_membership: { type: 'FeedMemberResponse', isSingle: true },
|
|
1591
|
+
};
|
|
1592
|
+
return decode(typeMappings, input);
|
|
1593
|
+
};
|
|
1586
1594
|
decoders.FeedResponse = (input) => {
|
|
1587
1595
|
const typeMappings = {
|
|
1588
1596
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1589
1597
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1590
1598
|
created_by: { type: 'UserResponse', isSingle: true },
|
|
1591
1599
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
1600
|
+
own_followings: { type: 'FollowResponse', isSingle: false },
|
|
1592
1601
|
own_follows: { type: 'FollowResponse', isSingle: false },
|
|
1593
1602
|
own_membership: { type: 'FeedMemberResponse', isSingle: true },
|
|
1594
1603
|
};
|
|
@@ -1600,6 +1609,7 @@ decoders.FeedSuggestionResponse = (input) => {
|
|
|
1600
1609
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1601
1610
|
created_by: { type: 'UserResponse', isSingle: true },
|
|
1602
1611
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
1612
|
+
own_followings: { type: 'FollowResponse', isSingle: false },
|
|
1603
1613
|
own_follows: { type: 'FollowResponse', isSingle: false },
|
|
1604
1614
|
own_membership: { type: 'FeedMemberResponse', isSingle: true },
|
|
1605
1615
|
};
|
|
@@ -1656,6 +1666,7 @@ decoders.FlagUpdatedEvent = (input) => {
|
|
|
1656
1666
|
};
|
|
1657
1667
|
decoders.FollowBatchResponse = (input) => {
|
|
1658
1668
|
const typeMappings = {
|
|
1669
|
+
created: { type: 'FollowResponse', isSingle: false },
|
|
1659
1670
|
follows: { type: 'FollowResponse', isSingle: false },
|
|
1660
1671
|
};
|
|
1661
1672
|
return decode(typeMappings, input);
|
|
@@ -2369,6 +2380,12 @@ decoders.NotificationStatusResponse = (input) => {
|
|
|
2369
2380
|
};
|
|
2370
2381
|
return decode(typeMappings, input);
|
|
2371
2382
|
};
|
|
2383
|
+
decoders.OwnBatchResponse = (input) => {
|
|
2384
|
+
const typeMappings = {
|
|
2385
|
+
data: { type: 'FeedOwnData', isSingle: false },
|
|
2386
|
+
};
|
|
2387
|
+
return decode(typeMappings, input);
|
|
2388
|
+
};
|
|
2372
2389
|
decoders.OwnUser = (input) => {
|
|
2373
2390
|
const typeMappings = {
|
|
2374
2391
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2610,6 +2627,16 @@ decoders.QueryCallSessionParticipantStatsTimelineResponse = (input) => {
|
|
|
2610
2627
|
};
|
|
2611
2628
|
return decode(typeMappings, input);
|
|
2612
2629
|
};
|
|
2630
|
+
decoders.QueryCallStatsMapResponse = (input) => {
|
|
2631
|
+
const typeMappings = {
|
|
2632
|
+
call_ended_at: { type: 'DatetimeType', isSingle: true },
|
|
2633
|
+
call_started_at: { type: 'DatetimeType', isSingle: true },
|
|
2634
|
+
end_time: { type: 'DatetimeType', isSingle: true },
|
|
2635
|
+
generated_at: { type: 'DatetimeType', isSingle: true },
|
|
2636
|
+
start_time: { type: 'DatetimeType', isSingle: true },
|
|
2637
|
+
};
|
|
2638
|
+
return decode(typeMappings, input);
|
|
2639
|
+
};
|
|
2613
2640
|
decoders.QueryCallStatsResponse = (input) => {
|
|
2614
2641
|
const typeMappings = {
|
|
2615
2642
|
reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },
|
|
@@ -4903,6 +4930,23 @@ class VideoApi {
|
|
|
4903
4930
|
decoders.DeleteTranscriptionResponse?.(response.body);
|
|
4904
4931
|
return { ...response.body, metadata: response.metadata };
|
|
4905
4932
|
}
|
|
4933
|
+
async getCallStatsMap(request) {
|
|
4934
|
+
const queryParams = {
|
|
4935
|
+
start_time: request?.start_time,
|
|
4936
|
+
end_time: request?.end_time,
|
|
4937
|
+
exclude_publishers: request?.exclude_publishers,
|
|
4938
|
+
exclude_subscribers: request?.exclude_subscribers,
|
|
4939
|
+
exclude_sfus: request?.exclude_sfus,
|
|
4940
|
+
};
|
|
4941
|
+
const pathParams = {
|
|
4942
|
+
call_type: request?.call_type,
|
|
4943
|
+
call_id: request?.call_id,
|
|
4944
|
+
session: request?.session,
|
|
4945
|
+
};
|
|
4946
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/map', pathParams, queryParams);
|
|
4947
|
+
decoders.QueryCallStatsMapResponse?.(response.body);
|
|
4948
|
+
return { ...response.body, metadata: response.metadata };
|
|
4949
|
+
}
|
|
4906
4950
|
async getCallSessionParticipantStatsDetails(request) {
|
|
4907
4951
|
const queryParams = {
|
|
4908
4952
|
since: request?.since,
|
|
@@ -7058,7 +7102,7 @@ class ApiClient {
|
|
|
7058
7102
|
const headers = {
|
|
7059
7103
|
Authorization: this.apiConfig.token,
|
|
7060
7104
|
'stream-auth-type': 'jwt',
|
|
7061
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7105
|
+
'X-Stream-Client': 'stream-node-' + "0.7.27",
|
|
7062
7106
|
'Accept-Encoding': 'gzip',
|
|
7063
7107
|
'x-client-request-id': clientRequestId,
|
|
7064
7108
|
};
|
|
@@ -7690,6 +7734,7 @@ class FeedsApi {
|
|
|
7690
7734
|
view: request?.view,
|
|
7691
7735
|
watch: request?.watch,
|
|
7692
7736
|
data: request?.data,
|
|
7737
|
+
enrichment_options: request?.enrichment_options,
|
|
7693
7738
|
external_ranking: request?.external_ranking,
|
|
7694
7739
|
filter: request?.filter,
|
|
7695
7740
|
followers_pagination: request?.followers_pagination,
|
|
@@ -7980,14 +8025,24 @@ class FeedsApi {
|
|
|
7980
8025
|
decoders.CreateFeedsBatchResponse?.(response.body);
|
|
7981
8026
|
return { ...response.body, metadata: response.metadata };
|
|
7982
8027
|
}
|
|
7983
|
-
async
|
|
8028
|
+
async deleteFeedsBatch(request) {
|
|
8029
|
+
const body = {
|
|
8030
|
+
feeds: request?.feeds,
|
|
8031
|
+
hard_delete: request?.hard_delete,
|
|
8032
|
+
};
|
|
8033
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/delete', undefined, undefined, body, 'application/json');
|
|
8034
|
+
decoders.DeleteFeedsBatchResponse?.(response.body);
|
|
8035
|
+
return { ...response.body, metadata: response.metadata };
|
|
8036
|
+
}
|
|
8037
|
+
async ownBatch(request) {
|
|
7984
8038
|
const body = {
|
|
7985
8039
|
feeds: request?.feeds,
|
|
7986
8040
|
user_id: request?.user_id,
|
|
8041
|
+
fields: request?.fields,
|
|
7987
8042
|
user: request?.user,
|
|
7988
8043
|
};
|
|
7989
|
-
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/
|
|
7990
|
-
decoders.
|
|
8044
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/own/batch', undefined, undefined, body, 'application/json');
|
|
8045
|
+
decoders.OwnBatchResponse?.(response.body);
|
|
7991
8046
|
return { ...response.body, metadata: response.metadata };
|
|
7992
8047
|
}
|
|
7993
8048
|
async _queryFeeds(request) {
|
|
@@ -8060,6 +8115,14 @@ class FeedsApi {
|
|
|
8060
8115
|
decoders.FollowBatchResponse?.(response.body);
|
|
8061
8116
|
return { ...response.body, metadata: response.metadata };
|
|
8062
8117
|
}
|
|
8118
|
+
async getOrCreateFollows(request) {
|
|
8119
|
+
const body = {
|
|
8120
|
+
follows: request?.follows,
|
|
8121
|
+
};
|
|
8122
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/follows/batch/upsert', undefined, undefined, body, 'application/json');
|
|
8123
|
+
decoders.FollowBatchResponse?.(response.body);
|
|
8124
|
+
return { ...response.body, metadata: response.metadata };
|
|
8125
|
+
}
|
|
8063
8126
|
async queryFollows(request) {
|
|
8064
8127
|
const body = {
|
|
8065
8128
|
limit: request?.limit,
|
|
@@ -8155,6 +8218,14 @@ class FeedsApi {
|
|
|
8155
8218
|
decoders.UnfollowBatchResponse?.(response.body);
|
|
8156
8219
|
return { ...response.body, metadata: response.metadata };
|
|
8157
8220
|
}
|
|
8221
|
+
async getOrCreateUnfollows(request) {
|
|
8222
|
+
const body = {
|
|
8223
|
+
follows: request?.follows,
|
|
8224
|
+
};
|
|
8225
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/unfollow/batch/upsert', undefined, undefined, body, 'application/json');
|
|
8226
|
+
decoders.UnfollowBatchResponse?.(response.body);
|
|
8227
|
+
return { ...response.body, metadata: response.metadata };
|
|
8228
|
+
}
|
|
8158
8229
|
async deleteFeedUserData(request) {
|
|
8159
8230
|
const pathParams = {
|
|
8160
8231
|
user_id: request?.user_id,
|
|
@@ -8275,6 +8346,18 @@ class StreamFeedsClient extends FeedsApi {
|
|
|
8275
8346
|
this.addReaction = (request) => {
|
|
8276
8347
|
return super.addActivityReaction(request);
|
|
8277
8348
|
};
|
|
8349
|
+
/**
|
|
8350
|
+
* @deprecated use `getOrCreateFollows` instead
|
|
8351
|
+
*/
|
|
8352
|
+
this.followBatch = (request) => {
|
|
8353
|
+
return super.followBatch(request);
|
|
8354
|
+
};
|
|
8355
|
+
/**
|
|
8356
|
+
* @deprecated use `getOrCreateUnfollows` instead
|
|
8357
|
+
*/
|
|
8358
|
+
this.followUnbatch = (request) => {
|
|
8359
|
+
return super.unfollowBatch(request);
|
|
8360
|
+
};
|
|
8278
8361
|
}
|
|
8279
8362
|
}
|
|
8280
8363
|
|