@justair/justair-library 6.14.0 → 7.0.0

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.
@@ -4,14 +4,16 @@ declare class Database {
4
4
  static getInstance(config: any): Promise<any>;
5
5
  static getCurrentDatabase(): string;
6
6
  static closeAllConnections(): Promise<void>;
7
- constructor({ CONNECTION_URL, database }: {
7
+ constructor({ CONNECTION_URL, database, options }: {
8
8
  CONNECTION_URL: any;
9
9
  database: any;
10
+ options?: {};
10
11
  });
11
12
  CONNECTION_URL: any;
12
13
  database: any;
13
14
  connectionKey: string;
14
15
  isConnected: boolean;
16
+ options: {};
15
17
  connect(): Promise<void>;
16
18
  disconnect(): Promise<void>;
17
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../src/config/db.js"],"names":[],"mappings":";AAEA;IACE,gCAA6B;IA+D7B,8CAqBC;IAED,oCAKC;IAED,4CAgBC;IA3GD;;;OAKC;IAJC,oBAAoC;IACpC,cAAwB;IACxB,sBAAoD;IACpD,qBAAwB;IAG1B,yBAuCC;IAED,4BAWC;CAiDF"}
1
+ {"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../src/config/db.js"],"names":[],"mappings":";AAEA;IACE,gCAA6B;IAoE7B,8CAqBC;IAED,oCAKC;IAED,4CAgBC;IAhHD;;;;OASC;IARC,oBAAoC;IACpC,cAAwB;IACxB,sBAAoD;IACpD,qBAAwB;IAIxB,YAAsB;IAGxB,yBAwCC;IAED,4BAWC;CAiDF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=db.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db.test.d.ts","sourceRoot":"","sources":["../../../src/config/tests/db.test.js"],"names":[],"mappings":""}
@@ -2,53 +2,48 @@ export const measurementsSchema: any;
2
2
  export const Measurements: any;
3
3
  export const Audit: any;
4
4
  export const auditSchema: any;
5
- export const annotationSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
5
+ export const annotationSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
6
6
  _id: true;
7
7
  timestamps: false;
8
8
  }, {
9
9
  comment: string;
10
- measurementIdentifier: string;
11
10
  source: "admin" | "processing_engine";
12
- timestamp: Date;
13
- adminId?: {
14
- prototype?: mongoose.Types.ObjectId;
15
- cacheHexString?: unknown;
16
- generate?: {};
17
- createFromTime?: {};
18
- createFromHexString?: {};
19
- createFromBase64?: {};
20
- isValid?: {};
21
- };
22
- }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
23
- comment: string;
24
11
  measurementIdentifier: string;
12
+ timestamp: NativeDate;
13
+ adminId?: mongoose.Types.ObjectId;
14
+ }, mongoose.Document<unknown, {}, {
15
+ comment: string;
25
16
  source: "admin" | "processing_engine";
26
- timestamp: Date;
27
- adminId?: {
28
- prototype?: mongoose.Types.ObjectId;
29
- cacheHexString?: unknown;
30
- generate?: {};
31
- createFromTime?: {};
32
- createFromHexString?: {};
33
- createFromBase64?: {};
34
- isValid?: {};
35
- };
36
- }>> & mongoose.FlatRecord<{
17
+ measurementIdentifier: string;
18
+ timestamp: NativeDate;
19
+ adminId?: mongoose.Types.ObjectId;
20
+ }, {
21
+ id: string;
22
+ }, Omit<mongoose.DefaultSchemaOptions, "_id" | "timestamps"> & {
23
+ _id: true;
24
+ timestamps: false;
25
+ }> & Omit<{
37
26
  comment: string;
27
+ source: "admin" | "processing_engine";
38
28
  measurementIdentifier: string;
29
+ timestamp: NativeDate;
30
+ adminId?: mongoose.Types.ObjectId;
31
+ } & {
32
+ _id: mongoose.Types.ObjectId;
33
+ } & {
34
+ __v: number;
35
+ }, "id"> & mongoose.HydratedDocumentOverrides<{
36
+ id: string;
37
+ }>, unknown, {
38
+ comment: string;
39
39
  source: "admin" | "processing_engine";
40
- timestamp: Date;
41
- adminId?: {
42
- prototype?: mongoose.Types.ObjectId;
43
- cacheHexString?: unknown;
44
- generate?: {};
45
- createFromTime?: {};
46
- createFromHexString?: {};
47
- createFromBase64?: {};
48
- isValid?: {};
49
- };
50
- }> & {
40
+ measurementIdentifier: string;
41
+ timestamp: NativeDate;
42
+ adminId?: mongoose.Types.ObjectId;
43
+ } & {
51
44
  _id: mongoose.Types.ObjectId;
45
+ } & {
46
+ __v: number;
52
47
  }>;
53
48
  import mongoose from "mongoose";
54
49
  //# sourceMappingURL=measurements.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"measurements.d.ts","sourceRoot":"","sources":["../../src/models/measurements.js"],"names":[],"mappings":"AA8FA,qCA0BE;AA2IF,+BAAwE;AAxKxE,wBAAmD;AAzBnD,8BAuBE;AAjEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCE;qBA5DmB,UAAU"}
1
+ {"version":3,"file":"measurements.d.ts","sourceRoot":"","sources":["../../src/models/measurements.js"],"names":[],"mappings":"AA8FA,qCA0BE;AA2IF,+BAAwE;AAxKxE,wBAAmD;AAzBnD,8BAuBE;AAjEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCE;qBA5DmB,UAAU"}
@@ -1,266 +1,166 @@
1
- export const monitorEpisodesSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
1
+ export const monitorEpisodesSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
2
2
  timestamps: true;
3
3
  }, {
4
- createdAt: NativeDate;
5
- updatedAt: NativeDate;
6
- } & {
7
- user: {
8
- prototype?: mongoose.Types.ObjectId;
9
- cacheHexString?: unknown;
10
- generate?: {};
11
- createFromTime?: {};
12
- createFromHexString?: {};
13
- createFromBase64?: {};
14
- isValid?: {};
15
- };
16
- monitor: {
17
- prototype?: mongoose.Types.ObjectId;
18
- cacheHexString?: unknown;
19
- generate?: {};
20
- createFromTime?: {};
21
- createFromHexString?: {};
22
- createFromBase64?: {};
23
- isValid?: {};
24
- };
4
+ user: mongoose.Types.ObjectId;
5
+ monitor: mongoose.Types.ObjectId;
25
6
  open: boolean;
26
- startedAt: Date;
7
+ startedAt: NativeDate;
27
8
  alertCount: number;
28
- firstNotifiedAt?: Date;
29
- endedAt?: Date;
9
+ firstNotifiedAt?: NativeDate;
10
+ endedAt?: NativeDate;
30
11
  peakStatus?: string;
31
- }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
32
- createdAt: NativeDate;
33
- updatedAt: NativeDate;
34
- } & {
35
- user: {
36
- prototype?: mongoose.Types.ObjectId;
37
- cacheHexString?: unknown;
38
- generate?: {};
39
- createFromTime?: {};
40
- createFromHexString?: {};
41
- createFromBase64?: {};
42
- isValid?: {};
43
- };
44
- monitor: {
45
- prototype?: mongoose.Types.ObjectId;
46
- cacheHexString?: unknown;
47
- generate?: {};
48
- createFromTime?: {};
49
- createFromHexString?: {};
50
- createFromBase64?: {};
51
- isValid?: {};
52
- };
12
+ } & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
13
+ user: mongoose.Types.ObjectId;
14
+ monitor: mongoose.Types.ObjectId;
53
15
  open: boolean;
54
- startedAt: Date;
16
+ startedAt: NativeDate;
55
17
  alertCount: number;
56
- firstNotifiedAt?: Date;
57
- endedAt?: Date;
18
+ firstNotifiedAt?: NativeDate;
19
+ endedAt?: NativeDate;
58
20
  peakStatus?: string;
59
- }>> & mongoose.FlatRecord<{
60
- createdAt: NativeDate;
61
- updatedAt: NativeDate;
62
- } & {
63
- user: {
64
- prototype?: mongoose.Types.ObjectId;
65
- cacheHexString?: unknown;
66
- generate?: {};
67
- createFromTime?: {};
68
- createFromHexString?: {};
69
- createFromBase64?: {};
70
- isValid?: {};
71
- };
72
- monitor: {
73
- prototype?: mongoose.Types.ObjectId;
74
- cacheHexString?: unknown;
75
- generate?: {};
76
- createFromTime?: {};
77
- createFromHexString?: {};
78
- createFromBase64?: {};
79
- isValid?: {};
80
- };
21
+ } & mongoose.DefaultTimestampProps, {
22
+ id: string;
23
+ }, Omit<mongoose.DefaultSchemaOptions, "timestamps"> & {
24
+ timestamps: true;
25
+ }> & Omit<{
26
+ user: mongoose.Types.ObjectId;
27
+ monitor: mongoose.Types.ObjectId;
81
28
  open: boolean;
82
- startedAt: Date;
29
+ startedAt: NativeDate;
83
30
  alertCount: number;
84
- firstNotifiedAt?: Date;
85
- endedAt?: Date;
31
+ firstNotifiedAt?: NativeDate;
32
+ endedAt?: NativeDate;
86
33
  peakStatus?: string;
87
- }> & {
34
+ } & mongoose.DefaultTimestampProps & {
88
35
  _id: mongoose.Types.ObjectId;
89
- }>;
90
- export const MonitorEpisode: mongoose.Model<{
91
- createdAt: NativeDate;
92
- updatedAt: NativeDate;
93
36
  } & {
94
- user: {
95
- prototype?: mongoose.Types.ObjectId;
96
- cacheHexString?: unknown;
97
- generate?: {};
98
- createFromTime?: {};
99
- createFromHexString?: {};
100
- createFromBase64?: {};
101
- isValid?: {};
102
- };
103
- monitor: {
104
- prototype?: mongoose.Types.ObjectId;
105
- cacheHexString?: unknown;
106
- generate?: {};
107
- createFromTime?: {};
108
- createFromHexString?: {};
109
- createFromBase64?: {};
110
- isValid?: {};
111
- };
37
+ __v: number;
38
+ }, "id"> & mongoose.HydratedDocumentOverrides<{
39
+ id: string;
40
+ }>, unknown, {
41
+ user: mongoose.Types.ObjectId;
42
+ monitor: mongoose.Types.ObjectId;
112
43
  open: boolean;
113
- startedAt: Date;
44
+ startedAt: NativeDate;
114
45
  alertCount: number;
115
- firstNotifiedAt?: Date;
116
- endedAt?: Date;
46
+ firstNotifiedAt?: NativeDate;
47
+ endedAt?: NativeDate;
117
48
  peakStatus?: string;
118
- }, {}, {}, {}, mongoose.Document<unknown, {}, {
119
49
  createdAt: NativeDate;
120
50
  updatedAt: NativeDate;
121
51
  } & {
122
- user: {
123
- prototype?: mongoose.Types.ObjectId;
124
- cacheHexString?: unknown;
125
- generate?: {};
126
- createFromTime?: {};
127
- createFromHexString?: {};
128
- createFromBase64?: {};
129
- isValid?: {};
130
- };
131
- monitor: {
132
- prototype?: mongoose.Types.ObjectId;
133
- cacheHexString?: unknown;
134
- generate?: {};
135
- createFromTime?: {};
136
- createFromHexString?: {};
137
- createFromBase64?: {};
138
- isValid?: {};
139
- };
52
+ _id: mongoose.Types.ObjectId;
53
+ } & {
54
+ __v: number;
55
+ }>;
56
+ export const MonitorEpisode: mongoose.Model<{
57
+ user: mongoose.Types.ObjectId;
58
+ monitor: mongoose.Types.ObjectId;
140
59
  open: boolean;
141
- startedAt: Date;
60
+ startedAt: NativeDate;
142
61
  alertCount: number;
143
- firstNotifiedAt?: Date;
144
- endedAt?: Date;
62
+ firstNotifiedAt?: NativeDate;
63
+ endedAt?: NativeDate;
145
64
  peakStatus?: string;
146
- }> & {
147
- createdAt: NativeDate;
148
- updatedAt: NativeDate;
149
- } & {
150
- user: {
151
- prototype?: mongoose.Types.ObjectId;
152
- cacheHexString?: unknown;
153
- generate?: {};
154
- createFromTime?: {};
155
- createFromHexString?: {};
156
- createFromBase64?: {};
157
- isValid?: {};
158
- };
159
- monitor: {
160
- prototype?: mongoose.Types.ObjectId;
161
- cacheHexString?: unknown;
162
- generate?: {};
163
- createFromTime?: {};
164
- createFromHexString?: {};
165
- createFromBase64?: {};
166
- isValid?: {};
167
- };
65
+ } & mongoose.DefaultTimestampProps, {}, {}, {
66
+ id: string;
67
+ }, mongoose.Document<unknown, {}, {
68
+ user: mongoose.Types.ObjectId;
69
+ monitor: mongoose.Types.ObjectId;
168
70
  open: boolean;
169
- startedAt: Date;
71
+ startedAt: NativeDate;
170
72
  alertCount: number;
171
- firstNotifiedAt?: Date;
172
- endedAt?: Date;
73
+ firstNotifiedAt?: NativeDate;
74
+ endedAt?: NativeDate;
173
75
  peakStatus?: string;
174
- } & {
76
+ } & mongoose.DefaultTimestampProps, {
77
+ id: string;
78
+ }, {
79
+ timestamps: true;
80
+ }> & Omit<{
81
+ user: mongoose.Types.ObjectId;
82
+ monitor: mongoose.Types.ObjectId;
83
+ open: boolean;
84
+ startedAt: NativeDate;
85
+ alertCount: number;
86
+ firstNotifiedAt?: NativeDate;
87
+ endedAt?: NativeDate;
88
+ peakStatus?: string;
89
+ } & mongoose.DefaultTimestampProps & {
175
90
  _id: mongoose.Types.ObjectId;
176
- }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
91
+ } & {
92
+ __v: number;
93
+ }, "id"> & mongoose.HydratedDocumentOverrides<{
94
+ id: string;
95
+ }>, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
177
96
  timestamps: true;
178
97
  }, {
179
- createdAt: NativeDate;
180
- updatedAt: NativeDate;
181
- } & {
182
- user: {
183
- prototype?: mongoose.Types.ObjectId;
184
- cacheHexString?: unknown;
185
- generate?: {};
186
- createFromTime?: {};
187
- createFromHexString?: {};
188
- createFromBase64?: {};
189
- isValid?: {};
190
- };
191
- monitor: {
192
- prototype?: mongoose.Types.ObjectId;
193
- cacheHexString?: unknown;
194
- generate?: {};
195
- createFromTime?: {};
196
- createFromHexString?: {};
197
- createFromBase64?: {};
198
- isValid?: {};
199
- };
98
+ user: mongoose.Types.ObjectId;
99
+ monitor: mongoose.Types.ObjectId;
200
100
  open: boolean;
201
- startedAt: Date;
101
+ startedAt: NativeDate;
202
102
  alertCount: number;
203
- firstNotifiedAt?: Date;
204
- endedAt?: Date;
103
+ firstNotifiedAt?: NativeDate;
104
+ endedAt?: NativeDate;
205
105
  peakStatus?: string;
206
- }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
207
- createdAt: NativeDate;
208
- updatedAt: NativeDate;
106
+ } & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
107
+ user: mongoose.Types.ObjectId;
108
+ monitor: mongoose.Types.ObjectId;
109
+ open: boolean;
110
+ startedAt: NativeDate;
111
+ alertCount: number;
112
+ firstNotifiedAt?: NativeDate;
113
+ endedAt?: NativeDate;
114
+ peakStatus?: string;
115
+ } & mongoose.DefaultTimestampProps, {
116
+ id: string;
117
+ }, Omit<mongoose.DefaultSchemaOptions, "timestamps"> & {
118
+ timestamps: true;
119
+ }> & Omit<{
120
+ user: mongoose.Types.ObjectId;
121
+ monitor: mongoose.Types.ObjectId;
122
+ open: boolean;
123
+ startedAt: NativeDate;
124
+ alertCount: number;
125
+ firstNotifiedAt?: NativeDate;
126
+ endedAt?: NativeDate;
127
+ peakStatus?: string;
128
+ } & mongoose.DefaultTimestampProps & {
129
+ _id: mongoose.Types.ObjectId;
209
130
  } & {
210
- user: {
211
- prototype?: mongoose.Types.ObjectId;
212
- cacheHexString?: unknown;
213
- generate?: {};
214
- createFromTime?: {};
215
- createFromHexString?: {};
216
- createFromBase64?: {};
217
- isValid?: {};
218
- };
219
- monitor: {
220
- prototype?: mongoose.Types.ObjectId;
221
- cacheHexString?: unknown;
222
- generate?: {};
223
- createFromTime?: {};
224
- createFromHexString?: {};
225
- createFromBase64?: {};
226
- isValid?: {};
227
- };
131
+ __v: number;
132
+ }, "id"> & mongoose.HydratedDocumentOverrides<{
133
+ id: string;
134
+ }>, unknown, {
135
+ user: mongoose.Types.ObjectId;
136
+ monitor: mongoose.Types.ObjectId;
228
137
  open: boolean;
229
- startedAt: Date;
138
+ startedAt: NativeDate;
230
139
  alertCount: number;
231
- firstNotifiedAt?: Date;
232
- endedAt?: Date;
140
+ firstNotifiedAt?: NativeDate;
141
+ endedAt?: NativeDate;
233
142
  peakStatus?: string;
234
- }>> & mongoose.FlatRecord<{
235
143
  createdAt: NativeDate;
236
144
  updatedAt: NativeDate;
237
145
  } & {
238
- user: {
239
- prototype?: mongoose.Types.ObjectId;
240
- cacheHexString?: unknown;
241
- generate?: {};
242
- createFromTime?: {};
243
- createFromHexString?: {};
244
- createFromBase64?: {};
245
- isValid?: {};
246
- };
247
- monitor: {
248
- prototype?: mongoose.Types.ObjectId;
249
- cacheHexString?: unknown;
250
- generate?: {};
251
- createFromTime?: {};
252
- createFromHexString?: {};
253
- createFromBase64?: {};
254
- isValid?: {};
255
- };
146
+ _id: mongoose.Types.ObjectId;
147
+ } & {
148
+ __v: number;
149
+ }>, {
150
+ user: mongoose.Types.ObjectId;
151
+ monitor: mongoose.Types.ObjectId;
256
152
  open: boolean;
257
- startedAt: Date;
153
+ startedAt: NativeDate;
258
154
  alertCount: number;
259
- firstNotifiedAt?: Date;
260
- endedAt?: Date;
155
+ firstNotifiedAt?: NativeDate;
156
+ endedAt?: NativeDate;
261
157
  peakStatus?: string;
262
- }> & {
158
+ createdAt: NativeDate;
159
+ updatedAt: NativeDate;
160
+ } & {
263
161
  _id: mongoose.Types.ObjectId;
264
- }>>;
162
+ } & {
163
+ __v: number;
164
+ }>;
265
165
  import mongoose from "mongoose";
266
166
  //# sourceMappingURL=monitorEpisodes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"monitorEpisodes.d.ts","sourceRoot":"","sources":["../../src/models/monitorEpisodes.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBE;AA0BF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA+E;qBA5E1D,UAAU"}
1
+ {"version":3,"file":"monitorEpisodes.d.ts","sourceRoot":"","sources":["../../src/models/monitorEpisodes.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBE;AA0BF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA+E;qBA5E1D,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/models/organizations.js"],"names":[],"mappings":"AAoGA,sCAsBE;AAyDF,gCAA2E"}
1
+ {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/models/organizations.js"],"names":[],"mappings":"AAoGA,sCAsBE;AAuDF,gCAA2E"}