@opencxh/domain 1.286.2 → 1.287.0
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/entities/activity/types.d.ts +4 -0
- package/dist/entities/inbox/types.d.ts +3 -0
- package/dist/entities/interaction/index.d.ts +1 -0
- package/dist/entities/interaction/resolution.d.ts +29 -0
- package/dist/entities/interaction/resolution.test.d.ts +1 -0
- package/dist/entities/interaction/types.d.ts +7 -0
- package/dist/index.cjs +17 -17
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1178 -1145
- package/dist/platform/ai-tools.d.ts +10 -0
- package/dist/platform/coded-message.d.ts +15 -0
- package/dist/platform/coded-message.test.d.ts +1 -0
- package/dist/platform/ui.d.ts +6 -0
- package/package.json +1 -1
|
@@ -239,6 +239,10 @@ export type InteractionStatus = "open" | "closed" | "snoozed";
|
|
|
239
239
|
export type InteractionStatusChangedPayload = {
|
|
240
240
|
fromStatus: InteractionStatus;
|
|
241
241
|
toStatus: InteractionStatus;
|
|
242
|
+
/** Set on a close with a reason: the key, and its label and outcome as they were at that moment. */
|
|
243
|
+
resolution?: string;
|
|
244
|
+
resolutionLabel?: string;
|
|
245
|
+
resolutionPositive?: boolean;
|
|
242
246
|
};
|
|
243
247
|
/**
|
|
244
248
|
* A service target that ran out. Written by the app that owns the clocks, not by comms.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InteractionResolution } from '../interaction/resolution';
|
|
1
2
|
export interface Inbox {
|
|
2
3
|
id: string;
|
|
3
4
|
organizationId: string;
|
|
@@ -23,4 +24,6 @@ export interface Inbox {
|
|
|
23
24
|
* priority itself is rarely set.
|
|
24
25
|
*/
|
|
25
26
|
slaHours?: number;
|
|
27
|
+
/** This inbox's own resolutions, next to `SYSTEM_RESOLUTIONS`. Read through `resolutionsFor`. */
|
|
28
|
+
resolutions?: InteractionResolution[];
|
|
26
29
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Inbox } from '../inbox/types';
|
|
2
|
+
/**
|
|
3
|
+
* *How* a conversation ended, apart from its status. `closed` already behaves like a servicedesk's
|
|
4
|
+
* "solved" (an inbound reopens it), so what was missing was the reason, not a fourth status.
|
|
5
|
+
*
|
|
6
|
+
* Deliberately not `WorkResolution`: "deal won" and "spam" are different vocabularies, and one
|
|
7
|
+
* shared type would tie two apps that must change apart.
|
|
8
|
+
*/
|
|
9
|
+
export interface InteractionResolution {
|
|
10
|
+
key: string;
|
|
11
|
+
/** System: an i18n key in the communication app. Custom: what the admin typed. */
|
|
12
|
+
label: string;
|
|
13
|
+
order: number;
|
|
14
|
+
/** `true` ended well, `false` ended badly, absent says neither. */
|
|
15
|
+
positive?: boolean;
|
|
16
|
+
system?: true;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The resolutions every inbox has. In code and not seeded, so `solved` means solved in every
|
|
20
|
+
* organisation: rules, analytics, AI tools and CSAT key on these, and a renamed or deleted row
|
|
21
|
+
* would silently break all of them. An inbox adds its own next to these; it cannot change them.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SYSTEM_RESOLUTIONS: readonly InteractionResolution[];
|
|
24
|
+
/** Closed with one of these, a conversation does not count as resolved: nothing was worked on. */
|
|
25
|
+
export declare const UNWORKED_RESOLUTIONS: readonly string[];
|
|
26
|
+
/** Custom keys carry this prefix, so they can never collide with a later system key. */
|
|
27
|
+
export declare const CUSTOM_RESOLUTION_PREFIX = "c_";
|
|
28
|
+
/** System first, then the inbox's own in their order. The one list every reader uses. */
|
|
29
|
+
export declare function resolutionsFor(inbox?: Pick<Inbox, "resolutions"> | null): InteractionResolution[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -133,4 +133,11 @@ export interface Interaction {
|
|
|
133
133
|
* = not snoozed.
|
|
134
134
|
*/
|
|
135
135
|
snoozedTill?: number | null;
|
|
136
|
+
/**
|
|
137
|
+
* {@link InteractionResolution.key}, set when closing; cleared (`""`) on any move away from
|
|
138
|
+
* `closed`. `resolutionLabel` is the label at that moment, so renaming or deleting a custom
|
|
139
|
+
* resolution later does not rewrite history.
|
|
140
|
+
*/
|
|
141
|
+
resolution?: string;
|
|
142
|
+
resolutionLabel?: string;
|
|
136
143
|
}
|