@stream-io/feeds-client 0.2.14 → 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.
@@ -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,
@@ -571,7 +573,7 @@ export class FeedsApi {
571
573
  return { ...response.body, metadata: response.metadata };
572
574
  }
573
575
 
574
- async addReaction(
576
+ async addActivityReaction(
575
577
  request: AddReactionRequest & { activity_id: string },
576
578
  ): Promise<StreamResponse<AddReactionResponse>> {
577
579
  const pathParams = {
@@ -888,9 +890,9 @@ export class FeedsApi {
888
890
  request: AddCommentRequest,
889
891
  ): Promise<StreamResponse<AddCommentResponse>> {
890
892
  const body = {
891
- comment: request?.comment,
892
893
  object_id: request?.object_id,
893
894
  object_type: request?.object_type,
895
+ comment: request?.comment,
894
896
  create_notification_activity: request?.create_notification_activity,
895
897
  parent_id: request?.parent_id,
896
898
  skip_push: request?.skip_push,
@@ -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