clarion-shared-types 1.0.110 → 1.0.112

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 (31) hide show
  1. package/dist/cjs/index.js +1 -0
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/modules/newsfeed/index.js +19 -0
  4. package/dist/cjs/modules/newsfeed/index.js.map +1 -0
  5. package/dist/cjs/modules/newsfeed/interfaces/newsfeed-analytics.js +19 -0
  6. package/dist/cjs/modules/newsfeed/interfaces/newsfeed-analytics.js.map +1 -0
  7. package/dist/cjs/modules/partner/index.js +1 -0
  8. package/dist/cjs/modules/partner/index.js.map +1 -1
  9. package/dist/cjs/modules/partner/interfaces/partner-analytics.js +17 -0
  10. package/dist/cjs/modules/partner/interfaces/partner-analytics.js.map +1 -0
  11. package/dist/cjs/modules/permission/enums/permission-actions.enum.js +9 -0
  12. package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
  13. package/dist/esm/index.js +1 -0
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/esm/modules/newsfeed/index.js +3 -0
  16. package/dist/esm/modules/newsfeed/index.js.map +1 -0
  17. package/dist/esm/modules/newsfeed/interfaces/newsfeed-analytics.js +18 -0
  18. package/dist/esm/modules/newsfeed/interfaces/newsfeed-analytics.js.map +1 -0
  19. package/dist/esm/modules/partner/index.js +1 -0
  20. package/dist/esm/modules/partner/index.js.map +1 -1
  21. package/dist/esm/modules/partner/interfaces/partner-analytics.js +16 -0
  22. package/dist/esm/modules/partner/interfaces/partner-analytics.js.map +1 -0
  23. package/dist/esm/modules/permission/enums/permission-actions.enum.js +9 -0
  24. package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
  25. package/dist/types/index.d.ts +1 -0
  26. package/dist/types/modules/newsfeed/index.d.ts +1 -0
  27. package/dist/types/modules/newsfeed/interfaces/newsfeed-analytics.d.ts +324 -0
  28. package/dist/types/modules/partner/index.d.ts +1 -0
  29. package/dist/types/modules/partner/interfaces/partner-analytics.d.ts +378 -0
  30. package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +2 -0
  31. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -41,6 +41,7 @@ __exportStar(require("./modules/partner/index"), exports);
41
41
  __exportStar(require("./modules/support/index"), exports);
42
42
  __exportStar(require("./modules/safety/index"), exports);
43
43
  __exportStar(require("./modules/billing/index"), exports);
44
+ __exportStar(require("./modules/newsfeed/index"), exports);
44
45
  // Interfaces
45
46
  __exportStar(require("./modules/common/interfaces/server-message"), exports);
46
47
  __exportStar(require("./modules/common/interfaces/pagination"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,uDAAqC;AACrC,+DAA6C;AAC7C,yDAAuC;AACvC,6DAA2C;AAC3C,uDAAqC;AACrC,uDAAqC;AACrC,iEAA+C;AAC/C,gEAA8C;AAC9C,2DAAyC;AACzC,2DAAyC;AACzC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,yDAAuC;AACvC,mEAAiD;AACjD,+DAA6C;AAC7C,uDAAqC;AACrC,0DAAwC;AACxC,2DAAyC;AACzC,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,0DAAwC;AACxC,0DAAwC;AACxC,yDAAuC;AACvC,0DAAwC;AAExC,aAAa;AACb,6EAA2D;AAC3D,yEAAuD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,uDAAqC;AACrC,+DAA6C;AAC7C,yDAAuC;AACvC,6DAA2C;AAC3C,uDAAqC;AACrC,uDAAqC;AACrC,iEAA+C;AAC/C,gEAA8C;AAC9C,2DAAyC;AACzC,2DAAyC;AACzC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,yDAAuC;AACvC,mEAAiD;AACjD,+DAA6C;AAC7C,uDAAqC;AACrC,0DAAwC;AACxC,2DAAyC;AACzC,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,0DAAwC;AACxC,0DAAwC;AACxC,yDAAuC;AACvC,0DAAwC;AACxC,2DAAyC;AAEzC,aAAa;AACb,6EAA2D;AAC3D,yEAAuD"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Interfaces
18
+ __exportStar(require("./interfaces/newsfeed-analytics"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/newsfeed/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,aAAa;AACb,kEAAgD"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * Newsfeed analytics (the admin's Newsfeed Analytics): what an organization published
4
+ * to its members, and how the members responded - likes, comments, shares - when, how
5
+ * quickly, and to what kind of post.
6
+ *
7
+ * One read, computed by clarion-newsfeed from one consistent snapshot, so every number
8
+ * on a dashboard agrees with every other. Counts, durations and the organization's own
9
+ * posts only: never a member's name, never who liked, commented or shared.
10
+ *
11
+ * Posts are counted by when they were FIRST published (a post archived and published
12
+ * again counts once). Responses are counted by when they were made, whenever the post
13
+ * was published. A like that was taken back is gone (an unlike deletes it), so likes
14
+ * are the likes still standing - the ones taken back are counted separately, from the
15
+ * events the service emitted. Comments are every comment written, including any since
16
+ * hidden by a moderator or removed.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ //# sourceMappingURL=newsfeed-analytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"newsfeed-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/newsfeed/interfaces/newsfeed-analytics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG"}
@@ -24,6 +24,7 @@ __exportStar(require("./interfaces/partner-dispatch-progress.dto"), exports);
24
24
  __exportStar(require("./interfaces/partner-dispatch.dto"), exports);
25
25
  __exportStar(require("./interfaces/incident-partner-routing.dto"), exports);
26
26
  __exportStar(require("./interfaces/partner-membership.dto"), exports);
27
+ __exportStar(require("./interfaces/partner-analytics"), exports);
27
28
  // Utilities
28
29
  __exportStar(require("./utils/partner-display.util"), exports);
29
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/partner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,wDAAsC;AAEtC,oBAAoB;AACpB,oEAAkD;AAClD,uEAAqD;AACrD,yEAAuD;AACvD,6EAA2D;AAC3D,oEAAkD;AAClD,4EAA0D;AAC1D,sEAAoD;AAEpD,YAAY;AACZ,+DAA6C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/partner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,wDAAsC;AAEtC,oBAAoB;AACpB,oEAAkD;AAClD,uEAAqD;AACrD,yEAAuD;AACvD,6EAA2D;AAC3D,oEAAkD;AAClD,4EAA0D;AAC1D,sEAAoD;AACpD,iEAA+C;AAE/C,YAAY;AACZ,+DAA6C"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * Partner analytics (the admin's Partner Analytics): the partnerships an organization
4
+ * has with third-party responders, the emergencies routed to them and what became of
5
+ * each, how the partners' systems answered, and the subscribers registered with them.
6
+ *
7
+ * One read, computed by clarion-partner-services from one consistent snapshot, so every
8
+ * number on a dashboard agrees with every other. Counts, durations and the names an
9
+ * organization gave its own partnerships only: never a caller's name, a phone number,
10
+ * a member id, a payload or a partner's error text.
11
+ *
12
+ * Emergencies are counted by when they were ROUTED (the dispatch was raised) and shown
13
+ * as they stand now: a dispatch raised in the period and delivered after it counts as
14
+ * delivered. Partner calls and memberships are counted by when they happened.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ //# sourceMappingURL=partner-analytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partner-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/partner/interfaces/partner-analytics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG"}
@@ -26,6 +26,12 @@ var PermissionActions;
26
26
  // allowed to read than a base URL and a coverage rule.
27
27
  PermissionActions["READ_PARTNER_MEMBERSHIP"] = "read:partner-membership";
28
28
  PermissionActions["MANAGE_PARTNER_MEMBERSHIP"] = "manage:partner-membership";
29
+ // Partner Analytics: the partnerships, the emergencies routed through them and
30
+ // what became of each, how the partners' systems answered, and the members
31
+ // registered with them - totals, rates and durations only, never a caller, a
32
+ // member id or a payload. Held by everybody who reads partnerships; scoped by
33
+ // clarion-partner-services to the caller's organization or control centre.
34
+ PermissionActions["READ_PARTNER_ANALYTICS"] = "read:partner-analytics";
29
35
  // Module: ControlCentre
30
36
  PermissionActions["CREATE_CONTROL_CENTRE"] = "create:control-centre";
31
37
  PermissionActions["READ_CONTROL_CENTRE"] = "read:control-centre";
@@ -210,6 +216,9 @@ var PermissionActions;
210
216
  PermissionActions["READ_NEWSFEED_FEED"] = "read:newsfeed-feed";
211
217
  PermissionActions["ENGAGE_NEWSFEED_POST"] = "engage:newsfeed-post";
212
218
  PermissionActions["MODERATE_NEWSFEED_COMMENT"] = "moderate:newsfeed-comment";
219
+ // Newsfeed Analytics: what was published and how the members responded - totals
220
+ // only. Held by everybody who reads the posts as staff do (read:newsfeed-post).
221
+ PermissionActions["READ_NEWSFEED_ANALYTICS"] = "read:newsfeed-analytics";
213
222
  // Module: Alert Intake
214
223
  // The channels the PUBLIC reaches an organization on without the app - its SMS
215
224
  // short code, WhatsApp number and mailbox (clarion-alerts) - configuring them, and
@@ -1 +1 @@
1
- {"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAoRX;AApRD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,wEAAwE;IACxE,mEAAmE;IACnE,oEAA+C,CAAA;IAC/C,0EAAqD,CAAA;IACrD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,2EAA2E;IAC3E,4EAA4E;IAC5E,qEAAqE;IACrE,uDAAuD;IACvD,wEAAmD,CAAA;IACnD,4EAAuD,CAAA;IAEvD,wBAAwB;IACxB,oEAA+C,CAAA;IAC/C,gEAA2C,CAAA;IAC3C,oEAA+C,CAAA;IAC/C,oEAA+C,CAAA;IAE/C,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAC3B,4GAA4G;IAC5G,gEAA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3E,oEAA+C,CAAA;IAC/C,iFAAiF;IACjF,4EAA4E;IAC5E,mEAAmE;IACnE,oDAA+B,CAAA;IAC/B,sDAAiC,CAAA;IACjC,wDAAmC,CAAA;IAEnC,4DAA4D;IAC5D,8DAAyC,CAAA;IACzC,wGAAwG;IACxG,4DAAuC,CAAA;IACvC,wGAAwG;IACxG,gEAA2C,CAAA;AAC/C,CAAC,EApRW,iBAAiB,iCAAjB,iBAAiB,QAoR5B"}
1
+ {"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBA6RX;AA7RD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,wEAAwE;IACxE,mEAAmE;IACnE,oEAA+C,CAAA;IAC/C,0EAAqD,CAAA;IACrD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,2EAA2E;IAC3E,4EAA4E;IAC5E,qEAAqE;IACrE,uDAAuD;IACvD,wEAAmD,CAAA;IACnD,4EAAuD,CAAA;IACvD,+EAA+E;IAC/E,2EAA2E;IAC3E,6EAA6E;IAC7E,8EAA8E;IAC9E,2EAA2E;IAC3E,sEAAiD,CAAA;IAEjD,wBAAwB;IACxB,oEAA+C,CAAA;IAC/C,gEAA2C,CAAA;IAC3C,oEAA+C,CAAA;IAC/C,oEAA+C,CAAA;IAE/C,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAE3B,eAAe;IACf,gDAA2B,CAAA;IAC3B,4CAAuB,CAAA;IACvB,gDAA2B,CAAA;IAC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IAC1E,gDAAgD;IAChD,0DAAqC,CAAA;IACrC,4DAAuC,CAAA;IACvC,8EAAyD,CAAA;IACzD,2EAA2E;IAC3E,oEAA+C,CAAA;IAC/C,iFAAiF;IACjF,4EAA4E;IAC5E,mEAAmE;IACnE,oDAA+B,CAAA;IAC/B,sDAAiC,CAAA;IACjC,wDAAmC,CAAA;IAEnC,4DAA4D;IAC5D,8DAAyC,CAAA;IACzC,wGAAwG;IACxG,4DAAuC,CAAA;IACvC,wGAAwG;IACxG,gEAA2C,CAAA;AAC/C,CAAC,EA7RW,iBAAiB,iCAAjB,iBAAiB,QA6R5B"}
package/dist/esm/index.js CHANGED
@@ -25,6 +25,7 @@ export * from './modules/partner/index';
25
25
  export * from './modules/support/index';
26
26
  export * from './modules/safety/index';
27
27
  export * from './modules/billing/index';
28
+ export * from './modules/newsfeed/index';
28
29
  // Interfaces
29
30
  export * from './modules/common/interfaces/server-message';
30
31
  export * from './modules/common/interfaces/pagination';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAExC,aAAa;AACb,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AAEzC,aAAa;AACb,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC"}
@@ -0,0 +1,3 @@
1
+ // Interfaces
2
+ export * from './interfaces/newsfeed-analytics';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/newsfeed/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Newsfeed analytics (the admin's Newsfeed Analytics): what an organization published
3
+ * to its members, and how the members responded - likes, comments, shares - when, how
4
+ * quickly, and to what kind of post.
5
+ *
6
+ * One read, computed by clarion-newsfeed from one consistent snapshot, so every number
7
+ * on a dashboard agrees with every other. Counts, durations and the organization's own
8
+ * posts only: never a member's name, never who liked, commented or shared.
9
+ *
10
+ * Posts are counted by when they were FIRST published (a post archived and published
11
+ * again counts once). Responses are counted by when they were made, whenever the post
12
+ * was published. A like that was taken back is gone (an unlike deletes it), so likes
13
+ * are the likes still standing - the ones taken back are counted separately, from the
14
+ * events the service emitted. Comments are every comment written, including any since
15
+ * hidden by a moderator or removed.
16
+ */
17
+ export {};
18
+ //# sourceMappingURL=newsfeed-analytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"newsfeed-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/newsfeed/interfaces/newsfeed-analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
@@ -8,6 +8,7 @@ export * from './interfaces/partner-dispatch-progress.dto';
8
8
  export * from './interfaces/partner-dispatch.dto';
9
9
  export * from './interfaces/incident-partner-routing.dto';
10
10
  export * from './interfaces/partner-membership.dto';
11
+ export * from './interfaces/partner-analytics';
11
12
  // Utilities
12
13
  export * from './utils/partner-display.util';
13
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/partner/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,uBAAuB,CAAC;AAEtC,oBAAoB;AACpB,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AAEpD,YAAY;AACZ,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/partner/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,uBAAuB,CAAC;AAEtC,oBAAoB;AACpB,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAE/C,YAAY;AACZ,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Partner analytics (the admin's Partner Analytics): the partnerships an organization
3
+ * has with third-party responders, the emergencies routed to them and what became of
4
+ * each, how the partners' systems answered, and the subscribers registered with them.
5
+ *
6
+ * One read, computed by clarion-partner-services from one consistent snapshot, so every
7
+ * number on a dashboard agrees with every other. Counts, durations and the names an
8
+ * organization gave its own partnerships only: never a caller's name, a phone number,
9
+ * a member id, a payload or a partner's error text.
10
+ *
11
+ * Emergencies are counted by when they were ROUTED (the dispatch was raised) and shown
12
+ * as they stand now: a dispatch raised in the period and delivered after it counts as
13
+ * delivered. Partner calls and memberships are counted by when they happened.
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=partner-analytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partner-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/partner/interfaces/partner-analytics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -23,6 +23,12 @@ export var PermissionActions;
23
23
  // allowed to read than a base URL and a coverage rule.
24
24
  PermissionActions["READ_PARTNER_MEMBERSHIP"] = "read:partner-membership";
25
25
  PermissionActions["MANAGE_PARTNER_MEMBERSHIP"] = "manage:partner-membership";
26
+ // Partner Analytics: the partnerships, the emergencies routed through them and
27
+ // what became of each, how the partners' systems answered, and the members
28
+ // registered with them - totals, rates and durations only, never a caller, a
29
+ // member id or a payload. Held by everybody who reads partnerships; scoped by
30
+ // clarion-partner-services to the caller's organization or control centre.
31
+ PermissionActions["READ_PARTNER_ANALYTICS"] = "read:partner-analytics";
26
32
  // Module: ControlCentre
27
33
  PermissionActions["CREATE_CONTROL_CENTRE"] = "create:control-centre";
28
34
  PermissionActions["READ_CONTROL_CENTRE"] = "read:control-centre";
@@ -207,6 +213,9 @@ export var PermissionActions;
207
213
  PermissionActions["READ_NEWSFEED_FEED"] = "read:newsfeed-feed";
208
214
  PermissionActions["ENGAGE_NEWSFEED_POST"] = "engage:newsfeed-post";
209
215
  PermissionActions["MODERATE_NEWSFEED_COMMENT"] = "moderate:newsfeed-comment";
216
+ // Newsfeed Analytics: what was published and how the members responded - totals
217
+ // only. Held by everybody who reads the posts as staff do (read:newsfeed-post).
218
+ PermissionActions["READ_NEWSFEED_ANALYTICS"] = "read:newsfeed-analytics";
210
219
  // Module: Alert Intake
211
220
  // The channels the PUBLIC reaches an organization on without the app - its SMS
212
221
  // short code, WhatsApp number and mailbox (clarion-alerts) - configuring them, and
@@ -1 +1 @@
1
- {"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBAoRX;AApRD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,wEAAwE;IACxE,mEAAmE;IACnE,oEAA+C,CAAA;IAC/C,0EAAqD,CAAA;IACrD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,wEAAm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;IACvB,+EAA+E;IAC/E,mFAAmF;IACnF,4DAA4D;IAC5D,sFAAiE,CAAA;IACjE,kFAA6D,CAAA;IAC7D,sFAAiE,CAAA;IACjE,sFAAiE,CAAA;IACjE,kFAA6D,CAAA;IAC7D,4EAAuD,CAAA;IACvD,8EAAyD,CAAA;IACzD,8FAAyE,CAAA;IACzE,kGAA6E,CAAA;IAC7E,gFAA2D,CAAA;IAC3D,gFAAgF;IAChF,sFAAsF;IACtF,kFAA6D,CAAA;IAE7D,gFAAgF;IAChF,0EAA0E;IAC1E,gDAAgD;IAChD,0DAAqC,CAAA;IACrC,4DAAuC,CAAA;IACvC,8EAAyD,CAAA;IACzD,2EAA2E;IAC3E,oEAA+C,CAAA;IAC/C,iFAAiF;IACjF,4EAA4E;IAC5E,mEAAmE;IACnE,oDAA+B,CAAA;IAC/B,sDAAiC,CAAA;IACjC,wDAAmC,CAAA;IAEnC,4DAA4D;IAC5D,8DAAyC,CAAA;IACzC,wGAAwG;IACxG,4DAAuC,CAAA;IACvC,wGAAwG;IACxG,gEAA2C,CAAA;AAC/C,CAAC,EApRW,iBAAiB,KAAjB,iBAAiB,QAoR5B"}
1
+ {"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,iBA6RX;AA7RD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,wEAAwE;IACxE,mEAAmE;IACnE,oEAA+C,CAAA;IAC/C,0EAAqD,CAAA;IACrD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,2EAA2E;IAC3E,4EAA4E;IAC5E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zC,kEAA6C,CAAA;IAC7C,4EAAuD,CAAA;IACvD,gFAAgF;IAChF,gFAAgF;IAChF,wEAAmD,CAAA;IAEnD,uBAAuB;IACvB,+EAA+E;IAC/E,mFAAmF;IACnF,4DAA4D;IAC5D,sFAAiE,CAAA;IACjE,kFAA6D,CAAA;IAC7D,sFAAiE,CAAA;IACjE,sFAAiE,CAAA;IACjE,kFAA6D,CAAA;IAC7D,4EAAuD,CAAA;IACvD,8EAAyD,CAAA;IACzD,8FAAyE,CAAA;IACzE,kGAA6E,CAAA;IAC7E,gFAA2D,CAAA;IAC3D,gFAAgF;IAChF,sFAAsF;IACtF,kFAA6D,CAAA;IAE7D,gFAAgF;IAChF,0EAA0E;IAC1E,gDAAgD;IAChD,0DAAqC,CAAA;IACrC,4DAAuC,CAAA;IACvC,8EAAyD,CAAA;IACzD,2EAA2E;IAC3E,oEAA+C,CAAA;IAC/C,iFAAiF;IACjF,4EAA4E;IAC5E,mEAAmE;IACnE,oDAA+B,CAAA;IAC/B,sDAAiC,CAAA;IACjC,wDAAmC,CAAA;IAEnC,4DAA4D;IAC5D,8DAAyC,CAAA;IACzC,wGAAwG;IACxG,4DAAuC,CAAA;IACvC,wGAAwG;IACxG,gEAA2C,CAAA;AAC/C,CAAC,EA7RW,iBAAiB,KAAjB,iBAAiB,QA6R5B"}
@@ -24,5 +24,6 @@ export * from './modules/partner/index';
24
24
  export * from './modules/support/index';
25
25
  export * from './modules/safety/index';
26
26
  export * from './modules/billing/index';
27
+ export * from './modules/newsfeed/index';
27
28
  export * from './modules/common/interfaces/server-message';
28
29
  export * from './modules/common/interfaces/pagination';
@@ -0,0 +1 @@
1
+ export * from './interfaces/newsfeed-analytics';
@@ -0,0 +1,324 @@
1
+ /**
2
+ * Newsfeed analytics (the admin's Newsfeed Analytics): what an organization published
3
+ * to its members, and how the members responded - likes, comments, shares - when, how
4
+ * quickly, and to what kind of post.
5
+ *
6
+ * One read, computed by clarion-newsfeed from one consistent snapshot, so every number
7
+ * on a dashboard agrees with every other. Counts, durations and the organization's own
8
+ * posts only: never a member's name, never who liked, commented or shared.
9
+ *
10
+ * Posts are counted by when they were FIRST published (a post archived and published
11
+ * again counts once). Responses are counted by when they were made, whenever the post
12
+ * was published. A like that was taken back is gone (an unlike deletes it), so likes
13
+ * are the likes still standing - the ones taken back are counted separately, from the
14
+ * events the service emitted. Comments are every comment written, including any since
15
+ * hidden by a moderator or removed.
16
+ */
17
+ /** How the period is cut into points for the charts. Chosen by the service from the length of the period. */
18
+ export type NewsfeedAnalyticsBucket = 'hour' | 'day' | 'week' | 'month';
19
+ export interface NewsfeedAnalyticsRange {
20
+ /** Inclusive, ISO 8601. The first post's creation when the period asked for was "forever". */
21
+ from: string;
22
+ /** Exclusive, ISO 8601. */
23
+ to: string;
24
+ bucket: NewsfeedAnalyticsBucket;
25
+ /** IANA time zone the buckets, the times of day and the hour-of-week grid are cut in. */
26
+ timeZone: string;
27
+ }
28
+ /** A count by a key (a status, a kind, a band), largest first unless the section says otherwise. */
29
+ export interface NewsfeedAnalyticsCount<K extends string = string> {
30
+ key: K;
31
+ count: number;
32
+ }
33
+ /** Median and 90th percentile of one duration, in seconds; null when nothing was measured. */
34
+ export interface NewsfeedAnalyticsDuration {
35
+ median: number | null;
36
+ p90: number | null;
37
+ /** How many were measured. */
38
+ count: number;
39
+ }
40
+ /** What was published in the period, and the feed as it stands now. */
41
+ export interface NewsfeedAnalyticsPosts {
42
+ /** First published in the period. */
43
+ published: number;
44
+ /** Of those, written as a draft and published later (more than a minute after it was written). */
45
+ draftedFirst: number;
46
+ /** Of those, published the moment they were written. */
47
+ publishedStraightAway: number;
48
+ /** From written to published, for those drafted first. */
49
+ draftToPublish: NewsfeedAnalyticsDuration;
50
+ /** Written in the period, published or not. */
51
+ written: number;
52
+ /** Of those published in the period: with at least one image, with a video, with no media at all. */
53
+ withImages: number;
54
+ withVideo: number;
55
+ textOnly: number;
56
+ /** Images and videos attached to the posts published in the period. */
57
+ mediaItems: number;
58
+ /** Staff who published in the period. */
59
+ authors: number;
60
+ /** Of those published in the period: archived since, and deleted since. */
61
+ archivedSince: number;
62
+ deletedSince: number;
63
+ /** NOW, whatever the period: the posts members can see, drafts waiting, archived and deleted posts. */
64
+ liveNow: number;
65
+ draftsNow: number;
66
+ archivedNow: number;
67
+ deletedNow: number;
68
+ /** When the oldest draft still waiting was written; null when there is none. */
69
+ oldestDraftAt: string | null;
70
+ /** The last time anything was published - whatever the period. */
71
+ lastPublishedAt: string | null;
72
+ /** Every post now by where it stands: PUBLISHED, DRAFT, ARCHIVED, DELETED - zeros included. */
73
+ byStatus: NewsfeedAnalyticsCount[];
74
+ /** The posts published in the period by kind: TEXT, IMAGE (one), GALLERY (several), VIDEO - zeros included. */
75
+ byKind: NewsfeedAnalyticsCount[];
76
+ }
77
+ /** How the members responded in the period. */
78
+ export interface NewsfeedAnalyticsEngagement {
79
+ /** Likes, comments and shares made in the period. */
80
+ total: number;
81
+ /** Likes made in the period and still standing. */
82
+ likes: number;
83
+ /** Likes taken back in the period - they are not in `likes`. */
84
+ unliked: number;
85
+ /** Comments written in the period, replies included. */
86
+ comments: number;
87
+ shares: number;
88
+ /** Members who responded at all - and who liked, commented, shared (a member can be all three). */
89
+ members: number;
90
+ likers: number;
91
+ commenters: number;
92
+ sharers: number;
93
+ /** Members whose first response to this feed, ever, was in the period. */
94
+ newMembers: number;
95
+ /** Members who responded to more than one post in the period. */
96
+ repeatMembers: number;
97
+ /** Posts that drew any response in the period, whenever they were published. */
98
+ postsResponded: number;
99
+ /** Of the posts published in the period: those that have drawn a response, by the end of the period. */
100
+ publishedResponded: number;
101
+ /** Responses drawn by the posts published in the period, by the end of the period. */
102
+ publishedResponses: number;
103
+ /** publishedResponses / posts published in the period; null when nothing was published. */
104
+ perPublishedPost: number | null;
105
+ /** From a post published in the period going out to its first like, comment or share. */
106
+ firstResponse: NewsfeedAnalyticsDuration;
107
+ /** Of the responses to the posts published in the period, the share made in each post's first 24 hours, as a percentage. */
108
+ firstDayShare: number | null;
109
+ /** The period's responses by how old the post was: H1 (first hour), H6, D1, D3, W1, M1, OLDER - in that order. */
110
+ byPostAge: NewsfeedAnalyticsCount[];
111
+ /** The posts published in the period by the responses they drew: NONE, 1-2, 3-5, 6-10, 11-25, 26+ - in that order. */
112
+ postsByResponses: NewsfeedAnalyticsCount[];
113
+ /** The members who responded, by how many times: 1, 2-3, 4-10, 11+ - in that order. */
114
+ membersByResponses: NewsfeedAnalyticsCount[];
115
+ /** The members who responded, by what they did: LIKED, COMMENTED or SHARED only, or SEVERAL. */
116
+ membersByKind: NewsfeedAnalyticsCount[];
117
+ }
118
+ /** The conversation under the posts. */
119
+ export interface NewsfeedAnalyticsComments {
120
+ /** Written in the period. */
121
+ written: number;
122
+ /** Of those, replies to another comment. */
123
+ replies: number;
124
+ commenters: number;
125
+ /** Posts commented on in the period. */
126
+ postsDiscussed: number;
127
+ /** Of those written in the period, where they stand now: VISIBLE, HIDDEN by a moderator, REMOVED. */
128
+ visible: number;
129
+ hidden: number;
130
+ removed: number;
131
+ /** Every comment a moderator is holding back now, whenever it was written. */
132
+ hiddenNow: number;
133
+ }
134
+ /** Posts members passed on. */
135
+ export interface NewsfeedAnalyticsShares {
136
+ shares: number;
137
+ sharers: number;
138
+ /** Posts shared in the period. */
139
+ postsShared: number;
140
+ /** Where the app says it went: WHATSAPP, SMS, EMAIL, SYSTEM_SHARE (the phone's share sheet), COPIED_LINK, OTHER. */
141
+ byTarget: NewsfeedAnalyticsCount[];
142
+ /**
143
+ * The app the phone's share sheet handed it to, when the phone said - an Android
144
+ * package such as `com.whatsapp` - or NOT_RECORDED. The ten most used.
145
+ */
146
+ byApp: NewsfeedAnalyticsCount[];
147
+ }
148
+ /** One group of the posts published in the period, and what they drew by the end of it. */
149
+ export interface NewsfeedAnalyticsContentRow {
150
+ key: string;
151
+ posts: number;
152
+ /** Posts that drew at least one response. */
153
+ responded: number;
154
+ likes: number;
155
+ comments: number;
156
+ shares: number;
157
+ }
158
+ /** What draws a response: the posts published in the period, grouped four ways. */
159
+ export interface NewsfeedAnalyticsContent {
160
+ /** TEXT, IMAGE, GALLERY, VIDEO - zeros included. */
161
+ byKind: NewsfeedAnalyticsContentRow[];
162
+ /** SHORT (under 280 characters), MEDIUM (280 to 999), LONG (1,000 and more) - zeros included. */
163
+ byLength: NewsfeedAnalyticsContentRow[];
164
+ /** When it went out, in `range.timeZone`: NIGHT (00-06), MORNING (06-12), AFTERNOON (12-18), EVENING (18-24) - zeros included. */
165
+ byDaypart: NewsfeedAnalyticsContentRow[];
166
+ /** TITLED or UNTITLED - zeros included. */
167
+ byTitle: NewsfeedAnalyticsContentRow[];
168
+ }
169
+ /** One kind of event the service handed on, and how that went. */
170
+ export interface NewsfeedAnalyticsDeliveryType {
171
+ /** The event, e.g. newsfeed.post.published. */
172
+ type: string;
173
+ events: number;
174
+ delivered: number;
175
+ /** Failed and being retried, or given up on. */
176
+ failed: number;
177
+ /** Not handed on yet. */
178
+ waiting: number;
179
+ medianLagSeconds: number | null;
180
+ }
181
+ /**
182
+ * Behind the scenes: the events clarion-newsfeed handed to the platform about these
183
+ * posts in the period. A published post's event is what clarion-notification turns into
184
+ * the push members receive, so `announcements` is whether members were told.
185
+ */
186
+ export interface NewsfeedAnalyticsDelivery {
187
+ events: number;
188
+ delivered: number;
189
+ /** Not handed on yet (pending or being sent). */
190
+ waiting: number;
191
+ /** Failed, and to be tried again. */
192
+ retrying: number;
193
+ /** Failed every attempt - nobody was told. */
194
+ gaveUp: number;
195
+ /** Delivered, but not at the first attempt. */
196
+ retried: number;
197
+ /** From the event being written to it being handed on - delivered ones. */
198
+ lag: NewsfeedAnalyticsDuration;
199
+ /** Published-post events: the push announcements. */
200
+ announcements: number;
201
+ announcementsDelivered: number;
202
+ byType: NewsfeedAnalyticsDeliveryType[];
203
+ }
204
+ /** One post: what it is, and how members responded - in the period, and in all by the end of it. */
205
+ export interface NewsfeedAnalyticsPostRow {
206
+ id: number;
207
+ organizationId: number;
208
+ countryCode: string;
209
+ /** The title, or the opening of the text when it has none. */
210
+ title: string;
211
+ hasTitle: boolean;
212
+ /** PUBLISHED, DRAFT or ARCHIVED. */
213
+ status: string;
214
+ deleted: boolean;
215
+ /** TEXT, IMAGE, GALLERY or VIDEO. */
216
+ kind: string;
217
+ images: number;
218
+ videos: number;
219
+ publishedAt: string | null;
220
+ /** In the period. */
221
+ responses: number;
222
+ likes: number;
223
+ comments: number;
224
+ shares: number;
225
+ members: number;
226
+ /** In all, by the end of the period. */
227
+ totalLikes: number;
228
+ totalComments: number;
229
+ totalShares: number;
230
+ /** From publishing to its first response; null when it has none. */
231
+ firstResponseSeconds: number | null;
232
+ }
233
+ /** One country's posts. */
234
+ export interface NewsfeedAnalyticsCountryRow {
235
+ countryCode: string;
236
+ published: number;
237
+ liveNow: number;
238
+ likes: number;
239
+ comments: number;
240
+ shares: number;
241
+ members: number;
242
+ }
243
+ /** A Super-Admin's view of every organization: one row each, busiest first. */
244
+ export interface NewsfeedAnalyticsOrganizationRow {
245
+ organizationId: number;
246
+ published: number;
247
+ liveNow: number;
248
+ draftsNow: number;
249
+ likes: number;
250
+ comments: number;
251
+ shares: number;
252
+ members: number;
253
+ postsResponded: number;
254
+ /** Responses per post published in the period, by the end of it. */
255
+ perPublishedPost: number | null;
256
+ lastPublishedAt: string | null;
257
+ }
258
+ /** One point on the charts: a bucket of the period. */
259
+ export interface NewsfeedAnalyticsPoint {
260
+ /** Local wall-clock start of the bucket, in `range.timeZone` (no offset). */
261
+ bucket: string;
262
+ published: number;
263
+ likes: number;
264
+ comments: number;
265
+ shares: number;
266
+ /** Likes taken back. */
267
+ unliked: number;
268
+ /** Members who responded in the bucket. */
269
+ members: number;
270
+ }
271
+ /** One hour of the week: the responses made in it, and the posts published in it. Weekday 1 is Monday. */
272
+ export interface NewsfeedAnalyticsHeatCell {
273
+ weekday: number;
274
+ hour: number;
275
+ responses: number;
276
+ published: number;
277
+ }
278
+ /** The previous period of the same length, for the change on each headline figure. */
279
+ export interface NewsfeedAnalyticsPrevious {
280
+ from: string;
281
+ to: string;
282
+ published: number;
283
+ likes: number;
284
+ unliked: number;
285
+ comments: number;
286
+ shares: number;
287
+ members: number;
288
+ newMembers: number;
289
+ postsResponded: number;
290
+ medianSecondsToFirstResponse: number | null;
291
+ }
292
+ export interface NewsfeedAnalytics {
293
+ /** Whose figures: one organization, or null for every organization. */
294
+ organizationId: number | null;
295
+ /** The one country the figures are narrowed to, or null for every country. */
296
+ countryCode: string | null;
297
+ range: NewsfeedAnalyticsRange;
298
+ generatedAt: string;
299
+ previous: NewsfeedAnalyticsPrevious | null;
300
+ /** The countries posts were written for, in scope and whatever country is chosen - for narrowing to one. */
301
+ countryOptions: NewsfeedAnalyticsCount[];
302
+ posts: NewsfeedAnalyticsPosts;
303
+ engagement: NewsfeedAnalyticsEngagement;
304
+ comments: NewsfeedAnalyticsComments;
305
+ shares: NewsfeedAnalyticsShares;
306
+ content: NewsfeedAnalyticsContent;
307
+ delivery: NewsfeedAnalyticsDelivery;
308
+ timeline: NewsfeedAnalyticsPoint[];
309
+ /** All 168 hours of the week, Monday first, zeros included. */
310
+ heatmap: NewsfeedAnalyticsHeatCell[];
311
+ /** Posts published in the period or responded to in it, most responses in the period first - at most 50. */
312
+ topPosts: NewsfeedAnalyticsPostRow[];
313
+ byCountry: NewsfeedAnalyticsCountryRow[];
314
+ /** A Super-Admin looking at every organization only. */
315
+ byOrganization?: NewsfeedAnalyticsOrganizationRow[];
316
+ }
317
+ /** What a dashboard asks: the period, one country - and, for a Super-Admin, whose figures. */
318
+ export interface NewsfeedAnalyticsQuery {
319
+ from?: string;
320
+ to?: string;
321
+ timeZone?: string;
322
+ organizationId?: number;
323
+ countryCode?: string;
324
+ }
@@ -6,4 +6,5 @@ export * from './interfaces/partner-dispatch-progress.dto';
6
6
  export * from './interfaces/partner-dispatch.dto';
7
7
  export * from './interfaces/incident-partner-routing.dto';
8
8
  export * from './interfaces/partner-membership.dto';
9
+ export * from './interfaces/partner-analytics';
9
10
  export * from './utils/partner-display.util';
@@ -0,0 +1,378 @@
1
+ /**
2
+ * Partner analytics (the admin's Partner Analytics): the partnerships an organization
3
+ * has with third-party responders, the emergencies routed to them and what became of
4
+ * each, how the partners' systems answered, and the subscribers registered with them.
5
+ *
6
+ * One read, computed by clarion-partner-services from one consistent snapshot, so every
7
+ * number on a dashboard agrees with every other. Counts, durations and the names an
8
+ * organization gave its own partnerships only: never a caller's name, a phone number,
9
+ * a member id, a payload or a partner's error text.
10
+ *
11
+ * Emergencies are counted by when they were ROUTED (the dispatch was raised) and shown
12
+ * as they stand now: a dispatch raised in the period and delivered after it counts as
13
+ * delivered. Partner calls and memberships are counted by when they happened.
14
+ */
15
+ /** How the period is cut into points for the charts. Chosen by the service from the length of the period. */
16
+ export type PartnerAnalyticsBucket = 'hour' | 'day' | 'week' | 'month';
17
+ export interface PartnerAnalyticsRange {
18
+ /** Inclusive, ISO 8601. The first partnership's creation when the period asked for was "forever". */
19
+ from: string;
20
+ /** Exclusive, ISO 8601. */
21
+ to: string;
22
+ bucket: PartnerAnalyticsBucket;
23
+ /** IANA time zone the buckets and the hour-of-week grid are cut in. */
24
+ timeZone: string;
25
+ }
26
+ /** A count by a key (a status, a reason, a capability), largest first unless the section says otherwise. */
27
+ export interface PartnerAnalyticsCount<K extends string = string> {
28
+ key: K;
29
+ count: number;
30
+ }
31
+ /** A partnership the dashboard can be narrowed to - every one in scope, whatever is being shown. */
32
+ export interface PartnerAnalyticsPartnershipOption {
33
+ id: number;
34
+ organizationId: number;
35
+ name: string;
36
+ providerCode: string;
37
+ environment: string;
38
+ enabled: boolean;
39
+ }
40
+ /**
41
+ * The partnerships as configured now, and how each has been used in the period.
42
+ *
43
+ * Figures (`raised` onwards) are the period's; everything before them is the
44
+ * partnership's configuration and health as they stand now.
45
+ */
46
+ export interface PartnerAnalyticsPartnershipRow {
47
+ integrationId: number;
48
+ organizationId: number;
49
+ /** Null: every control centre in the organization may route through it. */
50
+ controlCentreId: number | null;
51
+ name: string;
52
+ providerCode: string;
53
+ environment: string;
54
+ enabled: boolean;
55
+ /** AUTO, MANUAL or DISABLED. */
56
+ routingMode: string;
57
+ /** The last health check's verdict: HEALTHY, DEGRADED, UNREACHABLE or UNKNOWN. */
58
+ status: string;
59
+ capabilities: string[];
60
+ membershipEnabled: boolean;
61
+ requireCoverForDispatch: boolean;
62
+ countryCode: string;
63
+ coverageRules: number;
64
+ enabledCoverageRules: number;
65
+ lastSuccessAt: string | null;
66
+ lastErrorAt: string | null;
67
+ lastHealthCheckAt: string | null;
68
+ createdAt: string;
69
+ /** Emergencies routed to it in the period. */
70
+ raised: number;
71
+ /** Of those, reached the partner (sent at least once). */
72
+ delivered: number;
73
+ failed: number;
74
+ acknowledged: number;
75
+ /** delivered / (delivered + failed), as a percentage; null when nothing was attempted. */
76
+ deliveryRate: number | null;
77
+ medianSecondsToAcknowledge: number | null;
78
+ /** Calls made to the partner's system in the period, and those that failed. */
79
+ calls: number;
80
+ failedCalls: number;
81
+ /** Memberships registered and live now, and those waiting for a person to act. */
82
+ activeMembers: number;
83
+ membersNeedingAttention: number;
84
+ }
85
+ /** The partnerships in scope, as configured now. */
86
+ export interface PartnerAnalyticsPartnerships {
87
+ total: number;
88
+ enabled: number;
89
+ disabled: number;
90
+ /** Routing modes of the ENABLED partnerships. */
91
+ autoRouting: number;
92
+ manualRouting: number;
93
+ routingOff: number;
94
+ production: number;
95
+ sandbox: number;
96
+ /** Health of the ENABLED partnerships. */
97
+ healthy: number;
98
+ degraded: number;
99
+ unreachable: number;
100
+ unknown: number;
101
+ membershipEnabled: number;
102
+ /** Withhold an emergency from the partner when the caller is not covered. */
103
+ coverGate: number;
104
+ coverageRules: number;
105
+ enabledCoverageRules: number;
106
+ byProvider: PartnerAnalyticsCount[];
107
+ /** Services bought, a partnership counted once under each of its capabilities. */
108
+ byCapability: PartnerAnalyticsCount[];
109
+ /** What the enabled coverage rules match on: ALL, INCIDENT_TYPE, INCIDENT_CATEGORY, EMERGENCY_TYPE. */
110
+ rulesByMatchType: PartnerAnalyticsCount[];
111
+ rows: PartnerAnalyticsPartnershipRow[];
112
+ }
113
+ /** Median and 90th percentile of one duration, in seconds; null when nothing was measured. */
114
+ export interface PartnerAnalyticsDuration {
115
+ median: number | null;
116
+ p90: number | null;
117
+ /** How many were measured. */
118
+ count: number;
119
+ }
120
+ /** A row per routing mode: AUTO goes straight out; MANUAL waits for an operator to confirm it. */
121
+ export interface PartnerAnalyticsModeRow {
122
+ mode: string;
123
+ raised: number;
124
+ delivered: number;
125
+ failed: number;
126
+ /** Rejected by an operator, or left to expire, or cancelled before it went. */
127
+ declined: number;
128
+ }
129
+ /** A row per partner: what it was sent and how it answered. */
130
+ export interface PartnerAnalyticsProviderRow {
131
+ provider: string;
132
+ raised: number;
133
+ delivered: number;
134
+ failed: number;
135
+ acknowledged: number;
136
+ medianSecondsToAcknowledge: number | null;
137
+ }
138
+ /** Emergencies routed to partners in the period, as they stand now. */
139
+ export interface PartnerAnalyticsDispatches {
140
+ /** Dispatches raised in the period - one per incident per partnership. */
141
+ raised: number;
142
+ /** Distinct incidents among them. */
143
+ incidents: number;
144
+ /** Reached the partner at least once (whatever became of them afterwards). */
145
+ delivered: number;
146
+ /** The partner assigned a responder - a crew or a vehicle is on it. */
147
+ acknowledged: number;
148
+ /** The partner closed it as done (a partner that never reports back never closes one). */
149
+ completed: number;
150
+ /** Could not be delivered: refused, or out of attempts. */
151
+ failed: number;
152
+ /** An operator declined to send it. */
153
+ rejected: number;
154
+ /** Nobody decided before the approval window closed. */
155
+ expired: number;
156
+ /** Stopped before it was sent. */
157
+ cancelled: number;
158
+ /** Stood down after it reached the partner. */
159
+ withdrawn: number;
160
+ /** Still waiting for an operator to confirm it, now. */
161
+ awaitingDecision: number;
162
+ /** Queued or being sent, now. */
163
+ inFlight: number;
164
+ /** delivered / (delivered + failed) - of the dispatches that were tried, the share that got through. */
165
+ deliveryRate: number | null;
166
+ /** acknowledged / delivered. */
167
+ acknowledgementRate: number | null;
168
+ /** completed / delivered. */
169
+ completionRate: number | null;
170
+ /** Delivered on the first attempt / delivered. */
171
+ firstAttemptRate: number | null;
172
+ /** Needed more than one attempt. */
173
+ retried: number;
174
+ /** Average attempts of the dispatches that were tried at all. */
175
+ averageAttempts: number | null;
176
+ timings: {
177
+ /** From routing to reaching the partner - for MANUAL, the operator's decision included. */
178
+ toSend: PartnerAnalyticsDuration;
179
+ /** From reaching the partner to the partner assigning a responder. */
180
+ toAcknowledge: PartnerAnalyticsDuration;
181
+ /** From reaching the partner to the partner closing it - completed ones only. */
182
+ toClose: PartnerAnalyticsDuration;
183
+ /** MANUAL only: from routing to an operator confirming or rejecting it. */
184
+ toDecide: PartnerAnalyticsDuration;
185
+ };
186
+ approvals: {
187
+ /** Dispatches routed in MANUAL mode. */
188
+ needed: number;
189
+ approved: number;
190
+ rejected: number;
191
+ expired: number;
192
+ /** Still waiting, now. */
193
+ waiting: number;
194
+ /** approved / (approved + rejected + expired). */
195
+ approvalRate: number | null;
196
+ };
197
+ /** Every status, in lifecycle order, zeros included. */
198
+ byStatus: PartnerAnalyticsCount[];
199
+ byMode: PartnerAnalyticsModeRow[];
200
+ byProvider: PartnerAnalyticsProviderRow[];
201
+ byCapability: PartnerAnalyticsCount[];
202
+ byCountry: PartnerAnalyticsCount[];
203
+ /** From the incident as it was routed. */
204
+ byEmergencyType: PartnerAnalyticsCount[];
205
+ byChannel: PartnerAnalyticsCount[];
206
+ byPriority: PartnerAnalyticsCount[];
207
+ /** Why the failed ones failed. */
208
+ failureReasons: PartnerAnalyticsCount[];
209
+ /**
210
+ * Whether the partner was told who the emergency was about: IDENTIFIED,
211
+ * COVERED_NOT_REGISTERED, NOT_COVERED, IDENTIFIER_REJECTED - or NOT_RECORDED for a
212
+ * dispatch made before this was kept.
213
+ */
214
+ memberIdentification: PartnerAnalyticsCount[];
215
+ /** The partner's own view, now: ACTIVE, CLOSED, UNKNOWN - or NONE when never heard. */
216
+ engagement: PartnerAnalyticsCount[];
217
+ }
218
+ /** Calls made to the partners' systems on the emergencies' behalf - sending, signing in, checking progress, standing down. */
219
+ export interface PartnerAnalyticsCalls {
220
+ calls: number;
221
+ succeeded: number;
222
+ failed: number;
223
+ successRate: number | null;
224
+ medianMs: number | null;
225
+ p95Ms: number | null;
226
+ /** SEND (DISPATCH), AUTHENTICATE, FETCH_STATUS, WITHDRAW, AMEND, LOOKUP... */
227
+ byOperation: {
228
+ operation: string;
229
+ calls: number;
230
+ failed: number;
231
+ medianMs: number | null;
232
+ p95Ms: number | null;
233
+ }[];
234
+ /** 2xx, 3xx, 4xx, 5xx - or NO_RESPONSE when the partner never answered. */
235
+ byResponse: PartnerAnalyticsCount[];
236
+ failureReasons: PartnerAnalyticsCount[];
237
+ }
238
+ /** Subscribers registered with partners ahead of any emergency. */
239
+ export interface PartnerAnalyticsMemberships {
240
+ /** Every membership in scope, now. */
241
+ total: number;
242
+ /** Registered, and the partner's cover has started and not ended. */
243
+ covered: number;
244
+ /** Registered, but the partner's cover has not started yet (a waiting period). */
245
+ waitingPeriod: number;
246
+ /** INCOMPLETE_PROFILE, NEEDS_REVIEW or FAILED: a person has to act. */
247
+ needsAttention: number;
248
+ /** Created in the period. */
249
+ created: number;
250
+ /** Given a member id by the partner in the period. */
251
+ provisioned: number;
252
+ /** From the membership being created to the partner issuing a member id - those provisioned in the period. */
253
+ medianHoursToProvision: number | null;
254
+ /** Every status, in lifecycle order, zeros included. */
255
+ byStatus: PartnerAnalyticsCount[];
256
+ /** The partner's standing for registered members: PENDING_ACTIVATION, ACTIVE, SUSPENDED, LAPSED, UNKNOWN. */
257
+ byMemberState: PartnerAnalyticsCount[];
258
+ /** INDIVIDUAL_SUBSCRIBER or CORPORATE_MEMBER. */
259
+ bySubjectType: PartnerAnalyticsCount[];
260
+ /** Why registrations failed or were stopped, now. */
261
+ failureReasons: PartnerAnalyticsCount[];
262
+ /** What stops incomplete profiles being sent: a field, and whether it is MISSING or MALFORMED. */
263
+ missingDetails: {
264
+ field: string;
265
+ problem: string;
266
+ count: number;
267
+ }[];
268
+ dependents: number;
269
+ /** Dependents the partner has accepted. */
270
+ dependentsAccepted: number;
271
+ /** No longer covered here, but the partner keeps them to the end of the term. */
272
+ pendingRemoval: number;
273
+ /** People who declined to give a detail a partner asks for - in the period, and ever. */
274
+ declined: number;
275
+ declinedTotal: number;
276
+ /** Partnerships whose partner has no memberships feature, and those it is currently rate limiting. */
277
+ unsupportedPartnerships: number;
278
+ throttledPartnerships: number;
279
+ }
280
+ /** One kind of incident routed to partners. Names are the organization's own taxonomy. */
281
+ export interface PartnerAnalyticsIncidentTypeRow {
282
+ incidentTypeId: number | null;
283
+ name: string | null;
284
+ category: string | null;
285
+ raised: number;
286
+ delivered: number;
287
+ failed: number;
288
+ acknowledged: number;
289
+ medianSecondsToAcknowledge: number | null;
290
+ }
291
+ /** One point on the charts: a bucket of the period. */
292
+ export interface PartnerAnalyticsPoint {
293
+ /** Local wall-clock start of the bucket, in `range.timeZone` (no offset). */
294
+ bucket: string;
295
+ /** Dispatches raised in the bucket, and what became of them. */
296
+ raised: number;
297
+ delivered: number;
298
+ failed: number;
299
+ /** Rejected, expired or cancelled. */
300
+ declined: number;
301
+ /** Still waiting or being sent, now. */
302
+ pending: number;
303
+ acknowledged: number;
304
+ /** Of the dispatches that reached the partner in the bucket. */
305
+ medianSecondsToAcknowledge: number | null;
306
+ calls: number;
307
+ failedCalls: number;
308
+ medianCallMs: number | null;
309
+ membershipsCreated: number;
310
+ membershipsProvisioned: number;
311
+ }
312
+ /** One hour of the week: emergencies routed in it. Weekday 1 is Monday. */
313
+ export interface PartnerAnalyticsHeatCell {
314
+ weekday: number;
315
+ hour: number;
316
+ raised: number;
317
+ }
318
+ /** The previous period of the same length, for the change on each headline figure. */
319
+ export interface PartnerAnalyticsPrevious {
320
+ from: string;
321
+ to: string;
322
+ raised: number;
323
+ delivered: number;
324
+ failed: number;
325
+ acknowledged: number;
326
+ completed: number;
327
+ declined: number;
328
+ medianSecondsToSend: number | null;
329
+ medianSecondsToAcknowledge: number | null;
330
+ calls: number;
331
+ failedCalls: number;
332
+ membershipsCreated: number;
333
+ membershipsProvisioned: number;
334
+ }
335
+ /** A Super-Admin's view of every organization: one row each, busiest first. */
336
+ export interface PartnerAnalyticsOrganizationRow {
337
+ organizationId: number;
338
+ partnerships: number;
339
+ enabledPartnerships: number;
340
+ raised: number;
341
+ delivered: number;
342
+ failed: number;
343
+ deliveryRate: number | null;
344
+ activeMembers: number;
345
+ calls: number;
346
+ failedCalls: number;
347
+ }
348
+ export interface PartnerAnalytics {
349
+ /** Whose figures: one organization (and one control centre in it), or null for every organization. */
350
+ organizationId: number | null;
351
+ controlCentreId: number | null;
352
+ /** The one partnership the figures are narrowed to, or null for all of them. */
353
+ integrationId: number | null;
354
+ range: PartnerAnalyticsRange;
355
+ generatedAt: string;
356
+ previous: PartnerAnalyticsPrevious | null;
357
+ timeline: PartnerAnalyticsPoint[];
358
+ /** All 168 hours of the week, Monday first, zeros included. */
359
+ heatmap: PartnerAnalyticsHeatCell[];
360
+ /** Every partnership in scope, for narrowing the dashboard to one. */
361
+ partnershipOptions: PartnerAnalyticsPartnershipOption[];
362
+ partnerships: PartnerAnalyticsPartnerships;
363
+ dispatches: PartnerAnalyticsDispatches;
364
+ calls: PartnerAnalyticsCalls;
365
+ memberships: PartnerAnalyticsMemberships;
366
+ /** The kinds of incident routed, busiest first - at most 25. */
367
+ incidentTypes: PartnerAnalyticsIncidentTypeRow[];
368
+ /** A Super-Admin looking at every organization only. */
369
+ byOrganization?: PartnerAnalyticsOrganizationRow[];
370
+ }
371
+ /** What a dashboard asks: the period, one partnership - and, for a Super-Admin, whose figures. */
372
+ export interface PartnerAnalyticsQuery {
373
+ from?: string;
374
+ to?: string;
375
+ timeZone?: string;
376
+ organizationId?: number;
377
+ integrationId?: number;
378
+ }
@@ -14,6 +14,7 @@ export declare enum PermissionActions {
14
14
  RESEND_PARTNER_DISPATCH = "resend:partner-dispatch",
15
15
  READ_PARTNER_MEMBERSHIP = "read:partner-membership",
16
16
  MANAGE_PARTNER_MEMBERSHIP = "manage:partner-membership",
17
+ READ_PARTNER_ANALYTICS = "read:partner-analytics",
17
18
  CREATE_CONTROL_CENTRE = "create:control-centre",
18
19
  READ_CONTROL_CENTRE = "read:control-centre",
19
20
  UPDATE_CONTROL_CENTRE = "update:control-centre",
@@ -166,6 +167,7 @@ export declare enum PermissionActions {
166
167
  READ_NEWSFEED_FEED = "read:newsfeed-feed",
167
168
  ENGAGE_NEWSFEED_POST = "engage:newsfeed-post",
168
169
  MODERATE_NEWSFEED_COMMENT = "moderate:newsfeed-comment",
170
+ READ_NEWSFEED_ANALYTICS = "read:newsfeed-analytics",
169
171
  CREATE_ALERT_INTAKE_CONNECTION = "create:alert-intake-connection",
170
172
  READ_ALERT_INTAKE_CONNECTION = "read:alert-intake-connection",
171
173
  UPDATE_ALERT_INTAKE_CONNECTION = "update:alert-intake-connection",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarion-shared-types",
3
- "version": "1.0.110",
3
+ "version": "1.0.112",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",