@voiceflow/base-types 2.25.3 → 2.28.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/index.d.ts +1 -0
- package/build/common/index.js +2 -1
- package/build/common/node/utils/trace.d.ts +2 -1
- package/build/common/node/utils/trace.js +1 -0
- package/build/common/runtimeLogs/index.d.ts +3 -0
- package/build/common/runtimeLogs/index.js +14 -0
- package/build/common/runtimeLogs/logs/base.d.ts +22 -0
- package/build/common/runtimeLogs/logs/base.js +2 -0
- package/build/common/runtimeLogs/logs/global/conversationStart.d.ts +6 -0
- package/build/common/runtimeLogs/logs/global/conversationStart.js +2 -0
- package/build/common/runtimeLogs/logs/index.d.ts +6 -0
- package/build/common/runtimeLogs/logs/index.js +27 -0
- package/build/common/runtimeLogs/logs/kinds.d.ts +26 -0
- package/build/common/runtimeLogs/logs/kinds.js +36 -0
- package/build/common/runtimeLogs/logs/levels.d.ts +6 -0
- package/build/common/runtimeLogs/logs/levels.js +10 -0
- package/build/common/runtimeLogs/logs/logs.d.ts +20 -0
- package/build/common/runtimeLogs/logs/logs.js +2 -0
- package/build/common/runtimeLogs/logs/steps/api.d.ts +34 -0
- package/build/common/runtimeLogs/logs/steps/api.js +2 -0
- package/build/common/runtimeLogs/logs/steps/buttons.d.ts +17 -0
- package/build/common/runtimeLogs/logs/steps/buttons.js +2 -0
- package/build/common/runtimeLogs/logs/steps/capture.d.ts +8 -0
- package/build/common/runtimeLogs/logs/steps/capture.js +2 -0
- package/build/common/runtimeLogs/logs/steps/code.d.ts +10 -0
- package/build/common/runtimeLogs/logs/steps/code.js +2 -0
- package/build/common/runtimeLogs/logs/steps/condition.d.ts +6 -0
- package/build/common/runtimeLogs/logs/steps/condition.js +2 -0
- package/build/common/runtimeLogs/logs/steps/customAction.d.ts +8 -0
- package/build/common/runtimeLogs/logs/steps/customAction.js +2 -0
- package/build/common/runtimeLogs/logs/steps/exit.d.ts +10 -0
- package/build/common/runtimeLogs/logs/steps/exit.js +2 -0
- package/build/common/runtimeLogs/logs/steps/flow.d.ts +6 -0
- package/build/common/runtimeLogs/logs/steps/flow.js +2 -0
- package/build/common/runtimeLogs/logs/steps/intent.d.ts +11 -0
- package/build/common/runtimeLogs/logs/steps/intent.js +2 -0
- package/build/common/runtimeLogs/logs/steps/random.d.ts +6 -0
- package/build/common/runtimeLogs/logs/steps/random.js +2 -0
- package/build/common/runtimeLogs/logs/steps/set.d.ts +6 -0
- package/build/common/runtimeLogs/logs/steps/set.js +2 -0
- package/build/common/runtimeLogs/logs/steps/speak.d.ts +5 -0
- package/build/common/runtimeLogs/logs/steps/speak.js +2 -0
- package/build/common/runtimeLogs/logs/steps/start.d.ts +4 -0
- package/build/common/runtimeLogs/logs/steps/start.js +2 -0
- package/build/common/runtimeLogs/logs/steps/text.d.ts +5 -0
- package/build/common/runtimeLogs/logs/steps/text.js +2 -0
- package/build/common/runtimeLogs/runtime/index.d.ts +1 -0
- package/build/common/runtimeLogs/runtime/index.js +13 -0
- package/build/common/runtimeLogs/runtime/logBuffer.d.ts +19 -0
- package/build/common/runtimeLogs/runtime/logBuffer.js +2 -0
- package/build/common/runtimeLogs/utils/index.d.ts +2 -0
- package/build/common/runtimeLogs/utils/index.js +14 -0
- package/build/common/runtimeLogs/utils/logs.d.ts +3 -0
- package/build/common/runtimeLogs/utils/logs.js +13 -0
- package/build/common/runtimeLogs/utils/types.d.ts +7 -0
- package/build/common/runtimeLogs/utils/types.js +2 -0
- package/build/common/trace/index.d.ts +6 -1
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.js +1 -0
- package/build/esm/node/utils/trace.d.ts +2 -1
- package/build/esm/node/utils/trace.js +1 -0
- package/build/esm/runtimeLogs/index.d.ts +3 -0
- package/build/esm/runtimeLogs/index.js +2 -0
- package/build/esm/runtimeLogs/logs/base.d.ts +22 -0
- package/build/esm/runtimeLogs/logs/base.js +1 -0
- package/build/esm/runtimeLogs/logs/global/conversationStart.d.ts +6 -0
- package/build/esm/runtimeLogs/logs/global/conversationStart.js +1 -0
- package/build/esm/runtimeLogs/logs/index.d.ts +6 -0
- package/build/esm/runtimeLogs/logs/index.js +4 -0
- package/build/esm/runtimeLogs/logs/kinds.d.ts +26 -0
- package/build/esm/runtimeLogs/logs/kinds.js +33 -0
- package/build/esm/runtimeLogs/logs/levels.d.ts +6 -0
- package/build/esm/runtimeLogs/logs/levels.js +7 -0
- package/build/esm/runtimeLogs/logs/logs.d.ts +20 -0
- package/build/esm/runtimeLogs/logs/logs.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/api.d.ts +34 -0
- package/build/esm/runtimeLogs/logs/steps/api.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/buttons.d.ts +17 -0
- package/build/esm/runtimeLogs/logs/steps/buttons.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/capture.d.ts +8 -0
- package/build/esm/runtimeLogs/logs/steps/capture.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/code.d.ts +10 -0
- package/build/esm/runtimeLogs/logs/steps/code.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/condition.d.ts +6 -0
- package/build/esm/runtimeLogs/logs/steps/condition.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/customAction.d.ts +8 -0
- package/build/esm/runtimeLogs/logs/steps/customAction.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/exit.d.ts +10 -0
- package/build/esm/runtimeLogs/logs/steps/exit.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/flow.d.ts +6 -0
- package/build/esm/runtimeLogs/logs/steps/flow.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/intent.d.ts +11 -0
- package/build/esm/runtimeLogs/logs/steps/intent.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/random.d.ts +6 -0
- package/build/esm/runtimeLogs/logs/steps/random.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/set.d.ts +6 -0
- package/build/esm/runtimeLogs/logs/steps/set.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/speak.d.ts +5 -0
- package/build/esm/runtimeLogs/logs/steps/speak.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/start.d.ts +4 -0
- package/build/esm/runtimeLogs/logs/steps/start.js +1 -0
- package/build/esm/runtimeLogs/logs/steps/text.d.ts +5 -0
- package/build/esm/runtimeLogs/logs/steps/text.js +1 -0
- package/build/esm/runtimeLogs/runtime/index.d.ts +1 -0
- package/build/esm/runtimeLogs/runtime/index.js +1 -0
- package/build/esm/runtimeLogs/runtime/logBuffer.d.ts +19 -0
- package/build/esm/runtimeLogs/runtime/logBuffer.js +1 -0
- package/build/esm/runtimeLogs/utils/index.d.ts +2 -0
- package/build/esm/runtimeLogs/utils/index.js +2 -0
- package/build/esm/runtimeLogs/utils/logs.d.ts +3 -0
- package/build/esm/runtimeLogs/utils/logs.js +9 -0
- package/build/esm/runtimeLogs/utils/types.d.ts +7 -0
- package/build/esm/runtimeLogs/utils/types.js +1 -0
- package/build/esm/trace/index.d.ts +6 -1
- package/package.json +2 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EmptyObject } from '@voiceflow/common';
|
|
2
|
+
import { Iso8601Timestamp, PathReference } from '../utils';
|
|
3
|
+
import { GlobalLogKind, StepLogKind } from './kinds';
|
|
4
|
+
import { LogLevel } from './levels';
|
|
5
|
+
/** The base log interface. This should not be used directly, use one of the subtypes instead. */
|
|
6
|
+
interface BaseLog {
|
|
7
|
+
kind: string;
|
|
8
|
+
timestamp: Iso8601Timestamp;
|
|
9
|
+
message: EmptyObject;
|
|
10
|
+
level: LogLevel;
|
|
11
|
+
}
|
|
12
|
+
export interface BaseGlobalLog<Kind extends GlobalLogKind, Message extends EmptyObject, Level extends LogLevel = LogLevel.INFO> extends BaseLog {
|
|
13
|
+
kind: `global.${Kind}`;
|
|
14
|
+
level: Level;
|
|
15
|
+
message: Message;
|
|
16
|
+
}
|
|
17
|
+
export interface BaseStepLog<Kind extends StepLogKind, Message extends EmptyObject, Level extends LogLevel = LogLevel.INFO> extends BaseLog {
|
|
18
|
+
kind: `step.${Kind}`;
|
|
19
|
+
level: Level;
|
|
20
|
+
message: PathReference & Message;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Similar to {@link NodeType}, but for runtime logging */
|
|
2
|
+
export declare enum StepLogKind {
|
|
3
|
+
TEXT = "text",
|
|
4
|
+
SPEAK = "speak",
|
|
5
|
+
AUDIO = "audio",
|
|
6
|
+
VISUALS = "visuals",
|
|
7
|
+
BUTTONS = "buttons",
|
|
8
|
+
CHOICE = "choice",
|
|
9
|
+
CAPTURE = "capture",
|
|
10
|
+
PROMPT = "prompt",
|
|
11
|
+
INTENT = "intent",
|
|
12
|
+
CONDITION = "condition",
|
|
13
|
+
SET = "set",
|
|
14
|
+
RANDOM = "random",
|
|
15
|
+
FLOW = "flow",
|
|
16
|
+
EXIT = "exit",
|
|
17
|
+
API = "api",
|
|
18
|
+
/** @deprecated Will be removed soon */
|
|
19
|
+
GOOGLE_SHEETS = "google_sheets",
|
|
20
|
+
CUSTOM_CODE = "custom_code",
|
|
21
|
+
CUSTOM_ACTION = "custom_action",
|
|
22
|
+
START = "start"
|
|
23
|
+
}
|
|
24
|
+
export declare enum GlobalLogKind {
|
|
25
|
+
CONVERSATION_START = "conversation_start"
|
|
26
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Similar to {@link NodeType}, but for runtime logging */
|
|
2
|
+
export var StepLogKind;
|
|
3
|
+
(function (StepLogKind) {
|
|
4
|
+
// Response
|
|
5
|
+
StepLogKind["TEXT"] = "text";
|
|
6
|
+
StepLogKind["SPEAK"] = "speak";
|
|
7
|
+
StepLogKind["AUDIO"] = "audio";
|
|
8
|
+
StepLogKind["VISUALS"] = "visuals";
|
|
9
|
+
// User input
|
|
10
|
+
StepLogKind["BUTTONS"] = "buttons";
|
|
11
|
+
StepLogKind["CHOICE"] = "choice";
|
|
12
|
+
StepLogKind["CAPTURE"] = "capture";
|
|
13
|
+
StepLogKind["PROMPT"] = "prompt";
|
|
14
|
+
StepLogKind["INTENT"] = "intent";
|
|
15
|
+
// Logic
|
|
16
|
+
StepLogKind["CONDITION"] = "condition";
|
|
17
|
+
StepLogKind["SET"] = "set";
|
|
18
|
+
StepLogKind["RANDOM"] = "random";
|
|
19
|
+
StepLogKind["FLOW"] = "flow";
|
|
20
|
+
StepLogKind["EXIT"] = "exit";
|
|
21
|
+
// Integration
|
|
22
|
+
StepLogKind["API"] = "api";
|
|
23
|
+
/** @deprecated Will be removed soon */
|
|
24
|
+
StepLogKind["GOOGLE_SHEETS"] = "google_sheets";
|
|
25
|
+
StepLogKind["CUSTOM_CODE"] = "custom_code";
|
|
26
|
+
StepLogKind["CUSTOM_ACTION"] = "custom_action";
|
|
27
|
+
// Special
|
|
28
|
+
StepLogKind["START"] = "start";
|
|
29
|
+
})(StepLogKind || (StepLogKind = {}));
|
|
30
|
+
export var GlobalLogKind;
|
|
31
|
+
(function (GlobalLogKind) {
|
|
32
|
+
GlobalLogKind["CONVERSATION_START"] = "conversation_start";
|
|
33
|
+
})(GlobalLogKind || (GlobalLogKind = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ConversationStartLog } from './global/conversationStart';
|
|
2
|
+
import { ApiStepLog } from './steps/api';
|
|
3
|
+
import { ButtonsStepLog } from './steps/buttons';
|
|
4
|
+
import { CaptureStepLog } from './steps/capture';
|
|
5
|
+
import { CodeStepLog } from './steps/code';
|
|
6
|
+
import { ConditionStepLog } from './steps/condition';
|
|
7
|
+
import { CustomActionStepLog } from './steps/customAction';
|
|
8
|
+
import { ExitStepLog } from './steps/exit';
|
|
9
|
+
import { FlowStepLog } from './steps/flow';
|
|
10
|
+
import { IntentStepLog } from './steps/intent';
|
|
11
|
+
import { RandomStepLog } from './steps/random';
|
|
12
|
+
import { SetStepLog } from './steps/set';
|
|
13
|
+
import { SpeakStepLog } from './steps/speak';
|
|
14
|
+
import { StartStepLog } from './steps/start';
|
|
15
|
+
import { TextStepLog } from './steps/text';
|
|
16
|
+
export { ApiStepLog, ButtonsStepLog, CaptureStepLog, CodeStepLog, ConditionStepLog, ConversationStartLog, CustomActionStepLog, ExitStepLog, FlowStepLog, IntentStepLog, RandomStepLog, SetStepLog, SpeakStepLog, StartStepLog, TextStepLog, };
|
|
17
|
+
/** All possible runtime logs for global events. */
|
|
18
|
+
export declare type GlobalLog = ConversationStartLog;
|
|
19
|
+
/** All possible runtime logs for steps. */
|
|
20
|
+
export declare type StepLog = ApiStepLog | ButtonsStepLog | CaptureStepLog | CodeStepLog | ConditionStepLog | CustomActionStepLog | ExitStepLog | FlowStepLog | IntentStepLog | RandomStepLog | SetStepLog | SpeakStepLog | StartStepLog | TextStepLog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { APIBodyType, APIMethod } from "../../../node/api";
|
|
2
|
+
import { BaseStepLog } from '../base';
|
|
3
|
+
import { StepLogKind } from '../kinds';
|
|
4
|
+
import { LogLevel } from '../levels';
|
|
5
|
+
interface ApiLogMessage {
|
|
6
|
+
request: {
|
|
7
|
+
method: APIMethod;
|
|
8
|
+
url: string;
|
|
9
|
+
};
|
|
10
|
+
response: {
|
|
11
|
+
statusCode: number;
|
|
12
|
+
statusMessage: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
interface VerboseApiLogMessage {
|
|
16
|
+
request: {
|
|
17
|
+
headers: Record<string, string>;
|
|
18
|
+
query: Record<string, string>;
|
|
19
|
+
} & ({
|
|
20
|
+
method: Exclude<APIMethod, APIMethod.GET>;
|
|
21
|
+
bodyType: APIBodyType;
|
|
22
|
+
body: string;
|
|
23
|
+
} | {
|
|
24
|
+
method: APIMethod.GET;
|
|
25
|
+
bodyType: null;
|
|
26
|
+
body: null;
|
|
27
|
+
});
|
|
28
|
+
response: {
|
|
29
|
+
headers: Record<string, string>;
|
|
30
|
+
body: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare type ApiStepLog = BaseStepLog<StepLogKind.API, ApiLogMessage, LogLevel.INFO | LogLevel.ERROR> | BaseStepLog<StepLogKind.API, ApiLogMessage & VerboseApiLogMessage, LogLevel.VERBOSE | LogLevel.ERROR>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Nullable } from '@voiceflow/common';
|
|
2
|
+
import { PathReference } from '../../utils';
|
|
3
|
+
import { BaseStepLog } from '../base';
|
|
4
|
+
import { StepLogKind } from '../kinds';
|
|
5
|
+
interface UrlButtonLogMessage {
|
|
6
|
+
url: Nullable<string>;
|
|
7
|
+
}
|
|
8
|
+
interface FollowPathButtonLogMessage extends UrlButtonLogMessage {
|
|
9
|
+
intent: null;
|
|
10
|
+
path: PathReference;
|
|
11
|
+
}
|
|
12
|
+
interface GoToIntentButtonLogMessage extends UrlButtonLogMessage {
|
|
13
|
+
intent: string;
|
|
14
|
+
path: null;
|
|
15
|
+
}
|
|
16
|
+
export declare type ButtonsStepLog = BaseStepLog<StepLogKind.BUTTONS, FollowPathButtonLogMessage | GoToIntentButtonLogMessage>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseStepLog } from '../base';
|
|
2
|
+
import { StepLogKind } from '../kinds';
|
|
3
|
+
import { LogLevel } from '../levels';
|
|
4
|
+
export declare type CodeStepLog = BaseStepLog<StepLogKind.CUSTOM_CODE, {
|
|
5
|
+
data: any;
|
|
6
|
+
error: null;
|
|
7
|
+
}, LogLevel.INFO> | BaseStepLog<StepLogKind.CUSTOM_CODE, {
|
|
8
|
+
data: null;
|
|
9
|
+
error: any;
|
|
10
|
+
}, LogLevel.ERROR>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Nullable } from '@voiceflow/common';
|
|
2
|
+
import { PathReference } from '../../utils';
|
|
3
|
+
import { BaseStepLog } from '../base';
|
|
4
|
+
import { StepLogKind } from '../kinds';
|
|
5
|
+
export declare type CustomActionStepLog = BaseStepLog<StepLogKind.CUSTOM_ACTION, {
|
|
6
|
+
actionBody: Nullable<string>;
|
|
7
|
+
path: PathReference;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EmptyObject } from '@voiceflow/common';
|
|
2
|
+
import { BaseStepLog } from '../base';
|
|
3
|
+
import { StepLogKind } from '../kinds';
|
|
4
|
+
import { LogLevel } from '../levels';
|
|
5
|
+
export declare type ExitStepLog = BaseStepLog<StepLogKind.EXIT, {
|
|
6
|
+
state: null;
|
|
7
|
+
}, LogLevel.INFO> | BaseStepLog<StepLogKind.EXIT, {
|
|
8
|
+
/** The state of the program on exit. */
|
|
9
|
+
state: EmptyObject;
|
|
10
|
+
}, LogLevel.VERBOSE>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseStepLog } from '../base';
|
|
2
|
+
import { StepLogKind } from '../kinds';
|
|
3
|
+
export declare type IntentStepLog = BaseStepLog<StepLogKind.INTENT, {
|
|
4
|
+
intentName: string;
|
|
5
|
+
utterance: string;
|
|
6
|
+
confidence: number;
|
|
7
|
+
slots: Array<{
|
|
8
|
+
utteredValue: string;
|
|
9
|
+
canonicalValue: string;
|
|
10
|
+
}>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './logBuffer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './logBuffer';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Log } from '../logs';
|
|
2
|
+
/**
|
|
3
|
+
* It acts as a buffer in between the runtime which produces the logs and the service/datastore which consumes the logs.
|
|
4
|
+
* In practice, this will almost always be implemented as part of the runtime itself.
|
|
5
|
+
*/
|
|
6
|
+
export interface LogBuffer {
|
|
7
|
+
/** The number of {@link Log} in this {@link LogBuffer}'s buffer. */
|
|
8
|
+
readonly bufferSize: number;
|
|
9
|
+
/** Add {@link Log} to this {@link LogBuffer}'s buffer. */
|
|
10
|
+
push(...logs: Log[]): void;
|
|
11
|
+
/** Dispatch all {@link Log} from this {@link LogBuffer}'s buffer and then remove them. */
|
|
12
|
+
flush(): void;
|
|
13
|
+
/** Remove all {@link Log} from this {@link LogBuffer}'s buffer. */
|
|
14
|
+
clear(): void;
|
|
15
|
+
}
|
|
16
|
+
export interface AsyncLogBuffer extends LogBuffer {
|
|
17
|
+
flush(): void | Promise<void>;
|
|
18
|
+
clear(): void | Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LogLevel } from '../logs/levels';
|
|
2
|
+
const logLevelValues = {
|
|
3
|
+
[LogLevel.ERROR]: 0,
|
|
4
|
+
[LogLevel.WARN]: 1,
|
|
5
|
+
[LogLevel.INFO]: 2,
|
|
6
|
+
[LogLevel.VERBOSE]: 3,
|
|
7
|
+
};
|
|
8
|
+
/** Returns the number (non-negative integer) value of `level`. A higher number is more verbose. `0` is the least verbose and most "important". */
|
|
9
|
+
export const getValueForLogLevel = (level) => logLevelValues[level];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,7 @@ import { TraceFrame as TextTrace } from "../node/text";
|
|
|
7
7
|
import { BaseTraceFrame, TraceType } from "../node/utils";
|
|
8
8
|
import { TraceFrame as VisualTrace } from "../node/visual";
|
|
9
9
|
import { IntentRequest } from "../request";
|
|
10
|
+
import { Log as RuntimeLog } from "../runtimeLogs";
|
|
10
11
|
export { TraceFrame as ExitTrace } from "../node/exit";
|
|
11
12
|
export { TraceFrame as FlowTrace } from "../node/flow";
|
|
12
13
|
export { TraceFrame as ChoiceTrace } from "../node/interaction";
|
|
@@ -53,4 +54,8 @@ export interface EntityFillingTracePayload {
|
|
|
53
54
|
export interface EntityFillingTrace extends BaseTraceFrame<EntityFillingTracePayload> {
|
|
54
55
|
type: TraceType.ENTITY_FILLING;
|
|
55
56
|
}
|
|
56
|
-
export declare type
|
|
57
|
+
export declare type LogTracePayload = RuntimeLog;
|
|
58
|
+
export interface LogTrace extends BaseTraceFrame<LogTracePayload> {
|
|
59
|
+
type: TraceType.LOG;
|
|
60
|
+
}
|
|
61
|
+
export declare type AnyTrace = ExitTrace | TextTrace | GoToTrace | FlowTrace | SpeakTrace | BlockTrace | DebugTrace | ChoiceTrace | StreamTrace | VisualTrace | NoReplyTrace | EntityFillingTrace | LogTrace;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceflow/base-types",
|
|
3
3
|
"description": "Voiceflow base project types",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.28.0",
|
|
5
5
|
"author": "Voiceflow",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/voiceflow/libs/issues"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"test:smoke": "exit 0",
|
|
44
44
|
"test:unit": "exit 0"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "0a48c64c043e751a19513d08baf53caed731fcd5"
|
|
47
47
|
}
|