chore: authorization module name changed and backend type and request functions added

This commit is contained in:
مهرزاد قدرتی
2025-08-09 12:58:28 +03:30
parent a2afdddf04
commit 284e60fab3
21 changed files with 229 additions and 8 deletions

13
src/types/apiResponse.ts Normal file
View File

@@ -0,0 +1,13 @@
export interface ApiResponse {
success: boolean;
errorCode: number;
message: string;
validations: ApiResponseValidation[];
}
export interface ApiResponseValidation {
message: string;
code: number;
property: string;
severity: number;
}

1
src/types/commonTypes.ts Normal file
View File

@@ -0,0 +1 @@
export type GUID = `${string}-${string}-${string}-${string}-${string}`;

View File

@@ -0,0 +1,5 @@
export type FetchPromise<T = ''> = Promise<FetchResponse<T>>;
export interface FetchResponse<T> extends Response {
json(): Promise<T>;
}