tabletcommand-backend-models 7.3.16 → 7.3.17
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/constants.js +10 -10
- package/build/index.js +2 -2
- package/build/models/schema/common-incident.js +1 -1
- package/build/test/mock.js +4 -4
- package/definitions/constants.d.ts +1 -1
- package/definitions/index.d.ts +2 -2
- package/definitions/types/common-incident.d.ts +2 -2
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/index.ts +2 -2
- package/src/models/schema/common-incident.ts +2 -2
- package/src/test/mock.ts +5 -5
- package/src/types/common-incident.ts +2 -2
package/build/constants.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.ShareIncidentRuleKind = exports.AccountCallerType = exports.AccountIndustry = exports.LocationVisibility = exports.DepartmentReportOdometer = exports.UserStealthStatus = exports.LocationKindType = exports.LocationSource = void 0;
|
4
4
|
var LocationSource;
|
5
5
|
(function (LocationSource) {
|
6
6
|
LocationSource["CAD"] = "CAD";
|
@@ -83,14 +83,14 @@ var AccountCallerType;
|
|
83
83
|
(function (AccountCallerType) {
|
84
84
|
AccountCallerType["Dummy"] = "dummy";
|
85
85
|
})(AccountCallerType = exports.AccountCallerType || (exports.AccountCallerType = {}));
|
86
|
-
var
|
87
|
-
(function (
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
86
|
+
var ShareIncidentRuleKind;
|
87
|
+
(function (ShareIncidentRuleKind) {
|
88
|
+
ShareIncidentRuleKind["Always"] = "always";
|
89
|
+
ShareIncidentRuleKind["AssignedUnit"] = "assignedUnit";
|
90
|
+
ShareIncidentRuleKind["Code"] = "code";
|
91
|
+
ShareIncidentRuleKind["IncidentType"] = "incidentType";
|
92
92
|
// Added because we need a marker for when incidentType is no longer shared
|
93
|
-
|
94
|
-
|
95
|
-
})(
|
93
|
+
ShareIncidentRuleKind["IncidentTypeNotShared"] = "incidentTypeNotShared";
|
94
|
+
ShareIncidentRuleKind["None"] = "";
|
95
|
+
})(ShareIncidentRuleKind = exports.ShareIncidentRuleKind || (exports.ShareIncidentRuleKind = {}));
|
96
96
|
//# sourceMappingURL=constants.js.map
|
package/build/index.js
CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
exports.connect = exports.OrientationMarkerColorDefault = exports.ManagedIncidentPriorityDefault = exports.ManagedIncidentModeDefault = exports.UserStealthStatus = exports.
|
17
|
+
exports.connect = exports.OrientationMarkerColorDefault = exports.ManagedIncidentPriorityDefault = exports.ManagedIncidentModeDefault = exports.UserStealthStatus = exports.ShareIncidentRuleKind = exports.LocationVisibility = exports.LocationSource = exports.LocationKindType = exports.DepartmentReportOdometer = exports.AccountIndustry = exports.AccountCallerType = void 0;
|
18
18
|
const _ = require("lodash");
|
19
19
|
const constants_1 = require("./constants");
|
20
20
|
Object.defineProperty(exports, "AccountCallerType", { enumerable: true, get: function () { return constants_1.AccountCallerType; } });
|
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "DepartmentReportOdometer", { enumerable: true, g
|
|
23
23
|
Object.defineProperty(exports, "LocationKindType", { enumerable: true, get: function () { return constants_1.LocationKindType; } });
|
24
24
|
Object.defineProperty(exports, "LocationSource", { enumerable: true, get: function () { return constants_1.LocationSource; } });
|
25
25
|
Object.defineProperty(exports, "LocationVisibility", { enumerable: true, get: function () { return constants_1.LocationVisibility; } });
|
26
|
-
Object.defineProperty(exports, "
|
26
|
+
Object.defineProperty(exports, "ShareIncidentRuleKind", { enumerable: true, get: function () { return constants_1.ShareIncidentRuleKind; } });
|
27
27
|
Object.defineProperty(exports, "UserStealthStatus", { enumerable: true, get: function () { return constants_1.UserStealthStatus; } });
|
28
28
|
async function wireModels(mongoose) {
|
29
29
|
async function getModel(m) {
|
package/build/test/mock.js
CHANGED
@@ -472,7 +472,7 @@ function mockModule(dependencies) {
|
|
472
472
|
{
|
473
473
|
date: new Date("2024-05-03T00:00:00.000Z"),
|
474
474
|
name: "Unit B10 assigned",
|
475
|
-
ruleType: constants_1.
|
475
|
+
ruleType: constants_1.ShareIncidentRuleKind.AssignedUnit,
|
476
476
|
}
|
477
477
|
]
|
478
478
|
},
|
@@ -488,7 +488,7 @@ function mockModule(dependencies) {
|
|
488
488
|
{
|
489
489
|
date: new Date("2024-05-03T01:01:01.010Z"),
|
490
490
|
name: "Unit M10 assigned",
|
491
|
-
ruleType: constants_1.
|
491
|
+
ruleType: constants_1.ShareIncidentRuleKind.AssignedUnit,
|
492
492
|
}
|
493
493
|
],
|
494
494
|
startAt: new Date("2024-05-01T01:02:03.040Z"),
|
@@ -1094,7 +1094,7 @@ function mockModule(dependencies) {
|
|
1094
1094
|
{
|
1095
1095
|
date: new Date("2024-05-03T00:00:00.000Z"),
|
1096
1096
|
name: "Unit B10 assigned",
|
1097
|
-
ruleType: constants_1.
|
1097
|
+
ruleType: constants_1.ShareIncidentRuleKind.AssignedUnit,
|
1098
1098
|
}
|
1099
1099
|
]
|
1100
1100
|
},
|
@@ -1110,7 +1110,7 @@ function mockModule(dependencies) {
|
|
1110
1110
|
{
|
1111
1111
|
date: new Date("2024-05-03T01:01:01.010Z"),
|
1112
1112
|
name: "Unit M10 assigned",
|
1113
|
-
ruleType: constants_1.
|
1113
|
+
ruleType: constants_1.ShareIncidentRuleKind.AssignedUnit,
|
1114
1114
|
}
|
1115
1115
|
],
|
1116
1116
|
startAt: new Date("2024-05-01T01:02:03.040Z"),
|
@@ -45,7 +45,7 @@ export declare enum AccountIndustry {
|
|
45
45
|
export declare enum AccountCallerType {
|
46
46
|
Dummy = "dummy"
|
47
47
|
}
|
48
|
-
export declare enum
|
48
|
+
export declare enum ShareIncidentRuleKind {
|
49
49
|
Always = "always",
|
50
50
|
AssignedUnit = "assignedUnit",
|
51
51
|
Code = "code",
|
package/definitions/index.d.ts
CHANGED
@@ -24,8 +24,8 @@
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
25
25
|
import { ConnectOptions } from "mongoose";
|
26
26
|
import { MongooseModule } from "./helpers";
|
27
|
-
import { AccountCallerType, AccountIndustry, DepartmentReportOdometer, LocationKindType, LocationSource, LocationVisibility,
|
28
|
-
export { AccountCallerType, AccountIndustry, DepartmentReportOdometer, LocationKindType, LocationSource, LocationVisibility,
|
27
|
+
import { AccountCallerType, AccountIndustry, DepartmentReportOdometer, LocationKindType, LocationSource, LocationVisibility, ShareIncidentRuleKind, UserStealthStatus } from "./constants";
|
28
|
+
export { AccountCallerType, AccountIndustry, DepartmentReportOdometer, LocationKindType, LocationSource, LocationVisibility, ShareIncidentRuleKind, UserStealthStatus, };
|
29
29
|
export { ActionLog, ActionLogModel } from "./models/action-log";
|
30
30
|
export { Agency, AgencyModel } from "./models/agency";
|
31
31
|
export { ArcGISGroup, ArcGISGroupModel } from "./models/arcgis-group";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ShareIncidentRuleKind } from "../constants";
|
2
2
|
export interface CADPersonSchemaType {
|
3
3
|
PersonnelID: string;
|
4
4
|
PersonnelName: string;
|
@@ -34,7 +34,7 @@ export interface ReportNumberSchemaType {
|
|
34
34
|
export interface ShareReasonSchemaType {
|
35
35
|
name: string;
|
36
36
|
date: Date;
|
37
|
-
ruleType:
|
37
|
+
ruleType: ShareIncidentRuleKind;
|
38
38
|
}
|
39
39
|
export interface SharedToSchemaType extends Record<string, unknown> {
|
40
40
|
departmentId: string;
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/index.ts
CHANGED
@@ -8,7 +8,7 @@ import {
|
|
8
8
|
LocationKindType,
|
9
9
|
LocationSource,
|
10
10
|
LocationVisibility,
|
11
|
-
|
11
|
+
ShareIncidentRuleKind,
|
12
12
|
UserStealthStatus,
|
13
13
|
} from "./constants";
|
14
14
|
|
@@ -19,7 +19,7 @@ export {
|
|
19
19
|
LocationKindType,
|
20
20
|
LocationSource,
|
21
21
|
LocationVisibility,
|
22
|
-
|
22
|
+
ShareIncidentRuleKind,
|
23
23
|
UserStealthStatus,
|
24
24
|
};
|
25
25
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ShareIncidentRuleKind } from "../../constants";
|
2
2
|
import {
|
3
3
|
MongooseModule,
|
4
4
|
currentDate,
|
@@ -184,7 +184,7 @@ export function ShareReasonSchema(mongoose: MongooseModule) {
|
|
184
184
|
},
|
185
185
|
ruleType: {
|
186
186
|
type: String,
|
187
|
-
default:
|
187
|
+
default: ShareIncidentRuleKind.None,
|
188
188
|
}
|
189
189
|
}, {
|
190
190
|
_id: false,
|
package/src/test/mock.ts
CHANGED
@@ -2,7 +2,7 @@ import { Mongoose } from "mongoose";
|
|
2
2
|
import * as uuid from "uuid";
|
3
3
|
// import * as _ from "lodash";
|
4
4
|
import { retrieveCurrentUnixTime } from "../helpers";
|
5
|
-
import {
|
5
|
+
import { ShareIncidentRuleKind } from "../constants";
|
6
6
|
import { Department } from "../models/department";
|
7
7
|
|
8
8
|
import {
|
@@ -509,7 +509,7 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
|
|
509
509
|
{
|
510
510
|
date: new Date("2024-05-03T00:00:00.000Z"),
|
511
511
|
name: "Unit B10 assigned",
|
512
|
-
ruleType:
|
512
|
+
ruleType: ShareIncidentRuleKind.AssignedUnit,
|
513
513
|
}
|
514
514
|
]
|
515
515
|
},
|
@@ -525,7 +525,7 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
|
|
525
525
|
{
|
526
526
|
date: new Date("2024-05-03T01:01:01.010Z"),
|
527
527
|
name: "Unit M10 assigned",
|
528
|
-
ruleType:
|
528
|
+
ruleType: ShareIncidentRuleKind.AssignedUnit,
|
529
529
|
}
|
530
530
|
],
|
531
531
|
startAt: new Date("2024-05-01T01:02:03.040Z"),
|
@@ -1149,7 +1149,7 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
|
|
1149
1149
|
{
|
1150
1150
|
date: new Date("2024-05-03T00:00:00.000Z"),
|
1151
1151
|
name: "Unit B10 assigned",
|
1152
|
-
ruleType:
|
1152
|
+
ruleType: ShareIncidentRuleKind.AssignedUnit,
|
1153
1153
|
}
|
1154
1154
|
]
|
1155
1155
|
},
|
@@ -1165,7 +1165,7 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
|
|
1165
1165
|
{
|
1166
1166
|
date: new Date("2024-05-03T01:01:01.010Z"),
|
1167
1167
|
name: "Unit M10 assigned",
|
1168
|
-
ruleType:
|
1168
|
+
ruleType: ShareIncidentRuleKind.AssignedUnit,
|
1169
1169
|
}
|
1170
1170
|
],
|
1171
1171
|
startAt: new Date("2024-05-01T01:02:03.040Z"),
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ShareIncidentRuleKind } from "../constants";
|
2
2
|
|
3
3
|
export interface CADPersonSchemaType {
|
4
4
|
PersonnelID: string,
|
@@ -43,7 +43,7 @@ export interface ReportNumberSchemaType {
|
|
43
43
|
export interface ShareReasonSchemaType {
|
44
44
|
name: string,
|
45
45
|
date: Date,
|
46
|
-
ruleType:
|
46
|
+
ruleType: ShareIncidentRuleKind, // assignedUnit, incidentType, always, code
|
47
47
|
}
|
48
48
|
|
49
49
|
export interface SharedToSchemaType extends Record<string, unknown> {
|