tabletcommand-backend-models 7.2.21 → 7.2.22

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.
@@ -36,33 +36,33 @@ function CallerSchema(mongoose) {
36
36
  const { Schema } = mongoose;
37
37
  const Item = new Schema({
38
38
  // Should match
39
- callerId: {
39
+ CallerId: {
40
40
  type: String,
41
41
  default: "",
42
42
  },
43
- latitude: {
43
+ Latitude: {
44
44
  type: Number,
45
45
  },
46
- longitude: {
46
+ Longitude: {
47
47
  type: Number,
48
48
  },
49
- locationUpdatedAt: {
49
+ LocationUpdatedAt: {
50
50
  type: Date,
51
51
  },
52
52
  // Somewhat optional
53
- altitude: {
53
+ Altitude: {
54
54
  type: Number,
55
55
  },
56
- application: {
56
+ Application: {
57
57
  type: String,
58
58
  },
59
- source: {
59
+ Source: {
60
60
  type: String,
61
61
  },
62
- address: {
62
+ Address: {
63
63
  type: String,
64
64
  },
65
- uncertaintyRadius: {
65
+ UncertaintyRadius: {
66
66
  type: Number,
67
67
  },
68
68
  }, {
@@ -146,15 +146,15 @@ describe("CADIncident", function () {
146
146
  chai_1.assert.equal(sut.callers.length, 1);
147
147
  const caller1 = sut.callers.find(() => { return true; });
148
148
  chai_1.assert.isObject(caller1);
149
- chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.callerId, "(123) 456-789");
150
- chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.latitude, 1.23);
151
- chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.longitude, -4.56);
152
- chai_1.assert.equal((_x = caller1 === null || caller1 === void 0 ? void 0 : caller1.locationUpdatedAt) === null || _x === void 0 ? void 0 : _x.toISOString(), "2023-09-20T09:14:37.000Z");
153
- chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.altitude, 123);
154
- chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.application, "ABC");
155
- chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.source, "DEF");
156
- chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.address, "Main St");
157
- chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.uncertaintyRadius, 400);
149
+ chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.CallerId, "(123) 456-789");
150
+ chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.Latitude, 1.23);
151
+ chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.Longitude, -4.56);
152
+ chai_1.assert.equal((_x = caller1 === null || caller1 === void 0 ? void 0 : caller1.LocationUpdatedAt) === null || _x === void 0 ? void 0 : _x.toISOString(), "2023-09-20T09:14:37.000Z");
153
+ chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.Altitude, 123);
154
+ chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.Application, "ABC");
155
+ chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.Source, "DEF");
156
+ chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.Address, "Main St");
157
+ chai_1.assert.equal(caller1 === null || caller1 === void 0 ? void 0 : caller1.UncertaintyRadius, 400);
158
158
  });
159
159
  it("no virtuals id if _id not present", async function () {
160
160
  var _a, _b;
@@ -492,15 +492,15 @@ function mockModule(dependencies) {
492
492
  ],
493
493
  callers: [
494
494
  {
495
- callerId: "(123) 456-789",
496
- latitude: 1.23,
497
- longitude: -4.56,
498
- altitude: 123,
499
- application: "ABC",
500
- source: "DEF",
501
- locationUpdatedAt: new Date("2023-09-20T09:14:37Z"),
502
- address: "Main St",
503
- uncertaintyRadius: 400,
495
+ CallerId: "(123) 456-789",
496
+ Latitude: 1.23,
497
+ Longitude: -4.56,
498
+ Altitude: 123,
499
+ Application: "ABC",
500
+ Source: "DEF",
501
+ LocationUpdatedAt: new Date("2023-09-20T09:14:37Z"),
502
+ Address: "Main St",
503
+ UncertaintyRadius: 400,
504
504
  }
505
505
  ],
506
506
  };
@@ -269,15 +269,15 @@ export default function mockModule(dependencies: {
269
269
  startAt: Date;
270
270
  }[];
271
271
  callers: {
272
- callerId: string;
273
- latitude: number;
274
- longitude: number;
275
- altitude: number;
276
- application: string;
277
- source: string;
278
- locationUpdatedAt: Date;
279
- address: string;
280
- uncertaintyRadius: number;
272
+ CallerId: string;
273
+ Latitude: number;
274
+ Longitude: number;
275
+ Altitude: number;
276
+ Application: string;
277
+ Source: string;
278
+ LocationUpdatedAt: Date;
279
+ Address: string;
280
+ UncertaintyRadius: number;
281
281
  }[];
282
282
  };
283
283
  cadIncidentBlock: {
@@ -6,15 +6,15 @@ export interface CADPersonSchemaType {
6
6
  PersonnelNote: string;
7
7
  }
8
8
  export interface CallerType {
9
- callerId: string;
10
- latitude: number;
11
- longitude: number;
12
- altitude: number;
13
- application: string;
14
- source: string;
15
- locationUpdatedAt: Date;
16
- address: string;
17
- uncertaintyRadius: number;
9
+ CallerId: string;
10
+ Latitude: number;
11
+ Longitude: number;
12
+ Altitude: number;
13
+ Application: string;
14
+ Source: string;
15
+ LocationUpdatedAt: Date;
16
+ Address: string;
17
+ UncertaintyRadius: number;
18
18
  }
19
19
  export interface RadioChannelSchemaType extends Record<string, unknown> {
20
20
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"common-incident.d.ts","sourceRoot":"","sources":["../../src/types/common-incident.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,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AM,WAAW,sBAAuB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,qBAAqB,EAAE,CAAA;CACjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabletcommand-backend-models",
3
- "version": "7.2.21",
3
+ "version": "7.2.22",
4
4
  "description": "Tablet Command Backend Models",
5
5
  "scripts": {
6
6
  "build": "gulp build",
@@ -51,34 +51,34 @@ export function CallerSchema(mongoose: MongooseModule) {
51
51
 
52
52
  const Item = new Schema<CallerType>({
53
53
  // Should match
54
- callerId: {
54
+ CallerId: {
55
55
  type: String,
56
56
  default: "",
57
57
  },
58
- latitude: {
58
+ Latitude: {
59
59
  type: Number,
60
60
  },
61
- longitude: {
61
+ Longitude: {
62
62
  type: Number,
63
63
  },
64
- locationUpdatedAt: {
64
+ LocationUpdatedAt: {
65
65
  type: Date,
66
66
  },
67
67
 
68
68
  // Somewhat optional
69
- altitude: {
69
+ Altitude: {
70
70
  type: Number,
71
71
  },
72
- application: {
72
+ Application: {
73
73
  type: String,
74
74
  },
75
- source: {
75
+ Source: {
76
76
  type: String,
77
77
  },
78
- address: {
78
+ Address: {
79
79
  type: String,
80
80
  },
81
- uncertaintyRadius: {
81
+ UncertaintyRadius: {
82
82
  type: Number,
83
83
  },
84
84
  }, {
@@ -155,15 +155,15 @@ describe("CADIncident", function() {
155
155
  assert.equal(sut.callers.length, 1);
156
156
  const caller1 = sut.callers.find(() => { return true; });
157
157
  assert.isObject(caller1);
158
- assert.equal(caller1?.callerId, "(123) 456-789");
159
- assert.equal(caller1?.latitude, 1.23);
160
- assert.equal(caller1?.longitude, -4.56);
161
- assert.equal(caller1?.locationUpdatedAt?.toISOString(), "2023-09-20T09:14:37.000Z");
162
- assert.equal(caller1?.altitude, 123);
163
- assert.equal(caller1?.application, "ABC");
164
- assert.equal(caller1?.source, "DEF");
165
- assert.equal(caller1?.address, "Main St");
166
- assert.equal(caller1?.uncertaintyRadius, 400);
158
+ assert.equal(caller1?.CallerId, "(123) 456-789");
159
+ assert.equal(caller1?.Latitude, 1.23);
160
+ assert.equal(caller1?.Longitude, -4.56);
161
+ assert.equal(caller1?.LocationUpdatedAt?.toISOString(), "2023-09-20T09:14:37.000Z");
162
+ assert.equal(caller1?.Altitude, 123);
163
+ assert.equal(caller1?.Application, "ABC");
164
+ assert.equal(caller1?.Source, "DEF");
165
+ assert.equal(caller1?.Address, "Main St");
166
+ assert.equal(caller1?.UncertaintyRadius, 400);
167
167
  });
168
168
 
169
169
  it("no virtuals id if _id not present", async function() {
package/src/test/mock.ts CHANGED
@@ -527,15 +527,15 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
527
527
  ],
528
528
  callers: [
529
529
  {
530
- callerId: "(123) 456-789",
531
- latitude: 1.23,
532
- longitude: -4.56,
533
- altitude: 123,
534
- application: "ABC",
535
- source: "DEF",
536
- locationUpdatedAt: new Date("2023-09-20T09:14:37Z"),
537
- address: "Main St",
538
- uncertaintyRadius: 400,
530
+ CallerId: "(123) 456-789",
531
+ Latitude: 1.23,
532
+ Longitude: -4.56,
533
+ Altitude: 123,
534
+ Application: "ABC",
535
+ Source: "DEF",
536
+ LocationUpdatedAt: new Date("2023-09-20T09:14:37Z"),
537
+ Address: "Main St",
538
+ UncertaintyRadius: 400,
539
539
  }
540
540
  ],
541
541
  };
@@ -6,17 +6,19 @@ export interface CADPersonSchemaType {
6
6
  PersonnelNote: string,
7
7
  }
8
8
 
9
+ // Data possibly sent by CAD,
10
+ // using same Capitalization
9
11
  export interface CallerType {
10
- callerId: string,
11
- latitude: number,
12
- longitude: number,
13
- altitude: number, // meters
14
-
15
- application: string,
16
- source: string,
17
- locationUpdatedAt: Date, // UTC
18
- address: string,
19
- uncertaintyRadius: number, // meters
12
+ CallerId: string,
13
+ Latitude: number,
14
+ Longitude: number,
15
+ Altitude: number, // meters
16
+
17
+ Application: string,
18
+ Source: string,
19
+ LocationUpdatedAt: Date, // UTC
20
+ Address: string,
21
+ UncertaintyRadius: number, // meters
20
22
  }
21
23
 
22
24
  export interface RadioChannelSchemaType extends Record<string, unknown> {