1 | import { Response } from 'ask-sdk-model';
|
2 | import { CustomSkillErrorHandler } from '../../dispatcher/error/handler/CustomSkillErrorHandler';
|
3 | import { CustomSkillRequestHandler } from '../../dispatcher/request/handler/CustomSkillRequestHandler';
|
4 | import { HandlerInput } from '../../dispatcher/request/handler/HandlerInput';
|
5 | import { CustomSkillRequestInterceptor } from '../../dispatcher/request/interceptor/CustomSkillRequestInterceptor';
|
6 | import { CustomSkillResponseInterceptor } from '../../dispatcher/request/interceptor/CustomSkillResponseInterceptor';
|
7 | import { CustomSkill } from '../CustomSkill';
|
8 | import { CustomSkillConfiguration } from '../CustomSkillConfiguration';
|
9 | import { LambdaHandler } from './BaseSkillFactory';
|
10 |
|
11 |
|
12 |
|
13 | export interface BaseSkillBuilder {
|
14 | addRequestHandler(matcher: ((input: HandlerInput) => Promise<boolean> | boolean) | string, executor: (input: HandlerInput) => Promise<Response> | Response): this;
|
15 | addRequestHandlers(...requestHandlers: CustomSkillRequestHandler[]): this;
|
16 | addRequestInterceptors(...executors: Array<CustomSkillRequestInterceptor | ((input: HandlerInput) => Promise<void> | void)>): this;
|
17 | addResponseInterceptors(...executors: Array<CustomSkillResponseInterceptor | ((input: HandlerInput, response?: Response) => Promise<void> | void)>): this;
|
18 | addErrorHandler(matcher: (input: HandlerInput, error: Error) => Promise<boolean> | boolean, executor: (input: HandlerInput, error: Error) => Promise<Response> | Response): this;
|
19 | addErrorHandlers(...errorHandlers: CustomSkillErrorHandler[]): this;
|
20 | withCustomUserAgent(customUserAgent: string): this;
|
21 | withSkillId(skillId: string): this;
|
22 | getSkillConfiguration(): CustomSkillConfiguration;
|
23 | create(): CustomSkill;
|
24 | lambda(): LambdaHandler;
|
25 | }
|
26 |
|
\ | No newline at end of file |