2025-08-25 09:40:11 +07:00
|
|
|
const isDev = import.meta.env.MODE === "development";
|
2025-08-15 15:15:27 +07:00
|
|
|
|
2025-08-25 09:40:11 +07:00
|
|
|
export const BASE_URL = isDev
|
|
|
|
|
? import.meta.env.VITE_API_URL_DEV
|
|
|
|
|
: "/api";
|
2025-08-11 23:21:36 +07:00
|
|
|
|
|
|
|
|
export const API_ENDPOINTS = {
|
|
|
|
|
APP_VERSION: {
|
2025-08-25 09:40:11 +07:00
|
|
|
GET_VERSION: `${BASE_URL}/AppVersion/version`,
|
|
|
|
|
UPLOAD: `${BASE_URL}/AppVersion/upload`,
|
2025-09-10 09:59:17 +07:00
|
|
|
GET_SOFTWARE: `${BASE_URL}/AppVersion/msifiles`,
|
2025-08-11 23:21:36 +07:00
|
|
|
},
|
|
|
|
|
DEVICE_COMM: {
|
2025-09-10 09:59:17 +07:00
|
|
|
DOWNLOAD_MSI: `${BASE_URL}/DeviceComm/installmsi`,
|
2025-08-25 09:40:11 +07:00
|
|
|
GET_ROOM_LIST: `${BASE_URL}/DeviceComm/rooms`,
|
|
|
|
|
GET_DEVICE_FROM_ROOM: (roomName: string) =>
|
|
|
|
|
`${BASE_URL}/DeviceComm/room/${roomName}`,
|
2025-09-10 09:59:17 +07:00
|
|
|
UPDATE_AGENT: `${BASE_URL}/DeviceComm/updateagent`,
|
2025-08-11 23:21:36 +07:00
|
|
|
},
|
2025-08-14 12:16:32 +07:00
|
|
|
SSE_EVENTS: {
|
2025-08-25 09:40:11 +07:00
|
|
|
DEVICE_ONLINE: `${BASE_URL}/Sse/events/onlineDevices`,
|
|
|
|
|
DEVICE_OFFLINE: `${BASE_URL}/Sse/events/offlineDevices`,
|
2025-08-14 12:16:32 +07:00
|
|
|
},
|
2025-08-11 23:21:36 +07:00
|
|
|
};
|