grm-shared-library 1.1.239 → 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.
Files changed (50) hide show
  1. package/dist/cjs/modules/gis/dtos/trip-path-snapshot.dto.js +58 -0
  2. package/dist/cjs/modules/gis/dtos/trip-path-snapshot.dto.js.map +1 -0
  3. package/dist/cjs/modules/gis/index.js +2 -0
  4. package/dist/cjs/modules/gis/index.js.map +1 -1
  5. package/dist/cjs/modules/gis/interfaces/trip-path-snapshot.js +3 -0
  6. package/dist/cjs/modules/gis/interfaces/trip-path-snapshot.js.map +1 -0
  7. package/dist/cjs/modules/safety/constants/safety-history.const.js +75 -0
  8. package/dist/cjs/modules/safety/constants/safety-history.const.js.map +1 -0
  9. package/dist/cjs/modules/safety/constants/safety-integration.const.js +4 -0
  10. package/dist/cjs/modules/safety/constants/safety-integration.const.js.map +1 -1
  11. package/dist/cjs/modules/safety/dtos/safety-history.dto.js +112 -0
  12. package/dist/cjs/modules/safety/dtos/safety-history.dto.js.map +1 -0
  13. package/dist/cjs/modules/safety/enums/safety-history.enums.js +30 -0
  14. package/dist/cjs/modules/safety/enums/safety-history.enums.js.map +1 -0
  15. package/dist/cjs/modules/safety/index.js +4 -0
  16. package/dist/cjs/modules/safety/index.js.map +1 -1
  17. package/dist/cjs/modules/safety/interfaces/safety-history.js +3 -0
  18. package/dist/cjs/modules/safety/interfaces/safety-history.js.map +1 -0
  19. package/dist/cjs/modules/sms/constants/sms-templates.config.js +2 -2
  20. package/dist/cjs/modules/sms/constants/sms-templates.config.js.map +1 -1
  21. package/dist/esm/modules/gis/dtos/trip-path-snapshot.dto.js +54 -0
  22. package/dist/esm/modules/gis/dtos/trip-path-snapshot.dto.js.map +1 -0
  23. package/dist/esm/modules/gis/index.js +2 -0
  24. package/dist/esm/modules/gis/index.js.map +1 -1
  25. package/dist/esm/modules/gis/interfaces/trip-path-snapshot.js +2 -0
  26. package/dist/esm/modules/gis/interfaces/trip-path-snapshot.js.map +1 -0
  27. package/dist/esm/modules/safety/constants/safety-history.const.js +72 -0
  28. package/dist/esm/modules/safety/constants/safety-history.const.js.map +1 -0
  29. package/dist/esm/modules/safety/constants/safety-integration.const.js +4 -0
  30. package/dist/esm/modules/safety/constants/safety-integration.const.js.map +1 -1
  31. package/dist/esm/modules/safety/dtos/safety-history.dto.js +107 -0
  32. package/dist/esm/modules/safety/dtos/safety-history.dto.js.map +1 -0
  33. package/dist/esm/modules/safety/enums/safety-history.enums.js +27 -0
  34. package/dist/esm/modules/safety/enums/safety-history.enums.js.map +1 -0
  35. package/dist/esm/modules/safety/index.js +4 -0
  36. package/dist/esm/modules/safety/index.js.map +1 -1
  37. package/dist/esm/modules/safety/interfaces/safety-history.js +2 -0
  38. package/dist/esm/modules/safety/interfaces/safety-history.js.map +1 -0
  39. package/dist/esm/modules/sms/constants/sms-templates.config.js +2 -2
  40. package/dist/esm/modules/sms/constants/sms-templates.config.js.map +1 -1
  41. package/dist/types/modules/gis/dtos/trip-path-snapshot.dto.d.ts +18 -0
  42. package/dist/types/modules/gis/index.d.ts +2 -0
  43. package/dist/types/modules/gis/interfaces/trip-path-snapshot.d.ts +38 -0
  44. package/dist/types/modules/safety/constants/safety-history.const.d.ts +31 -0
  45. package/dist/types/modules/safety/constants/safety-integration.const.d.ts +4 -0
  46. package/dist/types/modules/safety/dtos/safety-history.dto.d.ts +20 -0
  47. package/dist/types/modules/safety/enums/safety-history.enums.d.ts +24 -0
  48. package/dist/types/modules/safety/index.d.ts +4 -0
  49. package/dist/types/modules/safety/interfaces/safety-history.d.ts +217 -0
  50. package/package.json +1 -1
@@ -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,CAA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,CAAC,gBAAgB,SAAS,EAAE;IACpE,iBAAiB,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,oBAAoB,MAAM,EAAE;CAC7D,CAAC"}
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,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,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,QAAQ,MAAM,EAAE;IAC1C,YAAY,EAAE,CAAC,cAAsB,EAAE,EAAE,CAAC,gBAAgB,cAAc,EAAE;IAC1E,aAAa,EAAE,CAAC,cAAsB,EAAE,eAAuB,EAAE,EAAE,CAC/D,eAAe,cAAc,IAAI,eAAe,EAAE;CAChD,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,YAAY,EAAE,CAAC,SAAiB,EAAE,EAAE,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,107 @@
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 { ApiPropertyOptional } from '@nestjs/swagger';
11
+ import { Transform, Type } from 'class-transformer';
12
+ import { IsBoolean, IsEnum, IsInt, IsOptional, Max, Min } from 'class-validator';
13
+ import { SAFETY_HISTORY_LIMITS } from '../constants/safety-history.const';
14
+ import { FollowMeStatus } from '../enums/follow-me.enums';
15
+ import { SafetyCheckStatus } from '../enums/safety-check-status.enum';
16
+ /** Turns 'true'/'false' query strings into booleans without accepting anything else. */
17
+ const toOptionalBoolean = ({ value }) => {
18
+ if (value === undefined || value === null || value === '')
19
+ return undefined;
20
+ if (typeof value === 'boolean')
21
+ return value;
22
+ const normalized = String(value).toLowerCase();
23
+ if (normalized === 'true')
24
+ return true;
25
+ if (normalized === 'false')
26
+ return false;
27
+ return undefined;
28
+ };
29
+ /**
30
+ * The app's Safety Check history, newest first. Only NARROWS the caller's own
31
+ * checks: there is deliberately no user or organization filter - both come from
32
+ * the trusted context.
33
+ */
34
+ export class SafetyCheckHistoryQueryDto {
35
+ }
36
+ __decorate([
37
+ ApiPropertyOptional({ minimum: 1, default: 1 }),
38
+ Type(() => Number),
39
+ IsInt(),
40
+ Min(1),
41
+ IsOptional(),
42
+ __metadata("design:type", Number)
43
+ ], SafetyCheckHistoryQueryDto.prototype, "page", void 0);
44
+ __decorate([
45
+ ApiPropertyOptional({
46
+ minimum: 1,
47
+ maximum: SAFETY_HISTORY_LIMITS.maxPageSize,
48
+ default: SAFETY_HISTORY_LIMITS.defaultPageSize,
49
+ }),
50
+ Type(() => Number),
51
+ IsInt(),
52
+ Min(1),
53
+ Max(SAFETY_HISTORY_LIMITS.maxPageSize),
54
+ IsOptional(),
55
+ __metadata("design:type", Number)
56
+ ], SafetyCheckHistoryQueryDto.prototype, "limit", void 0);
57
+ __decorate([
58
+ ApiPropertyOptional({ enum: SafetyCheckStatus }),
59
+ IsEnum(SafetyCheckStatus),
60
+ IsOptional(),
61
+ __metadata("design:type", String)
62
+ ], SafetyCheckHistoryQueryDto.prototype, "status", void 0);
63
+ __decorate([
64
+ ApiPropertyOptional({ description: 'Only checks that raised an SOS' }),
65
+ Transform(toOptionalBoolean),
66
+ IsBoolean(),
67
+ IsOptional(),
68
+ __metadata("design:type", Boolean)
69
+ ], SafetyCheckHistoryQueryDto.prototype, "sosOnly", void 0);
70
+ /** The app's Follow Me history, newest first - the caller's own journeys only. */
71
+ export class FollowMeHistoryQueryDto {
72
+ }
73
+ __decorate([
74
+ ApiPropertyOptional({ minimum: 1, default: 1 }),
75
+ Type(() => Number),
76
+ IsInt(),
77
+ Min(1),
78
+ IsOptional(),
79
+ __metadata("design:type", Number)
80
+ ], FollowMeHistoryQueryDto.prototype, "page", void 0);
81
+ __decorate([
82
+ ApiPropertyOptional({
83
+ minimum: 1,
84
+ maximum: SAFETY_HISTORY_LIMITS.maxPageSize,
85
+ default: SAFETY_HISTORY_LIMITS.defaultPageSize,
86
+ }),
87
+ Type(() => Number),
88
+ IsInt(),
89
+ Min(1),
90
+ Max(SAFETY_HISTORY_LIMITS.maxPageSize),
91
+ IsOptional(),
92
+ __metadata("design:type", Number)
93
+ ], FollowMeHistoryQueryDto.prototype, "limit", void 0);
94
+ __decorate([
95
+ ApiPropertyOptional({ enum: FollowMeStatus }),
96
+ IsEnum(FollowMeStatus),
97
+ IsOptional(),
98
+ __metadata("design:type", String)
99
+ ], FollowMeHistoryQueryDto.prototype, "status", void 0);
100
+ __decorate([
101
+ ApiPropertyOptional({ description: 'Only journeys that raised an SOS' }),
102
+ Transform(toOptionalBoolean),
103
+ IsBoolean(),
104
+ IsOptional(),
105
+ __metadata("design:type", Boolean)
106
+ ], FollowMeHistoryQueryDto.prototype, "sosOnly", void 0);
107
+ //# 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,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,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yDACE;AAKf;IAHC,mBAAmB,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAChD,MAAM,CAAC,iBAAiB,CAAC;IACzB,UAAU,EAAE;;0DACc;AAM3B;IAJC,mBAAmB,CAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IACtE,SAAS,CAAC,iBAAiB,CAAC;IAC5B,SAAS,EAAE;IACX,UAAU,EAAE;;2DACK;AAGtB,kFAAkF;AAClF,MAAM,OAAO,uBAAuB;CA8BnC;AAxBG;IALC,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC/C,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,UAAU,EAAE;;qDACC;AAYd;IAVC,mBAAmB,CAAC;QACjB,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,qBAAqB,CAAC,WAAW;QAC1C,OAAO,EAAE,qBAAqB,CAAC,eAAe;KACjD,CAAC;IACD,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,GAAG,CAAC,qBAAqB,CAAC,WAAW,CAAC;IACtC,UAAU,EAAE;;sDACE;AAKf;IAHC,mBAAmB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAC7C,MAAM,CAAC,cAAc,CAAC;IACtB,UAAU,EAAE;;uDACW;AAMxB;IAJC,mBAAmB,CAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IACxE,SAAS,CAAC,iBAAiB,CAAC;IAC5B,SAAS,EAAE;IACX,UAAU,EAAE;;wDACK"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Whether a session's recorded path can be drawn in its history.
3
+ *
4
+ * RECORDED clarion-gis holds at least one location for the session (a
5
+ * track point, or the location the device reported at start).
6
+ * NOT_RECORDED nothing was ever recorded: no trip was opened, or it holds no
7
+ * location. The map says so - it never shows where the user is now.
8
+ * UNAVAILABLE clarion-gis could not be read just now. Try again later; the
9
+ * rest of the history does not depend on it.
10
+ */
11
+ export var SafetyHistoryPathStatus;
12
+ (function (SafetyHistoryPathStatus) {
13
+ SafetyHistoryPathStatus["RECORDED"] = "RECORDED";
14
+ SafetyHistoryPathStatus["NOT_RECORDED"] = "NOT_RECORDED";
15
+ SafetyHistoryPathStatus["UNAVAILABLE"] = "UNAVAILABLE";
16
+ })(SafetyHistoryPathStatus || (SafetyHistoryPathStatus = {}));
17
+ /**
18
+ * Where a history timeline entry comes from: the session's lifecycle audit trail
19
+ * (what the user, the timer or the platform did), or - Follow Me only - what the
20
+ * journey monitors observed.
21
+ */
22
+ export var SafetyHistoryEventSource;
23
+ (function (SafetyHistoryEventSource) {
24
+ SafetyHistoryEventSource["LIFECYCLE"] = "LIFECYCLE";
25
+ SafetyHistoryEventSource["MONITOR"] = "MONITOR";
26
+ })(SafetyHistoryEventSource || (SafetyHistoryEventSource = {}));
27
+ //# 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,MAAM,CAAN,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IAC/B,gDAAqB,CAAA;IACrB,wDAA6B,CAAA;IAC7B,sDAA2B,CAAA;AAC/B,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAChC,mDAAuB,CAAA;IACvB,+CAAmB,CAAA;AACvB,CAAC,EAHW,wBAAwB,KAAxB,wBAAwB,QAGnC"}
@@ -3,17 +3,20 @@ export * from './enums/safety-check-status.enum';
3
3
  export * from './enums/safety-enums';
4
4
  export * from './enums/safety-error-code.enum';
5
5
  export * from './enums/follow-me.enums';
6
+ export * from './enums/safety-history.enums';
6
7
  // Constants
7
8
  export * from './constants/safety-check-limits.const';
8
9
  export * from './constants/safety-taxonomy.const';
9
10
  export * from './constants/safety-integration.const';
10
11
  export * from './constants/follow-me.const';
12
+ export * from './constants/safety-history.const';
11
13
  // Interfaces
12
14
  export * from './interfaces/safety-check';
13
15
  export * from './interfaces/safety-check-event';
14
16
  export * from './interfaces/safety-alert-context';
15
17
  export * from './interfaces/follow-me';
16
18
  export * from './interfaces/safety-analytics';
19
+ export * from './interfaces/safety-history';
17
20
  // DTOs
18
21
  export * from './dtos/safety-check.dto';
19
22
  export * from './dtos/safety-admin.dto';
@@ -21,6 +24,7 @@ export * from './dtos/safety-internal.dto';
21
24
  export * from './dtos/safety-alert-context.dto';
22
25
  export * from './dtos/follow-me.dto';
23
26
  export * from './dtos/safety-analytics.dto';
27
+ export * from './dtos/safety-history.dto';
24
28
  // Utilities
25
29
  export * from './utils/safety-check-state-machine';
26
30
  export * from './utils/safety-check-timing.util';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/safety/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AAExC,YAAY;AACZ,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAE5C,aAAa;AACb,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAE9C,OAAO;AACP,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAE5C,YAAY;AACZ,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/safety/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAE7C,YAAY;AACZ,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AAEjD,aAAa;AACb,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAE5C,OAAO;AACP,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAE1C,YAAY;AACZ,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=safety-history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safety-history.js","sourceRoot":"","sources":["../../../../../src/modules/safety/interfaces/safety-history.ts"],"names":[],"mappings":""}
@@ -39,8 +39,8 @@ export const SMS_TEMPLATES = {
39
39
  },
40
40
  [SmsTemplateType.INCIDENT_GUARDIAN_NOTIFICATION]: {
41
41
  name: 'Incident Guardian Notification',
42
- content: '{{GUARDIAN_FIRSTNAME}}, an emergency incident has been reported by {{REPORTER_FIRSTNAME}} on {{APP_NAME}} at this location: {{LOCATION_LINK}}. You are being notified because they added you as their guardian on the app. Please check in on them',
43
- variables: ['REPORTER_FIRSTNAME', 'GUARDIAN_FIRSTNAME', 'APP_NAME', 'LOCATION_LINK'],
42
+ content: '{{GUARDIAN_FIRSTNAME}}, an emergency incident ({{INCIDENT_TYPE}}) has been reported by {{REPORTER_FIRSTNAME}} on {{APP_NAME}} at this location: {{LOCATION_LINK}}. You are being notified because they added you as their guardian on the app. Please check in on them',
43
+ variables: ['REPORTER_FIRSTNAME', 'GUARDIAN_FIRSTNAME', 'APP_NAME', 'LOCATION_LINK', 'INCIDENT_TYPE'],
44
44
  description: 'Template for incident guardian notifications'
45
45
  },
46
46
  [SmsTemplateType.SAFETY_CHECK_GUARDIAN_STARTED]: {
@@ -1 +1 @@
1
- {"version":3,"file":"sms-templates.config.js","sourceRoot":"","sources":["../../../../../src/modules/sms/constants/sms-templates.config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC5C,SAAS,EAAE;QACP,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE;YAChC,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,qIAAqI;YAC9I,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC;YACpC,WAAW,EAAE,6CAA6C;SAC7D;QACD,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE;YAC9B,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,oKAAoK;YAC7K,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC;YACpC,WAAW,EAAE,gDAAgD;SAChE;QACD,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE;YACvB,IAAI,EAAE,iBAAiB;YACvB,OAAO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;gBACrB,cAAc;gBACd,iCAAiC;gBACjC,yBAAyB;aAC5B,CAAC,IAAI,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,EAAE,eAAe,CAAC;YAC1J,WAAW,EAAE,uIAAuI;SACvJ;QACD,CAAC,eAAe,CAAC,yBAAyB,CAAC,EAAE;YACzC,IAAI,EAAE,6BAA6B;YACnC,OAAO,EAAE,kDAAkD;YAC3D,SAAS,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,CAAC;YAClD,WAAW,EAAE,oHAAoH;SACpI;QACD,CAAC,eAAe,CAAC,oBAAoB,CAAC,EAAE;YACpC,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,0IAA0I;YACnJ,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC;YAClD,WAAW,EAAE,oCAAoC;SACpD;QACD,CAAC,eAAe,CAAC,oBAAoB,CAAC,EAAE;YACpC,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,aAAa;YACtB,SAAS,EAAE,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,uCAAuC;SACvD;KACJ;CACJ,CAAC"}
1
+ {"version":3,"file":"sms-templates.config.js","sourceRoot":"","sources":["../../../../../src/modules/sms/constants/sms-templates.config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC5C,SAAS,EAAE;QACP,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE;YAChC,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,qIAAqI;YAC9I,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC;YACpC,WAAW,EAAE,6CAA6C;SAC7D;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aultMaxPoints: 500;
4
+ readonly minMaxPoints: 2;
5
+ readonly maxMaxPoints: 2000;
6
+ };
7
+ /**
8
+ * GET /trips/:tripId/path-snapshot (internal, clarion-safety only).
9
+ *
10
+ * `ownerUserId` is the user the caller has already established owns the safety
11
+ * record; clarion-gis refuses the read unless the trip is theirs too, so a
12
+ * mixed-up trip id can never draw somebody else's path.
13
+ */
14
+ export declare class TripPathSnapshotQueryDto {
15
+ ownerUserId: number;
16
+ until?: string;
17
+ maxPoints?: number;
18
+ }
@@ -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';
@@ -0,0 +1,38 @@
1
+ import { TripPurpose } from '../enums/trip-privacy.enum';
2
+ /** A recorded fix reduced to what a map draws. */
3
+ export interface TripPathPoint {
4
+ lat: number;
5
+ lng: number;
6
+ timestamp: string;
7
+ }
8
+ /**
9
+ * A trip's recorded path, thinned for drawing on a map - what clarion-safety
10
+ * shows the owner of a Safety Check or Follow Me journey in their history.
11
+ *
12
+ * Everything here was recorded: the thinning only drops fixes that lie on the
13
+ * line between the ones kept, and the first and last fix in the window are
14
+ * always kept. Nothing is ever interpolated or snapped to a road.
15
+ */
16
+ export interface TripPathSnapshot {
17
+ tripId: string;
18
+ purpose: TripPurpose;
19
+ status: string;
20
+ startedAt: string;
21
+ endedAt: string | null;
22
+ /**
23
+ * Where the device was when the trip was opened, when it reported a fix then.
24
+ * Not a track point, and null when the device had no fix at the start.
25
+ */
26
+ startLocation: {
27
+ lat: number;
28
+ lng: number;
29
+ } | null;
30
+ /** Fixes recorded inside the window, before thinning. */
31
+ totalPoints: number;
32
+ /** Oldest first, at most `maxPoints` of them. */
33
+ points: TripPathPoint[];
34
+ /** True when fixes were dropped to stay under `maxPoints`. */
35
+ simplified: boolean;
36
+ /** Length of the recorded path inside the window, over every fix (not the thinned ones). */
37
+ distanceMeters: number | null;
38
+ }
@@ -0,0 +1,31 @@
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 declare const SAFETY_HISTORY_LIMITS: {
5
+ readonly defaultPageSize: 20;
6
+ readonly maxPageSize: 50;
7
+ /** Most fixes a history map is sent (the path is thinned to this in clarion-gis). */
8
+ readonly 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
+ readonly 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 declare const SAFETY_CHECK_HISTORY_EVENTS: readonly SafetyCheckAuditEventType[];
22
+ /** The same for a Follow Me journey's audit trail. External-link and chat plumbing stay out. */
23
+ export declare const FOLLOW_ME_HISTORY_EVENTS: readonly FollowMeAuditEventType[];
24
+ /**
25
+ * What the Follow Me monitors observed that the owner sees: confirmed findings
26
+ * only. Suspicions that cleared themselves (off route then back on, a crash
27
+ * report the checks rejected, a stop explained by traffic) and pure bookkeeping
28
+ * (ETA and route recalculation, already in the audit trail) are left out, so a
29
+ * history never says something happened that the monitors did not conclude.
30
+ */
31
+ export declare const FOLLOW_ME_HISTORY_MONITOR_EVENTS: readonly FollowMeSafetyEventType[];
@@ -48,6 +48,10 @@ export declare const SAFETY_INTERNAL_PATHS: {
48
48
  readonly shareTrip: (tripId: string) => string;
49
49
  readonly stopPrivateTrip: (tripId: string) => string;
50
50
  readonly tripSummary: (tripId: string) => string;
51
+ /** clarion-gis: a trip's recorded path thinned for a map (Safety History). */
52
+ readonly tripPathSnapshot: (tripId: string) => string;
53
+ /** clarion-incident: one incident, read AS the caller (their user context is forwarded). */
54
+ readonly incident: (incidentId: number) => string;
51
55
  };
52
56
  /**
53
57
  * go_router locations in clarion_mobile that pushes deep-link to. A push route
@@ -0,0 +1,20 @@
1
+ import { FollowMeStatus } from '../enums/follow-me.enums';
2
+ import { SafetyCheckStatus } from '../enums/safety-check-status.enum';
3
+ /**
4
+ * The app's Safety Check history, newest first. Only NARROWS the caller's own
5
+ * checks: there is deliberately no user or organization filter - both come from
6
+ * the trusted context.
7
+ */
8
+ export declare class SafetyCheckHistoryQueryDto {
9
+ page?: number;
10
+ limit?: number;
11
+ status?: SafetyCheckStatus;
12
+ sosOnly?: boolean;
13
+ }
14
+ /** The app's Follow Me history, newest first - the caller's own journeys only. */
15
+ export declare class FollowMeHistoryQueryDto {
16
+ page?: number;
17
+ limit?: number;
18
+ status?: FollowMeStatus;
19
+ sosOnly?: boolean;
20
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Whether a session's recorded path can be drawn in its history.
3
+ *
4
+ * RECORDED clarion-gis holds at least one location for the session (a
5
+ * track point, or the location the device reported at start).
6
+ * NOT_RECORDED nothing was ever recorded: no trip was opened, or it holds no
7
+ * location. The map says so - it never shows where the user is now.
8
+ * UNAVAILABLE clarion-gis could not be read just now. Try again later; the
9
+ * rest of the history does not depend on it.
10
+ */
11
+ export declare enum SafetyHistoryPathStatus {
12
+ RECORDED = "RECORDED",
13
+ NOT_RECORDED = "NOT_RECORDED",
14
+ UNAVAILABLE = "UNAVAILABLE"
15
+ }
16
+ /**
17
+ * Where a history timeline entry comes from: the session's lifecycle audit trail
18
+ * (what the user, the timer or the platform did), or - Follow Me only - what the
19
+ * journey monitors observed.
20
+ */
21
+ export declare enum SafetyHistoryEventSource {
22
+ LIFECYCLE = "LIFECYCLE",
23
+ MONITOR = "MONITOR"
24
+ }
@@ -2,21 +2,25 @@ export * from './enums/safety-check-status.enum';
2
2
  export * from './enums/safety-enums';
3
3
  export * from './enums/safety-error-code.enum';
4
4
  export * from './enums/follow-me.enums';
5
+ export * from './enums/safety-history.enums';
5
6
  export * from './constants/safety-check-limits.const';
6
7
  export * from './constants/safety-taxonomy.const';
7
8
  export * from './constants/safety-integration.const';
8
9
  export * from './constants/follow-me.const';
10
+ export * from './constants/safety-history.const';
9
11
  export * from './interfaces/safety-check';
10
12
  export * from './interfaces/safety-check-event';
11
13
  export * from './interfaces/safety-alert-context';
12
14
  export * from './interfaces/follow-me';
13
15
  export * from './interfaces/safety-analytics';
16
+ export * from './interfaces/safety-history';
14
17
  export * from './dtos/safety-check.dto';
15
18
  export * from './dtos/safety-admin.dto';
16
19
  export * from './dtos/safety-internal.dto';
17
20
  export * from './dtos/safety-alert-context.dto';
18
21
  export * from './dtos/follow-me.dto';
19
22
  export * from './dtos/safety-analytics.dto';
23
+ export * from './dtos/safety-history.dto';
20
24
  export * from './utils/safety-check-state-machine';
21
25
  export * from './utils/safety-check-timing.util';
22
26
  export * from './utils/follow-me-state-machine';
@@ -0,0 +1,217 @@
1
+ import { TripPathPoint } from '../../gis/interfaces/trip-path-snapshot';
2
+ import { FollowMeAuditEventType, FollowMeParticipantKind, FollowMeSafetyEventType, FollowMeSafetyTrigger, FollowMeStatus, FollowMeTransportMode } from '../enums/follow-me.enums';
3
+ import { SafetyCheckStatus } from '../enums/safety-check-status.enum';
4
+ import { SafetyCheckActorType, SafetyCheckAuditEventType, SafetyCheckSosTrigger } from '../enums/safety-enums';
5
+ import { SafetyHistoryEventSource, SafetyHistoryPathStatus } from '../enums/safety-history.enums';
6
+ import { FollowMePromptView, FollowMeRouteView, FollowMeWaypointView } from './follow-me';
7
+ export interface SafetyHistoryLocation {
8
+ lat: number;
9
+ lng: number;
10
+ }
11
+ /** The SOS incident a session raised, as clarion-incident shows it to the caller now. */
12
+ export interface SafetyHistoryIncident {
13
+ id: number;
14
+ /**
15
+ * False when clarion-incident could not be read just now, or would not show
16
+ * this incident to the caller - the id is still the session's own record.
17
+ */
18
+ available: boolean;
19
+ /** clarion-incident's status label ('Pending', 'Resolved', ...). */
20
+ status: string | null;
21
+ typeName: string | null;
22
+ categoryName: string | null;
23
+ createdAt: string | null;
24
+ }
25
+ /** Who an SOS reached, as clarion-incident reported when it created the incident. */
26
+ export interface SafetyHistoryEscalation {
27
+ guardiansAlerted: boolean | null;
28
+ serviceProviderAlerted: boolean | null;
29
+ }
30
+ /**
31
+ * Facts an event carries, by event type - each present only where the persisted
32
+ * record holds it.
33
+ */
34
+ export interface SafetyHistoryEventDetails {
35
+ /** SOS_TRIGGERED: why the SOS was raised. */
36
+ sosTrigger?: SafetyCheckSosTrigger | null;
37
+ /** Follow Me prompts and SOS: what made the journey ask (or the unanswered question behind an SOS). */
38
+ promptTrigger?: FollowMeSafetyTrigger | null;
39
+ /** SOS_INCIDENT_CREATED. */
40
+ incidentId?: number | null;
41
+ serviceProviderAlerted?: boolean | null;
42
+ guardiansAlerted?: boolean | null;
43
+ /** EXTENDED. */
44
+ additionalMinutes?: number | null;
45
+ /** CHECKED_IN / PROMPT_CONFIRMED: seconds between the question and the answer. */
46
+ responseSeconds?: number | null;
47
+ /** CHECKED_IN / STOPPED: the user answered while being asked. */
48
+ whilePrompted?: boolean | null;
49
+ /** PROMPT_STARTED: the countdown the user had. */
50
+ countdownSeconds?: number | null;
51
+ /** Follow Me guardian events: the name the user chose them by. */
52
+ guardianName?: string | null;
53
+ /** PROLONGED_STOP_DETECTED. */
54
+ stoppedMinutes?: number | null;
55
+ /** DEVIATION_CONFIRMED. */
56
+ distanceFromRouteMeters?: number | null;
57
+ }
58
+ /** One entry of a session's timeline, oldest first. */
59
+ export interface SafetyHistoryTimelineEntry {
60
+ /** Stable within the session (`audit:<id>`, `monitor:<id>`). */
61
+ id: string;
62
+ occurredAt: string;
63
+ source: SafetyHistoryEventSource;
64
+ eventType: SafetyCheckAuditEventType | FollowMeAuditEventType | FollowMeSafetyEventType;
65
+ /** Who caused a lifecycle entry; null for what a monitor observed. */
66
+ actorType: SafetyCheckActorType | null;
67
+ details: SafetyHistoryEventDetails;
68
+ /** Where it happened, when the record says - the owner's own location. */
69
+ location: SafetyHistoryLocation | null;
70
+ }
71
+ /** The recorded path of a session, thinned for a map. */
72
+ export interface SafetyHistoryPath {
73
+ status: SafetyHistoryPathStatus;
74
+ /** Oldest first; empty unless RECORDED. */
75
+ points: TripPathPoint[];
76
+ /** Fixes recorded for the session before thinning. */
77
+ totalPoints: number;
78
+ simplified: boolean;
79
+ distanceMeters: number | null;
80
+ /** Where the device was when the session started, when it reported a fix then. */
81
+ startLocation: SafetyHistoryLocation | null;
82
+ }
83
+ /** A row of the Safety Check history. */
84
+ export interface SafetyCheckHistoryItem {
85
+ id: string;
86
+ status: SafetyCheckStatus;
87
+ /** The words the user chose at start (their own text for "Write my own"). */
88
+ reasonLabel: string;
89
+ startedAt: string;
90
+ /** When it ended; null while open, and for an SOS (see sosTriggeredAt). */
91
+ endedAt: string | null;
92
+ /** Configured minutes from start to check-in, extensions included. */
93
+ durationMinutes: number;
94
+ extensionCount: number;
95
+ scheduledCheckInAt: string;
96
+ /** From the start to the end (or to the SOS). Null while open. */
97
+ actualDurationSeconds: number | null;
98
+ checkedInAt: string | null;
99
+ sosTriggered: boolean;
100
+ sosTrigger: SafetyCheckSosTrigger | null;
101
+ sosTriggeredAt: string | null;
102
+ /** Null until clarion-incident created the SOS (and for a check without one). */
103
+ incidentId: number | null;
104
+ /** At least one location was recorded. */
105
+ locationRecorded: boolean;
106
+ }
107
+ export interface SafetyCheckHistoryDetail {
108
+ check: SafetyCheckHistoryItem & {
109
+ promptCountdownSeconds: number;
110
+ promptStartedAt: string | null;
111
+ promptDeadlineAt: string | null;
112
+ notifyGuardiansOnStartEnd: boolean;
113
+ /** How many guardians the user chose for this check. */
114
+ guardianCount: number;
115
+ serviceProviderRequested: boolean;
116
+ serviceProviderAllowed: boolean;
117
+ trackPointCount: number;
118
+ lastLocationAt: string | null;
119
+ };
120
+ /** Null unless an SOS incident was created. */
121
+ escalation: SafetyHistoryEscalation | null;
122
+ timeline: SafetyHistoryTimelineEntry[];
123
+ incident: SafetyHistoryIncident | null;
124
+ serverTime: string;
125
+ }
126
+ /** The Safety Check's map. */
127
+ export interface SafetyCheckHistoryTrack {
128
+ checkId: string;
129
+ path: SafetyHistoryPath;
130
+ serverTime: string;
131
+ }
132
+ /** A row of the Follow Me history. */
133
+ export interface FollowMeHistoryItem {
134
+ id: string;
135
+ status: FollowMeStatus;
136
+ reasonLabel: string;
137
+ startedAt: string;
138
+ plannedEndAt: string;
139
+ /** Null while open, and for an SOS (see sosTriggeredAt). */
140
+ endedAt: string | null;
141
+ arrivedAt: string | null;
142
+ durationMinutes: number;
143
+ actualDurationSeconds: number | null;
144
+ transportMode: FollowMeTransportMode | null;
145
+ /** The planned START waypoint's label; null without a planned route. */
146
+ startLabel: string | null;
147
+ /** Null when the journey had no destination (Follow Me without a route). */
148
+ destinationLabel: string | null;
149
+ stopCount: number;
150
+ /** A route was planned and monitored. */
151
+ plannedRoute: boolean;
152
+ /** The arrival the plan promised (moved only by a legitimate recalculation). */
153
+ plannedArrivalAt: string | null;
154
+ sosTriggered: boolean;
155
+ sosTrigger: SafetyCheckSosTrigger | null;
156
+ /** The unanswered question behind a missed-prompt SOS. */
157
+ sosCause: FollowMeSafetyTrigger | null;
158
+ sosTriggeredAt: string | null;
159
+ incidentId: number | null;
160
+ locationRecorded: boolean;
161
+ }
162
+ /** A guardian the user asked to follow, and what they did - from the audit trail. */
163
+ export interface FollowMeHistoryGuardian {
164
+ displayName: string;
165
+ kind: FollowMeParticipantKind;
166
+ invitedAt: string;
167
+ /** Accepted at some point (they may have stopped following later). */
168
+ accepted: boolean;
169
+ acceptedAt: string | null;
170
+ /** Declined and never accepted. */
171
+ declined: boolean;
172
+ }
173
+ export interface FollowMeHistoryDetail {
174
+ session: FollowMeHistoryItem & {
175
+ promptCountdownSeconds: number;
176
+ notifyGuardiansOnStartEnd: boolean;
177
+ serviceProviderRequested: boolean;
178
+ serviceProviderAllowed: boolean;
179
+ crashDetectionEnabled: boolean;
180
+ /** The last live arrival estimate. */
181
+ lastEtaAt: string | null;
182
+ trackPointCount: number;
183
+ lastLocationAt: string | null;
184
+ };
185
+ /** START, STOPs in order, DESTINATION - the plan as the user made it. */
186
+ waypoints: FollowMeWaypointView[];
187
+ /** The original plan and every recalculation, oldest first. No geometry here (see the track). */
188
+ routes: FollowMeRouteView[];
189
+ /** Every safety question the journey asked, oldest first. */
190
+ prompts: FollowMePromptView[];
191
+ guardians: FollowMeHistoryGuardian[];
192
+ escalation: SafetyHistoryEscalation | null;
193
+ timeline: SafetyHistoryTimelineEntry[];
194
+ incident: SafetyHistoryIncident | null;
195
+ serverTime: string;
196
+ }
197
+ /** A safety event the map can pin: where a question was asked or a finding was made. */
198
+ export interface FollowMeHistoryEventMarker {
199
+ id: string;
200
+ occurredAt: string;
201
+ /** The monitor's finding; null for a prompt marker. */
202
+ eventType: FollowMeSafetyEventType | null;
203
+ /** The question asked; null for a finding without one. */
204
+ trigger: FollowMeSafetyTrigger | null;
205
+ lat: number;
206
+ lng: number;
207
+ }
208
+ /** The Follow Me journey's map: what was planned and what was travelled. */
209
+ export interface FollowMeHistoryTrack {
210
+ sessionId: string;
211
+ path: SafetyHistoryPath;
212
+ waypoints: FollowMeWaypointView[];
213
+ /** With geometry: ORIGINAL first, then each RECALCULATED in order. */
214
+ routes: FollowMeRouteView[];
215
+ eventMarkers: FollowMeHistoryEventMarker[];
216
+ serverTime: string;
217
+ }