diff --git a/src/gen/feeds/FeedsApi.ts b/src/gen/feeds/FeedsApi.ts index 52404fd..641e367 100644 --- a/src/gen/feeds/FeedsApi.ts +++ b/src/gen/feeds/FeedsApi.ts @@ -70,6 +70,7 @@ import { GetOrCreateFollowResponse, GetOrCreateUnfollowRequest, GetOrCreateUnfollowResponse, + GetUserInterestsResponse, ListFeedGroupsResponse, ListFeedViewsResponse, ListFeedVisibilitiesResponse, @@ -2908,4 +2909,29 @@ export class FeedsApi { return { ...response.body, metadata: response.metadata }; } + + async getUserInterests(request: { + user_id: string; + limit?: number; + }): Promise> { + const queryParams = { + limit: request?.limit, + }; + const pathParams = { + user_id: request?.user_id, + }; + + const response = await this.apiClient.sendRequest< + StreamResponse + >( + 'GET', + '/api/v2/feeds/users/{user_id}/interests', + pathParams, + queryParams, + ); + + decoders.GetUserInterestsResponse?.(response.body); + + return { ...response.body, metadata: response.metadata }; + } } diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index a41e1ed..20c3a42 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -11362,6 +11362,15 @@ export interface GetUserGroupResponse { user_group?: UserGroupResponse; } +export interface GetUserInterestsResponse { + duration: string; + + /** + * Top-N interest tags sorted by descending count, then alphabetically by tag + */ + interests: InterestTagResponse[]; +} + export interface GoLiveRequest { recording_storage_name?: string; @@ -11931,6 +11940,18 @@ export interface InsertActionLogResponse { duration: string; } +export interface InterestTagResponse { + /** + * Number of distinct reacted-to activities tagged with this value + */ + count: number; + + /** + * The interest tag value + */ + tag: string; +} + export interface JoinCallAPIMetrics { failures: number;