Package breakdown. Commit v1.0.0 of services-common stuff

This commit is contained in:
2023-05-23 14:22:12 -04:00
commit c062bae677
11 changed files with 7444 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
import { Payload } from './Payload';
export interface ApiResponse<T = Payload> {
data?: T;
error?: Error | string | number;
success: boolean;
}
+7
View File
@@ -0,0 +1,7 @@
type PayloadPrimitives = boolean | null | number | string;
type PayloadArray = (PayloadPrimitives | Payload)[];
type PayloadValid = PayloadPrimitives | PayloadArray | Payload;
export interface Payload<T = object> {
[key: string]: PayloadValid | T;
}