Skip to content

Commit 59bbffe

Browse files
committed
Changed view_id as a path param in getOrCreateFeedView
1 parent 35a3dfa commit 59bbffe

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

src/gen/feeds/FeedsApi.ts

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,33 +1458,6 @@ export class FeedsApi {
14581458
return { ...response.body, metadata: response.metadata };
14591459
}
14601460

1461-
async getOrCreateFeedView(
1462-
request: GetOrCreateFeedViewRequest,
1463-
): Promise<StreamResponse<GetOrCreateFeedViewResponse>> {
1464-
const body = {
1465-
view_id: request?.view_id,
1466-
activity_processors: request?.activity_processors,
1467-
activity_selectors: request?.activity_selectors,
1468-
aggregation: request?.aggregation,
1469-
ranking: request?.ranking,
1470-
};
1471-
1472-
const response = await this.apiClient.sendRequest<
1473-
StreamResponse<GetOrCreateFeedViewResponse>
1474-
>(
1475-
'POST',
1476-
'/api/v2/feeds/feed_views/get_or_create',
1477-
undefined,
1478-
undefined,
1479-
body,
1480-
'application/json',
1481-
);
1482-
1483-
decoders.GetOrCreateFeedViewResponse?.(response.body);
1484-
1485-
return { ...response.body, metadata: response.metadata };
1486-
}
1487-
14881461
async deleteFeedView(request: {
14891462
view_id: string;
14901463
}): Promise<StreamResponse<DeleteFeedViewResponse>> {
@@ -1517,6 +1490,35 @@ export class FeedsApi {
15171490
return { ...response.body, metadata: response.metadata };
15181491
}
15191492

1493+
async getOrCreateFeedView(
1494+
request: GetOrCreateFeedViewRequest & { view_id: string },
1495+
): Promise<StreamResponse<GetOrCreateFeedViewResponse>> {
1496+
const pathParams = {
1497+
view_id: request?.view_id,
1498+
};
1499+
const body = {
1500+
activity_processors: request?.activity_processors,
1501+
activity_selectors: request?.activity_selectors,
1502+
aggregation: request?.aggregation,
1503+
ranking: request?.ranking,
1504+
};
1505+
1506+
const response = await this.apiClient.sendRequest<
1507+
StreamResponse<GetOrCreateFeedViewResponse>
1508+
>(
1509+
'POST',
1510+
'/api/v2/feeds/feed_views/{view_id}',
1511+
pathParams,
1512+
undefined,
1513+
body,
1514+
'application/json',
1515+
);
1516+
1517+
decoders.GetOrCreateFeedViewResponse?.(response.body);
1518+
1519+
return { ...response.body, metadata: response.metadata };
1520+
}
1521+
15201522
async updateFeedView(
15211523
request: UpdateFeedViewRequest & { view_id: string },
15221524
): Promise<StreamResponse<UpdateFeedViewResponse>> {

src/gen/models/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6106,8 +6106,6 @@ export interface GetOrCreateFeedResponse {
61066106
}
61076107

61086108
export interface GetOrCreateFeedViewRequest {
6109-
view_id: string;
6110-
61116109
activity_processors?: ActivityProcessorConfig[];
61126110

61136111
activity_selectors?: ActivitySelectorConfig[];

0 commit comments

Comments
 (0)