Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

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

AirlineBoardingPassAttributes: { boardingPass: BoardingPass[]; introMessage: string; locale: string }

Type declaration

  • boardingPass: BoardingPass[]
  • introMessage: string
  • locale: string

AirlineCheckinAttributes

AirlineCheckinAttributes: { checkinUrl: string; flightInfo: FlightInfo[]; introMessage: string; locale: string; pnrNumber?: string }

Type declaration

  • checkinUrl: string
  • flightInfo: FlightInfo[]
  • introMessage: string
  • locale: string
  • Optional pnrNumber?: string

AirlineItineraryAttributes

AirlineItineraryAttributes: { 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
  • flightInfo: FlightInfo[]
  • introMessage: string
  • locale: string
  • passengerInfo: PassengerInfo[]
  • passengerSegmentInfo: PassengerSegmentInfo[]
  • pnrNumber: string
  • Optional priceInfo?: PriceInfo[]
  • Optional tax?: string
  • Optional themeColor?: string
  • totalPrice: string

AirlineUpdateAttributes

AirlineUpdateAttributes: { 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
  • updateFlightInfo: UpdateFlightInfo
  • 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

Attachment

AttachmentIdAttachmentPayload

AttachmentIdAttachmentPayload: { attachmentId: string }

Type declaration

  • attachmentId: string

AttachmentMessage

AttachmentMessage: { attachment?: Attachment; quickReplies?: QuickReply[] }

Type declaration

BatchItem

BatchItem: { body?: Record<string, any>; method: string; name?: string; relativeUrl: string; responseAccessPath?: string } & BatchRequestOptions

BatchRequestOptions

BatchRequestOptions: { dependsOn?: string; name?: string; omitResponseOnSuccess?: boolean }

Type declaration

  • Optional dependsOn?: string
  • Optional name?: string
  • Optional omitResponseOnSuccess?: boolean

BoardingPass

BoardingPass: { 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
  • flightInfo: FlightInfo
  • 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

FileDataMediaAttachment

FileDataMediaAttachment: { payload: FileDataAttachmentPayload; type: MediaAttachmentType }

Type declaration

FileDataMediaAttachmentMessage

FileDataMediaAttachmentMessage: { attachment: FileDataMediaAttachment; quickReplies?: QuickReply[] }

Type declaration

FlightInfo

FlightInfo: { aircraftType?: string; arrivalAirport: Airport; connectionId: string; departureAirport: Airport; flightNumber: string; flightSchedule: FlightSchedule; segmentId: string | PassengerSegmentInfo; travelClass: "economy" | "business" | "first_class" }

Type declaration

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

MediaAttachment

MediaAttachment: { payload: MediaAttachmentPayload; type: MediaAttachmentType }

Type declaration

MediaAttachmentPayload

MediaAttachmentType

MediaAttachmentType: "audio" | "video" | "image" | "file"

MediaElement

MediaElement: { attachmentId?: string; buttons?: TemplateButton[]; mediaType: "image" | "video"; url?: string }

Type declaration

  • Optional attachmentId?: string
  • Optional buttons?: TemplateButton[]
  • mediaType: "image" | "video"
  • Optional url?: string

MenuItem

MenuItem: TemplateButton

Message

MessageTag

MessageTag: "CONFIRMED_EVENT_UPDATE" | "POST_PURCHASE_UPDATE" | "ACCOUNT_UPDATE" | "HUMAN_AGENT"

MessageTagResponse

MessageTagResponse: { 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

MessengerProfile: { 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 }
    • 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 persistentMenu?: PersistentMenu
  • Optional whitelistedDomains?: string[]

MessengerProfileResponse

MessengerProfileResponse: { data: MessengerProfile[] }

Type declaration

MessengerSubscription

MessengerSubscription: { active: boolean; callbackUrl: string; fields: SubscriptionFields[]; object: string }

Type declaration

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 }

Type declaration

  • result: string

OneTimeNotifReqAttributes

OneTimeNotifReqAttributes: { payload: string; title: string }

Type declaration

  • payload: string
  • title: string

PageInfo

PageInfo: { id: string; name: string }

Type declaration

  • id: string
  • name: string

PassengerInfo

PassengerInfo: { name: string; passengerId: string; ticketNumber?: string }

Type declaration

  • name: string
  • passengerId: string
  • Optional ticketNumber?: string

PassengerSegmentInfo

PassengerSegmentInfo: { passengerId: string; productInfo?: ProductInfo[]; seat: string; seatType: string; segmentId: string }

Type declaration

  • passengerId: string
  • Optional productInfo?: ProductInfo[]
  • seat: string
  • seatType: string
  • segmentId: string

PersistentMenu

PersistentMenu: PersistentMenuItem[]

PersistentMenuItem

PersistentMenuItem: { 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

PsidOrRecipient

PsidOrRecipient: string | Recipient

Description of the message recipient. If a string is provided, it will be recognized as a psid.

QuickReply

ReceiptAttributes

ReceiptAttributes: { 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 elements?: ReceiptElement[]
  • Optional merchantName?: string
  • orderNumber: string
  • Optional orderUrl?: string
  • paymentMethod: string
  • recipientName: string
  • summary: Summary
  • 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

Recipient

Description of the message recipient. All requests must include one to identify the recipient.

RecipientWithCommentId

RecipientWithCommentId: { commentId: string }

Used for Private Replies to reference the post comment to reply to.

Type declaration

  • commentId: string

RecipientWithID

RecipientWithID: { id: string }

Page Scoped User ID (PSID) of the message recipient.

Type declaration

  • id: string

RecipientWithOneTimeNotifToken

RecipientWithOneTimeNotifToken: { oneTimeNotifToken: string }

Used for the Messenger Platform's One-Time Notification API.

Type declaration

  • oneTimeNotifToken: string

RecipientWithPhoneNumber

RecipientWithPhoneNumber: { name?: Record<string, any>; phoneNumber: string }

Used for Customer Matching. (Closed Beta)

Type declaration

  • Optional name?: Record<string, any>
  • phoneNumber: string

RecipientWithPostId

RecipientWithPostId: { postId: string }

Used for Private Replies to reference the visitor post to reply to.

Type declaration

  • postId: string

RecipientWithUserRef

RecipientWithUserRef: { userRef: string }

Used for the checkbox plugin.

Type declaration

  • userRef: string

SendMessageSuccessResponse

SendMessageSuccessResponse: { messageId: string; recipientId: string }

Type declaration

  • messageId: string
  • recipientId: string

SendOption

SendOption: { messagingType?: MessagingType; personaId?: string; quickReplies?: QuickReply[]; tag?: MessageTag }

Type declaration

SendSenderActionResponse

SendSenderActionResponse: { recipientId: string }

Type declaration

  • 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

TemplateAttachment

TemplateAttachment: { payload: TemplateAttachmentPayload; type: "template" }

Type declaration

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

TemplateElement: { buttons?: TemplateButton[]; defaultAction?: { fallbackUrl?: string; messengerExtensions?: boolean; type: string; url: string; webviewHeightRatio?: string }; imageUrl?: string; subtitle?: string; title: string }

Type declaration

  • Optional buttons?: TemplateButton[]
  • 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

TextMessage: { 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

UpdateFlightInfo

UpdateFlightInfo: { arrivalAirport: Airport; departureAirport: Airport; flightNumber: string; flightSchedule: FlightSchedule }

Type declaration

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 }

The User Profile API allows you to use a Page-scoped ID (PSID) to retrieve user profile information in this format

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"

UserPersistentMenu

UserPersistentMenu: { pageLevelPersistentMenu?: PersistentMenu; userLevelPersistentMenu?: PersistentMenu }

Type declaration

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"

Fields can be retrieved from a person's profile information

Generated using TypeDoc