@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.es.mjs
CHANGED
|
@@ -1564,12 +1564,21 @@ decoders.FeedMemberUpdatedEvent = (input) => {
|
|
|
1564
1564
|
};
|
|
1565
1565
|
return decode(typeMappings, input);
|
|
1566
1566
|
};
|
|
1567
|
+
decoders.FeedOwnData = (input) => {
|
|
1568
|
+
const typeMappings = {
|
|
1569
|
+
own_followings: { type: 'FollowResponse', isSingle: false },
|
|
1570
|
+
own_follows: { type: 'FollowResponse', isSingle: false },
|
|
1571
|
+
own_membership: { type: 'FeedMemberResponse', isSingle: true },
|
|
1572
|
+
};
|
|
1573
|
+
return decode(typeMappings, input);
|
|
1574
|
+
};
|
|
1567
1575
|
decoders.FeedResponse = (input) => {
|
|
1568
1576
|
const typeMappings = {
|
|
1569
1577
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1570
1578
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1571
1579
|
created_by: { type: 'UserResponse', isSingle: true },
|
|
1572
1580
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
1581
|
+
own_followings: { type: 'FollowResponse', isSingle: false },
|
|
1573
1582
|
own_follows: { type: 'FollowResponse', isSingle: false },
|
|
1574
1583
|
own_membership: { type: 'FeedMemberResponse', isSingle: true },
|
|
1575
1584
|
};
|
|
@@ -1581,6 +1590,7 @@ decoders.FeedSuggestionResponse = (input) => {
|
|
|
1581
1590
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1582
1591
|
created_by: { type: 'UserResponse', isSingle: true },
|
|
1583
1592
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
1593
|
+
own_followings: { type: 'FollowResponse', isSingle: false },
|
|
1584
1594
|
own_follows: { type: 'FollowResponse', isSingle: false },
|
|
1585
1595
|
own_membership: { type: 'FeedMemberResponse', isSingle: true },
|
|
1586
1596
|
};
|
|
@@ -1637,6 +1647,7 @@ decoders.FlagUpdatedEvent = (input) => {
|
|
|
1637
1647
|
};
|
|
1638
1648
|
decoders.FollowBatchResponse = (input) => {
|
|
1639
1649
|
const typeMappings = {
|
|
1650
|
+
created: { type: 'FollowResponse', isSingle: false },
|
|
1640
1651
|
follows: { type: 'FollowResponse', isSingle: false },
|
|
1641
1652
|
};
|
|
1642
1653
|
return decode(typeMappings, input);
|
|
@@ -2350,6 +2361,12 @@ decoders.NotificationStatusResponse = (input) => {
|
|
|
2350
2361
|
};
|
|
2351
2362
|
return decode(typeMappings, input);
|
|
2352
2363
|
};
|
|
2364
|
+
decoders.OwnBatchResponse = (input) => {
|
|
2365
|
+
const typeMappings = {
|
|
2366
|
+
data: { type: 'FeedOwnData', isSingle: false },
|
|
2367
|
+
};
|
|
2368
|
+
return decode(typeMappings, input);
|
|
2369
|
+
};
|
|
2353
2370
|
decoders.OwnUser = (input) => {
|
|
2354
2371
|
const typeMappings = {
|
|
2355
2372
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2591,6 +2608,16 @@ decoders.QueryCallSessionParticipantStatsTimelineResponse = (input) => {
|
|
|
2591
2608
|
};
|
|
2592
2609
|
return decode(typeMappings, input);
|
|
2593
2610
|
};
|
|
2611
|
+
decoders.QueryCallStatsMapResponse = (input) => {
|
|
2612
|
+
const typeMappings = {
|
|
2613
|
+
call_ended_at: { type: 'DatetimeType', isSingle: true },
|
|
2614
|
+
call_started_at: { type: 'DatetimeType', isSingle: true },
|
|
2615
|
+
end_time: { type: 'DatetimeType', isSingle: true },
|
|
2616
|
+
generated_at: { type: 'DatetimeType', isSingle: true },
|
|
2617
|
+
start_time: { type: 'DatetimeType', isSingle: true },
|
|
2618
|
+
};
|
|
2619
|
+
return decode(typeMappings, input);
|
|
2620
|
+
};
|
|
2594
2621
|
decoders.QueryCallStatsResponse = (input) => {
|
|
2595
2622
|
const typeMappings = {
|
|
2596
2623
|
reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },
|
|
@@ -4884,6 +4911,23 @@ class VideoApi {
|
|
|
4884
4911
|
decoders.DeleteTranscriptionResponse?.(response.body);
|
|
4885
4912
|
return { ...response.body, metadata: response.metadata };
|
|
4886
4913
|
}
|
|
4914
|
+
async getCallStatsMap(request) {
|
|
4915
|
+
const queryParams = {
|
|
4916
|
+
start_time: request?.start_time,
|
|
4917
|
+
end_time: request?.end_time,
|
|
4918
|
+
exclude_publishers: request?.exclude_publishers,
|
|
4919
|
+
exclude_subscribers: request?.exclude_subscribers,
|
|
4920
|
+
exclude_sfus: request?.exclude_sfus,
|
|
4921
|
+
};
|
|
4922
|
+
const pathParams = {
|
|
4923
|
+
call_type: request?.call_type,
|
|
4924
|
+
call_id: request?.call_id,
|
|
4925
|
+
session: request?.session,
|
|
4926
|
+
};
|
|
4927
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/map', pathParams, queryParams);
|
|
4928
|
+
decoders.QueryCallStatsMapResponse?.(response.body);
|
|
4929
|
+
return { ...response.body, metadata: response.metadata };
|
|
4930
|
+
}
|
|
4887
4931
|
async getCallSessionParticipantStatsDetails(request) {
|
|
4888
4932
|
const queryParams = {
|
|
4889
4933
|
since: request?.since,
|
|
@@ -7039,7 +7083,7 @@ class ApiClient {
|
|
|
7039
7083
|
const headers = {
|
|
7040
7084
|
Authorization: this.apiConfig.token,
|
|
7041
7085
|
'stream-auth-type': 'jwt',
|
|
7042
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7086
|
+
'X-Stream-Client': 'stream-node-' + "0.7.27",
|
|
7043
7087
|
'Accept-Encoding': 'gzip',
|
|
7044
7088
|
'x-client-request-id': clientRequestId,
|
|
7045
7089
|
};
|
|
@@ -7671,6 +7715,7 @@ class FeedsApi {
|
|
|
7671
7715
|
view: request?.view,
|
|
7672
7716
|
watch: request?.watch,
|
|
7673
7717
|
data: request?.data,
|
|
7718
|
+
enrichment_options: request?.enrichment_options,
|
|
7674
7719
|
external_ranking: request?.external_ranking,
|
|
7675
7720
|
filter: request?.filter,
|
|
7676
7721
|
followers_pagination: request?.followers_pagination,
|
|
@@ -7961,14 +8006,24 @@ class FeedsApi {
|
|
|
7961
8006
|
decoders.CreateFeedsBatchResponse?.(response.body);
|
|
7962
8007
|
return { ...response.body, metadata: response.metadata };
|
|
7963
8008
|
}
|
|
7964
|
-
async
|
|
8009
|
+
async deleteFeedsBatch(request) {
|
|
8010
|
+
const body = {
|
|
8011
|
+
feeds: request?.feeds,
|
|
8012
|
+
hard_delete: request?.hard_delete,
|
|
8013
|
+
};
|
|
8014
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/delete', undefined, undefined, body, 'application/json');
|
|
8015
|
+
decoders.DeleteFeedsBatchResponse?.(response.body);
|
|
8016
|
+
return { ...response.body, metadata: response.metadata };
|
|
8017
|
+
}
|
|
8018
|
+
async ownBatch(request) {
|
|
7965
8019
|
const body = {
|
|
7966
8020
|
feeds: request?.feeds,
|
|
7967
8021
|
user_id: request?.user_id,
|
|
8022
|
+
fields: request?.fields,
|
|
7968
8023
|
user: request?.user,
|
|
7969
8024
|
};
|
|
7970
|
-
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/
|
|
7971
|
-
decoders.
|
|
8025
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/own/batch', undefined, undefined, body, 'application/json');
|
|
8026
|
+
decoders.OwnBatchResponse?.(response.body);
|
|
7972
8027
|
return { ...response.body, metadata: response.metadata };
|
|
7973
8028
|
}
|
|
7974
8029
|
async _queryFeeds(request) {
|
|
@@ -8041,6 +8096,14 @@ class FeedsApi {
|
|
|
8041
8096
|
decoders.FollowBatchResponse?.(response.body);
|
|
8042
8097
|
return { ...response.body, metadata: response.metadata };
|
|
8043
8098
|
}
|
|
8099
|
+
async getOrCreateFollows(request) {
|
|
8100
|
+
const body = {
|
|
8101
|
+
follows: request?.follows,
|
|
8102
|
+
};
|
|
8103
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/follows/batch/upsert', undefined, undefined, body, 'application/json');
|
|
8104
|
+
decoders.FollowBatchResponse?.(response.body);
|
|
8105
|
+
return { ...response.body, metadata: response.metadata };
|
|
8106
|
+
}
|
|
8044
8107
|
async queryFollows(request) {
|
|
8045
8108
|
const body = {
|
|
8046
8109
|
limit: request?.limit,
|
|
@@ -8136,6 +8199,14 @@ class FeedsApi {
|
|
|
8136
8199
|
decoders.UnfollowBatchResponse?.(response.body);
|
|
8137
8200
|
return { ...response.body, metadata: response.metadata };
|
|
8138
8201
|
}
|
|
8202
|
+
async getOrCreateUnfollows(request) {
|
|
8203
|
+
const body = {
|
|
8204
|
+
follows: request?.follows,
|
|
8205
|
+
};
|
|
8206
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/unfollow/batch/upsert', undefined, undefined, body, 'application/json');
|
|
8207
|
+
decoders.UnfollowBatchResponse?.(response.body);
|
|
8208
|
+
return { ...response.body, metadata: response.metadata };
|
|
8209
|
+
}
|
|
8139
8210
|
async deleteFeedUserData(request) {
|
|
8140
8211
|
const pathParams = {
|
|
8141
8212
|
user_id: request?.user_id,
|
|
@@ -8256,6 +8327,18 @@ class StreamFeedsClient extends FeedsApi {
|
|
|
8256
8327
|
this.addReaction = (request) => {
|
|
8257
8328
|
return super.addActivityReaction(request);
|
|
8258
8329
|
};
|
|
8330
|
+
/**
|
|
8331
|
+
* @deprecated use `getOrCreateFollows` instead
|
|
8332
|
+
*/
|
|
8333
|
+
this.followBatch = (request) => {
|
|
8334
|
+
return super.followBatch(request);
|
|
8335
|
+
};
|
|
8336
|
+
/**
|
|
8337
|
+
* @deprecated use `getOrCreateUnfollows` instead
|
|
8338
|
+
*/
|
|
8339
|
+
this.followUnbatch = (request) => {
|
|
8340
|
+
return super.unfollowBatch(request);
|
|
8341
|
+
};
|
|
8259
8342
|
}
|
|
8260
8343
|
}
|
|
8261
8344
|
|