UNPKG

797 BTypeScriptView Raw
1import { Constructable, Entity } from './entity';
2export declare type BatchResponse = ReadResponse | WriteResponses | ErrorResponse;
3export interface WriteResponses {
4 responses: WriteResponse[];
5 isSuccess: () => boolean;
6}
7export interface ErrorResponse {
8 httpCode: number;
9 body: Record<string, any>;
10 isSuccess: () => boolean;
11}
12export 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}
19export 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//# sourceMappingURL=batch-response.d.ts.map
\No newline at end of file