@stream-io/node-sdk 0.8.15 → 0.9.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.
@@ -6,6 +6,7 @@ import {
6
6
  ChangeFeedVisibilityResponse,
7
7
  DeleteFeedResponse,
8
8
  GetFeedCountsResponse,
9
+ GetNotificationStatusResponse,
9
10
  GetOrCreateFeedRequest,
10
11
  GetOrCreateFeedResponse,
11
12
  MarkActivityRequest,
@@ -155,6 +156,17 @@ export class FeedApi {
155
156
  });
156
157
  }
157
158
 
159
+ getNotificationStatus(request?: {
160
+ view?: string;
161
+ user_id?: string;
162
+ }): Promise<StreamResponse<GetNotificationStatusResponse>> {
163
+ return this.feedsApi.getNotificationStatus({
164
+ feed_id: this.id,
165
+ feed_group_id: this.group,
166
+ ...request,
167
+ });
168
+ }
169
+
158
170
  queryPinnedActivities(
159
171
  request?: QueryPinnedActivitiesRequest & {
160
172
  language?: string;
@@ -24,6 +24,7 @@ import {
24
24
  BatchQueryActivityReactionsResponse,
25
25
  BatchQueryCommentReactionsRequest,
26
26
  BatchQueryCommentReactionsResponse,
27
+ CancelExportFeedsResponse,
27
28
  CastPollVoteRequest,
28
29
  ChangeFeedVisibilityRequest,
29
30
  ChangeFeedVisibilityResponse,
@@ -60,6 +61,10 @@ import {
60
61
  DeleteFeedsRetentionPolicyResponse,
61
62
  DeleteUserInterestsResponse,
62
63
  ExportFeedUserDataResponse,
64
+ ExportFeedsAppRequest,
65
+ ExportFeedsByTypeRequest,
66
+ ExportFeedsResponse,
67
+ FeedVisibility,
63
68
  FollowBatchRequest,
64
69
  FollowBatchResponse,
65
70
  FollowRequest,
@@ -76,6 +81,7 @@ import {
76
81
  GetFeedsRetentionPolicyRunsRequest,
77
82
  GetFeedsRetentionPolicyRunsResponse,
78
83
  GetFollowSuggestionsResponse,
84
+ GetNotificationStatusResponse,
79
85
  GetOrCreateFeedGroupRequest,
80
86
  GetOrCreateFeedGroupResponse,
81
87
  GetOrCreateFeedRequest,
@@ -1675,6 +1681,74 @@ export class FeedsApi {
1675
1681
  return response;
1676
1682
  }
1677
1683
 
1684
+ async exportFeedsApp(
1685
+ request?: ExportFeedsAppRequest,
1686
+ ): Promise<StreamResponse<ExportFeedsResponse>> {
1687
+ const body = {
1688
+ include_deleted: request?.include_deleted,
1689
+ types: request?.types,
1690
+ };
1691
+
1692
+ const response = await this.apiClient.sendRequest<ExportFeedsResponse>(
1693
+ 'POST',
1694
+ '/api/v2/feeds/export/app',
1695
+ undefined,
1696
+ undefined,
1697
+ body,
1698
+ );
1699
+
1700
+ decoders['ExportFeedsResponse']?.(response);
1701
+
1702
+ return response;
1703
+ }
1704
+
1705
+ async cancelExportFeeds(request: {
1706
+ task_id: string;
1707
+ }): Promise<StreamResponse<CancelExportFeedsResponse>> {
1708
+ const pathParams = {
1709
+ task_id: request?.task_id,
1710
+ };
1711
+
1712
+ const response =
1713
+ await this.apiClient.sendRequest<CancelExportFeedsResponse>(
1714
+ 'POST',
1715
+ '/api/v2/feeds/export/{task_id}/cancel',
1716
+ pathParams,
1717
+ undefined,
1718
+ );
1719
+
1720
+ decoders['CancelExportFeedsResponse']?.(response);
1721
+
1722
+ return response;
1723
+ }
1724
+
1725
+ async exportFeedsByType(
1726
+ request: ExportFeedsByTypeRequest & { type: string },
1727
+ ): Promise<StreamResponse<ExportFeedsResponse>> {
1728
+ const pathParams = {
1729
+ type: request?.type,
1730
+ };
1731
+ const body = {
1732
+ created_at_from: request?.created_at_from,
1733
+ created_at_to: request?.created_at_to,
1734
+ include_deleted: request?.include_deleted,
1735
+ user_id: request?.user_id,
1736
+ activity_ids: request?.activity_ids,
1737
+ };
1738
+
1739
+ const response = await this.apiClient.sendRequest<ExportFeedsResponse>(
1740
+ 'POST',
1741
+ '/api/v2/feeds/export/{type}',
1742
+ pathParams,
1743
+ undefined,
1744
+ body,
1745
+ );
1746
+
1747
+ decoders['ExportFeedsResponse']?.(response);
1748
+
1749
+ return response;
1750
+ }
1751
+
1678
1752
  async listFeedGroups(request?: {
1679
1753
  include_soft_deleted?: boolean;
1680
1754
  }): Promise<StreamResponse<ListFeedGroupsResponse>> {
@@ -2098,6 +2172,34 @@ export class FeedsApi {
2098
2172
  return response;
2099
2173
  }
2100
2174
 
2175
+ async getNotificationStatus(request: {
2176
+ feed_group_id: string;
2177
+ feed_id: string;
2178
+ view?: string;
2179
+ user_id?: string;
2180
+ }): Promise<StreamResponse<GetNotificationStatusResponse>> {
2181
+ const queryParams = {
2182
+ view: request?.view,
2183
+ user_id: request?.user_id,
2184
+ };
2185
+ const pathParams = {
2186
+ feed_group_id: request?.feed_group_id,
2187
+ feed_id: request?.feed_id,
2188
+ };
2189
+
2190
+ const response =
2191
+ await this.apiClient.sendRequest<GetNotificationStatusResponse>(
2192
+ 'GET',
2193
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/notification_status',
2194
+ pathParams,
2195
+ queryParams,
2196
+ );
2197
+
2198
+ decoders['GetNotificationStatusResponse']?.(response);
2199
+
2200
+ return response;
2201
+ }
2202
+
2101
2203
  async queryPinnedActivities(
2102
2204
  request: QueryPinnedActivitiesRequest & {
2103
2205
  feed_group_id: string;
@@ -2446,7 +2548,7 @@ export class FeedsApi {
2446
2548
  }
2447
2549
 
2448
2550
  async getFeedVisibility(request: {
2449
- name: string;
2551
+ name: FeedVisibility;
2450
2552
  }): Promise<StreamResponse<GetFeedVisibilityResponse>> {
2451
2553
  const pathParams = {
2452
2554
  name: request?.name,
@@ -2466,7 +2568,7 @@ export class FeedsApi {
2466
2568
  }
2467
2569
 
2468
2570
  async updateFeedVisibility(
2469
- request: UpdateFeedVisibilityRequest & { name: string },
2571
+ request: UpdateFeedVisibilityRequest & { name: FeedVisibility },
2470
2572
  ): Promise<StreamResponse<UpdateFeedVisibilityResponse>> {
2471
2573
  const pathParams = {
2472
2574
  name: request?.name,
@@ -2699,6 +2801,7 @@ export class FeedsApi {
2699
2801
  return response;
2700
2802
  }
2701
2803
 
2804
+ /** @deprecated This endpoint is deprecated. */
2702
2805
  async followBatch(
2703
2806
  request: FollowBatchRequest,
2704
2807
  ): Promise<StreamResponse<FollowBatchResponse>> {
@@ -3082,6 +3185,7 @@ export class FeedsApi {
3082
3185
  return response;
3083
3186
  }
3084
3187
 
3188
+ /** @deprecated This endpoint is deprecated. */
3085
3189
  async unfollowBatch(
3086
3190
  request: UnfollowBatchRequest,
3087
3191
  ): Promise<StreamResponse<UnfollowBatchResponse>> {