@stream-io/node-sdk 0.7.25 → 0.7.26
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 +84 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +84 -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 +103 -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 +33 -0
- package/src/gen/models/index.ts +175 -3
- package/src/gen/video/VideoApi.ts +38 -0
package/dist/index.es.mjs
CHANGED
|
@@ -1564,6 +1564,13 @@ decoders.FeedMemberUpdatedEvent = (input) => {
|
|
|
1564
1564
|
};
|
|
1565
1565
|
return decode(typeMappings, input);
|
|
1566
1566
|
};
|
|
1567
|
+
decoders.FeedOwnData = (input) => {
|
|
1568
|
+
const typeMappings = {
|
|
1569
|
+
own_follows: { type: 'FollowResponse', isSingle: false },
|
|
1570
|
+
own_membership: { type: 'FeedMemberResponse', isSingle: true },
|
|
1571
|
+
};
|
|
1572
|
+
return decode(typeMappings, input);
|
|
1573
|
+
};
|
|
1567
1574
|
decoders.FeedResponse = (input) => {
|
|
1568
1575
|
const typeMappings = {
|
|
1569
1576
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1637,6 +1644,7 @@ decoders.FlagUpdatedEvent = (input) => {
|
|
|
1637
1644
|
};
|
|
1638
1645
|
decoders.FollowBatchResponse = (input) => {
|
|
1639
1646
|
const typeMappings = {
|
|
1647
|
+
created: { type: 'FollowResponse', isSingle: false },
|
|
1640
1648
|
follows: { type: 'FollowResponse', isSingle: false },
|
|
1641
1649
|
};
|
|
1642
1650
|
return decode(typeMappings, input);
|
|
@@ -2350,6 +2358,12 @@ decoders.NotificationStatusResponse = (input) => {
|
|
|
2350
2358
|
};
|
|
2351
2359
|
return decode(typeMappings, input);
|
|
2352
2360
|
};
|
|
2361
|
+
decoders.OwnBatchResponse = (input) => {
|
|
2362
|
+
const typeMappings = {
|
|
2363
|
+
data: { type: 'FeedOwnData', isSingle: false },
|
|
2364
|
+
};
|
|
2365
|
+
return decode(typeMappings, input);
|
|
2366
|
+
};
|
|
2353
2367
|
decoders.OwnUser = (input) => {
|
|
2354
2368
|
const typeMappings = {
|
|
2355
2369
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2591,6 +2605,16 @@ decoders.QueryCallSessionParticipantStatsTimelineResponse = (input) => {
|
|
|
2591
2605
|
};
|
|
2592
2606
|
return decode(typeMappings, input);
|
|
2593
2607
|
};
|
|
2608
|
+
decoders.QueryCallStatsMapResponse = (input) => {
|
|
2609
|
+
const typeMappings = {
|
|
2610
|
+
call_ended_at: { type: 'DatetimeType', isSingle: true },
|
|
2611
|
+
call_started_at: { type: 'DatetimeType', isSingle: true },
|
|
2612
|
+
end_time: { type: 'DatetimeType', isSingle: true },
|
|
2613
|
+
generated_at: { type: 'DatetimeType', isSingle: true },
|
|
2614
|
+
start_time: { type: 'DatetimeType', isSingle: true },
|
|
2615
|
+
};
|
|
2616
|
+
return decode(typeMappings, input);
|
|
2617
|
+
};
|
|
2594
2618
|
decoders.QueryCallStatsResponse = (input) => {
|
|
2595
2619
|
const typeMappings = {
|
|
2596
2620
|
reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },
|
|
@@ -4884,6 +4908,23 @@ class VideoApi {
|
|
|
4884
4908
|
decoders.DeleteTranscriptionResponse?.(response.body);
|
|
4885
4909
|
return { ...response.body, metadata: response.metadata };
|
|
4886
4910
|
}
|
|
4911
|
+
async getCallStatsMap(request) {
|
|
4912
|
+
const queryParams = {
|
|
4913
|
+
start_time: request?.start_time,
|
|
4914
|
+
end_time: request?.end_time,
|
|
4915
|
+
exclude_publishers: request?.exclude_publishers,
|
|
4916
|
+
exclude_subscribers: request?.exclude_subscribers,
|
|
4917
|
+
exclude_sfus: request?.exclude_sfus,
|
|
4918
|
+
};
|
|
4919
|
+
const pathParams = {
|
|
4920
|
+
call_type: request?.call_type,
|
|
4921
|
+
call_id: request?.call_id,
|
|
4922
|
+
session: request?.session,
|
|
4923
|
+
};
|
|
4924
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/map', pathParams, queryParams);
|
|
4925
|
+
decoders.QueryCallStatsMapResponse?.(response.body);
|
|
4926
|
+
return { ...response.body, metadata: response.metadata };
|
|
4927
|
+
}
|
|
4887
4928
|
async getCallSessionParticipantStatsDetails(request) {
|
|
4888
4929
|
const queryParams = {
|
|
4889
4930
|
since: request?.since,
|
|
@@ -7039,7 +7080,7 @@ class ApiClient {
|
|
|
7039
7080
|
const headers = {
|
|
7040
7081
|
Authorization: this.apiConfig.token,
|
|
7041
7082
|
'stream-auth-type': 'jwt',
|
|
7042
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7083
|
+
'X-Stream-Client': 'stream-node-' + "0.7.26",
|
|
7043
7084
|
'Accept-Encoding': 'gzip',
|
|
7044
7085
|
'x-client-request-id': clientRequestId,
|
|
7045
7086
|
};
|
|
@@ -7671,6 +7712,7 @@ class FeedsApi {
|
|
|
7671
7712
|
view: request?.view,
|
|
7672
7713
|
watch: request?.watch,
|
|
7673
7714
|
data: request?.data,
|
|
7715
|
+
enrichment_options: request?.enrichment_options,
|
|
7674
7716
|
external_ranking: request?.external_ranking,
|
|
7675
7717
|
filter: request?.filter,
|
|
7676
7718
|
followers_pagination: request?.followers_pagination,
|
|
@@ -7961,14 +8003,24 @@ class FeedsApi {
|
|
|
7961
8003
|
decoders.CreateFeedsBatchResponse?.(response.body);
|
|
7962
8004
|
return { ...response.body, metadata: response.metadata };
|
|
7963
8005
|
}
|
|
7964
|
-
async
|
|
8006
|
+
async deleteFeedsBatch(request) {
|
|
8007
|
+
const body = {
|
|
8008
|
+
feeds: request?.feeds,
|
|
8009
|
+
hard_delete: request?.hard_delete,
|
|
8010
|
+
};
|
|
8011
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/delete', undefined, undefined, body, 'application/json');
|
|
8012
|
+
decoders.DeleteFeedsBatchResponse?.(response.body);
|
|
8013
|
+
return { ...response.body, metadata: response.metadata };
|
|
8014
|
+
}
|
|
8015
|
+
async ownBatch(request) {
|
|
7965
8016
|
const body = {
|
|
7966
8017
|
feeds: request?.feeds,
|
|
7967
8018
|
user_id: request?.user_id,
|
|
8019
|
+
fields: request?.fields,
|
|
7968
8020
|
user: request?.user,
|
|
7969
8021
|
};
|
|
7970
|
-
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/
|
|
7971
|
-
decoders.
|
|
8022
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/own/batch', undefined, undefined, body, 'application/json');
|
|
8023
|
+
decoders.OwnBatchResponse?.(response.body);
|
|
7972
8024
|
return { ...response.body, metadata: response.metadata };
|
|
7973
8025
|
}
|
|
7974
8026
|
async _queryFeeds(request) {
|
|
@@ -8041,6 +8093,14 @@ class FeedsApi {
|
|
|
8041
8093
|
decoders.FollowBatchResponse?.(response.body);
|
|
8042
8094
|
return { ...response.body, metadata: response.metadata };
|
|
8043
8095
|
}
|
|
8096
|
+
async getOrCreateFollows(request) {
|
|
8097
|
+
const body = {
|
|
8098
|
+
follows: request?.follows,
|
|
8099
|
+
};
|
|
8100
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/follows/batch/upsert', undefined, undefined, body, 'application/json');
|
|
8101
|
+
decoders.FollowBatchResponse?.(response.body);
|
|
8102
|
+
return { ...response.body, metadata: response.metadata };
|
|
8103
|
+
}
|
|
8044
8104
|
async queryFollows(request) {
|
|
8045
8105
|
const body = {
|
|
8046
8106
|
limit: request?.limit,
|
|
@@ -8136,6 +8196,14 @@ class FeedsApi {
|
|
|
8136
8196
|
decoders.UnfollowBatchResponse?.(response.body);
|
|
8137
8197
|
return { ...response.body, metadata: response.metadata };
|
|
8138
8198
|
}
|
|
8199
|
+
async getOrCreateUnfollows(request) {
|
|
8200
|
+
const body = {
|
|
8201
|
+
follows: request?.follows,
|
|
8202
|
+
};
|
|
8203
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/unfollow/batch/upsert', undefined, undefined, body, 'application/json');
|
|
8204
|
+
decoders.UnfollowBatchResponse?.(response.body);
|
|
8205
|
+
return { ...response.body, metadata: response.metadata };
|
|
8206
|
+
}
|
|
8139
8207
|
async deleteFeedUserData(request) {
|
|
8140
8208
|
const pathParams = {
|
|
8141
8209
|
user_id: request?.user_id,
|
|
@@ -8256,6 +8324,18 @@ class StreamFeedsClient extends FeedsApi {
|
|
|
8256
8324
|
this.addReaction = (request) => {
|
|
8257
8325
|
return super.addActivityReaction(request);
|
|
8258
8326
|
};
|
|
8327
|
+
/**
|
|
8328
|
+
* @deprecated use `getOrCreateFollows` instead
|
|
8329
|
+
*/
|
|
8330
|
+
this.followBatch = (request) => {
|
|
8331
|
+
return super.followBatch(request);
|
|
8332
|
+
};
|
|
8333
|
+
/**
|
|
8334
|
+
* @deprecated use `getOrCreateUnfollows` instead
|
|
8335
|
+
*/
|
|
8336
|
+
this.followUnbatch = (request) => {
|
|
8337
|
+
return super.unfollowBatch(request);
|
|
8338
|
+
};
|
|
8259
8339
|
}
|
|
8260
8340
|
}
|
|
8261
8341
|
|