tabletcommand-backend-models 5.27.0 → 5.28.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.
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/models/battalion.js +1 -1
- package/build/models/battalion.js.map +1 -1
- package/build/models/cad-incident-flat.js +14 -0
- package/build/models/cad-incident-flat.js.map +1 -0
- package/build/models/cad-incident.js +5 -459
- package/build/models/cad-incident.js.map +1 -1
- package/build/models/monitor.js +6 -1
- package/build/models/monitor.js.map +1 -1
- package/build/models/schema/cad-incident.js +463 -0
- package/build/models/schema/cad-incident.js.map +1 -0
- package/build/models/template.js +1 -1
- package/build/models/template.js.map +1 -1
- package/definitions/index.d.ts +2 -0
- package/definitions/index.d.ts.map +1 -1
- package/definitions/models/cad-incident-flat.d.ts +314 -0
- package/definitions/models/cad-incident-flat.d.ts.map +1 -0
- package/definitions/models/cad-incident.d.ts +2 -502
- package/definitions/models/cad-incident.d.ts.map +1 -1
- package/definitions/models/monitor.d.ts +1 -0
- package/definitions/models/monitor.d.ts.map +1 -1
- package/definitions/models/schema/cad-incident.d.ts +503 -0
- package/definitions/models/schema/cad-incident.d.ts.map +1 -0
- package/package.json +11 -11
- package/src/index.ts +2 -0
- package/src/models/battalion.ts +1 -1
- package/src/models/cad-incident-flat.ts +20 -0
- package/src/models/cad-incident.ts +3 -495
- package/src/models/monitor.ts +7 -1
- package/src/models/schema/cad-incident.ts +500 -0
- package/src/models/template.ts +1 -1
- package/test/0index.js +1 -0
- package/test/mock.js +2 -1
|
@@ -0,0 +1,503 @@
|
|
|
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
|
+
tag: {
|
|
264
|
+
type: StringConstructor;
|
|
265
|
+
default: string;
|
|
266
|
+
};
|
|
267
|
+
Latitude: {
|
|
268
|
+
type: StringConstructor;
|
|
269
|
+
};
|
|
270
|
+
Longitude: {
|
|
271
|
+
type: StringConstructor;
|
|
272
|
+
};
|
|
273
|
+
Comment: {
|
|
274
|
+
type: (import("mongoose").Schema<any> & {
|
|
275
|
+
_interface: import("../../helpers").MongooseInterface<{
|
|
276
|
+
Comment: {
|
|
277
|
+
type: StringConstructor;
|
|
278
|
+
};
|
|
279
|
+
CommentSource: {
|
|
280
|
+
type: StringConstructor;
|
|
281
|
+
};
|
|
282
|
+
CommentDateTime: {
|
|
283
|
+
type: StringConstructor;
|
|
284
|
+
};
|
|
285
|
+
CommentConfidential: {
|
|
286
|
+
type: BooleanConstructor;
|
|
287
|
+
default: boolean;
|
|
288
|
+
};
|
|
289
|
+
}>;
|
|
290
|
+
_methods: unknown;
|
|
291
|
+
})[];
|
|
292
|
+
default: never[];
|
|
293
|
+
};
|
|
294
|
+
units: {
|
|
295
|
+
type: (import("mongoose").Schema<any> & {
|
|
296
|
+
_interface: import("../../helpers").MongooseInterface<{
|
|
297
|
+
UnitID: {
|
|
298
|
+
type: StringConstructor;
|
|
299
|
+
required: boolean;
|
|
300
|
+
};
|
|
301
|
+
UnitDispatchNumber: {
|
|
302
|
+
type: StringConstructor;
|
|
303
|
+
required: boolean;
|
|
304
|
+
};
|
|
305
|
+
AlarmAtDispatch: {
|
|
306
|
+
type: StringConstructor;
|
|
307
|
+
};
|
|
308
|
+
TimeDispatched: {
|
|
309
|
+
type: StringConstructor;
|
|
310
|
+
};
|
|
311
|
+
TimeEnroute: {
|
|
312
|
+
type: StringConstructor;
|
|
313
|
+
};
|
|
314
|
+
TimeArrived: {
|
|
315
|
+
type: StringConstructor;
|
|
316
|
+
};
|
|
317
|
+
TimeStaged: {
|
|
318
|
+
type: StringConstructor;
|
|
319
|
+
};
|
|
320
|
+
TimeCleared: {
|
|
321
|
+
type: StringConstructor;
|
|
322
|
+
};
|
|
323
|
+
TimeAtHospital: {
|
|
324
|
+
type: StringConstructor;
|
|
325
|
+
};
|
|
326
|
+
TimePatient: {
|
|
327
|
+
type: StringConstructor;
|
|
328
|
+
};
|
|
329
|
+
TimeTransport: {
|
|
330
|
+
type: StringConstructor;
|
|
331
|
+
};
|
|
332
|
+
TimeTransporting: {
|
|
333
|
+
type: StringConstructor;
|
|
334
|
+
};
|
|
335
|
+
PersonnelCount: {
|
|
336
|
+
type: NumberConstructor;
|
|
337
|
+
};
|
|
338
|
+
Personnel: (import("mongoose").Schema<any> & {
|
|
339
|
+
_interface: import("../../helpers").MongooseInterface<{
|
|
340
|
+
PersonnelID: {
|
|
341
|
+
type: StringConstructor;
|
|
342
|
+
};
|
|
343
|
+
PersonnelName: {
|
|
344
|
+
type: StringConstructor;
|
|
345
|
+
};
|
|
346
|
+
PersonnelRank: {
|
|
347
|
+
type: StringConstructor;
|
|
348
|
+
};
|
|
349
|
+
PersonnelWorkCode: {
|
|
350
|
+
type: StringConstructor;
|
|
351
|
+
};
|
|
352
|
+
PersonnelNote: {
|
|
353
|
+
type: StringConstructor;
|
|
354
|
+
};
|
|
355
|
+
}>;
|
|
356
|
+
_methods: unknown;
|
|
357
|
+
})[];
|
|
358
|
+
}>;
|
|
359
|
+
_methods: unknown;
|
|
360
|
+
})[];
|
|
361
|
+
default: never[];
|
|
362
|
+
};
|
|
363
|
+
events: {
|
|
364
|
+
type: (import("mongoose").Schema<any> & {
|
|
365
|
+
_interface: import("../../helpers").MongooseInterface<{
|
|
366
|
+
_id: {
|
|
367
|
+
type: import("mongoose").Types.ObjectIdConstructor;
|
|
368
|
+
auto: boolean;
|
|
369
|
+
};
|
|
370
|
+
departmentId: {
|
|
371
|
+
type: StringConstructor;
|
|
372
|
+
default: string;
|
|
373
|
+
required: boolean;
|
|
374
|
+
index: true;
|
|
375
|
+
};
|
|
376
|
+
IncidentNumber: {
|
|
377
|
+
type: StringConstructor;
|
|
378
|
+
default: string;
|
|
379
|
+
required: boolean;
|
|
380
|
+
index: true;
|
|
381
|
+
};
|
|
382
|
+
modified_unix_date: {
|
|
383
|
+
type: NumberConstructor;
|
|
384
|
+
default: typeof import("../../helpers").retrieveCurrentUnixTime;
|
|
385
|
+
};
|
|
386
|
+
modified: {
|
|
387
|
+
type: DateConstructor;
|
|
388
|
+
default: typeof currentDate;
|
|
389
|
+
};
|
|
390
|
+
message: {
|
|
391
|
+
type: StringConstructor;
|
|
392
|
+
default: string;
|
|
393
|
+
};
|
|
394
|
+
location: {
|
|
395
|
+
longitude: {
|
|
396
|
+
type: NumberConstructor;
|
|
397
|
+
default: number;
|
|
398
|
+
};
|
|
399
|
+
latitude: {
|
|
400
|
+
type: NumberConstructor;
|
|
401
|
+
default: number;
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
type: {
|
|
405
|
+
type: StringConstructor;
|
|
406
|
+
default: string;
|
|
407
|
+
};
|
|
408
|
+
user: {
|
|
409
|
+
type: import("mongoose").Schema<any> & {
|
|
410
|
+
_interface: import("../../helpers").MongooseInterface<{
|
|
411
|
+
username: {
|
|
412
|
+
type: StringConstructor;
|
|
413
|
+
default: string;
|
|
414
|
+
};
|
|
415
|
+
email: {
|
|
416
|
+
type: StringConstructor;
|
|
417
|
+
default: string;
|
|
418
|
+
};
|
|
419
|
+
radioName: {
|
|
420
|
+
type: StringConstructor;
|
|
421
|
+
default: string;
|
|
422
|
+
};
|
|
423
|
+
userId: {
|
|
424
|
+
type: StringConstructor;
|
|
425
|
+
default: string;
|
|
426
|
+
};
|
|
427
|
+
}>;
|
|
428
|
+
_methods: unknown;
|
|
429
|
+
};
|
|
430
|
+
default: {};
|
|
431
|
+
};
|
|
432
|
+
serverTime: {
|
|
433
|
+
type: NumberConstructor;
|
|
434
|
+
default: typeof import("../../helpers").retrieveCurrentUnixTime;
|
|
435
|
+
min: number;
|
|
436
|
+
};
|
|
437
|
+
userTime: {
|
|
438
|
+
type: NumberConstructor;
|
|
439
|
+
required: boolean;
|
|
440
|
+
default: number;
|
|
441
|
+
min: number;
|
|
442
|
+
};
|
|
443
|
+
uuid: {
|
|
444
|
+
type: StringConstructor;
|
|
445
|
+
require: boolean;
|
|
446
|
+
};
|
|
447
|
+
ref_uuid: {
|
|
448
|
+
type: StringConstructor;
|
|
449
|
+
default: string;
|
|
450
|
+
};
|
|
451
|
+
opts: {
|
|
452
|
+
type: ObjectConstructor;
|
|
453
|
+
default: {};
|
|
454
|
+
};
|
|
455
|
+
archived: {
|
|
456
|
+
type: BooleanConstructor;
|
|
457
|
+
default: boolean;
|
|
458
|
+
};
|
|
459
|
+
}>;
|
|
460
|
+
_methods: unknown;
|
|
461
|
+
})[];
|
|
462
|
+
default: never[];
|
|
463
|
+
};
|
|
464
|
+
preference_location: {
|
|
465
|
+
type: StringConstructor;
|
|
466
|
+
};
|
|
467
|
+
simulation: {
|
|
468
|
+
type: BooleanConstructor;
|
|
469
|
+
default: boolean;
|
|
470
|
+
};
|
|
471
|
+
notify: {
|
|
472
|
+
type: BooleanConstructor;
|
|
473
|
+
default: boolean;
|
|
474
|
+
};
|
|
475
|
+
rts: {
|
|
476
|
+
type: BooleanConstructor;
|
|
477
|
+
default: boolean;
|
|
478
|
+
};
|
|
479
|
+
CADSimulator: {
|
|
480
|
+
type: StringConstructor;
|
|
481
|
+
};
|
|
482
|
+
notificationType: {
|
|
483
|
+
type: (import("mongoose").Schema<any> & {
|
|
484
|
+
_interface: import("../../helpers").MongooseInterface<{
|
|
485
|
+
name: {
|
|
486
|
+
type: StringConstructor;
|
|
487
|
+
};
|
|
488
|
+
value: {
|
|
489
|
+
type: StringConstructor;
|
|
490
|
+
};
|
|
491
|
+
}>;
|
|
492
|
+
_methods: unknown;
|
|
493
|
+
})[];
|
|
494
|
+
default: never[];
|
|
495
|
+
};
|
|
496
|
+
notifiedUnits: {
|
|
497
|
+
type: StringConstructor[];
|
|
498
|
+
default: never[];
|
|
499
|
+
};
|
|
500
|
+
}>;
|
|
501
|
+
_methods: unknown;
|
|
502
|
+
};
|
|
503
|
+
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqezD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tabletcommand-backend-models",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.28.0",
|
|
4
4
|
"description": "Tablet Command Backend Models",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "gulp",
|
|
@@ -19,31 +19,31 @@
|
|
|
19
19
|
"bluebird": "^3.7.2",
|
|
20
20
|
"debug": "^4.3.4",
|
|
21
21
|
"lodash": "^4.17.21",
|
|
22
|
-
"moment-timezone": "^0.5.
|
|
22
|
+
"moment-timezone": "^0.5.39",
|
|
23
23
|
"mongoose": "=5.10.19",
|
|
24
24
|
"mongoose-lean-virtuals": "^0.7.6",
|
|
25
25
|
"uuid": "~9.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/bluebird": "^3.5.37",
|
|
29
|
-
"@types/chai": "^4.3.
|
|
30
|
-
"@types/lodash": "^4.14.
|
|
29
|
+
"@types/chai": "^4.3.4",
|
|
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.
|
|
36
|
-
"@typescript-eslint/parser": "~5.
|
|
37
|
-
"chai": "^4.3.
|
|
38
|
-
"cspell": "^6.
|
|
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.
|
|
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.
|
|
44
|
+
"mocha": "^10.1.0",
|
|
45
45
|
"ts-node": "^10.9.1",
|
|
46
|
-
"type-coverage": "^2.
|
|
46
|
+
"type-coverage": "^2.24.1",
|
|
47
47
|
"typescript": "~4.7.4",
|
|
48
48
|
"yargs-parser": ">=21.1.1"
|
|
49
49
|
},
|
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";
|
package/src/models/battalion.ts
CHANGED
|
@@ -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.
|
|
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>;
|