tabletcommand-backend-models 7.4.108 → 7.4.110

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 (37) hide show
  1. package/build/constants.js +1 -1
  2. package/build/constants.js.map +1 -1
  3. package/build/models/department.js +12 -0
  4. package/build/models/department.js.map +1 -1
  5. package/build/models/location.js +18 -1
  6. package/build/models/location.js.map +1 -1
  7. package/build/models/managed-incident.js +6 -0
  8. package/build/models/managed-incident.js.map +1 -1
  9. package/build/test/department.js +15 -0
  10. package/build/test/department.js.map +1 -1
  11. package/build/test/mock.js +5 -0
  12. package/build/test/mock.js.map +1 -1
  13. package/definitions/constants.d.ts +1 -1
  14. package/definitions/constants.d.ts.map +1 -1
  15. package/definitions/models/department.d.ts +1 -0
  16. package/definitions/models/department.d.ts.map +1 -1
  17. package/definitions/models/location.d.ts.map +1 -1
  18. package/definitions/models/managed-incident.d.ts.map +1 -1
  19. package/definitions/test/mock.d.ts.map +1 -1
  20. package/definitions/types/department.d.ts +2 -0
  21. package/definitions/types/department.d.ts.map +1 -1
  22. package/definitions/types/location.d.ts +2 -0
  23. package/definitions/types/location.d.ts.map +1 -1
  24. package/definitions/types/managed-incident.d.ts +2 -0
  25. package/definitions/types/managed-incident.d.ts.map +1 -1
  26. package/gulpfile.ts +25 -0
  27. package/package.json +17 -14
  28. package/src/constants.ts +1 -1
  29. package/src/models/department.ts +12 -0
  30. package/src/models/location.ts +21 -2
  31. package/src/models/managed-incident.ts +6 -0
  32. package/src/test/department.ts +18 -0
  33. package/src/test/mock.ts +5 -0
  34. package/src/types/department.ts +4 -0
  35. package/src/types/location.ts +2 -0
  36. package/src/types/managed-incident.ts +2 -0
  37. package/gulpfile.js +0 -24
package/src/test/mock.ts CHANGED
@@ -834,12 +834,17 @@ export default function mockModule(dependencies: { mongoose: Mongoose; }) {
834
834
  samsara: {
835
835
  enabled: false,
836
836
  token: "",
837
+ tagIds: [],
837
838
  },
838
839
  shareAVL: {
839
840
  enabled: true,
840
841
  opAreaCode: "DAL",
841
842
  opAreaName: "Delta Operations",
842
843
  fadeZoomLevel: 1,
844
+ area: {
845
+ type: "Polygon",
846
+ coordinates: [],
847
+ },
843
848
  },
844
849
  shareLocationPhones: false,
845
850
  shareLocationTablets: true,
@@ -327,6 +327,7 @@ export interface FireMapperOutlineType {
327
327
  export interface SamsaraConfigurationType {
328
328
  enabled: boolean,
329
329
  token: string,
330
+ tagIds: string[],
330
331
  }
331
332
 
332
333
  export interface USFTConfigurationType {
@@ -536,6 +537,9 @@ export type AccountConfigurationShareAVL = {
536
537
  opAreaName: string,
537
538
  opAreaCode: string,
538
539
  fadeZoomLevel: number,
540
+ // When sharing location, only view what's in this area
541
+ // GeoPolygon should already support multiple area (rings)
542
+ area: GeoPolygon,
539
543
  };
540
544
 
541
545
  export type AccountConfigurationShareIncident = {
@@ -1,6 +1,7 @@
1
1
  import { Types } from "mongoose";
2
2
  import { ColorSchemaType } from "./color";
3
3
  import { GeoPoint } from "./geojson";
4
+ import { AccountIndustry } from "../constants";
4
5
 
5
6
  export interface LocationType {
6
7
  _id: Types.ObjectId,
@@ -16,6 +17,7 @@ export interface LocationType {
16
17
  device_type: string,
17
18
  esriId: number,
18
19
  heading: number,
20
+ industry: AccountIndustry,
19
21
  kindType: string,
20
22
  kind?: string,
21
23
  type?: string,
@@ -9,6 +9,7 @@ import {
9
9
  SharedSourceSchemaType,
10
10
  SharedToSchemaType,
11
11
  } from "./common-incident";
12
+ import { GeoPoint } from "./geojson";
12
13
 
13
14
  export interface HistoryItemType extends Record<string, unknown> {
14
15
  entity_id: string,
@@ -135,6 +136,7 @@ export interface ManagedIncidentType {
135
136
  channel: string,
136
137
  channel_owner: string,
137
138
  checklists: IncidentChecklistType[]
139
+ coordinate?: GeoPoint, // Set only if coordinate is valid, not 0,0 and inside bounds
138
140
  cross_streets: string,
139
141
  departmentId: string,
140
142
  deviceTime: string,
package/gulpfile.js DELETED
@@ -1,24 +0,0 @@
1
- const gulp = require("gulp");
2
- const exec = require("gulp-execa");
3
- const { deleteAsync } = require("del");
4
-
5
- gulp.task("clean", function cleanTask() {
6
- return deleteAsync([
7
- "build/**",
8
- "definitions/**",
9
- ], {
10
- force: true
11
- });
12
- });
13
-
14
- gulp.task("build", gulp.series("clean", exec.task("tsc -p src")));
15
-
16
- gulp.task("lint", exec.task("eslint src"));
17
-
18
- gulp.task("test", exec.task("tsx --test --test-concurrency=1 --test-reporter=spec src/test/*.ts"));
19
-
20
- gulp.task("spell", exec.task("cspell --no-progress"));
21
-
22
- gulp.task("type-coverage", exec.task("type-coverage --detail"));
23
-
24
- gulp.task("default", gulp.series("spell", "type-coverage", "lint", "build", "test"));