dataset-types 3.0.2 → 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/{src/types/index.d.ts → index.d.ts} +39 -1
- package/package.json +5 -4
- package/README.md +0 -4
- package/dataset-types-3.0.1.tgz +0 -0
- package/dataset-types-3.0.2.tgz +0 -0
- package/src/types/index.js +0 -2
- package/src/types/index.ts +0 -225
- package/tsconfig.json +0 -25
- /package/{dist/src/types/index.js → index.js} +0 -0
|
@@ -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
|
}
|
|
@@ -45,7 +50,8 @@ export interface IConfigurationItem extends INamedEntity, ITimed {
|
|
|
45
50
|
dimension: string;
|
|
46
51
|
datatypes: string;
|
|
47
52
|
}
|
|
48
|
-
export
|
|
53
|
+
export type IPermission = String;
|
|
54
|
+
export interface IRolePermission {
|
|
49
55
|
permission: string;
|
|
50
56
|
role: string;
|
|
51
57
|
}
|
|
@@ -137,4 +143,36 @@ export type IDatasetFiles = {
|
|
|
137
143
|
files: IDatasetFile[];
|
|
138
144
|
};
|
|
139
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
|
+
}
|
|
140
178
|
export {};
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dataset-types",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"pretty": "prettier --write"
|
|
5
|
+
"start": "npm run build && npm run package",
|
|
6
|
+
"build": "tsc --rootDir 'src/types' --outDir './dist'",
|
|
7
|
+
"pretty": "prettier --write",
|
|
8
|
+
"package": "cp package.json dist;cd dist;npm pack"
|
|
8
9
|
},
|
|
9
10
|
"eslintConfig": {
|
|
10
11
|
"extends": [
|
package/README.md
DELETED
package/dataset-types-3.0.1.tgz
DELETED
|
Binary file
|
package/dataset-types-3.0.2.tgz
DELETED
|
Binary file
|
package/src/types/index.js
DELETED
package/src/types/index.ts
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
type BufferEncoding =
|
|
2
|
-
| "ascii"
|
|
3
|
-
| "utf8"
|
|
4
|
-
| "utf-8"
|
|
5
|
-
| "utf16le"
|
|
6
|
-
| "ucs2"
|
|
7
|
-
| "ucs-2"
|
|
8
|
-
| "base64"
|
|
9
|
-
| "latin1"
|
|
10
|
-
| "binary"
|
|
11
|
-
| "hex"
|
|
12
|
-
|
|
13
|
-
export interface ICommandResult {
|
|
14
|
-
status: string;
|
|
15
|
-
msg: string;
|
|
16
|
-
entity?: any;
|
|
17
|
-
log?: any[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface IContext {
|
|
21
|
-
context: string;
|
|
22
|
-
}
|
|
23
|
-
export interface IName {
|
|
24
|
-
name: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface IDataRow {
|
|
28
|
-
id: string;
|
|
29
|
-
}
|
|
30
|
-
export interface IEntity extends IDataRow {
|
|
31
|
-
type: string;
|
|
32
|
-
delete?: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface INamedEntity extends IEntity, IName, IContext { }
|
|
36
|
-
|
|
37
|
-
export interface ITimed {
|
|
38
|
-
createdBy: string;
|
|
39
|
-
createdAt: Date;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IDocumentReference extends IDataRow {
|
|
43
|
-
filetype: string;
|
|
44
|
-
documenttype: string;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface IDocument extends INamedEntity, ITimed {
|
|
48
|
-
entity: string;
|
|
49
|
-
filetype: string;
|
|
50
|
-
documenttype: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface IDocumentEntityLink {
|
|
54
|
-
entity: string;
|
|
55
|
-
documentId: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface IConfigurationItem extends INamedEntity, ITimed {
|
|
59
|
-
itemtype: string;
|
|
60
|
-
active: boolean;
|
|
61
|
-
monitored: string;
|
|
62
|
-
baseline: string;
|
|
63
|
-
dimension: string;
|
|
64
|
-
datatypes: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface IPermission extends IEntity, IContext, ITimed {
|
|
68
|
-
permission: string;
|
|
69
|
-
role: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface IDataService { }
|
|
73
|
-
|
|
74
|
-
export interface IModel {
|
|
75
|
-
close: any;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface IModelService {
|
|
79
|
-
model: IModel;
|
|
80
|
-
seed: any;
|
|
81
|
-
upsert: (type: string, entity: any[]) => Promise<IPersistResult>;
|
|
82
|
-
upsertBatch: (type: string, entity: any[]) => Promise<IPersistResult>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface IFileService {
|
|
86
|
-
download2: (
|
|
87
|
-
context: string,
|
|
88
|
-
log: boolean,
|
|
89
|
-
txmode: string, //production/development/test
|
|
90
|
-
filetype: string,
|
|
91
|
-
reference: string,
|
|
92
|
-
encoding: BufferEncoding, //base64,utf-8
|
|
93
|
-
) => Promise<String | null>;
|
|
94
|
-
downloadToFile: (
|
|
95
|
-
localfilename: string,
|
|
96
|
-
tenantid: string,
|
|
97
|
-
log: boolean,
|
|
98
|
-
filetype: string,
|
|
99
|
-
reference: string,
|
|
100
|
-
txmode: string, //production/development/test
|
|
101
|
-
) => Promise<any>;
|
|
102
|
-
sendBlock: (
|
|
103
|
-
tenantid: string,
|
|
104
|
-
log: boolean,
|
|
105
|
-
txmode: string, //production/development/test
|
|
106
|
-
filetype: string,
|
|
107
|
-
content: string,
|
|
108
|
-
key: string, //blob id
|
|
109
|
-
sliceNumber: number,
|
|
110
|
-
totalSlices: number,
|
|
111
|
-
meta: any, //meta data
|
|
112
|
-
tags: any, //tags
|
|
113
|
-
) => void;
|
|
114
|
-
copy: (
|
|
115
|
-
sourceContainer: string,
|
|
116
|
-
sourceFile: string,
|
|
117
|
-
targetContainer: string,
|
|
118
|
-
targetFile: string,
|
|
119
|
-
) => Promise<void>;
|
|
120
|
-
list: (
|
|
121
|
-
tenantid: string,
|
|
122
|
-
log: boolean,
|
|
123
|
-
page: number,
|
|
124
|
-
pageSize: number,
|
|
125
|
-
term: string,
|
|
126
|
-
mode: string,
|
|
127
|
-
recordtype: string,
|
|
128
|
-
enabled: boolean,
|
|
129
|
-
order: string,
|
|
130
|
-
) => Promise<IDatasetFiles>;
|
|
131
|
-
remove: (tenantid: string, mode: string, name: string) => Promise<boolean>;
|
|
132
|
-
setMeta: (
|
|
133
|
-
tenantid: string,
|
|
134
|
-
mode: string,
|
|
135
|
-
name: string,
|
|
136
|
-
status: string,
|
|
137
|
-
) => Promise<boolean>;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface ILogService {
|
|
141
|
-
archive: (
|
|
142
|
-
context: string,
|
|
143
|
-
submissionid: string,
|
|
144
|
-
username: string,
|
|
145
|
-
log: ILog[],
|
|
146
|
-
processingtype?: string,
|
|
147
|
-
) => Promise<string>;
|
|
148
|
-
list: () => Promise<string[]>;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export interface ISecurityMonitorService {
|
|
152
|
-
hasPermission: (
|
|
153
|
-
permission: string,
|
|
154
|
-
roles: string[],
|
|
155
|
-
context: string,
|
|
156
|
-
) => Promise<boolean>;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export type IChannel = "Email" | "SMS" | "WHATSAPP"; //How to refer to domain constants
|
|
160
|
-
|
|
161
|
-
export interface IProcessingConfig {
|
|
162
|
-
remove?: boolean; //controls if the file is to be processed as a delete
|
|
163
|
-
record?: boolean; //Controls if files are uploaded to storage account. Used when replaying files. Used during unit tests to skip upload.
|
|
164
|
-
modes?: IChannel[];
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface IPersistResult {
|
|
168
|
-
data: any[] | any;
|
|
169
|
-
error?: string;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export interface ILogStatus {
|
|
173
|
-
archiveid: string;
|
|
174
|
-
error?: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export interface ILog {
|
|
178
|
-
processingType: "Monitoring" | "Submission";
|
|
179
|
-
processingConfig?: IProcessingConfig;
|
|
180
|
-
//An ILog represents the information collected while handling a file
|
|
181
|
-
blobid?: string; //id in storage account
|
|
182
|
-
documentId?: string; //when log is submitted from browser it can have a document id (TODO make this just id)
|
|
183
|
-
name?: string; //Original name of the document when originally loaded
|
|
184
|
-
localfilename?: string; //filename on node process
|
|
185
|
-
createdAt?: string;
|
|
186
|
-
|
|
187
|
-
user?: string; //upn of user
|
|
188
|
-
meta: {
|
|
189
|
-
documenttype: string; //Record or Data Type
|
|
190
|
-
context?: string; //Tenant Id
|
|
191
|
-
entity?: string; //Entity Id which contains this document
|
|
192
|
-
user?: string;
|
|
193
|
-
createdat?: string;
|
|
194
|
-
recordstatus?: string;
|
|
195
|
-
effective?: string;
|
|
196
|
-
};
|
|
197
|
-
document?: IDocument; //The document details
|
|
198
|
-
rawdata?: any[];
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export interface IUser {
|
|
202
|
-
id: string;
|
|
203
|
-
name: string;
|
|
204
|
-
email: string;
|
|
205
|
-
mobile: string;
|
|
206
|
-
roles: string;
|
|
207
|
-
context: string;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
export type IDatasetFile = {
|
|
211
|
-
context: string;
|
|
212
|
-
id: string;
|
|
213
|
-
filename: string;
|
|
214
|
-
lastModified: string;
|
|
215
|
-
filetype: string;
|
|
216
|
-
recordtype: string;
|
|
217
|
-
entity: string;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
export type IDatasetFiles = {
|
|
221
|
-
count: number;
|
|
222
|
-
files: IDatasetFile[];
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
export type IDayRange = number[];
|
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"lib": [
|
|
5
|
-
"es2019",
|
|
6
|
-
"es2020.promise",
|
|
7
|
-
"es2020.bigint",
|
|
8
|
-
"es2020.string"
|
|
9
|
-
],
|
|
10
|
-
"module": "commonjs",
|
|
11
|
-
"target": "es2019",
|
|
12
|
-
"strict": true,
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"forceConsistentCasingInFileNames": true,
|
|
16
|
-
},
|
|
17
|
-
"include": [
|
|
18
|
-
"src/**/*",
|
|
19
|
-
"test/**/*"
|
|
20
|
-
],
|
|
21
|
-
"exclude": [
|
|
22
|
-
"node_modules",
|
|
23
|
-
"**/*.spec.ts"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
File without changes
|