feat: Add user prompt preferences and favorites functionality

This commit is contained in:
Marco Beretta 2025-06-01 11:55:45 +02:00
parent f2f4bf87ca
commit 0e26df0390
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
16 changed files with 788 additions and 54 deletions

View file

@ -701,6 +701,21 @@ export function getRandomPrompts(
return request.get(endpoints.getRandomPrompts(variables.limit, variables.skip));
}
/* Prompt Favorites and Rankings */
export function togglePromptFavorite(groupId: string): Promise<t.TPromptFavoriteResponse> {
return request.post(endpoints.togglePromptFavorite(groupId));
}
export function updatePromptRankings(
variables: t.TPromptRankingRequest,
): Promise<t.TPromptRankingResponse> {
return request.put(endpoints.updatePromptRankings(), variables);
}
export function getUserPromptPreferences(): Promise<t.TGetUserPromptPreferencesResponse> {
return request.get(endpoints.getUserPromptPreferences());
}
/* Roles */
export function getRole(roleName: string): Promise<r.TRole> {
return request.get(endpoints.getRole(roleName));