UNPKG

@makingchatbots/genesys-cloud-chatbot-tester-cli

Version:

[![npm](https://img.shields.io/npm/v/@makingchatbots/genesys-cloud-chatbot-tester-cli)](https://www.npmjs.com/package/@makingchatbots/genesys-cloud-chatbot-tester-cli) [![Follow me on LinkedIn for updates](https://img.shields.io/badge/Follow%20for%20updat

29 lines (28 loc) 1.05 kB
import { Conversation, SessionConfig } from '@makingchatbots/genesys-cloud-chatbot-tester'; export type TestScriptFileScenarioStep = { readonly say: string; } | { readonly waitForReplyContaining: string; } | { readonly waitForReplyMatching: RegExp; }; export interface TestScriptFile { readonly config?: { readonly deploymentId: string; readonly region: string; readonly origin?: string; }; readonly scenarios: { [key: string]: TestScriptFileScenarioStep[]; }; } export interface StepContext { timeoutInSeconds: number; } export interface TestScriptScenario { sessionConfig: SessionConfig; name: string; steps: ((convo: Conversation, context: StepContext) => Promise<unknown>)[]; } export declare function parseScenarioStep(step: TestScriptFileScenarioStep): (convo: Conversation, context: StepContext) => Promise<unknown | void>; export declare function extractScenarios(testScript: Exclude<TestScriptFile, 'config'>, sessionConfig: SessionConfig): TestScriptScenario[];