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