tabletcommand-backend-models 5.37.5 → 5.37.7

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.
Files changed (35) hide show
  1. package/build/models/cad-incident-block.js +2 -2
  2. package/build/models/cad-incident-block.js.map +1 -1
  3. package/build/models/managed-incident.js +25 -77
  4. package/build/models/managed-incident.js.map +1 -1
  5. package/build/models/mark43-incident-retry.js +8 -0
  6. package/build/models/mark43-incident-retry.js.map +1 -1
  7. package/build/models/schema/cad-incident.js +16 -129
  8. package/build/models/schema/cad-incident.js.map +1 -1
  9. package/build/models/schema/shared-incident.js +201 -0
  10. package/build/models/schema/shared-incident.js.map +1 -0
  11. package/definitions/models/cad-incident.d.ts +7 -0
  12. package/definitions/models/cad-incident.d.ts.map +1 -1
  13. package/definitions/models/managed-incident.d.ts +91 -21
  14. package/definitions/models/managed-incident.d.ts.map +1 -1
  15. package/definitions/models/mark43-incident-retry.d.ts +2 -0
  16. package/definitions/models/mark43-incident-retry.d.ts.map +1 -1
  17. package/definitions/models/schema/cad-incident.d.ts +7 -0
  18. package/definitions/models/schema/cad-incident.d.ts.map +1 -1
  19. package/definitions/models/schema/shared-incident.d.ts +162 -0
  20. package/definitions/models/schema/shared-incident.d.ts.map +1 -0
  21. package/package.json +1 -1
  22. package/src/models/cad-incident-block.ts +2 -2
  23. package/src/models/managed-incident.ts +35 -83
  24. package/src/models/mark43-incident-retry.ts +8 -0
  25. package/src/models/schema/cad-incident.ts +25 -137
  26. package/src/models/schema/shared-incident.ts +217 -0
  27. package/test/cad-incident-block.js +44 -0
  28. package/test/cad-incident.js +57 -0
  29. package/test/managed-incident.js +57 -0
  30. package/test/mock.js +245 -85
  31. package/build/models/schema/report-number.js +0 -25
  32. package/build/models/schema/report-number.js.map +0 -1
  33. package/definitions/models/schema/report-number.d.ts +0 -16
  34. package/definitions/models/schema/report-number.d.ts.map +0 -1
  35. package/src/models/schema/report-number.ts +0 -27
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
+ {"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
- record: import("../helpers").MongooseInterface<{
595
- value: {
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,EAKL,8BAA8B,EAC9B,+BAA+B,EAG/B,cAAc,EACd,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmmBnE;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
+ {"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"}
@@ -6,6 +6,8 @@ export declare function Mark43IncidentRetryModule(mongoose: MongooseModule): Pro
6
6
  modified: string;
7
7
  active: boolean;
8
8
  attempts: number;
9
+ retries: number;
10
+ notificationSent: boolean;
9
11
  retryPayload: import("../helpers").MongooseInterface<{
10
12
  departmentId: {
11
13
  type: NumberConstructor;
@@ -1 +1 @@
1
- {"version":3,"file":"mark43-incident-retry.d.ts","sourceRoot":"","sources":["../../src/models/mark43-incident-retry.ts"],"names":[],"mappings":";AAAA,OAAO,EAIL,8BAA8B,EAC9B,+BAA+B,EAC/B,cAAc,EACd,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEvE;AAED,MAAM,WAAW,mBAAoB,SAAQ,8BAA8B,CAAC,OAAO,yBAAyB,CAAC;CAAI;AACjH,MAAM,WAAW,wBAAyB,SAAQ,+BAA+B,CAAC,mBAAmB,CAAC;CAAI;;AAC1G,wBAA+H"}
1
+ {"version":3,"file":"mark43-incident-retry.d.ts","sourceRoot":"","sources":["../../src/models/mark43-incident-retry.ts"],"names":[],"mappings":";AAAA,OAAO,EAIL,8BAA8B,EAC9B,+BAA+B,EAC/B,cAAc,EACd,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFvE;AAED,MAAM,WAAW,mBAAoB,SAAQ,8BAA8B,CAAC,OAAO,yBAAyB,CAAC;CAAI;AACjH,MAAM,WAAW,wBAAyB,SAAQ,+BAA+B,CAAC,mBAAmB,CAAC;CAAI;;AAC1G,wBAA+H"}
@@ -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;AAK7B,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6mBzD"}
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabletcommand-backend-models",
3
- "version": "5.37.5",
3
+ "version": "5.37.7",
4
4
  "description": "Tablet Command Backend Models",
5
5
  "scripts": {
6
6
  "build": "gulp build",
@@ -10,11 +10,11 @@ import {
10
10
 
11
11
  import * as mongooseLeanVirtuals from "mongoose-lean-virtuals";
12
12
 
13
- import ReportNumberModule from "./schema/report-number";
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 = ReportNumberModule(mongoose);
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 ReportNumber = createSchema(Schema, {
20
- number: {
21
- type: String,
22
- default: "",
23
- },
24
- name: {
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: [Person],
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
- radioChannels: {
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: Record,
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
  });
@@ -65,6 +65,14 @@ export async function Mark43IncidentRetryModule(mongoose: MongooseModule) {
65
65
  type: Number,
66
66
  default: 0,
67
67
  },
68
+ retries: {
69
+ type: Number,
70
+ default: 0,
71
+ },
72
+ notificationSent: {
73
+ type: Boolean,
74
+ default: false,
75
+ },
68
76
  retryPayload: {
69
77
  type: RetryPayload,
70
78
  default: {},