tabletcommand-backend-models 5.37.4 → 5.37.6
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/models/cad-incident-block.js +2 -2
- package/build/models/cad-incident-block.js.map +1 -1
- package/build/models/managed-incident.js +25 -77
- package/build/models/managed-incident.js.map +1 -1
- package/build/models/personnel-known.js +4 -0
- package/build/models/personnel-known.js.map +1 -1
- package/build/models/personnel-roster.js +4 -0
- package/build/models/personnel-roster.js.map +1 -1
- package/build/models/schema/cad-incident.js +16 -129
- package/build/models/schema/cad-incident.js.map +1 -1
- package/build/models/schema/shared-incident.js +201 -0
- package/build/models/schema/shared-incident.js.map +1 -0
- package/definitions/models/cad-incident.d.ts +7 -0
- package/definitions/models/cad-incident.d.ts.map +1 -1
- package/definitions/models/managed-incident.d.ts +91 -21
- package/definitions/models/managed-incident.d.ts.map +1 -1
- package/definitions/models/personnel-known.d.ts +6 -1
- package/definitions/models/personnel-known.d.ts.map +1 -1
- package/definitions/models/personnel-roster.d.ts +5 -0
- package/definitions/models/personnel-roster.d.ts.map +1 -1
- package/definitions/models/schema/cad-incident.d.ts +7 -0
- package/definitions/models/schema/cad-incident.d.ts.map +1 -1
- package/definitions/models/schema/shared-incident.d.ts +162 -0
- package/definitions/models/schema/shared-incident.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/models/cad-incident-block.ts +2 -2
- package/src/models/managed-incident.ts +35 -83
- package/src/models/personnel-known.ts +5 -1
- package/src/models/personnel-roster.ts +4 -1
- package/src/models/schema/cad-incident.ts +25 -137
- package/src/models/schema/shared-incident.ts +217 -0
- package/test/cad-incident-block.js +44 -0
- package/test/cad-incident.js +57 -0
- package/test/managed-incident.js +57 -0
- package/test/mock.js +245 -85
- package/build/models/schema/report-number.js +0 -25
- package/build/models/schema/report-number.js.map +0 -1
- package/definitions/models/schema/report-number.d.ts +0 -16
- package/definitions/models/schema/report-number.d.ts.map +0 -1
- package/src/models/schema/report-number.ts +0 -27
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shared-incident.js","sourceRoot":"","sources":["../../../src/models/schema/shared-incident.ts"],"names":[],"mappings":";;;AAAA,2CAIuB;AAEvB,qDAAqD;AACrD,yBAAyB;AAEzB,SAAgB,eAAe,CAAC,QAAwB;IACtD,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;IAE5B,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC,MAAM,EAAE;QAClC,WAAW,EAAE;YACX,IAAI,EAAE,MAAM;SACb;QACD,aAAa,EAAE;YACb,IAAI,EAAE,MAAM;SACb;QACD,aAAa,EAAE;YACb,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,aAAa,EAAE;YACb,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;KACF,EAAE;QACD,GAAG,EAAE,KAAK;QACV,EAAE,EAAE,KAAK;KACV,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AA5BD,0CA4BC;AAED,SAAgB,kBAAkB,CAAC,QAAwB;IACzD,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;IAE5B,MAAM,YAAY,GAAG,IAAA,sBAAY,EAAC,MAAM,EAAE;QACxC,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,GAAG,EAAE;YACH,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;KACF,EAAE;QACD,GAAG,EAAE,KAAK;QACV,EAAE,EAAE,KAAK;QACT,MAAM,EAAE;YACN,UAAU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,EAAE;QACxC,wDAAwD;QACxD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,qFAAqF;QACrF,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,KAAK;SACf;QAED,wCAAwC;QACxC,OAAO,EAAE;YACP,IAAI,EAAE,IAAI;SACX;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,IAAI;SACX;QACD,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,WAAW,CAAC;YACnB,OAAO,EAAE,EAAE;SACZ;KACF,EAAE;QACD,GAAG,EAAE,KAAK;QACV,EAAE,EAAE,KAAK;QACT,MAAM,EAAE;YACN,UAAU,EAAE,KAAK;SAClB;KACF,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC;AACtB,CAAC;AApCD,gDAoCC"}
|
@@ -138,6 +138,10 @@ export declare function CADIncidentModule(mongoose: MongooseModule): Promise<imp
|
|
138
138
|
type: StringConstructor;
|
139
139
|
default: string;
|
140
140
|
};
|
141
|
+
channelDescription: {
|
142
|
+
type: StringConstructor;
|
143
|
+
default: string;
|
144
|
+
};
|
141
145
|
}>[];
|
142
146
|
Latitude: number;
|
143
147
|
Longitude: number;
|
@@ -221,12 +225,15 @@ export declare function CADIncidentModule(mongoose: MongooseModule): Promise<imp
|
|
221
225
|
};
|
222
226
|
PersonnelRank: {
|
223
227
|
type: StringConstructor;
|
228
|
+
default: string;
|
224
229
|
};
|
225
230
|
PersonnelWorkCode: {
|
226
231
|
type: StringConstructor;
|
232
|
+
default: string;
|
227
233
|
};
|
228
234
|
PersonnelNote: {
|
229
235
|
type: StringConstructor;
|
236
|
+
default: string;
|
230
237
|
};
|
231
238
|
}>;
|
232
239
|
_methods: unknown;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cad-incident.d.ts","sourceRoot":"","sources":["../../src/models/cad-incident.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,8BAA8B,EAC9B,+BAA+B,EAC/B,cAAc,EACd,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAIpB,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,cAAc
|
1
|
+
{"version":3,"file":"cad-incident.d.ts","sourceRoot":"","sources":["../../src/models/cad-incident.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,8BAA8B,EAC9B,+BAA+B,EAC/B,cAAc,EACd,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAIpB,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAe/D;AAED,MAAM,WAAW,WAAY,SAAQ,8BAA8B,CAAC,OAAO,iBAAiB,CAAC;CAAI;AACjG,MAAM,WAAW,gBAAiB,SAAQ,+BAA+B,CAAC,WAAW,CAAC;CAAI;;AAC1F,wBAAuG"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="mongoose" />
|
2
2
|
import * as uuid from "uuid";
|
3
|
-
import { ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, MongooseModule, ReplaceModelReturnType } from "../helpers";
|
3
|
+
import { currentDate, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, MongooseModule, ReplaceModelReturnType } from "../helpers";
|
4
4
|
export declare function ManagedIncidentModule(mongoose: MongooseModule): Promise<import("mongoose").Model<import("mongoose").Document & Record<string, unknown> & {
|
5
5
|
_id: import("mongoose").Types.ObjectId;
|
6
6
|
departmentId: string;
|
@@ -406,24 +406,6 @@ export declare function ManagedIncidentModule(mongoose: MongooseModule): Promise
|
|
406
406
|
default: string;
|
407
407
|
};
|
408
408
|
}>[];
|
409
|
-
radioChannels: import("../helpers").MongooseInterface<{
|
410
|
-
name: {
|
411
|
-
type: StringConstructor;
|
412
|
-
default: string;
|
413
|
-
};
|
414
|
-
channel: {
|
415
|
-
type: StringConstructor;
|
416
|
-
default: string;
|
417
|
-
};
|
418
|
-
url: {
|
419
|
-
type: StringConstructor;
|
420
|
-
default: string;
|
421
|
-
};
|
422
|
-
channelDescription: {
|
423
|
-
type: StringConstructor;
|
424
|
-
default: string;
|
425
|
-
};
|
426
|
-
}>[];
|
427
409
|
units: import("../helpers").MongooseInterface<{
|
428
410
|
UnitID: {
|
429
411
|
type: StringConstructor;
|
@@ -591,26 +573,114 @@ export declare function ManagedIncidentModule(mongoose: MongooseModule): Promise
|
|
591
573
|
local_id: string;
|
592
574
|
AgencyID: string;
|
593
575
|
isMandatory: boolean;
|
594
|
-
|
595
|
-
|
576
|
+
radioChannels: import("../helpers").MongooseInterface<{
|
577
|
+
name: {
|
596
578
|
type: StringConstructor;
|
597
579
|
default: string;
|
598
580
|
};
|
581
|
+
channel: {
|
582
|
+
type: StringConstructor;
|
583
|
+
default: string;
|
584
|
+
};
|
585
|
+
url: {
|
586
|
+
type: StringConstructor;
|
587
|
+
default: string;
|
588
|
+
};
|
589
|
+
channelDescription: {
|
590
|
+
type: StringConstructor;
|
591
|
+
default: string;
|
592
|
+
};
|
593
|
+
}>[];
|
594
|
+
record: import("../helpers").MongooseInterface<{
|
599
595
|
name: {
|
600
596
|
type: StringConstructor;
|
601
597
|
default: string;
|
602
598
|
};
|
599
|
+
value: {
|
600
|
+
type: StringConstructor;
|
601
|
+
default: string;
|
602
|
+
};
|
603
603
|
}>;
|
604
604
|
ReportNumber: import("../helpers").MongooseInterface<{
|
605
|
+
name: {
|
606
|
+
type: StringConstructor;
|
607
|
+
default: string;
|
608
|
+
};
|
605
609
|
number: {
|
606
610
|
type: StringConstructor;
|
607
611
|
default: string;
|
608
612
|
};
|
613
|
+
}>[];
|
614
|
+
sharedTo: import("../helpers").MongooseInterface<{
|
615
|
+
departmentId: {
|
616
|
+
type: StringConstructor;
|
617
|
+
default: string;
|
618
|
+
};
|
609
619
|
name: {
|
610
620
|
type: StringConstructor;
|
611
621
|
default: string;
|
612
622
|
};
|
623
|
+
startAt: {
|
624
|
+
type: DateConstructor;
|
625
|
+
default: typeof currentDate;
|
626
|
+
};
|
627
|
+
expireAt: {
|
628
|
+
type: DateConstructor;
|
629
|
+
default: typeof currentDate;
|
630
|
+
};
|
631
|
+
active: {
|
632
|
+
type: BooleanConstructor;
|
633
|
+
default: boolean;
|
634
|
+
};
|
635
|
+
reasons: {
|
636
|
+
type: (import("mongoose").Schema<any> & {
|
637
|
+
_interface: import("../helpers").MongooseInterface<{
|
638
|
+
name: {
|
639
|
+
type: StringConstructor;
|
640
|
+
default: string;
|
641
|
+
};
|
642
|
+
date: {
|
643
|
+
type: DateConstructor;
|
644
|
+
default: typeof currentDate;
|
645
|
+
};
|
646
|
+
}>;
|
647
|
+
_methods: unknown;
|
648
|
+
})[];
|
649
|
+
default: never[];
|
650
|
+
};
|
613
651
|
}>[];
|
652
|
+
sharedSource: import("../helpers").MongooseInterface<{
|
653
|
+
name: {
|
654
|
+
type: StringConstructor;
|
655
|
+
default: string;
|
656
|
+
};
|
657
|
+
isExternal: {
|
658
|
+
type: BooleanConstructor;
|
659
|
+
default: boolean;
|
660
|
+
};
|
661
|
+
startAt: {
|
662
|
+
type: DateConstructor;
|
663
|
+
};
|
664
|
+
expireAt: {
|
665
|
+
type: DateConstructor;
|
666
|
+
};
|
667
|
+
reasons: {
|
668
|
+
type: (import("mongoose").Schema<any> & {
|
669
|
+
_interface: import("../helpers").MongooseInterface<{
|
670
|
+
name: {
|
671
|
+
type: StringConstructor;
|
672
|
+
default: string;
|
673
|
+
};
|
674
|
+
date: {
|
675
|
+
type: DateConstructor;
|
676
|
+
default: typeof currentDate;
|
677
|
+
};
|
678
|
+
}>;
|
679
|
+
_methods: unknown;
|
680
|
+
})[];
|
681
|
+
default: never[];
|
682
|
+
};
|
683
|
+
}>;
|
614
684
|
}, {}> & {
|
615
685
|
__methods?: unknown;
|
616
686
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"managed-incident.d.ts","sourceRoot":"","sources":["../../src/models/managed-incident.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,
|
1
|
+
{"version":3,"file":"managed-incident.d.ts","sourceRoot":"","sources":["../../src/models/managed-incident.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAGL,WAAW,EAEX,8BAA8B,EAC9B,+BAA+B,EAG/B,cAAc,EACd,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAUpB,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2iBnE;AAED,MAAM,WAAW,eAAgB,SAAQ,8BAA8B,CAAC,OAAO,qBAAqB,CAAC;CAAI;AACzG,MAAM,WAAW,oBAAqB,SAAQ,+BAA+B,CAAC,eAAe,CAAC;CAAI;;AAClG,wBAAmH"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="mongoose" />
|
2
2
|
import * as uuid from "uuid";
|
3
|
-
import { MongooseModule, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, ReplaceModelReturnType } from "../helpers";
|
3
|
+
import { MongooseModule, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, ReplaceModelReturnType, currentDate } from "../helpers";
|
4
4
|
export declare function PersonnelKnownSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
|
5
5
|
_interface: import("../helpers").MongooseInterface<{
|
6
6
|
_id: {
|
@@ -23,6 +23,10 @@ export declare function PersonnelKnownSchema(mongoose: MongooseModule): import("
|
|
23
23
|
type: StringConstructor;
|
24
24
|
default: string;
|
25
25
|
};
|
26
|
+
modified: {
|
27
|
+
type: DateConstructor;
|
28
|
+
default: typeof currentDate;
|
29
|
+
};
|
26
30
|
departmentId: {
|
27
31
|
type: StringConstructor;
|
28
32
|
};
|
@@ -67,6 +71,7 @@ export declare function PersonnelKnownModule(mongoose: MongooseModule): Promise<
|
|
67
71
|
PersonnelName: string;
|
68
72
|
PersonnelRank: string;
|
69
73
|
PersonnelWorkCode: string;
|
74
|
+
modified: string;
|
70
75
|
departmentId: string;
|
71
76
|
uuid: string;
|
72
77
|
radios: import("../helpers").MongooseInterface<{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"personnel-known.d.ts","sourceRoot":"","sources":["../../src/models/personnel-known.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAGL,cAAc,EACd,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,
|
1
|
+
{"version":3,"file":"personnel-known.d.ts","sourceRoot":"","sources":["../../src/models/personnel-known.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAGL,cAAc,EACd,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,WAAW,EACZ,MAAM,YAAY,CAAC;AAEpB,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2E5D;AAED,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;GAGlE;AAED,MAAM,WAAW,cAAe,SAAQ,8BAA8B,CAAC,OAAO,oBAAoB,CAAC;CAAI;AACvG,MAAM,WAAW,mBAAoB,SAAQ,+BAA+B,CAAC,cAAc,CAAC;CAAI;;AAChG,wBAAgH"}
|
@@ -29,6 +29,10 @@ export declare function PersonnelRosterSchema(mongoose: MongooseModule): import(
|
|
29
29
|
departmentId: {
|
30
30
|
type: StringConstructor;
|
31
31
|
};
|
32
|
+
modified: {
|
33
|
+
type: DateConstructor;
|
34
|
+
default: typeof currentDate;
|
35
|
+
};
|
32
36
|
action: {
|
33
37
|
type: StringConstructor;
|
34
38
|
default: string;
|
@@ -60,6 +64,7 @@ export declare function PersonnelRosterModule(mongoose: MongooseModule): Promise
|
|
60
64
|
PersonnelWorkCode: string;
|
61
65
|
PersonnelUUID: string;
|
62
66
|
departmentId: string;
|
67
|
+
modified: string;
|
63
68
|
action: string;
|
64
69
|
radioName: string;
|
65
70
|
shiftStart: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"personnel-roster.d.ts","sourceRoot":"","sources":["../../src/models/personnel-roster.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,cAAc,EACd,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,WAAW,EACZ,MAAM,YAAY,CAAC;AAEpB,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,cAAc
|
1
|
+
{"version":3,"file":"personnel-roster.d.ts","sourceRoot":"","sources":["../../src/models/personnel-roster.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,cAAc,EACd,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,WAAW,EACZ,MAAM,YAAY,CAAC;AAEpB,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiE7D;AAED,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;GAGnE;AAED,MAAM,WAAW,eAAgB,SAAQ,8BAA8B,CAAC,OAAO,qBAAqB,CAAC;CAAI;AACzG,MAAM,WAAW,oBAAqB,SAAQ,+BAA+B,CAAC,eAAe,CAAC;CAAI;;AAClG,wBAAmH"}
|
@@ -288,6 +288,10 @@ export declare function CADIncidentSchema(mongoose: MongooseModule): import("mon
|
|
288
288
|
type: StringConstructor;
|
289
289
|
default: string;
|
290
290
|
};
|
291
|
+
channelDescription: {
|
292
|
+
type: StringConstructor;
|
293
|
+
default: string;
|
294
|
+
};
|
291
295
|
}>;
|
292
296
|
_methods: unknown;
|
293
297
|
})[];
|
@@ -387,12 +391,15 @@ export declare function CADIncidentSchema(mongoose: MongooseModule): import("mon
|
|
387
391
|
};
|
388
392
|
PersonnelRank: {
|
389
393
|
type: StringConstructor;
|
394
|
+
default: string;
|
390
395
|
};
|
391
396
|
PersonnelWorkCode: {
|
392
397
|
type: StringConstructor;
|
398
|
+
default: string;
|
393
399
|
};
|
394
400
|
PersonnelNote: {
|
395
401
|
type: StringConstructor;
|
402
|
+
default: string;
|
396
403
|
};
|
397
404
|
}>;
|
398
405
|
_methods: unknown;
|
@@ -1 +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;
|
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;AAY7B,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsfzD"}
|
@@ -0,0 +1,162 @@
|
|
1
|
+
/// <reference types="mongoose" />
|
2
|
+
import { MongooseModule, currentDate } from "../../helpers";
|
3
|
+
export declare function CADPersonSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
|
4
|
+
_interface: import("../../helpers").MongooseInterface<{
|
5
|
+
PersonnelID: {
|
6
|
+
type: StringConstructor;
|
7
|
+
};
|
8
|
+
PersonnelName: {
|
9
|
+
type: StringConstructor;
|
10
|
+
};
|
11
|
+
PersonnelRank: {
|
12
|
+
type: StringConstructor;
|
13
|
+
default: string;
|
14
|
+
};
|
15
|
+
PersonnelWorkCode: {
|
16
|
+
type: StringConstructor;
|
17
|
+
default: string;
|
18
|
+
};
|
19
|
+
PersonnelNote: {
|
20
|
+
type: StringConstructor;
|
21
|
+
default: string;
|
22
|
+
};
|
23
|
+
}>;
|
24
|
+
_methods: unknown;
|
25
|
+
};
|
26
|
+
export declare function RadioChannelSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
|
27
|
+
_interface: import("../../helpers").MongooseInterface<{
|
28
|
+
name: {
|
29
|
+
type: StringConstructor;
|
30
|
+
default: string;
|
31
|
+
};
|
32
|
+
channel: {
|
33
|
+
type: StringConstructor;
|
34
|
+
default: string;
|
35
|
+
};
|
36
|
+
url: {
|
37
|
+
type: StringConstructor;
|
38
|
+
default: string;
|
39
|
+
};
|
40
|
+
channelDescription: {
|
41
|
+
type: StringConstructor;
|
42
|
+
default: string;
|
43
|
+
};
|
44
|
+
}>;
|
45
|
+
_methods: unknown;
|
46
|
+
};
|
47
|
+
export declare function RecordSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
|
48
|
+
_interface: import("../../helpers").MongooseInterface<{
|
49
|
+
name: {
|
50
|
+
type: StringConstructor;
|
51
|
+
default: string;
|
52
|
+
};
|
53
|
+
value: {
|
54
|
+
type: StringConstructor;
|
55
|
+
default: string;
|
56
|
+
};
|
57
|
+
}>;
|
58
|
+
_methods: unknown;
|
59
|
+
};
|
60
|
+
export declare function ReportNumberSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
|
61
|
+
_interface: import("../../helpers").MongooseInterface<{
|
62
|
+
name: {
|
63
|
+
type: StringConstructor;
|
64
|
+
default: string;
|
65
|
+
};
|
66
|
+
number: {
|
67
|
+
type: StringConstructor;
|
68
|
+
default: string;
|
69
|
+
};
|
70
|
+
}>;
|
71
|
+
_methods: unknown;
|
72
|
+
};
|
73
|
+
export declare function ShareReasonSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
|
74
|
+
_interface: import("../../helpers").MongooseInterface<{
|
75
|
+
name: {
|
76
|
+
type: StringConstructor;
|
77
|
+
default: string;
|
78
|
+
};
|
79
|
+
date: {
|
80
|
+
type: DateConstructor;
|
81
|
+
default: typeof currentDate;
|
82
|
+
};
|
83
|
+
}>;
|
84
|
+
_methods: unknown;
|
85
|
+
};
|
86
|
+
export declare function SharedToSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
|
87
|
+
_interface: import("../../helpers").MongooseInterface<{
|
88
|
+
departmentId: {
|
89
|
+
type: StringConstructor;
|
90
|
+
default: string;
|
91
|
+
};
|
92
|
+
name: {
|
93
|
+
type: StringConstructor;
|
94
|
+
default: string;
|
95
|
+
};
|
96
|
+
startAt: {
|
97
|
+
type: DateConstructor;
|
98
|
+
default: typeof currentDate;
|
99
|
+
};
|
100
|
+
expireAt: {
|
101
|
+
type: DateConstructor;
|
102
|
+
default: typeof currentDate;
|
103
|
+
};
|
104
|
+
active: {
|
105
|
+
type: BooleanConstructor;
|
106
|
+
default: boolean;
|
107
|
+
};
|
108
|
+
reasons: {
|
109
|
+
type: (import("mongoose").Schema<any> & {
|
110
|
+
_interface: import("../../helpers").MongooseInterface<{
|
111
|
+
name: {
|
112
|
+
type: StringConstructor;
|
113
|
+
default: string;
|
114
|
+
};
|
115
|
+
date: {
|
116
|
+
type: DateConstructor;
|
117
|
+
default: typeof currentDate;
|
118
|
+
};
|
119
|
+
}>;
|
120
|
+
_methods: unknown;
|
121
|
+
})[];
|
122
|
+
default: never[];
|
123
|
+
};
|
124
|
+
}>;
|
125
|
+
_methods: unknown;
|
126
|
+
};
|
127
|
+
export declare function SharedSourceSchema(mongoose: MongooseModule): import("mongoose").Schema<any> & {
|
128
|
+
_interface: import("../../helpers").MongooseInterface<{
|
129
|
+
name: {
|
130
|
+
type: StringConstructor;
|
131
|
+
default: string;
|
132
|
+
};
|
133
|
+
isExternal: {
|
134
|
+
type: BooleanConstructor;
|
135
|
+
default: boolean;
|
136
|
+
};
|
137
|
+
startAt: {
|
138
|
+
type: DateConstructor;
|
139
|
+
};
|
140
|
+
expireAt: {
|
141
|
+
type: DateConstructor;
|
142
|
+
};
|
143
|
+
reasons: {
|
144
|
+
type: (import("mongoose").Schema<any> & {
|
145
|
+
_interface: import("../../helpers").MongooseInterface<{
|
146
|
+
name: {
|
147
|
+
type: StringConstructor;
|
148
|
+
default: string;
|
149
|
+
};
|
150
|
+
date: {
|
151
|
+
type: DateConstructor;
|
152
|
+
default: typeof currentDate;
|
153
|
+
};
|
154
|
+
}>;
|
155
|
+
_methods: unknown;
|
156
|
+
})[];
|
157
|
+
default: never[];
|
158
|
+
};
|
159
|
+
}>;
|
160
|
+
_methods: unknown;
|
161
|
+
};
|
162
|
+
//# sourceMappingURL=shared-incident.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"shared-incident.d.ts","sourceRoot":"","sources":["../../../src/models/schema/shared-incident.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EAEd,WAAW,EACZ,MAAM,eAAe,CAAC;AAKvB,wBAAgB,eAAe,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;EA4BvD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;EA6B1D;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;EAqBpD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;EAqB1D;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;EAqBzD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCtD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoC1D"}
|
package/package.json
CHANGED
@@ -10,11 +10,11 @@ import {
|
|
10
10
|
|
11
11
|
import * as mongooseLeanVirtuals from "mongoose-lean-virtuals";
|
12
12
|
|
13
|
-
import
|
13
|
+
import { ReportNumberSchema } from "./schema/shared-incident";
|
14
14
|
|
15
15
|
export async function CADIncidentBlockModule(mongoose: MongooseModule) {
|
16
16
|
const { Schema, Types } = mongoose;
|
17
|
-
const ReportNumber =
|
17
|
+
const ReportNumber = ReportNumberSchema(mongoose);
|
18
18
|
|
19
19
|
// Simplified schema.
|
20
20
|
// Payload should confirm to cad-incident (more or less)
|
@@ -12,64 +12,24 @@ import {
|
|
12
12
|
MongooseModule,
|
13
13
|
ReplaceModelReturnType,
|
14
14
|
} from "../helpers";
|
15
|
+
import {
|
16
|
+
CADPersonSchema,
|
17
|
+
RadioChannelSchema,
|
18
|
+
RecordSchema,
|
19
|
+
ReportNumberSchema,
|
20
|
+
SharedSourceSchema,
|
21
|
+
SharedToSchema,
|
22
|
+
} from "./schema/shared-incident";
|
15
23
|
|
16
24
|
export async function ManagedIncidentModule(mongoose: MongooseModule) {
|
17
25
|
const { Schema, Types } = mongoose;
|
18
26
|
|
19
|
-
const
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
type: String,
|
26
|
-
default: ""
|
27
|
-
},
|
28
|
-
},
|
29
|
-
{
|
30
|
-
_id: false,
|
31
|
-
id: false,
|
32
|
-
});
|
33
|
-
|
34
|
-
const Record = createSchema(Schema, {
|
35
|
-
value: {
|
36
|
-
type: String,
|
37
|
-
default: "",
|
38
|
-
},
|
39
|
-
name: {
|
40
|
-
type: String,
|
41
|
-
default: ""
|
42
|
-
},
|
43
|
-
},
|
44
|
-
{
|
45
|
-
_id: false,
|
46
|
-
id: false,
|
47
|
-
});
|
48
|
-
|
49
|
-
const Person = createSchema(Schema, {
|
50
|
-
PersonnelID: {
|
51
|
-
type: String,
|
52
|
-
},
|
53
|
-
PersonnelName: {
|
54
|
-
type: String,
|
55
|
-
},
|
56
|
-
PersonnelRank: {
|
57
|
-
type: String,
|
58
|
-
default: ""
|
59
|
-
},
|
60
|
-
PersonnelWorkCode: {
|
61
|
-
type: String,
|
62
|
-
default: ""
|
63
|
-
},
|
64
|
-
PersonnelNote: {
|
65
|
-
type: String,
|
66
|
-
default: ""
|
67
|
-
}
|
68
|
-
},
|
69
|
-
{
|
70
|
-
_id: false,
|
71
|
-
id: false,
|
72
|
-
});
|
27
|
+
const CADPerson = CADPersonSchema(mongoose);
|
28
|
+
const RadioChannel = RadioChannelSchema(mongoose);
|
29
|
+
const RecordValue = RecordSchema(mongoose);
|
30
|
+
const ReportNumber = ReportNumberSchema(mongoose);
|
31
|
+
const SharedSource = SharedSourceSchema(mongoose);
|
32
|
+
const SharedTo = SharedToSchema(mongoose);
|
73
33
|
|
74
34
|
const HistoryItem = createSchema(Schema, {
|
75
35
|
message: {
|
@@ -213,7 +173,7 @@ export async function ManagedIncidentModule(mongoose: MongooseModule) {
|
|
213
173
|
default: 0,
|
214
174
|
},
|
215
175
|
Personnel: {
|
216
|
-
type: [
|
176
|
+
type: [CADPerson],
|
217
177
|
default: [],
|
218
178
|
},
|
219
179
|
status: {
|
@@ -423,28 +383,6 @@ export async function ManagedIncidentModule(mongoose: MongooseModule) {
|
|
423
383
|
id: false,
|
424
384
|
});
|
425
385
|
|
426
|
-
const RadioChannel = createSchema(Schema, {
|
427
|
-
name: {
|
428
|
-
type: String,
|
429
|
-
default: "",
|
430
|
-
},
|
431
|
-
channel: {
|
432
|
-
type: String,
|
433
|
-
default: "",
|
434
|
-
},
|
435
|
-
url: {
|
436
|
-
type: String,
|
437
|
-
default: "",
|
438
|
-
},
|
439
|
-
channelDescription: {
|
440
|
-
type: String,
|
441
|
-
default: "",
|
442
|
-
},
|
443
|
-
}, {
|
444
|
-
_id: false,
|
445
|
-
id: false,
|
446
|
-
});
|
447
|
-
|
448
386
|
const modelSchema = createSchema(Schema, {
|
449
387
|
_id: {
|
450
388
|
type: Types.ObjectId,
|
@@ -568,10 +506,7 @@ export async function ManagedIncidentModule(mongoose: MongooseModule) {
|
|
568
506
|
type: [HistoryItem],
|
569
507
|
default: [],
|
570
508
|
},
|
571
|
-
|
572
|
-
type: [RadioChannel],
|
573
|
-
default: [],
|
574
|
-
},
|
509
|
+
|
575
510
|
units: {
|
576
511
|
type: [IncidentUnit],
|
577
512
|
default: [],
|
@@ -597,13 +532,30 @@ export async function ManagedIncidentModule(mongoose: MongooseModule) {
|
|
597
532
|
type: Boolean,
|
598
533
|
default: false,
|
599
534
|
},
|
535
|
+
|
536
|
+
// Share incident properties
|
537
|
+
radioChannels: {
|
538
|
+
type: [RadioChannel],
|
539
|
+
default: [],
|
540
|
+
},
|
600
541
|
record: {
|
601
|
-
type:
|
542
|
+
type: RecordValue,
|
602
543
|
},
|
603
544
|
ReportNumber: {
|
604
545
|
type: [ReportNumber],
|
605
546
|
default: [],
|
606
|
-
}
|
547
|
+
},
|
548
|
+
// Shared Incident, copied by iOS
|
549
|
+
sharedTo: {
|
550
|
+
type: [SharedTo],
|
551
|
+
default: [],
|
552
|
+
},
|
553
|
+
// Include current department name, to share with external departments
|
554
|
+
// other properties are set at output
|
555
|
+
sharedSource: {
|
556
|
+
type: SharedSource,
|
557
|
+
},
|
558
|
+
|
607
559
|
}, {
|
608
560
|
collection: "massive_incident_managed",
|
609
561
|
});
|
@@ -7,6 +7,7 @@ import {
|
|
7
7
|
ItemTypeFromTypeSchemaFunction,
|
8
8
|
ModelTypeFromTypeSchemaFunction,
|
9
9
|
ReplaceModelReturnType,
|
10
|
+
currentDate,
|
10
11
|
} from "../helpers";
|
11
12
|
|
12
13
|
export function PersonnelKnownSchema(mongoose: MongooseModule) {
|
@@ -46,7 +47,10 @@ export function PersonnelKnownSchema(mongoose: MongooseModule) {
|
|
46
47
|
type: String,
|
47
48
|
default: ""
|
48
49
|
},
|
49
|
-
|
50
|
+
modified: {
|
51
|
+
type: Date,
|
52
|
+
default: currentDate,
|
53
|
+
},
|
50
54
|
departmentId: {
|
51
55
|
type: String,
|
52
56
|
},
|
@@ -40,7 +40,10 @@ export function PersonnelRosterSchema(mongoose: MongooseModule) {
|
|
40
40
|
departmentId: {
|
41
41
|
type: String,
|
42
42
|
},
|
43
|
-
|
43
|
+
modified: {
|
44
|
+
type: Date,
|
45
|
+
default: currentDate,
|
46
|
+
},
|
44
47
|
action: {
|
45
48
|
type: String,
|
46
49
|
default: "add", // The options are "add", "remove"
|