dataset-types 3.0.9 → 3.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +41 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface IName {
|
|
|
20
20
|
export interface IDataRow {
|
|
21
21
|
id: string;
|
|
22
22
|
}
|
|
23
|
+
export interface INamedDataRow extends IDataRow, IName {
|
|
24
|
+
}
|
|
23
25
|
export interface IEntity extends IDataRow {
|
|
24
26
|
type: string;
|
|
25
27
|
delete?: string;
|
|
@@ -169,7 +171,6 @@ export type IProject = IDataLockable & IDataArchivable & {
|
|
|
169
171
|
};
|
|
170
172
|
export interface ICategory extends INamedEntity {
|
|
171
173
|
colour: number;
|
|
172
|
-
Projects?: IProject[];
|
|
173
174
|
}
|
|
174
175
|
export interface IAction {
|
|
175
176
|
name: (item: any) => string;
|
|
@@ -188,4 +189,43 @@ export interface IDataGridAction<Type> {
|
|
|
188
189
|
disabled?: IGridActionDisabled<Type>;
|
|
189
190
|
onClick?: IGridAction<Type>;
|
|
190
191
|
}
|
|
192
|
+
export interface IManageDataSetConfiguration {
|
|
193
|
+
context: string;
|
|
194
|
+
projectcontext: string;
|
|
195
|
+
name: string;
|
|
196
|
+
datatype: string;
|
|
197
|
+
datatypeSet: (type: string) => void;
|
|
198
|
+
datatype_meta?: IDataTypeMeta[];
|
|
199
|
+
columns: {
|
|
200
|
+
[datatype: string]: any[];
|
|
201
|
+
};
|
|
202
|
+
required_permission: string;
|
|
203
|
+
permissions: IPermission[];
|
|
204
|
+
actions?: IDataGridAction<IDocument>[];
|
|
205
|
+
dataactions?: {
|
|
206
|
+
[datatype: string]: IDataGridAction<any>[];
|
|
207
|
+
};
|
|
208
|
+
createDocument?: (d: IDocument, stuff: any) => Promise<ICommandResult>;
|
|
209
|
+
queryValidationData?: (datatype: string, entities: string[]) => Promise<ICommandResult>;
|
|
210
|
+
queryRecords?: (documenttype: string, datatype: string, encoding: string) => Promise<ICommandResult>;
|
|
211
|
+
postFileSlice?: (filetype: string, content: string | ArrayBuffer, name: string, documenttype: string, sliceNumber: number, totalSlices: number, meta: any) => Promise<ICommandResult>;
|
|
212
|
+
postReplay: {
|
|
213
|
+
[datatype: string]: API_POST_REPLAY;
|
|
214
|
+
};
|
|
215
|
+
useConfigurationItems?: (context: string, itemtype: string, hash: number, page: number, pageSize: number) => IResults<IConfigurationItem>;
|
|
216
|
+
useDocuments?: (context: string, projectcontext: string, associated: string[], entity_type: string, entities: string[], entity: string, filetype: string, search: string, hash: number, page: number, pageSize: number, timeperiod: IDayRange | null) => IResults<IDocument>;
|
|
217
|
+
useData: {
|
|
218
|
+
[datatype: string]: HOOK_USE_DATA;
|
|
219
|
+
};
|
|
220
|
+
validators: any;
|
|
221
|
+
}
|
|
222
|
+
export type API_POST_REPLAY = (source: string, logs: ILog[]) => Promise<ICommandResult>;
|
|
223
|
+
export type HOOK_USE_DATA = (context: string, projectcontext: string, datatype: string | undefined, entity: string, entities: string[], timeperiod: IDayRange | null, hash: number, page: number, pageSize: number, transform: ((d: any) => any) | null, allentities: boolean) => IResults<any>;
|
|
224
|
+
export interface IDataTypeMeta {
|
|
225
|
+
property: string;
|
|
226
|
+
description: string;
|
|
227
|
+
label: string;
|
|
228
|
+
tooltip: string;
|
|
229
|
+
value: (ci: IConfigurationItem) => string;
|
|
230
|
+
}
|
|
191
231
|
export {};
|