@voiceflow/base-types 2.3.1 → 2.4.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.
@@ -4,4 +4,5 @@ export * from './member';
4
4
  export * from './program';
5
5
  export * from './project';
6
6
  export * from './shared';
7
+ export * from './transcripts';
7
8
  export * from './version';
@@ -16,5 +16,6 @@ __exportStar(require("./member"), exports);
16
16
  __exportStar(require("./program"), exports);
17
17
  __exportStar(require("./project"), exports);
18
18
  __exportStar(require("./shared"), exports);
19
+ __exportStar(require("./transcripts"), exports);
19
20
  __exportStar(require("./version"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
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,gDAA8B;AAC9B,4CAA0B"}
@@ -13,6 +13,8 @@ export declare type CreatorID = number;
13
13
  export declare type VersionID = string;
14
14
  export declare type ProgramID = string;
15
15
  export declare type DiagramID = string;
16
+ export declare type TranscriptID = string;
17
+ export declare type TurnID = string;
16
18
  export interface IntentInput {
17
19
  text: string;
18
20
  slots?: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/models/shared.ts"],"names":[],"mappings":";;;AA8HA,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;AACvB,CAAC,EAPW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAOnB"}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/models/shared.ts"],"names":[],"mappings":";;;AAkIA,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;AACvB,CAAC,EAPW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAOnB"}
@@ -0,0 +1,13 @@
1
+ import { CreatorID, ProjectID, Timestamp, TranscriptID } from './shared';
2
+ export interface Transcript {
3
+ _id: TranscriptID;
4
+ sessionID: string;
5
+ createdAt: Timestamp;
6
+ unread: boolean;
7
+ device: string;
8
+ os: string;
9
+ browser: string;
10
+ reportTags: string[];
11
+ creatorID: CreatorID;
12
+ projectID: ProjectID;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=transcripts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcripts.js","sourceRoot":"","sources":["../../../src/models/transcripts.ts"],"names":[],"mappings":""}
@@ -12,6 +12,8 @@ export interface Step<Data = StepData> extends BaseStep<Data> {
12
12
  }
13
13
  export interface Node extends BaseNode, NodeNextID {
14
14
  type: NodeType.CAPTURE;
15
+ intent?: string;
16
+ slots?: string[];
15
17
  noReply?: Nullable<BaseNodeNoReply>;
16
18
  variable: string;
17
19
  }
@@ -5,7 +5,8 @@ export declare enum RequestType {
5
5
  TEXT = "text",
6
6
  ACTION = "action",
7
7
  INTENT = "intent",
8
- LAUNCH = "launch"
8
+ LAUNCH = "launch",
9
+ NO_REPLY = "no-reply"
9
10
  }
10
11
  export interface RequestConfig {
11
12
  tts?: boolean;
@@ -35,6 +36,9 @@ export interface BaseRequest<P = unknown> {
35
36
  export interface LaunchRequest extends BaseRequest<undefined> {
36
37
  type: RequestType.LAUNCH;
37
38
  }
39
+ export interface NoReplyRequest extends BaseRequest<undefined> {
40
+ type: RequestType.NO_REPLY;
41
+ }
38
42
  export interface TextRequest extends BaseRequest<string> {
39
43
  type: RequestType.TEXT;
40
44
  }
@@ -80,5 +84,6 @@ export interface NodeButton {
80
84
  export declare const isTextRequest: (request: BaseRequest) => request is TextRequest;
81
85
  export declare const isActionRequest: (request: BaseRequest) => request is ActionRequest;
82
86
  export declare const isLaunchRequest: (request: BaseRequest) => request is LaunchRequest;
87
+ export declare const isNoReplyRequest: (request: BaseRequest) => request is NoReplyRequest;
83
88
  export declare const isIntentRequest: (request: BaseRequest) => request is IntentRequest;
84
89
  export declare const isGeneralRequest: (request: BaseRequest) => request is GeneralRequest;
@@ -20,7 +20,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
20
20
  return result;
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.isGeneralRequest = exports.isIntentRequest = exports.isLaunchRequest = exports.isActionRequest = exports.isTextRequest = exports.RequestType = exports.Action = void 0;
23
+ exports.isGeneralRequest = exports.isIntentRequest = exports.isNoReplyRequest = exports.isLaunchRequest = exports.isActionRequest = exports.isTextRequest = exports.RequestType = exports.Action = void 0;
24
24
  exports.Action = __importStar(require("./action"));
25
25
  var RequestType;
26
26
  (function (RequestType) {
@@ -28,6 +28,7 @@ var RequestType;
28
28
  RequestType["ACTION"] = "action";
29
29
  RequestType["INTENT"] = "intent";
30
30
  RequestType["LAUNCH"] = "launch";
31
+ RequestType["NO_REPLY"] = "no-reply";
31
32
  })(RequestType = exports.RequestType || (exports.RequestType = {}));
32
33
  const isTextRequest = (request) => request.type === RequestType.TEXT;
33
34
  exports.isTextRequest = isTextRequest;
@@ -35,6 +36,8 @@ const isActionRequest = (request) => request.type === RequestType.ACTION;
35
36
  exports.isActionRequest = isActionRequest;
36
37
  const isLaunchRequest = (request) => request.type === RequestType.LAUNCH;
37
38
  exports.isLaunchRequest = isLaunchRequest;
39
+ const isNoReplyRequest = (request) => request.type === RequestType.NO_REPLY;
40
+ exports.isNoReplyRequest = isNoReplyRequest;
38
41
  const isIntentRequest = (request) => request.type === RequestType.INTENT;
39
42
  exports.isIntentRequest = isIntentRequest;
40
43
  const ALL_REQUEST_TYPES = Object.values(RequestType);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/request/index.ts"],"names":[],"mappings":";AAAA,0DAA0D;;;;;;;;;;;;;;;;;;;;;;AAK1D,mDAAmC;AAEnC,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;AACnB,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAmFM,MAAM,aAAa,GAAG,CAAC,OAAoB,EAA0B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI,CAAC;AAApG,QAAA,aAAa,iBAAuF;AAE1G,MAAM,eAAe,GAAG,CAAC,OAAoB,EAA4B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,MAAM,CAAC;AAA1G,QAAA,eAAe,mBAA2F;AAEhH,MAAM,eAAe,GAAG,CAAC,OAAoB,EAA4B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,MAAM,CAAC;AAA1G,QAAA,eAAe,mBAA2F;AAEhH,MAAM,eAAe,GAAG,CAAC,OAAoB,EAA4B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,MAAM,CAAC;AAA1G,QAAA,eAAe,mBAA2F;AAEvH,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAa,CAAC;AAE1D,MAAM,gBAAgB,GAAG,CAAC,OAAoB,EAA6B,EAAE,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC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,gBAAgB,oBAAkG"}
@@ -4,4 +4,5 @@ export * from './member';
4
4
  export * from './program';
5
5
  export * from './project';
6
6
  export * from './shared';
7
+ export * from './transcripts';
7
8
  export * from './version';
@@ -4,5 +4,6 @@ export * from './member';
4
4
  export * from './program';
5
5
  export * from './project';
6
6
  export * from './shared';
7
+ export * from './transcripts';
7
8
  export * from './version';
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
@@ -13,6 +13,8 @@ export declare type CreatorID = number;
13
13
  export declare type VersionID = string;
14
14
  export declare type ProgramID = string;
15
15
  export declare type DiagramID = string;
16
+ export declare type TranscriptID = string;
17
+ export declare type TurnID = string;
16
18
  export interface IntentInput {
17
19
  text: string;
18
20
  slots?: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/models/shared.ts"],"names":[],"mappings":"AA8HA,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;AACvB,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB"}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/models/shared.ts"],"names":[],"mappings":"AAkIA,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;AACvB,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB"}
@@ -0,0 +1,13 @@
1
+ import { CreatorID, ProjectID, Timestamp, TranscriptID } from './shared';
2
+ export interface Transcript {
3
+ _id: TranscriptID;
4
+ sessionID: string;
5
+ createdAt: Timestamp;
6
+ unread: boolean;
7
+ device: string;
8
+ os: string;
9
+ browser: string;
10
+ reportTags: string[];
11
+ creatorID: CreatorID;
12
+ projectID: ProjectID;
13
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=transcripts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transcripts.js","sourceRoot":"","sources":["../../../src/models/transcripts.ts"],"names":[],"mappings":""}
@@ -12,6 +12,8 @@ export interface Step<Data = StepData> extends BaseStep<Data> {
12
12
  }
13
13
  export interface Node extends BaseNode, NodeNextID {
14
14
  type: NodeType.CAPTURE;
15
+ intent?: string;
16
+ slots?: string[];
15
17
  noReply?: Nullable<BaseNodeNoReply>;
16
18
  variable: string;
17
19
  }
@@ -5,7 +5,8 @@ export declare enum RequestType {
5
5
  TEXT = "text",
6
6
  ACTION = "action",
7
7
  INTENT = "intent",
8
- LAUNCH = "launch"
8
+ LAUNCH = "launch",
9
+ NO_REPLY = "no-reply"
9
10
  }
10
11
  export interface RequestConfig {
11
12
  tts?: boolean;
@@ -35,6 +36,9 @@ export interface BaseRequest<P = unknown> {
35
36
  export interface LaunchRequest extends BaseRequest<undefined> {
36
37
  type: RequestType.LAUNCH;
37
38
  }
39
+ export interface NoReplyRequest extends BaseRequest<undefined> {
40
+ type: RequestType.NO_REPLY;
41
+ }
38
42
  export interface TextRequest extends BaseRequest<string> {
39
43
  type: RequestType.TEXT;
40
44
  }
@@ -80,5 +84,6 @@ export interface NodeButton {
80
84
  export declare const isTextRequest: (request: BaseRequest) => request is TextRequest;
81
85
  export declare const isActionRequest: (request: BaseRequest) => request is ActionRequest;
82
86
  export declare const isLaunchRequest: (request: BaseRequest) => request is LaunchRequest;
87
+ export declare const isNoReplyRequest: (request: BaseRequest) => request is NoReplyRequest;
83
88
  export declare const isIntentRequest: (request: BaseRequest) => request is IntentRequest;
84
89
  export declare const isGeneralRequest: (request: BaseRequest) => request is GeneralRequest;
@@ -6,10 +6,12 @@ export var RequestType;
6
6
  RequestType["ACTION"] = "action";
7
7
  RequestType["INTENT"] = "intent";
8
8
  RequestType["LAUNCH"] = "launch";
9
+ RequestType["NO_REPLY"] = "no-reply";
9
10
  })(RequestType || (RequestType = {}));
10
11
  export const isTextRequest = (request) => request.type === RequestType.TEXT;
11
12
  export const isActionRequest = (request) => request.type === RequestType.ACTION;
12
13
  export const isLaunchRequest = (request) => request.type === RequestType.LAUNCH;
14
+ export const isNoReplyRequest = (request) => request.type === RequestType.NO_REPLY;
13
15
  export const isIntentRequest = (request) => request.type === RequestType.INTENT;
14
16
  const ALL_REQUEST_TYPES = Object.values(RequestType);
15
17
  export const isGeneralRequest = (request) => !ALL_REQUEST_TYPES.includes(request.type);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/request/index.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAK1D,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;AACnB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAmFD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAoB,EAA0B,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AE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,MAAM,CAAC;AAEvH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAoB,EAA6B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,QAAQ,CAAC;AAE3H,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAoB,EAA4B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,MAAM,CAAC;AAEvH,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAa,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAoB,EAA6B,EAAE,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@voiceflow/base-types",
3
3
  "description": "Voiceflow base project types",
4
- "version": "2.3.1",
4
+ "version": "2.4.2",
5
5
  "author": "Voiceflow",
6
6
  "bugs": {
7
7
  "url": "https://github.com/voiceflow/libs/issues"
@@ -39,5 +39,5 @@
39
39
  "test:integration": "exit 0",
40
40
  "test:unit": "exit 0"
41
41
  },
42
- "gitHead": "6ff2879f7161d3f290ab817b29996ddf1fa42c13"
42
+ "gitHead": "e87ab086318dad7e1b0b37ee014e59ee3e9c3e73"
43
43
  }