clarion-shared-types 1.0.126 → 1.0.127

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.
@@ -23,6 +23,7 @@ __exportStar(require("./enums/chat-participant-role.enum"), exports);
23
23
  __exportStar(require("./interfaces/chat-conversation"), exports);
24
24
  __exportStar(require("./interfaces/chat-conversation-with-participants"), exports);
25
25
  __exportStar(require("./interfaces/chat-message"), exports);
26
+ __exportStar(require("./interfaces/chat-message-payload"), exports);
26
27
  __exportStar(require("./interfaces/chat-participant"), exports);
27
28
  __exportStar(require("./interfaces/chat-presence-info"), exports);
28
29
  __exportStar(require("./interfaces/chat-analytics"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,wEAAsD;AACtD,sEAAoD;AACpD,iEAA+C;AAC/C,qEAAmD;AAEnD,aAAa;AACb,iEAA+C;AAC/C,mFAAiE;AACjE,4DAA0C;AAC1C,gEAA8C;AAC9C,kEAAgD;AAChD,8DAA4C;AAE5C,YAAY;AACZ,6DAA2C;AAC3C,8DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,wEAAsD;AACtD,sEAAoD;AACpD,iEAA+C;AAC/C,qEAAmD;AAEnD,aAAa;AACb,iEAA+C;AAC/C,mFAAiE;AACjE,4DAA0C;AAC1C,oEAAkD;AAClD,gEAA8C;AAC9C,kEAAgD;AAChD,8DAA4C;AAE5C,YAAY;AACZ,6DAA2C;AAC3C,8DAA4C"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=chat-message-payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-message-payload.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-message-payload.ts"],"names":[],"mappings":""}
@@ -39,4 +39,5 @@ __exportStar(require("./intefaces/incident-status-details"), exports);
39
39
  __exportStar(require("./intefaces/incident-on-hold-record"), exports);
40
40
  __exportStar(require("./intefaces/incident-report"), exports);
41
41
  __exportStar(require("./intefaces/analytics"), exports);
42
+ __exportStar(require("./intefaces/incident-chat-view"), exports);
42
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/incident/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,+DAA6C;AAC7C,gEAA8C;AAC9C,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,gEAA8C;AAC9C,4EAA0D;AAC1D,uEAAqD;AACrD,oEAAkD;AAElD,YAAY;AACZ,uDAAqC;AACrC,8DAA4C;AAC5C,2EAAyD;AACzD,kEAAgD;AAChD,gEAA8C;AAC9C,gEAA8C;AAC9C,4DAA0C;AAC1C,kEAAgD;AAChD,gFAA8D;AAC9D,sEAAoD;AACpD,sEAAoD;AACpD,sEAAoD;AACpD,8DAA4C;AAC5C,wDAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/incident/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,+DAA6C;AAC7C,gEAA8C;AAC9C,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,gEAA8C;AAC9C,4EAA0D;AAC1D,uEAAqD;AACrD,oEAAkD;AAElD,YAAY;AACZ,uDAAqC;AACrC,8DAA4C;AAC5C,2EAAyD;AACzD,kEAAgD;AAChD,gEAA8C;AAC9C,gEAA8C;AAC9C,4DAA0C;AAC1C,kEAAgD;AAChD,gFAA8D;AAC9D,sEAAoD;AACpD,sEAAoD;AACpD,sEAAoD;AACpD,8DAA4C;AAC5C,wDAAsC;AACtC,iEAA+C"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=incident-chat-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incident-chat-view.js","sourceRoot":"","sources":["../../../../../src/modules/incident/intefaces/incident-chat-view.ts"],"names":[],"mappings":""}
@@ -7,6 +7,7 @@ export * from './enums/chat-participant-role.enum';
7
7
  export * from './interfaces/chat-conversation';
8
8
  export * from './interfaces/chat-conversation-with-participants';
9
9
  export * from './interfaces/chat-message';
10
+ export * from './interfaces/chat-message-payload';
10
11
  export * from './interfaces/chat-participant';
11
12
  export * from './interfaces/chat-presence-info';
12
13
  export * from './interfaces/chat-analytics';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AAEnD,aAAa;AACb,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kDAAkD,CAAC;AACjE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAE5C,YAAY;AACZ,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AAEnD,aAAa;AACb,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kDAAkD,CAAC;AACjE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAE5C,YAAY;AACZ,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=chat-message-payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-message-payload.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-message-payload.ts"],"names":[],"mappings":""}
@@ -23,4 +23,5 @@ export * from './intefaces/incident-status-details';
23
23
  export * from './intefaces/incident-on-hold-record';
24
24
  export * from './intefaces/incident-report';
25
25
  export * from './intefaces/analytics';
26
+ export * from './intefaces/incident-chat-view';
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/incident/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAElD,YAAY;AACZ,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/incident/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAElD,YAAY;AACZ,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=incident-chat-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incident-chat-view.js","sourceRoot":"","sources":["../../../../../src/modules/incident/intefaces/incident-chat-view.ts"],"names":[],"mappings":""}
@@ -5,6 +5,7 @@ export * from './enums/chat-participant-role.enum';
5
5
  export * from './interfaces/chat-conversation';
6
6
  export * from './interfaces/chat-conversation-with-participants';
7
7
  export * from './interfaces/chat-message';
8
+ export * from './interfaces/chat-message-payload';
8
9
  export * from './interfaces/chat-participant';
9
10
  export * from './interfaces/chat-presence-info';
10
11
  export * from './interfaces/chat-analytics';
@@ -0,0 +1,13 @@
1
+ import { ChatMessageType } from '../enums/chat-message-type.enum';
2
+ /** A message as the chat service delivers it - over the socket, in a send acknowledgement and in a transcript. */
3
+ export interface ChatMessagePayload {
4
+ id: string;
5
+ conversationId: string;
6
+ senderId: number;
7
+ type: ChatMessageType;
8
+ content: string;
9
+ metadata?: Record<string, any> | null;
10
+ clientMessageId?: string | null;
11
+ /** ISO-8601. */
12
+ createdAt: string;
13
+ }
@@ -21,3 +21,4 @@ export * from './intefaces/incident-status-details';
21
21
  export * from './intefaces/incident-on-hold-record';
22
22
  export * from './intefaces/incident-report';
23
23
  export * from './intefaces/analytics';
24
+ export * from './intefaces/incident-chat-view';
@@ -0,0 +1,24 @@
1
+ import { ChatMessagePayload } from '../../chat/interfaces/chat-message-payload';
2
+ /**
3
+ * An incident's chat as the caller may see it (`GET /api/incidents/:id/chat`).
4
+ *
5
+ * Whoever may view the incident may read its chat. Only its participants (the
6
+ * reporter, their app guardians, the assignees) talk in it live; staff who may
7
+ * manage the incident and are not in it yet can join it
8
+ * (`POST /api/incidents/:id/chat/join`).
9
+ */
10
+ export interface IncidentChatView {
11
+ /** Null when the incident has no chat (not raised from the app). */
12
+ conversationId: string | null;
13
+ /** The caller is in the conversation: use the live chat. */
14
+ participant: boolean;
15
+ /** The caller is not in it but may join it. */
16
+ canJoin: boolean;
17
+ participantUserIds: number[];
18
+ /** A page of the conversation, oldest first; empty when there is no chat. */
19
+ messages: {
20
+ data: ChatMessagePayload[];
21
+ nextCursor: string | null;
22
+ hasMore: boolean;
23
+ };
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarion-shared-types",
3
- "version": "1.0.126",
3
+ "version": "1.0.127",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",