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:
13
src/services/general.interface.ts
Normal file
13
src/services/general.interface.ts
Normal 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,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user