"use client"; import { http } from "@/shared/api/httpClient"; import { API_ROUTES } from "@/shared/constants/api-routes"; import { GetMyChatSettingsResponseSchema, type IChatSettings, type IGetMyChatSettingsResponse, type IUpdateMyChatSettingsResponse, UpdateMyChatSettingsResponseSchema, } from "./types"; /** * Fetch current user's chat settings (client-side) */ export const getMyChatSettings = async (): Promise => { return http.get( API_ROUTES.getMyChatSettings(), { tags: ["profile", "chat-settings"], schema: GetMyChatSettingsResponseSchema, revalidate: 0, } ); }; /** * Update current user's chat settings (client-side) */ export const updateMyChatSettings = async ( settings: IChatSettings ): Promise => { return http.put( API_ROUTES.updateMyChatSettings(), settings, { tags: ["profile", "chat-settings"], schema: UpdateMyChatSettingsResponseSchema, revalidate: 0, } ); };