grm-shared-library 1.1.240 → 1.1.241
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/dist/cjs/modules/gis/dtos/trip-path-snapshot.dto.js +58 -0
- package/dist/cjs/modules/gis/dtos/trip-path-snapshot.dto.js.map +1 -0
- package/dist/cjs/modules/gis/index.js +2 -0
- package/dist/cjs/modules/gis/index.js.map +1 -1
- package/dist/cjs/modules/gis/interfaces/trip-path-snapshot.js +3 -0
- package/dist/cjs/modules/gis/interfaces/trip-path-snapshot.js.map +1 -0
- package/dist/cjs/modules/safety/constants/safety-history.const.js +75 -0
- package/dist/cjs/modules/safety/constants/safety-history.const.js.map +1 -0
- package/dist/cjs/modules/safety/constants/safety-integration.const.js +4 -0
- package/dist/cjs/modules/safety/constants/safety-integration.const.js.map +1 -1
- package/dist/cjs/modules/safety/dtos/safety-history.dto.js +112 -0
- package/dist/cjs/modules/safety/dtos/safety-history.dto.js.map +1 -0
- package/dist/cjs/modules/safety/enums/safety-history.enums.js +30 -0
- package/dist/cjs/modules/safety/enums/safety-history.enums.js.map +1 -0
- package/dist/cjs/modules/safety/index.js +4 -0
- package/dist/cjs/modules/safety/index.js.map +1 -1
- package/dist/cjs/modules/safety/interfaces/safety-history.js +3 -0
- package/dist/cjs/modules/safety/interfaces/safety-history.js.map +1 -0
- package/dist/esm/modules/gis/dtos/trip-path-snapshot.dto.js +54 -0
- package/dist/esm/modules/gis/dtos/trip-path-snapshot.dto.js.map +1 -0
- package/dist/esm/modules/gis/index.js +2 -0
- package/dist/esm/modules/gis/index.js.map +1 -1
- package/dist/esm/modules/gis/interfaces/trip-path-snapshot.js +2 -0
- package/dist/esm/modules/gis/interfaces/trip-path-snapshot.js.map +1 -0
- package/dist/esm/modules/safety/constants/safety-history.const.js +72 -0
- package/dist/esm/modules/safety/constants/safety-history.const.js.map +1 -0
- package/dist/esm/modules/safety/constants/safety-integration.const.js +4 -0
- package/dist/esm/modules/safety/constants/safety-integration.const.js.map +1 -1
- package/dist/esm/modules/safety/dtos/safety-history.dto.js +107 -0
- package/dist/esm/modules/safety/dtos/safety-history.dto.js.map +1 -0
- package/dist/esm/modules/safety/enums/safety-history.enums.js +27 -0
- package/dist/esm/modules/safety/enums/safety-history.enums.js.map +1 -0
- package/dist/esm/modules/safety/index.js +4 -0
- package/dist/esm/modules/safety/index.js.map +1 -1
- package/dist/esm/modules/safety/interfaces/safety-history.js +2 -0
- package/dist/esm/modules/safety/interfaces/safety-history.js.map +1 -0
- package/dist/types/modules/gis/dtos/trip-path-snapshot.dto.d.ts +18 -0
- package/dist/types/modules/gis/index.d.ts +2 -0
- package/dist/types/modules/gis/interfaces/trip-path-snapshot.d.ts +38 -0
- package/dist/types/modules/safety/constants/safety-history.const.d.ts +31 -0
- package/dist/types/modules/safety/constants/safety-integration.const.d.ts +4 -0
- package/dist/types/modules/safety/dtos/safety-history.dto.d.ts +20 -0
- package/dist/types/modules/safety/enums/safety-history.enums.d.ts +24 -0
- package/dist/types/modules/safety/index.d.ts +4 -0
- package/dist/types/modules/safety/interfaces/safety-history.d.ts +217 -0
- package/package.json +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TripPathSnapshotQueryDto = exports.TRIP_PATH_SNAPSHOT_LIMITS = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
/** Bounds of a path snapshot - small enough for a phone to draw quickly. */
|
|
17
|
+
exports.TRIP_PATH_SNAPSHOT_LIMITS = {
|
|
18
|
+
defaultMaxPoints: 500,
|
|
19
|
+
minMaxPoints: 2,
|
|
20
|
+
maxMaxPoints: 2000,
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* GET /trips/:tripId/path-snapshot (internal, clarion-safety only).
|
|
24
|
+
*
|
|
25
|
+
* `ownerUserId` is the user the caller has already established owns the safety
|
|
26
|
+
* record; clarion-gis refuses the read unless the trip is theirs too, so a
|
|
27
|
+
* mixed-up trip id can never draw somebody else's path.
|
|
28
|
+
*/
|
|
29
|
+
class TripPathSnapshotQueryDto {
|
|
30
|
+
}
|
|
31
|
+
exports.TripPathSnapshotQueryDto = TripPathSnapshotQueryDto;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiProperty)({ description: 'The user the trip must belong to' }),
|
|
34
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
35
|
+
(0, class_validator_1.IsInt)(),
|
|
36
|
+
(0, class_validator_1.IsPositive)(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], TripPathSnapshotQueryDto.prototype, "ownerUserId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Only fixes recorded at or before this instant (ISO 8601)' }),
|
|
41
|
+
(0, class_validator_1.IsDateString)(),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], TripPathSnapshotQueryDto.prototype, "until", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
47
|
+
minimum: exports.TRIP_PATH_SNAPSHOT_LIMITS.minMaxPoints,
|
|
48
|
+
maximum: exports.TRIP_PATH_SNAPSHOT_LIMITS.maxMaxPoints,
|
|
49
|
+
default: exports.TRIP_PATH_SNAPSHOT_LIMITS.defaultMaxPoints,
|
|
50
|
+
}),
|
|
51
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
52
|
+
(0, class_validator_1.IsInt)(),
|
|
53
|
+
(0, class_validator_1.Min)(exports.TRIP_PATH_SNAPSHOT_LIMITS.minMaxPoints),
|
|
54
|
+
(0, class_validator_1.Max)(exports.TRIP_PATH_SNAPSHOT_LIMITS.maxMaxPoints),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], TripPathSnapshotQueryDto.prototype, "maxPoints", void 0);
|
|
58
|
+
//# sourceMappingURL=trip-path-snapshot.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trip-path-snapshot.dto.js","sourceRoot":"","sources":["../../../../../src/modules/gis/dtos/trip-path-snapshot.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,yDAAyC;AACzC,qDAAwF;AAExF,4EAA4E;AAC/D,QAAA,yBAAyB,GAAG;IACrC,gBAAgB,EAAE,GAAG;IACrB,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,IAAI;CACZ,CAAC;AAEX;;;;;;GAMG;AACH,MAAa,wBAAwB;CAuBpC;AAvBD,4DAuBC;AAlBG;IAJC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAChE,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,4BAAU,GAAE;;6DACQ;AAKrB;IAHC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,0DAA0D,EAAE,CAAC;IAChG,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;uDACE;AAYf;IAVC,IAAA,6BAAmB,EAAC;QACjB,OAAO,EAAE,iCAAyB,CAAC,YAAY;QAC/C,OAAO,EAAE,iCAAyB,CAAC,YAAY;QAC/C,OAAO,EAAE,iCAAyB,CAAC,gBAAgB;KACtD,CAAC;IACD,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,iCAAyB,CAAC,YAAY,CAAC;IAC3C,IAAA,qBAAG,EAAC,iCAAyB,CAAC,YAAY,CAAC;IAC3C,IAAA,4BAAU,GAAE;;2DACM"}
|
|
@@ -32,6 +32,7 @@ __exportStar(require("./dtos/point-location.dto"), exports);
|
|
|
32
32
|
__exportStar(require("./dtos/private-trip.dto"), exports);
|
|
33
33
|
__exportStar(require("./dtos/routing.dto"), exports);
|
|
34
34
|
__exportStar(require("./dtos/trip-points.dto"), exports);
|
|
35
|
+
__exportStar(require("./dtos/trip-path-snapshot.dto"), exports);
|
|
35
36
|
__exportStar(require("./dtos/post-gis-geometry.dto"), exports);
|
|
36
37
|
__exportStar(require("./dtos/route-incident.dto"), exports);
|
|
37
38
|
__exportStar(require("./dtos/routing-coverage-result.dto"), exports);
|
|
@@ -55,6 +56,7 @@ __exportStar(require("./interfaces/point-location"), exports);
|
|
|
55
56
|
__exportStar(require("./interfaces/polygon-validation-result"), exports);
|
|
56
57
|
__exportStar(require("./interfaces/trip-summary"), exports);
|
|
57
58
|
__exportStar(require("./interfaces/trip-point"), exports);
|
|
59
|
+
__exportStar(require("./interfaces/trip-path-snapshot"), exports);
|
|
58
60
|
__exportStar(require("./interfaces/routing"), exports);
|
|
59
61
|
__exportStar(require("./interfaces/zone"), exports);
|
|
60
62
|
__exportStar(require("./interfaces/zone-for-point"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/gis/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,+DAA6C;AAC7C,kEAAgD;AAChD,0DAAwC;AACxC,8DAA4C;AAC5C,qEAAmD;AACnD,2EAAyD;AACzD,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,iEAA+C;AAC/C,mEAAiD;AACjD,8DAA4C;AAC5C,sEAAoD;AACpD,4DAA0C;AAC1C,0DAAwC;AACxC,qDAAmC;AACnC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C;AAC1C,qEAAmD;AACnD,8DAA4C;AAC5C,yDAAuC;AACvC,gEAA8C;AAC9C,+DAA6C;AAC7C,2DAAyC;AACzC,oEAAkD;AAClD,uEAAqD;AACrD,kFAAgE;AAChE,4DAA0C;AAC1C,4DAA0C;AAC1C,uDAAqC;AACrC,qDAAmC;AACnC,gEAA8C;AAC9C,6EAA2D;AAC3D,uEAAqD;AACrD,iEAA+C;AAC/C,8DAA4C;AAC5C,yEAAuD;AACvD,4DAA0C;AAC1C,0DAAwC;AACxC,uDAAqC;AACrC,oDAAkC;AAClC,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,+DAA6C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/gis/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,+DAA6C;AAC7C,kEAAgD;AAChD,0DAAwC;AACxC,8DAA4C;AAC5C,qEAAmD;AACnD,2EAAyD;AACzD,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC;AACvC,iEAA+C;AAC/C,mEAAiD;AACjD,8DAA4C;AAC5C,sEAAoD;AACpD,4DAA0C;AAC1C,0DAAwC;AACxC,qDAAmC;AACnC,yDAAuC;AACvC,gEAA8C;AAC9C,+DAA6C;AAC7C,4DAA0C;AAC1C,qEAAmD;AACnD,8DAA4C;AAC5C,yDAAuC;AACvC,gEAA8C;AAC9C,+DAA6C;AAC7C,2DAAyC;AACzC,oEAAkD;AAClD,uEAAqD;AACrD,kFAAgE;AAChE,4DAA0C;AAC1C,4DAA0C;AAC1C,uDAAqC;AACrC,qDAAmC;AACnC,gEAA8C;AAC9C,6EAA2D;AAC3D,uEAAqD;AACrD,iEAA+C;AAC/C,8DAA4C;AAC5C,yEAAuD;AACvD,4DAA0C;AAC1C,0DAAwC;AACxC,kEAAgD;AAChD,uDAAqC;AACrC,oDAAkC;AAClC,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,+DAA6C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trip-path-snapshot.js","sourceRoot":"","sources":["../../../../../src/modules/gis/interfaces/trip-path-snapshot.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FOLLOW_ME_HISTORY_MONITOR_EVENTS = exports.FOLLOW_ME_HISTORY_EVENTS = exports.SAFETY_CHECK_HISTORY_EVENTS = exports.SAFETY_HISTORY_LIMITS = void 0;
|
|
4
|
+
const follow_me_enums_1 = require("../enums/follow-me.enums");
|
|
5
|
+
const safety_enums_1 = require("../enums/safety-enums");
|
|
6
|
+
/** Paging and map bounds of the app's Safety History. */
|
|
7
|
+
exports.SAFETY_HISTORY_LIMITS = {
|
|
8
|
+
defaultPageSize: 20,
|
|
9
|
+
maxPageSize: 50,
|
|
10
|
+
/** Most fixes a history map is sent (the path is thinned to this in clarion-gis). */
|
|
11
|
+
mapMaxPoints: 500,
|
|
12
|
+
/**
|
|
13
|
+
* After an SOS the session's trip carries on as the incident's trip. The
|
|
14
|
+
* session's map ends at the SOS, plus this much for a device clock running a
|
|
15
|
+
* little ahead; the rest belongs to the incident and its own history.
|
|
16
|
+
*/
|
|
17
|
+
pathGraceSeconds: 60,
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The Safety Check audit entries its owner sees in their history - what they
|
|
21
|
+
* did and what happened to them. Plumbing (workflow start, activation, SOS
|
|
22
|
+
* retries) stays in the admin view.
|
|
23
|
+
*/
|
|
24
|
+
exports.SAFETY_CHECK_HISTORY_EVENTS = [
|
|
25
|
+
safety_enums_1.SafetyCheckAuditEventType.CREATED,
|
|
26
|
+
safety_enums_1.SafetyCheckAuditEventType.TRACKING_STARTED,
|
|
27
|
+
safety_enums_1.SafetyCheckAuditEventType.TRACKING_UNAVAILABLE,
|
|
28
|
+
safety_enums_1.SafetyCheckAuditEventType.EXTENDED,
|
|
29
|
+
safety_enums_1.SafetyCheckAuditEventType.PROMPT_STARTED,
|
|
30
|
+
safety_enums_1.SafetyCheckAuditEventType.CHECKED_IN,
|
|
31
|
+
safety_enums_1.SafetyCheckAuditEventType.STOPPED,
|
|
32
|
+
safety_enums_1.SafetyCheckAuditEventType.CANCELLED,
|
|
33
|
+
safety_enums_1.SafetyCheckAuditEventType.SOS_TRIGGERED,
|
|
34
|
+
safety_enums_1.SafetyCheckAuditEventType.SOS_INCIDENT_CREATED,
|
|
35
|
+
safety_enums_1.SafetyCheckAuditEventType.SOS_FAILED,
|
|
36
|
+
safety_enums_1.SafetyCheckAuditEventType.EXPIRED,
|
|
37
|
+
];
|
|
38
|
+
/** The same for a Follow Me journey's audit trail. External-link and chat plumbing stay out. */
|
|
39
|
+
exports.FOLLOW_ME_HISTORY_EVENTS = [
|
|
40
|
+
follow_me_enums_1.FollowMeAuditEventType.CREATED,
|
|
41
|
+
follow_me_enums_1.FollowMeAuditEventType.TRACKING_STARTED,
|
|
42
|
+
follow_me_enums_1.FollowMeAuditEventType.TRACKING_UNAVAILABLE,
|
|
43
|
+
follow_me_enums_1.FollowMeAuditEventType.GUARDIAN_INVITED,
|
|
44
|
+
follow_me_enums_1.FollowMeAuditEventType.GUARDIAN_ACCEPTED,
|
|
45
|
+
follow_me_enums_1.FollowMeAuditEventType.GUARDIAN_DECLINED,
|
|
46
|
+
follow_me_enums_1.FollowMeAuditEventType.GUARDIAN_STOPPED_FOLLOWING,
|
|
47
|
+
follow_me_enums_1.FollowMeAuditEventType.ROUTE_RECALCULATED,
|
|
48
|
+
follow_me_enums_1.FollowMeAuditEventType.PROMPT_STARTED,
|
|
49
|
+
follow_me_enums_1.FollowMeAuditEventType.PROMPT_CONFIRMED,
|
|
50
|
+
follow_me_enums_1.FollowMeAuditEventType.PROMPT_EXPIRED,
|
|
51
|
+
follow_me_enums_1.FollowMeAuditEventType.PROMPT_CANCELLED,
|
|
52
|
+
follow_me_enums_1.FollowMeAuditEventType.SOS_TRIGGERED,
|
|
53
|
+
follow_me_enums_1.FollowMeAuditEventType.SOS_INCIDENT_CREATED,
|
|
54
|
+
follow_me_enums_1.FollowMeAuditEventType.SOS_FAILED,
|
|
55
|
+
follow_me_enums_1.FollowMeAuditEventType.ARRIVED,
|
|
56
|
+
follow_me_enums_1.FollowMeAuditEventType.STOPPED,
|
|
57
|
+
follow_me_enums_1.FollowMeAuditEventType.EXPIRED,
|
|
58
|
+
follow_me_enums_1.FollowMeAuditEventType.CANCELLED,
|
|
59
|
+
];
|
|
60
|
+
/**
|
|
61
|
+
* What the Follow Me monitors observed that the owner sees: confirmed findings
|
|
62
|
+
* only. Suspicions that cleared themselves (off route then back on, a crash
|
|
63
|
+
* report the checks rejected, a stop explained by traffic) and pure bookkeeping
|
|
64
|
+
* (ETA and route recalculation, already in the audit trail) are left out, so a
|
|
65
|
+
* history never says something happened that the monitors did not conclude.
|
|
66
|
+
*/
|
|
67
|
+
exports.FOLLOW_ME_HISTORY_MONITOR_EVENTS = [
|
|
68
|
+
follow_me_enums_1.FollowMeSafetyEventType.DEVIATION_CONFIRMED,
|
|
69
|
+
follow_me_enums_1.FollowMeSafetyEventType.PROLONGED_STOP_DETECTED,
|
|
70
|
+
follow_me_enums_1.FollowMeSafetyEventType.ETA_OVERDUE_DETECTED,
|
|
71
|
+
follow_me_enums_1.FollowMeSafetyEventType.CRASH_REPORTED,
|
|
72
|
+
follow_me_enums_1.FollowMeSafetyEventType.TRACKING_STALE,
|
|
73
|
+
follow_me_enums_1.FollowMeSafetyEventType.TRACKING_RESTORED,
|
|
74
|
+
];
|
|
75
|
+
//# sourceMappingURL=safety-history.const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safety-history.const.js","sourceRoot":"","sources":["../../../../../src/modules/safety/constants/safety-history.const.ts"],"names":[],"mappings":";;;AAAA,8DAA2F;AAC3F,wDAAkE;AAElE,yDAAyD;AAC5C,QAAA,qBAAqB,GAAG;IACjC,eAAe,EAAE,EAAE;IACnB,WAAW,EAAE,EAAE;IACf,qFAAqF;IACrF,YAAY,EAAE,GAAG;IACjB;;;;OAIG;IACH,gBAAgB,EAAE,EAAE;CACd,CAAC;AAEX;;;;GAIG;AACU,QAAA,2BAA2B,GAAyC;IAC7E,wCAAyB,CAAC,OAAO;IACjC,wCAAyB,CAAC,gBAAgB;IAC1C,wCAAyB,CAAC,oBAAoB;IAC9C,wCAAyB,CAAC,QAAQ;IAClC,wCAAyB,CAAC,cAAc;IACxC,wCAAyB,CAAC,UAAU;IACpC,wCAAyB,CAAC,OAAO;IACjC,wCAAyB,CAAC,SAAS;IACnC,wCAAyB,CAAC,aAAa;IACvC,wCAAyB,CAAC,oBAAoB;IAC9C,wCAAyB,CAAC,UAAU;IACpC,wCAAyB,CAAC,OAAO;CACpC,CAAC;AAEF,gGAAgG;AACnF,QAAA,wBAAwB,GAAsC;IACvE,wCAAsB,CAAC,OAAO;IAC9B,wCAAsB,CAAC,gBAAgB;IACvC,wCAAsB,CAAC,oBAAoB;IAC3C,wCAAsB,CAAC,gBAAgB;IACvC,wCAAsB,CAAC,iBAAiB;IACxC,wCAAsB,CAAC,iBAAiB;IACxC,wCAAsB,CAAC,0BAA0B;IACjD,wCAAsB,CAAC,kBAAkB;IACzC,wCAAsB,CAAC,cAAc;IACrC,wCAAsB,CAAC,gBAAgB;IACvC,wCAAsB,CAAC,cAAc;IACrC,wCAAsB,CAAC,gBAAgB;IACvC,wCAAsB,CAAC,aAAa;IACpC,wCAAsB,CAAC,oBAAoB;IAC3C,wCAAsB,CAAC,UAAU;IACjC,wCAAsB,CAAC,OAAO;IAC9B,wCAAsB,CAAC,OAAO;IAC9B,wCAAsB,CAAC,OAAO;IAC9B,wCAAsB,CAAC,SAAS;CACnC,CAAC;AAEF;;;;;;GAMG;AACU,QAAA,gCAAgC,GAAuC;IAChF,yCAAuB,CAAC,mBAAmB;IAC3C,yCAAuB,CAAC,uBAAuB;IAC/C,yCAAuB,CAAC,oBAAoB;IAC5C,yCAAuB,CAAC,cAAc;IACtC,yCAAuB,CAAC,cAAc;IACtC,yCAAuB,CAAC,iBAAiB;CAC5C,CAAC"}
|
|
@@ -55,6 +55,10 @@ exports.SAFETY_INTERNAL_PATHS = {
|
|
|
55
55
|
shareTrip: (tripId) => `/trips/${encodeURIComponent(tripId)}/share`,
|
|
56
56
|
stopPrivateTrip: (tripId) => `/trips/${encodeURIComponent(tripId)}/stop-private`,
|
|
57
57
|
tripSummary: (tripId) => `/trips/${encodeURIComponent(tripId)}/summary`,
|
|
58
|
+
/** clarion-gis: a trip's recorded path thinned for a map (Safety History). */
|
|
59
|
+
tripPathSnapshot: (tripId) => `/trips/${encodeURIComponent(tripId)}/path-snapshot`,
|
|
60
|
+
/** clarion-incident: one incident, read AS the caller (their user context is forwarded). */
|
|
61
|
+
incident: (incidentId) => `/incidents/${encodeURIComponent(String(incidentId))}`,
|
|
58
62
|
};
|
|
59
63
|
/**
|
|
60
64
|
* go_router locations in clarion_mobile that pushes deep-link to. A push route
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safety-integration.const.js","sourceRoot":"","sources":["../../../../../src/modules/safety/constants/safety-integration.const.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAgCH,sDAEC;
|
|
1
|
+
{"version":3,"file":"safety-integration.const.js","source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E,CAAC,kBAAkB,SAAS,EAAE;IAClE,YAAY,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,mBAAmB,KAAK,EAAE;IAC3D,QAAQ,EAAE,CAAC,SAAiB,EAAE,aAAqB,EAAE,EAAE,CAAC,sBAAsB,SAAS,IAAI,aAAa,EAAE;IAC1G,gBAAgB,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,gBAAgB,SAAS,EAAE;IACpE,iBAAiB,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,oBAAoB,MAAM,EAAE;CAC7D,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FollowMeHistoryQueryDto = exports.SafetyCheckHistoryQueryDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const safety_history_const_1 = require("../constants/safety-history.const");
|
|
17
|
+
const follow_me_enums_1 = require("../enums/follow-me.enums");
|
|
18
|
+
const safety_check_status_enum_1 = require("../enums/safety-check-status.enum");
|
|
19
|
+
/** Turns 'true'/'false' query strings into booleans without accepting anything else. */
|
|
20
|
+
const toOptionalBoolean = ({ value }) => {
|
|
21
|
+
if (value === undefined || value === null || value === '')
|
|
22
|
+
return undefined;
|
|
23
|
+
if (typeof value === 'boolean')
|
|
24
|
+
return value;
|
|
25
|
+
const normalized = String(value).toLowerCase();
|
|
26
|
+
if (normalized === 'true')
|
|
27
|
+
return true;
|
|
28
|
+
if (normalized === 'false')
|
|
29
|
+
return false;
|
|
30
|
+
return undefined;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The app's Safety Check history, newest first. Only NARROWS the caller's own
|
|
34
|
+
* checks: there is deliberately no user or organization filter - both come from
|
|
35
|
+
* the trusted context.
|
|
36
|
+
*/
|
|
37
|
+
class SafetyCheckHistoryQueryDto {
|
|
38
|
+
}
|
|
39
|
+
exports.SafetyCheckHistoryQueryDto = SafetyCheckHistoryQueryDto;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, swagger_1.ApiPropertyOptional)({ minimum: 1, default: 1 }),
|
|
42
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
43
|
+
(0, class_validator_1.IsInt)(),
|
|
44
|
+
(0, class_validator_1.Min)(1),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], SafetyCheckHistoryQueryDto.prototype, "page", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
50
|
+
minimum: 1,
|
|
51
|
+
maximum: safety_history_const_1.SAFETY_HISTORY_LIMITS.maxPageSize,
|
|
52
|
+
default: safety_history_const_1.SAFETY_HISTORY_LIMITS.defaultPageSize,
|
|
53
|
+
}),
|
|
54
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
55
|
+
(0, class_validator_1.IsInt)(),
|
|
56
|
+
(0, class_validator_1.Min)(1),
|
|
57
|
+
(0, class_validator_1.Max)(safety_history_const_1.SAFETY_HISTORY_LIMITS.maxPageSize),
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], SafetyCheckHistoryQueryDto.prototype, "limit", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: safety_check_status_enum_1.SafetyCheckStatus }),
|
|
63
|
+
(0, class_validator_1.IsEnum)(safety_check_status_enum_1.SafetyCheckStatus),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], SafetyCheckHistoryQueryDto.prototype, "status", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Only checks that raised an SOS' }),
|
|
69
|
+
(0, class_transformer_1.Transform)(toOptionalBoolean),
|
|
70
|
+
(0, class_validator_1.IsBoolean)(),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
__metadata("design:type", Boolean)
|
|
73
|
+
], SafetyCheckHistoryQueryDto.prototype, "sosOnly", void 0);
|
|
74
|
+
/** The app's Follow Me history, newest first - the caller's own journeys only. */
|
|
75
|
+
class FollowMeHistoryQueryDto {
|
|
76
|
+
}
|
|
77
|
+
exports.FollowMeHistoryQueryDto = FollowMeHistoryQueryDto;
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, swagger_1.ApiPropertyOptional)({ minimum: 1, default: 1 }),
|
|
80
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
81
|
+
(0, class_validator_1.IsInt)(),
|
|
82
|
+
(0, class_validator_1.Min)(1),
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], FollowMeHistoryQueryDto.prototype, "page", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
88
|
+
minimum: 1,
|
|
89
|
+
maximum: safety_history_const_1.SAFETY_HISTORY_LIMITS.maxPageSize,
|
|
90
|
+
default: safety_history_const_1.SAFETY_HISTORY_LIMITS.defaultPageSize,
|
|
91
|
+
}),
|
|
92
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
93
|
+
(0, class_validator_1.IsInt)(),
|
|
94
|
+
(0, class_validator_1.Min)(1),
|
|
95
|
+
(0, class_validator_1.Max)(safety_history_const_1.SAFETY_HISTORY_LIMITS.maxPageSize),
|
|
96
|
+
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
__metadata("design:type", Number)
|
|
98
|
+
], FollowMeHistoryQueryDto.prototype, "limit", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: follow_me_enums_1.FollowMeStatus }),
|
|
101
|
+
(0, class_validator_1.IsEnum)(follow_me_enums_1.FollowMeStatus),
|
|
102
|
+
(0, class_validator_1.IsOptional)(),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], FollowMeHistoryQueryDto.prototype, "status", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Only journeys that raised an SOS' }),
|
|
107
|
+
(0, class_transformer_1.Transform)(toOptionalBoolean),
|
|
108
|
+
(0, class_validator_1.IsBoolean)(),
|
|
109
|
+
(0, class_validator_1.IsOptional)(),
|
|
110
|
+
__metadata("design:type", Boolean)
|
|
111
|
+
], FollowMeHistoryQueryDto.prototype, "sosOnly", void 0);
|
|
112
|
+
//# sourceMappingURL=safety-history.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safety-history.dto.js","sourceRoot":"","sources":["../../../../../src/modules/safety/dtos/safety-history.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAsD;AACtD,yDAAoD;AACpD,qDAAiF;AACjF,4EAA0E;AAC1E,8DAA0D;AAC1D,gFAAsE;AAEtE,wFAAwF;AACxF,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EA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AE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IACtE,IAAA,6BAAS,EAAC,iBAAiB,CAAC;IAC5B,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;2DACK;AAGtB,kFAAkF;AAClF,MAAa,uBAAuB;CA8BnC;AA9BD,0DA8BC;AAxBG;IALC,IAAA,6BAAmB,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC/C,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,4BAAU,GAAE;;qDACC;AAYd;IAVC,IAAA,6BAAmB,EAAC;QACjB,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,4CAAqB,CAAC,WAAW;QAC1C,OAAO,EAAE,4CAAqB,CAAC,eAAe;KACjD,CAAC;IACD,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,4CAAqB,CAAC,WAAW,CAAC;IACtC,IAAA,4BAAU,GAAE;;sDACE;AAKf;IAHC,IAAA,6BAAmB,EAAC,EAAE,IAAI,EAAE,gCAAc,EAAE,CAAC;IAC7C,IAAA,wBAAM,EAAC,gCAAc,CAAC;IACtB,IAAA,4BAAU,GAAE;;uDACW;AAMxB;IAJC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IACxE,IAAA,6BAAS,EAAC,iBAAiB,CAAC;IAC5B,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;wDACK"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SafetyHistoryEventSource = exports.SafetyHistoryPathStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Whether a session's recorded path can be drawn in its history.
|
|
6
|
+
*
|
|
7
|
+
* RECORDED clarion-gis holds at least one location for the session (a
|
|
8
|
+
* track point, or the location the device reported at start).
|
|
9
|
+
* NOT_RECORDED nothing was ever recorded: no trip was opened, or it holds no
|
|
10
|
+
* location. The map says so - it never shows where the user is now.
|
|
11
|
+
* UNAVAILABLE clarion-gis could not be read just now. Try again later; the
|
|
12
|
+
* rest of the history does not depend on it.
|
|
13
|
+
*/
|
|
14
|
+
var SafetyHistoryPathStatus;
|
|
15
|
+
(function (SafetyHistoryPathStatus) {
|
|
16
|
+
SafetyHistoryPathStatus["RECORDED"] = "RECORDED";
|
|
17
|
+
SafetyHistoryPathStatus["NOT_RECORDED"] = "NOT_RECORDED";
|
|
18
|
+
SafetyHistoryPathStatus["UNAVAILABLE"] = "UNAVAILABLE";
|
|
19
|
+
})(SafetyHistoryPathStatus || (exports.SafetyHistoryPathStatus = SafetyHistoryPathStatus = {}));
|
|
20
|
+
/**
|
|
21
|
+
* Where a history timeline entry comes from: the session's lifecycle audit trail
|
|
22
|
+
* (what the user, the timer or the platform did), or - Follow Me only - what the
|
|
23
|
+
* journey monitors observed.
|
|
24
|
+
*/
|
|
25
|
+
var SafetyHistoryEventSource;
|
|
26
|
+
(function (SafetyHistoryEventSource) {
|
|
27
|
+
SafetyHistoryEventSource["LIFECYCLE"] = "LIFECYCLE";
|
|
28
|
+
SafetyHistoryEventSource["MONITOR"] = "MONITOR";
|
|
29
|
+
})(SafetyHistoryEventSource || (exports.SafetyHistoryEventSource = SafetyHistoryEventSource = {}));
|
|
30
|
+
//# sourceMappingURL=safety-history.enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safety-history.enums.js","sourceRoot":"","sources":["../../../../../src/modules/safety/enums/safety-history.enums.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IAC/B,gDAAqB,CAAA;IACrB,wDAA6B,CAAA;IAC7B,sDAA2B,CAAA;AAC/B,CAAC,EAJW,uBAAuB,uCAAvB,uBAAuB,QAIlC;AAED;;;;GAIG;AACH,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAChC,mDAAuB,CAAA;IACvB,+CAAmB,CAAA;AACvB,CAAC,EAHW,wBAAwB,wCAAxB,wBAAwB,QAGnC"}
|
|
@@ -19,17 +19,20 @@ __exportStar(require("./enums/safety-check-status.enum"), exports);
|
|
|
19
19
|
__exportStar(require("./enums/safety-enums"), exports);
|
|
20
20
|
__exportStar(require("./enums/safety-error-code.enum"), exports);
|
|
21
21
|
__exportStar(require("./enums/follow-me.enums"), exports);
|
|
22
|
+
__exportStar(require("./enums/safety-history.enums"), exports);
|
|
22
23
|
// Constants
|
|
23
24
|
__exportStar(require("./constants/safety-check-limits.const"), exports);
|
|
24
25
|
__exportStar(require("./constants/safety-taxonomy.const"), exports);
|
|
25
26
|
__exportStar(require("./constants/safety-integration.const"), exports);
|
|
26
27
|
__exportStar(require("./constants/follow-me.const"), exports);
|
|
28
|
+
__exportStar(require("./constants/safety-history.const"), exports);
|
|
27
29
|
// Interfaces
|
|
28
30
|
__exportStar(require("./interfaces/safety-check"), exports);
|
|
29
31
|
__exportStar(require("./interfaces/safety-check-event"), exports);
|
|
30
32
|
__exportStar(require("./interfaces/safety-alert-context"), exports);
|
|
31
33
|
__exportStar(require("./interfaces/follow-me"), exports);
|
|
32
34
|
__exportStar(require("./interfaces/safety-analytics"), exports);
|
|
35
|
+
__exportStar(require("./interfaces/safety-history"), exports);
|
|
33
36
|
// DTOs
|
|
34
37
|
__exportStar(require("./dtos/safety-check.dto"), exports);
|
|
35
38
|
__exportStar(require("./dtos/safety-admin.dto"), exports);
|
|
@@ -37,6 +40,7 @@ __exportStar(require("./dtos/safety-internal.dto"), exports);
|
|
|
37
40
|
__exportStar(require("./dtos/safety-alert-context.dto"), exports);
|
|
38
41
|
__exportStar(require("./dtos/follow-me.dto"), exports);
|
|
39
42
|
__exportStar(require("./dtos/safety-analytics.dto"), exports);
|
|
43
|
+
__exportStar(require("./dtos/safety-history.dto"), exports);
|
|
40
44
|
// Utilities
|
|
41
45
|
__exportStar(require("./utils/safety-check-state-machine"), exports);
|
|
42
46
|
__exportStar(require("./utils/safety-check-timing.util"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/safety/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,mEAAiD;AACjD,uDAAqC;AACrC,iEAA+C;AAC/C,0DAAwC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/safety/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,mEAAiD;AACjD,uDAAqC;AACrC,iEAA+C;AAC/C,0DAAwC;AACxC,+DAA6C;AAE7C,YAAY;AACZ,wEAAsD;AACtD,oEAAkD;AAClD,uEAAqD;AACrD,8DAA4C;AAC5C,mEAAiD;AAEjD,aAAa;AACb,4DAA0C;AAC1C,kEAAgD;AAChD,oEAAkD;AAClD,yDAAuC;AACvC,gEAA8C;AAC9C,8DAA4C;AAE5C,OAAO;AACP,0DAAwC;AACxC,0DAAwC;AACxC,6DAA2C;AAC3C,kEAAgD;AAChD,uDAAqC;AACrC,8DAA4C;AAC5C,4DAA0C;AAE1C,YAAY;AACZ,qEAAmD;AACnD,mEAAiD;AACjD,kEAAgD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safety-history.js","sourceRoot":"","sources":["../../../../../src/modules/safety/interfaces/safety-history.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
import { IsDateString, IsInt, IsOptional, IsPositive, Max, Min } from 'class-validator';
|
|
13
|
+
/** Bounds of a path snapshot - small enough for a phone to draw quickly. */
|
|
14
|
+
export const TRIP_PATH_SNAPSHOT_LIMITS = {
|
|
15
|
+
defaultMaxPoints: 500,
|
|
16
|
+
minMaxPoints: 2,
|
|
17
|
+
maxMaxPoints: 2000,
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* GET /trips/:tripId/path-snapshot (internal, clarion-safety only).
|
|
21
|
+
*
|
|
22
|
+
* `ownerUserId` is the user the caller has already established owns the safety
|
|
23
|
+
* record; clarion-gis refuses the read unless the trip is theirs too, so a
|
|
24
|
+
* mixed-up trip id can never draw somebody else's path.
|
|
25
|
+
*/
|
|
26
|
+
export class TripPathSnapshotQueryDto {
|
|
27
|
+
}
|
|
28
|
+
__decorate([
|
|
29
|
+
ApiProperty({ description: 'The user the trip must belong to' }),
|
|
30
|
+
Type(() => Number),
|
|
31
|
+
IsInt(),
|
|
32
|
+
IsPositive(),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], TripPathSnapshotQueryDto.prototype, "ownerUserId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
ApiPropertyOptional({ description: 'Only fixes recorded at or before this instant (ISO 8601)' }),
|
|
37
|
+
IsDateString(),
|
|
38
|
+
IsOptional(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], TripPathSnapshotQueryDto.prototype, "until", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
ApiPropertyOptional({
|
|
43
|
+
minimum: TRIP_PATH_SNAPSHOT_LIMITS.minMaxPoints,
|
|
44
|
+
maximum: TRIP_PATH_SNAPSHOT_LIMITS.maxMaxPoints,
|
|
45
|
+
default: TRIP_PATH_SNAPSHOT_LIMITS.defaultMaxPoints,
|
|
46
|
+
}),
|
|
47
|
+
Type(() => Number),
|
|
48
|
+
IsInt(),
|
|
49
|
+
Min(TRIP_PATH_SNAPSHOT_LIMITS.minMaxPoints),
|
|
50
|
+
Max(TRIP_PATH_SNAPSHOT_LIMITS.maxMaxPoints),
|
|
51
|
+
IsOptional(),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], TripPathSnapshotQueryDto.prototype, "maxPoints", void 0);
|
|
54
|
+
//# sourceMappingURL=trip-path-snapshot.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trip-path-snapshot.dto.js","sourceRoot":"","sources":["../../../../../src/modules/gis/dtos/trip-path-snapshot.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAExF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,gBAAgB,EAAE,GAAG;IACrB,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,IAAI;CACZ,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,OAAO,wBAAwB;CAuBpC;AAlBG;IAJC,WAAW,CAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAChE,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,UAAU,EAAE;;6DACQ;AAKrB;IAHC,mBAAmB,CAAC,EAAE,WAAW,EAAE,0DAA0D,EAAE,CAAC;IAChG,YAAY,EAAE;IACd,UAAU,EAAE;;uDACE;AAYf;IAVC,mBAAmB,CAAC;QACjB,OAAO,EAAE,yBAAyB,CAAC,YAAY;QAC/C,OAAO,EAAE,yBAAyB,CAAC,YAAY;QAC/C,OAAO,EAAE,yBAAyB,CAAC,gBAAgB;KACtD,CAAC;IACD,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,GAAG,CAAC,yBAAyB,CAAC,YAAY,CAAC;IAC3C,GAAG,CAAC,yBAAyB,CAAC,YAAY,CAAC;IAC3C,UAAU,EAAE;;2DACM"}
|
|
@@ -16,6 +16,7 @@ export * from './dtos/point-location.dto';
|
|
|
16
16
|
export * from './dtos/private-trip.dto';
|
|
17
17
|
export * from './dtos/routing.dto';
|
|
18
18
|
export * from './dtos/trip-points.dto';
|
|
19
|
+
export * from './dtos/trip-path-snapshot.dto';
|
|
19
20
|
export * from './dtos/post-gis-geometry.dto';
|
|
20
21
|
export * from './dtos/route-incident.dto';
|
|
21
22
|
export * from './dtos/routing-coverage-result.dto';
|
|
@@ -39,6 +40,7 @@ export * from './interfaces/point-location';
|
|
|
39
40
|
export * from './interfaces/polygon-validation-result';
|
|
40
41
|
export * from './interfaces/trip-summary';
|
|
41
42
|
export * from './interfaces/trip-point';
|
|
43
|
+
export * from './interfaces/trip-path-snapshot';
|
|
42
44
|
export * from './interfaces/routing';
|
|
43
45
|
export * from './interfaces/zone';
|
|
44
46
|
export * from './interfaces/zone-for-point';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/gis/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AA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trip-path-snapshot.js","sourceRoot":"","sources":["../../../../../src/modules/gis/interfaces/trip-path-snapshot.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { FollowMeAuditEventType, FollowMeSafetyEventType } from '../enums/follow-me.enums';
|
|
2
|
+
import { SafetyCheckAuditEventType } from '../enums/safety-enums';
|
|
3
|
+
/** Paging and map bounds of the app's Safety History. */
|
|
4
|
+
export const SAFETY_HISTORY_LIMITS = {
|
|
5
|
+
defaultPageSize: 20,
|
|
6
|
+
maxPageSize: 50,
|
|
7
|
+
/** Most fixes a history map is sent (the path is thinned to this in clarion-gis). */
|
|
8
|
+
mapMaxPoints: 500,
|
|
9
|
+
/**
|
|
10
|
+
* After an SOS the session's trip carries on as the incident's trip. The
|
|
11
|
+
* session's map ends at the SOS, plus this much for a device clock running a
|
|
12
|
+
* little ahead; the rest belongs to the incident and its own history.
|
|
13
|
+
*/
|
|
14
|
+
pathGraceSeconds: 60,
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The Safety Check audit entries its owner sees in their history - what they
|
|
18
|
+
* did and what happened to them. Plumbing (workflow start, activation, SOS
|
|
19
|
+
* retries) stays in the admin view.
|
|
20
|
+
*/
|
|
21
|
+
export const SAFETY_CHECK_HISTORY_EVENTS = [
|
|
22
|
+
SafetyCheckAuditEventType.CREATED,
|
|
23
|
+
SafetyCheckAuditEventType.TRACKING_STARTED,
|
|
24
|
+
SafetyCheckAuditEventType.TRACKING_UNAVAILABLE,
|
|
25
|
+
SafetyCheckAuditEventType.EXTENDED,
|
|
26
|
+
SafetyCheckAuditEventType.PROMPT_STARTED,
|
|
27
|
+
SafetyCheckAuditEventType.CHECKED_IN,
|
|
28
|
+
SafetyCheckAuditEventType.STOPPED,
|
|
29
|
+
SafetyCheckAuditEventType.CANCELLED,
|
|
30
|
+
SafetyCheckAuditEventType.SOS_TRIGGERED,
|
|
31
|
+
SafetyCheckAuditEventType.SOS_INCIDENT_CREATED,
|
|
32
|
+
SafetyCheckAuditEventType.SOS_FAILED,
|
|
33
|
+
SafetyCheckAuditEventType.EXPIRED,
|
|
34
|
+
];
|
|
35
|
+
/** The same for a Follow Me journey's audit trail. External-link and chat plumbing stay out. */
|
|
36
|
+
export const FOLLOW_ME_HISTORY_EVENTS = [
|
|
37
|
+
FollowMeAuditEventType.CREATED,
|
|
38
|
+
FollowMeAuditEventType.TRACKING_STARTED,
|
|
39
|
+
FollowMeAuditEventType.TRACKING_UNAVAILABLE,
|
|
40
|
+
FollowMeAuditEventType.GUARDIAN_INVITED,
|
|
41
|
+
FollowMeAuditEventType.GUARDIAN_ACCEPTED,
|
|
42
|
+
FollowMeAuditEventType.GUARDIAN_DECLINED,
|
|
43
|
+
FollowMeAuditEventType.GUARDIAN_STOPPED_FOLLOWING,
|
|
44
|
+
FollowMeAuditEventType.ROUTE_RECALCULATED,
|
|
45
|
+
FollowMeAuditEventType.PROMPT_STARTED,
|
|
46
|
+
FollowMeAuditEventType.PROMPT_CONFIRMED,
|
|
47
|
+
FollowMeAuditEventType.PROMPT_EXPIRED,
|
|
48
|
+
FollowMeAuditEventType.PROMPT_CANCELLED,
|
|
49
|
+
FollowMeAuditEventType.SOS_TRIGGERED,
|
|
50
|
+
FollowMeAuditEventType.SOS_INCIDENT_CREATED,
|
|
51
|
+
FollowMeAuditEventType.SOS_FAILED,
|
|
52
|
+
FollowMeAuditEventType.ARRIVED,
|
|
53
|
+
FollowMeAuditEventType.STOPPED,
|
|
54
|
+
FollowMeAuditEventType.EXPIRED,
|
|
55
|
+
FollowMeAuditEventType.CANCELLED,
|
|
56
|
+
];
|
|
57
|
+
/**
|
|
58
|
+
* What the Follow Me monitors observed that the owner sees: confirmed findings
|
|
59
|
+
* only. Suspicions that cleared themselves (off route then back on, a crash
|
|
60
|
+
* report the checks rejected, a stop explained by traffic) and pure bookkeeping
|
|
61
|
+
* (ETA and route recalculation, already in the audit trail) are left out, so a
|
|
62
|
+
* history never says something happened that the monitors did not conclude.
|
|
63
|
+
*/
|
|
64
|
+
export const FOLLOW_ME_HISTORY_MONITOR_EVENTS = [
|
|
65
|
+
FollowMeSafetyEventType.DEVIATION_CONFIRMED,
|
|
66
|
+
FollowMeSafetyEventType.PROLONGED_STOP_DETECTED,
|
|
67
|
+
FollowMeSafetyEventType.ETA_OVERDUE_DETECTED,
|
|
68
|
+
FollowMeSafetyEventType.CRASH_REPORTED,
|
|
69
|
+
FollowMeSafetyEventType.TRACKING_STALE,
|
|
70
|
+
FollowMeSafetyEventType.TRACKING_RESTORED,
|
|
71
|
+
];
|
|
72
|
+
//# sourceMappingURL=safety-history.const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safety-history.const.js","sourceRoot":"","sources":["../../../../../src/modules/safety/constants/safety-history.const.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,yDAAyD;AACzD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,eAAe,EAAE,EAAE;IACnB,WAAW,EAAE,EAAE;IACf,qFAAqF;IACrF,YAAY,EAAE,GAAG;IACjB;;;;OAIG;IACH,gBAAgB,EAAE,EAAE;CACd,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAyC;IAC7E,yBAAyB,CAAC,OAAO;IACjC,yBAAyB,CAAC,gBAAgB;IAC1C,yBAAyB,CAAC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stopPrivateTrip: (tripId) => `/trips/${encodeURIComponent(tripId)}/stop-private`,
|
|
52
52
|
tripSummary: (tripId) => `/trips/${encodeURIComponent(tripId)}/summary`,
|
|
53
|
+
/** clarion-gis: a trip's recorded path thinned for a map (Safety History). */
|
|
54
|
+
tripPathSnapshot: (tripId) => `/trips/${encodeURIComponent(tripId)}/path-snapshot`,
|
|
55
|
+
/** clarion-incident: one incident, read AS the caller (their user context is forwarded). */
|
|
56
|
+
incident: (incidentId) => `/incidents/${encodeURIComponent(String(incidentId))}`,
|
|
53
57
|
};
|
|
54
58
|
/**
|
|
55
59
|
* go_router locations in clarion_mobile that pushes deep-link to. A push route
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safety-integration.const.js","sourceRoot":"","sources":["../../../../../src/modules/safety/constants/safety-integration.const.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,2BAA2B,EAAE,4BAA4B,CAAU,CAAC;AAEnH,gDAAgD;AAChD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,qEAAqE;IACrE,YAAY,EAAE,qBAAqB;IACnC,uEAAuE;IACvE,SAAS,EAAE,yBAAyB;IACpC,6EAA6E;IAC7E,aAAa,EAAE,oBAAoB;IACnC,iEAAiE;IACjE,UAAU,EAAE,0BAA0B;CAChC,CAAC;AAEX,2FAA2F;AAC3F,MAAM,UAAU,qBAAqB,CAAC,aAAqB;IACvD,OAAO,gBAAgB,aAAa,EAAE,CAAC;AAC3C,CAAC;AAED,wDAAwD;AACxD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,oEAAoE;IACpE,YAAY,EAAE,CAAC,aAAqB,EAAE,EAAE,CAAC,2BAA2B,kBAAkB,CAAC,aAAa,CAAC,UAAU;IAC/G,6DAA6D;IAC7D,aAAa,EAAE,0BAA0B;IACzC,sDAAsD;IACtD,cAAc,EAAE,CAAC,aAAqB,EAAE,EAAE,CACtC,4BAA4B,kBAAkB,CAAC,aAAa,CAAC,SAAS;IAC1E,+EAA+E;IAC/E,yBAAyB,EAAE,0BAA0B;IACrD,4FAA4F;IAC5F,qBAAqB,EAAE,0BAA0B;IACjD,8EAA8E;IAC9E,iBAAiB,EAAE,gBAAgB;IACnC,eAAe,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,UAAU,kBAAkB,CAAC,MAAM,CAAC,eAAe;IACxF,SAAS,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,UAAU,kBAAkB,CAAC,MAAM,CAAC,QAAQ;IAC3E,eAAe,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,UAAU,kBAAkB,CAAC,MAAM,CAAC,eAAe;IACxF,WAAW,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,UAAU,kBAAkB,CAAC,MAAM,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"safety-integration.const.js","sourceRoot":"","sources":["../../../../../src/modules/safety/constants/safety-integration.const.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,2BAA2B,EAAE,4BAA4B,CAAU,CAAC;AAEnH,gDAAgD;AAChD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,qEAAqE;IACrE,YAAY,EAAE,qBAAqB;IACnC,uEAAuE;IACvE,SAAS,EAAE,yBAAyB;IACpC,6EAA6E;IAC7E,aAAa,EAAE,oBAAoB;IACnC,iEAAiE;IACjE,UAAU,EAAE,0BAA0B;CAChC,CAAC;AAEX,2FAA2F;AAC3F,MAAM,UAAU,qBAAqB,CAAC,aAAqB;IACvD,OAAO,gBAAgB,aAAa,EAAE,CAAC;AAC3C,CAAC;AAED,wDAA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