|
|
@ -607,46 +607,92 @@ export interface SortListType { |
|
|
|
export interface ColumnType { |
|
|
|
export interface ColumnType { |
|
|
|
/** Unique ID */ |
|
|
|
/** Unique ID */ |
|
|
|
id?: IdType; |
|
|
|
id?: IdType; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Base ID that this column belongs to |
|
|
|
|
|
|
|
* @example ds_krsappzu9f8vmo |
|
|
|
|
|
|
|
*/ |
|
|
|
base_id?: string; |
|
|
|
base_id?: string; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Model ID that this column belongs to |
|
|
|
|
|
|
|
* @example md_yvwvbt2i78rgcm |
|
|
|
|
|
|
|
*/ |
|
|
|
fk_model_id?: string; |
|
|
|
fk_model_id?: string; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Column Title |
|
|
|
|
|
|
|
* @example Title |
|
|
|
|
|
|
|
*/ |
|
|
|
title?: string; |
|
|
|
title?: string; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* The data type in UI |
|
|
|
|
|
|
|
* @example SingleLineText |
|
|
|
|
|
|
|
*/ |
|
|
|
uidt?: string; |
|
|
|
uidt?: string; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Data Type in DB |
|
|
|
|
|
|
|
* @example varchar |
|
|
|
|
|
|
|
*/ |
|
|
|
dt?: string; |
|
|
|
dt?: string; |
|
|
|
|
|
|
|
/** Numeric Precision */ |
|
|
|
np?: string | number | null; |
|
|
|
np?: string | number | null; |
|
|
|
|
|
|
|
/** Numeric Scale */ |
|
|
|
ns?: string | number | null; |
|
|
|
ns?: string | number | null; |
|
|
|
|
|
|
|
/** Character Maximum Length */ |
|
|
|
clen?: string | number | null; |
|
|
|
clen?: string | number | null; |
|
|
|
|
|
|
|
/** Column Ordinal Position */ |
|
|
|
cop?: string; |
|
|
|
cop?: string; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Is Primary Key? */ |
|
|
|
pk?: BoolType; |
|
|
|
pk?: BoolType; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Is Primary Value? */ |
|
|
|
pv?: BoolType; |
|
|
|
pv?: BoolType; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Is Required? */ |
|
|
|
rqd?: BoolType; |
|
|
|
rqd?: BoolType; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Column Name |
|
|
|
|
|
|
|
* @example title |
|
|
|
|
|
|
|
*/ |
|
|
|
column_name?: string; |
|
|
|
column_name?: string; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Is Unsigned? */ |
|
|
|
un?: BoolType; |
|
|
|
un?: BoolType; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Column Type |
|
|
|
|
|
|
|
* @example varchar(45) |
|
|
|
|
|
|
|
*/ |
|
|
|
ct?: string; |
|
|
|
ct?: string; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Is Auto-Increment? */ |
|
|
|
ai?: BoolType; |
|
|
|
ai?: BoolType; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Is unique? */ |
|
|
|
unique?: BoolType; |
|
|
|
unique?: BoolType; |
|
|
|
|
|
|
|
/** Column Default */ |
|
|
|
cdf?: string; |
|
|
|
cdf?: string; |
|
|
|
|
|
|
|
/** Column Comment */ |
|
|
|
cc?: string; |
|
|
|
cc?: string; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Character Set Name |
|
|
|
|
|
|
|
* @example utf8mb4 |
|
|
|
|
|
|
|
*/ |
|
|
|
csn?: string; |
|
|
|
csn?: string; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Data Type X |
|
|
|
|
|
|
|
* @example specificType |
|
|
|
|
|
|
|
*/ |
|
|
|
dtx?: string; |
|
|
|
dtx?: string; |
|
|
|
|
|
|
|
/** Data Type X Precision */ |
|
|
|
dtxp?: string | number | null; |
|
|
|
dtxp?: string | number | null; |
|
|
|
|
|
|
|
/** Data Type X Scale */ |
|
|
|
dtxs?: string | number | null; |
|
|
|
dtxs?: string | number | null; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Auto Update Timestamp */ |
|
|
|
au?: BoolType; |
|
|
|
au?: BoolType; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Is Deleted? */ |
|
|
|
deleted?: BoolType; |
|
|
|
deleted?: BoolType; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Is Visible? */ |
|
|
|
visible?: BoolType; |
|
|
|
visible?: BoolType; |
|
|
|
|
|
|
|
/** The order of the list of columns */ |
|
|
|
order?: number; |
|
|
|
order?: number; |
|
|
|
/** Model for Bool */ |
|
|
|
/** Is System Colun? */ |
|
|
|
system?: BoolType; |
|
|
|
system?: BoolType; |
|
|
|
/** Model for Meta */ |
|
|
|
/** Meta Info */ |
|
|
|
meta?: MetaType; |
|
|
|
meta?: MetaType; |
|
|
|
|
|
|
|
/** Column Options */ |
|
|
|
colOptions?: |
|
|
|
colOptions?: |
|
|
|
| LinkToAnotherRecordType |
|
|
|
| LinkToAnotherRecordType |
|
|
|
| FormulaType |
|
|
|
| FormulaType |
|
|
@ -671,6 +717,30 @@ export interface ColumnListType { |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Model for Column Request |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
export type ColumnReqType = ( |
|
|
|
|
|
|
|
| LinkToAnotherColumnReqType |
|
|
|
|
|
|
|
| RollupColumnReqType |
|
|
|
|
|
|
|
| FormulaColumnReqType |
|
|
|
|
|
|
|
| LookupColumnReqType |
|
|
|
|
|
|
|
| NormalColumnRequestType |
|
|
|
|
|
|
|
| (LinkToAnotherColumnReqType & |
|
|
|
|
|
|
|
RollupColumnReqType & |
|
|
|
|
|
|
|
FormulaColumnReqType & |
|
|
|
|
|
|
|
LookupColumnReqType & |
|
|
|
|
|
|
|
NormalColumnRequestType) |
|
|
|
|
|
|
|
) & { |
|
|
|
|
|
|
|
column_name: string; |
|
|
|
|
|
|
|
title: string; |
|
|
|
|
|
|
|
/** Column order in a specific view */ |
|
|
|
|
|
|
|
column_order?: { |
|
|
|
|
|
|
|
view_id?: string; |
|
|
|
|
|
|
|
order?: number; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Model for LinkToAnotherRecord |
|
|
|
* Model for LinkToAnotherRecord |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -1609,30 +1679,6 @@ export interface FormulaColumnReqType { |
|
|
|
title?: string; |
|
|
|
title?: string; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Model for Column Request |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
export type ColumnReqType = ( |
|
|
|
|
|
|
|
| LinkToAnotherColumnReqType |
|
|
|
|
|
|
|
| RollupColumnReqType |
|
|
|
|
|
|
|
| FormulaColumnReqType |
|
|
|
|
|
|
|
| LookupColumnReqType |
|
|
|
|
|
|
|
| NormalColumnRequestType |
|
|
|
|
|
|
|
| (LinkToAnotherColumnReqType & |
|
|
|
|
|
|
|
RollupColumnReqType & |
|
|
|
|
|
|
|
FormulaColumnReqType & |
|
|
|
|
|
|
|
LookupColumnReqType & |
|
|
|
|
|
|
|
NormalColumnRequestType) |
|
|
|
|
|
|
|
) & { |
|
|
|
|
|
|
|
column_name: string; |
|
|
|
|
|
|
|
title: string; |
|
|
|
|
|
|
|
/** Column order in a specific view */ |
|
|
|
|
|
|
|
column_order?: { |
|
|
|
|
|
|
|
view_id?: string; |
|
|
|
|
|
|
|
order?: number; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Model for User Info |
|
|
|
* Model for User Info |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -4321,8 +4367,11 @@ export class Api< |
|
|
|
projectName: string, |
|
|
|
projectName: string, |
|
|
|
tableName: string, |
|
|
|
tableName: string, |
|
|
|
query?: { |
|
|
|
query?: { |
|
|
|
|
|
|
|
/** Which fields to be shown */ |
|
|
|
fields?: any[]; |
|
|
|
fields?: any[]; |
|
|
|
|
|
|
|
/** The result will be sorted based on `sort` query */ |
|
|
|
sort?: string[] | string; |
|
|
|
sort?: string[] | string; |
|
|
|
|
|
|
|
/** Extra filtering */ |
|
|
|
where?: string; |
|
|
|
where?: string; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Offset in rows |
|
|
|
* Offset in rows |
|
|
@ -4334,6 +4383,10 @@ export class Api< |
|
|
|
* @min 1 |
|
|
|
* @min 1 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
limit?: number; |
|
|
|
limit?: number; |
|
|
|
|
|
|
|
/** Used for multiple sort queries */ |
|
|
|
|
|
|
|
sortArrJson?: string; |
|
|
|
|
|
|
|
/** Used for multiple filter queries */ |
|
|
|
|
|
|
|
filterArrJson?: string; |
|
|
|
}, |
|
|
|
}, |
|
|
|
params: RequestParams = {} |
|
|
|
params: RequestParams = {} |
|
|
|
) => |
|
|
|
) => |
|
|
|