@stream-io/feeds-client 0.1.6 → 0.1.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/feeds-client",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "./dist/index.node.js",
6
6
  "exports": {
@@ -126,4 +126,14 @@ export class FeedApi {
126
126
  ...request,
127
127
  });
128
128
  }
129
+
130
+ stopWatching(request?: {
131
+ connection_id?: string;
132
+ }): Promise<StreamResponse<Response>> {
133
+ return this.feedsApi.stopWatchingFeed({
134
+ feed_id: this.id,
135
+ feed_group_id: this.group,
136
+ ...request,
137
+ });
138
+ }
129
139
  }
@@ -1415,6 +1415,31 @@ export class FeedsApi {
1415
1415
  return { ...response.body, metadata: response.metadata };
1416
1416
  }
1417
1417
 
1418
+ async stopWatchingFeed(request: {
1419
+ feed_group_id: string;
1420
+ feed_id: string;
1421
+ connection_id?: string;
1422
+ }): Promise<StreamResponse<Response>> {
1423
+ const queryParams = {
1424
+ connection_id: request?.connection_id,
1425
+ };
1426
+ const pathParams = {
1427
+ feed_group_id: request?.feed_group_id,
1428
+ feed_id: request?.feed_id,
1429
+ };
1430
+
1431
+ const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
1432
+ 'DELETE',
1433
+ '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/watch',
1434
+ pathParams,
1435
+ queryParams,
1436
+ );
1437
+
1438
+ decoders.Response?.(response.body);
1439
+
1440
+ return { ...response.body, metadata: response.metadata };
1441
+ }
1442
+
1418
1443
  async getFollowSuggestions(request: {
1419
1444
  feed_group_id: string;
1420
1445
  limit?: number;