tabletcommand-backend-models 7.4.60 → 7.4.62
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/department.js +13 -0
- package/build/models/department.js.map +1 -1
- package/build/models/esri.js +1 -1
- package/build/models/esri.js.map +1 -1
- package/build/models/incident-notified.js +5 -4
- package/build/models/incident-notified.js.map +1 -1
- package/build/models/schema/firemapper-auth.js +43 -4
- package/build/models/schema/firemapper-auth.js.map +1 -1
- package/build/test/department.js +88 -63
- package/build/test/department.js.map +1 -1
- package/build/test/incident-notified.js +1 -1
- package/build/test/incident-notified.js.map +1 -1
- package/build/test/mock.js +102 -66
- package/build/test/mock.js.map +1 -1
- package/definitions/models/department.d.ts +2 -12
- package/definitions/models/department.d.ts.map +1 -1
- package/definitions/models/esri.d.ts.map +1 -1
- package/definitions/models/incident-notified.d.ts.map +1 -1
- package/definitions/models/schema/firemapper-auth.d.ts +11 -2
- package/definitions/models/schema/firemapper-auth.d.ts.map +1 -1
- package/definitions/test/mock.d.ts +2 -13
- package/definitions/test/mock.d.ts.map +1 -1
- package/definitions/types/department.d.ts +4 -4
- package/definitions/types/department.d.ts.map +1 -1
- package/definitions/types/firemapper-auth.d.ts +6 -0
- package/definitions/types/firemapper-auth.d.ts.map +1 -1
- package/definitions/types/incident-events.d.ts +1 -1
- package/definitions/types/incident-events.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/models/department.ts +15 -1
- package/src/models/esri.ts +4 -2
- package/src/models/incident-notified.ts +5 -4
- package/src/models/schema/firemapper-auth.ts +50 -5
- package/src/test/department.ts +77 -52
- package/src/test/incident-notified.ts +1 -1
- package/src/test/mock.ts +104 -67
- package/src/types/department.ts +4 -4
- package/src/types/firemapper-auth.ts +10 -0
- package/src/types/incident-events.ts +1 -1
package/src/test/mock.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { CADIncident } from "../models/cad-incident";
|
|
|
13
13
|
import { Department } from "../models/department";
|
|
14
14
|
import { GlobalSettingsType } from "../types/global-settings";
|
|
15
15
|
import { IncidentFilter } from "models/incident-filter";
|
|
16
|
+
import { IncidentNotified } from "../models/incident-notified";
|
|
16
17
|
import { Location } from "../models/location";
|
|
17
18
|
import { ManagedIncident } from "../models/managed-incident";
|
|
18
19
|
import { SAML } from "../models/saml";
|
|
@@ -699,7 +700,8 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
|
|
|
699
700
|
|
|
700
701
|
const department: Partial<Department> = {
|
|
701
702
|
_id: new mongoose.Types.ObjectId(),
|
|
702
|
-
|
|
703
|
+
accountType: "production",
|
|
704
|
+
active: true,
|
|
703
705
|
addressDetails: {
|
|
704
706
|
city: "San Francisco",
|
|
705
707
|
address: "",
|
|
@@ -707,50 +709,86 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
|
|
|
707
709
|
zipCode: "",
|
|
708
710
|
country: "",
|
|
709
711
|
},
|
|
710
|
-
active: true,
|
|
711
|
-
apikey: "abcd",
|
|
712
|
-
partialApiKey: "ab",
|
|
713
|
-
personnelStaffingEnabled: true,
|
|
714
|
-
rtsEnabled: true,
|
|
715
|
-
rtsChannelPrefix: "CH_TEST",
|
|
716
|
-
pubNubV3: {
|
|
717
|
-
token: "CH_AUTH_TOKEN",
|
|
718
|
-
expireAt: new Date("2021-09-10T23:25:02.196Z"),
|
|
719
|
-
runAt: new Date("2021-09-10T08:25:02.196Z"),
|
|
720
|
-
env: "qa",
|
|
721
|
-
},
|
|
722
712
|
agencyIds: [
|
|
723
713
|
new mongoose.Types.ObjectId(agency._id)
|
|
724
714
|
],
|
|
725
|
-
|
|
726
|
-
incidentTypes: [{
|
|
727
|
-
name: "Type",
|
|
728
|
-
value: "type",
|
|
729
|
-
allowPartialMatch: true,
|
|
730
|
-
callTypeDescription: [],
|
|
731
|
-
callType: [],
|
|
732
|
-
}],
|
|
733
|
-
shareLocationPhones: false,
|
|
734
|
-
shareLocationTablets: true,
|
|
715
|
+
apikey: "abcd",
|
|
735
716
|
cadOneWayVehiclesEnabled: false,
|
|
736
|
-
|
|
737
|
-
shareAVL: {
|
|
717
|
+
callerLocation: {
|
|
738
718
|
enabled: true,
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
719
|
+
resolvers: [
|
|
720
|
+
{
|
|
721
|
+
type: AccountCallerType.Dummy,
|
|
722
|
+
opts: {},
|
|
723
|
+
}
|
|
724
|
+
]
|
|
725
|
+
},
|
|
726
|
+
customButtons: [
|
|
727
|
+
{
|
|
728
|
+
name: "Button Custom",
|
|
729
|
+
url: "",
|
|
730
|
+
order: 1,
|
|
731
|
+
allowExternal: false,
|
|
732
|
+
defaultExternal: false,
|
|
733
|
+
allowFloating: false,
|
|
734
|
+
color: {
|
|
735
|
+
background: "#512e5f",
|
|
736
|
+
text: "#F8F9F9"
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
],
|
|
740
|
+
department: "Test Department",
|
|
741
|
+
externalNotificationsEnabled: true,
|
|
742
|
+
fireMapper: {
|
|
743
|
+
enabled: true,
|
|
744
|
+
auth: {
|
|
745
|
+
username: "fm-user",
|
|
746
|
+
apiKeyManagement: {
|
|
747
|
+
iv: "iv-mgm",
|
|
748
|
+
encryptedData: "encrypted-nt",
|
|
749
|
+
},
|
|
750
|
+
apiKeyReadOnly: {
|
|
751
|
+
iv: "iv-read-only",
|
|
752
|
+
encryptedData: "encrypted-read-only",
|
|
753
|
+
},
|
|
754
|
+
licenseCode: {
|
|
755
|
+
iv: "iv-license",
|
|
756
|
+
encryptedData: "encrypted-license",
|
|
757
|
+
},
|
|
758
|
+
},
|
|
759
|
+
host: "",
|
|
760
|
+
layer: [
|
|
761
|
+
{
|
|
762
|
+
pathname: "/a/b/c",
|
|
763
|
+
name: "abc",
|
|
764
|
+
},
|
|
765
|
+
],
|
|
766
|
+
layerRefreshInterval: 10,
|
|
767
|
+
proLicenseCount: 20,
|
|
768
|
+
staticLayer: [
|
|
769
|
+
{
|
|
770
|
+
uuid: "u1",
|
|
771
|
+
layer: [
|
|
772
|
+
{
|
|
773
|
+
name: "sa",
|
|
774
|
+
pathname: "s/a/b",
|
|
775
|
+
}
|
|
776
|
+
]
|
|
777
|
+
}
|
|
778
|
+
],
|
|
742
779
|
},
|
|
743
|
-
accountType: "production",
|
|
744
|
-
timeZone: "America/Los_Angeles",
|
|
745
780
|
firstArrivingEnabled: true,
|
|
746
781
|
firstArriving: {
|
|
747
782
|
token: "123",
|
|
748
783
|
apiUrl: "",
|
|
749
784
|
},
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
785
|
+
incidentTypes: [{
|
|
786
|
+
name: "Type",
|
|
787
|
+
value: "type",
|
|
788
|
+
allowPartialMatch: true,
|
|
789
|
+
callTypeDescription: [],
|
|
790
|
+
callType: [],
|
|
791
|
+
}],
|
|
754
792
|
licensing: {
|
|
755
793
|
tcPro2Way: 0,
|
|
756
794
|
tcPro1Way: 0,
|
|
@@ -760,16 +798,21 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
|
|
|
760
798
|
sendToCAD: 0,
|
|
761
799
|
tcStreams: 0,
|
|
762
800
|
},
|
|
763
|
-
|
|
764
|
-
message: "test",
|
|
765
|
-
enabled: true
|
|
766
|
-
},
|
|
801
|
+
mowsEnabled: true,
|
|
767
802
|
notificationEmails: ["test@test.com"],
|
|
768
|
-
externalNotificationsEnabled: true,
|
|
769
803
|
orientationMarkerColor: {
|
|
770
804
|
text: "a",
|
|
771
805
|
background: "b",
|
|
772
806
|
},
|
|
807
|
+
partialApiKey: "ab",
|
|
808
|
+
personnelStaffingEnabled: true,
|
|
809
|
+
pubNubV3: {
|
|
810
|
+
token: "CH_AUTH_TOKEN",
|
|
811
|
+
expireAt: new Date("2021-09-10T23:25:02.196Z"),
|
|
812
|
+
runAt: new Date("2021-09-10T08:25:02.196Z"),
|
|
813
|
+
env: "qa",
|
|
814
|
+
},
|
|
815
|
+
reportNumberEnabled: true,
|
|
773
816
|
restrictedComments: {
|
|
774
817
|
enabled: false,
|
|
775
818
|
callTypesAllowed: [],
|
|
@@ -777,35 +820,31 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
|
|
|
777
820
|
restrictedFields: [],
|
|
778
821
|
restrictedMessage: "Restricted Message"
|
|
779
822
|
},
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
name: "Button Custom",
|
|
783
|
-
url: "",
|
|
784
|
-
order: 1,
|
|
785
|
-
allowExternal: false,
|
|
786
|
-
defaultExternal: false,
|
|
787
|
-
allowFloating: false,
|
|
788
|
-
color: {
|
|
789
|
-
background: "#512e5f",
|
|
790
|
-
text: "#F8F9F9"
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
],
|
|
794
|
-
reportNumberEnabled: true,
|
|
823
|
+
rtsEnabled: true,
|
|
824
|
+
rtsChannelPrefix: "CH_TEST",
|
|
795
825
|
samsara: {
|
|
796
826
|
enabled: false,
|
|
797
827
|
token: "",
|
|
798
828
|
},
|
|
799
|
-
|
|
800
|
-
callerLocation: {
|
|
829
|
+
shareAVL: {
|
|
801
830
|
enabled: true,
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
831
|
+
opAreaCode: "DAL",
|
|
832
|
+
opAreaName: "Delta Operations",
|
|
833
|
+
fadeZoomLevel: 1,
|
|
834
|
+
},
|
|
835
|
+
shareLocationPhones: false,
|
|
836
|
+
shareLocationTablets: true,
|
|
837
|
+
signupKey: "A1B2",
|
|
838
|
+
simpleSenseEnabled: true,
|
|
839
|
+
simpleSense: {
|
|
840
|
+
token: "123"
|
|
841
|
+
},
|
|
842
|
+
reportOdometer: "status",
|
|
843
|
+
timeZone: "America/Los_Angeles",
|
|
844
|
+
webDisclaimer: {
|
|
845
|
+
message: "test",
|
|
846
|
+
enabled: true
|
|
847
|
+
},
|
|
809
848
|
};
|
|
810
849
|
|
|
811
850
|
const esriMap = {
|
|
@@ -1030,16 +1069,14 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
|
|
|
1030
1069
|
request_time: 1442888560
|
|
1031
1070
|
};
|
|
1032
1071
|
|
|
1033
|
-
const incidentNotified = {
|
|
1072
|
+
const incidentNotified: Partial<IncidentNotified> = {
|
|
1034
1073
|
_id: new mongoose.Types.ObjectId(),
|
|
1035
1074
|
departmentId: "d123",
|
|
1075
|
+
sourceDepartmentId: "d321",
|
|
1036
1076
|
IncidentNumber: "T-1536603902",
|
|
1037
1077
|
incidentTypes: [
|
|
1038
1078
|
"any"
|
|
1039
1079
|
],
|
|
1040
|
-
units: [
|
|
1041
|
-
"E31"
|
|
1042
|
-
],
|
|
1043
1080
|
unitsByDispatch: [
|
|
1044
1081
|
{
|
|
1045
1082
|
UnitID: "E31",
|
package/src/types/department.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Types } from "mongoose";
|
|
2
2
|
import { ColorSchemaType } from "./color";
|
|
3
|
-
import {
|
|
3
|
+
import { FireMapperAuthV2Type } from "./firemapper-auth";
|
|
4
4
|
import { PubNubTokenSchemaType } from "./pubnub-token";
|
|
5
5
|
import {
|
|
6
6
|
AccountCallerType,
|
|
@@ -310,12 +310,12 @@ export interface USFTConfigurationType {
|
|
|
310
310
|
|
|
311
311
|
export interface FireMapperConfigurationType {
|
|
312
312
|
enabled: boolean,
|
|
313
|
-
|
|
314
|
-
proLicenseCount: number,
|
|
313
|
+
auth: FireMapperAuthV2Type,
|
|
315
314
|
host: string,
|
|
316
315
|
layer: FireMapperLayerType[],
|
|
316
|
+
layerRefreshInterval: number,
|
|
317
|
+
proLicenseCount: number,
|
|
317
318
|
staticLayer: FireMapperOutlineType[],
|
|
318
|
-
auth: FireMapperAuthType,
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
export interface LicensingType {
|
|
@@ -5,3 +5,13 @@ export interface FireMapperAuthType {
|
|
|
5
5
|
encrypted: EncryptedDataType,
|
|
6
6
|
encryptedAccessCode: EncryptedDataType,
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
export interface FireMapperAuthV2Type {
|
|
10
|
+
username: string,
|
|
11
|
+
// used by backend to create FM incidents
|
|
12
|
+
apiKeyManagement: EncryptedDataType | undefined,
|
|
13
|
+
// used by the iOS maps, and backend to check if map is active
|
|
14
|
+
apiKeyReadOnly: EncryptedDataType | undefined,
|
|
15
|
+
// used by the iOS link to
|
|
16
|
+
licenseCode: EncryptedDataType | undefined,
|
|
17
|
+
}
|
|
@@ -43,9 +43,9 @@ export interface UnitType {
|
|
|
43
43
|
export interface IncidentNotifiedType {
|
|
44
44
|
_id: Types.ObjectId,
|
|
45
45
|
departmentId: string,
|
|
46
|
+
sourceDepartmentId: string,
|
|
46
47
|
IncidentNumber: string,
|
|
47
48
|
incidentTypes: string[],
|
|
48
|
-
units: string[],
|
|
49
49
|
unitsByDispatch: UnitType[],
|
|
50
50
|
sent: SentItemType[],
|
|
51
51
|
updated: Date,
|