grm-shared-library 1.1.225 → 1.1.227
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/permission/data/permissions.data.js +1 -0
- package/dist/cjs/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js +3 -0
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/cjs/modules/role/data/roles.data.js +4 -1
- package/dist/cjs/modules/role/data/roles.data.js.map +1 -1
- package/dist/cjs/modules/safety/dtos/safety-analytics.dto.js +49 -0
- package/dist/cjs/modules/safety/dtos/safety-analytics.dto.js.map +1 -0
- package/dist/cjs/modules/safety/enums/follow-me.enums.js +6 -0
- package/dist/cjs/modules/safety/enums/follow-me.enums.js.map +1 -1
- package/dist/cjs/modules/safety/enums/safety-error-code.enum.js +8 -0
- package/dist/cjs/modules/safety/enums/safety-error-code.enum.js.map +1 -1
- package/dist/cjs/modules/safety/index.js +2 -0
- package/dist/cjs/modules/safety/index.js.map +1 -1
- package/dist/cjs/modules/safety/interfaces/safety-analytics.js +12 -0
- package/dist/cjs/modules/safety/interfaces/safety-analytics.js.map +1 -0
- package/dist/esm/modules/permission/data/permissions.data.js +1 -0
- package/dist/esm/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/esm/modules/permission/enums/permission-actions.enum.js +3 -0
- package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/esm/modules/role/data/roles.data.js +4 -1
- package/dist/esm/modules/role/data/roles.data.js.map +1 -1
- package/dist/esm/modules/safety/dtos/safety-analytics.dto.js +45 -0
- package/dist/esm/modules/safety/dtos/safety-analytics.dto.js.map +1 -0
- package/dist/esm/modules/safety/enums/follow-me.enums.js +6 -0
- package/dist/esm/modules/safety/enums/follow-me.enums.js.map +1 -1
- package/dist/esm/modules/safety/enums/safety-error-code.enum.js +8 -0
- package/dist/esm/modules/safety/enums/safety-error-code.enum.js.map +1 -1
- package/dist/esm/modules/safety/index.js +2 -0
- package/dist/esm/modules/safety/index.js.map +1 -1
- package/dist/esm/modules/safety/interfaces/safety-analytics.js +11 -0
- package/dist/esm/modules/safety/interfaces/safety-analytics.js.map +1 -0
- package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +1 -0
- package/dist/types/modules/safety/dtos/safety-analytics.dto.d.ts +11 -0
- package/dist/types/modules/safety/enums/follow-me.enums.d.ts +6 -0
- package/dist/types/modules/safety/enums/safety-error-code.enum.d.ts +9 -1
- package/dist/types/modules/safety/index.d.ts +2 -0
- package/dist/types/modules/safety/interfaces/safety-analytics.d.ts +349 -0
- package/package.json +72 -72
|
@@ -226,6 +226,12 @@ export var FollowMeErrorCode;
|
|
|
226
226
|
FollowMeErrorCode["SERVICE_PROVIDER_NOT_ENTITLED"] = "FOLLOW_ME_SERVICE_PROVIDER_NOT_ENTITLED";
|
|
227
227
|
FollowMeErrorCode["PROMPT_NOT_ACTIVE"] = "FOLLOW_ME_PROMPT_NOT_ACTIVE";
|
|
228
228
|
FollowMeErrorCode["TRACKING_CLOSED"] = "FOLLOW_ME_TRACKING_CLOSED";
|
|
229
|
+
/** clarion-gis could not take the points right now (503; the app keeps them queued). */
|
|
230
|
+
FollowMeErrorCode["TRACKING_UNAVAILABLE"] = "FOLLOW_ME_TRACKING_UNAVAILABLE";
|
|
231
|
+
/** The `since` cursor is not a valid instant. */
|
|
232
|
+
FollowMeErrorCode["INVALID_CURSOR"] = "FOLLOW_ME_INVALID_CURSOR";
|
|
233
|
+
/** Internal advance lost a race; retry (503, never ends the timer). */
|
|
234
|
+
FollowMeErrorCode["ADVANCE_RETRY"] = "FOLLOW_ME_ADVANCE_RETRY";
|
|
229
235
|
FollowMeErrorCode["NOT_A_PARTICIPANT"] = "FOLLOW_ME_NOT_A_PARTICIPANT";
|
|
230
236
|
FollowMeErrorCode["ACCESS_EXPIRED"] = "FOLLOW_ME_ACCESS_EXPIRED";
|
|
231
237
|
FollowMeErrorCode["LOCATION_NOT_SHARED"] = "FOLLOW_ME_LOCATION_NOT_SHARED";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"follow-me.enums.js","sourceRoot":"","sources":["../../../../../src/modules/safety/enums/follow-me.enums.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAN,IAAY,cAUX;AAVD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,iDAA+B,CAAA;IAC/B,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACrB,CAAC,EAVW,cAAc,KAAd,cAAc,QAUzB;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,yBAMX;AAND,WAAY,yBAAyB;IACjC,gDAAmB,CAAA;IACnB,kDAAqB,CAAA;IACrB,kDAAqB,CAAA;IACrB,oEAAuC,CAAA;IACvC,gDAAmB,CAAA;AACvB,CAAC,EANW,yBAAyB,KAAzB,yBAAyB,QAMpC;AAED,mFAAmF;AACnF,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAC/B,8DAAmC,CAAA;IACnC,kEAAuC,CAAA;AAC3C,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAED,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC7B,sCAAa,CAAA;IACb,wCAAe,CAAA;IACf,oDAA2B,CAAA;IAC3B,8DAAqC,CAAA;IACrC,sEAAsE;IACtE,sDAA6B,CAAA;AACjC,CAAC,EAPW,qBAAqB,KAArB,qBAAqB,QAOhC;AAED,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,uCAAe,CAAA;IACf,qCAAa,CAAA;IACb,mDAA2B,CAAA;AAC/B,CAAC,EAJW,oBAAoB,KAApB,o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AA;AACnD,CAAC,EAlBW,yBAAyB,KAAzB,yBAAyB,QAkBpC;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,kBAWX;AAXD,WAAY,kBAAkB;IAC1B,iEAAiE;IACjE,6DAAuC,CAAA;IACvC,oDAAoD;IACpD,mFAA6D,CAAA;IAC7D,yCAAyC;IACzC,2DAAqC,CAAA;IACrC,mEAAmE;IACnE,yEAAmD,CAAA;IACnD,+EAA+E;IAC/E,yDAAmC,CAAA;AACvC,CAAC,EAXW,kBAAkB,KAAlB,kBAAkB,QAW7B;AAED,wDAAwD;AACxD,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"follow-me.enums.js","sourceRoot":"","sources":["../../../../../src/modules/safety/enums/follow-me.enums.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAN,IAAY,cAUX;AAVD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,iDAA+B,CAAA;IAC/B,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACrB,CAAC,EAVW,cAAc,KAAd,cAAc,QAUzB;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,yBAMX;AAND,WAAY,yBAAyB;IACjC,gDAAmB,CAAA;IACnB,kDAAqB,CAAA;IACrB,kDAAqB,CAAA;IACrB,oEAAuC,CAAA;IACvC,gDAAmB,CAAA;AACvB,CAAC,EANW,yBAAyB,KAAzB,yBAAyB,QAMpC;AAED,mFAAmF;AACnF,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAC/B,8DAAmC,CAAA;IACnC,kEAAuC,CAAA;AAC3C,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAED,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;I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C,CAAA;IAC3C,0EAAqD,CAAA;IACrD,4DAAuC,CAAA;AAC3C,CAAC,EA7BW,iBAAiB,KAAjB,iBAAiB,QA6B5B"}
|
|
@@ -19,6 +19,14 @@ export var SafetyCheckErrorCode;
|
|
|
19
19
|
SafetyCheckErrorCode["NO_SOS_RECIPIENTS"] = "SAFETY_CHECK_NO_SOS_RECIPIENTS";
|
|
20
20
|
SafetyCheckErrorCode["SERVICE_PROVIDER_NOT_ENTITLED"] = "SAFETY_CHECK_SERVICE_PROVIDER_NOT_ENTITLED";
|
|
21
21
|
SafetyCheckErrorCode["TRACKING_CLOSED"] = "SAFETY_CHECK_TRACKING_CLOSED";
|
|
22
|
+
/** clarion-gis could not take the points right now (503; the app keeps them queued). */
|
|
23
|
+
SafetyCheckErrorCode["TRACKING_UNAVAILABLE"] = "SAFETY_CHECK_TRACKING_UNAVAILABLE";
|
|
22
24
|
SafetyCheckErrorCode["RATE_LIMITED"] = "SAFETY_CHECK_RATE_LIMITED";
|
|
25
|
+
/** The Idempotency-Key header is malformed. */
|
|
26
|
+
SafetyCheckErrorCode["INVALID_IDEMPOTENCY_KEY"] = "SAFETY_CHECK_INVALID_IDEMPOTENCY_KEY";
|
|
27
|
+
/** A reason with this code already exists in that organization/country scope. */
|
|
28
|
+
SafetyCheckErrorCode["REASON_DUPLICATE"] = "SAFETY_CHECK_REASON_DUPLICATE";
|
|
29
|
+
/** Internal advance lost a race; retry (503, never ends the timer). */
|
|
30
|
+
SafetyCheckErrorCode["ADVANCE_RETRY"] = "SAFETY_CHECK_ADVANCE_RETRY";
|
|
23
31
|
})(SafetyCheckErrorCode || (SafetyCheckErrorCode = {}));
|
|
24
32
|
//# sourceMappingURL=safety-error-code.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safety-error-code.enum.js","sourceRoot":"","sources":["../../../../../src/modules/safety/enums/safety-error-code.enum.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"safety-error-code.enum.js","sourceRoot":"","sources":["../../../../../src/modules/safety/enums/safety-error-code.enum.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,oBAwBX;AAxBD,WAAY,oBAAoB;IAC5B,4DAAoC,CAAA;IACpC,sEAA8C,CAAA;IAC9C,4DAAoC,CAAA;IACpC,oFAA4D,CAAA;IAC5D,8EAAsD,CAAA;IACtD,0EAAkD,CAAA;IAClD,oFAA4D,CAAA;IAC5D,sEAA8C,CAAA;IAC9C,sFAA8D,CAAA;IAC9D,8EAAsD,CAAA;IACtD,oFAA4D,CAAA;IAC5D,4EAAoD,CAAA;IACpD,oGAA4E,CAAA;IAC5E,wEAAgD,CAAA;IAChD,wFAAwF;IACxF,kFAA0D,CAAA;IAC1D,kEAA0C,CAAA;IAC1C,+CAA+C;IAC/C,wFAAgE,CAAA;IAChE,iFAAiF;IACjF,0EAAkD,CAAA;IAClD,uEAAuE;IACvE,oEAA4C,CAAA;AAChD,CAAC,EAxBW,oBAAoB,KAApB,oBAAoB,QAwB/B"}
|
|
@@ -13,12 +13,14 @@ export * from './interfaces/safety-check';
|
|
|
13
13
|
export * from './interfaces/safety-check-event';
|
|
14
14
|
export * from './interfaces/safety-alert-context';
|
|
15
15
|
export * from './interfaces/follow-me';
|
|
16
|
+
export * from './interfaces/safety-analytics';
|
|
16
17
|
// DTOs
|
|
17
18
|
export * from './dtos/safety-check.dto';
|
|
18
19
|
export * from './dtos/safety-admin.dto';
|
|
19
20
|
export * from './dtos/safety-internal.dto';
|
|
20
21
|
export * from './dtos/safety-alert-context.dto';
|
|
21
22
|
export * from './dtos/follow-me.dto';
|
|
23
|
+
export * from './dtos/safety-analytics.dto';
|
|
22
24
|
// Utilities
|
|
23
25
|
export * from './utils/safety-check-state-machine';
|
|
24
26
|
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;
|
|
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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safety analytics: how Safety Check and Follow Me were used over a period, by whom
|
|
3
|
+
* and how often, how they ended, what the monitoring caught and how the guardians
|
|
4
|
+
* followed. One read, computed by clarion-safety from one consistent snapshot, so
|
|
5
|
+
* every number on a dashboard agrees with every other.
|
|
6
|
+
*
|
|
7
|
+
* Counts only: never a location, a destination, a phone number, a name or a reason a
|
|
8
|
+
* user typed. A check or journey is counted by when it started, as it stands now.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=safety-analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safety-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/safety/interfaces/safety-analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -194,6 +194,7 @@ export declare enum PermissionActions {
|
|
|
194
194
|
USE_SAFETY_CHECK = "use:safety-check",
|
|
195
195
|
READ_SAFETY_CHECK = "read:safety-check",
|
|
196
196
|
MANAGE_SAFETY_CHECK_REASON = "manage:safety-check-reason",
|
|
197
|
+
READ_SAFETY_ANALYTICS = "read:safety-analytics",
|
|
197
198
|
USE_FOLLOW_ME = "use:follow-me",
|
|
198
199
|
READ_FOLLOW_ME = "read:follow-me",
|
|
199
200
|
TRACK_FOLLOW_ME = "track:follow-me",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The period a safety analytics read covers. Both ends optional: no `from` is
|
|
3
|
+
* "forever", no `to` is now.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SafetyAnalyticsQueryDto {
|
|
6
|
+
from?: string;
|
|
7
|
+
to?: string;
|
|
8
|
+
timeZone?: string;
|
|
9
|
+
/** Super-Admin only: one organization's figures instead of every organization's. Ignored for anybody else. */
|
|
10
|
+
organizationId?: number;
|
|
11
|
+
}
|
|
@@ -211,6 +211,12 @@ export declare enum FollowMeErrorCode {
|
|
|
211
211
|
SERVICE_PROVIDER_NOT_ENTITLED = "FOLLOW_ME_SERVICE_PROVIDER_NOT_ENTITLED",
|
|
212
212
|
PROMPT_NOT_ACTIVE = "FOLLOW_ME_PROMPT_NOT_ACTIVE",
|
|
213
213
|
TRACKING_CLOSED = "FOLLOW_ME_TRACKING_CLOSED",
|
|
214
|
+
/** clarion-gis could not take the points right now (503; the app keeps them queued). */
|
|
215
|
+
TRACKING_UNAVAILABLE = "FOLLOW_ME_TRACKING_UNAVAILABLE",
|
|
216
|
+
/** The `since` cursor is not a valid instant. */
|
|
217
|
+
INVALID_CURSOR = "FOLLOW_ME_INVALID_CURSOR",
|
|
218
|
+
/** Internal advance lost a race; retry (503, never ends the timer). */
|
|
219
|
+
ADVANCE_RETRY = "FOLLOW_ME_ADVANCE_RETRY",
|
|
214
220
|
NOT_A_PARTICIPANT = "FOLLOW_ME_NOT_A_PARTICIPANT",
|
|
215
221
|
ACCESS_EXPIRED = "FOLLOW_ME_ACCESS_EXPIRED",
|
|
216
222
|
LOCATION_NOT_SHARED = "FOLLOW_ME_LOCATION_NOT_SHARED",
|
|
@@ -18,5 +18,13 @@ export declare enum SafetyCheckErrorCode {
|
|
|
18
18
|
NO_SOS_RECIPIENTS = "SAFETY_CHECK_NO_SOS_RECIPIENTS",
|
|
19
19
|
SERVICE_PROVIDER_NOT_ENTITLED = "SAFETY_CHECK_SERVICE_PROVIDER_NOT_ENTITLED",
|
|
20
20
|
TRACKING_CLOSED = "SAFETY_CHECK_TRACKING_CLOSED",
|
|
21
|
-
|
|
21
|
+
/** clarion-gis could not take the points right now (503; the app keeps them queued). */
|
|
22
|
+
TRACKING_UNAVAILABLE = "SAFETY_CHECK_TRACKING_UNAVAILABLE",
|
|
23
|
+
RATE_LIMITED = "SAFETY_CHECK_RATE_LIMITED",
|
|
24
|
+
/** The Idempotency-Key header is malformed. */
|
|
25
|
+
INVALID_IDEMPOTENCY_KEY = "SAFETY_CHECK_INVALID_IDEMPOTENCY_KEY",
|
|
26
|
+
/** A reason with this code already exists in that organization/country scope. */
|
|
27
|
+
REASON_DUPLICATE = "SAFETY_CHECK_REASON_DUPLICATE",
|
|
28
|
+
/** Internal advance lost a race; retry (503, never ends the timer). */
|
|
29
|
+
ADVANCE_RETRY = "SAFETY_CHECK_ADVANCE_RETRY"
|
|
22
30
|
}
|
|
@@ -10,11 +10,13 @@ export * from './interfaces/safety-check';
|
|
|
10
10
|
export * from './interfaces/safety-check-event';
|
|
11
11
|
export * from './interfaces/safety-alert-context';
|
|
12
12
|
export * from './interfaces/follow-me';
|
|
13
|
+
export * from './interfaces/safety-analytics';
|
|
13
14
|
export * from './dtos/safety-check.dto';
|
|
14
15
|
export * from './dtos/safety-admin.dto';
|
|
15
16
|
export * from './dtos/safety-internal.dto';
|
|
16
17
|
export * from './dtos/safety-alert-context.dto';
|
|
17
18
|
export * from './dtos/follow-me.dto';
|
|
19
|
+
export * from './dtos/safety-analytics.dto';
|
|
18
20
|
export * from './utils/safety-check-state-machine';
|
|
19
21
|
export * from './utils/safety-check-timing.util';
|
|
20
22
|
export * from './utils/follow-me-state-machine';
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safety analytics: how Safety Check and Follow Me were used over a period, by whom
|
|
3
|
+
* and how often, how they ended, what the monitoring caught and how the guardians
|
|
4
|
+
* followed. One read, computed by clarion-safety from one consistent snapshot, so
|
|
5
|
+
* every number on a dashboard agrees with every other.
|
|
6
|
+
*
|
|
7
|
+
* Counts only: never a location, a destination, a phone number, a name or a reason a
|
|
8
|
+
* user typed. A check or journey is counted by when it started, as it stands now.
|
|
9
|
+
*/
|
|
10
|
+
/** How the period is cut into points for the charts. Chosen by the service from the length of the period. */
|
|
11
|
+
export type SafetyAnalyticsBucket = 'hour' | 'day' | 'week' | 'month';
|
|
12
|
+
export interface SafetyAnalyticsRange {
|
|
13
|
+
/** Inclusive, ISO 8601. The first check or journey when the period asked for was "forever". */
|
|
14
|
+
from: string;
|
|
15
|
+
/** Exclusive, ISO 8601. */
|
|
16
|
+
to: string;
|
|
17
|
+
bucket: SafetyAnalyticsBucket;
|
|
18
|
+
/** IANA time zone the buckets, the days and the hour-of-week grid are cut in. */
|
|
19
|
+
timeZone: string;
|
|
20
|
+
}
|
|
21
|
+
/** A count by a key (a status, a trigger, a band), largest first unless the section says otherwise. */
|
|
22
|
+
export interface SafetyAnalyticsCount<K extends string = string> {
|
|
23
|
+
key: K;
|
|
24
|
+
count: number;
|
|
25
|
+
}
|
|
26
|
+
/** How many sessions a user started in the period, banded. */
|
|
27
|
+
export type SafetyAnalyticsFrequencyBand = '1' | '2-3' | '4-9' | '10+';
|
|
28
|
+
export interface SafetyAnalyticsFrequencyRow {
|
|
29
|
+
band: SafetyAnalyticsFrequencyBand;
|
|
30
|
+
/** Users who started that many Safety Checks. */
|
|
31
|
+
safetyCheck: number;
|
|
32
|
+
/** Users who started that many Follow Me journeys. */
|
|
33
|
+
followMe: number;
|
|
34
|
+
/** Users who started that many of either, together. */
|
|
35
|
+
any: number;
|
|
36
|
+
}
|
|
37
|
+
export interface SafetyAnalyticsUsagePoint {
|
|
38
|
+
/** The bucket's start, local to the range's time zone, without an offset ("2026-09-21T14:00:00"). */
|
|
39
|
+
bucket: string;
|
|
40
|
+
/** Distinct users who started either feature in the bucket. */
|
|
41
|
+
activeUsers: number;
|
|
42
|
+
safetyCheckUsers: number;
|
|
43
|
+
followMeUsers: number;
|
|
44
|
+
/** Users whose very first check or journey started in the bucket. */
|
|
45
|
+
newUsers: number;
|
|
46
|
+
safetyChecks: number;
|
|
47
|
+
followMeJourneys: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Who uses the safety features, and how often. A user is "active" in a period when
|
|
51
|
+
* they started a Safety Check or a Follow Me journey in it.
|
|
52
|
+
*/
|
|
53
|
+
export interface SafetyAnalyticsUsage {
|
|
54
|
+
activeUsers: number;
|
|
55
|
+
safetyCheckUsers: number;
|
|
56
|
+
followMeUsers: number;
|
|
57
|
+
/** Used both features in the period. */
|
|
58
|
+
bothFeatures: number;
|
|
59
|
+
/** Active users whose first-ever check or journey (in this scope) started in the period. */
|
|
60
|
+
newUsers: number;
|
|
61
|
+
/** Active users who had used a safety feature before the period. */
|
|
62
|
+
returningUsers: number;
|
|
63
|
+
/** Active in the previous period of the same length AND in this one; null for "forever". */
|
|
64
|
+
retainedUsers: number | null;
|
|
65
|
+
/** Safety Checks + Follow Me journeys started. */
|
|
66
|
+
sessions: number;
|
|
67
|
+
/** Sessions per active user; null with no active user. */
|
|
68
|
+
sessionsPerUser: number | null;
|
|
69
|
+
/** Active users who started two or more sessions. */
|
|
70
|
+
repeatUsers: number;
|
|
71
|
+
/** Average number of distinct local days an active user used a feature on. */
|
|
72
|
+
averageActiveDays: number | null;
|
|
73
|
+
/** Distinct users per local day, averaged over every day of the period. */
|
|
74
|
+
averageDailyActiveUsers: number;
|
|
75
|
+
peakDailyActiveUsers: number;
|
|
76
|
+
/** The local day (YYYY-MM-DD) of the peak; null when nobody was active. */
|
|
77
|
+
peakDay: string | null;
|
|
78
|
+
frequency: SafetyAnalyticsFrequencyRow[];
|
|
79
|
+
timeline: SafetyAnalyticsUsagePoint[];
|
|
80
|
+
}
|
|
81
|
+
/** The headline figures of the previous period of the same length, for the change on each. */
|
|
82
|
+
export interface SafetyAnalyticsPrevious {
|
|
83
|
+
from: string;
|
|
84
|
+
to: string;
|
|
85
|
+
activeUsers: number;
|
|
86
|
+
safetyCheckUsers: number;
|
|
87
|
+
followMeUsers: number;
|
|
88
|
+
safetyChecks: number;
|
|
89
|
+
followMeJourneys: number;
|
|
90
|
+
safetyCheckSos: number;
|
|
91
|
+
followMeSos: number;
|
|
92
|
+
checkedIn: number;
|
|
93
|
+
arrived: number;
|
|
94
|
+
prompts: number;
|
|
95
|
+
promptsConfirmedOk: number;
|
|
96
|
+
}
|
|
97
|
+
/** When sessions start, by ISO weekday (1 = Monday) and local hour. All 168 cells are present. */
|
|
98
|
+
export interface SafetyAnalyticsHeatCell {
|
|
99
|
+
weekday: number;
|
|
100
|
+
hour: number;
|
|
101
|
+
safetyChecks: number;
|
|
102
|
+
followMe: number;
|
|
103
|
+
}
|
|
104
|
+
/** A reason the user chose, by its code (or its label for a reason with none); the user's own words are only counted. */
|
|
105
|
+
export interface SafetyAnalyticsReasonRow {
|
|
106
|
+
code: string | null;
|
|
107
|
+
/** The label most recently used for it. "Own reason" for a reason the user typed. */
|
|
108
|
+
label: string;
|
|
109
|
+
count: number;
|
|
110
|
+
/** Ended well: checked in (Safety Check) or arrived (Follow Me). */
|
|
111
|
+
completed: number;
|
|
112
|
+
sos: number;
|
|
113
|
+
}
|
|
114
|
+
export interface SafetyCheckAnalyticsTotals {
|
|
115
|
+
started: number;
|
|
116
|
+
/** Distinct users who started one. */
|
|
117
|
+
users: number;
|
|
118
|
+
checkedIn: number;
|
|
119
|
+
sosTriggered: number;
|
|
120
|
+
stopped: number;
|
|
121
|
+
expired: number;
|
|
122
|
+
cancelled: number;
|
|
123
|
+
failed: number;
|
|
124
|
+
/** Still running: created, active or prompting. */
|
|
125
|
+
open: number;
|
|
126
|
+
/** Checked in only after the check-in prompt appeared. */
|
|
127
|
+
checkedInAfterPrompt: number;
|
|
128
|
+
/** Checks extended at least once, and how many extensions in all. */
|
|
129
|
+
extended: number;
|
|
130
|
+
extensions: number;
|
|
131
|
+
/** Recorded at least one location point. */
|
|
132
|
+
withLocation: number;
|
|
133
|
+
trackPoints: number;
|
|
134
|
+
/** Asked for the service provider to be alerted, and whether their plan allowed it. */
|
|
135
|
+
providerRequested: number;
|
|
136
|
+
providerAllowed: number;
|
|
137
|
+
notifyGuardiansOnStartEnd: number;
|
|
138
|
+
/** Chose at least one guardian who does not use the app (reached by SMS). */
|
|
139
|
+
withExternalGuardians: number;
|
|
140
|
+
averageGuardians: number | null;
|
|
141
|
+
/** Typed their own reason instead of choosing one. */
|
|
142
|
+
customReasons: number;
|
|
143
|
+
/** An SOS that became an incident, one that has not (yet), and one it took more than one attempt to raise. */
|
|
144
|
+
sosIncidents: number;
|
|
145
|
+
sosUndelivered: number;
|
|
146
|
+
sosRetried: number;
|
|
147
|
+
/** Planned length, start to check-in time (extensions included). */
|
|
148
|
+
medianPlannedMinutes: number | null;
|
|
149
|
+
/** Start to the end, for the checks that ended. */
|
|
150
|
+
medianActualMinutes: number | null;
|
|
151
|
+
/** Prompt to check-in, for checks confirmed at the prompt. */
|
|
152
|
+
medianPromptResponseSeconds: number | null;
|
|
153
|
+
/** How long before the check-in time a user confirmed they were safe, for those who did before being prompted. */
|
|
154
|
+
medianMinutesToSpare: number | null;
|
|
155
|
+
}
|
|
156
|
+
export interface SafetyCheckAnalyticsPoint {
|
|
157
|
+
bucket: string;
|
|
158
|
+
started: number;
|
|
159
|
+
checkedIn: number;
|
|
160
|
+
sos: number;
|
|
161
|
+
stopped: number;
|
|
162
|
+
/** Expired, cancelled or failed. */
|
|
163
|
+
other: number;
|
|
164
|
+
open: number;
|
|
165
|
+
}
|
|
166
|
+
export interface SafetyCheckAnalytics {
|
|
167
|
+
totals: SafetyCheckAnalyticsTotals;
|
|
168
|
+
/** Every status a check can end in (or be in), zeros included. */
|
|
169
|
+
byStatus: SafetyAnalyticsCount[];
|
|
170
|
+
timeline: SafetyCheckAnalyticsPoint[];
|
|
171
|
+
/** What raised the SOS: a missed check-in, or the user asking for help. */
|
|
172
|
+
sosByTrigger: SafetyAnalyticsCount[];
|
|
173
|
+
reasons: SafetyAnalyticsReasonRow[];
|
|
174
|
+
/** Planned length, banded ('<=15m', '15-30m', '30-60m', '1-2h', '2-4h', '4-8h', '8-24h'), in that order. */
|
|
175
|
+
plannedDuration: SafetyAnalyticsCount[];
|
|
176
|
+
/** Extensions per check: '0', '1', '2', '3+'. */
|
|
177
|
+
extensions: SafetyAnalyticsCount[];
|
|
178
|
+
/** Guardians chosen per check: '1', '2', '3', '4+' (and '0' if a check had none). */
|
|
179
|
+
guardians: SafetyAnalyticsCount[];
|
|
180
|
+
/** The user's plan when the check started (FREE, TRIAL, PREMIUM; UNKNOWN when billing could not say). */
|
|
181
|
+
tiers: SafetyAnalyticsCount[];
|
|
182
|
+
countries: SafetyAnalyticsCount[];
|
|
183
|
+
}
|
|
184
|
+
export interface FollowMeAnalyticsTotals {
|
|
185
|
+
started: number;
|
|
186
|
+
users: number;
|
|
187
|
+
arrived: number;
|
|
188
|
+
sosTriggered: number;
|
|
189
|
+
stopped: number;
|
|
190
|
+
expired: number;
|
|
191
|
+
cancelled: number;
|
|
192
|
+
failed: number;
|
|
193
|
+
/** Still under way: created, active or prompting. */
|
|
194
|
+
active: number;
|
|
195
|
+
/** Started with a planned route, and how many of those were re-planned along the way. */
|
|
196
|
+
withRoute: number;
|
|
197
|
+
rerouted: number;
|
|
198
|
+
recalculations: number;
|
|
199
|
+
/** Journeys with stops on the way, and how many stops in all. */
|
|
200
|
+
withStops: number;
|
|
201
|
+
stops: number;
|
|
202
|
+
crashDetection: number;
|
|
203
|
+
/** Started without "allow all the time" location: sharing may stop when the app is closed. */
|
|
204
|
+
backgroundLocationDenied: number;
|
|
205
|
+
providerRequested: number;
|
|
206
|
+
providerAllowed: number;
|
|
207
|
+
notifyGuardiansOnStartEnd: number;
|
|
208
|
+
trackPoints: number;
|
|
209
|
+
medianPlannedMinutes: number | null;
|
|
210
|
+
/** Start to end, for journeys that ended. */
|
|
211
|
+
medianActualMinutes: number | null;
|
|
212
|
+
/** The planned route's length, for journeys with one. */
|
|
213
|
+
medianPlannedDistanceMeters: number | null;
|
|
214
|
+
/** The planned distance of every journey that arrived. */
|
|
215
|
+
arrivedDistanceMeters: number;
|
|
216
|
+
/** Arrived no later than the arrival the plan promised, or after it - of the journeys that had one. */
|
|
217
|
+
arrivedOnTime: number;
|
|
218
|
+
arrivedLate: number;
|
|
219
|
+
/** Arrival against the promised arrival (negative = early), median. */
|
|
220
|
+
medianArrivalDelaySeconds: number | null;
|
|
221
|
+
sosIncidents: number;
|
|
222
|
+
sosUndelivered: number;
|
|
223
|
+
}
|
|
224
|
+
export interface FollowMeAnalyticsPoint {
|
|
225
|
+
bucket: string;
|
|
226
|
+
started: number;
|
|
227
|
+
arrived: number;
|
|
228
|
+
sos: number;
|
|
229
|
+
stopped: number;
|
|
230
|
+
other: number;
|
|
231
|
+
active: number;
|
|
232
|
+
}
|
|
233
|
+
export interface FollowMeTransportRow {
|
|
234
|
+
/** A FollowMeTransportMode, or null for a journey without one. */
|
|
235
|
+
mode: string | null;
|
|
236
|
+
journeys: number;
|
|
237
|
+
arrived: number;
|
|
238
|
+
sos: number;
|
|
239
|
+
prompts: number;
|
|
240
|
+
}
|
|
241
|
+
export interface FollowMePromptTriggerRow {
|
|
242
|
+
/** A FollowMeSafetyTrigger. */
|
|
243
|
+
trigger: string;
|
|
244
|
+
prompts: number;
|
|
245
|
+
confirmedOk: number;
|
|
246
|
+
expired: number;
|
|
247
|
+
cancelled: number;
|
|
248
|
+
active: number;
|
|
249
|
+
medianResponseSeconds: number | null;
|
|
250
|
+
}
|
|
251
|
+
/** "Are you OK?" prompts the monitoring raised on the period's journeys. */
|
|
252
|
+
export interface FollowMePromptAnalytics {
|
|
253
|
+
total: number;
|
|
254
|
+
confirmedOk: number;
|
|
255
|
+
/** Not answered in time: each raised an SOS. */
|
|
256
|
+
expired: number;
|
|
257
|
+
/** Withdrawn because the journey ended or an SOS was raised first. */
|
|
258
|
+
cancelled: number;
|
|
259
|
+
active: number;
|
|
260
|
+
journeysPrompted: number;
|
|
261
|
+
medianResponseSeconds: number | null;
|
|
262
|
+
byTrigger: FollowMePromptTriggerRow[];
|
|
263
|
+
}
|
|
264
|
+
export interface FollowMeFollowerKindRow {
|
|
265
|
+
/** A FollowMeParticipantKind. */
|
|
266
|
+
kind: string;
|
|
267
|
+
invited: number;
|
|
268
|
+
accepted: number;
|
|
269
|
+
declined: number;
|
|
270
|
+
pending: number;
|
|
271
|
+
unanswered: number;
|
|
272
|
+
stoppedFollowing: number;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* The guardians asked to follow the period's journeys. Counts only - never who.
|
|
276
|
+
*
|
|
277
|
+
* Each guardian is in exactly one of accepted, declined, pending and unanswered, so
|
|
278
|
+
* those add up to `invited`. A guardian's answer is read from the audit trail: when a
|
|
279
|
+
* journey ends every participation is closed, whatever the answer was.
|
|
280
|
+
*/
|
|
281
|
+
export interface FollowMeFollowerAnalytics {
|
|
282
|
+
invited: number;
|
|
283
|
+
/** Followed the journey at some point. */
|
|
284
|
+
accepted: number;
|
|
285
|
+
/** Answered no, and never followed. */
|
|
286
|
+
declined: number;
|
|
287
|
+
/** Not answered yet, on a journey still under way. */
|
|
288
|
+
pending: number;
|
|
289
|
+
/** Never answered before the journey ended. */
|
|
290
|
+
unanswered: number;
|
|
291
|
+
/** Followed, then stopped following before the end - a part of `accepted`. */
|
|
292
|
+
stoppedFollowing: number;
|
|
293
|
+
/** Journeys at least one guardian followed. */
|
|
294
|
+
journeysFollowed: number;
|
|
295
|
+
averageInvited: number | null;
|
|
296
|
+
/** From the request to the guardian first accepting it. */
|
|
297
|
+
medianSecondsToAccept: number | null;
|
|
298
|
+
byKind: FollowMeFollowerKindRow[];
|
|
299
|
+
/** External guardians who opened their web link at least once. */
|
|
300
|
+
externalLinksOpened: number;
|
|
301
|
+
/** Visits to those links, counted at most once every 10 minutes per guardian. */
|
|
302
|
+
externalVisits: number;
|
|
303
|
+
}
|
|
304
|
+
export interface FollowMeAnalytics {
|
|
305
|
+
totals: FollowMeAnalyticsTotals;
|
|
306
|
+
byStatus: SafetyAnalyticsCount[];
|
|
307
|
+
timeline: FollowMeAnalyticsPoint[];
|
|
308
|
+
transportModes: FollowMeTransportRow[];
|
|
309
|
+
/** Where the planned route came from: GOOGLE, ESTIMATE, or NONE (no route). */
|
|
310
|
+
routeProviders: SafetyAnalyticsCount[];
|
|
311
|
+
/** Planned distance, banded ('<2km', '2-5km', '5-10km', '10-25km', '25-50km', '50km+', 'none'), in that order. */
|
|
312
|
+
distance: SafetyAnalyticsCount[];
|
|
313
|
+
plannedDuration: SafetyAnalyticsCount[];
|
|
314
|
+
prompts: FollowMePromptAnalytics;
|
|
315
|
+
/** What the SOS was about (a FollowMeSafetyTrigger), or MANUAL when the user raised it. */
|
|
316
|
+
sosByCause: SafetyAnalyticsCount[];
|
|
317
|
+
sosByTrigger: SafetyAnalyticsCount[];
|
|
318
|
+
followers: FollowMeFollowerAnalytics;
|
|
319
|
+
/** What the monitoring noticed (FollowMeSafetyEventType), whether or not it prompted. */
|
|
320
|
+
safetyEvents: SafetyAnalyticsCount[];
|
|
321
|
+
reasons: SafetyAnalyticsReasonRow[];
|
|
322
|
+
tiers: SafetyAnalyticsCount[];
|
|
323
|
+
countries: SafetyAnalyticsCount[];
|
|
324
|
+
}
|
|
325
|
+
/** Platform view across organizations only. The organization is named by the caller. */
|
|
326
|
+
export interface SafetyAnalyticsOrganizationRow {
|
|
327
|
+
organizationId: number;
|
|
328
|
+
activeUsers: number;
|
|
329
|
+
safetyChecks: number;
|
|
330
|
+
followMeJourneys: number;
|
|
331
|
+
safetyCheckSos: number;
|
|
332
|
+
followMeSos: number;
|
|
333
|
+
}
|
|
334
|
+
export interface SafetyAnalytics {
|
|
335
|
+
/** Null for every organization (a Super-Admin's platform view). */
|
|
336
|
+
organizationId: number | null;
|
|
337
|
+
/** Set when the figures are one control centre's (a control-centre admin's). */
|
|
338
|
+
controlCentreId: number | null;
|
|
339
|
+
range: SafetyAnalyticsRange;
|
|
340
|
+
generatedAt: string;
|
|
341
|
+
usage: SafetyAnalyticsUsage;
|
|
342
|
+
/** Null for "forever": there is nothing before it to compare with. */
|
|
343
|
+
previous: SafetyAnalyticsPrevious | null;
|
|
344
|
+
heatmap: SafetyAnalyticsHeatCell[];
|
|
345
|
+
safetyCheck: SafetyCheckAnalytics;
|
|
346
|
+
followMe: FollowMeAnalytics;
|
|
347
|
+
/** Super-Admin's view of every organization only. */
|
|
348
|
+
byOrganization?: SafetyAnalyticsOrganizationRow[];
|
|
349
|
+
}
|
package/package.json
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "grm-shared-library",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"main": "dist/cjs/index.js",
|
|
5
|
-
"module": "dist/esm/index.js",
|
|
6
|
-
"types": "dist/types/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/types/index.d.ts",
|
|
10
|
-
"import": "./dist/esm/index.js",
|
|
11
|
-
"require": "./dist/cjs/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./dist/modules/*": {
|
|
14
|
-
"types": "./dist/types/modules/*.d.ts",
|
|
15
|
-
"import": "./dist/esm/modules/*.js",
|
|
16
|
-
"require": "./dist/cjs/modules/*.js"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist/**/*"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"clean": "rimraf dist dist-test",
|
|
24
|
-
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
25
|
-
"build:esm": "tsc -p tsconfig.esm.json",
|
|
26
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
27
|
-
"build": "npm run clean && npm run build:types && npm run build:cjs && npm run build:esm",
|
|
28
|
-
"prepublishOnly": "npm run build",
|
|
29
|
-
"pretest": "rimraf dist-test",
|
|
30
|
-
"test": "tsc -p tsconfig.spec.json && node --test \"dist-test/**/*.spec.js\""
|
|
31
|
-
},
|
|
32
|
-
"keywords": [],
|
|
33
|
-
"author": "",
|
|
34
|
-
"license": "ISC",
|
|
35
|
-
"description": "",
|
|
36
|
-
"publishConfig": {
|
|
37
|
-
"access": "public"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@types/express": "^5.0.3",
|
|
41
|
-
"@types/geojson": "^7946.0.14",
|
|
42
|
-
"@types/node": "^22.10.5",
|
|
43
|
-
"rimraf": "^5.0.5",
|
|
44
|
-
"typescript": "^5.7.3"
|
|
45
|
-
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@nestjs/common": "^11.0.0",
|
|
48
|
-
"@nestjs/core": "^11.0.0",
|
|
49
|
-
"@nestjs/mapped-types": "^2.0.6",
|
|
50
|
-
"@nestjs/microservices": "^11.0.0",
|
|
51
|
-
"@nestjs/swagger": "^11.2.0",
|
|
52
|
-
"@sentry/node": "^8.0.0",
|
|
53
|
-
"class-transformer": "^0.5.0",
|
|
54
|
-
"class-validator": "^0.14.0",
|
|
55
|
-
"express": "^5.1.0",
|
|
56
|
-
"geojson": "^0.5.0",
|
|
57
|
-
"grm-shared-library": "^1.1.101",
|
|
58
|
-
"libphonenumber-js": "^1.13.8",
|
|
59
|
-
"rxjs": "^7.8.2",
|
|
60
|
-
"swagger-ui-express": "^5.0.1",
|
|
61
|
-
"@nestjs/config": "^4.0.0"
|
|
62
|
-
},
|
|
63
|
-
"peerDependencies": {
|
|
64
|
-
"@nestjs/common": "^11.0.0",
|
|
65
|
-
"@nestjs/core": "^11.0.0",
|
|
66
|
-
"@nestjs/microservices": "^11.0.0",
|
|
67
|
-
"@sentry/node": "^8.0.0",
|
|
68
|
-
"class-transformer": "^0.5.0",
|
|
69
|
-
"class-validator": "^0.14.0",
|
|
70
|
-
"@nestjs/config": "^4.0.0"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "grm-shared-library",
|
|
3
|
+
"version": "1.1.227",
|
|
4
|
+
"main": "dist/cjs/index.js",
|
|
5
|
+
"module": "dist/esm/index.js",
|
|
6
|
+
"types": "dist/types/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/types/index.d.ts",
|
|
10
|
+
"import": "./dist/esm/index.js",
|
|
11
|
+
"require": "./dist/cjs/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./dist/modules/*": {
|
|
14
|
+
"types": "./dist/types/modules/*.d.ts",
|
|
15
|
+
"import": "./dist/esm/modules/*.js",
|
|
16
|
+
"require": "./dist/cjs/modules/*.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/**/*"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"clean": "rimraf dist dist-test",
|
|
24
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
25
|
+
"build:esm": "tsc -p tsconfig.esm.json",
|
|
26
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
27
|
+
"build": "npm run clean && npm run build:types && npm run build:cjs && npm run build:esm",
|
|
28
|
+
"prepublishOnly": "npm run build",
|
|
29
|
+
"pretest": "rimraf dist-test",
|
|
30
|
+
"test": "tsc -p tsconfig.spec.json && node --test \"dist-test/**/*.spec.js\""
|
|
31
|
+
},
|
|
32
|
+
"keywords": [],
|
|
33
|
+
"author": "",
|
|
34
|
+
"license": "ISC",
|
|
35
|
+
"description": "",
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/express": "^5.0.3",
|
|
41
|
+
"@types/geojson": "^7946.0.14",
|
|
42
|
+
"@types/node": "^22.10.5",
|
|
43
|
+
"rimraf": "^5.0.5",
|
|
44
|
+
"typescript": "^5.7.3"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@nestjs/common": "^11.0.0",
|
|
48
|
+
"@nestjs/core": "^11.0.0",
|
|
49
|
+
"@nestjs/mapped-types": "^2.0.6",
|
|
50
|
+
"@nestjs/microservices": "^11.0.0",
|
|
51
|
+
"@nestjs/swagger": "^11.2.0",
|
|
52
|
+
"@sentry/node": "^8.0.0",
|
|
53
|
+
"class-transformer": "^0.5.0",
|
|
54
|
+
"class-validator": "^0.14.0",
|
|
55
|
+
"express": "^5.1.0",
|
|
56
|
+
"geojson": "^0.5.0",
|
|
57
|
+
"grm-shared-library": "^1.1.101",
|
|
58
|
+
"libphonenumber-js": "^1.13.8",
|
|
59
|
+
"rxjs": "^7.8.2",
|
|
60
|
+
"swagger-ui-express": "^5.0.1",
|
|
61
|
+
"@nestjs/config": "^4.0.0"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@nestjs/common": "^11.0.0",
|
|
65
|
+
"@nestjs/core": "^11.0.0",
|
|
66
|
+
"@nestjs/microservices": "^11.0.0",
|
|
67
|
+
"@sentry/node": "^8.0.0",
|
|
68
|
+
"class-transformer": "^0.5.0",
|
|
69
|
+
"class-validator": "^0.14.0",
|
|
70
|
+
"@nestjs/config": "^4.0.0"
|
|
71
|
+
}
|
|
72
|
+
}
|