UNPKG

@droppii-org/chat-sdk

Version:

Droppii React Chat SDK

18 lines (17 loc) 722 B
import { useQuery } from "@tanstack/react-query"; import { QUERY_KEYS } from "../../services/query"; import { apiInstance } from "../../services/api"; import { ENDPOINTS } from "../../services/routes"; import { DChatApplicationType } from "../../types/chat"; export const useGetLabelSession = () => useQuery({ queryKey: [QUERY_KEYS.GET_LABEL_SESSION], queryFn: async () => { var _a; const res = await apiInstance.get(ENDPOINTS.chatService.getLabelSession, { params: { applicationType: DChatApplicationType.OBEFE, }, }); return (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.data; }, });