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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShareIncidentRuleType = exports.AccountCallerType = exports.AccountIndustry = exports.LocationVisibility = exports.DepartmentReportOdometer = exports.UserStealthStatus = exports.LocationKindType = exports.LocationSource = void 0;
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 ShareIncidentRuleType;
87
- (function (ShareIncidentRuleType) {
88
- ShareIncidentRuleType["Always"] = "always";
89
- ShareIncidentRuleType["AssignedUnit"] = "assignedUnit";
90
- ShareIncidentRuleType["Code"] = "code";
91
- ShareIncidentRuleType["IncidentType"] = "incidentType";
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
- ShareIncidentRuleType["IncidentTypeNotShared"] = "incidentTypeNotShared";
94
- ShareIncidentRuleType["None"] = "";
95
- })(ShareIncidentRuleType = exports.ShareIncidentRuleType || (exports.ShareIncidentRuleType = {}));
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.ShareIncidentRuleType = exports.LocationVisibility = exports.LocationSource = exports.LocationKindType = exports.DepartmentReportOdometer = exports.AccountIndustry = exports.AccountCallerType = void 0;
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, "ShareIncidentRuleType", { enumerable: true, get: function () { return constants_1.ShareIncidentRuleType; } });
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) {
@@ -160,7 +160,7 @@ function ShareReasonSchema(mongoose) {
160
160
  },
161
161
  ruleType: {
162
162
  type: String,
163
- default: constants_1.ShareIncidentRuleType.None,
163
+ default: constants_1.ShareIncidentRuleKind.None,
164
164
  }
165
165
  }, {
166
166
  _id: false,
@@ -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.ShareIncidentRuleType.AssignedUnit,
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.ShareIncidentRuleType.AssignedUnit,
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.ShareIncidentRuleType.AssignedUnit,
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.ShareIncidentRuleType.AssignedUnit,
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 ShareIncidentRuleType {
48
+ export declare enum ShareIncidentRuleKind {
49
49
  Always = "always",
50
50
  AssignedUnit = "assignedUnit",
51
51
  Code = "code",
@@ -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, ShareIncidentRuleType, UserStealthStatus } from "./constants";
28
- export { AccountCallerType, AccountIndustry, DepartmentReportOdometer, LocationKindType, LocationSource, LocationVisibility, ShareIncidentRuleType, UserStealthStatus, };
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 { ShareIncidentRuleType } from "../constants";
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: ShareIncidentRuleType;
37
+ ruleType: ShareIncidentRuleKind;
38
38
  }
39
39
  export interface SharedToSchemaType extends Record<string, unknown> {
40
40
  departmentId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabletcommand-backend-models",
3
- "version": "7.3.16",
3
+ "version": "7.3.17",
4
4
  "description": "Tablet Command Backend Models",
5
5
  "scripts": {
6
6
  "build": "gulp build",
package/src/constants.ts CHANGED
@@ -81,7 +81,7 @@ export enum AccountCallerType {
81
81
  Dummy = "dummy", // Fake account caller type, used for testing
82
82
  }
83
83
 
84
- export enum ShareIncidentRuleType {
84
+ export enum ShareIncidentRuleKind {
85
85
  Always = "always",
86
86
  AssignedUnit = "assignedUnit",
87
87
  Code = "code",
package/src/index.ts CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  LocationKindType,
9
9
  LocationSource,
10
10
  LocationVisibility,
11
- ShareIncidentRuleType,
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
- ShareIncidentRuleType,
22
+ ShareIncidentRuleKind,
23
23
  UserStealthStatus,
24
24
  };
25
25
 
@@ -1,4 +1,4 @@
1
- import { ShareIncidentRuleType } from "../../constants";
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: ShareIncidentRuleType.None,
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 { ShareIncidentRuleType } from "../constants";
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: ShareIncidentRuleType.AssignedUnit,
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: ShareIncidentRuleType.AssignedUnit,
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: ShareIncidentRuleType.AssignedUnit,
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: ShareIncidentRuleType.AssignedUnit,
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 { ShareIncidentRuleType } from "../constants";
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: ShareIncidentRuleType, // assignedUnit, incidentType, always, code
46
+ ruleType: ShareIncidentRuleKind, // assignedUnit, incidentType, always, code
47
47
  }
48
48
 
49
49
  export interface SharedToSchemaType extends Record<string, unknown> {