UNPKG

@droppii-org/chat-sdk

Version:

Droppii React Chat SDK

19 lines (18 loc) 700 B
import { useMutation } from "@tanstack/react-query"; import { QUERY_KEYS } from "../../services/query"; import { apiInstance } from "../../services/api"; import { ENDPOINTS } from "../../services/routes"; export const useCreateNote = () => useMutation({ mutationKey: [QUERY_KEYS.CREATE_NOTE], mutationFn: async ({ conversationId, content, targetId, }) => { const res = await apiInstance.post(ENDPOINTS.chatService.createNote, { conversationId, content, targetId, targetType: "USER", }, { params: { applicationType: "OBEFE" }, }); return res === null || res === void 0 ? void 0 : res.data; }, });