@voiceflow/voice-types 2.1.19 → 2.2.2
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/index.d.ts +5 -4
- package/build/common/index.js +6 -5
- package/build/common/index.js.map +1 -1
- package/build/common/{types.d.ts → models.d.ts} +4 -4
- package/build/common/{types.js → models.js} +1 -1
- package/build/common/models.js.map +1 -0
- package/build/common/node/buttons.d.ts +3 -3
- package/build/common/node/capture.d.ts +4 -4
- package/build/common/node/captureV2.d.ts +7 -7
- package/build/common/node/interaction.d.ts +4 -4
- package/build/common/node/prompt.d.ts +3 -3
- package/build/common/node/speak.d.ts +6 -6
- package/build/common/node/utils.d.ts +11 -11
- package/build/common/project/index.d.ts +9 -3
- package/build/common/project/index.js +3 -3
- package/build/common/project/index.js.map +1 -1
- package/build/common/utils/index.d.ts +3 -0
- package/build/common/utils/index.js +26 -0
- package/build/common/utils/index.js.map +1 -0
- package/build/common/utils/node.d.ts +6 -0
- package/build/common/utils/node.js +9 -0
- package/build/common/utils/node.js.map +1 -0
- package/build/{esm/utils.d.ts → common/utils/prompt.d.ts} +1 -1
- package/build/common/{utils.js → utils/prompt.js} +1 -1
- package/build/common/utils/prompt.js.map +1 -0
- package/build/common/utils/step.d.ts +6 -0
- package/build/common/utils/step.js +10 -0
- package/build/common/utils/step.js.map +1 -0
- package/build/common/version/index.d.ts +8 -10
- package/build/common/version/index.js +5 -5
- package/build/common/version/index.js.map +1 -1
- package/build/common/version/settings.d.ts +7 -6
- package/build/common/version/settings.js +4 -4
- package/build/common/version/settings.js.map +1 -1
- package/build/esm/index.d.ts +5 -4
- package/build/esm/index.js +5 -4
- package/build/esm/index.js.map +1 -1
- package/build/esm/{types.d.ts → models.d.ts} +4 -4
- package/build/esm/models.js +2 -0
- package/build/esm/models.js.map +1 -0
- package/build/esm/node/buttons.d.ts +3 -3
- package/build/esm/node/capture.d.ts +4 -4
- package/build/esm/node/captureV2.d.ts +7 -7
- package/build/esm/node/interaction.d.ts +4 -4
- package/build/esm/node/prompt.d.ts +3 -3
- package/build/esm/node/speak.d.ts +6 -6
- package/build/esm/node/utils.d.ts +11 -11
- package/build/esm/project/index.d.ts +9 -3
- package/build/esm/project/index.js +2 -2
- package/build/esm/project/index.js.map +1 -1
- package/build/esm/utils/index.d.ts +3 -0
- package/build/esm/utils/index.js +4 -0
- package/build/esm/utils/index.js.map +1 -0
- package/build/esm/utils/node.d.ts +6 -0
- package/build/esm/utils/node.js +6 -0
- package/build/esm/utils/node.js.map +1 -0
- package/build/{common/utils.d.ts → esm/utils/prompt.d.ts} +1 -1
- package/build/esm/{utils.js → utils/prompt.js} +1 -1
- package/build/esm/utils/prompt.js.map +1 -0
- package/build/esm/utils/step.d.ts +6 -0
- package/build/esm/utils/step.js +7 -0
- package/build/esm/utils/step.js.map +1 -0
- package/build/esm/version/index.d.ts +8 -10
- package/build/esm/version/index.js +5 -5
- package/build/esm/version/index.js.map +1 -1
- package/build/esm/version/settings.d.ts +7 -6
- package/build/esm/version/settings.js +4 -4
- package/build/esm/version/settings.js.map +1 -1
- package/package.json +3 -3
- package/build/common/types.js.map +0 -1
- package/build/common/utils.js.map +0 -1
- package/build/esm/types.js +0 -2
- package/build/esm/types.js.map +0 -1
- package/build/esm/utils.js.map +0 -1
package/build/common/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
4
|
-
export * as
|
|
1
|
+
export * as VoiceModels from './models';
|
|
2
|
+
export * as VoiceNode from './node';
|
|
3
|
+
export * as VoiceProject from './project';
|
|
4
|
+
export * as VoiceUtils from './utils';
|
|
5
|
+
export * as VoiceVersion from './version';
|
package/build/common/index.js
CHANGED
|
@@ -19,9 +19,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
22
|
+
exports.VoiceVersion = exports.VoiceUtils = exports.VoiceProject = exports.VoiceNode = exports.VoiceModels = void 0;
|
|
23
|
+
exports.VoiceModels = __importStar(require("./models"));
|
|
24
|
+
exports.VoiceNode = __importStar(require("./node"));
|
|
25
|
+
exports.VoiceProject = __importStar(require("./project"));
|
|
26
|
+
exports.VoiceUtils = __importStar(require("./utils"));
|
|
27
|
+
exports.VoiceVersion = __importStar(require("./version"));
|
|
27
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAwC;AACxC,oDAAoC;AACpC,0DAA0C;AAC1C,sDAAsC;AACtC,0DAA0C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseModels } from '@voiceflow/base-types';
|
|
2
2
|
export interface Prompt<Voice> {
|
|
3
3
|
desc?: string;
|
|
4
4
|
voice: Voice;
|
|
@@ -9,13 +9,13 @@ export interface IntentPrompt<Voice> {
|
|
|
9
9
|
slots?: string[];
|
|
10
10
|
voice?: Voice;
|
|
11
11
|
}
|
|
12
|
-
export interface IntentSlotDialog<Voice> extends
|
|
12
|
+
export interface IntentSlotDialog<Voice> extends BaseModels.IntentSlotDialog {
|
|
13
13
|
prompt: IntentPrompt<Voice>[];
|
|
14
14
|
confirm: IntentPrompt<Voice>[];
|
|
15
15
|
}
|
|
16
|
-
export interface IntentSlot<Voice> extends
|
|
16
|
+
export interface IntentSlot<Voice> extends BaseModels.IntentSlot {
|
|
17
17
|
dialog: IntentSlotDialog<Voice>;
|
|
18
18
|
}
|
|
19
|
-
export interface Intent<Voice> extends
|
|
19
|
+
export interface Intent<Voice> extends BaseModels.Intent {
|
|
20
20
|
slots?: IntentSlot<Voice>[];
|
|
21
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
import { StepNoMatch, StepNoReply, StepReprompt } from './utils';
|
|
3
|
-
export interface StepData<Voice> extends
|
|
3
|
+
export interface StepData<Voice> extends BaseNode.Buttons.StepData, StepReprompt<Voice> {
|
|
4
4
|
else: StepNoMatch<Voice>;
|
|
5
5
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
6
6
|
}
|
|
7
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
7
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Buttons.Step<Data> {
|
|
8
8
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
import { NodeNoReply, NodeReprompt, StepNoReply, StepReprompt } from './utils';
|
|
3
3
|
/** @deprecated */
|
|
4
|
-
export interface StepData<Voice> extends
|
|
4
|
+
export interface StepData<Voice> extends BaseNode.Capture.StepData, StepReprompt<Voice> {
|
|
5
5
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
6
6
|
}
|
|
7
7
|
/** @deprecated */
|
|
8
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
8
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Capture.Step<Data> {
|
|
9
9
|
}
|
|
10
10
|
/** @deprecated */
|
|
11
|
-
export interface Node extends
|
|
11
|
+
export interface Node extends BaseNode.Capture.Node, NodeReprompt {
|
|
12
12
|
noReply?: Nullable<NodeNoReply>;
|
|
13
13
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Intent } from "../
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
|
+
import { Intent } from "../models";
|
|
3
3
|
import { NodeNoMatch, NodeNoReply, StepNoMatch, StepNoReply } from './utils';
|
|
4
|
-
export interface IntentCapture<Voice> extends
|
|
4
|
+
export interface IntentCapture<Voice> extends BaseNode.CaptureV2.IntentCapture {
|
|
5
5
|
intent: Intent<Voice>;
|
|
6
6
|
}
|
|
7
|
-
export interface StepData<Voice> extends
|
|
8
|
-
capture: IntentCapture<Voice> |
|
|
7
|
+
export interface StepData<Voice> extends BaseNode.CaptureV2.StepData {
|
|
8
|
+
capture: IntentCapture<Voice> | BaseNode.CaptureV2.QueryCapture;
|
|
9
9
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
10
10
|
noMatch?: Nullable<StepNoMatch<Voice>>;
|
|
11
11
|
}
|
|
12
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
12
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.CaptureV2.Step<Data> {
|
|
13
13
|
}
|
|
14
|
-
export interface Node extends
|
|
14
|
+
export interface Node extends BaseNode.CaptureV2.Node {
|
|
15
15
|
noReply?: Nullable<NodeNoReply>;
|
|
16
16
|
noMatch?: Nullable<NodeNoMatch>;
|
|
17
17
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
import { DeprecatedNodeNoMatch, NodeNoMatch, NodeNoReply, NodeReprompt, StepNoMatch, StepNoReply, StepReprompt } from './utils';
|
|
3
|
-
export interface StepData<Voice> extends
|
|
3
|
+
export interface StepData<Voice> extends BaseNode.Interaction.StepData, StepReprompt<Voice> {
|
|
4
4
|
else: StepNoMatch<Voice>;
|
|
5
5
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
6
6
|
}
|
|
7
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
7
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Interaction.Step<Data> {
|
|
8
8
|
}
|
|
9
|
-
export interface Node<Event =
|
|
9
|
+
export interface Node<Event = BaseNode.Utils.BaseEvent> extends BaseNode.Interaction.Node<Event>, DeprecatedNodeNoMatch, NodeReprompt {
|
|
10
10
|
noMatch?: Nullable<NodeNoMatch>;
|
|
11
11
|
noReply?: Nullable<NodeNoReply>;
|
|
12
12
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
import { StepNoMatch, StepNoReply, StepReprompt } from './utils';
|
|
3
|
-
export interface StepData<Voice> extends
|
|
3
|
+
export interface StepData<Voice> extends BaseNode.Prompt.StepData, StepReprompt<Voice> {
|
|
4
4
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
5
5
|
noMatches: StepNoMatch<Voice>;
|
|
6
6
|
}
|
|
7
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
7
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Prompt.Step<Data> {
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Prompt } from "../
|
|
3
|
-
export interface StepData<Voice> extends
|
|
1
|
+
import { BaseNode } from '@voiceflow/base-types';
|
|
2
|
+
import { Prompt } from "../models";
|
|
3
|
+
export interface StepData<Voice> extends BaseNode.Speak.StepData, BaseNode.Speak.StepDataDialog<Prompt<Voice>> {
|
|
4
4
|
}
|
|
5
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
5
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Speak.Step<Data> {
|
|
6
6
|
}
|
|
7
|
-
export interface SpeakNode extends
|
|
7
|
+
export interface SpeakNode extends BaseNode.Speak.Node, BaseNode.Speak.SpeakNode<string> {
|
|
8
8
|
}
|
|
9
|
-
export interface RandomSpeakNode extends
|
|
9
|
+
export interface RandomSpeakNode extends BaseNode.Speak.Node, BaseNode.Speak.RandomSpeakNode<string> {
|
|
10
10
|
}
|
|
11
11
|
export declare type Node = SpeakNode | RandomSpeakNode;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Prompt } from "../
|
|
3
|
-
export interface StepNoReply<Voice> extends
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
|
+
import { Prompt } from "../models";
|
|
3
|
+
export interface StepNoReply<Voice> extends BaseNode.Utils.StepNoReply<Prompt<Voice>> {
|
|
4
4
|
}
|
|
5
|
-
export interface NodeNoReply extends
|
|
5
|
+
export interface NodeNoReply extends BaseNode.Utils.NodeNoReply<string> {
|
|
6
6
|
}
|
|
7
|
-
export interface StepNoMatch<Voice> extends
|
|
7
|
+
export interface StepNoMatch<Voice> extends BaseNode.Utils.StepNoMatch<Prompt<Voice>> {
|
|
8
8
|
}
|
|
9
|
-
export interface NodeNoMatch extends
|
|
9
|
+
export interface NodeNoMatch extends BaseNode.Utils.NodeNoMatch<string> {
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* @deprecated use StepNoReply instead
|
|
13
13
|
*/
|
|
14
|
-
export interface StepReprompt<Voice> extends
|
|
14
|
+
export interface StepReprompt<Voice> extends BaseNode.Utils.StepReprompt<Prompt<Voice>> {
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* @deprecated use NodeNoReply instead
|
|
18
18
|
*/
|
|
19
|
-
export interface NodeReprompt extends
|
|
19
|
+
export interface NodeReprompt extends BaseNode.Utils.NodeReprompt<string> {
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated use NodeNoMatch instead
|
|
23
23
|
*/
|
|
24
|
-
export interface DeprecatedNodeNoMatch extends
|
|
24
|
+
export interface DeprecatedNodeNoMatch extends BaseNode.Utils.DeprecatedNodeNoMatch<string> {
|
|
25
25
|
}
|
|
26
|
-
export interface NoMatchNode extends
|
|
26
|
+
export interface NoMatchNode extends BaseNode.Utils.BaseNode, DeprecatedNodeNoMatch {
|
|
27
27
|
noMatch?: Nullable<NodeNoMatch>;
|
|
28
28
|
}
|
|
29
|
-
export interface NoReplyNode extends
|
|
29
|
+
export interface NoReplyNode extends BaseNode.Utils.BaseNode, NodeReprompt {
|
|
30
30
|
noReply?: Nullable<NodeNoReply>;
|
|
31
31
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { BaseModels, BaseProject } from '@voiceflow/base-types';
|
|
2
|
+
export interface MemberPlatformData extends BaseProject.MemberPlatformData {
|
|
3
3
|
}
|
|
4
|
-
export
|
|
4
|
+
export interface PlatformData extends BaseProject.PlatformData {
|
|
5
|
+
}
|
|
6
|
+
export interface Project<GMemberPlatformData extends MemberPlatformData = MemberPlatformData> extends BaseProject.Project {
|
|
7
|
+
members: BaseModels.Project.Member<GMemberPlatformData>[];
|
|
8
|
+
platformData: PlatformData;
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultPlatformData: (data?: Partial<PlatformData>) => PlatformData;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.defaultPlatformData = void 0;
|
|
4
4
|
const base_types_1 = require("@voiceflow/base-types");
|
|
5
|
-
const
|
|
6
|
-
exports.
|
|
5
|
+
const defaultPlatformData = (data = {}) => (Object.assign({}, base_types_1.BaseProject.defaultPlatformData(data)));
|
|
6
|
+
exports.defaultPlatformData = defaultPlatformData;
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/project/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/project/index.ts"],"names":[],"mappings":";;;AAAA,sDAAgE;AAWzD,MAAM,mBAAmB,GAAG,CAAC,OAA8B,EAAE,EAAgB,EAAE,CAAC,mBAClF,wBAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,EACxC,CAAC;AAFU,QAAA,mBAAmB,uBAE7B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.step = exports.prompt = exports.node = void 0;
|
|
23
|
+
exports.node = __importStar(require("./node"));
|
|
24
|
+
exports.prompt = __importStar(require("./prompt"));
|
|
25
|
+
exports.step = __importStar(require("./step"));
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA+B;AAC/B,mDAAmC;AACnC,+CAA+B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseNode } from '@voiceflow/base-types';
|
|
2
|
+
import * as Node from "../node";
|
|
3
|
+
export declare const isSpeak: (value: BaseNode.Utils.BaseNode) => value is Node.Speak.Node;
|
|
4
|
+
export declare const isCapture: (value: BaseNode.Utils.BaseNode) => value is Node.Capture.Node;
|
|
5
|
+
export declare const isCaptureV2: (value: BaseNode.Utils.BaseNode) => value is Node.CaptureV2.Node;
|
|
6
|
+
export declare const isInteraction: (value: BaseNode.Utils.BaseNode) => value is Node.Interaction.Node<BaseNode.Utils.BaseEvent>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInteraction = exports.isCaptureV2 = exports.isCapture = exports.isSpeak = void 0;
|
|
4
|
+
const base_types_1 = require("@voiceflow/base-types");
|
|
5
|
+
exports.isSpeak = base_types_1.BaseUtils.node.createNodeTypeguard(base_types_1.BaseNode.NodeType.SPEAK);
|
|
6
|
+
exports.isCapture = base_types_1.BaseUtils.node.createNodeTypeguard(base_types_1.BaseNode.NodeType.CAPTURE);
|
|
7
|
+
exports.isCaptureV2 = base_types_1.BaseUtils.node.createNodeTypeguard(base_types_1.BaseNode.NodeType.CAPTURE_V2);
|
|
8
|
+
exports.isInteraction = base_types_1.BaseUtils.node.createNodeTypeguard(base_types_1.BaseNode.NodeType.INTERACTION);
|
|
9
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/utils/node.ts"],"names":[],"mappings":";;;AAAA,sDAA4D;AAI/C,QAAA,OAAO,GAAG,sBAAS,CAAC,IAAI,CAAC,mBAAmB,CAAkB,qBAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACvF,QAAA,SAAS,GAAG,sBAAS,CAAC,IAAI,CAAC,mBAAmB,CAAoB,qBAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC7F,QAAA,WAAW,GAAG,sBAAS,CAAC,IAAI,CAAC,mBAAmB,CAAsB,qBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACpG,QAAA,aAAa,GAAG,sBAAS,CAAC,IAAI,CAAC,mBAAmB,CAAwB,qBAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/utils/prompt.ts"],"names":[],"mappings":";;;AAIO,MAAM,aAAa,GAAG,CAAI,MAAuC,EAAE,YAAe,EAAuB,EAAE;IAChH,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAA,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,YAAY;QACnC,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,aAAa,iBASxB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Node from "../node";
|
|
2
|
+
export declare const isSpeak: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Speak.Step<Node.Speak.StepData<unknown>>;
|
|
3
|
+
export declare const isPrompt: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Prompt.Step<Node.Prompt.StepData<unknown>>;
|
|
4
|
+
export declare const isButtons: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Buttons.Step<Node.Buttons.StepData<unknown>>;
|
|
5
|
+
export declare const isCapture: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Capture.Step<Node.Capture.StepData<unknown>>;
|
|
6
|
+
export declare const isCaptureV2: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.CaptureV2.Step<Node.CaptureV2.StepData<unknown>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isCaptureV2 = exports.isCapture = exports.isButtons = exports.isPrompt = exports.isSpeak = void 0;
|
|
4
|
+
const base_types_1 = require("@voiceflow/base-types");
|
|
5
|
+
exports.isSpeak = base_types_1.BaseUtils.step.createStepTypeguard(base_types_1.BaseNode.NodeType.SPEAK);
|
|
6
|
+
exports.isPrompt = base_types_1.BaseUtils.step.createStepTypeguard(base_types_1.BaseNode.NodeType.PROMPT);
|
|
7
|
+
exports.isButtons = base_types_1.BaseUtils.step.createStepTypeguard(base_types_1.BaseNode.NodeType.BUTTONS);
|
|
8
|
+
exports.isCapture = base_types_1.BaseUtils.step.createStepTypeguard(base_types_1.BaseNode.NodeType.CAPTURE);
|
|
9
|
+
exports.isCaptureV2 = base_types_1.BaseUtils.step.createStepTypeguard(base_types_1.BaseNode.NodeType.CAPTURE_V2);
|
|
10
|
+
//# sourceMappingURL=step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/utils/step.ts"],"names":[],"mappings":";;;AAAA,sDAA4D;AAI/C,QAAA,OAAO,GAAG,sBAAS,CAAC,IAAI,CAAC,mBAAmB,CAAkB,qBAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACvF,QAAA,QAAQ,GAAG,sBAAS,CAAC,IAAI,CAAC,mBAAmB,CAAmB,qBAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC1F,QAAA,SAAS,GAAG,sBAAS,CAAC,IAAI,CAAC,mBAAmB,CAAoB,qBAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC7F,QAAA,SAAS,GAAG,sBAAS,CAAC,IAAI,CAAC,mBAAmB,CAAoB,qBAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC7F,QAAA,WAAW,GAAG,sBAAS,CAAC,IAAI,CAAC,mBAAmB,CAAsB,qBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Intent, Prompt } from "../
|
|
3
|
-
import {
|
|
1
|
+
import { BaseModels, BaseVersion, DeepPartialByKey } from '@voiceflow/base-types';
|
|
2
|
+
import { Intent, Prompt } from "../models";
|
|
3
|
+
import { DefaultSettingsParams, Settings } from './settings';
|
|
4
4
|
export * from './settings';
|
|
5
|
-
export interface
|
|
5
|
+
export interface PlatformData<Voice> extends BaseVersion.PlatformData<Prompt<Voice>> {
|
|
6
6
|
intents: Intent<Voice>[];
|
|
7
|
-
settings:
|
|
7
|
+
settings: Settings<Voice>;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
}) => VoiceVersionData<Voice>;
|
|
12
|
-
export interface VoiceVersion<Voice> extends Version.BaseVersion<Prompt<Voice>> {
|
|
13
|
-
platformData: VoiceVersionData<Voice>;
|
|
9
|
+
export interface Version<Voice, Prototype extends BaseModels.Version.Prototype = BaseModels.Version.Prototype> extends BaseVersion.Version<Prompt<Voice>, Prototype> {
|
|
10
|
+
platformData: PlatformData<Voice>;
|
|
14
11
|
}
|
|
12
|
+
export declare const defaultPlatformData: <Voice>({ intents, settings, ...data }: DeepPartialByKey<PlatformData<Voice>, "settings">, params: DefaultSettingsParams<Voice>) => PlatformData<Voice>;
|
|
@@ -21,13 +21,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.
|
|
24
|
+
exports.defaultPlatformData = void 0;
|
|
25
25
|
const base_types_1 = require("@voiceflow/base-types");
|
|
26
26
|
const settings_1 = require("./settings");
|
|
27
27
|
__exportStar(require("./settings"), exports);
|
|
28
|
-
const
|
|
29
|
-
var { intents = [], settings } = _a, data = __rest(_a, ["intents", "settings"]);
|
|
30
|
-
return (Object.assign(Object.assign({}, base_types_1.
|
|
28
|
+
const defaultPlatformData = (_a, params) => {
|
|
29
|
+
var { intents = [], settings = {} } = _a, data = __rest(_a, ["intents", "settings"]);
|
|
30
|
+
return (Object.assign(Object.assign({}, base_types_1.BaseVersion.defaultPlatformData(data)), { intents, settings: (0, settings_1.defaultSettings)(settings, params) }));
|
|
31
31
|
};
|
|
32
|
-
exports.
|
|
32
|
+
exports.defaultPlatformData = defaultPlatformData;
|
|
33
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/version/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/version/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAkF;AAIlF,yCAA8E;AAE9E,6CAA2B;AAYpB,MAAM,mBAAmB,GAAG,CACjC,EAA2F,EAC3F,MAAoC,EACf,EAAE;QAFvB,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,EAAE,OAA8D,EAAzD,IAAI,cAAtC,uBAAwC,CAAF;IAEd,OAAA,iCACrB,wBAAW,CAAC,mBAAmB,CAAgB,IAAI,CAAC,KACvD,OAAO,EACP,QAAQ,EAAE,IAAA,0BAAe,EAAQ,QAAQ,EAAE,MAAM,CAAC,IAClD,CAAA;CAAA,CAAC;AAPU,QAAA,mBAAmB,uBAO7B"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Prompt } from "../
|
|
3
|
-
export interface
|
|
4
|
-
session:
|
|
1
|
+
import { BaseVersion, Nullable } from '@voiceflow/base-types';
|
|
2
|
+
import { Prompt } from "../models";
|
|
3
|
+
export interface Settings<Voice> extends BaseVersion.Settings<Prompt<Voice>> {
|
|
4
|
+
session: BaseVersion.Session<Prompt<Voice>>;
|
|
5
5
|
defaultVoice: Nullable<Voice>;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export interface DefaultSettingsParams<Voice> {
|
|
8
8
|
defaultPromptVoice: Voice;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultSettings: <Voice>({ error, defaultVoice, ...baseSettings }: Partial<Settings<Voice>>, { defaultPromptVoice }: DefaultSettingsParams<Voice>) => Settings<Voice>;
|
|
@@ -11,12 +11,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
14
|
+
exports.defaultSettings = void 0;
|
|
15
15
|
const base_types_1 = require("@voiceflow/base-types");
|
|
16
16
|
const utils_1 = require("../utils");
|
|
17
|
-
const
|
|
17
|
+
const defaultSettings = (_a, { defaultPromptVoice }) => {
|
|
18
18
|
var { error, defaultVoice = null } = _a, baseSettings = __rest(_a, ["error", "defaultVoice"]);
|
|
19
|
-
return (Object.assign(Object.assign({}, base_types_1.
|
|
19
|
+
return (Object.assign(Object.assign({}, base_types_1.BaseVersion.defaultSettings(baseSettings)), { error: utils_1.prompt.defaultPrompt(error, defaultVoice !== null && defaultVoice !== void 0 ? defaultVoice : defaultPromptVoice), defaultVoice }));
|
|
20
20
|
};
|
|
21
|
-
exports.
|
|
21
|
+
exports.defaultSettings = defaultSettings;
|
|
22
22
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/version/settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/version/settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sDAA8D;AAG9D,oCAAiC;AAW1B,MAAM,eAAe,GAAG,CAC7B,EAAyE,EACzE,EAAE,kBAAkB,EAAgC,EACnC,EAAE;QAFnB,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,OAA6C,EAAxC,YAAY,cAA7C,yBAA+C,CAAF;IAEzB,OAAA,iCACjB,wBAAW,CAAC,eAAe,CAAgB,YAAY,CAAC,KAC3D,KAAK,EAAE,cAAM,CAAC,aAAa,CAAQ,KAAK,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,kBAAkB,CAAC,EAC7E,YAAY,IACZ,CAAA;CAAA,CAAC;AAPU,QAAA,eAAe,mBAOzB"}
|
package/build/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
4
|
-
export * as
|
|
1
|
+
export * as VoiceModels from './models';
|
|
2
|
+
export * as VoiceNode from './node';
|
|
3
|
+
export * as VoiceProject from './project';
|
|
4
|
+
export * as VoiceUtils from './utils';
|
|
5
|
+
export * as VoiceVersion from './version';
|
package/build/esm/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
4
|
-
export * as
|
|
1
|
+
export * as VoiceModels from './models';
|
|
2
|
+
export * as VoiceNode from './node';
|
|
3
|
+
export * as VoiceProject from './project';
|
|
4
|
+
export * as VoiceUtils from './utils';
|
|
5
|
+
export * as VoiceVersion from './version';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,YAAY,MAAM,WAAW,CAAC;AAC1C,OAAO,KAAK,UAAU,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,WAAW,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseModels } from '@voiceflow/base-types';
|
|
2
2
|
export interface Prompt<Voice> {
|
|
3
3
|
desc?: string;
|
|
4
4
|
voice: Voice;
|
|
@@ -9,13 +9,13 @@ export interface IntentPrompt<Voice> {
|
|
|
9
9
|
slots?: string[];
|
|
10
10
|
voice?: Voice;
|
|
11
11
|
}
|
|
12
|
-
export interface IntentSlotDialog<Voice> extends
|
|
12
|
+
export interface IntentSlotDialog<Voice> extends BaseModels.IntentSlotDialog {
|
|
13
13
|
prompt: IntentPrompt<Voice>[];
|
|
14
14
|
confirm: IntentPrompt<Voice>[];
|
|
15
15
|
}
|
|
16
|
-
export interface IntentSlot<Voice> extends
|
|
16
|
+
export interface IntentSlot<Voice> extends BaseModels.IntentSlot {
|
|
17
17
|
dialog: IntentSlotDialog<Voice>;
|
|
18
18
|
}
|
|
19
|
-
export interface Intent<Voice> extends
|
|
19
|
+
export interface Intent<Voice> extends BaseModels.Intent {
|
|
20
20
|
slots?: IntentSlot<Voice>[];
|
|
21
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
import { StepNoMatch, StepNoReply, StepReprompt } from './utils';
|
|
3
|
-
export interface StepData<Voice> extends
|
|
3
|
+
export interface StepData<Voice> extends BaseNode.Buttons.StepData, StepReprompt<Voice> {
|
|
4
4
|
else: StepNoMatch<Voice>;
|
|
5
5
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
6
6
|
}
|
|
7
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
7
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Buttons.Step<Data> {
|
|
8
8
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
import { NodeNoReply, NodeReprompt, StepNoReply, StepReprompt } from './utils';
|
|
3
3
|
/** @deprecated */
|
|
4
|
-
export interface StepData<Voice> extends
|
|
4
|
+
export interface StepData<Voice> extends BaseNode.Capture.StepData, StepReprompt<Voice> {
|
|
5
5
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
6
6
|
}
|
|
7
7
|
/** @deprecated */
|
|
8
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
8
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Capture.Step<Data> {
|
|
9
9
|
}
|
|
10
10
|
/** @deprecated */
|
|
11
|
-
export interface Node extends
|
|
11
|
+
export interface Node extends BaseNode.Capture.Node, NodeReprompt {
|
|
12
12
|
noReply?: Nullable<NodeNoReply>;
|
|
13
13
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Intent } from "../
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
|
+
import { Intent } from "../models";
|
|
3
3
|
import { NodeNoMatch, NodeNoReply, StepNoMatch, StepNoReply } from './utils';
|
|
4
|
-
export interface IntentCapture<Voice> extends
|
|
4
|
+
export interface IntentCapture<Voice> extends BaseNode.CaptureV2.IntentCapture {
|
|
5
5
|
intent: Intent<Voice>;
|
|
6
6
|
}
|
|
7
|
-
export interface StepData<Voice> extends
|
|
8
|
-
capture: IntentCapture<Voice> |
|
|
7
|
+
export interface StepData<Voice> extends BaseNode.CaptureV2.StepData {
|
|
8
|
+
capture: IntentCapture<Voice> | BaseNode.CaptureV2.QueryCapture;
|
|
9
9
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
10
10
|
noMatch?: Nullable<StepNoMatch<Voice>>;
|
|
11
11
|
}
|
|
12
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
12
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.CaptureV2.Step<Data> {
|
|
13
13
|
}
|
|
14
|
-
export interface Node extends
|
|
14
|
+
export interface Node extends BaseNode.CaptureV2.Node {
|
|
15
15
|
noReply?: Nullable<NodeNoReply>;
|
|
16
16
|
noMatch?: Nullable<NodeNoMatch>;
|
|
17
17
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
import { DeprecatedNodeNoMatch, NodeNoMatch, NodeNoReply, NodeReprompt, StepNoMatch, StepNoReply, StepReprompt } from './utils';
|
|
3
|
-
export interface StepData<Voice> extends
|
|
3
|
+
export interface StepData<Voice> extends BaseNode.Interaction.StepData, StepReprompt<Voice> {
|
|
4
4
|
else: StepNoMatch<Voice>;
|
|
5
5
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
6
6
|
}
|
|
7
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
7
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Interaction.Step<Data> {
|
|
8
8
|
}
|
|
9
|
-
export interface Node<Event =
|
|
9
|
+
export interface Node<Event = BaseNode.Utils.BaseEvent> extends BaseNode.Interaction.Node<Event>, DeprecatedNodeNoMatch, NodeReprompt {
|
|
10
10
|
noMatch?: Nullable<NodeNoMatch>;
|
|
11
11
|
noReply?: Nullable<NodeNoReply>;
|
|
12
12
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
import { StepNoMatch, StepNoReply, StepReprompt } from './utils';
|
|
3
|
-
export interface StepData<Voice> extends
|
|
3
|
+
export interface StepData<Voice> extends BaseNode.Prompt.StepData, StepReprompt<Voice> {
|
|
4
4
|
noReply?: Nullable<StepNoReply<Voice>>;
|
|
5
5
|
noMatches: StepNoMatch<Voice>;
|
|
6
6
|
}
|
|
7
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
7
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Prompt.Step<Data> {
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Prompt } from "../
|
|
3
|
-
export interface StepData<Voice> extends
|
|
1
|
+
import { BaseNode } from '@voiceflow/base-types';
|
|
2
|
+
import { Prompt } from "../models";
|
|
3
|
+
export interface StepData<Voice> extends BaseNode.Speak.StepData, BaseNode.Speak.StepDataDialog<Prompt<Voice>> {
|
|
4
4
|
}
|
|
5
|
-
export interface Step<Data = StepData<unknown>> extends
|
|
5
|
+
export interface Step<Data = StepData<unknown>> extends BaseNode.Speak.Step<Data> {
|
|
6
6
|
}
|
|
7
|
-
export interface SpeakNode extends
|
|
7
|
+
export interface SpeakNode extends BaseNode.Speak.Node, BaseNode.Speak.SpeakNode<string> {
|
|
8
8
|
}
|
|
9
|
-
export interface RandomSpeakNode extends
|
|
9
|
+
export interface RandomSpeakNode extends BaseNode.Speak.Node, BaseNode.Speak.RandomSpeakNode<string> {
|
|
10
10
|
}
|
|
11
11
|
export declare type Node = SpeakNode | RandomSpeakNode;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Prompt } from "../
|
|
3
|
-
export interface StepNoReply<Voice> extends
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
|
+
import { Prompt } from "../models";
|
|
3
|
+
export interface StepNoReply<Voice> extends BaseNode.Utils.StepNoReply<Prompt<Voice>> {
|
|
4
4
|
}
|
|
5
|
-
export interface NodeNoReply extends
|
|
5
|
+
export interface NodeNoReply extends BaseNode.Utils.NodeNoReply<string> {
|
|
6
6
|
}
|
|
7
|
-
export interface StepNoMatch<Voice> extends
|
|
7
|
+
export interface StepNoMatch<Voice> extends BaseNode.Utils.StepNoMatch<Prompt<Voice>> {
|
|
8
8
|
}
|
|
9
|
-
export interface NodeNoMatch extends
|
|
9
|
+
export interface NodeNoMatch extends BaseNode.Utils.NodeNoMatch<string> {
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* @deprecated use StepNoReply instead
|
|
13
13
|
*/
|
|
14
|
-
export interface StepReprompt<Voice> extends
|
|
14
|
+
export interface StepReprompt<Voice> extends BaseNode.Utils.StepReprompt<Prompt<Voice>> {
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* @deprecated use NodeNoReply instead
|
|
18
18
|
*/
|
|
19
|
-
export interface NodeReprompt extends
|
|
19
|
+
export interface NodeReprompt extends BaseNode.Utils.NodeReprompt<string> {
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated use NodeNoMatch instead
|
|
23
23
|
*/
|
|
24
|
-
export interface DeprecatedNodeNoMatch extends
|
|
24
|
+
export interface DeprecatedNodeNoMatch extends BaseNode.Utils.DeprecatedNodeNoMatch<string> {
|
|
25
25
|
}
|
|
26
|
-
export interface NoMatchNode extends
|
|
26
|
+
export interface NoMatchNode extends BaseNode.Utils.BaseNode, DeprecatedNodeNoMatch {
|
|
27
27
|
noMatch?: Nullable<NodeNoMatch>;
|
|
28
28
|
}
|
|
29
|
-
export interface NoReplyNode extends
|
|
29
|
+
export interface NoReplyNode extends BaseNode.Utils.BaseNode, NodeReprompt {
|
|
30
30
|
noReply?: Nullable<NodeNoReply>;
|
|
31
31
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { BaseModels, BaseProject } from '@voiceflow/base-types';
|
|
2
|
+
export interface MemberPlatformData extends BaseProject.MemberPlatformData {
|
|
3
3
|
}
|
|
4
|
-
export
|
|
4
|
+
export interface PlatformData extends BaseProject.PlatformData {
|
|
5
|
+
}
|
|
6
|
+
export interface Project<GMemberPlatformData extends MemberPlatformData = MemberPlatformData> extends BaseProject.Project {
|
|
7
|
+
members: BaseModels.Project.Member<GMemberPlatformData>[];
|
|
8
|
+
platformData: PlatformData;
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultPlatformData: (data?: Partial<PlatformData>) => PlatformData;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const
|
|
1
|
+
import { BaseProject } from '@voiceflow/base-types';
|
|
2
|
+
export const defaultPlatformData = (data = {}) => (Object.assign({}, BaseProject.defaultPlatformData(data)));
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAWhE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAA8B,EAAE,EAAgB,EAAE,CAAC,mBAClF,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,EACxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseNode } from '@voiceflow/base-types';
|
|
2
|
+
import * as Node from "../node";
|
|
3
|
+
export declare const isSpeak: (value: BaseNode.Utils.BaseNode) => value is Node.Speak.Node;
|
|
4
|
+
export declare const isCapture: (value: BaseNode.Utils.BaseNode) => value is Node.Capture.Node;
|
|
5
|
+
export declare const isCaptureV2: (value: BaseNode.Utils.BaseNode) => value is Node.CaptureV2.Node;
|
|
6
|
+
export declare const isInteraction: (value: BaseNode.Utils.BaseNode) => value is Node.Interaction.Node<BaseNode.Utils.BaseEvent>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseNode, BaseUtils } from '@voiceflow/base-types';
|
|
2
|
+
export const isSpeak = BaseUtils.node.createNodeTypeguard(BaseNode.NodeType.SPEAK);
|
|
3
|
+
export const isCapture = BaseUtils.node.createNodeTypeguard(BaseNode.NodeType.CAPTURE);
|
|
4
|
+
export const isCaptureV2 = BaseUtils.node.createNodeTypeguard(BaseNode.NodeType.CAPTURE_V2);
|
|
5
|
+
export const isInteraction = BaseUtils.node.createNodeTypeguard(BaseNode.NodeType.INTERACTION);
|
|
6
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/utils/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAI5D,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAkB,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpG,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAoB,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAsB,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACjH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAwB,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/utils/prompt.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,MAAuC,EAAE,YAAe,EAAuB,EAAE;IAChH,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAA,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,YAAY;QACnC,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Node from "../node";
|
|
2
|
+
export declare const isSpeak: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Speak.Step<Node.Speak.StepData<unknown>>;
|
|
3
|
+
export declare const isPrompt: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Prompt.Step<Node.Prompt.StepData<unknown>>;
|
|
4
|
+
export declare const isButtons: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Buttons.Step<Node.Buttons.StepData<unknown>>;
|
|
5
|
+
export declare const isCapture: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Capture.Step<Node.Capture.StepData<unknown>>;
|
|
6
|
+
export declare const isCaptureV2: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.CaptureV2.Step<Node.CaptureV2.StepData<unknown>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseNode, BaseUtils } from '@voiceflow/base-types';
|
|
2
|
+
export const isSpeak = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.SPEAK);
|
|
3
|
+
export const isPrompt = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.PROMPT);
|
|
4
|
+
export const isButtons = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.BUTTONS);
|
|
5
|
+
export const isCapture = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.CAPTURE);
|
|
6
|
+
export const isCaptureV2 = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.CAPTURE_V2);
|
|
7
|
+
//# sourceMappingURL=step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/utils/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAI5D,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAkB,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpG,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAmB,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACvG,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAoB,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAoB,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAsB,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Intent, Prompt } from "../
|
|
3
|
-
import {
|
|
1
|
+
import { BaseModels, BaseVersion, DeepPartialByKey } from '@voiceflow/base-types';
|
|
2
|
+
import { Intent, Prompt } from "../models";
|
|
3
|
+
import { DefaultSettingsParams, Settings } from './settings';
|
|
4
4
|
export * from './settings';
|
|
5
|
-
export interface
|
|
5
|
+
export interface PlatformData<Voice> extends BaseVersion.PlatformData<Prompt<Voice>> {
|
|
6
6
|
intents: Intent<Voice>[];
|
|
7
|
-
settings:
|
|
7
|
+
settings: Settings<Voice>;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
}) => VoiceVersionData<Voice>;
|
|
12
|
-
export interface VoiceVersion<Voice> extends Version.BaseVersion<Prompt<Voice>> {
|
|
13
|
-
platformData: VoiceVersionData<Voice>;
|
|
9
|
+
export interface Version<Voice, Prototype extends BaseModels.Version.Prototype = BaseModels.Version.Prototype> extends BaseVersion.Version<Prompt<Voice>, Prototype> {
|
|
10
|
+
platformData: PlatformData<Voice>;
|
|
14
11
|
}
|
|
12
|
+
export declare const defaultPlatformData: <Voice>({ intents, settings, ...data }: DeepPartialByKey<PlatformData<Voice>, "settings">, params: DefaultSettingsParams<Voice>) => PlatformData<Voice>;
|
|
@@ -9,11 +9,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { BaseVersion } from '@voiceflow/base-types';
|
|
13
|
+
import { defaultSettings } from './settings';
|
|
14
14
|
export * from './settings';
|
|
15
|
-
export const
|
|
16
|
-
var { intents = [], settings } = _a, data = __rest(_a, ["intents", "settings"]);
|
|
17
|
-
return (Object.assign(Object.assign({},
|
|
15
|
+
export const defaultPlatformData = (_a, params) => {
|
|
16
|
+
var { intents = [], settings = {} } = _a, data = __rest(_a, ["intents", "settings"]);
|
|
17
|
+
return (Object.assign(Object.assign({}, BaseVersion.defaultPlatformData(data)), { intents, settings: defaultSettings(settings, params) }));
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/version/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/version/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAc,WAAW,EAAoB,MAAM,uBAAuB,CAAC;AAIlF,OAAO,EAAE,eAAe,EAAmC,MAAM,YAAY,CAAC;AAE9E,cAAc,YAAY,CAAC;AAY3B,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,EAA2F,EAC3F,MAAoC,EACf,EAAE;QAFvB,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,EAAE,OAA8D,EAAzD,IAAI,cAAtC,uBAAwC,CAAF;IAEd,OAAA,iCACrB,WAAW,CAAC,mBAAmB,CAAgB,IAAI,CAAC,KACvD,OAAO,EACP,QAAQ,EAAE,eAAe,CAAQ,QAAQ,EAAE,MAAM,CAAC,IAClD,CAAA;CAAA,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Prompt } from "../
|
|
3
|
-
export interface
|
|
4
|
-
session:
|
|
1
|
+
import { BaseVersion, Nullable } from '@voiceflow/base-types';
|
|
2
|
+
import { Prompt } from "../models";
|
|
3
|
+
export interface Settings<Voice> extends BaseVersion.Settings<Prompt<Voice>> {
|
|
4
|
+
session: BaseVersion.Session<Prompt<Voice>>;
|
|
5
5
|
defaultVoice: Nullable<Voice>;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export interface DefaultSettingsParams<Voice> {
|
|
8
8
|
defaultPromptVoice: Voice;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultSettings: <Voice>({ error, defaultVoice, ...baseSettings }: Partial<Settings<Voice>>, { defaultPromptVoice }: DefaultSettingsParams<Voice>) => Settings<Voice>;
|
|
@@ -9,10 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
export const
|
|
12
|
+
import { BaseVersion } from '@voiceflow/base-types';
|
|
13
|
+
import { prompt } from "../utils";
|
|
14
|
+
export const defaultSettings = (_a, { defaultPromptVoice }) => {
|
|
15
15
|
var { error, defaultVoice = null } = _a, baseSettings = __rest(_a, ["error", "defaultVoice"]);
|
|
16
|
-
return (Object.assign(Object.assign({},
|
|
16
|
+
return (Object.assign(Object.assign({}, BaseVersion.defaultSettings(baseSettings)), { error: prompt.defaultPrompt(error, defaultVoice !== null && defaultVoice !== void 0 ? defaultVoice : defaultPromptVoice), defaultVoice }));
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/version/settings.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/version/settings.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAY,MAAM,uBAAuB,CAAC;AAG9D,OAAO,EAAE,MAAM,EAAE,iBAAgB;AAWjC,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,EAAyE,EACzE,EAAE,kBAAkB,EAAgC,EACnC,EAAE;QAFnB,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,OAA6C,EAAxC,YAAY,cAA7C,yBAA+C,CAAF;IAEzB,OAAA,iCACjB,WAAW,CAAC,eAAe,CAAgB,YAAY,CAAC,KAC3D,KAAK,EAAE,MAAM,CAAC,aAAa,CAAQ,KAAK,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,kBAAkB,CAAC,EAC7E,YAAY,IACZ,CAAA;CAAA,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/voice-types",
|
|
3
3
|
"description": "Voiceflow voice project types",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.2",
|
|
5
5
|
"author": "Voiceflow",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/voiceflow/libs/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@voiceflow/base-types": "^2.
|
|
10
|
+
"@voiceflow/base-types": "^2.9.2"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"build"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"test:integration": "exit 0",
|
|
40
40
|
"test:unit": "exit 0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "663b0f893e1cc747f28963f2ae12a83223cacc03"
|
|
43
43
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAIO,MAAM,aAAa,GAAG,CAAI,MAAuC,EAAE,YAAe,EAAuB,EAAE;IAChH,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAA,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,YAAY;QACnC,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,aAAa,iBASxB"}
|
package/build/esm/types.js
DELETED
package/build/esm/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
package/build/esm/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,MAAuC,EAAE,YAAe,EAAuB,EAAE;IAChH,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAA,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,YAAY;QACnC,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC,CAAC"}
|