diff --git a/src/types/UniversimeApi.ts b/src/types/UniversimeApi.ts index 9b6a574f..8aae9e80 100644 --- a/src/types/UniversimeApi.ts +++ b/src/types/UniversimeApi.ts @@ -1,8 +1,16 @@ -export type ApiResponse = { - success: boolean; +type ApiBaseResponse = { + success: Success; message?: string; redirectTo?: string; token?: string; - body?: ResponseBody; - alertOptions?: any; + body: ResponseBody; + alertOptions?: { + [k: string]: string; + }; }; + +export type ApiSuccessResponse = ApiBaseResponse; +export type ApiFailResponse = ApiBaseResponse; + +export type ApiResponse + = ApiSuccessResponse | ApiFailResponse;