@stream-io/feeds-client 0.1.7 → 0.1.8

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.
@@ -872,6 +872,18 @@ decoders.MuteResponse = (input) => {
872
872
  };
873
873
  return decode(typeMappings, input);
874
874
  };
875
+ decoders.NotificationFeedUpdatedEvent = (input) => {
876
+ const typeMappings = {
877
+ created_at: { type: 'DatetimeType', isSingle: true },
878
+ received_at: { type: 'DatetimeType', isSingle: true },
879
+ aggregated_activities: {
880
+ type: 'AggregatedActivityResponse',
881
+ isSingle: false,
882
+ },
883
+ notification_status: { type: 'NotificationStatusResponse', isSingle: true },
884
+ };
885
+ return decode(typeMappings, input);
886
+ };
875
887
  decoders.NotificationStatusResponse = (input) => {
876
888
  const typeMappings = {
877
889
  last_seen_at: { type: 'DatetimeType', isSingle: true },
@@ -2347,7 +2359,6 @@ class FeedsApi {
2347
2359
  }
2348
2360
  async updateLiveLocation(request) {
2349
2361
  const body = {
2350
- created_by_device_id: request?.created_by_device_id,
2351
2362
  message_id: request?.message_id,
2352
2363
  end_at: request?.end_at,
2353
2364
  latitude: request?.latitude,
@@ -3712,6 +3723,7 @@ const eventDecoderMapping = {
3712
3723
  'feeds.follow.created': (data) => decoders.FollowCreatedEvent(data),
3713
3724
  'feeds.follow.deleted': (data) => decoders.FollowDeletedEvent(data),
3714
3725
  'feeds.follow.updated': (data) => decoders.FollowUpdatedEvent(data),
3726
+ 'feeds.notification_feed.updated': (data) => decoders.NotificationFeedUpdatedEvent(data),
3715
3727
  'feeds.poll.closed': (data) => decoders.PollClosedFeedEvent(data),
3716
3728
  'feeds.poll.deleted': (data) => decoders.PollDeletedFeedEvent(data),
3717
3729
  'feeds.poll.updated': (data) => decoders.PollUpdatedFeedEvent(data),
@@ -4337,6 +4349,10 @@ class Feed extends FeedApi {
4337
4349
  return newState ?? currentState;
4338
4350
  });
4339
4351
  },
4352
+ 'feeds.notification_feed.updated': (event) => {
4353
+ console.info('notification feed updated', event);
4354
+ // TODO: handle notification feed updates
4355
+ },
4340
4356
  // the poll events should be removed from here
4341
4357
  'feeds.poll.closed': Feed.noop,
4342
4358
  'feeds.poll.deleted': Feed.noop,