@voiceflow/base-types 1.12.0 → 2.0.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.
Files changed (56) hide show
  1. package/build/button/index.d.ts +1 -1
  2. package/build/index.d.ts +2 -0
  3. package/build/index.js +6 -1
  4. package/build/index.js.map +1 -1
  5. package/build/models/apiKey.d.ts +11 -0
  6. package/build/models/apiKey.js +3 -0
  7. package/build/models/apiKey.js.map +1 -0
  8. package/build/models/diagram.d.ts +21 -0
  9. package/build/models/diagram.js +10 -0
  10. package/build/models/diagram.js.map +1 -0
  11. package/build/models/index.d.ts +7 -0
  12. package/build/models/index.js +20 -0
  13. package/build/models/index.js.map +1 -0
  14. package/build/models/member.d.ts +5 -0
  15. package/build/models/member.js +3 -0
  16. package/build/models/member.js.map +1 -0
  17. package/build/models/program.d.ts +10 -0
  18. package/build/models/program.js +3 -0
  19. package/build/models/program.js.map +1 -0
  20. package/build/models/project.d.ts +48 -0
  21. package/build/models/project.js +18 -0
  22. package/build/models/project.js.map +1 -0
  23. package/build/models/shared.d.ts +110 -0
  24. package/build/models/shared.js +3 -0
  25. package/build/models/shared.js.map +1 -0
  26. package/build/models/version.d.ts +78 -0
  27. package/build/models/version.js +9 -0
  28. package/build/models/version.js.map +1 -0
  29. package/build/node/_v1.d.ts +1 -1
  30. package/build/node/api.d.ts +1 -1
  31. package/build/node/buttons.d.ts +1 -1
  32. package/build/node/capture.d.ts +1 -1
  33. package/build/node/exit.d.ts +1 -1
  34. package/build/node/flow.d.ts +1 -1
  35. package/build/node/general.d.ts +1 -1
  36. package/build/node/googleSheets.d.ts +1 -1
  37. package/build/node/jump.d.ts +1 -1
  38. package/build/node/push.d.ts +1 -1
  39. package/build/node/set.d.ts +1 -1
  40. package/build/node/setV2.d.ts +1 -1
  41. package/build/node/speak.d.ts +1 -1
  42. package/build/node/utils/base.d.ts +2 -2
  43. package/build/node/utils/command.d.ts +1 -1
  44. package/build/node/utils/expression.d.ts +1 -1
  45. package/build/node/utils/integration.d.ts +1 -1
  46. package/build/node/utils/mappings.d.ts +1 -1
  47. package/build/node/utils/noMatch.d.ts +1 -1
  48. package/build/node/utils/reprompt.d.ts +1 -1
  49. package/build/node/visual.d.ts +1 -1
  50. package/build/project/index.d.ts +1 -1
  51. package/build/utils.d.ts +3 -0
  52. package/build/utils.js +3 -0
  53. package/build/utils.js.map +1 -0
  54. package/build/version/index.d.ts +1 -1
  55. package/build/version/settings.d.ts +1 -1
  56. package/package.json +2 -3
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  export declare enum ButtonType {
3
3
  INTENT = "INTENT"
4
4
  }
package/build/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export * as Button from './button';
2
+ export * as Models from './models';
2
3
  export * as Node from './node';
3
4
  export * as Project from './project';
4
5
  export * as Request from './request';
5
6
  export * as Text from './text';
6
7
  export * as Trace from './trace';
8
+ export * from './utils';
7
9
  export * as Version from './version';
package/build/index.js CHANGED
@@ -18,13 +18,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
21
24
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.Version = exports.Trace = exports.Text = exports.Request = exports.Project = exports.Node = exports.Button = void 0;
25
+ exports.Version = exports.Trace = exports.Text = exports.Request = exports.Project = exports.Node = exports.Models = exports.Button = void 0;
23
26
  exports.Button = __importStar(require("./button"));
27
+ exports.Models = __importStar(require("./models"));
24
28
  exports.Node = __importStar(require("./node"));
25
29
  exports.Project = __importStar(require("./project"));
26
30
  exports.Request = __importStar(require("./request"));
27
31
  exports.Text = __importStar(require("./text"));
28
32
  exports.Trace = __importStar(require("./trace"));
33
+ __exportStar(require("./utils"), exports);
29
34
  exports.Version = __importStar(require("./version"));
30
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAmC;AACnC,+CAA+B;AAC/B,qDAAqC;AACrC,qDAAqC;AACrC,+CAA+B;AAC/B,iDAAiC;AACjC,qDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAmC;AACnC,mDAAmC;AACnC,+CAA+B;AAC/B,qDAAqC;AACrC,qDAAqC;AACrC,+CAA+B;AAC/B,iDAAiC;AACjC,0CAAwB;AACxB,qDAAqC"}
@@ -0,0 +1,11 @@
1
+ import { APIKeyID, CreatorID, ProjectID, WorkspaceID } from './shared';
2
+ export declare type APIKey = {
3
+ _id: APIKeyID;
4
+ workspaceID: WorkspaceID;
5
+ creatorID: CreatorID;
6
+ projectID?: ProjectID;
7
+ name: string;
8
+ permissions: string[];
9
+ scopes: string[];
10
+ data?: Record<string, any>;
11
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=apiKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiKey.js","sourceRoot":"","sources":["../../src/models/apiKey.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { BaseDiagramNode, CreatorID, DiagramID, Name, NodeID, Timestamp, Variable, VersionID } from './shared';
2
+ export declare enum DiagramType {
3
+ TOPIC = "TOPIC",
4
+ GROUP = "GROUP",
5
+ COMPONENT = "COMPONENT"
6
+ }
7
+ export interface Diagram<N extends BaseDiagramNode = BaseDiagramNode> {
8
+ _id: DiagramID;
9
+ name: Name;
10
+ type?: DiagramType;
11
+ versionID: VersionID;
12
+ creatorID: CreatorID;
13
+ variables: Variable[];
14
+ offsetX: number;
15
+ offsetY: number;
16
+ zoom: number;
17
+ intentStepIDs?: string[];
18
+ children: DiagramID[];
19
+ modified: Timestamp;
20
+ nodes: Record<NodeID, N>;
21
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DiagramType = void 0;
4
+ var DiagramType;
5
+ (function (DiagramType) {
6
+ DiagramType["TOPIC"] = "TOPIC";
7
+ DiagramType["GROUP"] = "GROUP";
8
+ DiagramType["COMPONENT"] = "COMPONENT";
9
+ })(DiagramType = exports.DiagramType || (exports.DiagramType = {}));
10
+ //# sourceMappingURL=diagram.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagram.js","sourceRoot":"","sources":["../../src/models/diagram.ts"],"names":[],"mappings":";;;AAEA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,sCAAuB,CAAA;AACzB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB"}
@@ -0,0 +1,7 @@
1
+ export * from './apiKey';
2
+ export * from './diagram';
3
+ export * from './member';
4
+ export * from './program';
5
+ export * from './project';
6
+ export * from './shared';
7
+ export * from './version';
@@ -0,0 +1,20 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./apiKey"), exports);
14
+ __exportStar(require("./diagram"), exports);
15
+ __exportStar(require("./member"), exports);
16
+ __exportStar(require("./program"), exports);
17
+ __exportStar(require("./project"), exports);
18
+ __exportStar(require("./shared"), exports);
19
+ __exportStar(require("./version"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B"}
@@ -0,0 +1,5 @@
1
+ import { CreatorID } from './shared';
2
+ export interface Member<P extends Record<string, any> = Record<string, any>> {
3
+ creatorID: CreatorID;
4
+ platformData: P;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=member.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member.js","sourceRoot":"","sources":["../../src/models/member.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { BaseCommand, BaseNode, NodeID, ProgramID, Variable, VersionID } from './shared';
2
+ export interface Program<N extends BaseNode = BaseNode, C extends BaseCommand = BaseCommand> {
3
+ id: ProgramID;
4
+ startId: NodeID;
5
+ skill_id: VersionID;
6
+ name?: string;
7
+ variables: Variable[];
8
+ lines: Record<NodeID, N>;
9
+ commands: C[];
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=program.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"program.js","sourceRoot":"","sources":["../../src/models/program.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ import { Member } from './member';
2
+ import { BasePlatformData, CreatorID, Name, Platform, ProjectID, PrototypeModel, TagID, TeamID, VersionID } from './shared';
3
+ export declare enum ProjectPrototypeNLPType {
4
+ LUIS = "LUIS"
5
+ }
6
+ export declare enum ProjectLinkType {
7
+ CURVED = "CURVED",
8
+ STRAIGHT = "STRAIGHT"
9
+ }
10
+ export interface ProjectPrototypeNLPBase {
11
+ type: string;
12
+ }
13
+ export interface ProjectPrototypeLuis extends ProjectPrototypeNLPBase {
14
+ appID: string;
15
+ resourceID?: string;
16
+ type: ProjectPrototypeNLPType.LUIS;
17
+ }
18
+ export declare type ProjectPrototypeNLP = ProjectPrototypeLuis;
19
+ export interface ProjectPrototype {
20
+ data: Record<string, any>;
21
+ trainedModel?: PrototypeModel;
22
+ lastTrainedTime?: number;
23
+ nlp?: ProjectPrototypeNLP;
24
+ }
25
+ export declare enum ProjectPrivacy {
26
+ PUBLIC = "public",
27
+ PRIVATE = "private"
28
+ }
29
+ export declare type ReportTag = {
30
+ tagID: TagID;
31
+ label: string;
32
+ };
33
+ export interface Project<P extends BasePlatformData, M extends BasePlatformData> {
34
+ _id: ProjectID;
35
+ teamID: TeamID;
36
+ creatorID: CreatorID;
37
+ name: Name;
38
+ image?: string;
39
+ privacy?: ProjectPrivacy.PRIVATE | ProjectPrivacy.PUBLIC;
40
+ platform: Platform;
41
+ linkType?: ProjectLinkType;
42
+ prototype?: ProjectPrototype;
43
+ devVersion?: VersionID;
44
+ liveVersion?: VersionID;
45
+ reportTags?: Record<TagID, ReportTag>;
46
+ members: Member<M>[];
47
+ platformData: P;
48
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectPrivacy = exports.ProjectLinkType = exports.ProjectPrototypeNLPType = void 0;
4
+ var ProjectPrototypeNLPType;
5
+ (function (ProjectPrototypeNLPType) {
6
+ ProjectPrototypeNLPType["LUIS"] = "LUIS";
7
+ })(ProjectPrototypeNLPType = exports.ProjectPrototypeNLPType || (exports.ProjectPrototypeNLPType = {}));
8
+ var ProjectLinkType;
9
+ (function (ProjectLinkType) {
10
+ ProjectLinkType["CURVED"] = "CURVED";
11
+ ProjectLinkType["STRAIGHT"] = "STRAIGHT";
12
+ })(ProjectLinkType = exports.ProjectLinkType || (exports.ProjectLinkType = {}));
13
+ var ProjectPrivacy;
14
+ (function (ProjectPrivacy) {
15
+ ProjectPrivacy["PUBLIC"] = "public";
16
+ ProjectPrivacy["PRIVATE"] = "private";
17
+ })(ProjectPrivacy = exports.ProjectPrivacy || (exports.ProjectPrivacy = {}));
18
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/models/project.ts"],"names":[],"mappings":";;;AAGA,IAAY,uBAEX;AAFD,WAAY,uBAAuB;IACjC,wCAAa,CAAA;AACf,CAAC,EAFW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAElC;AAED,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AAqBD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;AACrB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB"}
@@ -0,0 +1,110 @@
1
+ import { AnyRecord, Nullable } from '../utils';
2
+ export declare type Platform = string;
3
+ export declare type Name = string;
4
+ export declare type APIKeyID = string;
5
+ export declare type TeamID = string;
6
+ export declare type WorkspaceID = TeamID;
7
+ export declare type BlockID = string;
8
+ export declare type Variable = string;
9
+ export declare type TagID = string;
10
+ export declare type Timestamp = number;
11
+ export declare type ProjectID = string;
12
+ export declare type CreatorID = number;
13
+ export declare type VersionID = string;
14
+ export declare type ProgramID = string;
15
+ export declare type DiagramID = string;
16
+ export interface IntentInput {
17
+ text: string;
18
+ slots?: string[];
19
+ /** @deprecated shouldn't be used */
20
+ voice?: string;
21
+ }
22
+ export declare type IntentSlotDialog = {
23
+ prompt: any[];
24
+ confirm: any[];
25
+ utterances: IntentInput[];
26
+ confirmEnabled: boolean;
27
+ };
28
+ export declare type IntentSlot = {
29
+ id: string;
30
+ dialog: IntentSlotDialog;
31
+ required: boolean;
32
+ };
33
+ export declare type Intent = {
34
+ key: string;
35
+ name: string;
36
+ slots?: IntentSlot[];
37
+ inputs: IntentInput[];
38
+ builtIn?: boolean;
39
+ _platform?: string;
40
+ };
41
+ export declare type Slot = {
42
+ key: string;
43
+ name: string;
44
+ type: {
45
+ value?: string;
46
+ };
47
+ color?: string;
48
+ inputs: string[];
49
+ };
50
+ export declare type SlotMapping = {
51
+ slot: Nullable<string>;
52
+ variable: Nullable<Variable>;
53
+ };
54
+ export declare type CommandMapping = {
55
+ slot: string;
56
+ variable: Variable;
57
+ };
58
+ /**
59
+ * @deprecated
60
+ */
61
+ export declare type Command<T extends string = string, D extends AnyRecord = AnyRecord> = {
62
+ type: T;
63
+ } & D;
64
+ export interface BaseCommand {
65
+ type: string;
66
+ }
67
+ export declare type NodeID = string;
68
+ export declare type NodeType = string;
69
+ /**
70
+ * @deprecated
71
+ */
72
+ export declare type Node<T extends string = string, D extends AnyRecord = AnyRecord> = {
73
+ id: string;
74
+ type: T;
75
+ } & D;
76
+ export interface BaseNode {
77
+ id: string;
78
+ type: string;
79
+ }
80
+ export declare type CoordPoint = number;
81
+ export interface BaseDiagramNode<D extends AnyRecord = AnyRecord> {
82
+ nodeID: NodeID;
83
+ type: NodeType;
84
+ coords?: [number, number];
85
+ data: D;
86
+ }
87
+ export interface BlockOnlyData {
88
+ name: string;
89
+ color: string;
90
+ steps: string[];
91
+ }
92
+ export interface BaseBlock<D extends AnyRecord = AnyRecord> extends BaseDiagramNode<D & BlockOnlyData> {
93
+ coords: [number, number];
94
+ }
95
+ export interface BasePort<PD extends AnyRecord = AnyRecord> {
96
+ type: string;
97
+ target: Nullable<string>;
98
+ data?: PD;
99
+ id: string;
100
+ }
101
+ interface StepOnlyData<P = [BasePort, ...BasePort[]]> {
102
+ ports: P;
103
+ }
104
+ export declare type BaseStep<D extends AnyRecord = AnyRecord, P = [BasePort, ...BasePort[]]> = BaseDiagramNode<D & StepOnlyData<P>>;
105
+ export declare type BasePlatformData = AnyRecord;
106
+ export declare type PrototypeModel = {
107
+ slots: Slot[];
108
+ intents: Intent[];
109
+ };
110
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/models/shared.ts"],"names":[],"mappings":""}
@@ -0,0 +1,78 @@
1
+ import { AnyRecord, Nullable } from '../utils';
2
+ import { BaseCommand, CreatorID, DiagramID, Intent, Name, Platform, ProjectID, PrototypeModel, Slot, Variable, VersionID } from './shared';
3
+ export declare type VersionPlatformDataSettings = Record<string, any>;
4
+ export declare type VersionPlatformDataPublishing = Record<string, any>;
5
+ export interface StrictVersionPlatformData<S extends AnyRecord = AnyRecord, P extends AnyRecord = AnyRecord> {
6
+ slots: Slot[];
7
+ intents: Intent[];
8
+ settings: S;
9
+ publishing: P;
10
+ }
11
+ export interface VersionPlatformData<S extends AnyRecord = AnyRecord, P extends AnyRecord = AnyRecord> extends StrictVersionPlatformData<S, P>, AnyRecord {
12
+ }
13
+ export interface VersionPrototypeStackFrame<C extends BaseCommand = BaseCommand> {
14
+ nodeID?: Nullable<string>;
15
+ programID: string;
16
+ storage?: Record<string, any>;
17
+ variables?: Record<string, any>;
18
+ commands?: C[];
19
+ }
20
+ export interface VersionPrototypeContext<C extends BaseCommand = BaseCommand> {
21
+ turn?: Record<string, any>;
22
+ storage?: Record<string, any>;
23
+ variables?: Record<string, any>;
24
+ stack?: VersionPrototypeStackFrame<C>[];
25
+ }
26
+ export interface VersionPrototypeData<L extends string> {
27
+ name: string;
28
+ locales: L[];
29
+ }
30
+ export declare type VersionPrototypeSettings = {
31
+ layout?: string;
32
+ brandColor?: string;
33
+ brandImage?: string;
34
+ avatar?: string;
35
+ password?: string;
36
+ hasPassword?: boolean;
37
+ buttons?: string;
38
+ };
39
+ export interface VersionPrototype<C extends BaseCommand = BaseCommand, L extends string = string> {
40
+ model: PrototypeModel;
41
+ platform: Platform;
42
+ settings: VersionPrototypeSettings;
43
+ data: VersionPrototypeData<L>;
44
+ context: VersionPrototypeContext<C>;
45
+ }
46
+ export declare enum VersionFolderItemType {
47
+ FOLDER = "FOLDER",
48
+ DIAGRAM = "DIAGRAM"
49
+ }
50
+ export interface VersionFolderItem {
51
+ type: VersionFolderItemType;
52
+ sourceID: string;
53
+ }
54
+ export interface VersionFolder {
55
+ id: string;
56
+ name: string;
57
+ items: VersionFolderItem[];
58
+ }
59
+ export interface Version<P extends VersionPlatformData, C extends BaseCommand = BaseCommand, L extends string = string> {
60
+ _id: VersionID;
61
+ creatorID: CreatorID;
62
+ projectID: ProjectID;
63
+ name: Name;
64
+ topics?: VersionFolderItem[];
65
+ folders?: Record<string, VersionFolder>;
66
+ variables: Variable[];
67
+ components?: VersionFolderItem[];
68
+ rootDiagramID: DiagramID;
69
+ prototype?: VersionPrototype<C, L>;
70
+ platformData: P;
71
+ }
72
+ export interface VersionDiagramResponce {
73
+ id: string;
74
+ type: string;
75
+ flow: string;
76
+ step: string;
77
+ content: string;
78
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VersionFolderItemType = void 0;
4
+ var VersionFolderItemType;
5
+ (function (VersionFolderItemType) {
6
+ VersionFolderItemType["FOLDER"] = "FOLDER";
7
+ VersionFolderItemType["DIAGRAM"] = "DIAGRAM";
8
+ })(VersionFolderItemType = exports.VersionFolderItemType || (exports.VersionFolderItemType = {}));
9
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/models/version.ts"],"names":[],"mappings":";;;AAwDA,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,4CAAmB,CAAA;AACrB,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC"}
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { BaseEvent, BaseNode, BasePort, BaseStep, NodeID } from './utils';
3
3
  export declare const _V1_STOP_TYPES = "stopTypes";
4
4
  export interface StepData<Payload = unknown> {
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseStep, IntegrationType, NodeSuccessFailID } from './utils';
4
4
  export interface APIKeyVal {
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { StepButtonsLayout } from '../button';
3
3
  import { NodeType } from './constants';
4
4
  import { BaseStep, BaseStepNoMatch, DataID } from './utils';
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseNode, BaseStep, NodeNextID } from './utils';
4
4
  export interface StepData {
@@ -1,4 +1,4 @@
1
- import { UnknownRecord } from '@voiceflow/api-sdk';
1
+ import { UnknownRecord } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseNode, BaseStep, BaseTraceFrame, TraceType } from './utils';
4
4
  export declare type StepData = UnknownRecord;
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseNode, BaseStep, BaseTraceFrame, NodeNextID, NodeVariablesMappings, TraceType } from './utils';
4
4
  export declare type VariableMapping = [Nullable<string>, Nullable<string>][];
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseNode, BaseStep, BaseTraceFrame, NodeNextID } from './utils';
4
4
  export declare type AnyTrace = BaseTraceFrame<any>;
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseStep, IntegrationType, IntegrationUser, NodeSuccessFailID } from './utils';
4
4
  export declare enum GoogleSheetsActionType {
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseCommand, BaseStep, NodeID, SlotMappings } from './utils';
4
4
  export declare enum IntentAvailability {
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseCommand, BasePort, BaseStep, NodeID, SlotMappings } from './utils';
4
4
  export interface StepData extends SlotMappings {
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseNode, BaseStep, Expression, NodeNextID } from './utils';
4
4
  export interface Set {
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseNode, BaseStep, ExpressionTypeV2, NodeNextID } from './utils';
4
4
  export interface Set {
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseNode, BaseStep, BaseTraceFrame, NodeNextID, StepCanvasNodeVisibility, TraceType } from './utils';
4
4
  export interface StepDataDialog<Dialog> {
@@ -1,5 +1,5 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
2
- export { BaseCommand, BaseNode, BasePort, BaseStep } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../../utils";
2
+ export { BaseCommand, BaseNode, BasePort, BaseStep } from "../../models";
3
3
  export declare type NodeID = Nullable<string>;
4
4
  export interface DataID {
5
5
  id: string;
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../../utils";
2
2
  import { BaseCommand } from './base';
3
3
  import { BaseEvent } from './event';
4
4
  export declare enum CommandType {
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../../utils";
2
2
  export declare enum ExpressionType {
3
3
  EQUALS = "equals",
4
4
  GREATER = "greater",
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../../utils";
2
2
  export declare enum IntegrationType {
3
3
  ZAPIER = "Zapier",
4
4
  CUSTOM_API = "Custom API",
@@ -1,4 +1,4 @@
1
- import { SlotMapping } from '@voiceflow/api-sdk';
1
+ import { SlotMapping } from "../../models";
2
2
  export interface SlotMappings {
3
3
  mappings?: SlotMapping[];
4
4
  }
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../../utils";
2
2
  import { NodeID } from './base';
3
3
  export declare enum NoMatchType {
4
4
  PATH = "path",
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../../utils";
2
2
  export interface StepReprompt<Prompt> {
3
3
  reprompt: Nullable<Prompt>;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { NodeType } from './constants';
3
3
  import { BaseNode, BaseStep, BaseTraceFrame, NodeNextID, TraceType } from './utils';
4
4
  export declare enum DeviceType {
@@ -1,4 +1,4 @@
1
- import { BasePlatformData, Project } from '@voiceflow/api-sdk';
1
+ import { BasePlatformData, Project } from "../models";
2
2
  export interface BaseProject extends Project<BasePlatformData, BasePlatformData> {
3
3
  }
4
4
  export declare const defaultBaseProjectData: (data?: Partial<BasePlatformData>) => BasePlatformData;
@@ -0,0 +1,3 @@
1
+ export declare type Nullable<T> = T | null;
2
+ export declare type AnyRecord = Record<string, any>;
3
+ export declare type UnknownRecord = Record<string, unknown>;
package/build/utils.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { StrictVersionPlatformData, Version } from '@voiceflow/api-sdk';
1
+ import { StrictVersionPlatformData, Version } from "../models";
2
2
  import { BaseVersionSettings } from './settings';
3
3
  export * from './settings';
4
4
  export interface BaseVersionData<Prompt = unknown> extends StrictVersionPlatformData<BaseVersionSettings<Prompt>> {
@@ -1,4 +1,4 @@
1
- import { Nullable } from '@voiceflow/api-sdk';
1
+ import { Nullable } from "../utils";
2
2
  import { Utils } from '../node';
3
3
  export declare enum RepeatType {
4
4
  OFF = "OFF",
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@voiceflow/base-types",
3
3
  "description": "Voiceflow base project types",
4
- "version": "1.12.0",
4
+ "version": "2.0.0",
5
5
  "author": "Voiceflow",
6
6
  "bugs": {
7
7
  "url": "https://github.com/voiceflow/libs/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@voiceflow/api-sdk": "^2.0.0",
11
10
  "slate": "^0.63.0"
12
11
  },
13
12
  "files": [
@@ -37,5 +36,5 @@
37
36
  "test:integration": "exit 0",
38
37
  "test:unit": "exit 0"
39
38
  },
40
- "gitHead": "61ae8c8a836fc22c1559f17b0cde91975d024025"
39
+ "gitHead": "53085c0019d5a5a745416f25b6932e43e6786cd1"
41
40
  }