@intuitionrobotics/db-api-generator
Version:
21 lines • 1.08 kB
TypeScript
import { type DB_Object, type Clause_Where } from "@intuitionrobotics/firebase";
import { type ApiWithBody, type ApiWithQuery, HttpMethod } from "@intuitionrobotics/thunderstorm";
export declare const DefaultApiDefs: {
[k: string]: GenericApiDef;
};
export declare const ErrorKey_BadInput = "bad-input";
export type BadInputErrorBody = {
path: string;
input?: string;
};
export type GenericApiDef = {
method: HttpMethod;
key: string;
suffix?: string;
};
export type ApiBinder_DBCreate<DBType extends DB_Object, RequestType extends Omit<DBType, "_id"> = Omit<DBType, "_id">> = ApiWithBody<string, RequestType, DBType>;
export type ApiBinder_DBDelete<DBType extends DB_Object> = ApiWithQuery<string, DBType, DB_Object>;
export type ApiBinder_DBUniuqe<DBType extends DB_Object> = ApiWithQuery<string, DBType, DB_Object>;
export type ApiBinder_DBUpdate<DBType extends DB_Object> = ApiWithBody<string, DBType, DBType>;
export type ApiBinder_DBQuery<DBType extends DB_Object> = ApiWithBody<string, Clause_Where<DBType>, DBType[]>;
//# sourceMappingURL=types.d.ts.map