@stream-io/feeds-client 0.2.15 → 0.2.16

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.2.15",
3
+ "version": "0.2.16",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "./dist/es/index.mjs",
6
6
  "exports": {
@@ -59,6 +59,8 @@ import type {
59
59
  ListBlockListResponse,
60
60
  ListDevicesResponse,
61
61
  MarkActivityRequest,
62
+ OwnCapabilitiesBatchRequest,
63
+ OwnCapabilitiesBatchResponse,
62
64
  PinActivityRequest,
63
65
  PinActivityResponse,
64
66
  PollOptionResponse,
@@ -1523,6 +1525,32 @@ export class FeedsApi {
1523
1525
  return { ...response.body, metadata: response.metadata };
1524
1526
  }
1525
1527
 
1528
+ async ownCapabilitiesBatch(
1529
+ request: OwnCapabilitiesBatchRequest & { connection_id?: string },
1530
+ ): Promise<StreamResponse<OwnCapabilitiesBatchResponse>> {
1531
+ const queryParams = {
1532
+ connection_id: request?.connection_id,
1533
+ };
1534
+ const body = {
1535
+ feeds: request?.feeds,
1536
+ };
1537
+
1538
+ const response = await this.apiClient.sendRequest<
1539
+ StreamResponse<OwnCapabilitiesBatchResponse>
1540
+ >(
1541
+ 'POST',
1542
+ '/api/v2/feeds/feeds/own_capabilities/batch',
1543
+ undefined,
1544
+ queryParams,
1545
+ body,
1546
+ 'application/json',
1547
+ );
1548
+
1549
+ decoders.OwnCapabilitiesBatchResponse?.(response.body);
1550
+
1551
+ return { ...response.body, metadata: response.metadata };
1552
+ }
1553
+
1526
1554
  protected async _queryFeeds(
1527
1555
  request?: QueryFeedsRequest & { connection_id?: string },
1528
1556
  ): Promise<StreamResponse<QueryFeedsResponse>> {
@@ -4177,6 +4177,16 @@ export interface OnlyUserID {
4177
4177
  id: string;
4178
4178
  }
4179
4179
 
4180
+ export interface OwnCapabilitiesBatchRequest {
4181
+ feeds: string[];
4182
+ }
4183
+
4184
+ export interface OwnCapabilitiesBatchResponse {
4185
+ duration: string;
4186
+
4187
+ capabilities: Record<string, string[]>;
4188
+ }
4189
+
4180
4190
  export interface OwnUser {
4181
4191
  banned: boolean;
4182
4192