@clickcns/vmedic-react 0.0.24 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,6 @@
1
- import { TranscribeV3Response, TranscribeWithTranslationResponse, UploadRequest, UploadResponse, UploadV3Request } from '../../../types/api';
1
+ import { TranscribeV3Request, TranscribeV3Response, TranscribeWithTranslationResponse, UploadRequest, UploadResponse, UploadV3Request } from '../../../types/api';
2
2
  export declare const speechApi: {
3
- transcribeV3: ({ buffer, }: {
4
- buffer: ArrayBuffer | Blob;
5
- }) => Promise<TranscribeV3Response>;
3
+ transcribeV3: ({ buffer, useProofreading, }: TranscribeV3Request) => Promise<TranscribeV3Response>;
6
4
  transcribeWithTranslation: ({ buffer, language, }: {
7
5
  buffer: ArrayBuffer | Blob;
8
6
  language: string;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../feedback-xoeZc8ns.cjs"),d=require("../../user-notifications-Bh5Z6eqH.cjs"),u={getChatRooms:async e=>(await a.apiClient.get(`/speech/chat/rooms/${e}`)).data,deleteChatRoom:async({roomId:e})=>(await a.apiClient.delete(`/speech/chat/rooms/${e}`)).data,getChatMessages:async({roomId:e})=>{const t=await a.apiClient.get(`/speech/chat/messages/${e}`);return{roomId:e,msgs:t.data}},updateChatRoomName:async({roomId:e,name:t})=>(await a.apiClient.patch(`/speech/chat/rooms/${e}`,{name:t})).data},l={getRecords:async()=>(await a.apiClient.get("/speech/records")).data,getRecordsWithPage:async e=>(await a.apiClient.post("/speech/records",e)).data,deleteRecord:async({recordId:e})=>(await a.apiClient.delete(`/speech/records/${e}`)).data,getRecordById:async({recordId:e})=>(await a.apiClient.get(`/speech/records/${e}/details`)).data,getTodayRecord:async({chart:e})=>(await a.apiClient.get("/speech/records/details/today",{params:{chart:e}})).data,getRecordsByChart:async({chart:e})=>(await a.apiClient.get(`/speech/records/${e}`)).data,getRecordFromImage:async({imageUrl:e})=>(await a.apiClient.post("/speech/records/from-image",{imageUrl:e})).data,getRecordFromAgent:async e=>(await a.apiClient.post("/speech/records/from-agent",e)).data,getRecordsByDates:async({startDate:e,endDate:t,page:s,searchText:r,ykiho:i,username:p})=>(await a.apiClient.get("/speech/records/by-dates",{params:{startDate:e,endDate:t,page:Number(s),...r&&{searchText:r},...i&&{ykiho:i},...p&&{username:p}}})).data,getPatients:async()=>(await a.apiClient.get("/speech/patients")).data,getRecordData:async({recordId:e})=>(await a.apiClient.get(`/speech/record-datas/${e}`)).data},y={getPatientByChart:async({chart:e})=>(await a.apiClient.get(`/speech/patients/${e}`)).data,upsertPatient:async({chart:e,name:t})=>(await a.apiClient.put("/speech/patients",{chart:e,name:t})).data,hasPatientHistory:async({chart:e})=>(await a.apiClient.get(`/speech/patients/has-history/${e}`)).data,getPatientHistorySummary:async({chart:e,excludeRecordId:t,signal:s})=>(await a.apiClient.get("/speech/patients/history-summary",{params:{chart:e,excludeRecordId:t},signal:s})).data},h={deleteAudioFile:async({audioFileId:e})=>(await a.apiClient.delete(`/speech/audios/${e}`)).data},g={resummaryPart:async({recordId:e,level:t,part:s})=>(await a.apiClient.post("/speech/record-datas/resummary/part",{recordId:e,level:t,part:s})).data},w=e=>{const t=e instanceof Blob?e:new Blob([e],{type:"audio/pcm"}),s=new FormData;return s.append("file",t,"audio.pcm"),s},o=async(e,t,s)=>{const r=w(t);return s&&r.append("language",s),(await a.apiClient.post(e,r,{headers:{"Content-Type":"multipart/form-data"}})).data},C={transcribeV3:async({buffer:e})=>o("/speech/transcribe-v3",e),transcribeWithTranslation:async({buffer:e,language:t})=>o("/speech/transcribe-with-translation",e,t),uploadV3:async({opusBlob:e,chart:t,recordId:s,transcript:r,transcripts:i,durationSeconds:p})=>{const n=new FormData;return n.append("opusFile",new Blob([e],{type:"audio/webm"}),"audio.webm"),n.append("chart",t),n.append("transcript",r),n.append("transcripts",JSON.stringify(i)),n.append("durationSeconds",p.toString()),s&&n.append("recordId",s),(await a.apiClient.post("/speech/upload-with-translation",n,{headers:{"Content-Type":"multipart/form-data"}})).data},upload:async({opusBlob:e,vadBuffer:t,totalBuffer:s,chart:r,recordId:i,transcript:p})=>{const n=new FormData;return n.append("opusFile",new Blob([e],{type:"audio/webm"}),"audio.webm"),n.append("totalFile",new Blob([s],{type:"audio/pcm"}),"audio.pcm"),t&&n.append("vadFile",new Blob([t],{type:"audio/pcm"}),"audio.pcm"),n.append("chart",r),n.append("transcript",p),i&&n.append("recordId",i),(await a.apiClient.post("/speech/upload",n,{headers:{"Content-Type":"multipart/form-data"}})).data},chat:u,records:l,patients:y,audios:h,recordData:g},m={getAudioFile:async({bucket:e,keys:t})=>(await a.apiClient.get("/audio",{params:{bucket:e,keys:t},responseType:"blob"})).data},b={register:async e=>(await a.apiClient.post("/auth/register",e)).data,login:async e=>(await a.apiClient.post("/auth/login",e)).data,getMe:async()=>(await a.apiClient.get("/auth/me")).data,logout:async()=>{await a.apiClient.post("/auth/logout")},updateMe:async e=>(await a.apiClient.patch("/auth/me",e)).data,generateNewUserKey:async({userId:e})=>(await a.apiClient.put(`/auth/user/generate-key/${e}`)).data,adminLogin:async e=>(await a.apiClient.post("/auth/admin-login",e)).data,updateUser:async e=>(await a.apiClient.put(`/auth/user/${e.id}`,e)).data,deleteUser:async e=>{await a.apiClient.delete(`/auth/user/${e}`)},changePassword:async e=>{await a.apiClient.patch("/auth/me/change-password",e)}},A={getMy:async()=>(await a.apiClient.get("/capture-rects/my")).data,getCaptureRects:async()=>(await a.apiClient.get("capture-rects")).data,getCaptureRect:async e=>(await a.apiClient.get(`capture-rects/${e}`)).data,createCaptureRect:async e=>(await a.apiClient.post("capture-rects",e)).data,updateCaptureRect:async({id:e,data:t})=>(await a.apiClient.patch(`capture-rects/${e}`,t)).data,deleteCaptureRect:async e=>(await a.apiClient.delete(`capture-rects/${e}`)).data},$={diarization:async(e,t)=>(await a.apiClient.post("/llm/diarization",e,{signal:t})).data,medicalSummary:async({request:e,signal:t})=>(await a.apiClient.post("/llm/medical-summary",e,{signal:t})).data,mindmap:async({conversation:e})=>(await a.apiClient.post("/llm/mindmap",{conversation:e})).data,diseaseRecommendation:async({conversation:e})=>(await a.apiClient.post("/llm/disease-recommendation",{conversation:e})).data},R={getNotices:async e=>(await a.apiClient.post("/notices/page",{page:e?.page??1,count:e?.count??10,searchText:e?.searchText,showPublishedOnly:e?.showPublishedOnly??!0})).data,getNotice:async e=>(await a.apiClient.get(`/notices/${e}`)).data,createNotice:async e=>(await a.apiClient.post("/notices",e)).data,updateNotice:async(e,t)=>(await a.apiClient.put(`/notices/${e}`,t)).data,deleteNotice:async e=>{await a.apiClient.delete(`/notices/${e}`)}},f={getPartners:async()=>(await a.apiClient.get("/partners")).data,getPartner:async e=>(await a.apiClient.get(`/partners/${e}`)).data,createPartner:async e=>(await a.apiClient.post("/partners",e)).data,updatePartner:async(e,t)=>(await a.apiClient.patch(`/partners/${e}`,t)).data,deletePartner:async e=>(await a.apiClient.delete(`/partners/${e}`)).data},P={subscribe:async e=>(await a.apiClient.post("/push/subscribe",e.toJSON())).data,unsubscribe:async e=>(await a.apiClient.post("/push/unsubscribe",{endpoint:e})).data,getSubscriptionStatus:async()=>(await a.apiClient.get("/push/status")).data,sendNotification:async e=>{await a.apiClient.post("/push/send",e)}},N={getUserSettings:async()=>(await a.apiClient.get("/user-settings")).data,updateUserSettings:async e=>(await a.apiClient.put("/user-settings",e)).data},S={getInstitutions:async()=>(await a.apiClient.get("institutions")).data,register:async e=>(await a.apiClient.post("institutions",e)).data,update:async({ykiho:e,data:t})=>(await a.apiClient.patch(`institutions/${e}`,t)).data,delete:async e=>{await a.apiClient.delete(`institutions/${e}`)}};Object.defineProperty(exports,"apiClient",{enumerable:!0,get:()=>a.apiClient});exports.feedbackApi=a.feedbackApi;exports.initializeAxios=a.initializeAxios;exports.userNotificationsApi=d.userNotificationsApi;exports.audioApi=m;exports.authApi=b;exports.captureRectsApi=A;exports.institutionsApi=S;exports.llmApi=$;exports.noticeApi=R;exports.partnersApi=f;exports.pushApi=P;exports.speechApi=C;exports.userSettingsApi=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../feedback-xoeZc8ns.cjs"),d=require("../../user-notifications-Bh5Z6eqH.cjs"),u={getChatRooms:async e=>(await a.apiClient.get(`/speech/chat/rooms/${e}`)).data,deleteChatRoom:async({roomId:e})=>(await a.apiClient.delete(`/speech/chat/rooms/${e}`)).data,getChatMessages:async({roomId:e})=>{const t=await a.apiClient.get(`/speech/chat/messages/${e}`);return{roomId:e,msgs:t.data}},updateChatRoomName:async({roomId:e,name:t})=>(await a.apiClient.patch(`/speech/chat/rooms/${e}`,{name:t})).data},l={getRecords:async()=>(await a.apiClient.get("/speech/records")).data,getRecordsWithPage:async e=>(await a.apiClient.post("/speech/records",e)).data,deleteRecord:async({recordId:e})=>(await a.apiClient.delete(`/speech/records/${e}`)).data,getRecordById:async({recordId:e})=>(await a.apiClient.get(`/speech/records/${e}/details`)).data,getTodayRecord:async({chart:e})=>(await a.apiClient.get("/speech/records/details/today",{params:{chart:e}})).data,getRecordsByChart:async({chart:e})=>(await a.apiClient.get(`/speech/records/${e}`)).data,getRecordFromImage:async({imageUrl:e})=>(await a.apiClient.post("/speech/records/from-image",{imageUrl:e})).data,getRecordFromAgent:async e=>(await a.apiClient.post("/speech/records/from-agent",e)).data,getRecordsByDates:async({startDate:e,endDate:t,page:s,searchText:i,ykiho:r,username:p})=>(await a.apiClient.get("/speech/records/by-dates",{params:{startDate:e,endDate:t,page:Number(s),...i&&{searchText:i},...r&&{ykiho:r},...p&&{username:p}}})).data,getPatients:async()=>(await a.apiClient.get("/speech/patients")).data,getRecordData:async({recordId:e})=>(await a.apiClient.get(`/speech/record-datas/${e}`)).data},y={getPatientByChart:async({chart:e})=>(await a.apiClient.get(`/speech/patients/${e}`)).data,upsertPatient:async({chart:e,name:t})=>(await a.apiClient.put("/speech/patients",{chart:e,name:t})).data,hasPatientHistory:async({chart:e})=>(await a.apiClient.get(`/speech/patients/has-history/${e}`)).data,getPatientHistorySummary:async({chart:e,excludeRecordId:t,signal:s})=>(await a.apiClient.get("/speech/patients/history-summary",{params:{chart:e,excludeRecordId:t},signal:s})).data},h={deleteAudioFile:async({audioFileId:e})=>(await a.apiClient.delete(`/speech/audios/${e}`)).data},g={resummaryPart:async({recordId:e,level:t,part:s})=>(await a.apiClient.post("/speech/record-datas/resummary/part",{recordId:e,level:t,part:s})).data},w=e=>{const t=e instanceof Blob?e:new Blob([e],{type:"audio/pcm"}),s=new FormData;return s.append("file",t,"audio.pcm"),s},o=async(e,t,s,i=!0)=>{const r=w(t);return s&&r.append("language",s),r.append("useProofreading",String(i)),(await a.apiClient.post(e,r,{headers:{"Content-Type":"multipart/form-data"}})).data},C={transcribeV3:async({buffer:e,useProofreading:t})=>o("/speech/transcribe-v3",e,void 0,t),transcribeWithTranslation:async({buffer:e,language:t})=>o("/speech/transcribe-with-translation",e,t),uploadV3:async({opusBlob:e,chart:t,recordId:s,transcript:i,transcripts:r,durationSeconds:p})=>{const n=new FormData;return n.append("opusFile",new Blob([e],{type:"audio/webm"}),"audio.webm"),n.append("chart",t),n.append("transcript",i),n.append("transcripts",JSON.stringify(r)),n.append("durationSeconds",p.toString()),s&&n.append("recordId",s),(await a.apiClient.post("/speech/upload-with-translation",n,{headers:{"Content-Type":"multipart/form-data"}})).data},upload:async({opusBlob:e,vadBuffer:t,totalBuffer:s,chart:i,recordId:r,transcript:p})=>{const n=new FormData;return n.append("opusFile",new Blob([e],{type:"audio/webm"}),"audio.webm"),n.append("totalFile",new Blob([s],{type:"audio/pcm"}),"audio.pcm"),t&&n.append("vadFile",new Blob([t],{type:"audio/pcm"}),"audio.pcm"),n.append("chart",i),n.append("transcript",p),r&&n.append("recordId",r),(await a.apiClient.post("/speech/upload",n,{headers:{"Content-Type":"multipart/form-data"}})).data},chat:u,records:l,patients:y,audios:h,recordData:g},m={getAudioFile:async({bucket:e,keys:t})=>(await a.apiClient.get("/audio",{params:{bucket:e,keys:t},responseType:"blob"})).data},b={register:async e=>(await a.apiClient.post("/auth/register",e)).data,login:async e=>(await a.apiClient.post("/auth/login",e)).data,getMe:async()=>(await a.apiClient.get("/auth/me")).data,logout:async()=>{await a.apiClient.post("/auth/logout")},updateMe:async e=>(await a.apiClient.patch("/auth/me",e)).data,generateNewUserKey:async({userId:e})=>(await a.apiClient.put(`/auth/user/generate-key/${e}`)).data,adminLogin:async e=>(await a.apiClient.post("/auth/admin-login",e)).data,updateUser:async e=>(await a.apiClient.put(`/auth/user/${e.id}`,e)).data,deleteUser:async e=>{await a.apiClient.delete(`/auth/user/${e}`)},changePassword:async e=>{await a.apiClient.patch("/auth/me/change-password",e)}},A={getMy:async()=>(await a.apiClient.get("/capture-rects/my")).data,getCaptureRects:async()=>(await a.apiClient.get("capture-rects")).data,getCaptureRect:async e=>(await a.apiClient.get(`capture-rects/${e}`)).data,createCaptureRect:async e=>(await a.apiClient.post("capture-rects",e)).data,updateCaptureRect:async({id:e,data:t})=>(await a.apiClient.patch(`capture-rects/${e}`,t)).data,deleteCaptureRect:async e=>(await a.apiClient.delete(`capture-rects/${e}`)).data},$={diarization:async(e,t)=>(await a.apiClient.post("/llm/diarization",e,{signal:t})).data,medicalSummary:async({request:e,signal:t})=>(await a.apiClient.post("/llm/medical-summary",e,{signal:t})).data,mindmap:async({conversation:e})=>(await a.apiClient.post("/llm/mindmap",{conversation:e})).data,diseaseRecommendation:async({conversation:e})=>(await a.apiClient.post("/llm/disease-recommendation",{conversation:e})).data},R={getNotices:async e=>(await a.apiClient.post("/notices/page",{page:e?.page??1,count:e?.count??10,searchText:e?.searchText,showPublishedOnly:e?.showPublishedOnly??!0})).data,getNotice:async e=>(await a.apiClient.get(`/notices/${e}`)).data,createNotice:async e=>(await a.apiClient.post("/notices",e)).data,updateNotice:async(e,t)=>(await a.apiClient.put(`/notices/${e}`,t)).data,deleteNotice:async e=>{await a.apiClient.delete(`/notices/${e}`)}},f={getPartners:async()=>(await a.apiClient.get("/partners")).data,getPartner:async e=>(await a.apiClient.get(`/partners/${e}`)).data,createPartner:async e=>(await a.apiClient.post("/partners",e)).data,updatePartner:async(e,t)=>(await a.apiClient.patch(`/partners/${e}`,t)).data,deletePartner:async e=>(await a.apiClient.delete(`/partners/${e}`)).data},P={subscribe:async e=>(await a.apiClient.post("/push/subscribe",e.toJSON())).data,unsubscribe:async e=>(await a.apiClient.post("/push/unsubscribe",{endpoint:e})).data,getSubscriptionStatus:async()=>(await a.apiClient.get("/push/status")).data,sendNotification:async e=>{await a.apiClient.post("/push/send",e)}},S={getUserSettings:async()=>(await a.apiClient.get("/user-settings")).data,updateUserSettings:async e=>(await a.apiClient.put("/user-settings",e)).data},N={getInstitutions:async()=>(await a.apiClient.get("institutions")).data,register:async e=>(await a.apiClient.post("institutions",e)).data,update:async({ykiho:e,data:t})=>(await a.apiClient.patch(`institutions/${e}`,t)).data,delete:async e=>{await a.apiClient.delete(`institutions/${e}`)}};Object.defineProperty(exports,"apiClient",{enumerable:!0,get:()=>a.apiClient});exports.feedbackApi=a.feedbackApi;exports.initializeAxios=a.initializeAxios;exports.userNotificationsApi=d.userNotificationsApi;exports.audioApi=m;exports.authApi=b;exports.captureRectsApi=A;exports.institutionsApi=N;exports.llmApi=$;exports.noticeApi=R;exports.partnersApi=f;exports.pushApi=P;exports.speechApi=C;exports.userSettingsApi=S;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/api/common/speechs/speech-chat.ts","../../../src/api/common/speechs/speech-records.ts","../../../src/api/common/speechs/speech-patients.ts","../../../src/api/common/speechs/speech-audios.ts","../../../src/api/common/speechs/speech-record-datas.ts","../../../src/api/common/speechs/speech.ts","../../../src/api/common/audio.ts","../../../src/api/common/auth.ts","../../../src/api/common/capture-rects.ts","../../../src/api/common/llm.ts","../../../src/api/common/notice.ts","../../../src/api/common/partners.ts","../../../src/api/common/push.ts","../../../src/api/common/user-settings.ts","../../../src/api/common/institutions.ts"],"sourcesContent":["import type { ChatRoomsResponse, LlmMsg } from \"../../../types\";\r\nimport { apiClient } from \"../../axios\";\r\n\r\nexport const speechChat = {\r\n getChatRooms: async (recordId: string): Promise<ChatRoomsResponse[]> => {\r\n const res = await apiClient.get(`/speech/chat/rooms/${recordId}`);\r\n return res.data;\r\n },\r\n\r\n deleteChatRoom: async ({\r\n roomId,\r\n }: {\r\n roomId: string;\r\n }): Promise<ChatRoomsResponse> => {\r\n const res = await apiClient.delete(`/speech/chat/rooms/${roomId}`);\r\n return res.data;\r\n },\r\n\r\n getChatMessages: async ({\r\n roomId,\r\n }: {\r\n roomId: string;\r\n }): Promise<{ roomId: string; msgs: LlmMsg[] }> => {\r\n const res = await apiClient.get(`/speech/chat/messages/${roomId}`);\r\n return { roomId, msgs: res.data };\r\n },\r\n updateChatRoomName: async ({\r\n roomId,\r\n name,\r\n }: {\r\n roomId: string;\r\n name: string;\r\n }): Promise<ChatRoomsResponse> => {\r\n const res = await apiClient.patch(`/speech/chat/rooms/${roomId}`, {\r\n name,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n GetRecordsByDatesRequest,\r\n GetRecordsByDatesResponse,\r\n Patient,\r\n RecordData,\r\n RecordsPageRequest,\r\n RecordsResponse,\r\n RecordsWithPageResponse,\r\n} from \"../../../types/api\";\r\nimport type { PatientInfoDto } from \"../../../types\";\r\n\r\nexport const speechRecords = {\r\n getRecords: async (): Promise<RecordsResponse[]> => {\r\n const res = await apiClient.get(\"/speech/records\");\r\n return res.data;\r\n },\r\n\r\n getRecordsWithPage: async (\r\n dto: RecordsPageRequest\r\n ): Promise<RecordsWithPageResponse> => {\r\n const res = await apiClient.post(\"/speech/records\", dto);\r\n return res.data;\r\n },\r\n\r\n deleteRecord: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordsResponse> => {\r\n const res = await apiClient.delete(`/speech/records/${recordId}`);\r\n return res.data;\r\n },\r\n\r\n getRecordById: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordsResponse> => {\r\n const res = await apiClient.get(`/speech/records/${recordId}/details`);\r\n return res.data;\r\n },\r\n\r\n getTodayRecord: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.get(`/speech/records/details/today`, {\r\n params: { chart },\r\n });\r\n return res.data;\r\n },\r\n\r\n getRecordsByChart: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<RecordsResponse[]> => {\r\n const res = await apiClient.get(`/speech/records/${chart}`);\r\n return res.data;\r\n },\r\n\r\n getRecordFromImage: async ({\r\n imageUrl,\r\n }: {\r\n imageUrl: string;\r\n }): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.post(`/speech/records/from-image`, {\r\n imageUrl,\r\n });\r\n return res.data;\r\n },\r\n\r\n getRecordFromAgent: async (\r\n patientInfo: PatientInfoDto\r\n ): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.post(`/speech/records/from-agent`, patientInfo);\r\n return res.data;\r\n },\r\n\r\n // --- admin ---\r\n getRecordsByDates: async ({\r\n startDate,\r\n endDate,\r\n page,\r\n searchText,\r\n ykiho,\r\n username,\r\n }: GetRecordsByDatesRequest): Promise<GetRecordsByDatesResponse> => {\r\n const res = await apiClient.get(\"/speech/records/by-dates\", {\r\n params: {\r\n startDate,\r\n endDate,\r\n page: Number(page),\r\n ...(searchText && { searchText }),\r\n ...(ykiho && { ykiho }),\r\n ...(username && { username }),\r\n },\r\n });\r\n return res.data;\r\n },\r\n\r\n getPatients: async (): Promise<Patient[]> => {\r\n const res = await apiClient.get(\"/speech/patients\");\r\n return res.data;\r\n },\r\n\r\n getRecordData: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordData> => {\r\n const res = await apiClient.get(`/speech/record-datas/${recordId}`);\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n GetPatientHistoryRequest,\r\n Patient,\r\n PatientHistorySummaryResponse,\r\n HasPatientHistoryResponse,\r\n UpsertPatientRequest,\r\n} from \"../../../types/api\";\r\n\r\nexport const speechPatients = {\r\n getPatientByChart: async ({ chart }: { chart: string }): Promise<Patient> => {\r\n const res = await apiClient.get(`/speech/patients/${chart}`);\r\n return res.data;\r\n },\r\n\r\n upsertPatient: async ({\r\n chart,\r\n name,\r\n }: UpsertPatientRequest): Promise<Patient> => {\r\n const res = await apiClient.put(`/speech/patients`, { chart, name });\r\n return res.data;\r\n },\r\n\r\n /**\r\n * 과거 진료 기록 존재 여부 확인\r\n */\r\n hasPatientHistory: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<HasPatientHistoryResponse> => {\r\n const res = await apiClient.get(`/speech/patients/has-history/${chart}`);\r\n return res.data;\r\n },\r\n\r\n /**\r\n * 과거 진료 기록 요약 조회\r\n */\r\n getPatientHistorySummary: async ({\r\n chart,\r\n excludeRecordId,\r\n signal,\r\n }: GetPatientHistoryRequest & {\r\n signal?: AbortSignal;\r\n }): Promise<PatientHistorySummaryResponse> => {\r\n const res = await apiClient.get(`/speech/patients/history-summary`, {\r\n params: { chart, excludeRecordId },\r\n signal,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type { AudioFile } from \"../../../types/api\";\r\n\r\nexport const speechAudios = {\r\n deleteAudioFile: async ({\r\n audioFileId,\r\n }: {\r\n audioFileId: string;\r\n }): Promise<AudioFile> => {\r\n const res = await apiClient.delete(`/speech/audios/${audioFileId}`);\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type { MedicalSummaryResponse, ResummaryPartRequest } from \"../../../types/api\";\r\n\r\nexport const speechRecordData = {\r\n resummaryPart: async ({\r\n recordId,\r\n level,\r\n part,\r\n }: ResummaryPartRequest): Promise<MedicalSummaryResponse> => {\r\n const res = await apiClient.post(`/speech/record-datas/resummary/part`, {\r\n recordId,\r\n level,\r\n part,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n TranscribeV3Response,\r\n TranscribeWithTranslationResponse,\r\n UploadRequest,\r\n UploadResponse,\r\n UploadV3Request,\r\n} from \"../../../types/api\";\r\nimport { speechChat } from \"./speech-chat\";\r\nimport { speechRecords } from \"./speech-records\";\r\nimport { speechPatients } from \"./speech-patients\";\r\nimport { speechAudios } from \"./speech-audios\";\r\nimport { speechRecordData } from \"./speech-record-datas\";\r\n\r\n// Helper function to create FormData with audio file\r\nconst createAudioFormData = (buffer: ArrayBuffer | Blob): FormData => {\r\n const blob =\r\n buffer instanceof Blob ? buffer : new Blob([buffer], { type: \"audio/pcm\" });\r\n const formData = new FormData();\r\n formData.append(\"file\", blob, \"audio.pcm\");\r\n return formData;\r\n};\r\n\r\nconst transcribeWithEndpoint = async <T>(\r\n endpoint: string,\r\n buffer: ArrayBuffer | Blob,\r\n language?: string\r\n): Promise<T> => {\r\n const formData = createAudioFormData(buffer);\r\n if (language) {\r\n formData.append(\"language\", language);\r\n }\r\n const res = await apiClient.post(endpoint, formData, {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n });\r\n return res.data;\r\n};\r\n\r\nexport const speechApi = {\r\n transcribeV3: async ({\r\n buffer,\r\n }: {\r\n buffer: ArrayBuffer | Blob;\r\n }): Promise<TranscribeV3Response> => {\r\n return transcribeWithEndpoint(\"/speech/transcribe-v3\", buffer);\r\n },\r\n\r\n transcribeWithTranslation: async ({\r\n buffer,\r\n language,\r\n }: {\r\n buffer: ArrayBuffer | Blob;\r\n language: string;\r\n }): Promise<TranscribeWithTranslationResponse> => {\r\n return transcribeWithEndpoint(\r\n \"/speech/transcribe-with-translation\",\r\n buffer,\r\n language\r\n );\r\n },\r\n\r\n uploadV3: async ({\r\n opusBlob,\r\n chart,\r\n recordId,\r\n transcript,\r\n transcripts,\r\n durationSeconds,\r\n }: UploadV3Request): Promise<UploadResponse> => {\r\n const formData = new FormData();\r\n formData.append(\r\n \"opusFile\",\r\n new Blob([opusBlob], { type: \"audio/webm\" }),\r\n \"audio.webm\"\r\n );\r\n formData.append(\"chart\", chart);\r\n formData.append(\"transcript\", transcript);\r\n formData.append(\"transcripts\", JSON.stringify(transcripts));\r\n formData.append(\"durationSeconds\", durationSeconds.toString());\r\n if (recordId) formData.append(\"recordId\", recordId);\r\n\r\n const res = await apiClient.post(\r\n \"/speech/upload-with-translation\",\r\n formData,\r\n {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n }\r\n );\r\n return res.data;\r\n },\r\n\r\n upload: async ({\r\n opusBlob,\r\n vadBuffer,\r\n totalBuffer,\r\n chart,\r\n recordId,\r\n transcript,\r\n }: UploadRequest): Promise<UploadResponse> => {\r\n const formData = new FormData();\r\n formData.append(\r\n \"opusFile\",\r\n new Blob([opusBlob], { type: \"audio/webm\" }),\r\n \"audio.webm\"\r\n );\r\n formData.append(\r\n \"totalFile\",\r\n new Blob([totalBuffer], { type: \"audio/pcm\" }),\r\n \"audio.pcm\"\r\n );\r\n if (vadBuffer)\r\n formData.append(\r\n \"vadFile\",\r\n new Blob([vadBuffer], { type: \"audio/pcm\" }),\r\n \"audio.pcm\"\r\n );\r\n formData.append(\"chart\", chart);\r\n formData.append(\"transcript\", transcript);\r\n if (recordId) formData.append(\"recordId\", recordId);\r\n\r\n const res = await apiClient.post(\"/speech/upload\", formData, {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n });\r\n return res.data;\r\n },\r\n\r\n chat: speechChat,\r\n records: speechRecords,\r\n patients: speechPatients,\r\n audios: speechAudios,\r\n recordData: speechRecordData,\r\n};\r\n","import { apiClient } from \"../axios\";\r\n\r\nexport const audioApi = {\r\n getAudioFile: async ({ bucket, keys }: { bucket: string; keys: string }) => {\r\n const res = await apiClient.get(`/audio`, {\r\n params: { bucket, keys },\r\n responseType: \"blob\",\r\n });\r\n return res.data; // Blob 타입\r\n },\r\n};\r\n","import type {\r\n AuthResponse,\r\n LoginRequest,\r\n RegisterRequest,\r\n UserDto,\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const authApi = {\r\n register: async (dto: RegisterRequest): Promise<UserDto> => {\r\n const response = await apiClient.post<UserDto>(\"/auth/register\", dto);\r\n return response.data;\r\n },\r\n login: async (credentials: LoginRequest): Promise<AuthResponse> => {\r\n const response = await apiClient.post<AuthResponse>(\r\n \"/auth/login\",\r\n credentials\r\n );\r\n return response.data;\r\n },\r\n getMe: async (): Promise<UserDto> => {\r\n const response = await apiClient.get<UserDto>(\"/auth/me\");\r\n return response.data;\r\n },\r\n logout: async (): Promise<void> => {\r\n await apiClient.post(\"/auth/logout\");\r\n },\r\n\r\n updateMe: async (data: Partial<UserDto>): Promise<{ user: UserDto }> => {\r\n const response = await apiClient.patch<{ user: UserDto }>(`/auth/me`, data);\r\n return response.data;\r\n },\r\n\r\n generateNewUserKey: async ({\r\n userId,\r\n }: {\r\n userId: string;\r\n }): Promise<UserDto> => {\r\n const response = await apiClient.put<UserDto>(\r\n `/auth/user/generate-key/${userId}`\r\n );\r\n return response.data;\r\n },\r\n\r\n // --- 관리자 ---\r\n adminLogin: async (credentials: LoginRequest): Promise<AuthResponse> => {\r\n const response = await apiClient.post<AuthResponse>(\r\n \"/auth/admin-login\",\r\n credentials\r\n );\r\n return response.data;\r\n },\r\n\r\n updateUser: async (data: Partial<UserDto>): Promise<{ user: UserDto }> => {\r\n const response = await apiClient.put<{ user: UserDto }>(\r\n `/auth/user/${data.id}`,\r\n data\r\n );\r\n return response.data;\r\n },\r\n\r\n deleteUser: async (userId: string): Promise<void> => {\r\n await apiClient.delete(`/auth/user/${userId}`);\r\n },\r\n\r\n changePassword: async (data: {\r\n currentPassword: string;\r\n newPassword: string;\r\n }): Promise<void> => {\r\n await apiClient.patch(\"/auth/me/change-password\", data);\r\n },\r\n};\r\n","import type {\r\n CaptureRect,\r\n CreateCaptureRectRequest,\r\n DeleteCaptureRectResponse,\r\n UpdateCaptureRectRequest,\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const captureRectsApi = {\r\n getMy: async (): Promise<CaptureRect> => {\r\n const res = await apiClient.get(\"/capture-rects/my\");\r\n return res.data;\r\n },\r\n // 모든 캡처 영역 조회 (GET /capture-rects)\r\n getCaptureRects: async (): Promise<CaptureRect[]> => {\r\n const response = await apiClient.get<CaptureRect[]>(\"capture-rects\");\r\n return response.data;\r\n },\r\n\r\n // 특정 캡처 영역 조회 (GET /capture-rects/:id)\r\n getCaptureRect: async (id: string): Promise<CaptureRect> => {\r\n const response = await apiClient.get<CaptureRect>(`capture-rects/${id}`);\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 생성 (POST /capture-rects)\r\n createCaptureRect: async (\r\n data: CreateCaptureRectRequest\r\n ): Promise<CaptureRect> => {\r\n const response = await apiClient.post<CaptureRect>(\"capture-rects\", data);\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 수정 (PATCH /capture-rects/:id)\r\n updateCaptureRect: async ({\r\n id,\r\n data,\r\n }: {\r\n id: string;\r\n data: UpdateCaptureRectRequest;\r\n }): Promise<CaptureRect> => {\r\n const response = await apiClient.patch<CaptureRect>(\r\n `capture-rects/${id}`,\r\n data\r\n );\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 삭제 (DELETE /capture-rects/:id)\r\n deleteCaptureRect: async (id: string): Promise<DeleteCaptureRectResponse> => {\r\n const response = await apiClient.delete<DeleteCaptureRectResponse>(\r\n `capture-rects/${id}`\r\n );\r\n return response.data;\r\n },\r\n};\r\n","import type {\r\n DiarizationRequest,\r\n DiarizationResponse,\r\n DiseaseRecommendationRequestDto,\r\n DiseaseRecommendationResponseDto,\r\n MedicalSummaryRequest,\r\n MedicalSummaryResponse,\r\n MindmapResponse\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const llmApi = {\r\n diarization: async (\r\n request: DiarizationRequest,\r\n signal?: AbortSignal\r\n ): Promise<DiarizationResponse> => {\r\n const response = await apiClient.post(\"/llm/diarization\", request, {\r\n signal,\r\n });\r\n\r\n return response.data;\r\n },\r\n\r\n medicalSummary: async ({\r\n request,\r\n signal,\r\n }: {\r\n request: MedicalSummaryRequest;\r\n signal: AbortSignal;\r\n }): Promise<MedicalSummaryResponse> => {\r\n const response = await apiClient.post(\"/llm/medical-summary\", request, {\r\n signal,\r\n });\r\n\r\n return response.data;\r\n },\r\n\r\n mindmap: async ({\r\n conversation,\r\n }: {\r\n conversation: string;\r\n }): Promise<MindmapResponse> => {\r\n const response = await apiClient.post(`/llm/mindmap`, { conversation });\r\n return response.data;\r\n },\r\n\r\n diseaseRecommendation: async ({\r\n conversation,\r\n }: DiseaseRecommendationRequestDto): Promise<DiseaseRecommendationResponseDto> => {\r\n const response = await apiClient.post(`/llm/disease-recommendation`, {\r\n conversation,\r\n });\r\n return response.data;\r\n },\r\n};\r\n","import type { CreateNoticeRequest, Notice, NoticeListRequest, NoticeListResponse, UpdateNoticeRequest } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const noticeApi = {\r\n getNotices: async (\r\n params?: NoticeListRequest\r\n ): Promise<NoticeListResponse> => {\r\n const response = await apiClient.post<NoticeListResponse>(\"/notices/page\", {\r\n page: params?.page ?? 1,\r\n count: params?.count ?? 10,\r\n searchText: params?.searchText,\r\n showPublishedOnly: params?.showPublishedOnly ?? true,\r\n });\r\n return response.data;\r\n },\r\n\r\n getNotice: async (id: string): Promise<Notice> => {\r\n const response = await apiClient.get<Notice>(`/notices/${id}`);\r\n return response.data;\r\n },\r\n\r\n // Create a new notice\r\n createNotice: async (data: CreateNoticeRequest): Promise<Notice> => {\r\n const response = await apiClient.post<Notice>(\"/notices\", data);\r\n return response.data;\r\n },\r\n\r\n // Update an existing notice\r\n updateNotice: async (\r\n id: string,\r\n data: UpdateNoticeRequest\r\n ): Promise<Notice> => {\r\n const response = await apiClient.put<Notice>(`/notices/${id}`, data);\r\n return response.data;\r\n },\r\n\r\n // Delete a notice\r\n deleteNotice: async (id: string): Promise<void> => {\r\n await apiClient.delete(`/notices/${id}`);\r\n },\r\n};\r\n","import type { PartnerDto } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\nimport type { CreatePartnerRequest, UpdatePartnerRequest } from \"../../types/api\";\r\n\r\nexport const partnersApi = {\r\n // 모든 파트너 조회\r\n getPartners: async (): Promise<PartnerDto[]> => {\r\n const response = await apiClient.get(\"/partners\");\r\n return response.data;\r\n },\r\n\r\n // 파트너 상세 조회\r\n getPartner: async (id: string): Promise<PartnerDto> => {\r\n const response = await apiClient.get(`/partners/${id}`);\r\n return response.data;\r\n },\r\n\r\n // 파트너 생성\r\n createPartner: async (request: CreatePartnerRequest): Promise<PartnerDto> => {\r\n const response = await apiClient.post(\"/partners\", request);\r\n return response.data;\r\n },\r\n\r\n // 파트너 수정\r\n updatePartner: async (\r\n id: string,\r\n request: UpdatePartnerRequest\r\n ): Promise<PartnerDto> => {\r\n const response = await apiClient.patch(`/partners/${id}`, request);\r\n return response.data;\r\n },\r\n\r\n // 파트너 삭제\r\n deletePartner: async (id: string): Promise<PartnerDto> => {\r\n const response = await apiClient.delete(`/partners/${id}`);\r\n return response.data;\r\n },\r\n};\r\n","import type { SendNotificationRequest } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const pushApi = {\r\n /**\r\n * Push 구독 정보를 서버에 저장\r\n */\r\n subscribe: async (\r\n subscription: PushSubscription\r\n ): Promise<{ success: boolean }> => {\r\n const response = await apiClient.post<{ success: boolean }>(\r\n \"/push/subscribe\",\r\n subscription.toJSON()\r\n );\r\n return response.data;\r\n },\r\n\r\n /**\r\n * Push 구독 해제\r\n */\r\n unsubscribe: async (endpoint: string): Promise<{ success: boolean }> => {\r\n const response = await apiClient.post<{ success: boolean }>(\r\n \"/push/unsubscribe\",\r\n { endpoint }\r\n );\r\n return response.data;\r\n },\r\n\r\n /**\r\n * 현재 사용자의 Push 구독 상태 확인\r\n */\r\n getSubscriptionStatus: async (): Promise<{\r\n isSubscribed: boolean;\r\n endpoint?: string;\r\n }> => {\r\n const response = await apiClient.get<{\r\n isSubscribed: boolean;\r\n endpoint?: string;\r\n }>(\"/push/status\");\r\n return response.data;\r\n },\r\n\r\n /**\r\n * Push 알림 전송\r\n * @param notification - 알림 요청 데이터\r\n */\r\n sendNotification: async (\r\n notification: SendNotificationRequest\r\n ): Promise<void> => {\r\n await apiClient.post(\"/push/send\", notification);\r\n },\r\n};\r\n","import type { UpsertUserSettingRequest, UserSetting } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const userSettingsApi = {\r\n getUserSettings: async (): Promise<UserSetting> => {\r\n const response = await apiClient.get(\"/user-settings\");\r\n return response.data;\r\n },\r\n\r\n updateUserSettings: async (\r\n settings: UpsertUserSettingRequest,\r\n ): Promise<UserSetting> => {\r\n const response = await apiClient.put(\"/user-settings\", settings);\r\n return response.data;\r\n },\r\n};\r\n","import type { Institution } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const institutionsApi = {\r\n getInstitutions: async (): Promise<Institution[]> => {\r\n const response = await apiClient.get<Institution[]>(\"institutions\");\r\n return response.data;\r\n },\r\n register: async (data: Institution): Promise<Institution> => {\r\n const response = await apiClient.post<Institution>(\"institutions\", data);\r\n return response.data;\r\n },\r\n update: async ({\r\n ykiho,\r\n data,\r\n }: {\r\n ykiho: string;\r\n data: Partial<Institution>;\r\n }): Promise<Institution> => {\r\n const response = await apiClient.patch(`institutions/${ykiho}`, data);\r\n return response.data;\r\n },\r\n delete: async (ykiho: string): Promise<void> => {\r\n await apiClient.delete(`institutions/${ykiho}`);\r\n },\r\n};\r\n"],"names":["speechChat","getChatRooms","recordId","apiClient","get","data","deleteChatRoom","roomId","delete","getChatMessages","res","msgs","updateChatRoomName","name","patch","speechRecords","getRecords","getRecordsWithPage","dto","post","deleteRecord","getRecordById","getTodayRecord","chart","params","getRecordsByChart","getRecordFromImage","imageUrl","getRecordFromAgent","patientInfo","getRecordsByDates","startDate","endDate","page","searchText","ykiho","username","Number","getPatients","getRecordData","speechPatients","getPatientByChart","upsertPatient","put","hasPatientHistory","getPatientHistorySummary","excludeRecordId","signal","speechAudios","deleteAudioFile","audioFileId","speechRecordData","resummaryPart","level","part","createAudioFormData","buffer","blob","Blob","type","formData","FormData","append","transcribeWithEndpoint","endpoint","language","headers","speechApi","transcribeV3","transcribeWithTranslation","uploadV3","opusBlob","transcript","transcripts","durationSeconds","JSON","stringify","toString","upload","vadBuffer","totalBuffer","chat","records","patients","audios","recordData","audioApi","getAudioFile","bucket","keys","responseType","authApi","register","login","credentials","getMe","logout","updateMe","generateNewUserKey","userId","adminLogin","updateUser","id","deleteUser","changePassword","captureRectsApi","getMy","getCaptureRects","getCaptureRect","createCaptureRect","updateCaptureRect","deleteCaptureRect","llmApi","diarization","request","medicalSummary","mindmap","conversation","diseaseRecommendation","noticeApi","getNotices","count","showPublishedOnly","getNotice","createNotice","updateNotice","deleteNotice","partnersApi","getPartners","getPartner","createPartner","updatePartner","deletePartner","pushApi","subscribe","subscription","toJSON","unsubscribe","getSubscriptionStatus","sendNotification","notification","userSettingsApi","getUserSettings","updateUserSettings","settings","institutionsApi","getInstitutions","update"],"mappings":"kLAGaA,EAAa,CACxBC,aAAc,MAAOC,IACP,MAAMC,YAAUC,IAAI,sBAAsBF,CAAQ,EAAE,GACrDG,KAGbC,eAAgB,MAAO,CACrBC,OAAAA,CAAAA,KAIY,MAAMJ,YAAUK,OAAO,sBAAsBD,CAAM,EAAE,GACtDF,KAGbI,gBAAiB,MAAO,CACtBF,OAAAA,CAAAA,IAGiD,CACjD,MAAMG,EAAM,MAAMP,YAAUC,IAAI,yBAAyBG,CAAM,EAAE,EACjE,MAAO,CAAEA,OAAAA,EAAQI,KAAMD,EAAIL,IAAAA,CAC7B,EACAO,mBAAoB,MAAO,CACzBL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ACTC,IAEiB,MAAMpI,YAAUgB,KAC/B,kBACAoH,EAAaC,QACf,GACgBnI,KAMlBoI,YAAa,MAAOzE,IACD,MAAM7D,YAAUgB,KAC/B,oBACA,CAAE6C,SAAAA,CAAAA,CACJ,GACgB3D,KAMlBqI,sBAAuB,UAIJ,MAAMvI,YAAUC,IAG9B,cAAc,GACDC,KAOlBsI,iBAAkB,MAChBC,GACkB,CAClB,MAAMzI,YAAUgB,KAAK,aAAcyH,CAAY,CACjD,CACF,EChDaC,EAAkB,CAC7BC,gBAAiB,UACE,MAAM3I,YAAUC,IAAI,gBAAgB,GACrCC,KAGlB0I,mBAAoB,MAClBC,IAEiB,MAAM7I,EAAAA,UAAUwC,IAAI,iBAAkBqG,CAAQ,GAC/C3I,IAEpB,ECZa4I,EAAkB,CAC7BC,gBAAiB,UACE,MAAM/I,YAAUC,IAAmB,cAAc,GAClDC,KAElBuF,SAAU,MAAOvF,IACE,MAAMF,EAAAA,UAAUgB,KAAkB,eAAgBd,CAAI,GACvDA,KAElB8I,OAAQ,MAAO,CACbhH,MAAAA,EACA9B,KAAAA,CAAAA,KAKiB,MAAMF,EAAAA,UAAUW,MAAM,gBAAgBqB,CAAK,GAAI9B,CAAI,GACpDA,KAElBG,OAAQ,MAAO2B,GAAiC,CAC9C,MAAMhC,EAAAA,UAAUK,OAAO,gBAAgB2B,CAAK,EAAE,CAChD,CACF"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/api/common/speechs/speech-chat.ts","../../../src/api/common/speechs/speech-records.ts","../../../src/api/common/speechs/speech-patients.ts","../../../src/api/common/speechs/speech-audios.ts","../../../src/api/common/speechs/speech-record-datas.ts","../../../src/api/common/speechs/speech.ts","../../../src/api/common/audio.ts","../../../src/api/common/auth.ts","../../../src/api/common/capture-rects.ts","../../../src/api/common/llm.ts","../../../src/api/common/notice.ts","../../../src/api/common/partners.ts","../../../src/api/common/push.ts","../../../src/api/common/user-settings.ts","../../../src/api/common/institutions.ts"],"sourcesContent":["import type { ChatRoomsResponse, LlmMsg } from \"../../../types\";\r\nimport { apiClient } from \"../../axios\";\r\n\r\nexport const speechChat = {\r\n getChatRooms: async (recordId: string): Promise<ChatRoomsResponse[]> => {\r\n const res = await apiClient.get(`/speech/chat/rooms/${recordId}`);\r\n return res.data;\r\n },\r\n\r\n deleteChatRoom: async ({\r\n roomId,\r\n }: {\r\n roomId: string;\r\n }): Promise<ChatRoomsResponse> => {\r\n const res = await apiClient.delete(`/speech/chat/rooms/${roomId}`);\r\n return res.data;\r\n },\r\n\r\n getChatMessages: async ({\r\n roomId,\r\n }: {\r\n roomId: string;\r\n }): Promise<{ roomId: string; msgs: LlmMsg[] }> => {\r\n const res = await apiClient.get(`/speech/chat/messages/${roomId}`);\r\n return { roomId, msgs: res.data };\r\n },\r\n updateChatRoomName: async ({\r\n roomId,\r\n name,\r\n }: {\r\n roomId: string;\r\n name: string;\r\n }): Promise<ChatRoomsResponse> => {\r\n const res = await apiClient.patch(`/speech/chat/rooms/${roomId}`, {\r\n name,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n GetRecordsByDatesRequest,\r\n GetRecordsByDatesResponse,\r\n Patient,\r\n RecordData,\r\n RecordsPageRequest,\r\n RecordsResponse,\r\n RecordsWithPageResponse,\r\n} from \"../../../types/api\";\r\nimport type { PatientInfoDto } from \"../../../types\";\r\n\r\nexport const speechRecords = {\r\n getRecords: async (): Promise<RecordsResponse[]> => {\r\n const res = await apiClient.get(\"/speech/records\");\r\n return res.data;\r\n },\r\n\r\n getRecordsWithPage: async (\r\n dto: RecordsPageRequest\r\n ): Promise<RecordsWithPageResponse> => {\r\n const res = await apiClient.post(\"/speech/records\", dto);\r\n return res.data;\r\n },\r\n\r\n deleteRecord: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordsResponse> => {\r\n const res = await apiClient.delete(`/speech/records/${recordId}`);\r\n return res.data;\r\n },\r\n\r\n getRecordById: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordsResponse> => {\r\n const res = await apiClient.get(`/speech/records/${recordId}/details`);\r\n return res.data;\r\n },\r\n\r\n getTodayRecord: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.get(`/speech/records/details/today`, {\r\n params: { chart },\r\n });\r\n return res.data;\r\n },\r\n\r\n getRecordsByChart: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<RecordsResponse[]> => {\r\n const res = await apiClient.get(`/speech/records/${chart}`);\r\n return res.data;\r\n },\r\n\r\n getRecordFromImage: async ({\r\n imageUrl,\r\n }: {\r\n imageUrl: string;\r\n }): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.post(`/speech/records/from-image`, {\r\n imageUrl,\r\n });\r\n return res.data;\r\n },\r\n\r\n getRecordFromAgent: async (\r\n patientInfo: PatientInfoDto\r\n ): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.post(`/speech/records/from-agent`, patientInfo);\r\n return res.data;\r\n },\r\n\r\n // --- admin ---\r\n getRecordsByDates: async ({\r\n startDate,\r\n endDate,\r\n page,\r\n searchText,\r\n ykiho,\r\n username,\r\n }: GetRecordsByDatesRequest): Promise<GetRecordsByDatesResponse> => {\r\n const res = await apiClient.get(\"/speech/records/by-dates\", {\r\n params: {\r\n startDate,\r\n endDate,\r\n page: Number(page),\r\n ...(searchText && { searchText }),\r\n ...(ykiho && { ykiho }),\r\n ...(username && { username }),\r\n },\r\n });\r\n return res.data;\r\n },\r\n\r\n getPatients: async (): Promise<Patient[]> => {\r\n const res = await apiClient.get(\"/speech/patients\");\r\n return res.data;\r\n },\r\n\r\n getRecordData: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordData> => {\r\n const res = await apiClient.get(`/speech/record-datas/${recordId}`);\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n GetPatientHistoryRequest,\r\n Patient,\r\n PatientHistorySummaryResponse,\r\n HasPatientHistoryResponse,\r\n UpsertPatientRequest,\r\n} from \"../../../types/api\";\r\n\r\nexport const speechPatients = {\r\n getPatientByChart: async ({ chart }: { chart: string }): Promise<Patient> => {\r\n const res = await apiClient.get(`/speech/patients/${chart}`);\r\n return res.data;\r\n },\r\n\r\n upsertPatient: async ({\r\n chart,\r\n name,\r\n }: UpsertPatientRequest): Promise<Patient> => {\r\n const res = await apiClient.put(`/speech/patients`, { chart, name });\r\n return res.data;\r\n },\r\n\r\n /**\r\n * 과거 진료 기록 존재 여부 확인\r\n */\r\n hasPatientHistory: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<HasPatientHistoryResponse> => {\r\n const res = await apiClient.get(`/speech/patients/has-history/${chart}`);\r\n return res.data;\r\n },\r\n\r\n /**\r\n * 과거 진료 기록 요약 조회\r\n */\r\n getPatientHistorySummary: async ({\r\n chart,\r\n excludeRecordId,\r\n signal,\r\n }: GetPatientHistoryRequest & {\r\n signal?: AbortSignal;\r\n }): Promise<PatientHistorySummaryResponse> => {\r\n const res = await apiClient.get(`/speech/patients/history-summary`, {\r\n params: { chart, excludeRecordId },\r\n signal,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type { AudioFile } from \"../../../types/api\";\r\n\r\nexport const speechAudios = {\r\n deleteAudioFile: async ({\r\n audioFileId,\r\n }: {\r\n audioFileId: string;\r\n }): Promise<AudioFile> => {\r\n const res = await apiClient.delete(`/speech/audios/${audioFileId}`);\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type { MedicalSummaryResponse, ResummaryPartRequest } from \"../../../types/api\";\r\n\r\nexport const speechRecordData = {\r\n resummaryPart: async ({\r\n recordId,\r\n level,\r\n part,\r\n }: ResummaryPartRequest): Promise<MedicalSummaryResponse> => {\r\n const res = await apiClient.post(`/speech/record-datas/resummary/part`, {\r\n recordId,\r\n level,\r\n part,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n TranscribeV3Request,\r\n TranscribeV3Response,\r\n TranscribeWithTranslationResponse,\r\n UploadRequest,\r\n UploadResponse,\r\n UploadV3Request,\r\n} from \"../../../types/api\";\r\nimport { speechChat } from \"./speech-chat\";\r\nimport { speechRecords } from \"./speech-records\";\r\nimport { speechPatients } from \"./speech-patients\";\r\nimport { speechAudios } from \"./speech-audios\";\r\nimport { speechRecordData } from \"./speech-record-datas\";\r\n\r\n// Helper function to create FormData with audio file\r\nconst createAudioFormData = (buffer: ArrayBuffer | Blob): FormData => {\r\n const blob =\r\n buffer instanceof Blob ? buffer : new Blob([buffer], { type: \"audio/pcm\" });\r\n const formData = new FormData();\r\n formData.append(\"file\", blob, \"audio.pcm\");\r\n return formData;\r\n};\r\n\r\nconst transcribeWithEndpoint = async <T>(\r\n endpoint: string,\r\n buffer: ArrayBuffer | Blob,\r\n language?: string,\r\n useProofreading: boolean = true\r\n): Promise<T> => {\r\n const formData = createAudioFormData(buffer);\r\n if (language) {\r\n formData.append(\"language\", language);\r\n }\r\n formData.append(\"useProofreading\", String(useProofreading));\r\n const res = await apiClient.post(endpoint, formData, {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n });\r\n return res.data;\r\n};\r\n\r\nexport const speechApi = {\r\n transcribeV3: async ({\r\n buffer,\r\n useProofreading,\r\n }: TranscribeV3Request): Promise<TranscribeV3Response> => {\r\n return transcribeWithEndpoint(\r\n \"/speech/transcribe-v3\",\r\n buffer,\r\n undefined,\r\n useProofreading\r\n );\r\n },\r\n\r\n transcribeWithTranslation: async ({\r\n buffer,\r\n language,\r\n }: {\r\n buffer: ArrayBuffer | Blob;\r\n language: string;\r\n }): Promise<TranscribeWithTranslationResponse> => {\r\n return transcribeWithEndpoint(\r\n \"/speech/transcribe-with-translation\",\r\n buffer,\r\n language\r\n );\r\n },\r\n\r\n uploadV3: async ({\r\n opusBlob,\r\n chart,\r\n recordId,\r\n transcript,\r\n transcripts,\r\n durationSeconds,\r\n }: UploadV3Request): Promise<UploadResponse> => {\r\n const formData = new FormData();\r\n formData.append(\r\n \"opusFile\",\r\n new Blob([opusBlob], { type: \"audio/webm\" }),\r\n \"audio.webm\"\r\n );\r\n formData.append(\"chart\", chart);\r\n formData.append(\"transcript\", transcript);\r\n formData.append(\"transcripts\", JSON.stringify(transcripts));\r\n formData.append(\"durationSeconds\", durationSeconds.toString());\r\n if (recordId) formData.append(\"recordId\", recordId);\r\n\r\n const res = await apiClient.post(\r\n \"/speech/upload-with-translation\",\r\n formData,\r\n {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n }\r\n );\r\n return res.data;\r\n },\r\n\r\n upload: async ({\r\n opusBlob,\r\n vadBuffer,\r\n totalBuffer,\r\n chart,\r\n recordId,\r\n transcript,\r\n }: UploadRequest): Promise<UploadResponse> => {\r\n const formData = new FormData();\r\n formData.append(\r\n \"opusFile\",\r\n new Blob([opusBlob], { type: \"audio/webm\" }),\r\n \"audio.webm\"\r\n );\r\n formData.append(\r\n \"totalFile\",\r\n new Blob([totalBuffer], { type: \"audio/pcm\" }),\r\n \"audio.pcm\"\r\n );\r\n if (vadBuffer)\r\n formData.append(\r\n \"vadFile\",\r\n new Blob([vadBuffer], { type: \"audio/pcm\" }),\r\n \"audio.pcm\"\r\n );\r\n formData.append(\"chart\", chart);\r\n formData.append(\"transcript\", transcript);\r\n if (recordId) formData.append(\"recordId\", recordId);\r\n\r\n const res = await apiClient.post(\"/speech/upload\", formData, {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n });\r\n return res.data;\r\n },\r\n\r\n chat: speechChat,\r\n records: speechRecords,\r\n patients: speechPatients,\r\n audios: speechAudios,\r\n recordData: speechRecordData,\r\n};\r\n","import { apiClient } from \"../axios\";\r\n\r\nexport const audioApi = {\r\n getAudioFile: async ({ bucket, keys }: { bucket: string; keys: string }) => {\r\n const res = await apiClient.get(`/audio`, {\r\n params: { bucket, keys },\r\n responseType: \"blob\",\r\n });\r\n return res.data; // Blob 타입\r\n },\r\n};\r\n","import type {\r\n AuthResponse,\r\n LoginRequest,\r\n RegisterRequest,\r\n UserDto,\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const authApi = {\r\n register: async (dto: RegisterRequest): Promise<UserDto> => {\r\n const response = await apiClient.post<UserDto>(\"/auth/register\", dto);\r\n return response.data;\r\n },\r\n login: async (credentials: LoginRequest): Promise<AuthResponse> => {\r\n const response = await apiClient.post<AuthResponse>(\r\n \"/auth/login\",\r\n credentials\r\n );\r\n return response.data;\r\n },\r\n getMe: async (): Promise<UserDto> => {\r\n const response = await apiClient.get<UserDto>(\"/auth/me\");\r\n return response.data;\r\n },\r\n logout: async (): Promise<void> => {\r\n await apiClient.post(\"/auth/logout\");\r\n },\r\n\r\n updateMe: async (data: Partial<UserDto>): Promise<{ user: UserDto }> => {\r\n const response = await apiClient.patch<{ user: UserDto }>(`/auth/me`, data);\r\n return response.data;\r\n },\r\n\r\n generateNewUserKey: async ({\r\n userId,\r\n }: {\r\n userId: string;\r\n }): Promise<UserDto> => {\r\n const response = await apiClient.put<UserDto>(\r\n `/auth/user/generate-key/${userId}`\r\n );\r\n return response.data;\r\n },\r\n\r\n // --- 관리자 ---\r\n adminLogin: async (credentials: LoginRequest): Promise<AuthResponse> => {\r\n const response = await apiClient.post<AuthResponse>(\r\n \"/auth/admin-login\",\r\n credentials\r\n );\r\n return response.data;\r\n },\r\n\r\n updateUser: async (data: Partial<UserDto>): Promise<{ user: UserDto }> => {\r\n const response = await apiClient.put<{ user: UserDto }>(\r\n `/auth/user/${data.id}`,\r\n data\r\n );\r\n return response.data;\r\n },\r\n\r\n deleteUser: async (userId: string): Promise<void> => {\r\n await apiClient.delete(`/auth/user/${userId}`);\r\n },\r\n\r\n changePassword: async (data: {\r\n currentPassword: string;\r\n newPassword: string;\r\n }): Promise<void> => {\r\n await apiClient.patch(\"/auth/me/change-password\", data);\r\n },\r\n};\r\n","import type {\r\n CaptureRect,\r\n CreateCaptureRectRequest,\r\n DeleteCaptureRectResponse,\r\n UpdateCaptureRectRequest,\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const captureRectsApi = {\r\n getMy: async (): Promise<CaptureRect> => {\r\n const res = await apiClient.get(\"/capture-rects/my\");\r\n return res.data;\r\n },\r\n // 모든 캡처 영역 조회 (GET /capture-rects)\r\n getCaptureRects: async (): Promise<CaptureRect[]> => {\r\n const response = await apiClient.get<CaptureRect[]>(\"capture-rects\");\r\n return response.data;\r\n },\r\n\r\n // 특정 캡처 영역 조회 (GET /capture-rects/:id)\r\n getCaptureRect: async (id: string): Promise<CaptureRect> => {\r\n const response = await apiClient.get<CaptureRect>(`capture-rects/${id}`);\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 생성 (POST /capture-rects)\r\n createCaptureRect: async (\r\n data: CreateCaptureRectRequest\r\n ): Promise<CaptureRect> => {\r\n const response = await apiClient.post<CaptureRect>(\"capture-rects\", data);\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 수정 (PATCH /capture-rects/:id)\r\n updateCaptureRect: async ({\r\n id,\r\n data,\r\n }: {\r\n id: string;\r\n data: UpdateCaptureRectRequest;\r\n }): Promise<CaptureRect> => {\r\n const response = await apiClient.patch<CaptureRect>(\r\n `capture-rects/${id}`,\r\n data\r\n );\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 삭제 (DELETE /capture-rects/:id)\r\n deleteCaptureRect: async (id: string): Promise<DeleteCaptureRectResponse> => {\r\n const response = await apiClient.delete<DeleteCaptureRectResponse>(\r\n `capture-rects/${id}`\r\n );\r\n return response.data;\r\n },\r\n};\r\n","import type {\r\n DiarizationRequest,\r\n DiarizationResponse,\r\n DiseaseRecommendationRequestDto,\r\n DiseaseRecommendationResponseDto,\r\n MedicalSummaryRequest,\r\n MedicalSummaryResponse,\r\n MindmapResponse\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const llmApi = {\r\n diarization: async (\r\n request: DiarizationRequest,\r\n signal?: AbortSignal\r\n ): Promise<DiarizationResponse> => {\r\n const response = await apiClient.post(\"/llm/diarization\", request, {\r\n signal,\r\n });\r\n\r\n return response.data;\r\n },\r\n\r\n medicalSummary: async ({\r\n request,\r\n signal,\r\n }: {\r\n request: MedicalSummaryRequest;\r\n signal: AbortSignal;\r\n }): Promise<MedicalSummaryResponse> => {\r\n const response = await apiClient.post(\"/llm/medical-summary\", request, {\r\n signal,\r\n });\r\n\r\n return response.data;\r\n },\r\n\r\n mindmap: async ({\r\n conversation,\r\n }: {\r\n conversation: string;\r\n }): Promise<MindmapResponse> => {\r\n const response = await apiClient.post(`/llm/mindmap`, { conversation });\r\n return response.data;\r\n },\r\n\r\n diseaseRecommendation: async ({\r\n conversation,\r\n }: DiseaseRecommendationRequestDto): Promise<DiseaseRecommendationResponseDto> => {\r\n const response = await apiClient.post(`/llm/disease-recommendation`, {\r\n conversation,\r\n });\r\n return response.data;\r\n },\r\n};\r\n","import type { CreateNoticeRequest, Notice, NoticeListRequest, NoticeListResponse, UpdateNoticeRequest } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const noticeApi = {\r\n getNotices: async (\r\n params?: NoticeListRequest\r\n ): Promise<NoticeListResponse> => {\r\n const response = await apiClient.post<NoticeListResponse>(\"/notices/page\", {\r\n page: params?.page ?? 1,\r\n count: params?.count ?? 10,\r\n searchText: params?.searchText,\r\n showPublishedOnly: params?.showPublishedOnly ?? true,\r\n });\r\n return response.data;\r\n },\r\n\r\n getNotice: async (id: string): Promise<Notice> => {\r\n const response = await apiClient.get<Notice>(`/notices/${id}`);\r\n return response.data;\r\n },\r\n\r\n // Create a new notice\r\n createNotice: async (data: CreateNoticeRequest): Promise<Notice> => {\r\n const response = await apiClient.post<Notice>(\"/notices\", data);\r\n return response.data;\r\n },\r\n\r\n // Update an existing notice\r\n updateNotice: async (\r\n id: string,\r\n data: UpdateNoticeRequest\r\n ): Promise<Notice> => {\r\n const response = await apiClient.put<Notice>(`/notices/${id}`, data);\r\n return response.data;\r\n },\r\n\r\n // Delete a notice\r\n deleteNotice: async (id: string): Promise<void> => {\r\n await apiClient.delete(`/notices/${id}`);\r\n },\r\n};\r\n","import type { PartnerDto } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\nimport type { CreatePartnerRequest, UpdatePartnerRequest } from \"../../types/api\";\r\n\r\nexport const partnersApi = {\r\n // 모든 파트너 조회\r\n getPartners: async (): Promise<PartnerDto[]> => {\r\n const response = await apiClient.get(\"/partners\");\r\n return response.data;\r\n },\r\n\r\n // 파트너 상세 조회\r\n getPartner: async (id: string): Promise<PartnerDto> => {\r\n const response = await apiClient.get(`/partners/${id}`);\r\n return response.data;\r\n },\r\n\r\n // 파트너 생성\r\n createPartner: async (request: CreatePartnerRequest): Promise<PartnerDto> => {\r\n const response = await apiClient.post(\"/partners\", request);\r\n return response.data;\r\n },\r\n\r\n // 파트너 수정\r\n updatePartner: async (\r\n id: string,\r\n request: UpdatePartnerRequest\r\n ): Promise<PartnerDto> => {\r\n const response = await apiClient.patch(`/partners/${id}`, request);\r\n return response.data;\r\n },\r\n\r\n // 파트너 삭제\r\n deletePartner: async (id: string): Promise<PartnerDto> => {\r\n const response = await apiClient.delete(`/partners/${id}`);\r\n return response.data;\r\n },\r\n};\r\n","import type { SendNotificationRequest } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const pushApi = {\r\n /**\r\n * Push 구독 정보를 서버에 저장\r\n */\r\n subscribe: async (\r\n subscription: PushSubscription\r\n ): Promise<{ success: boolean }> => {\r\n const response = await apiClient.post<{ success: boolean }>(\r\n \"/push/subscribe\",\r\n subscription.toJSON()\r\n );\r\n return response.data;\r\n },\r\n\r\n /**\r\n * Push 구독 해제\r\n */\r\n unsubscribe: async (endpoint: string): Promise<{ success: boolean }> => {\r\n const response = await apiClient.post<{ success: boolean }>(\r\n \"/push/unsubscribe\",\r\n { endpoint }\r\n );\r\n return response.data;\r\n },\r\n\r\n /**\r\n * 현재 사용자의 Push 구독 상태 확인\r\n */\r\n getSubscriptionStatus: async (): Promise<{\r\n isSubscribed: boolean;\r\n endpoint?: string;\r\n }> => {\r\n const response = await apiClient.get<{\r\n isSubscribed: boolean;\r\n endpoint?: string;\r\n }>(\"/push/status\");\r\n return response.data;\r\n },\r\n\r\n /**\r\n * Push 알림 전송\r\n * @param notification - 알림 요청 데이터\r\n */\r\n sendNotification: async (\r\n notification: SendNotificationRequest\r\n ): Promise<void> => {\r\n await apiClient.post(\"/push/send\", notification);\r\n },\r\n};\r\n","import type { UpsertUserSettingRequest, UserSetting } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const userSettingsApi = {\r\n getUserSettings: async (): Promise<UserSetting> => {\r\n const response = await apiClient.get(\"/user-settings\");\r\n return response.data;\r\n },\r\n\r\n updateUserSettings: async (\r\n settings: UpsertUserSettingRequest,\r\n ): Promise<UserSetting> => {\r\n const response = await apiClient.put(\"/user-settings\", settings);\r\n return response.data;\r\n },\r\n};\r\n","import type { Institution } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const institutionsApi = {\r\n getInstitutions: async (): Promise<Institution[]> => {\r\n const response = await apiClient.get<Institution[]>(\"institutions\");\r\n return response.data;\r\n },\r\n register: async (data: Institution): Promise<Institution> => {\r\n const response = await apiClient.post<Institution>(\"institutions\", data);\r\n return response.data;\r\n },\r\n update: async ({\r\n ykiho,\r\n data,\r\n }: {\r\n ykiho: string;\r\n data: Partial<Institution>;\r\n }): Promise<Institution> => {\r\n const response = await apiClient.patch(`institutions/${ykiho}`, data);\r\n return response.data;\r\n },\r\n delete: async (ykiho: string): Promise<void> => {\r\n await apiClient.delete(`institutions/${ykiho}`);\r\n },\r\n};\r\n"],"names":["speechChat","getChatRooms","recordId","apiClient","get","data","deleteChatRoom","roomId","delete","getChatMessages","res","msgs","updateChatRoomName","name","patch","speechRecords","getRecords","getRecordsWithPage","dto","post","deleteRecord","getRecordById","getTodayRecord","chart","params","getRecordsByChart","getRecordFromImage","imageUrl","getRecordFromAgent","patientInfo","getRecordsByDates","startDate","endDate","page","searchText","ykiho","username","Number","getPatients","getRecordData","speechPatients","getPatientByChart","upsertPatient","put","hasPatientHistory","getPatientHistorySummary","excludeRecordId","signal","speechAudios","deleteAudioFile","audioFileId","speechRecordData","resummaryPart","level","part","createAudioFormData","buffer","blob","Blob","type","formData","FormData","append","transcribeWithEndpoint","endpoint","language","useProofreading","String","headers","speechApi","transcribeV3","undefined","transcribeWithTranslation","uploadV3","opusBlob","transcript","transcripts","durationSeconds","JSON","stringify","toString","upload","vadBuffer","totalBuffer","chat","records","patients","audios","recordData","audioApi","getAudioFile","bucket","keys","responseType","authApi","register","login","credentials","getMe","logout","updateMe","generateNewUserKey","userId","adminLogin","updateUser","id","deleteUser","changePassword","captureRectsApi","getMy","getCaptureRects","getCaptureRect","createCaptureRect","updateCaptureRect","deleteCaptureRect","llmApi","diarization","request","medicalSummary","mindmap","conversation","diseaseRecommendation","noticeApi","getNotices","count","showPublishedOnly","getNotice","createNotice","updateNotice","deleteNotice","partnersApi","getPartners","getPartner","createPartner","updatePartner","deletePartner","pushApi","subscribe","subscription","toJSON","unsubscribe","getSubscriptionStatus","sendNotification","notification","userSettingsApi","getUserSettings","updateUserSettings","settings","institutionsApi","getInstitutions","update"],"mappings":"kLAGaA,EAAa,CACxBC,aAAc,MAAOC,IACP,MAAMC,YAAUC,IAAI,sBAAsBF,CAAQ,EAAE,GACrDG,KAGbC,eAAgB,MAAO,CACrBC,OAAAA,CAAAA,KAIY,MAAMJ,YAAUK,OAAO,sBAAsBD,CAAM,EAAE,GACtDF,KAGbI,gBAAiB,MAAO,CACtBF,OAAAA,CAAAA,IAGiD,CACjD,MAAMG,EAAM,MAAMP,YAAUC,IAAI,yBAAyBG,CAAM,EAAE,EACjE,MAAO,CAAEA,OA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M,aAAa2F,CAAE,GAAIY,CAAO,GACjDhH,KAIlBkI,cAAe,MAAO9B,IACH,MAAMtG,YAAUK,OAAO,aAAaiG,CAAE,EAAE,GACzCpG,IAEpB,EClCamI,EAAU,CAIrBC,UAAW,MACTC,IAEiB,MAAMvI,YAAUgB,KAC/B,kBACAuH,EAAaC,QACf,GACgBtI,KAMlBuI,YAAa,MAAO5E,IACD,MAAM7D,YAAUgB,KAC/B,oBACA,CAAE6C,SAAAA,CAAAA,CACJ,GACgB3D,KAMlBwI,sBAAuB,UAIJ,MAAM1I,YAAUC,IAG9B,cAAc,GACDC,KAOlByI,iBAAkB,MAChBC,GACkB,CAClB,MAAM5I,YAAUgB,KAAK,aAAc4H,CAAY,CACjD,CACF,EChDaC,EAAkB,CAC7BC,gBAAiB,UACE,MAAM9I,YAAUC,IAAI,gBAAgB,GACrCC,KAGlB6I,mBAAoB,MAClBC,IAEiB,MAAMhJ,EAAAA,UAAUwC,IAAI,iBAAkBwG,CAAQ,GAC/C9I,IAEpB,ECZa+I,EAAkB,CAC7BC,gBAAiB,UACE,MAAMlJ,YAAUC,IAAmB,cAAc,GAClDC,KAElB0F,SAAU,MAAO1F,IACE,MAAMF,EAAAA,UAAUgB,KAAkB,eAAgBd,CAAI,GACvDA,KAElBiJ,OAAQ,MAAO,CACbnH,MAAAA,EACA9B,KAAAA,CAAAA,KAKiB,MAAMF,EAAAA,UAAUW,MAAM,gBAAgBqB,CAAK,GAAI9B,CAAI,GACpDA,KAElBG,OAAQ,MAAO2B,GAAiC,CAC9C,MAAMhC,EAAAA,UAAUK,OAAO,gBAAgB2B,CAAK,EAAE,CAChD,CACF"}
@@ -2,6 +2,10 @@ import { MedicalSummaryResponse } from './llm';
2
2
  import { LlmRoom } from './llm/chat';
3
3
  import { RecordsResponse } from './records';
4
4
  import { Transcript } from './transcript';
5
+ export interface TranscribeV3Request {
6
+ buffer: ArrayBuffer | Blob;
7
+ useProofreading?: boolean;
8
+ }
5
9
  export interface TranscribeV3Response {
6
10
  transcript: string;
7
11
  language: string;
@@ -1,8 +1,6 @@
1
- import { TranscribeV3Response, TranscribeWithTranslationResponse, UploadRequest, UploadResponse, UploadV3Request } from '../../../types/api';
1
+ import { TranscribeV3Request, TranscribeV3Response, TranscribeWithTranslationResponse, UploadRequest, UploadResponse, UploadV3Request } from '../../../types/api';
2
2
  export declare const speechApi: {
3
- transcribeV3: ({ buffer, }: {
4
- buffer: ArrayBuffer | Blob;
5
- }) => Promise<TranscribeV3Response>;
3
+ transcribeV3: ({ buffer, useProofreading, }: TranscribeV3Request) => Promise<TranscribeV3Response>;
6
4
  transcribeWithTranslation: ({ buffer, language, }: {
7
5
  buffer: ArrayBuffer | Blob;
8
6
  language: string;
@@ -51,19 +51,19 @@ const d = {
51
51
  startDate: e,
52
52
  endDate: t,
53
53
  page: a,
54
- searchText: n,
55
- ykiho: o,
54
+ searchText: o,
55
+ ykiho: n,
56
56
  username: c
57
57
  }) => (await s.get("/speech/records/by-dates", {
58
58
  params: {
59
59
  startDate: e,
60
60
  endDate: t,
61
61
  page: Number(a),
62
- ...n && {
63
- searchText: n
64
- },
65
62
  ...o && {
66
- ykiho: o
63
+ searchText: o
64
+ },
65
+ ...n && {
66
+ ykiho: n
67
67
  },
68
68
  ...c && {
69
69
  username: c
@@ -124,17 +124,18 @@ const d = {
124
124
  type: "audio/pcm"
125
125
  }), a = new FormData();
126
126
  return a.append("file", t, "audio.pcm"), a;
127
- }, p = async (e, t, a) => {
127
+ }, p = async (e, t, a, o = !0) => {
128
128
  const n = g(t);
129
- return a && n.append("language", a), (await s.post(e, n, {
129
+ return a && n.append("language", a), n.append("useProofreading", String(o)), (await s.post(e, n, {
130
130
  headers: {
131
131
  "Content-Type": "multipart/form-data"
132
132
  }
133
133
  })).data;
134
134
  }, l = {
135
135
  transcribeV3: async ({
136
- buffer: e
137
- }) => p("/speech/transcribe-v3", e),
136
+ buffer: e,
137
+ useProofreading: t
138
+ }) => p("/speech/transcribe-v3", e, void 0, t),
138
139
  transcribeWithTranslation: async ({
139
140
  buffer: e,
140
141
  language: t
@@ -143,14 +144,14 @@ const d = {
143
144
  opusBlob: e,
144
145
  chart: t,
145
146
  recordId: a,
146
- transcript: n,
147
- transcripts: o,
147
+ transcript: o,
148
+ transcripts: n,
148
149
  durationSeconds: c
149
150
  }) => {
150
151
  const r = new FormData();
151
152
  return r.append("opusFile", new Blob([e], {
152
153
  type: "audio/webm"
153
- }), "audio.webm"), r.append("chart", t), r.append("transcript", n), r.append("transcripts", JSON.stringify(o)), r.append("durationSeconds", c.toString()), a && r.append("recordId", a), (await s.post("/speech/upload-with-translation", r, {
154
+ }), "audio.webm"), r.append("chart", t), r.append("transcript", o), r.append("transcripts", JSON.stringify(n)), r.append("durationSeconds", c.toString()), a && r.append("recordId", a), (await s.post("/speech/upload-with-translation", r, {
154
155
  headers: {
155
156
  "Content-Type": "multipart/form-data"
156
157
  }
@@ -160,8 +161,8 @@ const d = {
160
161
  opusBlob: e,
161
162
  vadBuffer: t,
162
163
  totalBuffer: a,
163
- chart: n,
164
- recordId: o,
164
+ chart: o,
165
+ recordId: n,
165
166
  transcript: c
166
167
  }) => {
167
168
  const r = new FormData();
@@ -171,7 +172,7 @@ const d = {
171
172
  type: "audio/pcm"
172
173
  }), "audio.pcm"), t && r.append("vadFile", new Blob([t], {
173
174
  type: "audio/pcm"
174
- }), "audio.pcm"), r.append("chart", n), r.append("transcript", c), o && r.append("recordId", o), (await s.post("/speech/upload", r, {
175
+ }), "audio.pcm"), r.append("chart", o), r.append("transcript", c), n && r.append("recordId", n), (await s.post("/speech/upload", r, {
175
176
  headers: {
176
177
  "Content-Type": "multipart/form-data"
177
178
  }
@@ -228,7 +229,7 @@ const d = {
228
229
  }) => (await s.patch(`capture-rects/${e}`, t)).data,
229
230
  // 캡처 영역 삭제 (DELETE /capture-rects/:id)
230
231
  deleteCaptureRect: async (e) => (await s.delete(`capture-rects/${e}`)).data
231
- }, A = {
232
+ }, f = {
232
233
  diarization: async (e, t) => (await s.post("/llm/diarization", e, {
233
234
  signal: t
234
235
  })).data,
@@ -248,7 +249,7 @@ const d = {
248
249
  }) => (await s.post("/llm/disease-recommendation", {
249
250
  conversation: e
250
251
  })).data
251
- }, f = {
252
+ }, A = {
252
253
  getNotices: async (e) => (await s.post("/notices/page", {
253
254
  page: e?.page ?? 1,
254
255
  count: e?.count ?? 10,
@@ -264,7 +265,7 @@ const d = {
264
265
  deleteNotice: async (e) => {
265
266
  await s.delete(`/notices/${e}`);
266
267
  }
267
- }, C = {
268
+ }, P = {
268
269
  // 모든 파트너 조회
269
270
  getPartners: async () => (await s.get("/partners")).data,
270
271
  // 파트너 상세 조회
@@ -275,7 +276,7 @@ const d = {
275
276
  updatePartner: async (e, t) => (await s.patch(`/partners/${e}`, t)).data,
276
277
  // 파트너 삭제
277
278
  deletePartner: async (e) => (await s.delete(`/partners/${e}`)).data
278
- }, P = {
279
+ }, C = {
279
280
  /**
280
281
  * Push 구독 정보를 서버에 저장
281
282
  */
@@ -319,10 +320,10 @@ export {
319
320
  B as feedbackApi,
320
321
  T as initializeAxios,
321
322
  F as institutionsApi,
322
- A as llmApi,
323
- f as noticeApi,
324
- C as partnersApi,
325
- P as pushApi,
323
+ f as llmApi,
324
+ A as noticeApi,
325
+ P as partnersApi,
326
+ C as pushApi,
326
327
  l as speechApi,
327
328
  U as userNotificationsApi,
328
329
  D as userSettingsApi
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/api/common/speechs/speech-chat.ts","../../../src/api/common/speechs/speech-records.ts","../../../src/api/common/speechs/speech-patients.ts","../../../src/api/common/speechs/speech-audios.ts","../../../src/api/common/speechs/speech-record-datas.ts","../../../src/api/common/speechs/speech.ts","../../../src/api/common/audio.ts","../../../src/api/common/auth.ts","../../../src/api/common/capture-rects.ts","../../../src/api/common/llm.ts","../../../src/api/common/notice.ts","../../../src/api/common/partners.ts","../../../src/api/common/push.ts","../../../src/api/common/user-settings.ts","../../../src/api/common/institutions.ts"],"sourcesContent":["import type { ChatRoomsResponse, LlmMsg } from \"../../../types\";\r\nimport { apiClient } from \"../../axios\";\r\n\r\nexport const speechChat = {\r\n getChatRooms: async (recordId: string): Promise<ChatRoomsResponse[]> => {\r\n const res = await apiClient.get(`/speech/chat/rooms/${recordId}`);\r\n return res.data;\r\n },\r\n\r\n deleteChatRoom: async ({\r\n roomId,\r\n }: {\r\n roomId: string;\r\n }): Promise<ChatRoomsResponse> => {\r\n const res = await apiClient.delete(`/speech/chat/rooms/${roomId}`);\r\n return res.data;\r\n },\r\n\r\n getChatMessages: async ({\r\n roomId,\r\n }: {\r\n roomId: string;\r\n }): Promise<{ roomId: string; msgs: LlmMsg[] }> => {\r\n const res = await apiClient.get(`/speech/chat/messages/${roomId}`);\r\n return { roomId, msgs: res.data };\r\n },\r\n updateChatRoomName: async ({\r\n roomId,\r\n name,\r\n }: {\r\n roomId: string;\r\n name: string;\r\n }): Promise<ChatRoomsResponse> => {\r\n const res = await apiClient.patch(`/speech/chat/rooms/${roomId}`, {\r\n name,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n GetRecordsByDatesRequest,\r\n GetRecordsByDatesResponse,\r\n Patient,\r\n RecordData,\r\n RecordsPageRequest,\r\n RecordsResponse,\r\n RecordsWithPageResponse,\r\n} from \"../../../types/api\";\r\nimport type { PatientInfoDto } from \"../../../types\";\r\n\r\nexport const speechRecords = {\r\n getRecords: async (): Promise<RecordsResponse[]> => {\r\n const res = await apiClient.get(\"/speech/records\");\r\n return res.data;\r\n },\r\n\r\n getRecordsWithPage: async (\r\n dto: RecordsPageRequest\r\n ): Promise<RecordsWithPageResponse> => {\r\n const res = await apiClient.post(\"/speech/records\", dto);\r\n return res.data;\r\n },\r\n\r\n deleteRecord: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordsResponse> => {\r\n const res = await apiClient.delete(`/speech/records/${recordId}`);\r\n return res.data;\r\n },\r\n\r\n getRecordById: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordsResponse> => {\r\n const res = await apiClient.get(`/speech/records/${recordId}/details`);\r\n return res.data;\r\n },\r\n\r\n getTodayRecord: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.get(`/speech/records/details/today`, {\r\n params: { chart },\r\n });\r\n return res.data;\r\n },\r\n\r\n getRecordsByChart: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<RecordsResponse[]> => {\r\n const res = await apiClient.get(`/speech/records/${chart}`);\r\n return res.data;\r\n },\r\n\r\n getRecordFromImage: async ({\r\n imageUrl,\r\n }: {\r\n imageUrl: string;\r\n }): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.post(`/speech/records/from-image`, {\r\n imageUrl,\r\n });\r\n return res.data;\r\n },\r\n\r\n getRecordFromAgent: async (\r\n patientInfo: PatientInfoDto\r\n ): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.post(`/speech/records/from-agent`, patientInfo);\r\n return res.data;\r\n },\r\n\r\n // --- admin ---\r\n getRecordsByDates: async ({\r\n startDate,\r\n endDate,\r\n page,\r\n searchText,\r\n ykiho,\r\n username,\r\n }: GetRecordsByDatesRequest): Promise<GetRecordsByDatesResponse> => {\r\n const res = await apiClient.get(\"/speech/records/by-dates\", {\r\n params: {\r\n startDate,\r\n endDate,\r\n page: Number(page),\r\n ...(searchText && { searchText }),\r\n ...(ykiho && { ykiho }),\r\n ...(username && { username }),\r\n },\r\n });\r\n return res.data;\r\n },\r\n\r\n getPatients: async (): Promise<Patient[]> => {\r\n const res = await apiClient.get(\"/speech/patients\");\r\n return res.data;\r\n },\r\n\r\n getRecordData: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordData> => {\r\n const res = await apiClient.get(`/speech/record-datas/${recordId}`);\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n GetPatientHistoryRequest,\r\n Patient,\r\n PatientHistorySummaryResponse,\r\n HasPatientHistoryResponse,\r\n UpsertPatientRequest,\r\n} from \"../../../types/api\";\r\n\r\nexport const speechPatients = {\r\n getPatientByChart: async ({ chart }: { chart: string }): Promise<Patient> => {\r\n const res = await apiClient.get(`/speech/patients/${chart}`);\r\n return res.data;\r\n },\r\n\r\n upsertPatient: async ({\r\n chart,\r\n name,\r\n }: UpsertPatientRequest): Promise<Patient> => {\r\n const res = await apiClient.put(`/speech/patients`, { chart, name });\r\n return res.data;\r\n },\r\n\r\n /**\r\n * 과거 진료 기록 존재 여부 확인\r\n */\r\n hasPatientHistory: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<HasPatientHistoryResponse> => {\r\n const res = await apiClient.get(`/speech/patients/has-history/${chart}`);\r\n return res.data;\r\n },\r\n\r\n /**\r\n * 과거 진료 기록 요약 조회\r\n */\r\n getPatientHistorySummary: async ({\r\n chart,\r\n excludeRecordId,\r\n signal,\r\n }: GetPatientHistoryRequest & {\r\n signal?: AbortSignal;\r\n }): Promise<PatientHistorySummaryResponse> => {\r\n const res = await apiClient.get(`/speech/patients/history-summary`, {\r\n params: { chart, excludeRecordId },\r\n signal,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type { AudioFile } from \"../../../types/api\";\r\n\r\nexport const speechAudios = {\r\n deleteAudioFile: async ({\r\n audioFileId,\r\n }: {\r\n audioFileId: string;\r\n }): Promise<AudioFile> => {\r\n const res = await apiClient.delete(`/speech/audios/${audioFileId}`);\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type { MedicalSummaryResponse, ResummaryPartRequest } from \"../../../types/api\";\r\n\r\nexport const speechRecordData = {\r\n resummaryPart: async ({\r\n recordId,\r\n level,\r\n part,\r\n }: ResummaryPartRequest): Promise<MedicalSummaryResponse> => {\r\n const res = await apiClient.post(`/speech/record-datas/resummary/part`, {\r\n recordId,\r\n level,\r\n part,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n TranscribeV3Response,\r\n TranscribeWithTranslationResponse,\r\n UploadRequest,\r\n UploadResponse,\r\n UploadV3Request,\r\n} from \"../../../types/api\";\r\nimport { speechChat } from \"./speech-chat\";\r\nimport { speechRecords } from \"./speech-records\";\r\nimport { speechPatients } from \"./speech-patients\";\r\nimport { speechAudios } from \"./speech-audios\";\r\nimport { speechRecordData } from \"./speech-record-datas\";\r\n\r\n// Helper function to create FormData with audio file\r\nconst createAudioFormData = (buffer: ArrayBuffer | Blob): FormData => {\r\n const blob =\r\n buffer instanceof Blob ? buffer : new Blob([buffer], { type: \"audio/pcm\" });\r\n const formData = new FormData();\r\n formData.append(\"file\", blob, \"audio.pcm\");\r\n return formData;\r\n};\r\n\r\nconst transcribeWithEndpoint = async <T>(\r\n endpoint: string,\r\n buffer: ArrayBuffer | Blob,\r\n language?: string\r\n): Promise<T> => {\r\n const formData = createAudioFormData(buffer);\r\n if (language) {\r\n formData.append(\"language\", language);\r\n }\r\n const res = await apiClient.post(endpoint, formData, {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n });\r\n return res.data;\r\n};\r\n\r\nexport const speechApi = {\r\n transcribeV3: async ({\r\n buffer,\r\n }: {\r\n buffer: ArrayBuffer | Blob;\r\n }): Promise<TranscribeV3Response> => {\r\n return transcribeWithEndpoint(\"/speech/transcribe-v3\", buffer);\r\n },\r\n\r\n transcribeWithTranslation: async ({\r\n buffer,\r\n language,\r\n }: {\r\n buffer: ArrayBuffer | Blob;\r\n language: string;\r\n }): Promise<TranscribeWithTranslationResponse> => {\r\n return transcribeWithEndpoint(\r\n \"/speech/transcribe-with-translation\",\r\n buffer,\r\n language\r\n );\r\n },\r\n\r\n uploadV3: async ({\r\n opusBlob,\r\n chart,\r\n recordId,\r\n transcript,\r\n transcripts,\r\n durationSeconds,\r\n }: UploadV3Request): Promise<UploadResponse> => {\r\n const formData = new FormData();\r\n formData.append(\r\n \"opusFile\",\r\n new Blob([opusBlob], { type: \"audio/webm\" }),\r\n \"audio.webm\"\r\n );\r\n formData.append(\"chart\", chart);\r\n formData.append(\"transcript\", transcript);\r\n formData.append(\"transcripts\", JSON.stringify(transcripts));\r\n formData.append(\"durationSeconds\", durationSeconds.toString());\r\n if (recordId) formData.append(\"recordId\", recordId);\r\n\r\n const res = await apiClient.post(\r\n \"/speech/upload-with-translation\",\r\n formData,\r\n {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n }\r\n );\r\n return res.data;\r\n },\r\n\r\n upload: async ({\r\n opusBlob,\r\n vadBuffer,\r\n totalBuffer,\r\n chart,\r\n recordId,\r\n transcript,\r\n }: UploadRequest): Promise<UploadResponse> => {\r\n const formData = new FormData();\r\n formData.append(\r\n \"opusFile\",\r\n new Blob([opusBlob], { type: \"audio/webm\" }),\r\n \"audio.webm\"\r\n );\r\n formData.append(\r\n \"totalFile\",\r\n new Blob([totalBuffer], { type: \"audio/pcm\" }),\r\n \"audio.pcm\"\r\n );\r\n if (vadBuffer)\r\n formData.append(\r\n \"vadFile\",\r\n new Blob([vadBuffer], { type: \"audio/pcm\" }),\r\n \"audio.pcm\"\r\n );\r\n formData.append(\"chart\", chart);\r\n formData.append(\"transcript\", transcript);\r\n if (recordId) formData.append(\"recordId\", recordId);\r\n\r\n const res = await apiClient.post(\"/speech/upload\", formData, {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n });\r\n return res.data;\r\n },\r\n\r\n chat: speechChat,\r\n records: speechRecords,\r\n patients: speechPatients,\r\n audios: speechAudios,\r\n recordData: speechRecordData,\r\n};\r\n","import { apiClient } from \"../axios\";\r\n\r\nexport const audioApi = {\r\n getAudioFile: async ({ bucket, keys }: { bucket: string; keys: string }) => {\r\n const res = await apiClient.get(`/audio`, {\r\n params: { bucket, keys },\r\n responseType: \"blob\",\r\n });\r\n return res.data; // Blob 타입\r\n },\r\n};\r\n","import type {\r\n AuthResponse,\r\n LoginRequest,\r\n RegisterRequest,\r\n UserDto,\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const authApi = {\r\n register: async (dto: RegisterRequest): Promise<UserDto> => {\r\n const response = await apiClient.post<UserDto>(\"/auth/register\", dto);\r\n return response.data;\r\n },\r\n login: async (credentials: LoginRequest): Promise<AuthResponse> => {\r\n const response = await apiClient.post<AuthResponse>(\r\n \"/auth/login\",\r\n credentials\r\n );\r\n return response.data;\r\n },\r\n getMe: async (): Promise<UserDto> => {\r\n const response = await apiClient.get<UserDto>(\"/auth/me\");\r\n return response.data;\r\n },\r\n logout: async (): Promise<void> => {\r\n await apiClient.post(\"/auth/logout\");\r\n },\r\n\r\n updateMe: async (data: Partial<UserDto>): Promise<{ user: UserDto }> => {\r\n const response = await apiClient.patch<{ user: UserDto }>(`/auth/me`, data);\r\n return response.data;\r\n },\r\n\r\n generateNewUserKey: async ({\r\n userId,\r\n }: {\r\n userId: string;\r\n }): Promise<UserDto> => {\r\n const response = await apiClient.put<UserDto>(\r\n `/auth/user/generate-key/${userId}`\r\n );\r\n return response.data;\r\n },\r\n\r\n // --- 관리자 ---\r\n adminLogin: async (credentials: LoginRequest): Promise<AuthResponse> => {\r\n const response = await apiClient.post<AuthResponse>(\r\n \"/auth/admin-login\",\r\n credentials\r\n );\r\n return response.data;\r\n },\r\n\r\n updateUser: async (data: Partial<UserDto>): Promise<{ user: UserDto }> => {\r\n const response = await apiClient.put<{ user: UserDto }>(\r\n `/auth/user/${data.id}`,\r\n data\r\n );\r\n return response.data;\r\n },\r\n\r\n deleteUser: async (userId: string): Promise<void> => {\r\n await apiClient.delete(`/auth/user/${userId}`);\r\n },\r\n\r\n changePassword: async (data: {\r\n currentPassword: string;\r\n newPassword: string;\r\n }): Promise<void> => {\r\n await apiClient.patch(\"/auth/me/change-password\", data);\r\n },\r\n};\r\n","import type {\r\n CaptureRect,\r\n CreateCaptureRectRequest,\r\n DeleteCaptureRectResponse,\r\n UpdateCaptureRectRequest,\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const captureRectsApi = {\r\n getMy: async (): Promise<CaptureRect> => {\r\n const res = await apiClient.get(\"/capture-rects/my\");\r\n return res.data;\r\n },\r\n // 모든 캡처 영역 조회 (GET /capture-rects)\r\n getCaptureRects: async (): Promise<CaptureRect[]> => {\r\n const response = await apiClient.get<CaptureRect[]>(\"capture-rects\");\r\n return response.data;\r\n },\r\n\r\n // 특정 캡처 영역 조회 (GET /capture-rects/:id)\r\n getCaptureRect: async (id: string): Promise<CaptureRect> => {\r\n const response = await apiClient.get<CaptureRect>(`capture-rects/${id}`);\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 생성 (POST /capture-rects)\r\n createCaptureRect: async (\r\n data: CreateCaptureRectRequest\r\n ): Promise<CaptureRect> => {\r\n const response = await apiClient.post<CaptureRect>(\"capture-rects\", data);\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 수정 (PATCH /capture-rects/:id)\r\n updateCaptureRect: async ({\r\n id,\r\n data,\r\n }: {\r\n id: string;\r\n data: UpdateCaptureRectRequest;\r\n }): Promise<CaptureRect> => {\r\n const response = await apiClient.patch<CaptureRect>(\r\n `capture-rects/${id}`,\r\n data\r\n );\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 삭제 (DELETE /capture-rects/:id)\r\n deleteCaptureRect: async (id: string): Promise<DeleteCaptureRectResponse> => {\r\n const response = await apiClient.delete<DeleteCaptureRectResponse>(\r\n `capture-rects/${id}`\r\n );\r\n return response.data;\r\n },\r\n};\r\n","import type {\r\n DiarizationRequest,\r\n DiarizationResponse,\r\n DiseaseRecommendationRequestDto,\r\n DiseaseRecommendationResponseDto,\r\n MedicalSummaryRequest,\r\n MedicalSummaryResponse,\r\n MindmapResponse\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const llmApi = {\r\n diarization: async (\r\n request: DiarizationRequest,\r\n signal?: AbortSignal\r\n ): Promise<DiarizationResponse> => {\r\n const response = await apiClient.post(\"/llm/diarization\", request, {\r\n signal,\r\n });\r\n\r\n return response.data;\r\n },\r\n\r\n medicalSummary: async ({\r\n request,\r\n signal,\r\n }: {\r\n request: MedicalSummaryRequest;\r\n signal: AbortSignal;\r\n }): Promise<MedicalSummaryResponse> => {\r\n const response = await apiClient.post(\"/llm/medical-summary\", request, {\r\n signal,\r\n });\r\n\r\n return response.data;\r\n },\r\n\r\n mindmap: async ({\r\n conversation,\r\n }: {\r\n conversation: string;\r\n }): Promise<MindmapResponse> => {\r\n const response = await apiClient.post(`/llm/mindmap`, { conversation });\r\n return response.data;\r\n },\r\n\r\n diseaseRecommendation: async ({\r\n conversation,\r\n }: DiseaseRecommendationRequestDto): Promise<DiseaseRecommendationResponseDto> => {\r\n const response = await apiClient.post(`/llm/disease-recommendation`, {\r\n conversation,\r\n });\r\n return response.data;\r\n },\r\n};\r\n","import type { CreateNoticeRequest, Notice, NoticeListRequest, NoticeListResponse, UpdateNoticeRequest } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const noticeApi = {\r\n getNotices: async (\r\n params?: NoticeListRequest\r\n ): Promise<NoticeListResponse> => {\r\n const response = await apiClient.post<NoticeListResponse>(\"/notices/page\", {\r\n page: params?.page ?? 1,\r\n count: params?.count ?? 10,\r\n searchText: params?.searchText,\r\n showPublishedOnly: params?.showPublishedOnly ?? true,\r\n });\r\n return response.data;\r\n },\r\n\r\n getNotice: async (id: string): Promise<Notice> => {\r\n const response = await apiClient.get<Notice>(`/notices/${id}`);\r\n return response.data;\r\n },\r\n\r\n // Create a new notice\r\n createNotice: async (data: CreateNoticeRequest): Promise<Notice> => {\r\n const response = await apiClient.post<Notice>(\"/notices\", data);\r\n return response.data;\r\n },\r\n\r\n // Update an existing notice\r\n updateNotice: async (\r\n id: string,\r\n data: UpdateNoticeRequest\r\n ): Promise<Notice> => {\r\n const response = await apiClient.put<Notice>(`/notices/${id}`, data);\r\n return response.data;\r\n },\r\n\r\n // Delete a notice\r\n deleteNotice: async (id: string): Promise<void> => {\r\n await apiClient.delete(`/notices/${id}`);\r\n },\r\n};\r\n","import type { PartnerDto } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\nimport type { CreatePartnerRequest, UpdatePartnerRequest } from \"../../types/api\";\r\n\r\nexport const partnersApi = {\r\n // 모든 파트너 조회\r\n getPartners: async (): Promise<PartnerDto[]> => {\r\n const response = await apiClient.get(\"/partners\");\r\n return response.data;\r\n },\r\n\r\n // 파트너 상세 조회\r\n getPartner: async (id: string): Promise<PartnerDto> => {\r\n const response = await apiClient.get(`/partners/${id}`);\r\n return response.data;\r\n },\r\n\r\n // 파트너 생성\r\n createPartner: async (request: CreatePartnerRequest): Promise<PartnerDto> => {\r\n const response = await apiClient.post(\"/partners\", request);\r\n return response.data;\r\n },\r\n\r\n // 파트너 수정\r\n updatePartner: async (\r\n id: string,\r\n request: UpdatePartnerRequest\r\n ): Promise<PartnerDto> => {\r\n const response = await apiClient.patch(`/partners/${id}`, request);\r\n return response.data;\r\n },\r\n\r\n // 파트너 삭제\r\n deletePartner: async (id: string): Promise<PartnerDto> => {\r\n const response = await apiClient.delete(`/partners/${id}`);\r\n return response.data;\r\n },\r\n};\r\n","import type { SendNotificationRequest } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const pushApi = {\r\n /**\r\n * Push 구독 정보를 서버에 저장\r\n */\r\n subscribe: async (\r\n subscription: PushSubscription\r\n ): Promise<{ success: boolean }> => {\r\n const response = await apiClient.post<{ success: boolean }>(\r\n \"/push/subscribe\",\r\n subscription.toJSON()\r\n );\r\n return response.data;\r\n },\r\n\r\n /**\r\n * Push 구독 해제\r\n */\r\n unsubscribe: async (endpoint: string): Promise<{ success: boolean }> => {\r\n const response = await apiClient.post<{ success: boolean }>(\r\n \"/push/unsubscribe\",\r\n { endpoint }\r\n );\r\n return response.data;\r\n },\r\n\r\n /**\r\n * 현재 사용자의 Push 구독 상태 확인\r\n */\r\n getSubscriptionStatus: async (): Promise<{\r\n isSubscribed: boolean;\r\n endpoint?: string;\r\n }> => {\r\n const response = await apiClient.get<{\r\n isSubscribed: boolean;\r\n endpoint?: string;\r\n }>(\"/push/status\");\r\n return response.data;\r\n },\r\n\r\n /**\r\n * Push 알림 전송\r\n * @param notification - 알림 요청 데이터\r\n */\r\n sendNotification: async (\r\n notification: SendNotificationRequest\r\n ): Promise<void> => {\r\n await apiClient.post(\"/push/send\", notification);\r\n },\r\n};\r\n","import type { UpsertUserSettingRequest, UserSetting } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const userSettingsApi = {\r\n getUserSettings: async (): Promise<UserSetting> => {\r\n const response = await apiClient.get(\"/user-settings\");\r\n return response.data;\r\n },\r\n\r\n updateUserSettings: async (\r\n settings: UpsertUserSettingRequest,\r\n ): Promise<UserSetting> => {\r\n const response = await apiClient.put(\"/user-settings\", settings);\r\n return response.data;\r\n },\r\n};\r\n","import type { Institution } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const institutionsApi = {\r\n getInstitutions: async (): Promise<Institution[]> => {\r\n const response = await apiClient.get<Institution[]>(\"institutions\");\r\n return response.data;\r\n },\r\n register: async (data: Institution): Promise<Institution> => {\r\n const response = await apiClient.post<Institution>(\"institutions\", data);\r\n return response.data;\r\n },\r\n update: async ({\r\n ykiho,\r\n data,\r\n }: {\r\n ykiho: string;\r\n data: Partial<Institution>;\r\n }): Promise<Institution> => {\r\n const response = await apiClient.patch(`institutions/${ykiho}`, data);\r\n return response.data;\r\n },\r\n delete: async (ykiho: string): Promise<void> => {\r\n await apiClient.delete(`institutions/${ykiho}`);\r\n },\r\n};\r\n"],"names":["speechChat","getChatRooms","recordId","apiClient","get","data","deleteChatRoom","roomId","delete","getChatMessages","res","msgs","updateChatRoomName","name","patch","speechRecords","getRecords","getRecordsWithPage","dto","post","deleteRecord","getRecordById","getTodayRecord","chart","params","getRecordsByChart","getRecordFromImage","imageUrl","getRecordFromAgent","patientInfo","getRecordsByDates","startDate","endDate","page","searchText","ykiho","username","Number","getPatients","getRecordData","speechPatients","getPatientByChart","upsertPatient","put","hasPatientHistory","getPatientHistorySummary","excludeRecordId","signal","speechAudios","deleteAudioFile","audioFileId","speechRecordData","resummaryPart","level","part","createAudioFormData","buffer","blob","Blob","type","formData","FormData","append","transcribeWithEndpoint","endpoint","language","headers","speechApi","transcribeV3","transcribeWithTranslation","uploadV3","opusBlob","transcript","transcripts","durationSeconds","JSON","stringify","toString","upload","vadBuffer","totalBuffer","chat","records","patients","audios","recordData","audioApi","getAudioFile","bucket","keys","responseType","authApi","register","login","credentials","getMe","logout","updateMe","generateNewUserKey","userId","adminLogin","updateUser","id","deleteUser","changePassword","captureRectsApi","getMy","getCaptureRects","getCaptureRect","createCaptureRect","updateCaptureRect","deleteCaptureRect","llmApi","diarization","request","medicalSummary","mindmap","conversation","diseaseRecommendation","noticeApi","getNotices","count","showPublishedOnly","getNotice","createNotice","updateNotice","deleteNotice","partnersApi","getPartners","getPartner","createPartner","updatePartner","deletePartner","pushApi","subscribe","subscription","toJSON","unsubscribe","getSubscriptionStatus","sendNotification","notification","userSettingsApi","getUserSettings","updateUserSettings","settings","institutionsApi","getInstitutions","update"],"mappings":";;;AAGO,MAAMA,IAAa;AAAA,EACxBC,cAAc,OAAOC,OACP,MAAMC,EAAUC,IAAI,sBAAsBF,CAAQ,EAAE,GACrDG;AAAAA,EAGbC,gBAAgB,OAAO;AAAA,IACrBC,QAAAA;AAAAA,EAAAA,OAIY,MAAMJ,EAAUK,OAAO,sBAAsBD,CAAM,EAAE,GACtDF;AAAAA,EAGbI,iBAAiB,OAAO;AAAA,IACtBF,QAAAA;AAAAA,EAAAA,MAGiD;AACjD,UAAMG,IAAM,MAAMP,EAAUC,IAAI,yBAAyBG,CAAM,EAAE;AACjE,WAAO;AAAA,MAAEA,QAAAA;AAAAA,MAAQI,MAAMD,EAAIL;AAAAA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,CAAK,EAAE;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/api/common/speechs/speech-chat.ts","../../../src/api/common/speechs/speech-records.ts","../../../src/api/common/speechs/speech-patients.ts","../../../src/api/common/speechs/speech-audios.ts","../../../src/api/common/speechs/speech-record-datas.ts","../../../src/api/common/speechs/speech.ts","../../../src/api/common/audio.ts","../../../src/api/common/auth.ts","../../../src/api/common/capture-rects.ts","../../../src/api/common/llm.ts","../../../src/api/common/notice.ts","../../../src/api/common/partners.ts","../../../src/api/common/push.ts","../../../src/api/common/user-settings.ts","../../../src/api/common/institutions.ts"],"sourcesContent":["import type { ChatRoomsResponse, LlmMsg } from \"../../../types\";\r\nimport { apiClient } from \"../../axios\";\r\n\r\nexport const speechChat = {\r\n getChatRooms: async (recordId: string): Promise<ChatRoomsResponse[]> => {\r\n const res = await apiClient.get(`/speech/chat/rooms/${recordId}`);\r\n return res.data;\r\n },\r\n\r\n deleteChatRoom: async ({\r\n roomId,\r\n }: {\r\n roomId: string;\r\n }): Promise<ChatRoomsResponse> => {\r\n const res = await apiClient.delete(`/speech/chat/rooms/${roomId}`);\r\n return res.data;\r\n },\r\n\r\n getChatMessages: async ({\r\n roomId,\r\n }: {\r\n roomId: string;\r\n }): Promise<{ roomId: string; msgs: LlmMsg[] }> => {\r\n const res = await apiClient.get(`/speech/chat/messages/${roomId}`);\r\n return { roomId, msgs: res.data };\r\n },\r\n updateChatRoomName: async ({\r\n roomId,\r\n name,\r\n }: {\r\n roomId: string;\r\n name: string;\r\n }): Promise<ChatRoomsResponse> => {\r\n const res = await apiClient.patch(`/speech/chat/rooms/${roomId}`, {\r\n name,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n GetRecordsByDatesRequest,\r\n GetRecordsByDatesResponse,\r\n Patient,\r\n RecordData,\r\n RecordsPageRequest,\r\n RecordsResponse,\r\n RecordsWithPageResponse,\r\n} from \"../../../types/api\";\r\nimport type { PatientInfoDto } from \"../../../types\";\r\n\r\nexport const speechRecords = {\r\n getRecords: async (): Promise<RecordsResponse[]> => {\r\n const res = await apiClient.get(\"/speech/records\");\r\n return res.data;\r\n },\r\n\r\n getRecordsWithPage: async (\r\n dto: RecordsPageRequest\r\n ): Promise<RecordsWithPageResponse> => {\r\n const res = await apiClient.post(\"/speech/records\", dto);\r\n return res.data;\r\n },\r\n\r\n deleteRecord: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordsResponse> => {\r\n const res = await apiClient.delete(`/speech/records/${recordId}`);\r\n return res.data;\r\n },\r\n\r\n getRecordById: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordsResponse> => {\r\n const res = await apiClient.get(`/speech/records/${recordId}/details`);\r\n return res.data;\r\n },\r\n\r\n getTodayRecord: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.get(`/speech/records/details/today`, {\r\n params: { chart },\r\n });\r\n return res.data;\r\n },\r\n\r\n getRecordsByChart: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<RecordsResponse[]> => {\r\n const res = await apiClient.get(`/speech/records/${chart}`);\r\n return res.data;\r\n },\r\n\r\n getRecordFromImage: async ({\r\n imageUrl,\r\n }: {\r\n imageUrl: string;\r\n }): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.post(`/speech/records/from-image`, {\r\n imageUrl,\r\n });\r\n return res.data;\r\n },\r\n\r\n getRecordFromAgent: async (\r\n patientInfo: PatientInfoDto\r\n ): Promise<Partial<RecordsResponse>> => {\r\n const res = await apiClient.post(`/speech/records/from-agent`, patientInfo);\r\n return res.data;\r\n },\r\n\r\n // --- admin ---\r\n getRecordsByDates: async ({\r\n startDate,\r\n endDate,\r\n page,\r\n searchText,\r\n ykiho,\r\n username,\r\n }: GetRecordsByDatesRequest): Promise<GetRecordsByDatesResponse> => {\r\n const res = await apiClient.get(\"/speech/records/by-dates\", {\r\n params: {\r\n startDate,\r\n endDate,\r\n page: Number(page),\r\n ...(searchText && { searchText }),\r\n ...(ykiho && { ykiho }),\r\n ...(username && { username }),\r\n },\r\n });\r\n return res.data;\r\n },\r\n\r\n getPatients: async (): Promise<Patient[]> => {\r\n const res = await apiClient.get(\"/speech/patients\");\r\n return res.data;\r\n },\r\n\r\n getRecordData: async ({\r\n recordId,\r\n }: {\r\n recordId: string;\r\n }): Promise<RecordData> => {\r\n const res = await apiClient.get(`/speech/record-datas/${recordId}`);\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n GetPatientHistoryRequest,\r\n Patient,\r\n PatientHistorySummaryResponse,\r\n HasPatientHistoryResponse,\r\n UpsertPatientRequest,\r\n} from \"../../../types/api\";\r\n\r\nexport const speechPatients = {\r\n getPatientByChart: async ({ chart }: { chart: string }): Promise<Patient> => {\r\n const res = await apiClient.get(`/speech/patients/${chart}`);\r\n return res.data;\r\n },\r\n\r\n upsertPatient: async ({\r\n chart,\r\n name,\r\n }: UpsertPatientRequest): Promise<Patient> => {\r\n const res = await apiClient.put(`/speech/patients`, { chart, name });\r\n return res.data;\r\n },\r\n\r\n /**\r\n * 과거 진료 기록 존재 여부 확인\r\n */\r\n hasPatientHistory: async ({\r\n chart,\r\n }: {\r\n chart: string;\r\n }): Promise<HasPatientHistoryResponse> => {\r\n const res = await apiClient.get(`/speech/patients/has-history/${chart}`);\r\n return res.data;\r\n },\r\n\r\n /**\r\n * 과거 진료 기록 요약 조회\r\n */\r\n getPatientHistorySummary: async ({\r\n chart,\r\n excludeRecordId,\r\n signal,\r\n }: GetPatientHistoryRequest & {\r\n signal?: AbortSignal;\r\n }): Promise<PatientHistorySummaryResponse> => {\r\n const res = await apiClient.get(`/speech/patients/history-summary`, {\r\n params: { chart, excludeRecordId },\r\n signal,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type { AudioFile } from \"../../../types/api\";\r\n\r\nexport const speechAudios = {\r\n deleteAudioFile: async ({\r\n audioFileId,\r\n }: {\r\n audioFileId: string;\r\n }): Promise<AudioFile> => {\r\n const res = await apiClient.delete(`/speech/audios/${audioFileId}`);\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type { MedicalSummaryResponse, ResummaryPartRequest } from \"../../../types/api\";\r\n\r\nexport const speechRecordData = {\r\n resummaryPart: async ({\r\n recordId,\r\n level,\r\n part,\r\n }: ResummaryPartRequest): Promise<MedicalSummaryResponse> => {\r\n const res = await apiClient.post(`/speech/record-datas/resummary/part`, {\r\n recordId,\r\n level,\r\n part,\r\n });\r\n return res.data;\r\n },\r\n};\r\n","import { apiClient } from \"../../axios\";\r\nimport type {\r\n TranscribeV3Request,\r\n TranscribeV3Response,\r\n TranscribeWithTranslationResponse,\r\n UploadRequest,\r\n UploadResponse,\r\n UploadV3Request,\r\n} from \"../../../types/api\";\r\nimport { speechChat } from \"./speech-chat\";\r\nimport { speechRecords } from \"./speech-records\";\r\nimport { speechPatients } from \"./speech-patients\";\r\nimport { speechAudios } from \"./speech-audios\";\r\nimport { speechRecordData } from \"./speech-record-datas\";\r\n\r\n// Helper function to create FormData with audio file\r\nconst createAudioFormData = (buffer: ArrayBuffer | Blob): FormData => {\r\n const blob =\r\n buffer instanceof Blob ? buffer : new Blob([buffer], { type: \"audio/pcm\" });\r\n const formData = new FormData();\r\n formData.append(\"file\", blob, \"audio.pcm\");\r\n return formData;\r\n};\r\n\r\nconst transcribeWithEndpoint = async <T>(\r\n endpoint: string,\r\n buffer: ArrayBuffer | Blob,\r\n language?: string,\r\n useProofreading: boolean = true\r\n): Promise<T> => {\r\n const formData = createAudioFormData(buffer);\r\n if (language) {\r\n formData.append(\"language\", language);\r\n }\r\n formData.append(\"useProofreading\", String(useProofreading));\r\n const res = await apiClient.post(endpoint, formData, {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n });\r\n return res.data;\r\n};\r\n\r\nexport const speechApi = {\r\n transcribeV3: async ({\r\n buffer,\r\n useProofreading,\r\n }: TranscribeV3Request): Promise<TranscribeV3Response> => {\r\n return transcribeWithEndpoint(\r\n \"/speech/transcribe-v3\",\r\n buffer,\r\n undefined,\r\n useProofreading\r\n );\r\n },\r\n\r\n transcribeWithTranslation: async ({\r\n buffer,\r\n language,\r\n }: {\r\n buffer: ArrayBuffer | Blob;\r\n language: string;\r\n }): Promise<TranscribeWithTranslationResponse> => {\r\n return transcribeWithEndpoint(\r\n \"/speech/transcribe-with-translation\",\r\n buffer,\r\n language\r\n );\r\n },\r\n\r\n uploadV3: async ({\r\n opusBlob,\r\n chart,\r\n recordId,\r\n transcript,\r\n transcripts,\r\n durationSeconds,\r\n }: UploadV3Request): Promise<UploadResponse> => {\r\n const formData = new FormData();\r\n formData.append(\r\n \"opusFile\",\r\n new Blob([opusBlob], { type: \"audio/webm\" }),\r\n \"audio.webm\"\r\n );\r\n formData.append(\"chart\", chart);\r\n formData.append(\"transcript\", transcript);\r\n formData.append(\"transcripts\", JSON.stringify(transcripts));\r\n formData.append(\"durationSeconds\", durationSeconds.toString());\r\n if (recordId) formData.append(\"recordId\", recordId);\r\n\r\n const res = await apiClient.post(\r\n \"/speech/upload-with-translation\",\r\n formData,\r\n {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n }\r\n );\r\n return res.data;\r\n },\r\n\r\n upload: async ({\r\n opusBlob,\r\n vadBuffer,\r\n totalBuffer,\r\n chart,\r\n recordId,\r\n transcript,\r\n }: UploadRequest): Promise<UploadResponse> => {\r\n const formData = new FormData();\r\n formData.append(\r\n \"opusFile\",\r\n new Blob([opusBlob], { type: \"audio/webm\" }),\r\n \"audio.webm\"\r\n );\r\n formData.append(\r\n \"totalFile\",\r\n new Blob([totalBuffer], { type: \"audio/pcm\" }),\r\n \"audio.pcm\"\r\n );\r\n if (vadBuffer)\r\n formData.append(\r\n \"vadFile\",\r\n new Blob([vadBuffer], { type: \"audio/pcm\" }),\r\n \"audio.pcm\"\r\n );\r\n formData.append(\"chart\", chart);\r\n formData.append(\"transcript\", transcript);\r\n if (recordId) formData.append(\"recordId\", recordId);\r\n\r\n const res = await apiClient.post(\"/speech/upload\", formData, {\r\n headers: {\r\n \"Content-Type\": \"multipart/form-data\",\r\n },\r\n });\r\n return res.data;\r\n },\r\n\r\n chat: speechChat,\r\n records: speechRecords,\r\n patients: speechPatients,\r\n audios: speechAudios,\r\n recordData: speechRecordData,\r\n};\r\n","import { apiClient } from \"../axios\";\r\n\r\nexport const audioApi = {\r\n getAudioFile: async ({ bucket, keys }: { bucket: string; keys: string }) => {\r\n const res = await apiClient.get(`/audio`, {\r\n params: { bucket, keys },\r\n responseType: \"blob\",\r\n });\r\n return res.data; // Blob 타입\r\n },\r\n};\r\n","import type {\r\n AuthResponse,\r\n LoginRequest,\r\n RegisterRequest,\r\n UserDto,\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const authApi = {\r\n register: async (dto: RegisterRequest): Promise<UserDto> => {\r\n const response = await apiClient.post<UserDto>(\"/auth/register\", dto);\r\n return response.data;\r\n },\r\n login: async (credentials: LoginRequest): Promise<AuthResponse> => {\r\n const response = await apiClient.post<AuthResponse>(\r\n \"/auth/login\",\r\n credentials\r\n );\r\n return response.data;\r\n },\r\n getMe: async (): Promise<UserDto> => {\r\n const response = await apiClient.get<UserDto>(\"/auth/me\");\r\n return response.data;\r\n },\r\n logout: async (): Promise<void> => {\r\n await apiClient.post(\"/auth/logout\");\r\n },\r\n\r\n updateMe: async (data: Partial<UserDto>): Promise<{ user: UserDto }> => {\r\n const response = await apiClient.patch<{ user: UserDto }>(`/auth/me`, data);\r\n return response.data;\r\n },\r\n\r\n generateNewUserKey: async ({\r\n userId,\r\n }: {\r\n userId: string;\r\n }): Promise<UserDto> => {\r\n const response = await apiClient.put<UserDto>(\r\n `/auth/user/generate-key/${userId}`\r\n );\r\n return response.data;\r\n },\r\n\r\n // --- 관리자 ---\r\n adminLogin: async (credentials: LoginRequest): Promise<AuthResponse> => {\r\n const response = await apiClient.post<AuthResponse>(\r\n \"/auth/admin-login\",\r\n credentials\r\n );\r\n return response.data;\r\n },\r\n\r\n updateUser: async (data: Partial<UserDto>): Promise<{ user: UserDto }> => {\r\n const response = await apiClient.put<{ user: UserDto }>(\r\n `/auth/user/${data.id}`,\r\n data\r\n );\r\n return response.data;\r\n },\r\n\r\n deleteUser: async (userId: string): Promise<void> => {\r\n await apiClient.delete(`/auth/user/${userId}`);\r\n },\r\n\r\n changePassword: async (data: {\r\n currentPassword: string;\r\n newPassword: string;\r\n }): Promise<void> => {\r\n await apiClient.patch(\"/auth/me/change-password\", data);\r\n },\r\n};\r\n","import type {\r\n CaptureRect,\r\n CreateCaptureRectRequest,\r\n DeleteCaptureRectResponse,\r\n UpdateCaptureRectRequest,\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const captureRectsApi = {\r\n getMy: async (): Promise<CaptureRect> => {\r\n const res = await apiClient.get(\"/capture-rects/my\");\r\n return res.data;\r\n },\r\n // 모든 캡처 영역 조회 (GET /capture-rects)\r\n getCaptureRects: async (): Promise<CaptureRect[]> => {\r\n const response = await apiClient.get<CaptureRect[]>(\"capture-rects\");\r\n return response.data;\r\n },\r\n\r\n // 특정 캡처 영역 조회 (GET /capture-rects/:id)\r\n getCaptureRect: async (id: string): Promise<CaptureRect> => {\r\n const response = await apiClient.get<CaptureRect>(`capture-rects/${id}`);\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 생성 (POST /capture-rects)\r\n createCaptureRect: async (\r\n data: CreateCaptureRectRequest\r\n ): Promise<CaptureRect> => {\r\n const response = await apiClient.post<CaptureRect>(\"capture-rects\", data);\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 수정 (PATCH /capture-rects/:id)\r\n updateCaptureRect: async ({\r\n id,\r\n data,\r\n }: {\r\n id: string;\r\n data: UpdateCaptureRectRequest;\r\n }): Promise<CaptureRect> => {\r\n const response = await apiClient.patch<CaptureRect>(\r\n `capture-rects/${id}`,\r\n data\r\n );\r\n return response.data;\r\n },\r\n\r\n // 캡처 영역 삭제 (DELETE /capture-rects/:id)\r\n deleteCaptureRect: async (id: string): Promise<DeleteCaptureRectResponse> => {\r\n const response = await apiClient.delete<DeleteCaptureRectResponse>(\r\n `capture-rects/${id}`\r\n );\r\n return response.data;\r\n },\r\n};\r\n","import type {\r\n DiarizationRequest,\r\n DiarizationResponse,\r\n DiseaseRecommendationRequestDto,\r\n DiseaseRecommendationResponseDto,\r\n MedicalSummaryRequest,\r\n MedicalSummaryResponse,\r\n MindmapResponse\r\n} from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const llmApi = {\r\n diarization: async (\r\n request: DiarizationRequest,\r\n signal?: AbortSignal\r\n ): Promise<DiarizationResponse> => {\r\n const response = await apiClient.post(\"/llm/diarization\", request, {\r\n signal,\r\n });\r\n\r\n return response.data;\r\n },\r\n\r\n medicalSummary: async ({\r\n request,\r\n signal,\r\n }: {\r\n request: MedicalSummaryRequest;\r\n signal: AbortSignal;\r\n }): Promise<MedicalSummaryResponse> => {\r\n const response = await apiClient.post(\"/llm/medical-summary\", request, {\r\n signal,\r\n });\r\n\r\n return response.data;\r\n },\r\n\r\n mindmap: async ({\r\n conversation,\r\n }: {\r\n conversation: string;\r\n }): Promise<MindmapResponse> => {\r\n const response = await apiClient.post(`/llm/mindmap`, { conversation });\r\n return response.data;\r\n },\r\n\r\n diseaseRecommendation: async ({\r\n conversation,\r\n }: DiseaseRecommendationRequestDto): Promise<DiseaseRecommendationResponseDto> => {\r\n const response = await apiClient.post(`/llm/disease-recommendation`, {\r\n conversation,\r\n });\r\n return response.data;\r\n },\r\n};\r\n","import type { CreateNoticeRequest, Notice, NoticeListRequest, NoticeListResponse, UpdateNoticeRequest } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const noticeApi = {\r\n getNotices: async (\r\n params?: NoticeListRequest\r\n ): Promise<NoticeListResponse> => {\r\n const response = await apiClient.post<NoticeListResponse>(\"/notices/page\", {\r\n page: params?.page ?? 1,\r\n count: params?.count ?? 10,\r\n searchText: params?.searchText,\r\n showPublishedOnly: params?.showPublishedOnly ?? true,\r\n });\r\n return response.data;\r\n },\r\n\r\n getNotice: async (id: string): Promise<Notice> => {\r\n const response = await apiClient.get<Notice>(`/notices/${id}`);\r\n return response.data;\r\n },\r\n\r\n // Create a new notice\r\n createNotice: async (data: CreateNoticeRequest): Promise<Notice> => {\r\n const response = await apiClient.post<Notice>(\"/notices\", data);\r\n return response.data;\r\n },\r\n\r\n // Update an existing notice\r\n updateNotice: async (\r\n id: string,\r\n data: UpdateNoticeRequest\r\n ): Promise<Notice> => {\r\n const response = await apiClient.put<Notice>(`/notices/${id}`, data);\r\n return response.data;\r\n },\r\n\r\n // Delete a notice\r\n deleteNotice: async (id: string): Promise<void> => {\r\n await apiClient.delete(`/notices/${id}`);\r\n },\r\n};\r\n","import type { PartnerDto } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\nimport type { CreatePartnerRequest, UpdatePartnerRequest } from \"../../types/api\";\r\n\r\nexport const partnersApi = {\r\n // 모든 파트너 조회\r\n getPartners: async (): Promise<PartnerDto[]> => {\r\n const response = await apiClient.get(\"/partners\");\r\n return response.data;\r\n },\r\n\r\n // 파트너 상세 조회\r\n getPartner: async (id: string): Promise<PartnerDto> => {\r\n const response = await apiClient.get(`/partners/${id}`);\r\n return response.data;\r\n },\r\n\r\n // 파트너 생성\r\n createPartner: async (request: CreatePartnerRequest): Promise<PartnerDto> => {\r\n const response = await apiClient.post(\"/partners\", request);\r\n return response.data;\r\n },\r\n\r\n // 파트너 수정\r\n updatePartner: async (\r\n id: string,\r\n request: UpdatePartnerRequest\r\n ): Promise<PartnerDto> => {\r\n const response = await apiClient.patch(`/partners/${id}`, request);\r\n return response.data;\r\n },\r\n\r\n // 파트너 삭제\r\n deletePartner: async (id: string): Promise<PartnerDto> => {\r\n const response = await apiClient.delete(`/partners/${id}`);\r\n return response.data;\r\n },\r\n};\r\n","import type { SendNotificationRequest } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const pushApi = {\r\n /**\r\n * Push 구독 정보를 서버에 저장\r\n */\r\n subscribe: async (\r\n subscription: PushSubscription\r\n ): Promise<{ success: boolean }> => {\r\n const response = await apiClient.post<{ success: boolean }>(\r\n \"/push/subscribe\",\r\n subscription.toJSON()\r\n );\r\n return response.data;\r\n },\r\n\r\n /**\r\n * Push 구독 해제\r\n */\r\n unsubscribe: async (endpoint: string): Promise<{ success: boolean }> => {\r\n const response = await apiClient.post<{ success: boolean }>(\r\n \"/push/unsubscribe\",\r\n { endpoint }\r\n );\r\n return response.data;\r\n },\r\n\r\n /**\r\n * 현재 사용자의 Push 구독 상태 확인\r\n */\r\n getSubscriptionStatus: async (): Promise<{\r\n isSubscribed: boolean;\r\n endpoint?: string;\r\n }> => {\r\n const response = await apiClient.get<{\r\n isSubscribed: boolean;\r\n endpoint?: string;\r\n }>(\"/push/status\");\r\n return response.data;\r\n },\r\n\r\n /**\r\n * Push 알림 전송\r\n * @param notification - 알림 요청 데이터\r\n */\r\n sendNotification: async (\r\n notification: SendNotificationRequest\r\n ): Promise<void> => {\r\n await apiClient.post(\"/push/send\", notification);\r\n },\r\n};\r\n","import type { UpsertUserSettingRequest, UserSetting } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const userSettingsApi = {\r\n getUserSettings: async (): Promise<UserSetting> => {\r\n const response = await apiClient.get(\"/user-settings\");\r\n return response.data;\r\n },\r\n\r\n updateUserSettings: async (\r\n settings: UpsertUserSettingRequest,\r\n ): Promise<UserSetting> => {\r\n const response = await apiClient.put(\"/user-settings\", settings);\r\n return response.data;\r\n },\r\n};\r\n","import type { Institution } from \"../../types\";\r\nimport { apiClient } from \"../axios\";\r\n\r\nexport const institutionsApi = {\r\n getInstitutions: async (): Promise<Institution[]> => {\r\n const response = await apiClient.get<Institution[]>(\"institutions\");\r\n return response.data;\r\n },\r\n register: async (data: Institution): Promise<Institution> => {\r\n const response = await apiClient.post<Institution>(\"institutions\", data);\r\n return response.data;\r\n },\r\n update: async ({\r\n ykiho,\r\n data,\r\n }: {\r\n ykiho: string;\r\n data: Partial<Institution>;\r\n }): Promise<Institution> => {\r\n const response = await apiClient.patch(`institutions/${ykiho}`, data);\r\n return response.data;\r\n },\r\n delete: async (ykiho: string): Promise<void> => {\r\n await apiClient.delete(`institutions/${ykiho}`);\r\n },\r\n};\r\n"],"names":["speechChat","getChatRooms","recordId","apiClient","get","data","deleteChatRoom","roomId","delete","getChatMessages","res","msgs","updateChatRoomName","name","patch","speechRecords","getRecords","getRecordsWithPage","dto","post","deleteRecord","getRecordById","getTodayRecord","chart","params","getRecordsByChart","getRecordFromImage","imageUrl","getRecordFromAgent","patientInfo","getRecordsByDates","startDate","endDate","page","searchText","ykiho","username","Number","getPatients","getRecordData","speechPatients","getPatientByChart","upsertPatient","put","hasPatientHistory","getPatientHistorySummary","excludeRecordId","signal","speechAudios","deleteAudioFile","audioFileId","speechRecordData","resummaryPart","level","part","createAudioFormData","buffer","blob","Blob","type","formData","FormData","append","transcribeWithEndpoint","endpoint","language","useProofreading","String","headers","speechApi","transcribeV3","undefined","transcribeWithTranslation","uploadV3","opusBlob","transcript","transcripts","durationSeconds","JSON","stringify","toString","upload","vadBuffer","totalBuffer","chat","records","patients","audios","recordData","audioApi","getAudioFile","bucket","keys","responseType","authApi","register","login","credentials","getMe","logout","updateMe","generateNewUserKey","userId","adminLogin","updateUser","id","deleteUser","changePassword","captureRectsApi","getMy","getCaptureRects","getCaptureRect","createCaptureRect","updateCaptureRect","deleteCaptureRect","llmApi","diarization","request","medicalSummary","mindmap","conversation","diseaseRecommendation","noticeApi","getNotices","count","showPublishedOnly","getNotice","createNotice","updateNotice","deleteNotice","partnersApi","getPartners","getPartner","createPartner","updatePartner","deletePartner","pushApi","subscribe","subscription","toJSON","unsubscribe","getSubscriptionStatus","sendNotification","notification","userSettingsApi","getUserSettings","updateUserSettings","settings","institutionsApi","getInstitutions","update"],"mappings":";;;AAGO,MAAMA,IAAa;AAAA,EACxBC,cAAc,OAAOC,OACP,MAAMC,EAAUC,IAAI,sBAAsBF,CAAQ,EAAE,GACrDG;AAAAA,EAGbC,gBAAgB,OAAO;AAAA,IACrBC,QAAAA;AAAAA,EAAAA,OAIY,MAAMJ,EAAUK,OAAO,sBAAsBD,CAAM,EAAE,GACtDF;AAAAA,EAGbI,iBAAiB,OAAO;AAAA,IACtBF,QAAAA;AAAAA,EAAAA,MAGiD;AACjD,UAAMG,IAAM,MAAMP,EAAUC,IAAI,yBAAyBG,CAAM,EAAE;AACjE,WAAO;AAAA,MAAEA,QAAAA;AAAAA,MAAQI,MAAMD,EAAIL;AAAAA,IAAAA;AAAAA,EAC7B;AAAA,EACAO,oBAAoB,OAAO;AAAA,IACzBL,QAAAA;AAAAA,IACAM,MAAAA;AAAAA,EAAAA,OAKY,MAAMV,EAAUW,MAAM,sBAAsBP,CAAM,IAAI;AAAA,IAChEM,MAAAA;AAAAA,EAAAA,CACD,GACUR;AAEf,GC1BaU,IAAgB;AAAA,EAC3BC,YAAY,aACE,MAAMb,EAAUC,IAAI,iBAAiB,GACtCC;AAAAA,EAGbY,oBAAoB,OAClBC,OAEY,MAAMf,EAAUgB,KAAK,mBAAmBD,CAAG,GAC5Cb;AAAAA,EAGbe,cAAc,OAAO;AAAA,IACnBlB,UAAAA;AAAAA,EAAAA,OAIY,MAAMC,EAAUK,OAAO,mBAAmBN,CAAQ,EAAE,GACrDG;AAAAA,EAGbgB,eAAe,OAAO;AAAA,IACpBnB,UAAAA;AAAAA,EAAAA,OAIY,MAAMC,EAAUC,IAAI,mBAAmBF,CAAQ,UAAU,GAC1DG;AAAAA,EAGbiB,gBAAgB,OAAO;AAAA,IACrBC,OAAAA;AAAAA,EAAAA,OAIY,MAAMpB,EAAUC,IAAI,iCAAiC;AAAA,IAC/DoB,QAAQ;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cAAc4H,CAAY;AAAA,EACjD;AACF,GChDaC,IAAkB;AAAA,EAC7BC,iBAAiB,aACE,MAAM9I,EAAUC,IAAI,gBAAgB,GACrCC;AAAAA,EAGlB6I,oBAAoB,OAClBC,OAEiB,MAAMhJ,EAAUwC,IAAI,kBAAkBwG,CAAQ,GAC/C9I;AAEpB,GCZa+I,IAAkB;AAAA,EAC7BC,iBAAiB,aACE,MAAMlJ,EAAUC,IAAmB,cAAc,GAClDC;AAAAA,EAElB0F,UAAU,OAAO1F,OACE,MAAMF,EAAUgB,KAAkB,gBAAgBd,CAAI,GACvDA;AAAAA,EAElBiJ,QAAQ,OAAO;AAAA,IACbnH,OAAAA;AAAAA,IACA9B,MAAAA;AAAAA,EAAAA,OAKiB,MAAMF,EAAUW,MAAM,gBAAgBqB,CAAK,IAAI9B,CAAI,GACpDA;AAAAA,EAElBG,QAAQ,OAAO2B,MAAiC;AAC9C,UAAMhC,EAAUK,OAAO,gBAAgB2B,CAAK,EAAE;AAAA,EAChD;AACF;"}
@@ -2,6 +2,10 @@ import { MedicalSummaryResponse } from './llm';
2
2
  import { LlmRoom } from './llm/chat';
3
3
  import { RecordsResponse } from './records';
4
4
  import { Transcript } from './transcript';
5
+ export interface TranscribeV3Request {
6
+ buffer: ArrayBuffer | Blob;
7
+ useProofreading?: boolean;
8
+ }
5
9
  export interface TranscribeV3Response {
6
10
  transcript: string;
7
11
  language: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickcns/vmedic-react",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "A collection of powerful utilities and components built with React and Vite",
5
5
  "author": "clickcns",
6
6
  "license": "MIT",