Daktela connector for wingbot.ai
npm install wingbot-daktelaConnector for automating chat conversations on Daktela.
-----------------
Kind: global class
* Daktela
* [new Daktela(processor, options, [senderLogger])](#new_Daktela_new)
* .processEvent(body) ⇒ Promise.<Array.<{message:Object, pageId:string}>>
* .verifyRequest(body, headers) ⇒ Promise
| Param | Type | Description |
| --- | --- | --- |
| processor | Processor | wingbot Processor instance |
| options | Object | |
| [options.terminateAction] | string | conversation termination postback |
| [options.pageId] | string | custom page ID |
| [options.requestLib] | function | request library replacement for testing |
| [senderLogger] | console | optional console like chat logger |
Kind: instance method of Daktela
Returns: Promise.<Array.<{message:Object, pageId:string}>> - - unprocessed events
| Param | Type | Description |
| --- | --- | --- |
| body | Object | event body |
Kind: instance method of Daktela
Throws:
- Error when authorization token is invalid or missing
| Param | Type | Description |
| --- | --- | --- |
| body | Object | parsed request body |
| headers | Object | request headers |