File size: 489 Bytes
e9affa5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
interface IJSONResponse {
  status: number;
  message: string;
}

export interface IJSONSuccessResponse extends IJSONResponse {
  data: Record<string, any> | Record<string, any>[];
  meta?: {
    total: number;
    page: number;
    perPage: number;
  };
}

export interface IJSONErrorResponse extends IJSONResponse {
  error: string;
}

export interface IJSONValidationErrorResponse extends IJSONResponse {
  status: 422;
  message: "Validation Error";
  errors: Record<string, any>[];
}