All files / apps/host/src/constants apis.ts

93.33% Statements 14/15
100% Branches 5/5
75% Functions 3/4
93.33% Lines 14/15

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 6038x 38x 38x 38x 38x 38x   38x   38x                                 8x 2x   1x       38x                                 38x           38x      
export const BASE_URL_API = process.env.BASE_URL_API;
export const SPACE_URL_API = process.env.SPACE_URL_API;
export const BASIC_AUTH_USERNAME = process.env.BASIC_AUTH_USERNAME;
export const BASIC_AUTH_PASSWORD = process.env.BASIC_AUTH_PASSWORD;
export const E2E_SERVER_URL = process.env.E2E_SERVER_URL || 'http://localhost:3001';
export const FLASH_WS_URL = process.env.FLASH_WS_URL;
export const CHATBOT_BASE_URL =
  process.env.CHATBOT_BASE_URL || process.env.ON_BEHALF_BASE_URL || 'http://localhost:8787';
 
export const ENDPOINTS = {
  LIST_REQUESTS: '/api/tickets',
  PROFILE_MY_REQUEST: '/api/tickets/profile/my-request',
  PROFILE_INCOMING_REQUEST: '/api/tickets/profile/incoming-request',
  ME: '/api/users/me',
  ROOMS: '/api/rooms',
  MEAL_RESERVATIONS: '/api/meal-reservations',
  EMPLOYEES: '/api/v1/employees',
  EXTRA_USERS: '/api/extra-users',
  NOTIFICATIONS: '/api/notifications',
  HOLIDAYS: '/api/configs/dates',
  MEETING_ROOMS: '/api/meeting-rooms',
  MEETING_ROOMS_BOOKED: '/api/meeting-rooms/booked',
  OTP_GENERATE: '/api/otp/generate',
  MAINTAIN_SCOPES: '/api/maintain-scopes',
  CHATBOT: {
    THREADS: '/api/v1/chat/threads',
    STREAM: (threadId: string) => `/api/v1/chat/threads/${threadId}/messages/stream`,
    ACTIONS_CONFIRM: (threadId: string) => `/api/v1/chat/threads/${threadId}/actions/confirm`,
    ACTIONS_CANCEL: (threadId: string) => `/api/v1/chat/threads/${threadId}/actions/cancel`,
    RESET: (threadId: string) => `/api/v1/chat/threads/${threadId}/reset`,
  },
};
 
export const QUERY_KEYS = {
  LIST_REQUESTS: 'requests',
  MY_REQUESTS: 'my-requests',
  PROFILE_MY_REQUESTS: 'profile-my-requests',
  PROFILE_INCOMING_REQUESTS: 'profile-incoming-requests',
  GET_REQUEST: 'request',
  ME: 'me',
  ROOMS: 'rooms',
  MEAL_RESERVATIONS: 'meal reservations',
  EMPLOYEES: 'employees',
  EXTRA_USERS: 'extra-users',
  HOLIDAYS: 'holidays',
  MEETING_ROOMS: 'meeting-rooms',
  MEETING_ROOMS_BOOKED: 'meeting-rooms-booked',
  MAINTENANCE_SCOPES: 'maintenance-scopes',
};
 
export const CACHE_TIME = {
  SHORT: 30 * 1000, // 30 seconds
  MEDIUM: 2 * 60 * 1000, // 2 minutes
  LONG: 10 * 60 * 1000, // 10 minutes
};
 
export const PROCESSING_BY_RESPONSE = {
  NONE: 'none',
};