tabletcommand-backend-models 5.27.1 → 5.28.1

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.
@@ -0,0 +1,508 @@
1
+ /// <reference types="mongoose" />
2
+ import { currentDate, MongooseModule } from "../../helpers";
3
+ import * as uuid from "uuid";
4
+ export declare function CADIncidentSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
5
+ _interface: import("../../helpers").MongooseInterface<{
6
+ _id: {
7
+ type: import("mongoose").Types.ObjectIdConstructor;
8
+ auto: boolean;
9
+ };
10
+ uuid: {
11
+ type: StringConstructor;
12
+ default: (<T extends ArrayLike<number>>(options: uuid.V4Options | null | undefined, buffer: T, offset?: number | undefined) => T) & ((options?: uuid.V4Options | undefined) => string);
13
+ };
14
+ departmentId: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ required: boolean;
18
+ index: true;
19
+ };
20
+ AgencyID: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ IncidentNumber: {
25
+ type: StringConstructor;
26
+ required: boolean;
27
+ };
28
+ TransactionID: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ AgencyIncidentCallTypeDescription: {
33
+ type: StringConstructor;
34
+ };
35
+ AgencyIncidentCallType: {
36
+ type: StringConstructor;
37
+ };
38
+ AgencyIncidentCallSubTypeDescription: {
39
+ type: StringConstructor;
40
+ };
41
+ AgencyIncidentCallSubType: {
42
+ type: StringConstructor;
43
+ };
44
+ AgencyIncidentPriorityDescription: {
45
+ type: StringConstructor;
46
+ };
47
+ PulsePointIncidentCallType: {
48
+ type: StringConstructor;
49
+ };
50
+ PulsePointDeterminantCode: {
51
+ type: StringConstructor;
52
+ };
53
+ AlarmLevel: {
54
+ type: StringConstructor;
55
+ };
56
+ CommandName: {
57
+ type: StringConstructor;
58
+ };
59
+ FireMap: {
60
+ type: StringConstructor;
61
+ };
62
+ TBMap: {
63
+ type: StringConstructor;
64
+ };
65
+ MapPages: {
66
+ type: StringConstructor;
67
+ };
68
+ TacticalChannel: {
69
+ type: StringConstructor;
70
+ };
71
+ TacticalAltChannel: {
72
+ type: StringConstructor;
73
+ };
74
+ CommandChannel: {
75
+ type: StringConstructor;
76
+ };
77
+ EntryDateTime: {
78
+ type: StringConstructor;
79
+ };
80
+ ClosedDateTime: {
81
+ type: StringConstructor;
82
+ };
83
+ CallReceivedDateTime: {
84
+ type: StringConstructor;
85
+ };
86
+ DispatchDateTime: {
87
+ type: StringConstructor;
88
+ };
89
+ IncidentLastUpdate: {
90
+ type: StringConstructor;
91
+ };
92
+ EnrouteDateTime: {
93
+ type: StringConstructor;
94
+ };
95
+ OnSceneDateTime: {
96
+ type: StringConstructor;
97
+ };
98
+ modified_date: {
99
+ type: StringConstructor;
100
+ };
101
+ modified_unix_date: {
102
+ type: NumberConstructor;
103
+ };
104
+ modified: {
105
+ type: DateConstructor;
106
+ default: typeof currentDate;
107
+ };
108
+ start_unix_date: {
109
+ type: NumberConstructor;
110
+ };
111
+ closed_unix_date: {
112
+ type: NumberConstructor;
113
+ };
114
+ queued_at: {
115
+ type: NumberConstructor;
116
+ };
117
+ scheduled_at: {
118
+ type: NumberConstructor;
119
+ };
120
+ ignored: {
121
+ type: BooleanConstructor;
122
+ default: boolean;
123
+ };
124
+ expiration_date: {
125
+ type: DateConstructor;
126
+ default: null;
127
+ };
128
+ StreetName: {
129
+ type: StringConstructor;
130
+ };
131
+ StreetSuffix: {
132
+ type: StringConstructor;
133
+ };
134
+ Predirectional: {
135
+ type: StringConstructor;
136
+ };
137
+ Postdirectional: {
138
+ type: StringConstructor;
139
+ };
140
+ CityOrLocality: {
141
+ type: StringConstructor;
142
+ };
143
+ StateOrProvince: {
144
+ type: StringConstructor;
145
+ };
146
+ StateOfProvince: {
147
+ type: StringConstructor;
148
+ };
149
+ CommonPlaceName: {
150
+ type: StringConstructor;
151
+ };
152
+ CrossStreet1: {
153
+ type: StringConstructor;
154
+ };
155
+ CrossStreet2: {
156
+ type: StringConstructor;
157
+ };
158
+ StreetNumber: {
159
+ type: StringConstructor;
160
+ };
161
+ Building: {
162
+ type: StringConstructor;
163
+ };
164
+ Floor: {
165
+ type: StringConstructor;
166
+ };
167
+ Suite: {
168
+ type: StringConstructor;
169
+ };
170
+ City: {
171
+ type: StringConstructor;
172
+ };
173
+ County: {
174
+ type: StringConstructor;
175
+ };
176
+ PostalCode: {
177
+ type: StringConstructor;
178
+ };
179
+ CrossStreetName: {
180
+ type: StringConstructor;
181
+ };
182
+ LocationComment: {
183
+ type: StringConstructor;
184
+ };
185
+ full_address: {
186
+ type: StringConstructor;
187
+ };
188
+ address: {
189
+ type: StringConstructor;
190
+ };
191
+ cross_streets: {
192
+ type: StringConstructor;
193
+ };
194
+ PriorIncidentChanged: {
195
+ type: BooleanConstructor;
196
+ };
197
+ PriorIncident: {
198
+ type: (import("mongoose").Schema<any> & {
199
+ _interface: import("../../helpers").MongooseInterface<{
200
+ Address: {
201
+ type: StringConstructor;
202
+ };
203
+ Comment: {
204
+ type: (import("mongoose").Schema<any> & {
205
+ _interface: import("../../helpers").MongooseInterface<{
206
+ Comment: {
207
+ type: StringConstructor;
208
+ };
209
+ CommentSource: {
210
+ type: StringConstructor;
211
+ };
212
+ CommentDateTime: {
213
+ type: StringConstructor;
214
+ };
215
+ CommentConfidential: {
216
+ type: BooleanConstructor;
217
+ default: boolean;
218
+ };
219
+ }>;
220
+ _methods: unknown;
221
+ })[];
222
+ };
223
+ IncidentDateTime: {
224
+ type: StringConstructor;
225
+ };
226
+ IncidentNumber: {
227
+ type: StringConstructor;
228
+ };
229
+ Jurisdiction: {
230
+ type: StringConstructor;
231
+ };
232
+ Problem: {
233
+ type: StringConstructor;
234
+ };
235
+ Suite: {
236
+ type: StringConstructor;
237
+ };
238
+ }>;
239
+ _methods: unknown;
240
+ })[];
241
+ default: never[];
242
+ };
243
+ CallerNumber: {
244
+ type: StringConstructor;
245
+ default: string;
246
+ };
247
+ ReportNumber: {
248
+ type: (import("mongoose").Schema<any> & {
249
+ _interface: import("../../helpers").MongooseInterface<{
250
+ name: {
251
+ type: StringConstructor;
252
+ default: string;
253
+ };
254
+ number: {
255
+ type: StringConstructor;
256
+ default: string;
257
+ };
258
+ }>;
259
+ _methods: unknown;
260
+ })[];
261
+ default: never[];
262
+ };
263
+ radioChannels: {
264
+ type: (import("mongoose").Schema<any> & {
265
+ _interface: import("../../helpers").MongooseInterface<{
266
+ name: {
267
+ type: StringConstructor;
268
+ default: string;
269
+ };
270
+ channel: {
271
+ type: StringConstructor;
272
+ default: string;
273
+ };
274
+ }>;
275
+ _methods: unknown;
276
+ })[];
277
+ default: never[];
278
+ };
279
+ Latitude: {
280
+ type: NumberConstructor;
281
+ };
282
+ Longitude: {
283
+ type: NumberConstructor;
284
+ };
285
+ Comment: {
286
+ type: (import("mongoose").Schema<any> & {
287
+ _interface: import("../../helpers").MongooseInterface<{
288
+ Comment: {
289
+ type: StringConstructor;
290
+ };
291
+ CommentSource: {
292
+ type: StringConstructor;
293
+ };
294
+ CommentDateTime: {
295
+ type: StringConstructor;
296
+ };
297
+ CommentConfidential: {
298
+ type: BooleanConstructor;
299
+ default: boolean;
300
+ };
301
+ }>;
302
+ _methods: unknown;
303
+ })[];
304
+ default: never[];
305
+ };
306
+ units: {
307
+ type: (import("mongoose").Schema<any> & {
308
+ _interface: import("../../helpers").MongooseInterface<{
309
+ UnitID: {
310
+ type: StringConstructor;
311
+ required: boolean;
312
+ };
313
+ UnitDispatchNumber: {
314
+ type: StringConstructor;
315
+ required: boolean;
316
+ };
317
+ AlarmAtDispatch: {
318
+ type: StringConstructor;
319
+ };
320
+ TimeDispatched: {
321
+ type: StringConstructor;
322
+ };
323
+ TimeEnroute: {
324
+ type: StringConstructor;
325
+ };
326
+ TimeArrived: {
327
+ type: StringConstructor;
328
+ };
329
+ TimeStaged: {
330
+ type: StringConstructor;
331
+ };
332
+ TimeCleared: {
333
+ type: StringConstructor;
334
+ };
335
+ TimeAtHospital: {
336
+ type: StringConstructor;
337
+ };
338
+ TimePatient: {
339
+ type: StringConstructor;
340
+ };
341
+ TimeTransport: {
342
+ type: StringConstructor;
343
+ };
344
+ TimeTransporting: {
345
+ type: StringConstructor;
346
+ };
347
+ PersonnelCount: {
348
+ type: NumberConstructor;
349
+ };
350
+ Personnel: (import("mongoose").Schema<any> & {
351
+ _interface: import("../../helpers").MongooseInterface<{
352
+ PersonnelID: {
353
+ type: StringConstructor;
354
+ };
355
+ PersonnelName: {
356
+ type: StringConstructor;
357
+ };
358
+ PersonnelRank: {
359
+ type: StringConstructor;
360
+ };
361
+ PersonnelWorkCode: {
362
+ type: StringConstructor;
363
+ };
364
+ PersonnelNote: {
365
+ type: StringConstructor;
366
+ };
367
+ }>;
368
+ _methods: unknown;
369
+ })[];
370
+ }>;
371
+ _methods: unknown;
372
+ })[];
373
+ default: never[];
374
+ };
375
+ events: {
376
+ type: (import("mongoose").Schema<any> & {
377
+ _interface: import("../../helpers").MongooseInterface<{
378
+ _id: {
379
+ type: import("mongoose").Types.ObjectIdConstructor;
380
+ auto: boolean;
381
+ };
382
+ departmentId: {
383
+ type: StringConstructor;
384
+ default: string;
385
+ required: boolean;
386
+ index: true;
387
+ };
388
+ IncidentNumber: {
389
+ type: StringConstructor;
390
+ default: string;
391
+ required: boolean;
392
+ index: true;
393
+ };
394
+ modified_unix_date: {
395
+ type: NumberConstructor;
396
+ default: typeof import("../../helpers").retrieveCurrentUnixTime;
397
+ };
398
+ modified: {
399
+ type: DateConstructor;
400
+ default: typeof currentDate;
401
+ };
402
+ message: {
403
+ type: StringConstructor;
404
+ default: string;
405
+ };
406
+ location: {
407
+ longitude: {
408
+ type: NumberConstructor;
409
+ default: number;
410
+ };
411
+ latitude: {
412
+ type: NumberConstructor;
413
+ default: number;
414
+ };
415
+ };
416
+ type: {
417
+ type: StringConstructor;
418
+ default: string;
419
+ };
420
+ user: {
421
+ type: import("mongoose").Schema<any> & {
422
+ _interface: import("../../helpers").MongooseInterface<{
423
+ username: {
424
+ type: StringConstructor;
425
+ default: string;
426
+ };
427
+ email: {
428
+ type: StringConstructor;
429
+ default: string;
430
+ };
431
+ radioName: {
432
+ type: StringConstructor;
433
+ default: string;
434
+ };
435
+ userId: {
436
+ type: StringConstructor;
437
+ default: string;
438
+ };
439
+ }>;
440
+ _methods: unknown;
441
+ };
442
+ default: {};
443
+ };
444
+ serverTime: {
445
+ type: NumberConstructor;
446
+ default: typeof import("../../helpers").retrieveCurrentUnixTime;
447
+ min: number;
448
+ };
449
+ userTime: {
450
+ type: NumberConstructor;
451
+ required: boolean;
452
+ default: number;
453
+ min: number;
454
+ };
455
+ uuid: {
456
+ type: StringConstructor;
457
+ require: boolean;
458
+ };
459
+ ref_uuid: {
460
+ type: StringConstructor;
461
+ default: string;
462
+ };
463
+ opts: {
464
+ type: ObjectConstructor;
465
+ default: {};
466
+ };
467
+ archived: {
468
+ type: BooleanConstructor;
469
+ default: boolean;
470
+ };
471
+ }>;
472
+ _methods: unknown;
473
+ })[];
474
+ default: never[];
475
+ };
476
+ preference_location: {
477
+ type: StringConstructor;
478
+ };
479
+ simulation: {
480
+ type: BooleanConstructor;
481
+ default: boolean;
482
+ };
483
+ notify: {
484
+ type: BooleanConstructor;
485
+ default: boolean;
486
+ };
487
+ rts: {
488
+ type: BooleanConstructor;
489
+ default: boolean;
490
+ };
491
+ notificationType: {
492
+ type: (import("mongoose").Schema<any> & {
493
+ _interface: import("../../helpers").MongooseInterface<{
494
+ name: {
495
+ type: StringConstructor;
496
+ };
497
+ value: {
498
+ type: StringConstructor;
499
+ };
500
+ }>;
501
+ _methods: unknown;
502
+ })[];
503
+ default: never[];
504
+ };
505
+ }>;
506
+ _methods: unknown;
507
+ };
508
+ //# sourceMappingURL=cad-incident.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cad-incident.d.ts","sourceRoot":"","sources":["../../../src/models/schema/cad-incident.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,WAAW,EAKX,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAI7B,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4ezD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabletcommand-backend-models",
3
- "version": "5.27.1",
3
+ "version": "5.28.1",
4
4
  "description": "Tablet Command Backend Models",
5
5
  "scripts": {
6
6
  "test": "gulp",
@@ -27,21 +27,21 @@
27
27
  "devDependencies": {
28
28
  "@types/bluebird": "^3.5.37",
29
29
  "@types/chai": "^4.3.4",
30
- "@types/lodash": "^4.14.190",
30
+ "@types/lodash": "^4.14.191",
31
31
  "@types/mocha": "^9.1.1",
32
32
  "@types/mongodb": "^3.6.20",
33
33
  "@types/mongoose": "~5.10.5",
34
34
  "@types/uuid": "~8.3.4",
35
- "@typescript-eslint/eslint-plugin": "~5.38.1",
36
- "@typescript-eslint/parser": "~5.38.1",
37
- "chai": "^4.3.6",
38
- "cspell": "^6.15.0",
35
+ "@typescript-eslint/eslint-plugin": "~5.45.1",
36
+ "@typescript-eslint/parser": "~5.45.1",
37
+ "chai": "^4.3.7",
38
+ "cspell": "^6.17.0",
39
39
  "del": "^6.1.1",
40
- "eslint": "^8.24.0",
40
+ "eslint": "^8.29.0",
41
41
  "gulp": "^4.0.2",
42
42
  "gulp-mocha": "^8.0.0",
43
43
  "gulp-shell": "^0.8.0",
44
- "mocha": "^10.0.0",
44
+ "mocha": "^10.1.0",
45
45
  "ts-node": "^10.9.1",
46
46
  "type-coverage": "^2.24.1",
47
47
  "typescript": "~4.7.4",
package/src/index.ts CHANGED
@@ -17,6 +17,7 @@ async function wireModels(mongoose: MongooseModule) {
17
17
  Battalion: await getModel(import("./models/battalion")),
18
18
  BeaconLog: await getModel(import("./models/beacon-log")),
19
19
  CADIncident: await getModel(import("./models/cad-incident")),
20
+ CADIncidentFlat: await getModel(import("./models/cad-incident-flat")),
20
21
  CADIncidentStream: await getModel(import("./models/cad-incident-stream")),
21
22
  CADStatus: await getModel(import("./models/cad-status")),
22
23
  CADStatusMap: await getModel(import("./models/cad-status-map")),
@@ -62,6 +63,7 @@ export { Assignment, AssignmentModel } from "./models/assignment";
62
63
  export { Battalion, BattalionModel } from "./models/battalion";
63
64
  export { BeaconLog, BeaconLogModel } from "./models/beacon-log";
64
65
  export { CADIncident, CADIncidentModel } from "./models/cad-incident";
66
+ export { CADIncidentFlat, CADIncidentFlatModel } from "./models/cad-incident-flat";
65
67
  export { CADIncidentStream, CADIncidentStreamModel } from "./models/cad-incident-stream";
66
68
  export { CADStatus, CADStatusModel } from "./models/cad-status";
67
69
  export { CADStatusMap, CADStatusMapModel } from "./models/cad-status-map";
@@ -170,7 +170,7 @@ export function BattalionSchema(mongoose: MongooseModule) {
170
170
 
171
171
  const pathSchema = schema as unknown as { paths: Record<string, string> };
172
172
  if (pathSchema.paths[element] === undefined) {
173
- // console.log("backend-models.cad-incident: undefined schema.paths[element]:", element, pathSchema.paths[element]);
173
+ // console.log("backend-models.battalion: undefined schema.paths[element]:", element, pathSchema.paths[element]);
174
174
  delete ret[element];
175
175
  }
176
176
  });
@@ -0,0 +1,20 @@
1
+ import {
2
+ createModel,
3
+ ItemTypeFromTypeSchemaFunction,
4
+ ModelTypeFromTypeSchemaFunction,
5
+ MongooseModule,
6
+ ReplaceModelReturnType,
7
+ } from "../helpers";
8
+
9
+ import { CADIncidentSchema } from "./schema/cad-incident";
10
+
11
+ export async function CADIncidentFlatModule(mongoose: MongooseModule) {
12
+ const modelSchema = CADIncidentSchema(mongoose);
13
+ modelSchema.set("collection", "massive_cad_incident_flat");
14
+ modelSchema.set("strict", true);
15
+ return createModel(mongoose, "CADIncidentFlat", modelSchema);
16
+ }
17
+
18
+ export interface CADIncidentFlat extends ItemTypeFromTypeSchemaFunction<typeof CADIncidentFlatModule> { }
19
+ export interface CADIncidentFlatModel extends ModelTypeFromTypeSchemaFunction<CADIncidentFlat> { }
20
+ export default CADIncidentFlatModule as ReplaceModelReturnType<typeof CADIncidentFlatModule, CADIncidentFlatModel>;