From cf03fe0ccde6bec66e336a0a1a6fbccc55fa44ee Mon Sep 17 00:00:00 2001 From: Jimmy Pettersson Date: Tue, 7 Oct 2025 14:22:29 +0200 Subject: [PATCH] add updateFeedVisibility --- src/gen/feeds/FeedsApi.ts | 28 ++++++++++++++++++++++++++++ src/gen/models/index.ts | 10 ++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/gen/feeds/FeedsApi.ts b/src/gen/feeds/FeedsApi.ts index 3ae0881..00b39c1 100644 --- a/src/gen/feeds/FeedsApi.ts +++ b/src/gen/feeds/FeedsApi.ts @@ -112,6 +112,8 @@ import { UpdateFeedResponse, UpdateFeedViewRequest, UpdateFeedViewResponse, + UpdateFeedVisibilityRequest, + UpdateFeedVisibilityResponse, UpdateFollowRequest, UpdateFollowResponse, UpdateMembershipLevelRequest, @@ -1657,6 +1659,32 @@ export class FeedsApi { return { ...response.body, metadata: response.metadata }; } + async updateFeedVisibility( + request: UpdateFeedVisibilityRequest & { name: string }, + ): Promise> { + const pathParams = { + name: request?.name, + }; + const body = { + grants: request?.grants, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'PUT', + '/api/v2/feeds/feed_visibilities/{name}', + pathParams, + undefined, + body, + 'application/json', + ); + + decoders.UpdateFeedVisibilityResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } + async createFeedsBatch( request: CreateFeedsBatchRequest, ): Promise> { diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index d3c13d6..b8e5933 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -12614,6 +12614,16 @@ export interface UpdateFeedViewResponse { feed_view: FeedViewResponse; } +export interface UpdateFeedVisibilityRequest { + grants?: Record; +} + +export interface UpdateFeedVisibilityResponse { + duration: string; + + feed_visibility: FeedVisibilityResponse; +} + export interface UpdateFollowRequest { source: string;