Updates
This commit is contained in:
@@ -1470,7 +1470,7 @@ export type DsqlMethodCrudParam<
|
||||
> = {
|
||||
method: (typeof DataCrudRequestMethods)[number];
|
||||
body?: T;
|
||||
query?: string | T;
|
||||
query?: DsqlCrudQueryObject<T>;
|
||||
tableName: string;
|
||||
addUser?: {
|
||||
field: string;
|
||||
@@ -1488,16 +1488,20 @@ export type DsqlMethodCrudParam<
|
||||
reqMethod: (typeof DataCrudRequestMethods)[number];
|
||||
}) => Promise<T>;
|
||||
existingData?: T;
|
||||
targetId?: string | number;
|
||||
};
|
||||
|
||||
export const DsqlCrudActions = ["insert", "update", "delete", "get"] as const;
|
||||
|
||||
export type DsqlCrudQueryObject<T extends object = { [key: string]: any }> =
|
||||
ServerQueryParam & {
|
||||
query: ServerQueryQueryObject<T>;
|
||||
};
|
||||
export type DsqlCrudQueryObject<
|
||||
T extends { [key: string]: any } = { [key: string]: any }
|
||||
> = ServerQueryParam & {
|
||||
query: ServerQueryQueryObject<T>;
|
||||
};
|
||||
|
||||
export type DsqlCrudParam<T extends object = { [key: string]: any }> = {
|
||||
export type DsqlCrudParam<
|
||||
T extends { [key: string]: any } = { [key: string]: any }
|
||||
> = {
|
||||
action: (typeof DsqlCrudActions)[number];
|
||||
table: string;
|
||||
data?: T;
|
||||
|
||||
Reference in New Issue
Block a user