@stream-io/node-sdk 0.6.5 → 0.6.7

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
@@ -875,6 +875,7 @@ decoders.Channel = (input) => {
875
875
  members: { type: 'ChannelMember', isSingle: false },
876
876
  config: { type: 'ChannelConfig', isSingle: true },
877
877
  created_by: { type: 'User', isSingle: true },
878
+ members_lookup: { type: 'ChannelMemberLookup', isSingle: false },
878
879
  truncated_by: { type: 'User', isSingle: true },
879
880
  };
880
881
  return decode(typeMappings, input);
@@ -935,6 +936,14 @@ decoders.ChannelMember = (input) => {
935
936
  };
936
937
  return decode(typeMappings, input);
937
938
  };
939
+ decoders.ChannelMemberLookup = (input) => {
940
+ const typeMappings = {
941
+ archived_at: { type: 'DatetimeType', isSingle: true },
942
+ ban_expires: { type: 'DatetimeType', isSingle: true },
943
+ pinned_at: { type: 'DatetimeType', isSingle: true },
944
+ };
945
+ return decode(typeMappings, input);
946
+ };
938
947
  decoders.ChannelMute = (input) => {
939
948
  const typeMappings = {
940
949
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1287,6 +1296,13 @@ decoders.DeleteCommentReactionResponse = (input) => {
1287
1296
  };
1288
1297
  return decode(typeMappings, input);
1289
1298
  };
1299
+ decoders.DeleteCommentResponse = (input) => {
1300
+ const typeMappings = {
1301
+ activity: { type: 'ActivityResponse', isSingle: true },
1302
+ comment: { type: 'CommentResponse', isSingle: true },
1303
+ };
1304
+ return decode(typeMappings, input);
1305
+ };
1290
1306
  decoders.DeleteMessageResponse = (input) => {
1291
1307
  const typeMappings = {
1292
1308
  message: { type: 'MessageResponse', isSingle: true },
@@ -1597,6 +1613,7 @@ decoders.GetCallReportResponse = (input) => {
1597
1613
  const typeMappings = {
1598
1614
  video_reactions: { type: 'VideoReactionsResponse', isSingle: false },
1599
1615
  chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true },
1616
+ session: { type: 'CallSessionResponse', isSingle: true },
1600
1617
  };
1601
1618
  return decode(typeMappings, input);
1602
1619
  };
@@ -2016,6 +2033,7 @@ decoders.MessageReadEvent = (input) => {
2016
2033
  const typeMappings = {
2017
2034
  created_at: { type: 'DatetimeType', isSingle: true },
2018
2035
  channel_last_message_at: { type: 'DatetimeType', isSingle: true },
2036
+ channel: { type: 'ChannelResponse', isSingle: true },
2019
2037
  thread: { type: 'ThreadResponse', isSingle: true },
2020
2038
  user: { type: 'UserResponseCommonFields', isSingle: true },
2021
2039
  };
@@ -3826,6 +3844,14 @@ class CommonApi {
3826
3844
  decoders.PollVotesResponse?.(response.body);
3827
3845
  return { ...response.body, metadata: response.metadata };
3828
3846
  }
3847
+ async updatePushNotificationPreferences(request) {
3848
+ const body = {
3849
+ preferences: request?.preferences,
3850
+ };
3851
+ const response = await this.apiClient.sendRequest('POST', '/api/v2/push_preferences', undefined, undefined, body, 'application/json');
3852
+ decoders.UpsertPushPreferencesResponse?.(response.body);
3853
+ return { ...response.body, metadata: response.metadata };
3854
+ }
3829
3855
  async listPushProviders() {
3830
3856
  const response = await this.apiClient.sendRequest('GET', '/api/v2/push_providers', undefined, undefined);
3831
3857
  decoders.ListPushProvidersResponse?.(response.body);
@@ -3848,6 +3874,27 @@ class CommonApi {
3848
3874
  decoders.Response?.(response.body);
3849
3875
  return { ...response.body, metadata: response.metadata };
3850
3876
  }
3877
+ async getPushTemplates(request) {
3878
+ const queryParams = {
3879
+ push_provider_type: request?.push_provider_type,
3880
+ push_provider_name: request?.push_provider_name,
3881
+ };
3882
+ const response = await this.apiClient.sendRequest('GET', '/api/v2/push_templates', undefined, queryParams);
3883
+ decoders.GetPushTemplatesResponse?.(response.body);
3884
+ return { ...response.body, metadata: response.metadata };
3885
+ }
3886
+ async upsertPushTemplate(request) {
3887
+ const body = {
3888
+ event_type: request?.event_type,
3889
+ push_provider_type: request?.push_provider_type,
3890
+ enable_push: request?.enable_push,
3891
+ push_provider_name: request?.push_provider_name,
3892
+ template: request?.template,
3893
+ };
3894
+ const response = await this.apiClient.sendRequest('POST', '/api/v2/push_templates', undefined, undefined, body, 'application/json');
3895
+ decoders.UpsertPushTemplateResponse?.(response.body);
3896
+ return { ...response.body, metadata: response.metadata };
3897
+ }
3851
3898
  async getRateLimits(request) {
3852
3899
  const queryParams = {
3853
3900
  server_side: request?.server_side,
@@ -4420,6 +4467,7 @@ class VideoApi {
4420
4467
  enable_transcription: request?.enable_transcription,
4421
4468
  external_storage: request?.external_storage,
4422
4469
  language: request?.language,
4470
+ speech_segment_config: request?.speech_segment_config,
4423
4471
  };
4424
4472
  const response = await this.apiClient.sendRequest('POST', '/api/v2/video/call/{type}/{id}/start_closed_captions', pathParams, undefined, body, 'application/json');
4425
4473
  decoders.StartClosedCaptionsResponse?.(response.body);
@@ -5598,6 +5646,21 @@ class ChatApi {
5598
5646
  decoders.MessageResponse?.(response.body);
5599
5647
  return { ...response.body, metadata: response.metadata };
5600
5648
  }
5649
+ async ephemeralMessageUpdate(request) {
5650
+ const pathParams = {
5651
+ id: request?.id,
5652
+ };
5653
+ const body = {
5654
+ skip_enrich_url: request?.skip_enrich_url,
5655
+ user_id: request?.user_id,
5656
+ unset: request?.unset,
5657
+ set: request?.set,
5658
+ user: request?.user,
5659
+ };
5660
+ const response = await this.apiClient.sendRequest('PATCH', '/api/v2/chat/messages/{id}/ephemeral', pathParams, undefined, body, 'application/json');
5661
+ decoders.UpdateMessagePartialResponse?.(response.body);
5662
+ return { ...response.body, metadata: response.metadata };
5663
+ }
5601
5664
  async sendReaction(request) {
5602
5665
  const pathParams = {
5603
5666
  id: request?.id,
@@ -5793,35 +5856,6 @@ class ChatApi {
5793
5856
  decoders.UnmuteResponse?.(response.body);
5794
5857
  return { ...response.body, metadata: response.metadata };
5795
5858
  }
5796
- async updatePushNotificationPreferences(request) {
5797
- const body = {
5798
- preferences: request?.preferences,
5799
- };
5800
- const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/push_preferences', undefined, undefined, body, 'application/json');
5801
- decoders.UpsertPushPreferencesResponse?.(response.body);
5802
- return { ...response.body, metadata: response.metadata };
5803
- }
5804
- async getPushTemplates(request) {
5805
- const queryParams = {
5806
- push_provider_type: request?.push_provider_type,
5807
- push_provider_name: request?.push_provider_name,
5808
- };
5809
- const response = await this.apiClient.sendRequest('GET', '/api/v2/chat/push_templates', undefined, queryParams);
5810
- decoders.GetPushTemplatesResponse?.(response.body);
5811
- return { ...response.body, metadata: response.metadata };
5812
- }
5813
- async upsertPushTemplate(request) {
5814
- const body = {
5815
- event_type: request?.event_type,
5816
- push_provider_type: request?.push_provider_type,
5817
- enable_push: request?.enable_push,
5818
- push_provider_name: request?.push_provider_name,
5819
- template: request?.template,
5820
- };
5821
- const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/push_templates', undefined, undefined, body, 'application/json');
5822
- decoders.UpsertPushTemplateResponse?.(response.body);
5823
- return { ...response.body, metadata: response.metadata };
5824
- }
5825
5859
  async queryBannedUsers(request) {
5826
5860
  const queryParams = {
5827
5861
  payload: request?.payload,
@@ -6574,7 +6608,7 @@ class ApiClient {
6574
6608
  const headers = {
6575
6609
  Authorization: this.apiConfig.token,
6576
6610
  'stream-auth-type': 'jwt',
6577
- 'X-Stream-Client': 'stream-node-' + "0.6.5",
6611
+ 'X-Stream-Client': 'stream-node-' + "0.6.7",
6578
6612
  'Accept-Encoding': 'gzip',
6579
6613
  'x-client-request-id': clientRequestId,
6580
6614
  };
@@ -6895,6 +6929,7 @@ class FeedsApi {
6895
6929
  user_id: request?.user_id,
6896
6930
  visibility: request?.visibility,
6897
6931
  attachments: request?.attachments,
6932
+ feeds: request?.feeds,
6898
6933
  filter_tags: request?.filter_tags,
6899
6934
  interest_tags: request?.interest_tags,
6900
6935
  custom: request?.custom,
@@ -7397,6 +7432,19 @@ class FeedsApi {
7397
7432
  decoders.UpdateFeedViewResponse?.(response.body);
7398
7433
  return { ...response.body, metadata: response.metadata };
7399
7434
  }
7435
+ async listFeedVisibilities() {
7436
+ const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/feed_visibilities', undefined, undefined);
7437
+ decoders.ListFeedVisibilitiesResponse?.(response.body);
7438
+ return { ...response.body, metadata: response.metadata };
7439
+ }
7440
+ async getFeedVisibility(request) {
7441
+ const pathParams = {
7442
+ name: request?.name,
7443
+ };
7444
+ const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/feed_visibilities/{name}', pathParams, undefined);
7445
+ decoders.GetFeedVisibilityResponse?.(response.body);
7446
+ return { ...response.body, metadata: response.metadata };
7447
+ }
7400
7448
  async createFeedsBatch(request) {
7401
7449
  const body = {
7402
7450
  feeds: request?.feeds,
@@ -7863,35 +7911,34 @@ const ChannelOwnCapability = {
7863
7911
  };
7864
7912
  const FeedOwnCapability = {
7865
7913
  ADD_ACTIVITY: 'add-activity',
7914
+ ADD_ACTIVITY_BOOKMARK: 'add-activity-bookmark',
7866
7915
  ADD_ACTIVITY_REACTION: 'add-activity-reaction',
7867
7916
  ADD_COMMENT: 'add-comment',
7868
7917
  ADD_COMMENT_REACTION: 'add-comment-reaction',
7869
- BOOKMARK_ACTIVITY: 'bookmark-activity',
7870
7918
  CREATE_FEED: 'create-feed',
7871
- DELETE_BOOKMARK: 'delete-bookmark',
7872
- DELETE_COMMENT: 'delete-comment',
7919
+ DELETE_ANY_ACTIVITY: 'delete-any-activity',
7920
+ DELETE_ANY_COMMENT: 'delete-any-comment',
7873
7921
  DELETE_FEED: 'delete-feed',
7874
- EDIT_BOOKMARK: 'edit-bookmark',
7922
+ DELETE_OWN_ACTIVITY: 'delete-own-activity',
7923
+ DELETE_OWN_ACTIVITY_BOOKMARK: 'delete-own-activity-bookmark',
7924
+ DELETE_OWN_ACTIVITY_REACTION: 'delete-own-activity-reaction',
7925
+ DELETE_OWN_COMMENT: 'delete-own-comment',
7926
+ DELETE_OWN_COMMENT_REACTION: 'delete-own-comment-reaction',
7875
7927
  FOLLOW: 'follow',
7876
- INVITE_FEED: 'invite-feed',
7877
- JOIN_FEED: 'join-feed',
7878
- LEAVE_FEED: 'leave-feed',
7879
- MANAGE_FEED_GROUP: 'manage-feed-group',
7880
- MARK_ACTIVITY: 'mark-activity',
7881
7928
  PIN_ACTIVITY: 'pin-activity',
7882
7929
  QUERY_FEED_MEMBERS: 'query-feed-members',
7883
7930
  QUERY_FOLLOWS: 'query-follows',
7884
7931
  READ_ACTIVITIES: 'read-activities',
7885
7932
  READ_FEED: 'read-feed',
7886
- REMOVE_ACTIVITY: 'remove-activity',
7887
- REMOVE_ACTIVITY_REACTION: 'remove-activity-reaction',
7888
- REMOVE_COMMENT_REACTION: 'remove-comment-reaction',
7889
7933
  UNFOLLOW: 'unfollow',
7890
- UPDATE_ACTIVITY: 'update-activity',
7891
- UPDATE_COMMENT: 'update-comment',
7934
+ UPDATE_ANY_ACTIVITY: 'update-any-activity',
7935
+ UPDATE_ANY_COMMENT: 'update-any-comment',
7892
7936
  UPDATE_FEED: 'update-feed',
7893
7937
  UPDATE_FEED_FOLLOWERS: 'update-feed-followers',
7894
7938
  UPDATE_FEED_MEMBERS: 'update-feed-members',
7939
+ UPDATE_OWN_ACTIVITY: 'update-own-activity',
7940
+ UPDATE_OWN_ACTIVITY_BOOKMARK: 'update-own-activity-bookmark',
7941
+ UPDATE_OWN_COMMENT: 'update-own-comment',
7895
7942
  };
7896
7943
  const OwnCapability = {
7897
7944
  BLOCK_USERS: 'block-users',