@whitewall/blip-sdk 0.0.192 → 0.0.194
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/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/flow.js +34 -1
- package/dist/cjs/types/flow.js.map +1 -1
- package/dist/cjs/utils/builder.js +9 -28
- package/dist/cjs/utils/builder.js.map +1 -1
- package/dist/cjs/utils/flow-rules.js +304 -0
- package/dist/cjs/utils/flow-rules.js.map +1 -0
- package/dist/cjs/utils/minifier.js +42 -92
- package/dist/cjs/utils/minifier.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/flow.js +29 -0
- package/dist/esm/types/flow.js.map +1 -1
- package/dist/esm/utils/builder.js +9 -27
- package/dist/esm/utils/builder.js.map +1 -1
- package/dist/esm/utils/flow-rules.js +297 -0
- package/dist/esm/utils/flow-rules.js.map +1 -0
- package/dist/esm/utils/minifier.js +40 -90
- package/dist/esm/utils/minifier.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/account.d.ts +7 -0
- package/dist/types/types/account.d.ts.map +1 -1
- package/dist/types/types/flow.d.ts +33 -0
- package/dist/types/types/flow.d.ts.map +1 -1
- package/dist/types/utils/builder.d.ts +16 -25
- package/dist/types/utils/builder.d.ts.map +1 -1
- package/dist/types/utils/flow-rules.d.ts +50 -0
- package/dist/types/utils/flow-rules.d.ts.map +1 -0
- package/dist/types/utils/minifier.d.ts +294 -2
- package/dist/types/utils/minifier.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/types/account.ts +7 -0
- package/src/types/flow.ts +40 -0
- package/src/utils/builder.ts +29 -62
- package/src/utils/flow-rules.ts +453 -0
- package/src/utils/minifier.ts +46 -95
|
@@ -3,6 +3,11 @@ export declare const CONTENT_TYPES: readonly ["text", "select-immediate", "selec
|
|
|
3
3
|
export declare const MIME_TYPES: readonly ["text/plain", "application/vnd.lime.media-link+json", "application/vnd.lime.select+json", "application/vnd.lime.chatstate+json", "application/vnd.lime.web-link+json"];
|
|
4
4
|
declare const TYPE_OF_STATE_ID: readonly ["state", "variable"];
|
|
5
5
|
export declare const ROOT_STATE_ID = "onboarding";
|
|
6
|
+
export declare const CUSTOM_ACTION_LISTS: readonly ["$enteringCustomActions", "$leavingCustomActions", "$afterStateChangedActions", "$localCustomActions"];
|
|
7
|
+
/** The state that declares `root`, or the conventional id for a flow that predates it. */
|
|
8
|
+
export declare const resolveEntryPointId: (flow: Record<string, {
|
|
9
|
+
root?: boolean;
|
|
10
|
+
}>) => string | undefined;
|
|
6
11
|
export declare const conditionSchema: z.ZodObject<{
|
|
7
12
|
source: z.ZodEnum<{
|
|
8
13
|
context: "context";
|
|
@@ -3421,6 +3426,34 @@ export type ContentActionItem = z.infer<typeof contentActionItemSchema>;
|
|
|
3421
3426
|
export type State = z.infer<typeof stateSchema>;
|
|
3422
3427
|
export type Flow = z.infer<typeof flowSchema>;
|
|
3423
3428
|
export type BuilderFlow = Flow;
|
|
3429
|
+
/**
|
|
3430
|
+
* Typing indicators are noise in every projection of a flow, so both the digest
|
|
3431
|
+
* and the minifier drop them. The two signals are checked because `$typeOfContent`
|
|
3432
|
+
* is absent from a minified flow and can come back empty from a GET, while the
|
|
3433
|
+
* settings mime type is absent from a hand-written action.
|
|
3434
|
+
*/
|
|
3435
|
+
export declare function isChatStateSendMessage(item: {
|
|
3436
|
+
action?: {
|
|
3437
|
+
type: string;
|
|
3438
|
+
$typeOfContent?: string;
|
|
3439
|
+
settings: {
|
|
3440
|
+
type?: string;
|
|
3441
|
+
[key: string]: unknown;
|
|
3442
|
+
};
|
|
3443
|
+
};
|
|
3444
|
+
}): boolean;
|
|
3445
|
+
/** The input the runtime will use: the first one in the state, if any. */
|
|
3446
|
+
export declare function inputOf<T>(state: {
|
|
3447
|
+
$contentActions: Array<{
|
|
3448
|
+
input?: T;
|
|
3449
|
+
}>;
|
|
3450
|
+
}): T | undefined;
|
|
3451
|
+
/** The labels of a select's options, which are what a user answers with. */
|
|
3452
|
+
export declare function optionLabels(content: {
|
|
3453
|
+
options?: Array<string | {
|
|
3454
|
+
text?: string;
|
|
3455
|
+
}>;
|
|
3456
|
+
}): Array<string>;
|
|
3424
3457
|
export type BuilderConfiguration = {
|
|
3425
3458
|
'builder:minimumIntentScore'?: string;
|
|
3426
3459
|
'builder:stateTrack'?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../../src/types/flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,aAAa,uJAYhB,CAAA;AACV,eAAO,MAAM,UAAU,kLAMb,CAAA;AAsBV,QAAA,MAAM,gBAAgB,gCAAiC,CAAA;AAEvD,eAAO,MAAM,aAAa,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../../src/types/flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,aAAa,uJAYhB,CAAA;AACV,eAAO,MAAM,UAAU,kLAMb,CAAA;AAsBV,QAAA,MAAM,gBAAgB,gCAAiC,CAAA;AAEvD,eAAO,MAAM,aAAa,eAAe,CAAA;AAEzC,eAAO,MAAM,mBAAmB,kHAKtB,CAAA;AAEV,0FAA0F;AAC1F,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,KAAG,MAAM,GAAG,SAC0B,CAAA;AA8IlH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO1B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;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C,CAAC,CAAA;IAChE,OAAO,EAAE,KAAK,CAAC;QACX,OAAO,EAAE,MAAM,CAAA;QACf,aAAa,CAAC,EAAE,aAAa,CAAA;QAC7B,UAAU,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;KACzD,CAAC,CAAA;CACL,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,KAAK,CAAC;QACpB,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,CAAA;KACf,CAAC,CAAA;IACF,qBAAqB,EAAE,KAAK,CAAC;QACzB,IAAI,EAAE,MAAM,CAAA;KACf,CAAC,CAAA;IACF,mBAAmB,EAAE,MAAM,CAAA;IAC3B,QAAQ,EAAE;QACN,IAAI,EAAE;YACF,EAAE,EAAE,MAAM,CAAA;YACV,OAAO,EAAE,MAAM,CAAA;YACf,KAAK,CAAC,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAA;YAC3C,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;YAC/B,aAAa,EAAE,oBAAoB,CAAA;YACnC,YAAY,EAAE,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAA;YACpD,aAAa,EAAE,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAA;YACrD,IAAI,EAAE,MAAM,CAAA;SACf,CAAA;KACJ,CAAA;IACD,YAAY,EAAE,UAAU,CAAA;CAC3B,CAAA"}
|
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
* a human or an LLM. It renames the `$`-prefixed keys to readable ones, drops
|
|
4
4
|
* layout metadata and denormalizes state names, so it cannot be pushed back to
|
|
5
5
|
* the builder. For the round-trippable format, see `./minifier.ts`.
|
|
6
|
+
*
|
|
7
|
+
* Typed over `MinifiedState`, which a full `State` satisfies, so both a pulled
|
|
8
|
+
* flow and a minified one digest without casts.
|
|
6
9
|
*/
|
|
7
|
-
import { type
|
|
10
|
+
import { type Condition } from '../types/flow.ts';
|
|
11
|
+
import type { MinifiedAction, MinifiedState } from './minifier.ts';
|
|
12
|
+
/** A `Condition` with the builder's nullish bookkeeping dropped. */
|
|
13
|
+
export type ConditionDigest = Omit<Condition, 'variable'> & {
|
|
14
|
+
variable?: string;
|
|
15
|
+
};
|
|
8
16
|
export type ActionDigest = {
|
|
9
17
|
type: string;
|
|
10
18
|
settings: Record<string, unknown>;
|
|
11
|
-
conditions?: Array<
|
|
12
|
-
source: string;
|
|
13
|
-
variable?: string;
|
|
14
|
-
comparison: string;
|
|
15
|
-
operator?: string;
|
|
16
|
-
values: Array<string>;
|
|
17
|
-
}>;
|
|
19
|
+
conditions?: Array<ConditionDigest>;
|
|
18
20
|
};
|
|
19
21
|
export type InputDigest = {
|
|
20
22
|
bypass: boolean;
|
|
@@ -26,13 +28,13 @@ export type InputDigest = {
|
|
|
26
28
|
error: string;
|
|
27
29
|
};
|
|
28
30
|
expiration?: string;
|
|
29
|
-
conditions?:
|
|
31
|
+
conditions?: Array<ConditionDigest>;
|
|
30
32
|
};
|
|
31
33
|
export type OutputDigest = {
|
|
32
34
|
stateId: string;
|
|
33
35
|
stateName?: string;
|
|
34
36
|
typeOfStateId?: string;
|
|
35
|
-
conditions?:
|
|
37
|
+
conditions?: Array<ConditionDigest>;
|
|
36
38
|
};
|
|
37
39
|
export type StateDigest = {
|
|
38
40
|
id: string;
|
|
@@ -45,22 +47,11 @@ export type StateDigest = {
|
|
|
45
47
|
}>;
|
|
46
48
|
leavingActions?: Array<ActionDigest>;
|
|
47
49
|
outputs?: Array<OutputDigest>;
|
|
48
|
-
defaultOutput:
|
|
49
|
-
stateId: string;
|
|
50
|
-
stateName?: string;
|
|
51
|
-
typeOfStateId?: string;
|
|
52
|
-
};
|
|
50
|
+
defaultOutput: OutputDigest;
|
|
53
51
|
afterStateChangedActions?: Array<ActionDigest>;
|
|
54
52
|
localActions?: Array<ActionDigest>;
|
|
55
53
|
};
|
|
56
|
-
export declare function digestAction(action:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
* and the minifier drop them. The two signals are checked because `$typeOfContent`
|
|
60
|
-
* is absent from a minified flow and can come back empty from a GET, while the
|
|
61
|
-
* settings mime type is absent from a hand-written action.
|
|
62
|
-
*/
|
|
63
|
-
export declare function isChatStateSendMessage(item: ContentActionItem): boolean;
|
|
64
|
-
export declare function resolveStateName(stateId: string, flow: Record<string, State>): string | undefined;
|
|
65
|
-
export declare function digestState(stateId: string, state: State, flow: Record<string, State>): StateDigest;
|
|
54
|
+
export declare function digestAction(action: MinifiedAction): ActionDigest;
|
|
55
|
+
export declare function resolveStateName(stateId: string, flow: Record<string, MinifiedState>): string | undefined;
|
|
56
|
+
export declare function digestState(stateId: string, state: MinifiedState, flow: Record<string, MinifiedState>): StateDigest;
|
|
66
57
|
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../src/utils/builder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../src/utils/builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,KAAK,SAAS,EAA+C,MAAM,kBAAkB,CAAA;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAiB,aAAa,EAAE,MAAM,eAAe,CAAA;AAEjF,oEAAoE;AACpE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEjF,MAAM,MAAM,YAAY,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,UAAU,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAA;CACtC,CAAA;AAED,M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MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,MAAM,GAAG,SAAS,CAGzG;AAiBD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,WAAW,CAqCnH"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Everything the Builder runtime refuses to run, checked against a minified flow.
|
|
3
|
+
*
|
|
4
|
+
* A port of the runtime's own validation — `Models/Flow.cs::Validate`,
|
|
5
|
+
* `Models/Condition.cs::Validate`, `Models/Input.cs::Validate` and the media type
|
|
6
|
+
* each action deserializes. All of them throw at load or mid-turn, and the runtime
|
|
7
|
+
* validates the whole flow on every message, so one of these takes the bot down
|
|
8
|
+
* for every user rather than breaking one branch.
|
|
9
|
+
*
|
|
10
|
+
* The line is deliberate: this file only holds what makes the runtime throw. A
|
|
11
|
+
* flow that is merely suspect — a quick reply nothing matches, a variable nobody
|
|
12
|
+
* writes — parses fine here, because that is a linter's job and a schema can only
|
|
13
|
+
* say "invalid" where a linter can say "warning".
|
|
14
|
+
*
|
|
15
|
+
* It is one pass over the whole flow, wired into `minifiedFlowSchema` alone. Zod
|
|
16
|
+
* skips a `.check()` on a value that already has issues, so a check per action and
|
|
17
|
+
* a check per state would report the innermost problem and hide the rest.
|
|
18
|
+
*/
|
|
19
|
+
import type { MinifiedState } from './minifier.ts';
|
|
20
|
+
/** Every rule this file can report. */
|
|
21
|
+
export type FlowRule = 'missing-root-state' | 'root-must-wait' | 'dangling-output' | 'input-less-loop' | 'transition-loop' | 'shadowed-output' | 'invalid-condition' | 'invalid-input-validation' | 'invalid-regex' | 'invalid-variable-name' | 'unreadable-variable' | 'malformed-placeholder' | 'missing-media-type' | 'content-type-mismatch' | 'duplicate-title';
|
|
22
|
+
/** Reports a failure, tagged with the rule so a caller can group or suppress. */
|
|
23
|
+
export type ReportRule = (rule: FlowRule, path: Array<string | number>, message: string) => void;
|
|
24
|
+
/**
|
|
25
|
+
* The rule a zod issue came from, if it came from one of these checks.
|
|
26
|
+
*
|
|
27
|
+
* The id travels in the issue's `params`, which zod types as `Record<string, any>`,
|
|
28
|
+
* so reading it through here is what keeps `FlowRule` meaning anything on the way
|
|
29
|
+
* out — a caller that reaches into `params` itself gets `any` back.
|
|
30
|
+
*/
|
|
31
|
+
export declare function flowRuleOf(issue: {
|
|
32
|
+
code: string;
|
|
33
|
+
params?: Record<string, unknown>;
|
|
34
|
+
}): FlowRule | undefined;
|
|
35
|
+
export declare const VARIABLE_NAME: RegExp;
|
|
36
|
+
/** `Variables/VariableSource.cs`: a name whose first segment is one of these reads a provider. */
|
|
37
|
+
export declare const PROVIDER_NAMESPACES: Set<string>;
|
|
38
|
+
/** `Models/Flow.cs`: an output names a state, or a `{{variable}}` resolved at runtime. */
|
|
39
|
+
export declare const isVariableOutput: (stateId: string) => boolean;
|
|
40
|
+
/**
|
|
41
|
+
* `Models/Flow.cs::Validate`, walked in one pass so every problem in the flow is
|
|
42
|
+
* reported at once.
|
|
43
|
+
*/
|
|
44
|
+
export declare function checkFlow(flow: Record<string, MinifiedState>, report: ReportRule): void;
|
|
45
|
+
/**
|
|
46
|
+
* Every `{{reference}}` a state carries, deduped, with script sources masked out:
|
|
47
|
+
* a script's braces are a doc comment or a nested object literal, not a read.
|
|
48
|
+
*/
|
|
49
|
+
export declare function placeholderReadsOf(state: MinifiedState): Array<string>;
|
|
50
|
+
//# sourceMappingURL=flow-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-rules.d.ts","sourceRoot":"","sources":["../../../src/utils/flow-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAiC,aAAa,EAAE,MAAM,eAAe,CAAA;AAEjF,uCAAuC;AACvC,MAAM,MAAM,QAAQ,GACd,oBAAoB,GACpB,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,GACnB,0BAA0B,GAC1B,eAAe,GACf,uBAAuB,GACvB,qBAAqB,GACrB,uBAAuB,GACvB,oBAAoB,GACpB,uBAAuB,GACvB,iBAAiB,CAAA;AAEvB,iFAAiF;AACjF,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;AAEhG;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,QAAQ,GAAG,SAAS,CAI1G;AAWD,eAAO,MAAM,aAAa,QAAwC,CAAA;AAUlE,kGAAkG;AAClG,eAAO,MAAM,mBAAmB,aAgB9B,CAAA;AAEF,0FAA0F;AAC1F,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,YAAuD,CAAA;AAEvG;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAkCvF;AAqPD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,CAQtE"}
|
|
@@ -8,6 +8,290 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { type Flow } from '../types/flow.ts';
|
|
11
|
+
declare const minifiedActionSchema: z.ZodIntersection<z.ZodObject<{
|
|
12
|
+
$id: z.ZodOptional<z.ZodString>;
|
|
13
|
+
$typeOfContent: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
"": "";
|
|
15
|
+
text: "text";
|
|
16
|
+
"select-immediate": "select-immediate";
|
|
17
|
+
select: "select";
|
|
18
|
+
media: "media";
|
|
19
|
+
"media-audio": "media-audio";
|
|
20
|
+
"media-video": "media-video";
|
|
21
|
+
"media-document": "media-document";
|
|
22
|
+
"chat-state": "chat-state";
|
|
23
|
+
"web-link": "web-link";
|
|
24
|
+
"raw-content": "raw-content";
|
|
25
|
+
}>>;
|
|
26
|
+
$title: z.ZodOptional<z.ZodString>;
|
|
27
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
29
|
+
source: z.ZodEnum<{
|
|
30
|
+
context: "context";
|
|
31
|
+
input: "input";
|
|
32
|
+
}>;
|
|
33
|
+
variable: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
comparison: z.ZodEnum<{
|
|
35
|
+
endsWith: "endsWith";
|
|
36
|
+
startsWith: "startsWith";
|
|
37
|
+
equals: "equals";
|
|
38
|
+
notEquals: "notEquals";
|
|
39
|
+
contains: "contains";
|
|
40
|
+
greaterThan: "greaterThan";
|
|
41
|
+
lessThan: "lessThan";
|
|
42
|
+
greaterThanOrEquals: "greaterThanOrEquals";
|
|
43
|
+
lessThanOrEquals: "lessThanOrEquals";
|
|
44
|
+
matches: "matches";
|
|
45
|
+
approximateTo: "approximateTo";
|
|
46
|
+
exists: "exists";
|
|
47
|
+
notExists: "notExists";
|
|
48
|
+
}>;
|
|
49
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
or: "or";
|
|
51
|
+
and: "and";
|
|
52
|
+
}>>;
|
|
53
|
+
values: z.ZodArray<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>>>;
|
|
55
|
+
$cardContent: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
56
|
+
editable: z.ZodBoolean;
|
|
57
|
+
deletable: z.ZodBoolean;
|
|
58
|
+
position: z.ZodLiteral<"left">;
|
|
59
|
+
document: z.ZodObject<{
|
|
60
|
+
id: z.ZodString;
|
|
61
|
+
type: z.ZodString;
|
|
62
|
+
content: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
63
|
+
title: z.ZodOptional<z.ZodString>;
|
|
64
|
+
text: z.ZodOptional<z.ZodString>;
|
|
65
|
+
type: z.ZodString;
|
|
66
|
+
uri: z.ZodString;
|
|
67
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
68
|
+
text: z.ZodString;
|
|
69
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
70
|
+
immediate: "immediate";
|
|
71
|
+
persistent: "persistent";
|
|
72
|
+
}>>>;
|
|
73
|
+
options: z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodArray<z.ZodObject<{
|
|
74
|
+
text: z.ZodString;
|
|
75
|
+
}, z.core.$strip>>]>;
|
|
76
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
77
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
text: z.ZodString;
|
|
79
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
80
|
+
blank: "blank";
|
|
81
|
+
self: "self";
|
|
82
|
+
selfCompact: "selfCompact";
|
|
83
|
+
selfTall: "selfTall";
|
|
84
|
+
}>>>;
|
|
85
|
+
uri: z.ZodString;
|
|
86
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
87
|
+
state: z.ZodString;
|
|
88
|
+
interval: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
89
|
+
}, z.core.$strip>]>, z.ZodString]>;
|
|
90
|
+
textContent: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
}, z.core.$strip>>>;
|
|
93
|
+
continueOnError: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
95
|
+
type: z.ZodLiteral<"SendMessage">;
|
|
96
|
+
settings: z.ZodObject<{
|
|
97
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
99
|
+
"text/plain": "text/plain";
|
|
100
|
+
"application/vnd.lime.media-link+json": "application/vnd.lime.media-link+json";
|
|
101
|
+
"application/vnd.lime.select+json": "application/vnd.lime.select+json";
|
|
102
|
+
"application/vnd.lime.chatstate+json": "application/vnd.lime.chatstate+json";
|
|
103
|
+
"application/vnd.lime.web-link+json": "application/vnd.lime.web-link+json";
|
|
104
|
+
}>>;
|
|
105
|
+
content: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
106
|
+
title: z.ZodOptional<z.ZodString>;
|
|
107
|
+
text: z.ZodOptional<z.ZodString>;
|
|
108
|
+
type: z.ZodString;
|
|
109
|
+
uri: z.ZodString;
|
|
110
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
111
|
+
text: z.ZodString;
|
|
112
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
113
|
+
immediate: "immediate";
|
|
114
|
+
persistent: "persistent";
|
|
115
|
+
}>>>;
|
|
116
|
+
options: z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodArray<z.ZodObject<{
|
|
117
|
+
text: z.ZodString;
|
|
118
|
+
}, z.core.$strip>>]>;
|
|
119
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
120
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
+
text: z.ZodString;
|
|
122
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
123
|
+
blank: "blank";
|
|
124
|
+
self: "self";
|
|
125
|
+
selfCompact: "selfCompact";
|
|
126
|
+
selfTall: "selfTall";
|
|
127
|
+
}>>>;
|
|
128
|
+
uri: z.ZodString;
|
|
129
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
130
|
+
state: z.ZodString;
|
|
131
|
+
interval: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
132
|
+
}, z.core.$strip>]>;
|
|
133
|
+
id: z.ZodOptional<z.ZodString>;
|
|
134
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
type: z.ZodLiteral<"SendRawMessage">;
|
|
138
|
+
settings: z.ZodObject<{
|
|
139
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
type: z.ZodOptional<z.ZodString>;
|
|
141
|
+
rawContent: z.ZodString;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"TrackEvent">;
|
|
145
|
+
settings: z.ZodObject<{
|
|
146
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
category: z.ZodString;
|
|
148
|
+
action: z.ZodString;
|
|
149
|
+
extras: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
152
|
+
type: z.ZodLiteral<"ProcessHttp">;
|
|
153
|
+
settings: z.ZodObject<{
|
|
154
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
155
|
+
method: z.ZodEnum<{
|
|
156
|
+
POST: "POST";
|
|
157
|
+
GET: "GET";
|
|
158
|
+
PUT: "PUT";
|
|
159
|
+
DELETE: "DELETE";
|
|
160
|
+
}>;
|
|
161
|
+
uri: z.ZodString;
|
|
162
|
+
headers: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
163
|
+
body: z.ZodString;
|
|
164
|
+
responseBodyVariable: z.ZodString;
|
|
165
|
+
responseStatusVariable: z.ZodString;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<"MergeContact">;
|
|
169
|
+
settings: z.ZodObject<{
|
|
170
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
172
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
173
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
|
+
extras: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
177
|
+
type: z.ZodLiteral<"ExecuteScript">;
|
|
178
|
+
settings: z.ZodObject<{
|
|
179
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
+
function: z.ZodOptional<z.ZodLiteral<"run">>;
|
|
181
|
+
source: z.ZodString;
|
|
182
|
+
inputVariables: z.ZodArray<z.ZodString>;
|
|
183
|
+
outputVariable: z.ZodString;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
186
|
+
type: z.ZodLiteral<"ExecuteScriptV2">;
|
|
187
|
+
settings: z.ZodObject<{
|
|
188
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
189
|
+
function: z.ZodOptional<z.ZodLiteral<"run">>;
|
|
190
|
+
source: z.ZodString;
|
|
191
|
+
inputVariables: z.ZodArray<z.ZodString>;
|
|
192
|
+
outputVariable: z.ZodString;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
195
|
+
type: z.ZodLiteral<"SetVariable">;
|
|
196
|
+
settings: z.ZodObject<{
|
|
197
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
variable: z.ZodString;
|
|
199
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
200
|
+
expiration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
203
|
+
type: z.ZodLiteral<"ProcessCommand">;
|
|
204
|
+
settings: z.ZodObject<{
|
|
205
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
+
to: z.ZodString;
|
|
207
|
+
method: z.ZodEnum<{
|
|
208
|
+
get: "get";
|
|
209
|
+
set: "set";
|
|
210
|
+
merge: "merge";
|
|
211
|
+
delete: "delete";
|
|
212
|
+
}>;
|
|
213
|
+
uri: z.ZodString;
|
|
214
|
+
variable: z.ZodString;
|
|
215
|
+
from: z.ZodOptional<z.ZodString>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
+
type: z.ZodLiteral<"ForwardToDesk">;
|
|
219
|
+
settings: z.ZodObject<{
|
|
220
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
221
|
+
}, z.core.$strip>;
|
|
222
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
223
|
+
type: z.ZodLiteral<"LeavingFromDesk">;
|
|
224
|
+
settings: z.ZodObject<{
|
|
225
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
228
|
+
type: z.ZodLiteral<"Redirect">;
|
|
229
|
+
settings: z.ZodObject<{
|
|
230
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
231
|
+
address: z.ZodString;
|
|
232
|
+
context: z.ZodObject<{
|
|
233
|
+
type: z.ZodLiteral<"text/plain">;
|
|
234
|
+
value: z.ZodString;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
}, z.core.$strip>], "type">>;
|
|
238
|
+
declare const minifiedInputSchema: z.ZodObject<{
|
|
239
|
+
$cardContent: z.ZodOptional<z.ZodObject<{
|
|
240
|
+
document: z.ZodObject<{
|
|
241
|
+
id: z.ZodString;
|
|
242
|
+
type: z.ZodLiteral<"text/plain">;
|
|
243
|
+
content: z.ZodOptional<z.ZodString>;
|
|
244
|
+
textContent: z.ZodOptional<z.ZodString>;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
editable: z.ZodBoolean;
|
|
247
|
+
editing: z.ZodBoolean;
|
|
248
|
+
deletable: z.ZodBoolean;
|
|
249
|
+
position: z.ZodLiteral<"right">;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
252
|
+
bypass: z.ZodBoolean;
|
|
253
|
+
validation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
254
|
+
rule: z.ZodEnum<{
|
|
255
|
+
number: "number";
|
|
256
|
+
type: "type";
|
|
257
|
+
text: "text";
|
|
258
|
+
date: "date";
|
|
259
|
+
regex: "regex";
|
|
260
|
+
}>;
|
|
261
|
+
regex: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
262
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
263
|
+
error: z.ZodString;
|
|
264
|
+
}, z.core.$strip>>>;
|
|
265
|
+
expiration: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
266
|
+
variable: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
267
|
+
conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
268
|
+
source: z.ZodEnum<{
|
|
269
|
+
context: "context";
|
|
270
|
+
input: "input";
|
|
271
|
+
}>;
|
|
272
|
+
variable: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
273
|
+
comparison: z.ZodEnum<{
|
|
274
|
+
endsWith: "endsWith";
|
|
275
|
+
startsWith: "startsWith";
|
|
276
|
+
equals: "equals";
|
|
277
|
+
notEquals: "notEquals";
|
|
278
|
+
contains: "contains";
|
|
279
|
+
greaterThan: "greaterThan";
|
|
280
|
+
lessThan: "lessThan";
|
|
281
|
+
greaterThanOrEquals: "greaterThanOrEquals";
|
|
282
|
+
lessThanOrEquals: "lessThanOrEquals";
|
|
283
|
+
matches: "matches";
|
|
284
|
+
approximateTo: "approximateTo";
|
|
285
|
+
exists: "exists";
|
|
286
|
+
notExists: "notExists";
|
|
287
|
+
}>;
|
|
288
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
|
289
|
+
or: "or";
|
|
290
|
+
and: "and";
|
|
291
|
+
}>>;
|
|
292
|
+
values: z.ZodArray<z.ZodString>;
|
|
293
|
+
}, z.core.$strip>>>;
|
|
294
|
+
}, z.core.$strict>;
|
|
11
295
|
/**
|
|
12
296
|
* `stateSchema` minus the metadata `minifyFlow` strips. It is strict on purpose:
|
|
13
297
|
* minified flows are edited by hand, so an unknown key is almost always a typo
|
|
@@ -1280,8 +1564,13 @@ export declare const minifiedStateSchema: z.ZodObject<{
|
|
|
1280
1564
|
}, z.core.$strict>;
|
|
1281
1565
|
}, z.core.$strict>;
|
|
1282
1566
|
/**
|
|
1283
|
-
* A push replaces the whole flow, so
|
|
1284
|
-
*
|
|
1567
|
+
* A push replaces the whole flow, so everything that decides whether the runtime
|
|
1568
|
+
* loads it — the entry point, the outputs, the loops, every condition and every
|
|
1569
|
+
* action — is a validation error here instead of a bot that does not start.
|
|
1570
|
+
*
|
|
1571
|
+
* The rules run from this one check, and never per state or per action: zod skips
|
|
1572
|
+
* a check on a value that already has issues, so nesting them would report the
|
|
1573
|
+
* innermost problem and hide the rest of the flow's.
|
|
1285
1574
|
*/
|
|
1286
1575
|
export declare const minifiedFlowSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1287
1576
|
$inputSuggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -2549,6 +2838,8 @@ export declare const minifiedFlowSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
2549
2838
|
$invalid: z.ZodOptional<z.ZodBoolean>;
|
|
2550
2839
|
}, z.core.$strict>;
|
|
2551
2840
|
}, z.core.$strict>>;
|
|
2841
|
+
export type MinifiedAction = z.infer<typeof minifiedActionSchema>;
|
|
2842
|
+
export type MinifiedInput = z.infer<typeof minifiedInputSchema>;
|
|
2552
2843
|
export type MinifiedState = z.infer<typeof minifiedStateSchema>;
|
|
2553
2844
|
export type MinifiedFlow = z.infer<typeof minifiedFlowSchema>;
|
|
2554
2845
|
/**
|
|
@@ -2562,4 +2853,5 @@ export type MinifiedFlow = z.infer<typeof minifiedFlowSchema>;
|
|
|
2562
2853
|
*/
|
|
2563
2854
|
export declare function minifyFlow(flow: Flow): MinifiedFlow;
|
|
2564
2855
|
export declare function expandMinifiedFlow(minifiedFlow: MinifiedFlow, staleFlow?: Flow): Flow;
|
|
2856
|
+
export {};
|
|
2565
2857
|
//# sourceMappingURL=minifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minifier.d.ts","sourceRoot":"","sources":["../../../src/utils/minifier.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,
|
|
1
|
+
{"version":3,"file":"minifier.d.ts","sourceRoot":"","sources":["../../../src/utils/minifier.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAOH,KAAK,IAAI,EAQZ,MAAM,kBAAkB,CAAA;AAqHzB,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA;AAE7D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CA8CnD;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAwIrF"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './sender/index.ts'
|
|
|
5
5
|
export * from './types/index.ts'
|
|
6
6
|
export * from './utils/builder.ts'
|
|
7
7
|
export * from './utils/desk.ts'
|
|
8
|
+
export * from './utils/flow-rules.ts'
|
|
8
9
|
export * from './utils/minifier.ts'
|
|
9
10
|
export * from './utils/odata.ts'
|
|
10
11
|
export * from './utils/thread.ts'
|
package/src/types/account.ts
CHANGED
|
@@ -68,6 +68,13 @@ export type Contact = {
|
|
|
68
68
|
taxDocument?: string
|
|
69
69
|
extras?: Record<string, string | null>
|
|
70
70
|
lastMessageDate?: string
|
|
71
|
+
/**
|
|
72
|
+
* WhatsApp BSUID, filled from the `#wa.bsuid` metadata of messages the contact sent — so it is absent
|
|
73
|
+
* until the business has received at least one message from them.
|
|
74
|
+
*/
|
|
75
|
+
whatsAppBsuid?: string
|
|
76
|
+
/** WhatsApp phone number, without the leading `+`. */
|
|
77
|
+
whatsAppWaId?: string
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
export type ThreadItem = {
|
package/src/types/flow.ts
CHANGED
|
@@ -46,6 +46,17 @@ const TYPE_OF_STATE_ID = ['state', 'variable'] as const
|
|
|
46
46
|
|
|
47
47
|
export const ROOT_STATE_ID = 'onboarding'
|
|
48
48
|
|
|
49
|
+
export const CUSTOM_ACTION_LISTS = [
|
|
50
|
+
'$enteringCustomActions',
|
|
51
|
+
'$leavingCustomActions',
|
|
52
|
+
'$afterStateChangedActions',
|
|
53
|
+
'$localCustomActions',
|
|
54
|
+
] as const
|
|
55
|
+
|
|
56
|
+
/** The state that declares `root`, or the conventional id for a flow that predates it. */
|
|
57
|
+
export const resolveEntryPointId = (flow: Record<string, { root?: boolean }>): string | undefined =>
|
|
58
|
+
Object.keys(flow).find((stateId) => flow[stateId].root) ?? (ROOT_STATE_ID in flow ? ROOT_STATE_ID : undefined)
|
|
59
|
+
|
|
49
60
|
const createVariableNameSchema = (description: string) => z.string().describe(description)
|
|
50
61
|
|
|
51
62
|
const plainTextSchema = z.string()
|
|
@@ -395,6 +406,35 @@ export type State = z.infer<typeof stateSchema>
|
|
|
395
406
|
export type Flow = z.infer<typeof flowSchema>
|
|
396
407
|
export type BuilderFlow = Flow
|
|
397
408
|
|
|
409
|
+
/**
|
|
410
|
+
* Typing indicators are noise in every projection of a flow, so both the digest
|
|
411
|
+
* and the minifier drop them. The two signals are checked because `$typeOfContent`
|
|
412
|
+
* is absent from a minified flow and can come back empty from a GET, while the
|
|
413
|
+
* settings mime type is absent from a hand-written action.
|
|
414
|
+
*/
|
|
415
|
+
export function isChatStateSendMessage(item: {
|
|
416
|
+
action?: { type: string; $typeOfContent?: string; settings: { type?: string; [key: string]: unknown } }
|
|
417
|
+
}): boolean {
|
|
418
|
+
if (item.action?.type !== 'SendMessage') {
|
|
419
|
+
return false
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
return (
|
|
423
|
+
item.action.$typeOfContent === 'chat-state' ||
|
|
424
|
+
item.action.settings.type === 'application/vnd.lime.chatstate+json'
|
|
425
|
+
)
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/** The input the runtime will use: the first one in the state, if any. */
|
|
429
|
+
export function inputOf<T>(state: { $contentActions: Array<{ input?: T }> }): T | undefined {
|
|
430
|
+
return state.$contentActions.find((item) => item.input)?.input
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/** The labels of a select's options, which are what a user answers with. */
|
|
434
|
+
export function optionLabels(content: { options?: Array<string | { text?: string }> }): Array<string> {
|
|
435
|
+
return (content.options ?? []).map((option) => (typeof option === 'string' ? option : (option?.text ?? '')))
|
|
436
|
+
}
|
|
437
|
+
|
|
398
438
|
export type BuilderConfiguration = {
|
|
399
439
|
'builder:minimumIntentScore'?: string
|
|
400
440
|
'builder:stateTrack'?: string
|