dataset-types 3.0.1 → 3.0.2

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dataset-types",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "scripts": {
5
5
  "build": "tsc --rootDir '.' --outDir './dist'",
6
6
  "tsc": "tsc",
@@ -0,0 +1,140 @@
1
+ type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
2
+ export interface ICommandResult {
3
+ status: string;
4
+ msg: string;
5
+ entity?: any;
6
+ log?: any[];
7
+ }
8
+ export interface IContext {
9
+ context: string;
10
+ }
11
+ export interface IName {
12
+ name: string;
13
+ }
14
+ export interface IDataRow {
15
+ id: string;
16
+ }
17
+ export interface IEntity extends IDataRow {
18
+ type: string;
19
+ delete?: string;
20
+ }
21
+ export interface INamedEntity extends IEntity, IName, IContext {
22
+ }
23
+ export interface ITimed {
24
+ createdBy: string;
25
+ createdAt: Date;
26
+ }
27
+ export interface IDocumentReference extends IDataRow {
28
+ filetype: string;
29
+ documenttype: string;
30
+ }
31
+ export interface IDocument extends INamedEntity, ITimed {
32
+ entity: string;
33
+ filetype: string;
34
+ documenttype: string;
35
+ }
36
+ export interface IDocumentEntityLink {
37
+ entity: string;
38
+ documentId: string;
39
+ }
40
+ export interface IConfigurationItem extends INamedEntity, ITimed {
41
+ itemtype: string;
42
+ active: boolean;
43
+ monitored: string;
44
+ baseline: string;
45
+ dimension: string;
46
+ datatypes: string;
47
+ }
48
+ export interface IPermission extends IEntity, IContext, ITimed {
49
+ permission: string;
50
+ role: string;
51
+ }
52
+ export interface IDataService {
53
+ }
54
+ export interface IModel {
55
+ close: any;
56
+ }
57
+ export interface IModelService {
58
+ model: IModel;
59
+ seed: any;
60
+ upsert: (type: string, entity: any[]) => Promise<IPersistResult>;
61
+ upsertBatch: (type: string, entity: any[]) => Promise<IPersistResult>;
62
+ }
63
+ export interface IFileService {
64
+ download2: (context: string, log: boolean, txmode: string, //production/development/test
65
+ filetype: string, reference: string, encoding: BufferEncoding) => Promise<String | null>;
66
+ downloadToFile: (localfilename: string, tenantid: string, log: boolean, filetype: string, reference: string, txmode: string) => Promise<any>;
67
+ sendBlock: (tenantid: string, log: boolean, txmode: string, //production/development/test
68
+ filetype: string, content: string, key: string, //blob id
69
+ sliceNumber: number, totalSlices: number, meta: any, //meta data
70
+ tags: any) => void;
71
+ copy: (sourceContainer: string, sourceFile: string, targetContainer: string, targetFile: string) => Promise<void>;
72
+ list: (tenantid: string, log: boolean, page: number, pageSize: number, term: string, mode: string, recordtype: string, enabled: boolean, order: string) => Promise<IDatasetFiles>;
73
+ remove: (tenantid: string, mode: string, name: string) => Promise<boolean>;
74
+ setMeta: (tenantid: string, mode: string, name: string, status: string) => Promise<boolean>;
75
+ }
76
+ export interface ILogService {
77
+ archive: (context: string, submissionid: string, username: string, log: ILog[], processingtype?: string) => Promise<string>;
78
+ list: () => Promise<string[]>;
79
+ }
80
+ export interface ISecurityMonitorService {
81
+ hasPermission: (permission: string, roles: string[], context: string) => Promise<boolean>;
82
+ }
83
+ export type IChannel = "Email" | "SMS" | "WHATSAPP";
84
+ export interface IProcessingConfig {
85
+ remove?: boolean;
86
+ record?: boolean;
87
+ modes?: IChannel[];
88
+ }
89
+ export interface IPersistResult {
90
+ data: any[] | any;
91
+ error?: string;
92
+ }
93
+ export interface ILogStatus {
94
+ archiveid: string;
95
+ error?: string;
96
+ }
97
+ export interface ILog {
98
+ processingType: "Monitoring" | "Submission";
99
+ processingConfig?: IProcessingConfig;
100
+ blobid?: string;
101
+ documentId?: string;
102
+ name?: string;
103
+ localfilename?: string;
104
+ createdAt?: string;
105
+ user?: string;
106
+ meta: {
107
+ documenttype: string;
108
+ context?: string;
109
+ entity?: string;
110
+ user?: string;
111
+ createdat?: string;
112
+ recordstatus?: string;
113
+ effective?: string;
114
+ };
115
+ document?: IDocument;
116
+ rawdata?: any[];
117
+ }
118
+ export interface IUser {
119
+ id: string;
120
+ name: string;
121
+ email: string;
122
+ mobile: string;
123
+ roles: string;
124
+ context: string;
125
+ }
126
+ export type IDatasetFile = {
127
+ context: string;
128
+ id: string;
129
+ filename: string;
130
+ lastModified: string;
131
+ filetype: string;
132
+ recordtype: string;
133
+ entity: string;
134
+ };
135
+ export type IDatasetFiles = {
136
+ count: number;
137
+ files: IDatasetFile[];
138
+ };
139
+ export type IDayRange = number[];
140
+ export {};
package/tsconfig.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "declaration": true,
3
4
  "lib": [
4
5
  "es2019",
5
6
  "es2020.promise",