feat(services): add general.interface.ts

This commit introduces a new interface file named 'general.interface.ts' to standardise return types in the services scope. It includes the IStandardisedReturn interface and the EReturnState enum. These additions enhance the consistency of return types across different services.
This commit is contained in:
Mathis H (Avnyr) 2024-06-17 09:49:09 +02:00
parent cc286462f0
commit e6d37ef600
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -0,0 +1,13 @@
export interface IStandardisedReturn<T> {
state: EReturnState;
message?: string;
resolved?: T;
}
export enum EReturnState {
unauthorized = 0,
clientError = 1,
serverError = 2,
done = 3,
queued = 4,
}