Update Types
This commit is contained in:
parent
0d6b1d7e4c
commit
7dd8111b5b
21
package-shared/types/index.d.ts
vendored
21
package-shared/types/index.d.ts
vendored
@ -1174,26 +1174,31 @@ export type AuthFetchQuery = ServerQueryParam & {
|
||||
[key: string]: string | number | { [key: string]: any };
|
||||
};
|
||||
|
||||
export type ServerQueryParamsJoin = {
|
||||
export type ServerQueryParamsJoin<
|
||||
Table extends string = string,
|
||||
Field extends object = { [key: string]: any }
|
||||
> = {
|
||||
joinType: "INNER JOIN" | "JOIN" | "LEFT JOIN" | "RIGHT JOIN";
|
||||
tableName: string;
|
||||
tableName: Table;
|
||||
match?:
|
||||
| ServerQueryParamsJoinMatchObject
|
||||
| ServerQueryParamsJoinMatchObject[];
|
||||
| ServerQueryParamsJoinMatchObject<Field>
|
||||
| ServerQueryParamsJoinMatchObject<Field>[];
|
||||
selectFields?: (
|
||||
| string
|
||||
| keyof Field
|
||||
| {
|
||||
field: string;
|
||||
field: keyof Field;
|
||||
alias?: string;
|
||||
}
|
||||
)[];
|
||||
};
|
||||
|
||||
export type ServerQueryParamsJoinMatchObject = {
|
||||
export type ServerQueryParamsJoinMatchObject<
|
||||
Field extends object = { [key: string]: any }
|
||||
> = {
|
||||
/** Field name from the **Root Table** */
|
||||
source: string | ServerQueryParamsJoinMatchSourceTargetObject;
|
||||
/** Field name from the **Join Table** */
|
||||
target: string | ServerQueryParamsJoinMatchSourceTargetObject;
|
||||
target: keyof Field | ServerQueryParamsJoinMatchSourceTargetObject;
|
||||
};
|
||||
|
||||
export type ServerQueryParamsJoinMatchSourceTargetObject = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "2.5.6",
|
||||
"version": "2.5.7",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
Loading…
Reference in New Issue
Block a user