@stream-io/node-sdk 0.7.12 → 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.es.mjs CHANGED
@@ -601,6 +601,12 @@ decoders.CallParticipantResponse = (input) => {
601
601
  };
602
602
  return decode(typeMappings, input);
603
603
  };
604
+ decoders.CallParticipantTimeline = (input) => {
605
+ const typeMappings = {
606
+ timestamp: { type: 'DatetimeType', isSingle: true },
607
+ };
608
+ return decode(typeMappings, input);
609
+ };
604
610
  decoders.CallReactionEvent = (input) => {
605
611
  const typeMappings = {
606
612
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -748,6 +754,20 @@ decoders.CallStateResponseFields = (input) => {
748
754
  };
749
755
  return decode(typeMappings, input);
750
756
  };
757
+ decoders.CallStatsParticipant = (input) => {
758
+ const typeMappings = {
759
+ sessions: { type: 'CallStatsParticipantSession', isSingle: false },
760
+ latest_activity_at: { type: 'DatetimeType', isSingle: true },
761
+ };
762
+ return decode(typeMappings, input);
763
+ };
764
+ decoders.CallStatsParticipantSession = (input) => {
765
+ const typeMappings = {
766
+ ended_at: { type: 'DatetimeType', isSingle: true },
767
+ started_at: { type: 'DatetimeType', isSingle: true },
768
+ };
769
+ return decode(typeMappings, input);
770
+ };
751
771
  decoders.CallStatsReportReadyEvent = (input) => {
752
772
  const typeMappings = {
753
773
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1425,6 +1445,7 @@ decoders.FeedGroupResponse = (input) => {
1425
1445
  const typeMappings = {
1426
1446
  created_at: { type: 'DatetimeType', isSingle: true },
1427
1447
  updated_at: { type: 'DatetimeType', isSingle: true },
1448
+ deleted_at: { type: 'DatetimeType', isSingle: true },
1428
1449
  activity_selectors: {
1429
1450
  type: 'ActivitySelectorConfigResponse',
1430
1451
  isSingle: false,
@@ -2145,8 +2166,9 @@ decoders.ModerationCheckCompletedEvent = (input) => {
2145
2166
  decoders.ModerationCustomActionEvent = (input) => {
2146
2167
  const typeMappings = {
2147
2168
  created_at: { type: 'DatetimeType', isSingle: true },
2148
- message: { type: 'Message', isSingle: true },
2149
- user: { type: 'User', isSingle: true },
2169
+ review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true },
2170
+ received_at: { type: 'DatetimeType', isSingle: true },
2171
+ message: { type: 'MessageResponse', isSingle: true },
2150
2172
  };
2151
2173
  return decode(typeMappings, input);
2152
2174
  };
@@ -2169,8 +2191,9 @@ decoders.ModerationFlaggedEvent = (input) => {
2169
2191
  decoders.ModerationMarkReviewedEvent = (input) => {
2170
2192
  const typeMappings = {
2171
2193
  created_at: { type: 'DatetimeType', isSingle: true },
2172
- message: { type: 'Message', isSingle: true },
2173
- user: { type: 'User', isSingle: true },
2194
+ item: { type: 'ReviewQueueItemResponse', isSingle: true },
2195
+ received_at: { type: 'DatetimeType', isSingle: true },
2196
+ message: { type: 'MessageResponse', isSingle: true },
2174
2197
  };
2175
2198
  return decode(typeMappings, input);
2176
2199
  };
@@ -2267,6 +2290,13 @@ decoders.ParticipantCountOverTimeResponse = (input) => {
2267
2290
  };
2268
2291
  return decode(typeMappings, input);
2269
2292
  };
2293
+ decoders.ParticipantSeriesTimeframe = (input) => {
2294
+ const typeMappings = {
2295
+ since: { type: 'DatetimeType', isSingle: true },
2296
+ until: { type: 'DatetimeType', isSingle: true },
2297
+ };
2298
+ return decode(typeMappings, input);
2299
+ };
2270
2300
  decoders.PendingMessageEvent = (input) => {
2271
2301
  const typeMappings = {
2272
2302
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -2678,6 +2708,7 @@ decoders.ReadStateResponse = (input) => {
2678
2708
  const typeMappings = {
2679
2709
  last_read: { type: 'DatetimeType', isSingle: true },
2680
2710
  user: { type: 'UserResponse', isSingle: true },
2711
+ last_delivered_at: { type: 'DatetimeType', isSingle: true },
2681
2712
  };
2682
2713
  return decode(typeMappings, input);
2683
2714
  };
@@ -3488,6 +3519,8 @@ class CommonApi {
3488
3519
  const body = {
3489
3520
  name: request?.name,
3490
3521
  words: request?.words,
3522
+ is_leet_check_enabled: request?.is_leet_check_enabled,
3523
+ is_plural_check_enabled: request?.is_plural_check_enabled,
3491
3524
  team: request?.team,
3492
3525
  type: request?.type,
3493
3526
  };
@@ -3522,6 +3555,8 @@ class CommonApi {
3522
3555
  name: request?.name,
3523
3556
  };
3524
3557
  const body = {
3558
+ is_leet_check_enabled: request?.is_leet_check_enabled,
3559
+ is_plural_check_enabled: request?.is_plural_check_enabled,
3525
3560
  team: request?.team,
3526
3561
  words: request?.words,
3527
3562
  };
@@ -4680,6 +4715,54 @@ class VideoApi {
4680
4715
  decoders.DeleteTranscriptionResponse?.(response.body);
4681
4716
  return { ...response.body, metadata: response.metadata };
4682
4717
  }
4718
+ async getCallSessionParticipantStatsDetails(request) {
4719
+ const queryParams = {
4720
+ since: request?.since,
4721
+ until: request?.until,
4722
+ max_points: request?.max_points,
4723
+ };
4724
+ const pathParams = {
4725
+ call_type: request?.call_type,
4726
+ call_id: request?.call_id,
4727
+ session: request?.session,
4728
+ user: request?.user,
4729
+ user_session: request?.user_session,
4730
+ };
4731
+ const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participant/{user}/{user_session}/details', pathParams, queryParams);
4732
+ decoders.GetCallSessionParticipantStatsDetailsResponse?.(response.body);
4733
+ return { ...response.body, metadata: response.metadata };
4734
+ }
4735
+ async queryCallSessionParticipantStats(request) {
4736
+ const queryParams = {
4737
+ sort: request?.sort,
4738
+ filter_conditions: request?.filter_conditions,
4739
+ };
4740
+ const pathParams = {
4741
+ call_type: request?.call_type,
4742
+ call_id: request?.call_id,
4743
+ session: request?.session,
4744
+ };
4745
+ const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants', pathParams, queryParams);
4746
+ decoders.QueryCallSessionParticipantStatsResponse?.(response.body);
4747
+ return { ...response.body, metadata: response.metadata };
4748
+ }
4749
+ async getCallSessionParticipantStatsTimeline(request) {
4750
+ const queryParams = {
4751
+ start_time: request?.start_time,
4752
+ end_time: request?.end_time,
4753
+ severity: request?.severity,
4754
+ };
4755
+ const pathParams = {
4756
+ call_type: request?.call_type,
4757
+ call_id: request?.call_id,
4758
+ session: request?.session,
4759
+ user: request?.user,
4760
+ user_session: request?.user_session,
4761
+ };
4762
+ const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants/{user}/{user_session}/timeline', pathParams, queryParams);
4763
+ decoders.QueryCallSessionParticipantStatsTimelineResponse?.(response.body);
4764
+ return { ...response.body, metadata: response.metadata };
4765
+ }
4683
4766
  async queryCalls(request) {
4684
4767
  const body = {
4685
4768
  limit: request?.limit,
@@ -5253,7 +5336,7 @@ class ChatApi {
5253
5336
  decoders.EventResponse?.(response.body);
5254
5337
  return { ...response.body, metadata: response.metadata };
5255
5338
  }
5256
- async deleteFile(request) {
5339
+ async deleteChannelFile(request) {
5257
5340
  const queryParams = {
5258
5341
  url: request?.url,
5259
5342
  };
@@ -5265,7 +5348,7 @@ class ChatApi {
5265
5348
  decoders.Response?.(response.body);
5266
5349
  return { ...response.body, metadata: response.metadata };
5267
5350
  }
5268
- async uploadFile(request) {
5351
+ async uploadChannelFile(request) {
5269
5352
  const pathParams = {
5270
5353
  type: request?.type,
5271
5354
  id: request?.id,
@@ -5275,7 +5358,7 @@ class ChatApi {
5275
5358
  user: request?.user,
5276
5359
  };
5277
5360
  const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/channels/{type}/{id}/file', pathParams, undefined, body, 'multipart/form-data');
5278
- decoders.FileUploadResponse?.(response.body);
5361
+ decoders.UploadChannelFileResponse?.(response.body);
5279
5362
  return { ...response.body, metadata: response.metadata };
5280
5363
  }
5281
5364
  async hideChannel(request) {
@@ -5292,7 +5375,7 @@ class ChatApi {
5292
5375
  decoders.HideChannelResponse?.(response.body);
5293
5376
  return { ...response.body, metadata: response.metadata };
5294
5377
  }
5295
- async deleteImage(request) {
5378
+ async deleteChannelImage(request) {
5296
5379
  const queryParams = {
5297
5380
  url: request?.url,
5298
5381
  };
@@ -5304,7 +5387,7 @@ class ChatApi {
5304
5387
  decoders.Response?.(response.body);
5305
5388
  return { ...response.body, metadata: response.metadata };
5306
5389
  }
5307
- async uploadImage(request) {
5390
+ async uploadChannelImage(request) {
5308
5391
  const pathParams = {
5309
5392
  type: request?.type,
5310
5393
  id: request?.id,
@@ -5315,7 +5398,7 @@ class ChatApi {
5315
5398
  user: request?.user,
5316
5399
  };
5317
5400
  const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/channels/{type}/{id}/image', pathParams, undefined, body, 'multipart/form-data');
5318
- decoders.ImageUploadResponse?.(response.body);
5401
+ decoders.UploadChannelResponse?.(response.body);
5319
5402
  return { ...response.body, metadata: response.metadata };
5320
5403
  }
5321
5404
  async updateMemberPartial(request) {
@@ -5457,7 +5540,9 @@ class ChatApi {
5457
5540
  blocklist: request?.blocklist,
5458
5541
  blocklist_behavior: request?.blocklist_behavior,
5459
5542
  connect_events: request?.connect_events,
5543
+ count_messages: request?.count_messages,
5460
5544
  custom_events: request?.custom_events,
5545
+ delivery_events: request?.delivery_events,
5461
5546
  mark_messages_pending: request?.mark_messages_pending,
5462
5547
  message_retention: request?.message_retention,
5463
5548
  mutes: request?.mutes,
@@ -5513,6 +5598,7 @@ class ChatApi {
5513
5598
  connect_events: request?.connect_events,
5514
5599
  count_messages: request?.count_messages,
5515
5600
  custom_events: request?.custom_events,
5601
+ delivery_events: request?.delivery_events,
5516
5602
  mark_messages_pending: request?.mark_messages_pending,
5517
5603
  mutes: request?.mutes,
5518
5604
  partition_size: request?.partition_size,
@@ -5868,17 +5954,11 @@ class ChatApi {
5868
5954
  async getReplies(request) {
5869
5955
  const queryParams = {
5870
5956
  limit: request?.limit,
5871
- offset: request?.offset,
5872
5957
  id_gte: request?.id_gte,
5873
5958
  id_gt: request?.id_gt,
5874
5959
  id_lte: request?.id_lte,
5875
5960
  id_lt: request?.id_lt,
5876
- created_at_after_or_equal: request?.created_at_after_or_equal,
5877
- created_at_after: request?.created_at_after,
5878
- created_at_before_or_equal: request?.created_at_before_or_equal,
5879
- created_at_before: request?.created_at_before,
5880
5961
  id_around: request?.id_around,
5881
- created_at_around: request?.created_at_around,
5882
5962
  sort: request?.sort,
5883
5963
  };
5884
5964
  const pathParams = {
@@ -6139,21 +6219,21 @@ class ChannelApi {
6139
6219
  }
6140
6220
  return this.chatApi.sendEvent({ id: this.id, type: this.type, ...request });
6141
6221
  }
6142
- deleteFile(request) {
6222
+ deleteChannelFile(request) {
6143
6223
  if (!this.id) {
6144
6224
  throw new Error(`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`);
6145
6225
  }
6146
- return this.chatApi.deleteFile({
6226
+ return this.chatApi.deleteChannelFile({
6147
6227
  id: this.id,
6148
6228
  type: this.type,
6149
6229
  ...request,
6150
6230
  });
6151
6231
  }
6152
- uploadFile(request) {
6232
+ uploadChannelFile(request) {
6153
6233
  if (!this.id) {
6154
6234
  throw new Error(`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`);
6155
6235
  }
6156
- return this.chatApi.uploadFile({
6236
+ return this.chatApi.uploadChannelFile({
6157
6237
  id: this.id,
6158
6238
  type: this.type,
6159
6239
  ...request,
@@ -6169,21 +6249,21 @@ class ChannelApi {
6169
6249
  ...request,
6170
6250
  });
6171
6251
  }
6172
- deleteImage(request) {
6252
+ deleteChannelImage(request) {
6173
6253
  if (!this.id) {
6174
6254
  throw new Error(`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`);
6175
6255
  }
6176
- return this.chatApi.deleteImage({
6256
+ return this.chatApi.deleteChannelImage({
6177
6257
  id: this.id,
6178
6258
  type: this.type,
6179
6259
  ...request,
6180
6260
  });
6181
6261
  }
6182
- uploadImage(request) {
6262
+ uploadChannelImage(request) {
6183
6263
  if (!this.id) {
6184
6264
  throw new Error(`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`);
6185
6265
  }
6186
- return this.chatApi.uploadImage({
6266
+ return this.chatApi.uploadChannelImage({
6187
6267
  id: this.id,
6188
6268
  type: this.type,
6189
6269
  ...request,
@@ -6670,7 +6750,7 @@ class ApiClient {
6670
6750
  const headers = {
6671
6751
  Authorization: this.apiConfig.token,
6672
6752
  'stream-auth-type': 'jwt',
6673
- 'X-Stream-Client': 'stream-node-' + "0.7.12",
6753
+ 'X-Stream-Client': 'stream-node-' + "0.7.13",
6674
6754
  'Accept-Encoding': 'gzip',
6675
6755
  'x-client-request-id': clientRequestId,
6676
6756
  };
@@ -7538,6 +7618,16 @@ class FeedsApi {
7538
7618
  decoders.CreateFeedsBatchResponse?.(response.body);
7539
7619
  return { ...response.body, metadata: response.metadata };
7540
7620
  }
7621
+ async ownCapabilitiesBatch(request) {
7622
+ const body = {
7623
+ feeds: request?.feeds,
7624
+ user_id: request?.user_id,
7625
+ user: request?.user,
7626
+ };
7627
+ const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/own_capabilities/batch', undefined, undefined, body, 'application/json');
7628
+ decoders.OwnCapabilitiesBatchResponse?.(response.body);
7629
+ return { ...response.body, metadata: response.metadata };
7630
+ }
7541
7631
  async _queryFeeds(request) {
7542
7632
  const body = {
7543
7633
  limit: request?.limit,
@@ -7551,6 +7641,18 @@ class FeedsApi {
7551
7641
  decoders.QueryFeedsResponse?.(response.body);
7552
7642
  return { ...response.body, metadata: response.metadata };
7553
7643
  }
7644
+ async getFeedsRateLimits(request) {
7645
+ const queryParams = {
7646
+ endpoints: request?.endpoints,
7647
+ android: request?.android,
7648
+ ios: request?.ios,
7649
+ web: request?.web,
7650
+ server_side: request?.server_side,
7651
+ };
7652
+ const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/feeds/rate_limits', undefined, queryParams);
7653
+ decoders.GetFeedsRateLimitsResponse?.(response.body);
7654
+ return { ...response.body, metadata: response.metadata };
7655
+ }
7554
7656
  async updateFollow(request) {
7555
7657
  const body = {
7556
7658
  source: request?.source,
@@ -7990,6 +8092,7 @@ const ChannelOwnCapability = {
7990
8092
  DELETE_ANY_MESSAGE: 'delete-any-message',
7991
8093
  DELETE_CHANNEL: 'delete-channel',
7992
8094
  DELETE_OWN_MESSAGE: 'delete-own-message',
8095
+ DELIVERY_EVENTS: 'delivery-events',
7993
8096
  FLAG_MESSAGE: 'flag-message',
7994
8097
  FREEZE_CHANNEL: 'freeze-channel',
7995
8098
  JOIN_CHANNEL: 'join-channel',