refresh tokens
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { DefaultError } from "@tanstack/react-query";
|
||||
|
||||
export type SharedStoreType = {
|
||||
openSidebar: boolean;
|
||||
setOpenSidebar: (open: boolean) => void;
|
||||
@@ -6,6 +8,7 @@ export type SharedStoreType = {
|
||||
export interface BaseResponse<T> {
|
||||
success: boolean;
|
||||
statusCode: number;
|
||||
status: number;
|
||||
data: T;
|
||||
meta?: {
|
||||
limit: number;
|
||||
@@ -14,3 +17,21 @@ export interface BaseResponse<T> {
|
||||
totalPages: number;
|
||||
};
|
||||
}
|
||||
|
||||
interface IError {
|
||||
message: string[];
|
||||
}
|
||||
|
||||
type MyErrorRespone = {
|
||||
error: IError;
|
||||
};
|
||||
|
||||
export type IErrorResponse = BaseResponse<MyErrorRespone>;
|
||||
|
||||
export interface IApiErrorRepsonse extends DefaultError {
|
||||
response?: IErrorResponse;
|
||||
config?: {
|
||||
url?: string;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user