Type aliases
Address
Address: { city: string; country: string; postalCode: string; state: string; street1: string; street2?: string }
Type declaration
city: string
country: string
postalCode: string
state: string
street1: string
Optional street2?: string
Adjustment
Adjustment: { amount?: number; name?: string }
Type declaration
Optional amount?: number
Optional name?: string
AirlineBoardingPassAttributes
Airline
Boarding
Pass
Attributes
: { boardingPass
: BoardingPass[]; introMessage
: string; locale
: string }Type declaration
introMessage: string
locale: string
AirlineCheckinAttributes
Airline
Checkin
Attributes
: { checkinUrl
: string; flightInfo
: FlightInfo[]; introMessage
: string; locale
: string; pnrNumber
?: string }Type declaration
checkinUrl: string
introMessage: string
locale: string
Optional pnrNumber?: string
AirlineItineraryAttributes
Airline
Itinerary
Attributes
: { basePrice
?: string; currency
: string; flightInfo
: FlightInfo[]; introMessage
: string; locale
: string; passengerInfo
: PassengerInfo[]; passengerSegmentInfo
: PassengerSegmentInfo[]; pnrNumber
: string; priceInfo
?: PriceInfo[]; tax
?: string; themeColor
?: string; totalPrice
: string }Type declaration
Optional basePrice?: string
currency: string
introMessage: string
locale: string
pnrNumber: string
Optional priceInfo?: PriceInfo[]
Optional tax?: string
Optional themeColor?: string
totalPrice: string
AirlineUpdateAttributes
Airline
Update
Attributes
: { introMessage
: string; locale
: string; pnrNumber
?: string; themeColor
?: string; updateFlightInfo
: UpdateFlightInfo; updateType
: "delay" | "gate_change" | "cancellation" }Type declaration
introMessage: string
locale: string
Optional pnrNumber?: string
Optional themeColor?: string
updateType: "delay" | "gate_change" | "cancellation"
Airport
Airport: { airportCode: string; city: string; gate?: string; terminal?: string }
Type declaration
airportCode: string
city: string
Optional gate?: string
Optional terminal?: string
AttachmentIdAttachmentPayload
AttachmentIdAttachmentPayload: { attachmentId: string }
BatchItem
Batch
Item
: { body
?: Record<string, any>; method
: string; name
?: string; relativeUrl
: string; responseAccessPath
?: string } & BatchRequestOptionsBatchRequestOptions
BatchRequestOptions: { dependsOn?: string; name?: string; omitResponseOnSuccess?: boolean }
Type declaration
Optional dependsOn?: string
Optional name?: string
Optional omitResponseOnSuccess?: boolean
BoardingPass
Boarding
Pass
: { aboveBarCodeImageUrl
: string; auxiliaryFields
?: Field[]; barcodeImageUrl
?: string; flightInfo
: FlightInfo; headerImageUrl
?: string; headerTextField
?: Field; logoImageUrl
: string; passengerName
: string; pnrNumber
: string; qrCode
?: string; seat
?: string; secondaryFields
?: Field[]; travelClass
?: string }Type declaration
aboveBarCodeImageUrl: string
Optional auxiliaryFields?: Field[]
Optional barcodeImageUrl?: string
Optional headerImageUrl?: string
Optional headerTextField?: Field
logoImageUrl: string
passengerName: string
pnrNumber: string
Optional qrCode?: string
Optional seat?: string
Optional secondaryFields?: Field[]
Optional travelClass?: string
ClientConfig
ClientConfig: { accessToken: string; appId?: string; appSecret?: string; onRequest?: OnRequestFunction; origin?: string; skipAppSecretProof?: boolean; version?: string }
Type declaration
accessToken: string
Optional appId?: string
Optional appSecret?: string
Optional onRequest?: OnRequestFunction
Optional origin?: string
Optional skipAppSecretProof?: boolean
Optional version?: string
Field
Field: { label: string; value: string }
Type declaration
label: string
value: string
FileData
FileData: Buffer | fs.ReadStream
FileDataAttachmentPayload
FileDataAttachmentPayload: { isReusable?: boolean }
Type declaration
Optional isReusable?: boolean
FileDataMediaAttachmentMessage
FlightInfo
Flight
Info
: { aircraftType
?: string; arrivalAirport
: Airport; connectionId
: string; departureAirport
: Airport; flightNumber
: string; flightSchedule
: FlightSchedule; segmentId
: string | PassengerSegmentInfo; travelClass
: "economy" | "business" | "first_class" }Type declaration
Optional aircraftType?: string
arrivalAirport: Airport
connectionId: string
departureAirport: Airport
flightNumber: string
travelClass: "economy" | "business" | "first_class"
FlightSchedule
FlightSchedule: { arrivalTime?: string; boardingTime?: string; departureTime: string }
Type declaration
Optional arrivalTime?: string
Optional boardingTime?: string
departureTime: string
GreetingConfig
GreetingConfig: { locale: string; text: string }
Type declaration
locale: string
text: string
IceBreaker
IceBreaker: { payload: string; question: string }
Type declaration
payload: string
question: string
InsightMetric
InsightMetric: "page_messages_blocked_conversations_unique" | "page_messages_reported_conversations_unique" | "page_messages_total_messaging_connections" | "page_messages_new_conversations_unique"
InsightOptions
InsightOptions: { since?: number; until?: number }
Type declaration
Optional since?: number
Optional until?: number
MediaAttachmentType
MediaAttachmentType: "audio" | "video" | "image" | "file"
MediaElement
Media
Element
: { attachmentId
?: string; buttons
?: TemplateButton[]; mediaType
: "image" | "video"; url
?: string }Type declaration
Optional attachmentId?: string
mediaType: "image" | "video"
Optional url?: string
MessageTag
MessageTag: "CONFIRMED_EVENT_UPDATE" | "POST_PURCHASE_UPDATE" | "ACCOUNT_UPDATE" | "HUMAN_AGENT"
MessageTagResponse
Message
Tag
Response
: { description
: string; tag
: MessageTag }[]MessagingFeatureReview
MessagingFeatureReview: { feature: string; status: "pending" | "rejected" | "approved" | "limited" }
Type declaration
feature: string
status: "pending" | "rejected" | "approved" | "limited"
MessagingType
MessagingType: "RESPONSE" | "UPDATE" | "MESSAGE_TAG" | "NON_PROMOTIONAL_SUBSCRIPTION"
MessengerNLPConfig
MessengerNLPConfig
: { customToken
?: string; model
?: Model; nBest
?: number; nlpEnabled
?: boolean; verbose
?: boolean }Type declaration
Optional customToken?: string
Optional model?: Model
Optional nBest?: number
Optional nlpEnabled?: boolean
Optional verbose?: boolean
MessengerProfile
Messenger
Profile
: { accountLinkingUrl
?: string; getStarted
?: { payload
: string }; greeting
?: { locale
: string; text
: string }[]; homeUrl
?: { inTest
: boolean; url
: string; webviewHeightRatio
: "tall"; webviewShareButton
?: "hide" | "show" }; iceBreakers
?: IceBreaker[]; paymentSettings
?: { privacyUrl
?: string; publicKey
?: string; testUsers
?: string[] }; persistentMenu
?: PersistentMenu; whitelistedDomains
?: string[] }Type declaration
Optional accountLinkingUrl?: string
Optional getStarted?: { payload: string }
Optional greeting?: { locale: string; text: string }[]
Optional homeUrl?: { inTest: boolean; url: string; webviewHeightRatio: "tall"; webviewShareButton?: "hide" | "show" }
inTest: boolean
url: string
webviewHeightRatio: "tall"
Optional webviewShareButton?: "hide" | "show"
Optional iceBreakers?: IceBreaker[]
Optional paymentSettings?: { privacyUrl?: string; publicKey?: string; testUsers?: string[] }
Optional privacyUrl?: string
Optional publicKey?: string
Optional testUsers?: string[]
Optional whitelistedDomains?: string[]
MessengerSubscription
Messenger
Subscription
: { active
: boolean; callbackUrl
: string; fields
: SubscriptionFields[]; object
: string }Type declaration
active: boolean
callbackUrl: string
object: string
Model
Model: "CUSTOM" | "CHINESE" | "CROATIAN" | "DANISH" | "DUTCH" | "ENGLISH" | "FRENCH_STANDARD" | "GERMAN_STANDARD" | "HEBREW" | "HUNGARIAN" | "IRISH" | "ITALIAN_STANDARD" | "KOREAN" | "NORWEGIAN_BOKMAL" | "POLISH" | "PORTUGUESE" | "ROMANIAN" | "SPANISH" | "SWEDISH" | "VIETNAMESE"
MutationSuccessResponse
MutationSuccessResponse: { result: string }
OneTimeNotifReqAttributes
OneTimeNotifReqAttributes: { payload: string; title: string }
Type declaration
payload: string
title: string
PageInfo
PageInfo: { id: string; name: string }
PassengerInfo
PassengerInfo: { name: string; passengerId: string; ticketNumber?: string }
Type declaration
name: string
passengerId: string
Optional ticketNumber?: string
PassengerSegmentInfo
Passenger
Segment
Info
: { passengerId
: string; productInfo
?: ProductInfo[]; seat
: string; seatType
: string; segmentId
: string }Type declaration
passengerId: string
Optional productInfo?: ProductInfo[]
seat: string
seatType: string
segmentId: string
PersistentMenuItem
Persistent
Menu
Item
: { callToActions
: MenuItem[]; composerInputDisabled
: boolean; locale
: string }Type declaration
callToActions: MenuItem[]
composerInputDisabled: boolean
locale: string
Persona
Persona: { name: string; profilePictureUrl: string }
Type declaration
name: string
profilePictureUrl: string
PriceInfo
PriceInfo: { amount: string; currency?: string; title: string }
Type declaration
amount: string
Optional currency?: string
title: string
ProductInfo
ProductInfo: { title: string; value: string }
Type declaration
title: string
value: string
ReceiptAttributes
Receipt
Attributes
: { address
?: Address; adjustments
?: Adjustment[]; currency
: string; elements
?: ReceiptElement[]; merchantName
?: string; orderNumber
: string; orderUrl
?: string; paymentMethod
: string; recipientName
: string; summary
: Summary; timestamp
?: string }Type declaration
Optional address?: Address
Optional adjustments?: Adjustment[]
currency: string
Optional merchantName?: string
orderNumber: string
Optional orderUrl?: string
paymentMethod: string
recipientName: string
Optional timestamp?: string
ReceiptElement
ReceiptElement: { currency?: string; imageUrl: string; price: number; quantity?: number; subtitle?: string; title: string }
Type declaration
Optional currency?: string
imageUrl: string
price: number
Optional quantity?: number
Optional subtitle?: string
title: string
RecipientWithCommentId
RecipientWithCommentId: { commentId: string }
RecipientWithID
RecipientWithID: { id: string }
RecipientWithOneTimeNotifToken
RecipientWithOneTimeNotifToken: { oneTimeNotifToken: string }
Type declaration
oneTimeNotifToken: string
RecipientWithPhoneNumber
RecipientWithPhoneNumber: { name?: Record<string, any>; phoneNumber: string }
Type declaration
Optional name?: Record<string, any>
phoneNumber: string
RecipientWithPostId
RecipientWithPostId: { postId: string }
RecipientWithUserRef
RecipientWithUserRef: { userRef: string }
SendMessageSuccessResponse
SendMessageSuccessResponse: { messageId: string; recipientId: string }
Type declaration
messageId: string
recipientId: string
SendOption
Type declaration
Optional personaId?: string
Optional quickReplies?: QuickReply[]
SendSenderActionResponse
SendSenderActionResponse: { recipientId: string }
SenderAction
SenderAction: "mark_seen" | "typing_on" | "typing_off"
SenderActionOption
SenderActionOption: { personaId?: string }
Type declaration
Optional personaId?: string
SubscriptionFields
SubscriptionFields: { name: string; version: string }
Type declaration
name: string
version: string
Summary
Summary: { shippingCost?: number; subtotal?: number; totalCost: number; totalTax?: number }
Type declaration
Optional shippingCost?: number
Optional subtotal?: number
totalCost: number
Optional totalTax?: number
TemplateAttachmentPayload
TemplateAttachmentPayload: { templateType: "button" | "generic" | "media" | "receipt" | "airline_boardingpass" | "airline_checkin" | "airline_itinerary" | "airline_update" | "one_time_notif_req" }
Type declaration
[key: string]: any
templateType: "button" | "generic" | "media" | "receipt" | "airline_boardingpass" | "airline_checkin" | "airline_itinerary" | "airline_update" | "one_time_notif_req"
TemplateButton
TemplateButton: { payload?: string; title: string; type: string; url?: string; webviewHeightRatio?: "compact" | "tall" | "full" }
Type declaration
Optional payload?: string
title: string
type: string
Optional url?: string
Optional webviewHeightRatio?: "compact" | "tall" | "full"
TemplateElement
Template
Element
: { buttons
?: TemplateButton[]; defaultAction
?: { fallbackUrl
?: string; messengerExtensions
?: boolean; type
: string; url
: string; webviewHeightRatio
?: string }; imageUrl
?: string; subtitle
?: string; title
: string }Type declaration
Optional defaultAction?: { fallbackUrl?: string; messengerExtensions?: boolean; type: string; url: string; webviewHeightRatio?: string }
Optional fallbackUrl?: string
Optional messengerExtensions?: boolean
type: string
url: string
Optional webviewHeightRatio?: string
Optional imageUrl?: string
Optional subtitle?: string
title: string
TextMessage
Text
Message
: { quickReplies
?: QuickReply[]; text
?: string }Type declaration
Optional quickReplies?: QuickReply[]
Optional text?: string
TextQuickReply
TextQuickReply: { contentType: "text"; imageUrl?: string; payload: string; title: string }
Type declaration
contentType: "text"
Optional imageUrl?: string
payload: string
title: string
TokenInfo
TokenInfo: { appId: string; application: string; dataAccessExpiresAt: number; expiresAt: number; isValid: true; issuedAt?: number; profileId: string; scopes: Scope[]; type: "PAGE" | "APP" | "USER"; userId: string }
Type declaration
appId: string
application: string
dataAccessExpiresAt: number
expiresAt: number
isValid: true
Optional issuedAt?: number
profileId: string
scopes: Scope[]
type: "PAGE" | "APP" | "USER"
userId: string
UploadOption
UploadOption: { filename?: string; isReusable?: boolean }
Type declaration
Optional filename?: string
Optional isReusable?: boolean
UrlMediaAttachmentPayload
UrlMediaAttachmentPayload: { isReusable?: boolean; url: string }
Type declaration
Optional isReusable?: boolean
url: string
User
User: { firstName: string; gender?: string; id: string; lastName: string; locale?: string; name: string; profilePic: string; timezone?: number }
Type declaration
firstName: string
Optional gender?: string
id: string
lastName: string
Optional locale?: string
name: string
profilePic: string
Optional timezone?: number
UserEmailQuickReply
UserEmailQuickReply: { contentType: "user_email" }
Type declaration
contentType: "user_email"
UserPhoneNumberQuickReply
UserPhoneNumberQuickReply: { contentType: "user_phone_number" }
Type declaration
contentType: "user_phone_number"
UserProfileField
UserProfileField: "id" | "name" | "first_name" | "last_name" | "profile_pic" | "locale" | "timezone" | "gender"
Description of the message recipient. If a string is provided, it will be recognized as a psid.