@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.
@@ -1145,6 +1145,18 @@ decoders.MuteResponse = (input) => {
1145
1145
  };
1146
1146
  return decode(typeMappings, input);
1147
1147
  };
1148
+ decoders.NotificationFeedUpdatedEvent = (input) => {
1149
+ const typeMappings = {
1150
+ created_at: { type: 'DatetimeType', isSingle: true },
1151
+ received_at: { type: 'DatetimeType', isSingle: true },
1152
+ aggregated_activities: {
1153
+ type: 'AggregatedActivityResponse',
1154
+ isSingle: false,
1155
+ },
1156
+ notification_status: { type: 'NotificationStatusResponse', isSingle: true },
1157
+ };
1158
+ return decode(typeMappings, input);
1159
+ };
1148
1160
  decoders.NotificationStatusResponse = (input) => {
1149
1161
  const typeMappings = {
1150
1162
  last_seen_at: { type: 'DatetimeType', isSingle: true },
@@ -2620,7 +2632,6 @@ class FeedsApi {
2620
2632
  }
2621
2633
  async updateLiveLocation(request) {
2622
2634
  const body = {
2623
- created_by_device_id: request?.created_by_device_id,
2624
2635
  message_id: request?.message_id,
2625
2636
  end_at: request?.end_at,
2626
2637
  latitude: request?.latitude,
@@ -3704,6 +3715,7 @@ const eventDecoderMapping = {
3704
3715
  'feeds.follow.created': (data) => decoders.FollowCreatedEvent(data),
3705
3716
  'feeds.follow.deleted': (data) => decoders.FollowDeletedEvent(data),
3706
3717
  'feeds.follow.updated': (data) => decoders.FollowUpdatedEvent(data),
3718
+ 'feeds.notification_feed.updated': (data) => decoders.NotificationFeedUpdatedEvent(data),
3707
3719
  'feeds.poll.closed': (data) => decoders.PollClosedFeedEvent(data),
3708
3720
  'feeds.poll.deleted': (data) => decoders.PollDeletedFeedEvent(data),
3709
3721
  'feeds.poll.updated': (data) => decoders.PollUpdatedFeedEvent(data),
@@ -4322,6 +4334,10 @@ class Feed extends FeedApi {
4322
4334
  return newState ?? currentState;
4323
4335
  });
4324
4336
  },
4337
+ 'feeds.notification_feed.updated': (event) => {
4338
+ console.info('notification feed updated', event);
4339
+ // TODO: handle notification feed updates
4340
+ },
4325
4341
  // the poll events should be removed from here
4326
4342
  'feeds.poll.closed': Feed.noop,
4327
4343
  'feeds.poll.deleted': Feed.noop,