refresh tokens

This commit is contained in:
hamid zarghami
2026-02-03 11:44:03 +03:30
parent 7e30143268
commit fe99e802bc
4 changed files with 133 additions and 11 deletions
+21
View File
@@ -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;
};
}