import { Response } from 'ask-sdk-model'; import { CustomSkillErrorHandler } from '../../dispatcher/error/handler/CustomSkillErrorHandler'; import { CustomSkillRequestHandler } from '../../dispatcher/request/handler/CustomSkillRequestHandler'; import { HandlerInput } from '../../dispatcher/request/handler/HandlerInput'; import { CustomSkillRequestInterceptor } from '../../dispatcher/request/interceptor/CustomSkillRequestInterceptor'; import { CustomSkillResponseInterceptor } from '../../dispatcher/request/interceptor/CustomSkillResponseInterceptor'; import { CustomSkill } from '../CustomSkill'; import { CustomSkillConfiguration } from '../CustomSkillConfiguration'; import { LambdaHandler } from './BaseSkillFactory'; /** * An interface containing help functions to build a {@link CustomSkill}. */ export interface BaseSkillBuilder { addRequestHandler(matcher: ((input: HandlerInput) => Promise | boolean) | string, executor: (input: HandlerInput) => Promise | Response): this; addRequestHandlers(...requestHandlers: CustomSkillRequestHandler[]): this; addRequestInterceptors(...executors: Array Promise | void)>): this; addResponseInterceptors(...executors: Array Promise | void)>): this; addErrorHandler(matcher: (input: HandlerInput, error: Error) => Promise | boolean, executor: (input: HandlerInput, error: Error) => Promise | Response): this; addErrorHandlers(...errorHandlers: CustomSkillErrorHandler[]): this; withCustomUserAgent(customUserAgent: string): this; withSkillId(skillId: string): this; getSkillConfiguration(): CustomSkillConfiguration; create(): CustomSkill; lambda(): LambdaHandler; }