@opencxh/domain 1.251.0 → 1.253.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/live-lens/types.d.ts +1 -1
- package/dist/entities/playbook/types.d.ts +17 -1
- package/dist/entities/sla/machine.d.ts +2 -2
- package/dist/entities/sla/types.d.ts +8 -0
- package/dist/entities/sla/view.d.ts +2 -0
- package/dist/index.cjs +19 -19
- package/dist/index.js +1335 -1317
- package/dist/platform/ai-tools.d.ts +11 -0
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ import { OwnerScope } from '../scope/types';
|
|
|
30
30
|
* Anyone who *does* want something written during a call uses a playbook on an `activity` trigger.
|
|
31
31
|
* That one has a run, an owner and an approval gate.
|
|
32
32
|
*/
|
|
33
|
-
export type ReadStep = LookupStep | ConditionStep | ForEachStep<ReadStep> | ParallelStep<ReadStep>;
|
|
33
|
+
export type ReadStep = LookupStep | ConditionStep<ReadStep> | ForEachStep<ReadStep> | ParallelStep<ReadStep>;
|
|
34
34
|
/** The step types a read lane may hold — the runtime counterpart of {@link ReadStep}. */
|
|
35
35
|
export declare const READ_STEP_TYPES: readonly string[];
|
|
36
36
|
export interface LiveLens {
|
|
@@ -59,12 +59,28 @@ export declare const STEP_MAX_TOKENS_MAX = 8000;
|
|
|
59
59
|
* a string in `max_tokens` is a 400 at OpenAI and Anthropic.
|
|
60
60
|
*/
|
|
61
61
|
export declare function clampStepMaxTokens(value: unknown): number | undefined;
|
|
62
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Generic over the step body for the same reason as {@link ForEachStep}: a restricted step
|
|
64
|
+
* language must stay a real subtype. Without the parameter a read lane could carry a write
|
|
65
|
+
* step inside `else` — see `ReadStep` in `../live-lens/types`.
|
|
66
|
+
*/
|
|
67
|
+
export interface ConditionStep<S = Step> {
|
|
63
68
|
type: "condition";
|
|
64
69
|
/** JSONLogic expression evaluated against the run vars. */
|
|
65
70
|
if: unknown;
|
|
66
71
|
/** Gate: what to do when the condition is false. "then" = the steps that follow. */
|
|
67
72
|
onFalse: "stop" | "escalate" | "continue";
|
|
73
|
+
/**
|
|
74
|
+
* The false branch. Runs **before** `onFalse` is applied, so the two fields answer different
|
|
75
|
+
* questions: `else` is *what happens*, `onFalse` is *how the branch ends* — `stop` (a branch
|
|
76
|
+
* of its own, the default the editor writes), `escalate` (hand off after doing this) or
|
|
77
|
+
* `continue` (both branches rejoin on the step after the condition).
|
|
78
|
+
*
|
|
79
|
+
* Absent or empty ⇒ exactly the behaviour every existing playbook has today; this field adds
|
|
80
|
+
* a branch, it does not redefine one. A branch step that does not continue (stop, a held
|
|
81
|
+
* action, a wait) decides the outcome itself and `onFalse` no longer applies.
|
|
82
|
+
*/
|
|
83
|
+
else?: S[];
|
|
68
84
|
}
|
|
69
85
|
/**
|
|
70
86
|
* Generic over the step body so a restricted step language can be a **real subtype** instead
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SlaClock, SlaMetric, SlaProfile } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
3
|
+
* The facts a source app reports about a resource. It reports *what happened*; every
|
|
4
4
|
* decision about which clock starts, stops or pauses lives here, so a second source app
|
|
5
5
|
* (work items, later) needs an adapter and nothing else.
|
|
6
6
|
*/
|
|
7
|
-
export type SlaEventKind = "apply" | "answered" | "inbound" | "outbound" | "resolved" | "closed" | "reopened" | "snoozed" | "unsnoozed" | "discarded";
|
|
7
|
+
export type SlaEventKind = "apply" | "answered" | "inbound" | "outbound" | "resolved" | "closed" | "reopened" | "snoozed" | "unsnoozed" | "hold" | "unhold" | "discarded";
|
|
8
8
|
/**
|
|
9
9
|
* The facts a source app may report. `apply` is excluded on purpose: attaching a profile is a
|
|
10
10
|
* user-facing decision with its own route and its own authorization, not something an app
|
|
@@ -18,6 +18,14 @@ export type SlaClockState = "running" | "paused" | "hit" | "missed" | "void";
|
|
|
18
18
|
/** Bit values for {@link SlaClock.pauseBits}. */
|
|
19
19
|
export declare const PAUSE_SNOOZED = 1;
|
|
20
20
|
export declare const PAUSE_WAITING_FOR_CUSTOMER = 2;
|
|
21
|
+
/**
|
|
22
|
+
* Somebody decided this one is on hold. Deliberately not an {@link SlaPauseReason}: the other
|
|
23
|
+
* two are profile settings, this one is a person overruling the profile per conversation.
|
|
24
|
+
*
|
|
25
|
+
* It exists because `waiting_for_customer` resumes on *any* inbound message, and "thanks!" or
|
|
26
|
+
* an out-of-office is not the customer handing the work back.
|
|
27
|
+
*/
|
|
28
|
+
export declare const PAUSE_HOLD = 4;
|
|
21
29
|
export declare function pauseBitFor(reason: SlaPauseReason): number;
|
|
22
30
|
/**
|
|
23
31
|
* Opening hours as the clock needs them: minutes from local midnight, plus the offset to
|
|
@@ -4,6 +4,8 @@ import { SlaClock } from './types';
|
|
|
4
4
|
* server, in the browser and on mobile.
|
|
5
5
|
*/
|
|
6
6
|
export declare function isOpenClock(clock: SlaClock): boolean;
|
|
7
|
+
/** Held by hand, rather than by a profile rule. Keeps the bit out of the components. */
|
|
8
|
+
export declare function isHeldClock(clock: SlaClock): boolean;
|
|
7
9
|
/**
|
|
8
10
|
* Working ms left. Negative once the deadline has passed.
|
|
9
11
|
*
|