All files / src/services/api api.constant.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 0/0
100% Lines 3/3

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 24542x                           542x               542x  
export const BASE_URL = "https://staging-api.givepayments.com/";
 
export enum ErrorCodeEnum {
  NOT_FOUND = 404,
  BAD_REQUEST = 400,
  BAD_INPUT = 422,
}
 
export enum StatsType {
  DEFAULT = "stats",
  BASE = "stats-base",
  EXTENDED = "stats-expanded",
}
 
export const statsEndpointMap: Record<StatsType, string> = {
  [StatsType.DEFAULT]: "stats",
  [StatsType.BASE]: "stats-base",
  [StatsType.EXTENDED]: "stats-expanded",
};
 
/** Lives here, not beside its hook: the axios instance suppresses its snackbar
 * for this endpoint, and importing from a page module would close a cycle. */
export const RESEND_EMAIL_URL = "/email-verifications/resend";