Other
BatchApiRequest
BatchApiRequest: { attached_files?: string; body: null | any; depends_on?: string; method: string; name?: string; omit_response_on_success?: boolean; relative_url: string }
Type declaration
Optional attached_files?: string
body: null | any
Optional depends_on?: string
method: string
Optional name?: string
Optional omit_response_on_success?: boolean
relative_url: string
CommentPrivateReplyTarget
CommentPrivateReplyTarget: { comment_id: string }
FbGraphApiResult
FbGraphApiResult: Record<string, any>
FileInfo
FileInfo: { contentType?: string; filename?: string; filepath?: string; knownLength?: number }
Type declaration
Optional contentType?: string
Optional filename?: string
Optional filepath?: string
Optional knownLength?: number
GraphApiErrorInfo
GraphApiErrorInfo: { code: number; error_subcode: number; fbtrace_id: string; message: string; type: string }
Type declaration
code: number
error_subcode: number
fbtrace_id: string
message: string
type: string
MessageValue
Message
Value
: { [ATTACHMENT_DATA]
?: string | Buffer | NodeJS.ReadableStream; [ATTACHMENT_INFO]
?: FileInfo; message
: RawMessage; messaging_type
?: MessagingType; notification_type
?: NotificationType; persona_id
?: string; tag
?: MessageTags }Type declaration
Optional [ATTACHMENT_DATA]?: string | Buffer | NodeJS.ReadableStream
Optional [ATTACHMENT_INFO]?: FileInfo
Optional messaging_type?: MessagingType
Optional notification_type?: NotificationType
Optional persona_id?: string
Optional tag?: MessageTags
MessengerComponent
Type parameters
MessengerConfigs
Messenger
Configs
: { accessToken
: string; apiBatchRequestInterval
?: number; appSecret
?: string; dispatchMiddlewares
?: MaybeContainer<MessengerDispatchMiddleware>[]; eventMiddlewares
?: MaybeContainer<MessengerEventMiddleware>[]; graphApiVersion
?: string; optionalProfileFields
?: ("locale" | "timezone" | "gender")[]; pageId
: string; shouldHandleChallenge
?: boolean; shouldVerifyRequest
?: boolean; verifyToken
?: string; webhookPath
?: string }Type declaration
accessToken: string
Optional apiBatchRequestInterval?: number
Optional appSecret?: string
Optional graphApiVersion?: string
Optional optionalProfileFields?: ("locale" | "timezone" | "gender")[]
pageId: string
Optional shouldHandleChallenge?: boolean
Optional shouldVerifyRequest?: boolean
Optional verifyToken?: string
Optional webhookPath?: string
MessengerDispatchMiddleware
MessengerDispatchResponse
MessengerEventContext
Type declaration
platform: "messenger"
reply:function
MessengerJob
Messenger
Job
: { assetTag
?: string; fileData
?: string | Buffer | NodeJS.ReadableStream; fileInfo
?: { contentType
?: string; filename
?: string; filepath
?: string; knownLength
?: number }; key
?: string; request
: BatchApiRequest }Type declaration
Optional assetTag?: string
Optional fileData?: string | Buffer | NodeJS.ReadableStream
Optional fileInfo?: { contentType?: string; filename?: string; filepath?: string; knownLength?: number }
Optional contentType?: string
Optional filename?: string
Optional filepath?: string
Optional knownLength?: number
Optional key?: string
MessengerPlatformUtilities
MessengerRawEvent
MessengerRawEvent: any
MessengerResult
Messenger
Result
: { body
: FbGraphApiResult; code
: number; headers
: Record<string, string> }Type declaration
code: number
headers: Record<string, string>
MessengerSendOptions
MessengerSendOptions: { messagingType?: MessagingType; notificationType?: NotificationType; oneTimeNotifToken?: string; personaId?: string; tag?: string }
Type declaration
Optional messagingType?: MessagingType
Optional notificationType?: NotificationType
Optional oneTimeNotifToken?: string
Optional personaId?: string
Optional tag?: string
PSIDTarget
PSIDTarget: { id: string }
PassThreadControlValue
PassThreadControlValue: { [API_PATH]: any; metadata?: string; target_app_id: number }
Type declaration
[API_PATH]: any
Optional metadata?: string
target_app_id: number
PostPrivateReplyTarget
PostPrivateReplyTarget: { post_id: string }
RawMessage
RawMessage: any
RawUserProfile
RawUserProfile: { first_name: string; gender?: string; id: string; last_name: string; locale?: string; name: string; profile_pic: string; timezone?: number }
Type declaration
first_name: string
Optional gender?: string
id: string
last_name: string
Optional locale?: string
name: string
profile_pic: string
Optional timezone?: number
RequestThreadControlValue
RequestThreadControlValue: { [API_PATH]: any; metadata?: string }
Type declaration
[API_PATH]: any
Optional metadata?: string
SenderActionValue
SenderActionValue: { sender_action: "mark_seen" | "typing_on" | "typing_off" }
Type declaration
sender_action: "mark_seen" | "typing_on" | "typing_off"
UserRefTarget
UserRefTarget: { user_ref: string }
Messenger Platform
Receive events and send messages through Messenger platform.
Install
Docs
Check the platform document and the package reference.
Setup