dataset-types 3.0.3 → 3.0.4

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 CHANGED
@@ -5,6 +5,11 @@ export interface ICommandResult {
5
5
  entity?: any;
6
6
  log?: any[];
7
7
  }
8
+ export interface IResults<Type> {
9
+ isLoading: boolean;
10
+ rows: Type[];
11
+ pageInfo?: any;
12
+ }
8
13
  export interface IContext {
9
14
  context: string;
10
15
  }
@@ -138,4 +143,36 @@ export type IDatasetFiles = {
138
143
  files: IDatasetFile[];
139
144
  };
140
145
  export type IDayRange = number[];
146
+ export interface IDataLockable extends IEntity {
147
+ locked: boolean;
148
+ lockedBy?: string;
149
+ }
150
+ export interface IDataArchivable extends IEntity {
151
+ archived: boolean;
152
+ archivedBy?: string;
153
+ }
154
+ export type IProject = IDataLockable & IDataArchivable & {
155
+ description: string;
156
+ updatedBy: string;
157
+ updatedAt: Date;
158
+ createdBy: string;
159
+ createdAt: Date;
160
+ Categories?: ICategory[];
161
+ };
162
+ export interface ICategory extends IEntity {
163
+ colour: number;
164
+ Projects?: IProject[];
165
+ }
166
+ export interface IActionContext {
167
+ callback: () => void;
168
+ permissions: IPermission[];
169
+ logidsSet: (logs: ILogStatus[]) => void;
170
+ }
171
+ export type IGridAction<Type> = (d: Type, ac: IActionContext | null) => Promise<boolean>;
172
+ export type IGridActionDisabled<Type> = (d: Type, ac: IActionContext | null) => boolean;
173
+ export interface IDataGridAction<Type> {
174
+ label: string;
175
+ disabled?: IGridActionDisabled<Type>;
176
+ onClick?: IGridAction<Type>;
177
+ }
141
178
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dataset-types",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "scripts": {
5
5
  "start": "npm run build && npm run package",
6
6
  "build": "tsc --rootDir 'src/types' --outDir './dist'",
Binary file