/**
* Defines constants used throughout the application, including API endpoints,
* user roles, and local storage keys.
*/
/**
* API endpoint definitions.
*/
export const API_ENDPOINTS = {
HOSPITALS: '/api/hospitals/',
TOKEN_AUTH: (hospitalId) => `/api/${hospitalId}/token-auth/`, // Endpoint for token authentication for a specific hospital.
USERS: (hospitalId) => `/api/hospitals/${hospitalId}/users/`, // Endpoint for managing users within a specific hospital.
ROLES: (hospitalId) => `/api/hospitals/${hospitalId}/roles/`, // Endpoint for managing roles within a specific hospital.
BLOCKS: (hospitalId) => `/api/hospitals/${hospitalId}/blocks/`, // Endpoint for managing blocks within a specific hospital.
SHIFTS: (hospitalId) => `/api/hospitals/${hospitalId}/shifts/`, // Endpoint for managing shifts within a specific hospital.
};
/**
* User role definitions.
*/
export const USER_ROLES = {
SUPERUSER: 'superuser',
APPROVER: 'approver',
RESPONDER: 'responder',
RAISER: 'raiser',
};
export const LOCAL_STORAGE_KEYS = {
/**
* Keys used for storing data in local storage.
*/
AUTH_TOKEN: 'authToken',
USER: 'user',
SELECTED_HOSPITAL: 'selectedHospital',
};
Source