@stream-io/feeds-client 1.2.0 → 1.3.0

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.
@@ -1013,6 +1013,22 @@ decoders.CommentResponse = (input) => {
1013
1013
  }
1014
1014
  }, input);
1015
1015
  };
1016
+ decoders.CommentRestoredEvent = (input) => {
1017
+ return decode({
1018
+ created_at: {
1019
+ type: "DatetimeType",
1020
+ isSingle: true
1021
+ },
1022
+ comment: {
1023
+ type: "CommentResponse",
1024
+ isSingle: true
1025
+ },
1026
+ received_at: {
1027
+ type: "DatetimeType",
1028
+ isSingle: true
1029
+ }
1030
+ }, input);
1031
+ };
1016
1032
  decoders.CommentUpdatedEvent = (input) => {
1017
1033
  return decode({
1018
1034
  created_at: {
@@ -2355,6 +2371,18 @@ decoders.RestoreActivityResponse = (input) => {
2355
2371
  isSingle: true
2356
2372
  } }, input);
2357
2373
  };
2374
+ decoders.RestoreCommentResponse = (input) => {
2375
+ return decode({
2376
+ activity: {
2377
+ type: "ActivityResponse",
2378
+ isSingle: true
2379
+ },
2380
+ comment: {
2381
+ type: "CommentResponse",
2382
+ isSingle: true
2383
+ }
2384
+ }, input);
2385
+ };
2358
2386
  decoders.ReviewQueueItemResponse = (input) => {
2359
2387
  return decode({
2360
2388
  created_at: {
@@ -3474,6 +3502,15 @@ var FeedsApi = class {
3474
3502
  metadata: response.metadata
3475
3503
  };
3476
3504
  }
3505
+ async restoreComment(request) {
3506
+ const pathParams = { id: request?.id };
3507
+ const response = await this.apiClient.sendRequest("POST", "/api/v2/feeds/comments/{id}/restore", pathParams, void 0, {}, "application/json");
3508
+ decoders.RestoreCommentResponse?.(response.body);
3509
+ return {
3510
+ ...response.body,
3511
+ metadata: response.metadata
3512
+ };
3513
+ }
3477
3514
  async deleteFeed(request) {
3478
3515
  const queryParams = { hard_delete: request?.hard_delete };
3479
3516
  const pathParams = {
@@ -5013,7 +5050,7 @@ var getRateLimitFromResponseHeader = (response_headers) => {
5013
5050
  };
5014
5051
  //#endregion
5015
5052
  //#region package.json
5016
- var version = "1.2.0";
5053
+ var version = "1.3.0";
5017
5054
  //#endregion
5018
5055
  //#region src/common/ApiClient.ts
5019
5056
  var axios$1 = axios.default.default ?? axios.default;
@@ -5159,6 +5196,7 @@ var eventDecoderMapping = {
5159
5196
  "feeds.comment.reaction.added": (data) => decoders.CommentReactionAddedEvent(data),
5160
5197
  "feeds.comment.reaction.deleted": (data) => decoders.CommentReactionDeletedEvent(data),
5161
5198
  "feeds.comment.reaction.updated": (data) => decoders.CommentReactionUpdatedEvent(data),
5199
+ "feeds.comment.restored": (data) => decoders.CommentRestoredEvent(data),
5162
5200
  "feeds.comment.updated": (data) => decoders.CommentUpdatedEvent(data),
5163
5201
  "feeds.feed.created": (data) => decoders.FeedCreatedEvent(data),
5164
5202
  "feeds.feed.deleted": (data) => decoders.FeedDeletedEvent(data),
@@ -7297,6 +7335,7 @@ var Feed = class Feed extends FeedApi {
7297
7335
  "feeds.comment.added": handleCommentAdded.bind(this),
7298
7336
  "feeds.comment.deleted": handleCommentDeleted.bind(this),
7299
7337
  "feeds.comment.updated": handleCommentUpdated.bind(this),
7338
+ "feeds.comment.restored": Feed.noop,
7300
7339
  "feeds.feed.created": Feed.noop,
7301
7340
  "feeds.feed.deleted": handleFeedDeleted.bind(this),
7302
7341
  "feeds.feed.updated": handleFeedUpdated.bind(this),
@@ -8915,4 +8954,4 @@ Object.defineProperty(exports, "updateEntityInArray", {
8915
8954
  }
8916
8955
  });
8917
8956
 
8918
- //# sourceMappingURL=feeds-client-BP0fE4NZ.js.map
8957
+ //# sourceMappingURL=feeds-client-DXci2Pbn.js.map