@ebenos/messenger-adapter
Advanced tools
Comparing version 3.2.22 to 3.2.23
@@ -14,3 +14,6 @@ import { GenericAdapter, IInteraction } from '@ebenos/framework'; | ||
} | ||
export default class MessengerAdapter<T extends MessengerUser> extends GenericAdapter<T> { | ||
export interface MessengerOperations { | ||
handover: (id: string) => Promise<void>; | ||
} | ||
export default class MessengerAdapter<T extends MessengerUser> extends GenericAdapter<T, MessengerOperations> { | ||
private webhookKey; | ||
@@ -20,7 +23,4 @@ private pageToken; | ||
private pageId; | ||
startsTyping: (id: string) => Promise<void>; | ||
stopsTyping: (id: string) => Promise<void>; | ||
markSeen: (id: string) => Promise<void>; | ||
getUserData: (id: string, fields: UserDataFields[]) => Promise<void>; | ||
handover: (id: string) => Promise<void>; | ||
operations: MessengerOperations; | ||
sender: (actions: Array<IInteraction<MessagingOptions>>, type: 'ORDERED' | 'UNORDERED') => Promise<void>; | ||
@@ -27,0 +27,0 @@ constructor(options: MessengerWebhookOptions<T>, sendFunction?: SenderFunction, domain?: string); |
@@ -28,9 +28,8 @@ "use strict"; | ||
this.route = route; | ||
const { send, senderAction, getUserData, handover } = sender_1.senderFactory(pageToken, sendFunction, domain); | ||
const { send, getUserData, handover } = sender_1.senderFactory(pageToken, sendFunction, domain); | ||
this.sender = send; | ||
this.startsTyping = (id, delay = 0) => senderAction(id, 'typing_on', { delay }); | ||
this.stopsTyping = (id, delay = 0) => senderAction(id, 'typing_on', { delay }); | ||
this.markSeen = (id, delay = 0) => senderAction(id, 'mark_seen', { delay }); | ||
this.getUserData = getUserData; | ||
this.handover = handover; | ||
this.operations = { | ||
handover | ||
}; | ||
} | ||
@@ -37,0 +36,0 @@ initWebhook() { |
{ | ||
"name": "@ebenos/messenger-adapter", | ||
"version": "3.2.22", | ||
"version": "3.2.23", | ||
"description": "Facebook SendAPI Library for the Ebony framework.", | ||
@@ -40,3 +40,3 @@ "main": "./build/index.js", | ||
"devDependencies": { | ||
"@ebenos/framework": "^3.2.19", | ||
"@ebenos/framework": "^3.2.23", | ||
"typescript": "^3.8.3" | ||
@@ -50,3 +50,3 @@ }, | ||
], | ||
"gitHead": "5fdf24a99d58ca18a8601d46a30d277571e93789" | ||
"gitHead": "537024801d5ab165279f99ab49909f1b1fb5234d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91807
1641