@stream-io/node-sdk 0.7.11 → 0.7.13
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 +128 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +128 -25
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/StreamClient.d.ts +2 -4
- package/dist/src/gen/chat/ChannelApi.d.ts +5 -5
- package/dist/src/gen/chat/ChatApi.d.ts +7 -13
- package/dist/src/gen/feeds/FeedsApi.d.ts +9 -1
- package/dist/src/gen/models/index.d.ts +244 -291
- package/dist/src/gen/video/VideoApi.d.ts +28 -1
- package/dist/src/types.d.ts +0 -1
- package/dist/src/utils/rate-limit.d.ts +0 -1
- package/package.json +1 -1
- package/src/gen/chat/ChannelApi.ts +20 -16
- package/src/gen/chat/ChatApi.ts +19 -28
- package/src/gen/common/CommonApi.ts +4 -0
- package/src/gen/feeds/FeedsApi.ts +53 -0
- package/src/gen/model-decoders/decoders.ts +46 -4
- package/src/gen/models/index.ts +434 -533
- package/src/gen/video/VideoApi.ts +111 -0
package/dist/index.cjs.js
CHANGED
|
@@ -620,6 +620,12 @@ decoders.CallParticipantResponse = (input) => {
|
|
|
620
620
|
};
|
|
621
621
|
return decode(typeMappings, input);
|
|
622
622
|
};
|
|
623
|
+
decoders.CallParticipantTimeline = (input) => {
|
|
624
|
+
const typeMappings = {
|
|
625
|
+
timestamp: { type: 'DatetimeType', isSingle: true },
|
|
626
|
+
};
|
|
627
|
+
return decode(typeMappings, input);
|
|
628
|
+
};
|
|
623
629
|
decoders.CallReactionEvent = (input) => {
|
|
624
630
|
const typeMappings = {
|
|
625
631
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -767,6 +773,20 @@ decoders.CallStateResponseFields = (input) => {
|
|
|
767
773
|
};
|
|
768
774
|
return decode(typeMappings, input);
|
|
769
775
|
};
|
|
776
|
+
decoders.CallStatsParticipant = (input) => {
|
|
777
|
+
const typeMappings = {
|
|
778
|
+
sessions: { type: 'CallStatsParticipantSession', isSingle: false },
|
|
779
|
+
latest_activity_at: { type: 'DatetimeType', isSingle: true },
|
|
780
|
+
};
|
|
781
|
+
return decode(typeMappings, input);
|
|
782
|
+
};
|
|
783
|
+
decoders.CallStatsParticipantSession = (input) => {
|
|
784
|
+
const typeMappings = {
|
|
785
|
+
ended_at: { type: 'DatetimeType', isSingle: true },
|
|
786
|
+
started_at: { type: 'DatetimeType', isSingle: true },
|
|
787
|
+
};
|
|
788
|
+
return decode(typeMappings, input);
|
|
789
|
+
};
|
|
770
790
|
decoders.CallStatsReportReadyEvent = (input) => {
|
|
771
791
|
const typeMappings = {
|
|
772
792
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1444,6 +1464,7 @@ decoders.FeedGroupResponse = (input) => {
|
|
|
1444
1464
|
const typeMappings = {
|
|
1445
1465
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1446
1466
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1467
|
+
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
1447
1468
|
activity_selectors: {
|
|
1448
1469
|
type: 'ActivitySelectorConfigResponse',
|
|
1449
1470
|
isSingle: false,
|
|
@@ -2164,8 +2185,9 @@ decoders.ModerationCheckCompletedEvent = (input) => {
|
|
|
2164
2185
|
decoders.ModerationCustomActionEvent = (input) => {
|
|
2165
2186
|
const typeMappings = {
|
|
2166
2187
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2167
|
-
|
|
2168
|
-
|
|
2188
|
+
review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
2189
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2190
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
2169
2191
|
};
|
|
2170
2192
|
return decode(typeMappings, input);
|
|
2171
2193
|
};
|
|
@@ -2188,8 +2210,9 @@ decoders.ModerationFlaggedEvent = (input) => {
|
|
|
2188
2210
|
decoders.ModerationMarkReviewedEvent = (input) => {
|
|
2189
2211
|
const typeMappings = {
|
|
2190
2212
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2191
|
-
|
|
2192
|
-
|
|
2213
|
+
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
2214
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2215
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
2193
2216
|
};
|
|
2194
2217
|
return decode(typeMappings, input);
|
|
2195
2218
|
};
|
|
@@ -2286,6 +2309,13 @@ decoders.ParticipantCountOverTimeResponse = (input) => {
|
|
|
2286
2309
|
};
|
|
2287
2310
|
return decode(typeMappings, input);
|
|
2288
2311
|
};
|
|
2312
|
+
decoders.ParticipantSeriesTimeframe = (input) => {
|
|
2313
|
+
const typeMappings = {
|
|
2314
|
+
since: { type: 'DatetimeType', isSingle: true },
|
|
2315
|
+
until: { type: 'DatetimeType', isSingle: true },
|
|
2316
|
+
};
|
|
2317
|
+
return decode(typeMappings, input);
|
|
2318
|
+
};
|
|
2289
2319
|
decoders.PendingMessageEvent = (input) => {
|
|
2290
2320
|
const typeMappings = {
|
|
2291
2321
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2697,6 +2727,7 @@ decoders.ReadStateResponse = (input) => {
|
|
|
2697
2727
|
const typeMappings = {
|
|
2698
2728
|
last_read: { type: 'DatetimeType', isSingle: true },
|
|
2699
2729
|
user: { type: 'UserResponse', isSingle: true },
|
|
2730
|
+
last_delivered_at: { type: 'DatetimeType', isSingle: true },
|
|
2700
2731
|
};
|
|
2701
2732
|
return decode(typeMappings, input);
|
|
2702
2733
|
};
|
|
@@ -3507,6 +3538,8 @@ class CommonApi {
|
|
|
3507
3538
|
const body = {
|
|
3508
3539
|
name: request?.name,
|
|
3509
3540
|
words: request?.words,
|
|
3541
|
+
is_leet_check_enabled: request?.is_leet_check_enabled,
|
|
3542
|
+
is_plural_check_enabled: request?.is_plural_check_enabled,
|
|
3510
3543
|
team: request?.team,
|
|
3511
3544
|
type: request?.type,
|
|
3512
3545
|
};
|
|
@@ -3541,6 +3574,8 @@ class CommonApi {
|
|
|
3541
3574
|
name: request?.name,
|
|
3542
3575
|
};
|
|
3543
3576
|
const body = {
|
|
3577
|
+
is_leet_check_enabled: request?.is_leet_check_enabled,
|
|
3578
|
+
is_plural_check_enabled: request?.is_plural_check_enabled,
|
|
3544
3579
|
team: request?.team,
|
|
3545
3580
|
words: request?.words,
|
|
3546
3581
|
};
|
|
@@ -4699,6 +4734,54 @@ class VideoApi {
|
|
|
4699
4734
|
decoders.DeleteTranscriptionResponse?.(response.body);
|
|
4700
4735
|
return { ...response.body, metadata: response.metadata };
|
|
4701
4736
|
}
|
|
4737
|
+
async getCallSessionParticipantStatsDetails(request) {
|
|
4738
|
+
const queryParams = {
|
|
4739
|
+
since: request?.since,
|
|
4740
|
+
until: request?.until,
|
|
4741
|
+
max_points: request?.max_points,
|
|
4742
|
+
};
|
|
4743
|
+
const pathParams = {
|
|
4744
|
+
call_type: request?.call_type,
|
|
4745
|
+
call_id: request?.call_id,
|
|
4746
|
+
session: request?.session,
|
|
4747
|
+
user: request?.user,
|
|
4748
|
+
user_session: request?.user_session,
|
|
4749
|
+
};
|
|
4750
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participant/{user}/{user_session}/details', pathParams, queryParams);
|
|
4751
|
+
decoders.GetCallSessionParticipantStatsDetailsResponse?.(response.body);
|
|
4752
|
+
return { ...response.body, metadata: response.metadata };
|
|
4753
|
+
}
|
|
4754
|
+
async queryCallSessionParticipantStats(request) {
|
|
4755
|
+
const queryParams = {
|
|
4756
|
+
sort: request?.sort,
|
|
4757
|
+
filter_conditions: request?.filter_conditions,
|
|
4758
|
+
};
|
|
4759
|
+
const pathParams = {
|
|
4760
|
+
call_type: request?.call_type,
|
|
4761
|
+
call_id: request?.call_id,
|
|
4762
|
+
session: request?.session,
|
|
4763
|
+
};
|
|
4764
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants', pathParams, queryParams);
|
|
4765
|
+
decoders.QueryCallSessionParticipantStatsResponse?.(response.body);
|
|
4766
|
+
return { ...response.body, metadata: response.metadata };
|
|
4767
|
+
}
|
|
4768
|
+
async getCallSessionParticipantStatsTimeline(request) {
|
|
4769
|
+
const queryParams = {
|
|
4770
|
+
start_time: request?.start_time,
|
|
4771
|
+
end_time: request?.end_time,
|
|
4772
|
+
severity: request?.severity,
|
|
4773
|
+
};
|
|
4774
|
+
const pathParams = {
|
|
4775
|
+
call_type: request?.call_type,
|
|
4776
|
+
call_id: request?.call_id,
|
|
4777
|
+
session: request?.session,
|
|
4778
|
+
user: request?.user,
|
|
4779
|
+
user_session: request?.user_session,
|
|
4780
|
+
};
|
|
4781
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants/{user}/{user_session}/timeline', pathParams, queryParams);
|
|
4782
|
+
decoders.QueryCallSessionParticipantStatsTimelineResponse?.(response.body);
|
|
4783
|
+
return { ...response.body, metadata: response.metadata };
|
|
4784
|
+
}
|
|
4702
4785
|
async queryCalls(request) {
|
|
4703
4786
|
const body = {
|
|
4704
4787
|
limit: request?.limit,
|
|
@@ -5272,7 +5355,7 @@ class ChatApi {
|
|
|
5272
5355
|
decoders.EventResponse?.(response.body);
|
|
5273
5356
|
return { ...response.body, metadata: response.metadata };
|
|
5274
5357
|
}
|
|
5275
|
-
async
|
|
5358
|
+
async deleteChannelFile(request) {
|
|
5276
5359
|
const queryParams = {
|
|
5277
5360
|
url: request?.url,
|
|
5278
5361
|
};
|
|
@@ -5284,7 +5367,7 @@ class ChatApi {
|
|
|
5284
5367
|
decoders.Response?.(response.body);
|
|
5285
5368
|
return { ...response.body, metadata: response.metadata };
|
|
5286
5369
|
}
|
|
5287
|
-
async
|
|
5370
|
+
async uploadChannelFile(request) {
|
|
5288
5371
|
const pathParams = {
|
|
5289
5372
|
type: request?.type,
|
|
5290
5373
|
id: request?.id,
|
|
@@ -5294,7 +5377,7 @@ class ChatApi {
|
|
|
5294
5377
|
user: request?.user,
|
|
5295
5378
|
};
|
|
5296
5379
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/channels/{type}/{id}/file', pathParams, undefined, body, 'multipart/form-data');
|
|
5297
|
-
decoders.
|
|
5380
|
+
decoders.UploadChannelFileResponse?.(response.body);
|
|
5298
5381
|
return { ...response.body, metadata: response.metadata };
|
|
5299
5382
|
}
|
|
5300
5383
|
async hideChannel(request) {
|
|
@@ -5311,7 +5394,7 @@ class ChatApi {
|
|
|
5311
5394
|
decoders.HideChannelResponse?.(response.body);
|
|
5312
5395
|
return { ...response.body, metadata: response.metadata };
|
|
5313
5396
|
}
|
|
5314
|
-
async
|
|
5397
|
+
async deleteChannelImage(request) {
|
|
5315
5398
|
const queryParams = {
|
|
5316
5399
|
url: request?.url,
|
|
5317
5400
|
};
|
|
@@ -5323,7 +5406,7 @@ class ChatApi {
|
|
|
5323
5406
|
decoders.Response?.(response.body);
|
|
5324
5407
|
return { ...response.body, metadata: response.metadata };
|
|
5325
5408
|
}
|
|
5326
|
-
async
|
|
5409
|
+
async uploadChannelImage(request) {
|
|
5327
5410
|
const pathParams = {
|
|
5328
5411
|
type: request?.type,
|
|
5329
5412
|
id: request?.id,
|
|
@@ -5334,7 +5417,7 @@ class ChatApi {
|
|
|
5334
5417
|
user: request?.user,
|
|
5335
5418
|
};
|
|
5336
5419
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/channels/{type}/{id}/image', pathParams, undefined, body, 'multipart/form-data');
|
|
5337
|
-
decoders.
|
|
5420
|
+
decoders.UploadChannelResponse?.(response.body);
|
|
5338
5421
|
return { ...response.body, metadata: response.metadata };
|
|
5339
5422
|
}
|
|
5340
5423
|
async updateMemberPartial(request) {
|
|
@@ -5476,7 +5559,9 @@ class ChatApi {
|
|
|
5476
5559
|
blocklist: request?.blocklist,
|
|
5477
5560
|
blocklist_behavior: request?.blocklist_behavior,
|
|
5478
5561
|
connect_events: request?.connect_events,
|
|
5562
|
+
count_messages: request?.count_messages,
|
|
5479
5563
|
custom_events: request?.custom_events,
|
|
5564
|
+
delivery_events: request?.delivery_events,
|
|
5480
5565
|
mark_messages_pending: request?.mark_messages_pending,
|
|
5481
5566
|
message_retention: request?.message_retention,
|
|
5482
5567
|
mutes: request?.mutes,
|
|
@@ -5532,6 +5617,7 @@ class ChatApi {
|
|
|
5532
5617
|
connect_events: request?.connect_events,
|
|
5533
5618
|
count_messages: request?.count_messages,
|
|
5534
5619
|
custom_events: request?.custom_events,
|
|
5620
|
+
delivery_events: request?.delivery_events,
|
|
5535
5621
|
mark_messages_pending: request?.mark_messages_pending,
|
|
5536
5622
|
mutes: request?.mutes,
|
|
5537
5623
|
partition_size: request?.partition_size,
|
|
@@ -5887,17 +5973,11 @@ class ChatApi {
|
|
|
5887
5973
|
async getReplies(request) {
|
|
5888
5974
|
const queryParams = {
|
|
5889
5975
|
limit: request?.limit,
|
|
5890
|
-
offset: request?.offset,
|
|
5891
5976
|
id_gte: request?.id_gte,
|
|
5892
5977
|
id_gt: request?.id_gt,
|
|
5893
5978
|
id_lte: request?.id_lte,
|
|
5894
5979
|
id_lt: request?.id_lt,
|
|
5895
|
-
created_at_after_or_equal: request?.created_at_after_or_equal,
|
|
5896
|
-
created_at_after: request?.created_at_after,
|
|
5897
|
-
created_at_before_or_equal: request?.created_at_before_or_equal,
|
|
5898
|
-
created_at_before: request?.created_at_before,
|
|
5899
5980
|
id_around: request?.id_around,
|
|
5900
|
-
created_at_around: request?.created_at_around,
|
|
5901
5981
|
sort: request?.sort,
|
|
5902
5982
|
};
|
|
5903
5983
|
const pathParams = {
|
|
@@ -6158,21 +6238,21 @@ class ChannelApi {
|
|
|
6158
6238
|
}
|
|
6159
6239
|
return this.chatApi.sendEvent({ id: this.id, type: this.type, ...request });
|
|
6160
6240
|
}
|
|
6161
|
-
|
|
6241
|
+
deleteChannelFile(request) {
|
|
6162
6242
|
if (!this.id) {
|
|
6163
6243
|
throw new Error(`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`);
|
|
6164
6244
|
}
|
|
6165
|
-
return this.chatApi.
|
|
6245
|
+
return this.chatApi.deleteChannelFile({
|
|
6166
6246
|
id: this.id,
|
|
6167
6247
|
type: this.type,
|
|
6168
6248
|
...request,
|
|
6169
6249
|
});
|
|
6170
6250
|
}
|
|
6171
|
-
|
|
6251
|
+
uploadChannelFile(request) {
|
|
6172
6252
|
if (!this.id) {
|
|
6173
6253
|
throw new Error(`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`);
|
|
6174
6254
|
}
|
|
6175
|
-
return this.chatApi.
|
|
6255
|
+
return this.chatApi.uploadChannelFile({
|
|
6176
6256
|
id: this.id,
|
|
6177
6257
|
type: this.type,
|
|
6178
6258
|
...request,
|
|
@@ -6188,21 +6268,21 @@ class ChannelApi {
|
|
|
6188
6268
|
...request,
|
|
6189
6269
|
});
|
|
6190
6270
|
}
|
|
6191
|
-
|
|
6271
|
+
deleteChannelImage(request) {
|
|
6192
6272
|
if (!this.id) {
|
|
6193
6273
|
throw new Error(`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`);
|
|
6194
6274
|
}
|
|
6195
|
-
return this.chatApi.
|
|
6275
|
+
return this.chatApi.deleteChannelImage({
|
|
6196
6276
|
id: this.id,
|
|
6197
6277
|
type: this.type,
|
|
6198
6278
|
...request,
|
|
6199
6279
|
});
|
|
6200
6280
|
}
|
|
6201
|
-
|
|
6281
|
+
uploadChannelImage(request) {
|
|
6202
6282
|
if (!this.id) {
|
|
6203
6283
|
throw new Error(`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`);
|
|
6204
6284
|
}
|
|
6205
|
-
return this.chatApi.
|
|
6285
|
+
return this.chatApi.uploadChannelImage({
|
|
6206
6286
|
id: this.id,
|
|
6207
6287
|
type: this.type,
|
|
6208
6288
|
...request,
|
|
@@ -6689,7 +6769,7 @@ class ApiClient {
|
|
|
6689
6769
|
const headers = {
|
|
6690
6770
|
Authorization: this.apiConfig.token,
|
|
6691
6771
|
'stream-auth-type': 'jwt',
|
|
6692
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
6772
|
+
'X-Stream-Client': 'stream-node-' + "0.7.13",
|
|
6693
6773
|
'Accept-Encoding': 'gzip',
|
|
6694
6774
|
'x-client-request-id': clientRequestId,
|
|
6695
6775
|
};
|
|
@@ -7557,6 +7637,16 @@ class FeedsApi {
|
|
|
7557
7637
|
decoders.CreateFeedsBatchResponse?.(response.body);
|
|
7558
7638
|
return { ...response.body, metadata: response.metadata };
|
|
7559
7639
|
}
|
|
7640
|
+
async ownCapabilitiesBatch(request) {
|
|
7641
|
+
const body = {
|
|
7642
|
+
feeds: request?.feeds,
|
|
7643
|
+
user_id: request?.user_id,
|
|
7644
|
+
user: request?.user,
|
|
7645
|
+
};
|
|
7646
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/own_capabilities/batch', undefined, undefined, body, 'application/json');
|
|
7647
|
+
decoders.OwnCapabilitiesBatchResponse?.(response.body);
|
|
7648
|
+
return { ...response.body, metadata: response.metadata };
|
|
7649
|
+
}
|
|
7560
7650
|
async _queryFeeds(request) {
|
|
7561
7651
|
const body = {
|
|
7562
7652
|
limit: request?.limit,
|
|
@@ -7570,6 +7660,18 @@ class FeedsApi {
|
|
|
7570
7660
|
decoders.QueryFeedsResponse?.(response.body);
|
|
7571
7661
|
return { ...response.body, metadata: response.metadata };
|
|
7572
7662
|
}
|
|
7663
|
+
async getFeedsRateLimits(request) {
|
|
7664
|
+
const queryParams = {
|
|
7665
|
+
endpoints: request?.endpoints,
|
|
7666
|
+
android: request?.android,
|
|
7667
|
+
ios: request?.ios,
|
|
7668
|
+
web: request?.web,
|
|
7669
|
+
server_side: request?.server_side,
|
|
7670
|
+
};
|
|
7671
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/feeds/rate_limits', undefined, queryParams);
|
|
7672
|
+
decoders.GetFeedsRateLimitsResponse?.(response.body);
|
|
7673
|
+
return { ...response.body, metadata: response.metadata };
|
|
7674
|
+
}
|
|
7573
7675
|
async updateFollow(request) {
|
|
7574
7676
|
const body = {
|
|
7575
7677
|
source: request?.source,
|
|
@@ -8009,6 +8111,7 @@ const ChannelOwnCapability = {
|
|
|
8009
8111
|
DELETE_ANY_MESSAGE: 'delete-any-message',
|
|
8010
8112
|
DELETE_CHANNEL: 'delete-channel',
|
|
8011
8113
|
DELETE_OWN_MESSAGE: 'delete-own-message',
|
|
8114
|
+
DELIVERY_EVENTS: 'delivery-events',
|
|
8012
8115
|
FLAG_MESSAGE: 'flag-message',
|
|
8013
8116
|
FREEZE_CHANNEL: 'freeze-channel',
|
|
8014
8117
|
JOIN_CHANNEL: 'join-channel',
|