@voiceflow/base-types 2.23.4 → 2.24.1
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/build/common/models/program.d.ts +0 -2
- package/build/common/node/cardV2.d.ts +2 -1
- package/build/common/node/jump.d.ts +2 -2
- package/build/common/node/push.d.ts +2 -2
- package/build/common/version/settings.d.ts +3 -1
- package/build/common/version/settings.js +2 -1
- package/build/esm/models/program.d.ts +0 -2
- package/build/esm/node/cardV2.d.ts +2 -1
- package/build/esm/node/jump.d.ts +2 -2
- package/build/esm/node/push.d.ts +2 -2
- package/build/esm/version/settings.d.ts +3 -1
- package/build/esm/version/settings.js +2 -1
- package/package.json +2 -2
|
@@ -2,8 +2,6 @@ import { BaseCommand, BaseNode, Variable } from './base';
|
|
|
2
2
|
export interface Model<Node extends BaseNode = BaseNode, Command extends BaseCommand = BaseCommand> {
|
|
3
3
|
id: string;
|
|
4
4
|
startId: string;
|
|
5
|
-
/** @deprecated in favor of versionID */
|
|
6
|
-
skill_id: string;
|
|
7
5
|
versionID: string;
|
|
8
6
|
name?: string;
|
|
9
7
|
lines: Record<string, Node>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlateTextValue } from "../text";
|
|
1
2
|
import { Nullable } from "../types";
|
|
2
3
|
import { NodeType } from './constants';
|
|
3
4
|
import { BaseNode, BaseNoMatchNodeData, BaseNoMatchStepData, BaseNoReplyNodeData, BaseNoReplyStepData, BaseStep, DataID, NoMatchNoReplyStepPorts } from './utils';
|
|
@@ -12,7 +13,7 @@ export interface CardButton extends DataID {
|
|
|
12
13
|
export interface Card extends DataID {
|
|
13
14
|
imageUrl: string | null;
|
|
14
15
|
title: string;
|
|
15
|
-
description:
|
|
16
|
+
description: SlateTextValue;
|
|
16
17
|
buttons: CardButton[];
|
|
17
18
|
}
|
|
18
19
|
export interface StepPorts extends NoMatchNoReplyStepPorts {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Nullable } from "../types";
|
|
2
2
|
import { NodeType } from './constants';
|
|
3
|
-
import { BaseCommand, BaseStep, NodeID, SlotMappings } from './utils';
|
|
3
|
+
import { BaseCommand, BaseStep, CommandType, NodeID, SlotMappings } from './utils';
|
|
4
4
|
export declare enum IntentAvailability {
|
|
5
5
|
LOCAL = "LOCAL",
|
|
6
6
|
GLOBAL = "GLOBAL"
|
|
@@ -17,7 +17,7 @@ export interface Step<Data = StepData> extends BaseStep<Data> {
|
|
|
17
17
|
* use Node.Utils.AnyCommand for other platforms
|
|
18
18
|
*/
|
|
19
19
|
export interface Command extends BaseCommand, Required<SlotMappings> {
|
|
20
|
-
type:
|
|
20
|
+
type: CommandType.JUMP;
|
|
21
21
|
next: NodeID;
|
|
22
22
|
intent: string;
|
|
23
23
|
diagramID?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Nullable } from "../types";
|
|
2
2
|
import { NodeType } from './constants';
|
|
3
|
-
import { BaseCommand, BaseStep, NodeID, SlotMappings } from './utils';
|
|
3
|
+
import { BaseCommand, BaseStep, CommandType, NodeID, SlotMappings } from './utils';
|
|
4
4
|
export interface StepData extends SlotMappings {
|
|
5
5
|
name: string;
|
|
6
6
|
intent: Nullable<string>;
|
|
@@ -14,7 +14,7 @@ export interface Step<Data = StepData> extends BaseStep<Data> {
|
|
|
14
14
|
* use Node.Utils.AnyCommand for other platforms
|
|
15
15
|
*/
|
|
16
16
|
export interface Command extends BaseCommand, Required<SlotMappings> {
|
|
17
|
-
type:
|
|
17
|
+
type: CommandType.PUSH;
|
|
18
18
|
next?: NodeID;
|
|
19
19
|
intent: string;
|
|
20
20
|
diagram_id?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CardLayout } from "../node/cardV2";
|
|
1
2
|
import { Nullable } from "../types";
|
|
2
3
|
import { Utils } from '../node';
|
|
3
4
|
export declare enum RepeatType {
|
|
@@ -23,5 +24,6 @@ export interface Settings<Prompt = unknown> {
|
|
|
23
24
|
repeat: RepeatType;
|
|
24
25
|
session: Session<Prompt>;
|
|
25
26
|
defaultCanvasNodeVisibility: Nullable<Utils.CanvasNodeVisibility>;
|
|
27
|
+
defaultCardLayout: Nullable<CardLayout>;
|
|
26
28
|
}
|
|
27
|
-
export declare const defaultSettings: <Prompt>({ error, repeat, session, defaultCanvasNodeVisibility, }?: Partial<Settings<Prompt>>) => Settings<Prompt>;
|
|
29
|
+
export declare const defaultSettings: <Prompt>({ error, repeat, session, defaultCanvasNodeVisibility, defaultCardLayout, }?: Partial<Settings<Prompt>>) => Settings<Prompt>;
|
|
@@ -12,10 +12,11 @@ var SessionType;
|
|
|
12
12
|
SessionType["RESUME"] = "resume";
|
|
13
13
|
SessionType["RESTART"] = "restart";
|
|
14
14
|
})(SessionType = exports.SessionType || (exports.SessionType = {}));
|
|
15
|
-
const defaultSettings = ({ error = null, repeat = RepeatType.ALL, session = { type: SessionType.RESTART }, defaultCanvasNodeVisibility = null, } = {}) => ({
|
|
15
|
+
const defaultSettings = ({ error = null, repeat = RepeatType.ALL, session = { type: SessionType.RESTART }, defaultCanvasNodeVisibility = null, defaultCardLayout = null, } = {}) => ({
|
|
16
16
|
error,
|
|
17
17
|
repeat,
|
|
18
18
|
session,
|
|
19
19
|
defaultCanvasNodeVisibility,
|
|
20
|
+
defaultCardLayout,
|
|
20
21
|
});
|
|
21
22
|
exports.defaultSettings = defaultSettings;
|
|
@@ -2,8 +2,6 @@ import { BaseCommand, BaseNode, Variable } from './base';
|
|
|
2
2
|
export interface Model<Node extends BaseNode = BaseNode, Command extends BaseCommand = BaseCommand> {
|
|
3
3
|
id: string;
|
|
4
4
|
startId: string;
|
|
5
|
-
/** @deprecated in favor of versionID */
|
|
6
|
-
skill_id: string;
|
|
7
5
|
versionID: string;
|
|
8
6
|
name?: string;
|
|
9
7
|
lines: Record<string, Node>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlateTextValue } from "../text";
|
|
1
2
|
import { Nullable } from "../types";
|
|
2
3
|
import { NodeType } from './constants';
|
|
3
4
|
import { BaseNode, BaseNoMatchNodeData, BaseNoMatchStepData, BaseNoReplyNodeData, BaseNoReplyStepData, BaseStep, DataID, NoMatchNoReplyStepPorts } from './utils';
|
|
@@ -12,7 +13,7 @@ export interface CardButton extends DataID {
|
|
|
12
13
|
export interface Card extends DataID {
|
|
13
14
|
imageUrl: string | null;
|
|
14
15
|
title: string;
|
|
15
|
-
description:
|
|
16
|
+
description: SlateTextValue;
|
|
16
17
|
buttons: CardButton[];
|
|
17
18
|
}
|
|
18
19
|
export interface StepPorts extends NoMatchNoReplyStepPorts {
|
package/build/esm/node/jump.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Nullable } from "../types";
|
|
2
2
|
import { NodeType } from './constants';
|
|
3
|
-
import { BaseCommand, BaseStep, NodeID, SlotMappings } from './utils';
|
|
3
|
+
import { BaseCommand, BaseStep, CommandType, NodeID, SlotMappings } from './utils';
|
|
4
4
|
export declare enum IntentAvailability {
|
|
5
5
|
LOCAL = "LOCAL",
|
|
6
6
|
GLOBAL = "GLOBAL"
|
|
@@ -17,7 +17,7 @@ export interface Step<Data = StepData> extends BaseStep<Data> {
|
|
|
17
17
|
* use Node.Utils.AnyCommand for other platforms
|
|
18
18
|
*/
|
|
19
19
|
export interface Command extends BaseCommand, Required<SlotMappings> {
|
|
20
|
-
type:
|
|
20
|
+
type: CommandType.JUMP;
|
|
21
21
|
next: NodeID;
|
|
22
22
|
intent: string;
|
|
23
23
|
diagramID?: string;
|
package/build/esm/node/push.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Nullable } from "../types";
|
|
2
2
|
import { NodeType } from './constants';
|
|
3
|
-
import { BaseCommand, BaseStep, NodeID, SlotMappings } from './utils';
|
|
3
|
+
import { BaseCommand, BaseStep, CommandType, NodeID, SlotMappings } from './utils';
|
|
4
4
|
export interface StepData extends SlotMappings {
|
|
5
5
|
name: string;
|
|
6
6
|
intent: Nullable<string>;
|
|
@@ -14,7 +14,7 @@ export interface Step<Data = StepData> extends BaseStep<Data> {
|
|
|
14
14
|
* use Node.Utils.AnyCommand for other platforms
|
|
15
15
|
*/
|
|
16
16
|
export interface Command extends BaseCommand, Required<SlotMappings> {
|
|
17
|
-
type:
|
|
17
|
+
type: CommandType.PUSH;
|
|
18
18
|
next?: NodeID;
|
|
19
19
|
intent: string;
|
|
20
20
|
diagram_id?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CardLayout } from "../node/cardV2";
|
|
1
2
|
import { Nullable } from "../types";
|
|
2
3
|
import { Utils } from '../node';
|
|
3
4
|
export declare enum RepeatType {
|
|
@@ -23,5 +24,6 @@ export interface Settings<Prompt = unknown> {
|
|
|
23
24
|
repeat: RepeatType;
|
|
24
25
|
session: Session<Prompt>;
|
|
25
26
|
defaultCanvasNodeVisibility: Nullable<Utils.CanvasNodeVisibility>;
|
|
27
|
+
defaultCardLayout: Nullable<CardLayout>;
|
|
26
28
|
}
|
|
27
|
-
export declare const defaultSettings: <Prompt>({ error, repeat, session, defaultCanvasNodeVisibility, }?: Partial<Settings<Prompt>>) => Settings<Prompt>;
|
|
29
|
+
export declare const defaultSettings: <Prompt>({ error, repeat, session, defaultCanvasNodeVisibility, defaultCardLayout, }?: Partial<Settings<Prompt>>) => Settings<Prompt>;
|
|
@@ -9,9 +9,10 @@ export var SessionType;
|
|
|
9
9
|
SessionType["RESUME"] = "resume";
|
|
10
10
|
SessionType["RESTART"] = "restart";
|
|
11
11
|
})(SessionType || (SessionType = {}));
|
|
12
|
-
export const defaultSettings = ({ error = null, repeat = RepeatType.ALL, session = { type: SessionType.RESTART }, defaultCanvasNodeVisibility = null, } = {}) => ({
|
|
12
|
+
export const defaultSettings = ({ error = null, repeat = RepeatType.ALL, session = { type: SessionType.RESTART }, defaultCanvasNodeVisibility = null, defaultCardLayout = null, } = {}) => ({
|
|
13
13
|
error,
|
|
14
14
|
repeat,
|
|
15
15
|
session,
|
|
16
16
|
defaultCanvasNodeVisibility,
|
|
17
|
+
defaultCardLayout,
|
|
17
18
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/base-types",
|
|
3
3
|
"description": "Voiceflow base project types",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.24.1",
|
|
5
5
|
"author": "Voiceflow",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/voiceflow/libs/issues"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"test:smoke": "exit 0",
|
|
44
44
|
"test:unit": "exit 0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "b6dac7585a9e1812f6af9dd7e349893f0c5561c9"
|
|
47
47
|
}
|