monitor/shared/genericApiTypes.ts
2025-04-16 22:30:27 +07:00

20 lines
509 B
TypeScript

export type ApiAuthErrorResp = {
logout: true;
reason: string;
}
export type GenericApiSuccessResp = {
success: true;
}
export type GenericApiErrorResp = {
error: string;
}
export type GenericApiResp = ApiAuthErrorResp | GenericApiSuccessResp | GenericApiErrorResp;
export type GenericApiOkResp = GenericApiSuccessResp | GenericApiErrorResp;
export type ApiToastResp = {
type: 'default' | 'info' | 'success' | 'warning' | 'error',
title?: string,
msg: string,
md?: boolean,
}