@stream-io/feeds-client 0.3.50 → 0.3.51
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/CHANGELOG.md +7 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-bindings.js +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/react-bindings.mjs +1 -1
- package/dist/{feeds-client-CKxvuiKz.js → feeds-client-B4zeBggL.js} +37 -12
- package/dist/feeds-client-B4zeBggL.js.map +1 -0
- package/dist/{feeds-client-BHpmg4_E.mjs → feeds-client-DeAqnd1a.mjs} +37 -12
- package/dist/feeds-client-DeAqnd1a.mjs.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/feed/feed.d.ts +3 -1
- package/dist/types/feed/feed.d.ts.map +1 -1
- package/dist/types/feeds-client/feeds-client.d.ts +1 -0
- package/dist/types/feeds-client/feeds-client.d.ts.map +1 -1
- package/dist/types/gen/feeds/FeedApi.d.ts +1 -0
- package/dist/types/gen/feeds/FeedApi.d.ts.map +1 -1
- package/dist/types/gen/feeds/FeedsApi.d.ts +3 -0
- package/dist/types/gen/feeds/FeedsApi.d.ts.map +1 -1
- package/dist/types/gen/models/index.d.ts +15 -0
- package/dist/types/gen/models/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/feed/feed.ts +5 -1
- package/src/feeds-client/feeds-client.ts +1 -1
- package/src/gen/feeds/FeedApi.ts +1 -0
- package/src/gen/feeds/FeedsApi.ts +33 -4
- package/src/gen/models/index.ts +31 -1
- package/dist/feeds-client-BHpmg4_E.mjs.map +0 -1
- package/dist/feeds-client-CKxvuiKz.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useStateStore } from "@stream-io/state-store/react-bindings";
|
|
2
2
|
export * from "@stream-io/state-store/react-bindings";
|
|
3
3
|
import { useState, useEffect, createContext, useContext, useRef, useCallback, useMemo } from "react";
|
|
4
|
-
import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-
|
|
4
|
+
import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-DeAqnd1a.mjs";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
const useCreateFeedsClient = ({
|
|
7
7
|
apiKey,
|
|
@@ -1650,6 +1650,7 @@ class FeedsApi {
|
|
|
1650
1650
|
feeds: request?.feeds,
|
|
1651
1651
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
1652
1652
|
create_notification_activity: request?.create_notification_activity,
|
|
1653
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
1653
1654
|
expires_at: request?.expires_at,
|
|
1654
1655
|
id: request?.id,
|
|
1655
1656
|
parent_id: request?.parent_id,
|
|
@@ -1682,7 +1683,8 @@ class FeedsApi {
|
|
|
1682
1683
|
}
|
|
1683
1684
|
async upsertActivities(request) {
|
|
1684
1685
|
const body = {
|
|
1685
|
-
activities: request?.activities
|
|
1686
|
+
activities: request?.activities,
|
|
1687
|
+
enrich_own_fields: request?.enrich_own_fields
|
|
1686
1688
|
};
|
|
1687
1689
|
const response = await this.apiClient.sendRequest(
|
|
1688
1690
|
"POST",
|
|
@@ -1714,6 +1716,7 @@ class FeedsApi {
|
|
|
1714
1716
|
}
|
|
1715
1717
|
async queryActivities(request) {
|
|
1716
1718
|
const body = {
|
|
1719
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
1717
1720
|
limit: request?.limit,
|
|
1718
1721
|
next: request?.next,
|
|
1719
1722
|
prev: request?.prev,
|
|
@@ -1933,6 +1936,7 @@ class FeedsApi {
|
|
|
1933
1936
|
};
|
|
1934
1937
|
const body = {
|
|
1935
1938
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
1939
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
1936
1940
|
handle_mention_notifications: request?.handle_mention_notifications,
|
|
1937
1941
|
run_activity_processors: request?.run_activity_processors,
|
|
1938
1942
|
unset: request?.unset,
|
|
@@ -1955,6 +1959,7 @@ class FeedsApi {
|
|
|
1955
1959
|
};
|
|
1956
1960
|
const body = {
|
|
1957
1961
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
1962
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
1958
1963
|
expires_at: request?.expires_at,
|
|
1959
1964
|
handle_mention_notifications: request?.handle_mention_notifications,
|
|
1960
1965
|
poll_id: request?.poll_id,
|
|
@@ -1986,6 +1991,9 @@ class FeedsApi {
|
|
|
1986
1991
|
return { ...response.body, metadata: response.metadata };
|
|
1987
1992
|
}
|
|
1988
1993
|
async restoreActivity(request) {
|
|
1994
|
+
const queryParams = {
|
|
1995
|
+
enrich_own_fields: request?.enrich_own_fields
|
|
1996
|
+
};
|
|
1989
1997
|
const pathParams = {
|
|
1990
1998
|
id: request?.id
|
|
1991
1999
|
};
|
|
@@ -1994,7 +2002,7 @@ class FeedsApi {
|
|
|
1994
2002
|
"POST",
|
|
1995
2003
|
"/api/v2/feeds/activities/{id}/restore",
|
|
1996
2004
|
pathParams,
|
|
1997
|
-
|
|
2005
|
+
queryParams,
|
|
1998
2006
|
body,
|
|
1999
2007
|
"application/json"
|
|
2000
2008
|
);
|
|
@@ -2054,6 +2062,7 @@ class FeedsApi {
|
|
|
2054
2062
|
}
|
|
2055
2063
|
async queryBookmarks(request) {
|
|
2056
2064
|
const body = {
|
|
2065
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
2057
2066
|
limit: request?.limit,
|
|
2058
2067
|
next: request?.next,
|
|
2059
2068
|
prev: request?.prev,
|
|
@@ -2375,6 +2384,7 @@ class FeedsApi {
|
|
|
2375
2384
|
};
|
|
2376
2385
|
const body = {
|
|
2377
2386
|
description: request?.description,
|
|
2387
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
2378
2388
|
name: request?.name,
|
|
2379
2389
|
filter_tags: request?.filter_tags,
|
|
2380
2390
|
custom: request?.custom
|
|
@@ -2414,6 +2424,9 @@ class FeedsApi {
|
|
|
2414
2424
|
return { ...response.body, metadata: response.metadata };
|
|
2415
2425
|
}
|
|
2416
2426
|
async unpinActivity(request) {
|
|
2427
|
+
const queryParams = {
|
|
2428
|
+
enrich_own_fields: request?.enrich_own_fields
|
|
2429
|
+
};
|
|
2417
2430
|
const pathParams = {
|
|
2418
2431
|
feed_group_id: request?.feed_group_id,
|
|
2419
2432
|
feed_id: request?.feed_id,
|
|
@@ -2423,7 +2436,7 @@ class FeedsApi {
|
|
|
2423
2436
|
"DELETE",
|
|
2424
2437
|
"/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/activities/{activity_id}/pin",
|
|
2425
2438
|
pathParams,
|
|
2426
|
-
|
|
2439
|
+
queryParams
|
|
2427
2440
|
);
|
|
2428
2441
|
decoders.UnpinActivityResponse?.(response.body);
|
|
2429
2442
|
return { ...response.body, metadata: response.metadata };
|
|
@@ -2434,7 +2447,9 @@ class FeedsApi {
|
|
|
2434
2447
|
feed_id: request?.feed_id,
|
|
2435
2448
|
activity_id: request?.activity_id
|
|
2436
2449
|
};
|
|
2437
|
-
const body = {
|
|
2450
|
+
const body = {
|
|
2451
|
+
enrich_own_fields: request?.enrich_own_fields
|
|
2452
|
+
};
|
|
2438
2453
|
const response = await this.apiClient.sendRequest(
|
|
2439
2454
|
"POST",
|
|
2440
2455
|
"/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/activities/{activity_id}/pin",
|
|
@@ -2532,6 +2547,7 @@ class FeedsApi {
|
|
|
2532
2547
|
feed_id: request?.feed_id
|
|
2533
2548
|
};
|
|
2534
2549
|
const body = {
|
|
2550
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
2535
2551
|
limit: request?.limit,
|
|
2536
2552
|
next: request?.next,
|
|
2537
2553
|
prev: request?.prev,
|
|
@@ -2584,7 +2600,8 @@ class FeedsApi {
|
|
|
2584
2600
|
}
|
|
2585
2601
|
async createFeedsBatch(request) {
|
|
2586
2602
|
const body = {
|
|
2587
|
-
feeds: request?.feeds
|
|
2603
|
+
feeds: request?.feeds,
|
|
2604
|
+
enrich_own_fields: request?.enrich_own_fields
|
|
2588
2605
|
};
|
|
2589
2606
|
const response = await this.apiClient.sendRequest(
|
|
2590
2607
|
"POST",
|
|
@@ -2621,6 +2638,7 @@ class FeedsApi {
|
|
|
2621
2638
|
connection_id: request?.connection_id
|
|
2622
2639
|
};
|
|
2623
2640
|
const body = {
|
|
2641
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
2624
2642
|
limit: request?.limit,
|
|
2625
2643
|
next: request?.next,
|
|
2626
2644
|
prev: request?.prev,
|
|
@@ -2645,6 +2663,7 @@ class FeedsApi {
|
|
|
2645
2663
|
target: request?.target,
|
|
2646
2664
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
2647
2665
|
create_notification_activity: request?.create_notification_activity,
|
|
2666
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
2648
2667
|
follower_role: request?.follower_role,
|
|
2649
2668
|
push_preference: request?.push_preference,
|
|
2650
2669
|
skip_push: request?.skip_push,
|
|
@@ -2667,6 +2686,7 @@ class FeedsApi {
|
|
|
2667
2686
|
target: request?.target,
|
|
2668
2687
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
2669
2688
|
create_notification_activity: request?.create_notification_activity,
|
|
2689
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
2670
2690
|
push_preference: request?.push_preference,
|
|
2671
2691
|
skip_push: request?.skip_push,
|
|
2672
2692
|
custom: request?.custom
|
|
@@ -2701,7 +2721,8 @@ class FeedsApi {
|
|
|
2701
2721
|
}
|
|
2702
2722
|
async followBatch(request) {
|
|
2703
2723
|
const body = {
|
|
2704
|
-
follows: request?.follows
|
|
2724
|
+
follows: request?.follows,
|
|
2725
|
+
enrich_own_fields: request?.enrich_own_fields
|
|
2705
2726
|
};
|
|
2706
2727
|
const response = await this.apiClient.sendRequest(
|
|
2707
2728
|
"POST",
|
|
@@ -2716,7 +2737,8 @@ class FeedsApi {
|
|
|
2716
2737
|
}
|
|
2717
2738
|
async getOrCreateFollows(request) {
|
|
2718
2739
|
const body = {
|
|
2719
|
-
follows: request?.follows
|
|
2740
|
+
follows: request?.follows,
|
|
2741
|
+
enrich_own_fields: request?.enrich_own_fields
|
|
2720
2742
|
};
|
|
2721
2743
|
const response = await this.apiClient.sendRequest(
|
|
2722
2744
|
"POST",
|
|
@@ -2766,7 +2788,8 @@ class FeedsApi {
|
|
|
2766
2788
|
}
|
|
2767
2789
|
async unfollow(request) {
|
|
2768
2790
|
const queryParams = {
|
|
2769
|
-
delete_notification_activity: request?.delete_notification_activity
|
|
2791
|
+
delete_notification_activity: request?.delete_notification_activity,
|
|
2792
|
+
enrich_own_fields: request?.enrich_own_fields
|
|
2770
2793
|
};
|
|
2771
2794
|
const pathParams = {
|
|
2772
2795
|
source: request?.source,
|
|
@@ -2784,7 +2807,8 @@ class FeedsApi {
|
|
|
2784
2807
|
async getOrCreateUnfollows(request) {
|
|
2785
2808
|
const body = {
|
|
2786
2809
|
follows: request?.follows,
|
|
2787
|
-
delete_notification_activity: request?.delete_notification_activity
|
|
2810
|
+
delete_notification_activity: request?.delete_notification_activity,
|
|
2811
|
+
enrich_own_fields: request?.enrich_own_fields
|
|
2788
2812
|
};
|
|
2789
2813
|
const response = await this.apiClient.sendRequest(
|
|
2790
2814
|
"POST",
|
|
@@ -4104,7 +4128,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
|
|
|
4104
4128
|
};
|
|
4105
4129
|
return result;
|
|
4106
4130
|
};
|
|
4107
|
-
const version = "0.3.
|
|
4131
|
+
const version = "0.3.51";
|
|
4108
4132
|
const axios = axiosImport.default ?? axiosImport;
|
|
4109
4133
|
class ApiClient {
|
|
4110
4134
|
constructor(apiKey, tokenManager, connectionIdManager, options) {
|
|
@@ -7149,11 +7173,12 @@ const _Feed = class _Feed extends FeedApi {
|
|
|
7149
7173
|
});
|
|
7150
7174
|
return response;
|
|
7151
7175
|
}
|
|
7152
|
-
async unfollow(feedOrFid, options) {
|
|
7176
|
+
async unfollow(feedOrFid, options, enrichOwnFields) {
|
|
7153
7177
|
const fid = typeof feedOrFid === "string" ? feedOrFid : feedOrFid.feed;
|
|
7154
7178
|
const response = await this.client.unfollow({
|
|
7155
7179
|
source: this.feed,
|
|
7156
7180
|
target: fid,
|
|
7181
|
+
enrich_own_fields: enrichOwnFields,
|
|
7157
7182
|
...options
|
|
7158
7183
|
});
|
|
7159
7184
|
return response;
|
|
@@ -8280,4 +8305,4 @@ exports.replaceUniqueArrayMerge = replaceUniqueArrayMerge;
|
|
|
8280
8305
|
exports.shouldUpdateState = shouldUpdateState;
|
|
8281
8306
|
exports.uniqueArrayMerge = uniqueArrayMerge;
|
|
8282
8307
|
exports.updateEntityInArray = updateEntityInArray;
|
|
8283
|
-
//# sourceMappingURL=feeds-client-
|
|
8308
|
+
//# sourceMappingURL=feeds-client-B4zeBggL.js.map
|