@@ -43,6 +43,8 @@ import {
4343 DeleteFeedUserDataRequest ,
4444 DeleteFeedUserDataResponse ,
4545 DeleteFeedViewResponse ,
46+ DeleteFeedsBatchRequest ,
47+ DeleteFeedsBatchResponse ,
4648 ExportFeedUserDataResponse ,
4749 FollowBatchRequest ,
4850 FollowBatchResponse ,
@@ -66,8 +68,8 @@ import {
6668 ListFeedViewsResponse ,
6769 ListFeedVisibilitiesResponse ,
6870 MarkActivityRequest ,
69- OwnCapabilitiesBatchRequest ,
70- OwnCapabilitiesBatchResponse ,
71+ OwnBatchRequest ,
72+ OwnBatchResponse ,
7173 PinActivityRequest ,
7274 PinActivityResponse ,
7375 PollVoteResponse ,
@@ -1237,6 +1239,7 @@ export class FeedsApi {
12371239 view : request ?. view ,
12381240 watch : request ?. watch ,
12391241 data : request ?. data ,
1242+ enrichment_options : request ?. enrichment_options ,
12401243 external_ranking : request ?. external_ranking ,
12411244 filter : request ?. filter ,
12421245 followers_pagination : request ?. followers_pagination ,
@@ -1849,27 +1852,52 @@ export class FeedsApi {
18491852 return { ...response . body , metadata : response . metadata } ;
18501853 }
18511854
1852- async ownCapabilitiesBatch (
1853- request : OwnCapabilitiesBatchRequest ,
1854- ) : Promise < StreamResponse < OwnCapabilitiesBatchResponse > > {
1855+ async deleteFeedsBatch (
1856+ request : DeleteFeedsBatchRequest ,
1857+ ) : Promise < StreamResponse < DeleteFeedsBatchResponse > > {
1858+ const body = {
1859+ feeds : request ?. feeds ,
1860+ hard_delete : request ?. hard_delete ,
1861+ } ;
1862+
1863+ const response = await this . apiClient . sendRequest <
1864+ StreamResponse < DeleteFeedsBatchResponse >
1865+ > (
1866+ 'POST' ,
1867+ '/api/v2/feeds/feeds/delete' ,
1868+ undefined ,
1869+ undefined ,
1870+ body ,
1871+ 'application/json' ,
1872+ ) ;
1873+
1874+ decoders . DeleteFeedsBatchResponse ?.( response . body ) ;
1875+
1876+ return { ...response . body , metadata : response . metadata } ;
1877+ }
1878+
1879+ async ownBatch (
1880+ request : OwnBatchRequest ,
1881+ ) : Promise < StreamResponse < OwnBatchResponse > > {
18551882 const body = {
18561883 feeds : request ?. feeds ,
18571884 user_id : request ?. user_id ,
1885+ fields : request ?. fields ,
18581886 user : request ?. user ,
18591887 } ;
18601888
18611889 const response = await this . apiClient . sendRequest <
1862- StreamResponse < OwnCapabilitiesBatchResponse >
1890+ StreamResponse < OwnBatchResponse >
18631891 > (
18641892 'POST' ,
1865- '/api/v2/feeds/feeds/own_capabilities /batch' ,
1893+ '/api/v2/feeds/feeds/own /batch' ,
18661894 undefined ,
18671895 undefined ,
18681896 body ,
18691897 'application/json' ,
18701898 ) ;
18711899
1872- decoders . OwnCapabilitiesBatchResponse ?.( response . body ) ;
1900+ decoders . OwnBatchResponse ?.( response . body ) ;
18731901
18741902 return { ...response . body , metadata : response . metadata } ;
18751903 }
@@ -2031,6 +2059,29 @@ export class FeedsApi {
20312059 return { ...response . body , metadata : response . metadata } ;
20322060 }
20332061
2062+ async getOrCreateFollows (
2063+ request : FollowBatchRequest ,
2064+ ) : Promise < StreamResponse < FollowBatchResponse > > {
2065+ const body = {
2066+ follows : request ?. follows ,
2067+ } ;
2068+
2069+ const response = await this . apiClient . sendRequest <
2070+ StreamResponse < FollowBatchResponse >
2071+ > (
2072+ 'POST' ,
2073+ '/api/v2/feeds/follows/batch/upsert' ,
2074+ undefined ,
2075+ undefined ,
2076+ body ,
2077+ 'application/json' ,
2078+ ) ;
2079+
2080+ decoders . FollowBatchResponse ?.( response . body ) ;
2081+
2082+ return { ...response . body , metadata : response . metadata } ;
2083+ }
2084+
20342085 async queryFollows (
20352086 request ?: QueryFollowsRequest ,
20362087 ) : Promise < StreamResponse < QueryFollowsResponse > > {
@@ -2256,6 +2307,29 @@ export class FeedsApi {
22562307 return { ...response . body , metadata : response . metadata } ;
22572308 }
22582309
2310+ async getOrCreateUnfollows (
2311+ request : UnfollowBatchRequest ,
2312+ ) : Promise < StreamResponse < UnfollowBatchResponse > > {
2313+ const body = {
2314+ follows : request ?. follows ,
2315+ } ;
2316+
2317+ const response = await this . apiClient . sendRequest <
2318+ StreamResponse < UnfollowBatchResponse >
2319+ > (
2320+ 'POST' ,
2321+ '/api/v2/feeds/unfollow/batch/upsert' ,
2322+ undefined ,
2323+ undefined ,
2324+ body ,
2325+ 'application/json' ,
2326+ ) ;
2327+
2328+ decoders . UnfollowBatchResponse ?.( response . body ) ;
2329+
2330+ return { ...response . body , metadata : response . metadata } ;
2331+ }
2332+
22592333 async deleteFeedUserData (
22602334 request : DeleteFeedUserDataRequest & { user_id : string } ,
22612335 ) : Promise < StreamResponse < DeleteFeedUserDataResponse > > {
0 commit comments