1 | import { Constructable, Entity } from './entity';
|
2 | export declare type BatchResponse = ReadResponse | WriteResponses | ErrorResponse;
|
3 | export interface WriteResponses {
|
4 | responses: WriteResponse[];
|
5 | isSuccess: () => boolean;
|
6 | }
|
7 | export interface ErrorResponse {
|
8 | httpCode: number;
|
9 | body: Record<string, any>;
|
10 | isSuccess: () => boolean;
|
11 | }
|
12 | export interface ReadResponse {
|
13 | httpCode: number;
|
14 | body: Record<string, any>;
|
15 | type: Constructable<Entity>;
|
16 | as: <T extends Entity>(constructor: Constructable<T>) => T[];
|
17 | isSuccess: () => boolean;
|
18 | }
|
19 | export interface WriteResponse {
|
20 | httpCode: number;
|
21 | body?: Record<string, any>;
|
22 | type?: Constructable<Entity>;
|
23 | as?: <T extends Entity>(constructor: Constructable<T>) => T;
|
24 | }
|
25 |
|
\ | No newline at end of file |