@voiceflow/alexa-types 2.2.35 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/constants/intents.d.ts +5 -5
- package/build/common/constants/intents.js.map +1 -1
- package/build/common/constants/mappings.d.ts +7 -7
- package/build/common/constants/mappings.js +82 -82
- package/build/common/constants/mappings.js.map +1 -1
- package/build/common/diagram.d.ts +3 -3
- package/build/common/index.d.ts +8 -8
- package/build/common/index.js +9 -9
- package/build/common/index.js.map +1 -1
- package/build/common/{types.d.ts → models.d.ts} +0 -0
- package/build/common/{types.js → models.js} +1 -1
- package/build/common/models.js.map +1 -0
- package/build/common/node/accountLinking.d.ts +3 -3
- package/build/common/node/cancelPayment.d.ts +5 -5
- package/build/common/node/capture.d.ts +4 -4
- package/build/common/node/captureV2.d.ts +4 -4
- package/build/common/node/display.d.ts +5 -5
- package/build/common/node/event.d.ts +4 -4
- package/build/common/node/index.d.ts +9 -9
- package/build/common/node/interaction.d.ts +5 -5
- package/build/common/node/payment.d.ts +5 -5
- package/build/common/node/permission.d.ts +3 -3
- package/build/common/node/prompt.d.ts +3 -3
- package/build/common/node/reminder.d.ts +3 -3
- package/build/common/node/speak.d.ts +5 -5
- package/build/common/node/stream.d.ts +6 -6
- package/build/common/node/userInfo.d.ts +5 -5
- package/build/common/program.d.ts +3 -3
- package/build/common/project/index.d.ts +9 -10
- package/build/common/project/index.js +4 -4
- package/build/common/project/index.js.map +1 -1
- package/build/common/project/member.d.ts +5 -5
- package/build/common/project/member.js +4 -4
- package/build/common/project/member.js.map +1 -1
- package/build/common/project/product.d.ts +1 -1
- package/build/common/utils/index.d.ts +3 -0
- package/build/common/utils/index.js +17 -0
- package/build/common/utils/index.js.map +1 -1
- package/build/common/utils/node.d.ts +14 -0
- package/build/common/utils/node.js +37 -0
- package/build/common/utils/node.js.map +1 -0
- package/build/common/utils/step.d.ts +14 -0
- package/build/common/utils/step.js +38 -0
- package/build/common/utils/step.js.map +1 -0
- package/build/common/version/index.d.ts +14 -15
- package/build/common/version/index.js +12 -11
- package/build/common/version/index.js.map +1 -1
- package/build/common/version/publishing.d.ts +2 -2
- package/build/common/version/publishing.js +3 -3
- package/build/common/version/publishing.js.map +1 -1
- package/build/common/version/settings.d.ts +3 -3
- package/build/common/version/settings.js +5 -5
- package/build/common/version/settings.js.map +1 -1
- package/build/esm/constants/intents.d.ts +5 -5
- package/build/esm/constants/intents.js.map +1 -1
- package/build/esm/constants/mappings.d.ts +7 -7
- package/build/esm/constants/mappings.js +81 -81
- package/build/esm/constants/mappings.js.map +1 -1
- package/build/esm/diagram.d.ts +3 -3
- package/build/esm/index.d.ts +8 -8
- package/build/esm/index.js +8 -8
- package/build/esm/index.js.map +1 -1
- package/build/esm/{types.d.ts → models.d.ts} +0 -0
- package/build/esm/models.js +2 -0
- package/build/esm/models.js.map +1 -0
- package/build/esm/node/accountLinking.d.ts +3 -3
- package/build/esm/node/cancelPayment.d.ts +5 -5
- package/build/esm/node/capture.d.ts +4 -4
- package/build/esm/node/captureV2.d.ts +4 -4
- package/build/esm/node/display.d.ts +5 -5
- package/build/esm/node/event.d.ts +4 -4
- package/build/esm/node/index.d.ts +9 -9
- package/build/esm/node/interaction.d.ts +5 -5
- package/build/esm/node/payment.d.ts +5 -5
- package/build/esm/node/permission.d.ts +3 -3
- package/build/esm/node/prompt.d.ts +3 -3
- package/build/esm/node/reminder.d.ts +3 -3
- package/build/esm/node/speak.d.ts +5 -5
- package/build/esm/node/stream.d.ts +6 -6
- package/build/esm/node/userInfo.d.ts +5 -5
- package/build/esm/program.d.ts +3 -3
- package/build/esm/project/index.d.ts +9 -10
- package/build/esm/project/index.js +3 -3
- package/build/esm/project/index.js.map +1 -1
- package/build/esm/project/member.d.ts +5 -5
- package/build/esm/project/member.js +2 -2
- package/build/esm/project/member.js.map +1 -1
- package/build/esm/project/product.d.ts +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 -1
- package/build/esm/utils/node.d.ts +14 -0
- package/build/esm/utils/node.js +15 -0
- package/build/esm/utils/node.js.map +1 -0
- package/build/esm/utils/step.d.ts +14 -0
- package/build/esm/utils/step.js +16 -0
- package/build/esm/utils/step.js.map +1 -0
- package/build/esm/version/index.d.ts +14 -15
- package/build/esm/version/index.js +13 -12
- package/build/esm/version/index.js.map +1 -1
- package/build/esm/version/publishing.d.ts +2 -2
- package/build/esm/version/publishing.js +1 -1
- package/build/esm/version/publishing.js.map +1 -1
- package/build/esm/version/settings.d.ts +3 -3
- package/build/esm/version/settings.js +3 -3
- package/build/esm/version/settings.js.map +1 -1
- package/package.json +6 -6
- package/build/common/types.js.map +0 -1
- package/build/esm/types.js +0 -2
- package/build/esm/types.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode } from '@voiceflow/base-types';
|
|
2
2
|
export interface StepData {
|
|
3
3
|
loop: boolean;
|
|
4
4
|
audio: string;
|
|
@@ -8,16 +8,16 @@ export interface StepData {
|
|
|
8
8
|
description?: string;
|
|
9
9
|
backgroundImage?: string;
|
|
10
10
|
}
|
|
11
|
-
export interface Step extends
|
|
11
|
+
export interface Step extends BaseNode.Stream.Step<StepData> {
|
|
12
12
|
}
|
|
13
|
-
export interface Node extends Pick<
|
|
13
|
+
export interface Node extends Pick<BaseNode.Stream.Node, keyof BaseNode.Utils.BaseNode> {
|
|
14
14
|
loop: boolean;
|
|
15
15
|
play: string;
|
|
16
|
-
NEXT?:
|
|
16
|
+
NEXT?: BaseNode.Utils.NodeID;
|
|
17
17
|
title?: string;
|
|
18
|
-
nextId?:
|
|
18
|
+
nextId?: BaseNode.Utils.NodeID;
|
|
19
19
|
PAUSE_ID: string;
|
|
20
|
-
PREVIOUS?:
|
|
20
|
+
PREVIOUS?: BaseNode.Utils.NodeID;
|
|
21
21
|
icon_img?: string;
|
|
22
22
|
description?: string;
|
|
23
23
|
background_img?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseNode, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
import { NodeType, PermissionType } from './constants';
|
|
3
3
|
export interface UserInfo {
|
|
4
4
|
type: Nullable<PermissionType>;
|
|
@@ -19,15 +19,15 @@ export interface Permission {
|
|
|
19
19
|
value: string;
|
|
20
20
|
}>;
|
|
21
21
|
}
|
|
22
|
-
export interface Step extends
|
|
22
|
+
export interface Step extends BaseNode.Utils.BaseStep<StepData> {
|
|
23
23
|
type: NodeType.USER_INFO;
|
|
24
24
|
}
|
|
25
|
-
export interface BaseTypedNode extends
|
|
25
|
+
export interface BaseTypedNode extends BaseNode.Utils.BaseNode {
|
|
26
26
|
type: NodeType.USER_INFO;
|
|
27
27
|
}
|
|
28
|
-
export interface NextNode extends
|
|
28
|
+
export interface NextNode extends BaseTypedNode, BaseNode.Utils.NodeNextID {
|
|
29
29
|
}
|
|
30
|
-
export interface UseInfoNode extends
|
|
30
|
+
export interface UseInfoNode extends BaseTypedNode, BaseNode.Utils.NodeSuccessFailID {
|
|
31
31
|
permissions: Permission[];
|
|
32
32
|
}
|
|
33
33
|
export declare type Node = NextNode | UseInfoNode;
|
package/build/esm/program.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
1
|
+
import { BaseModels } from '@voiceflow/base-types';
|
|
2
|
+
import { AnyCommand, AnyNode } from './node';
|
|
3
|
+
export interface Program extends BaseModels.Program.Model<AnyNode, AnyCommand> {
|
|
4
4
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AlexaProduct } from './product';
|
|
1
|
+
import { VoiceProject } from '@voiceflow/voice-types';
|
|
2
|
+
import { MemberPlatformData } from './member';
|
|
3
|
+
import { Product } from './product';
|
|
5
4
|
export * from './member';
|
|
6
5
|
export * from './product';
|
|
7
|
-
export interface
|
|
8
|
-
products: Record<string,
|
|
6
|
+
export interface PlatformData {
|
|
7
|
+
products: Record<string, Product>;
|
|
9
8
|
}
|
|
10
|
-
export interface
|
|
11
|
-
|
|
9
|
+
export interface Project extends VoiceProject.Project<MemberPlatformData> {
|
|
10
|
+
type: 'voice';
|
|
12
11
|
platform: 'alexa';
|
|
13
|
-
platformData:
|
|
12
|
+
platformData: PlatformData;
|
|
14
13
|
}
|
|
15
|
-
export declare const
|
|
14
|
+
export declare const defaultPlatformData: ({ products, ...data }?: Partial<PlatformData>) => PlatformData;
|
|
@@ -9,11 +9,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
12
|
+
import { VoiceProject } from '@voiceflow/voice-types';
|
|
13
13
|
export * from './member';
|
|
14
14
|
export * from './product';
|
|
15
|
-
export const
|
|
15
|
+
export const defaultPlatformData = (_a = {}) => {
|
|
16
16
|
var { products = {} } = _a, data = __rest(_a, ["products"]);
|
|
17
|
-
return (Object.assign(Object.assign({},
|
|
17
|
+
return (Object.assign(Object.assign({}, VoiceProject.defaultPlatformData(data)), { products }));
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/project/index.ts"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/project/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAKtD,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAY1B,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAoD,EAAE,EAAgB,EAAE;QAAxE,EAAE,QAAQ,GAAG,EAAE,OAAuC,EAAlC,IAAI,cAAxB,YAA0B,CAAF;IAAiD,OAAA,iCACxG,YAAY,CAAC,mBAAmB,CAAC,IAAI,CAAC,KACzC,QAAQ,IACR,CAAA;CAAA,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Nullable } from '@voiceflow/base-types';
|
|
1
|
+
import { BaseProject, Nullable } from '@voiceflow/base-types';
|
|
2
2
|
export interface Vendor {
|
|
3
|
-
vendorID: string;
|
|
4
3
|
skillID: string;
|
|
4
|
+
vendorID: string;
|
|
5
5
|
products: Record<string, string>;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
8
|
-
selectedVendor: Nullable<string>;
|
|
7
|
+
export interface MemberPlatformData extends BaseProject.MemberPlatformData {
|
|
9
8
|
vendors: Vendor[];
|
|
9
|
+
selectedVendor: Nullable<string>;
|
|
10
10
|
}
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const defaultMemberPlatformData: ({ vendors, selectedVendor }?: Partial<MemberPlatformData>) => MemberPlatformData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const
|
|
2
|
-
selectedVendor,
|
|
1
|
+
export const defaultMemberPlatformData = ({ vendors = [], selectedVendor = null } = {}) => ({
|
|
3
2
|
vendors,
|
|
3
|
+
selectedVendor,
|
|
4
4
|
});
|
|
5
5
|
//# sourceMappingURL=member.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member.js","sourceRoot":"","sources":["../../../src/project/member.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"member.js","sourceRoot":"","sources":["../../../src/project/member.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EAAE,OAAO,GAAG,EAAE,EAAE,cAAc,GAAG,IAAI,KAAkC,EAAE,EAAsB,EAAE,CAAC,CAAC;IAC3I,OAAO;IACP,cAAc;CACf,CAAC,CAAC"}
|
package/build/esm/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAE/B,oCAAoC;AACpC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 isStream: (value: BaseNode.Utils.BaseNode) => value is Node.Stream.Node;
|
|
5
|
+
export declare const isCapture: (value: BaseNode.Utils.BaseNode) => value is Node.Capture.Node;
|
|
6
|
+
export declare const isDisplay: (value: BaseNode.Utils.BaseNode) => value is Node.Display.Node;
|
|
7
|
+
export declare const isPayment: (value: BaseNode.Utils.BaseNode) => value is Node.Payment.Node;
|
|
8
|
+
export declare const isReminder: (value: BaseNode.Utils.BaseNode) => value is Node.Reminder.Node;
|
|
9
|
+
export declare const isUserInfo: (value: BaseNode.Utils.BaseNode) => value is Node.UserInfo.Node;
|
|
10
|
+
export declare const isCaptureV2: (value: BaseNode.Utils.BaseNode) => value is Node.CaptureV2.Node;
|
|
11
|
+
export declare const isPermission: (value: BaseNode.Utils.BaseNode) => value is Node.Permission.Node;
|
|
12
|
+
export declare const isInteraction: (value: BaseNode.Utils.BaseNode) => value is Node.Interaction.Node;
|
|
13
|
+
export declare const isCancelPayment: (value: BaseNode.Utils.BaseNode) => value is Node.CancelPayment.Node;
|
|
14
|
+
export declare const isAccountLinking: (value: BaseNode.Utils.BaseNode) => value is Node.AccountLinking.Node;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseNode, BaseUtils } from '@voiceflow/base-types';
|
|
2
|
+
import * as Node from "../node";
|
|
3
|
+
export const isSpeak = BaseUtils.node.createNodeTypeguard(BaseNode.NodeType.SPEAK);
|
|
4
|
+
export const isStream = BaseUtils.node.createNodeTypeguard(BaseNode.NodeType.STREAM);
|
|
5
|
+
export const isCapture = BaseUtils.node.createNodeTypeguard(BaseNode.NodeType.CAPTURE);
|
|
6
|
+
export const isDisplay = BaseUtils.node.createNodeTypeguard(Node.NodeType.DISPLAY);
|
|
7
|
+
export const isPayment = BaseUtils.node.createNodeTypeguard(Node.NodeType.PAYMENT);
|
|
8
|
+
export const isReminder = BaseUtils.node.createNodeTypeguard(Node.NodeType.REMINDER);
|
|
9
|
+
export const isUserInfo = BaseUtils.node.createNodeTypeguard(Node.NodeType.USER_INFO);
|
|
10
|
+
export const isCaptureV2 = BaseUtils.node.createNodeTypeguard(BaseNode.NodeType.CAPTURE_V2);
|
|
11
|
+
export const isPermission = BaseUtils.node.createNodeTypeguard(Node.NodeType.PERMISSION);
|
|
12
|
+
export const isInteraction = BaseUtils.node.createNodeTypeguard(BaseNode.NodeType.INTERACTION);
|
|
13
|
+
export const isCancelPayment = BaseUtils.node.createNodeTypeguard(Node.NodeType.CANCEL_PAYMENT);
|
|
14
|
+
export const isAccountLinking = BaseUtils.node.createNodeTypeguard(Node.NodeType.ACCOUNT_LINKING);
|
|
15
|
+
//# 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;AAE5D,OAAO,KAAK,IAAI,gBAAe;AAE/B,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAkB,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpG,MAAM,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S,CAAC,IAAI,CAAC,mBAAmB,CAA2B,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
3
|
+
export declare const isPrompt: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Prompt.Step;
|
|
4
|
+
export declare const isStream: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Stream.Step;
|
|
5
|
+
export declare const isCapture: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Capture.Step;
|
|
6
|
+
export declare const isDisplay: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Display.Step;
|
|
7
|
+
export declare const isPayment: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Payment.Step;
|
|
8
|
+
export declare const isReminder: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Reminder.Step;
|
|
9
|
+
export declare const isUserInfo: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.UserInfo.Step;
|
|
10
|
+
export declare const isCaptureV2: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.CaptureV2.Step;
|
|
11
|
+
export declare const isPermission: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Permission.Step;
|
|
12
|
+
export declare const isInteraction: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.Interaction.Step;
|
|
13
|
+
export declare const isCancelPayment: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.CancelPayment.Step;
|
|
14
|
+
export declare const isAccountLinking: (value: import("../../../base-types/build/common/models").BaseDiagramNode<import("@voiceflow/base-types").AnyRecord>) => value is Node.AccountLinking.Step;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseNode, BaseUtils } from '@voiceflow/base-types';
|
|
2
|
+
import * as Node from "../node";
|
|
3
|
+
export const isSpeak = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.SPEAK);
|
|
4
|
+
export const isPrompt = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.PROMPT);
|
|
5
|
+
export const isStream = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.STREAM);
|
|
6
|
+
export const isCapture = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.CAPTURE);
|
|
7
|
+
export const isDisplay = BaseUtils.step.createStepTypeguard(Node.NodeType.DISPLAY);
|
|
8
|
+
export const isPayment = BaseUtils.step.createStepTypeguard(Node.NodeType.PAYMENT);
|
|
9
|
+
export const isReminder = BaseUtils.step.createStepTypeguard(Node.NodeType.REMINDER);
|
|
10
|
+
export const isUserInfo = BaseUtils.step.createStepTypeguard(Node.NodeType.USER_INFO);
|
|
11
|
+
export const isCaptureV2 = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.CAPTURE_V2);
|
|
12
|
+
export const isPermission = BaseUtils.step.createStepTypeguard(Node.NodeType.PERMISSION);
|
|
13
|
+
export const isInteraction = BaseUtils.step.createStepTypeguard(BaseNode.NodeType.INTERACTION);
|
|
14
|
+
export const isCancelPayment = BaseUtils.step.createStepTypeguard(Node.NodeType.CANCEL_PAYMENT);
|
|
15
|
+
export const isAccountLinking = BaseUtils.step.createStepTypeguard(Node.NodeType.ACCOUNT_LINKING);
|
|
16
|
+
//# sourceMappingURL=step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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,CAAC,CAAC;AACjH,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAuB,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC/G,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAwB,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACtH,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAA0B,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AACzH,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAA2B,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { BaseModels, DeepPartialByKey } from '@voiceflow/base-types';
|
|
2
|
+
import { VoiceVersion } from '@voiceflow/voice-types';
|
|
3
|
+
import { VoiceflowConstants } from '@voiceflow/voiceflow-types';
|
|
4
4
|
import { Voice } from "../constants";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { AnyCommand } from "../node";
|
|
6
|
+
import { Publishing } from './publishing';
|
|
7
|
+
import { Settings } from './settings';
|
|
8
8
|
export * from './publishing';
|
|
9
9
|
export * from './settings';
|
|
10
|
-
export declare enum
|
|
10
|
+
export declare enum Stage {
|
|
11
11
|
DEV = "DEV",
|
|
12
12
|
LIVE = "LIVE",
|
|
13
13
|
REVIEW = "REVIEW"
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface PlatformData extends VoiceVersion.PlatformData<Voice> {
|
|
16
16
|
status: {
|
|
17
|
-
stage:
|
|
17
|
+
stage: Stage;
|
|
18
18
|
};
|
|
19
|
-
settings:
|
|
20
|
-
publishing:
|
|
19
|
+
settings: Settings;
|
|
20
|
+
publishing: Publishing;
|
|
21
21
|
}
|
|
22
|
-
export interface
|
|
23
|
-
|
|
24
|
-
platformData: AlexaVersionData;
|
|
22
|
+
export interface Version extends VoiceVersion.Version<Voice, BaseModels.Version.Prototype<AnyCommand, VoiceflowConstants.Locale>> {
|
|
23
|
+
platformData: PlatformData;
|
|
25
24
|
}
|
|
26
|
-
export declare const
|
|
25
|
+
export declare const defaultPlatformData: ({ status: { stage }, settings, publishing, ...generalVersionData }: DeepPartialByKey<PlatformData, 'publishing' | 'settings'>) => PlatformData;
|
|
@@ -9,20 +9,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
12
|
+
import { VoiceVersion } from '@voiceflow/voice-types';
|
|
13
13
|
import { Voice } from "../constants";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { defaultPublishing } from './publishing';
|
|
15
|
+
import { defaultSettings } from './settings';
|
|
16
16
|
export * from './publishing';
|
|
17
17
|
export * from './settings';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
// shared only across voiceflow types
|
|
19
|
+
export var Stage;
|
|
20
|
+
(function (Stage) {
|
|
21
|
+
Stage["DEV"] = "DEV";
|
|
22
|
+
Stage["LIVE"] = "LIVE";
|
|
23
|
+
Stage["REVIEW"] = "REVIEW";
|
|
24
|
+
})(Stage || (Stage = {}));
|
|
25
|
+
export const defaultPlatformData = (_a) => {
|
|
26
|
+
var { status: { stage = Stage.DEV } = { stage: Stage.DEV }, settings, publishing } = _a, generalVersionData = __rest(_a, ["status", "settings", "publishing"]);
|
|
27
|
+
return (Object.assign(Object.assign({}, VoiceVersion.defaultPlatformData(generalVersionData, { defaultPromptVoice: Voice.ALEXA })), { status: { stage }, settings: defaultSettings(settings), publishing: defaultPublishing(publishing) }));
|
|
27
28
|
};
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/version/index.ts"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/version/index.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,qBAAoB;AAGpC,OAAO,EAAE,iBAAiB,EAAc,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAY,MAAM,YAAY,CAAC;AAEvD,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAE3B,qCAAqC;AAErC,MAAM,CAAN,IAAY,KAIX;AAJD,WAAY,KAAK;IACf,oBAAW,CAAA;IACX,sBAAa,CAAA;IACb,0BAAiB,CAAA;AACnB,CAAC,EAJW,KAAK,KAAL,KAAK,QAIhB;AAYD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAKwB,EAAgB,EAAE;QAL1C,EAClC,MAAM,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,EACpD,QAAQ,EACR,UAAU,OAEgD,EADvD,kBAAkB,cAJa,oCAKnC,CADsB;IACwD,OAAA,iCAC1E,YAAY,CAAC,mBAAmB,CAAQ,kBAAkB,EAAE,EAAE,kBAAkB,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,KACnG,MAAM,EAAE,EAAE,KAAK,EAAE,EACjB,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAAC,EACnC,UAAU,EAAE,iBAAiB,CAAC,UAAU,CAAC,IACzC,CAAA;CAAA,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../constants";
|
|
2
|
-
export interface
|
|
2
|
+
export interface Publishing {
|
|
3
3
|
forExport: boolean;
|
|
4
4
|
hasAds: boolean;
|
|
5
5
|
summary: string;
|
|
@@ -19,4 +19,4 @@ export interface AlexaVersionPublishing {
|
|
|
19
19
|
termsAndConditions: string;
|
|
20
20
|
updatesDescription?: string;
|
|
21
21
|
}
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const defaultPublishing: ({ invocationName, hasPurchase, forExport, hasAds, forChildren, personal, smallIcon, largeIcon, invocations, summary, description, instructions, privacyPolicy, termsAndConditions, keywords, category, locales, updatesDescription, }?: Partial<Publishing>) => Publishing;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../constants";
|
|
2
|
-
export const
|
|
2
|
+
export const defaultPublishing = ({ invocationName = '', hasPurchase = false, forExport = true, hasAds = false, forChildren = false, personal = false, smallIcon = '', largeIcon = '', invocations = [], summary = '', description = '', instructions = '', privacyPolicy = '', termsAndConditions = '', keywords = '', category = '', locales = [Locale.EN_US], updatesDescription, } = {}) => ({
|
|
3
3
|
summary,
|
|
4
4
|
invocations,
|
|
5
5
|
smallIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publishing.js","sourceRoot":"","sources":["../../../src/version/publishing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,qBAAoB;AAuBrC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"publishing.js","sourceRoot":"","sources":["../../../src/version/publishing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,qBAAoB;AAuBrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,cAAc,GAAG,EAAE,EACnB,WAAW,GAAG,KAAK,EACnB,SAAS,GAAG,IAAI,EAChB,MAAM,GAAG,KAAK,EACd,WAAW,GAAG,KAAK,EACnB,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,EAAE,EACd,SAAS,GAAG,EAAE,EACd,WAAW,GAAG,EAAE,EAChB,OAAO,GAAG,EAAE,EACZ,WAAW,GAAG,EAAE,EAChB,YAAY,GAAG,EAAE,EACjB,aAAa,GAAG,EAAE,EAClB,kBAAkB,GAAG,EAAE,EACvB,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,EAAE,EACb,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EACxB,kBAAkB,MACK,EAAE,EAAc,EAAE,CAAC,CAAC;IAC3C,OAAO;IACP,WAAW;IACX,SAAS;IACT,SAAS;IACT,MAAM;IACN,QAAQ;IACR,SAAS;IACT,cAAc;IACd,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,aAAa;IACb,kBAAkB;IAClB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,kBAAkB;CACnB,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Nullable } from '@voiceflow/base-types';
|
|
2
|
-
import {
|
|
2
|
+
import { VoiceVersion } from '@voiceflow/voice-types';
|
|
3
3
|
import { v1 } from 'ask-smapi-model';
|
|
4
4
|
import { Voice } from "../constants";
|
|
5
5
|
export declare enum AccountLinkingType {
|
|
@@ -26,7 +26,7 @@ export interface AccountLinking {
|
|
|
26
26
|
accessTokenScheme: v1.skill.accountLinking.AccessTokenSchemeType;
|
|
27
27
|
defaultTokenExpirationInSeconds: number;
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface Settings extends VoiceVersion.Settings<Voice> {
|
|
30
30
|
events: Nullable<string>;
|
|
31
31
|
permissions: string[];
|
|
32
32
|
accountLinking: Nullable<AccountLinking>;
|
|
@@ -34,4 +34,4 @@ export interface AlexaVersionSettings extends Version.VoiceVersionSettings<Voice
|
|
|
34
34
|
modelSensitivity: Nullable<ModelSensitivity>;
|
|
35
35
|
}
|
|
36
36
|
export declare const defaultAccountLinking: (accountLinking?: Nullable<Partial<AccountLinking>> | undefined) => Nullable<AccountLinking>;
|
|
37
|
-
export declare const
|
|
37
|
+
export declare const defaultSettings: ({ events, permissions, accountLinking, customInterface, modelSensitivity, ...voiceSettings }?: Partial<Settings>) => Settings;
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
12
|
+
import { VoiceVersion } from '@voiceflow/voice-types';
|
|
13
13
|
import { Voice } from "../constants";
|
|
14
14
|
export var AccountLinkingType;
|
|
15
15
|
(function (AccountLinkingType) {
|
|
@@ -44,9 +44,9 @@ export const defaultAccountLinking = (accountLinking) => {
|
|
|
44
44
|
defaultTokenExpirationInSeconds,
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
export const
|
|
47
|
+
export const defaultSettings = (_a = {}) => {
|
|
48
48
|
var { events = null, permissions = [], accountLinking, customInterface = false, modelSensitivity = null } = _a, voiceSettings = __rest(_a, ["events", "permissions", "accountLinking", "customInterface", "modelSensitivity"]);
|
|
49
|
-
return (Object.assign(Object.assign({},
|
|
49
|
+
return (Object.assign(Object.assign({}, VoiceVersion.defaultSettings(voiceSettings, { defaultPromptVoice: Voice.ALEXA })), { events,
|
|
50
50
|
permissions, accountLinking: defaultAccountLinking(accountLinking), customInterface,
|
|
51
51
|
modelSensitivity }));
|
|
52
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/version/settings.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/version/settings.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,qBAAoB;AAEpC,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,2CAAqB,CAAA;IACrB,6CAAuB,CAAA;AAC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CAAC,KAC1F,MAAM;QACN,WAAW,EACX,cAAc,EAAE,qBAAqB,CAAC,cAAc,CAAC,EACrD,eAAe;QACf,gBAAgB,IAChB,CAAA;CAAA,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/alexa-types",
|
|
3
3
|
"description": "Alexa service types",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
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.
|
|
11
|
-
"@voiceflow/common": "^7.
|
|
12
|
-
"@voiceflow/
|
|
13
|
-
"@voiceflow/
|
|
10
|
+
"@voiceflow/base-types": "^2.9.0",
|
|
11
|
+
"@voiceflow/common": "^7.18.0",
|
|
12
|
+
"@voiceflow/voice-types": "^2.2.0",
|
|
13
|
+
"@voiceflow/voiceflow-types": "^3.3.0",
|
|
14
14
|
"ask-smapi-model": "1.14.0"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"test:integration": "exit 0",
|
|
44
44
|
"test:unit": "exit 0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "fbfebf6335f414509ef8493602aeba59d099ebe3"
|
|
47
47
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
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":""}
|