New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

messaging-api-messenger

Package Overview
Dependencies
Maintainers
3
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

messaging-api-messenger - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

dist/browser.d.ts

@@ -1,4 +0,4 @@

import Messenger from './Messenger';
import MessengerBatch from './MessengerBatch';
export { Messenger, MessengerBatch };
export { default as Messenger } from './Messenger';
export { default as MessengerBatch } from './MessengerBatch';
export * as MessengerTypes from './MessengerTypes';
//# sourceMappingURL=browser.d.ts.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessengerBatch = exports.Messenger = void 0;
const Messenger_1 = __importDefault(require("./Messenger"));
exports.Messenger = Messenger_1.default;
const MessengerBatch_1 = __importDefault(require("./MessengerBatch"));
exports.MessengerBatch = MessengerBatch_1.default;
var Messenger_1 = require("./Messenger");
Object.defineProperty(exports, "Messenger", { enumerable: true, get: function () { return Messenger_1.default; } });
var MessengerBatch_1 = require("./MessengerBatch");
Object.defineProperty(exports, "MessengerBatch", { enumerable: true, get: function () { return MessengerBatch_1.default; } });
exports.MessengerTypes = __importStar(require("./MessengerTypes"));
//# sourceMappingURL=browser.js.map

@@ -1,6 +0,5 @@

import Messenger from './Messenger';
import MessengerBatch from './MessengerBatch';
import MessengerClient from './MessengerClient';
import type { MessengerTypes } from './MessengerTypes';
export { Messenger, MessengerBatch, MessengerClient, MessengerTypes };
export { default as Messenger } from './Messenger';
export { default as MessengerBatch } from './MessengerBatch';
export { default as MessengerClient } from './MessengerClient';
export * as MessengerTypes from './MessengerTypes';
//# sourceMappingURL=index.d.ts.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessengerClient = exports.MessengerBatch = exports.Messenger = void 0;
const Messenger_1 = __importDefault(require("./Messenger"));
exports.Messenger = Messenger_1.default;
const MessengerBatch_1 = __importDefault(require("./MessengerBatch"));
exports.MessengerBatch = MessengerBatch_1.default;
const MessengerClient_1 = __importDefault(require("./MessengerClient"));
exports.MessengerClient = MessengerClient_1.default;
var Messenger_1 = require("./Messenger");
Object.defineProperty(exports, "Messenger", { enumerable: true, get: function () { return Messenger_1.default; } });
var MessengerBatch_1 = require("./MessengerBatch");
Object.defineProperty(exports, "MessengerBatch", { enumerable: true, get: function () { return MessengerBatch_1.default; } });
var MessengerClient_1 = require("./MessengerClient");
Object.defineProperty(exports, "MessengerClient", { enumerable: true, get: function () { return MessengerClient_1.default; } });
exports.MessengerTypes = __importStar(require("./MessengerTypes"));
//# sourceMappingURL=index.js.map
import FormData from 'form-data';
import type { MessengerTypes } from './MessengerTypes';
import * as MessengerTypes from './MessengerTypes';
declare function createMessage(payload: MessengerTypes.Message, options?: {

@@ -4,0 +4,0 @@ quickReplies?: MessengerTypes.QuickReply[];

@@ -1,2 +0,2 @@

import type { MessengerTypes } from './MessengerTypes';
import * as MessengerTypes from './MessengerTypes';
declare function sendRequest(body: object, options?: MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;

@@ -3,0 +3,0 @@ declare function sendMessage(psidOrRecipient: MessengerTypes.PsidOrRecipient, msg: MessengerTypes.Message, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;

/// <reference types="node" />
import fs from 'fs';
import { OnRequestFunction } from 'messaging-api-common';
export declare namespace MessengerTypes {
export type ClientConfig = {
accessToken: string;
appId?: string;
appSecret?: string;
version?: string;
origin?: string;
onRequest?: OnRequestFunction;
skipAppSecretProof?: boolean;
};
/**
* Page Scoped User ID (PSID) of the message recipient.
*/
export type RecipientWithID = {
id: string;
};
/**
* Used for Customer Matching. (Closed Beta)
*/
export type RecipientWithPhoneNumber = {
phoneNumber: string;
name?: Record<string, any>;
};
/**
* Used for the checkbox plugin.
*/
export type RecipientWithUserRef = {
userRef: string;
};
/**
* Used for Private Replies to reference the visitor post to reply to.
*/
export type RecipientWithPostId = {
postId: string;
};
/**
* Used for Private Replies to reference the post comment to reply to.
*/
export type RecipientWithCommentId = {
commentId: string;
};
/**
* Used for the Messenger Platform's One-Time Notification API.
*/
export type RecipientWithOneTimeNotifToken = {
oneTimeNotifToken: string;
};
/**
* Description of the message recipient. All requests must include one to identify the recipient.
*/
export type Recipient = RecipientWithID | RecipientWithPhoneNumber | RecipientWithUserRef | RecipientWithPostId | RecipientWithCommentId | RecipientWithOneTimeNotifToken;
/**
* Description of the message recipient. If a string is provided, it will be recognized as a psid.
*/
export type PsidOrRecipient = string | Recipient;
export type UrlMediaAttachmentPayload = {
export declare type ClientConfig = {
accessToken: string;
appId?: string;
appSecret?: string;
version?: string;
origin?: string;
onRequest?: OnRequestFunction;
skipAppSecretProof?: boolean;
};
/**
* Page Scoped User ID (PSID) of the message recipient.
*/
export declare type RecipientWithID = {
id: string;
};
/**
* Used for Customer Matching. (Closed Beta)
*/
export declare type RecipientWithPhoneNumber = {
phoneNumber: string;
name?: Record<string, any>;
};
/**
* Used for the checkbox plugin.
*/
export declare type RecipientWithUserRef = {
userRef: string;
};
/**
* Used for Private Replies to reference the visitor post to reply to.
*/
export declare type RecipientWithPostId = {
postId: string;
};
/**
* Used for Private Replies to reference the post comment to reply to.
*/
export declare type RecipientWithCommentId = {
commentId: string;
};
/**
* Used for the Messenger Platform's One-Time Notification API.
*/
export declare type RecipientWithOneTimeNotifToken = {
oneTimeNotifToken: string;
};
/**
* Description of the message recipient. All requests must include one to identify the recipient.
*/
export declare type Recipient = RecipientWithID | RecipientWithPhoneNumber | RecipientWithUserRef | RecipientWithPostId | RecipientWithCommentId | RecipientWithOneTimeNotifToken;
/**
* Description of the message recipient. If a string is provided, it will be recognized as a psid.
*/
export declare type PsidOrRecipient = string | Recipient;
export declare type UrlMediaAttachmentPayload = {
url: string;
isReusable?: boolean;
};
export declare type AttachmentIdAttachmentPayload = {
attachmentId: string;
};
export declare type MediaAttachmentPayload = UrlMediaAttachmentPayload | AttachmentIdAttachmentPayload;
export declare type MediaAttachmentType = 'audio' | 'video' | 'image' | 'file';
export declare type FileDataAttachmentPayload = {
isReusable?: boolean;
};
export declare type FileDataMediaAttachment = {
type: MediaAttachmentType;
payload: FileDataAttachmentPayload;
};
export declare type FileDataMediaAttachmentMessage = {
attachment: FileDataMediaAttachment;
quickReplies?: QuickReply[];
};
export declare type MediaAttachment = {
type: MediaAttachmentType;
payload: MediaAttachmentPayload;
};
export declare type TemplateAttachmentPayload = {
templateType: 'button' | 'generic' | 'media' | 'receipt' | 'airline_boardingpass' | 'airline_checkin' | 'airline_itinerary' | 'airline_update' | 'one_time_notif_req';
[key: string]: any;
};
export declare type TemplateAttachment = {
type: 'template';
payload: TemplateAttachmentPayload;
};
export declare type Attachment = MediaAttachment | TemplateAttachment;
export declare type TextQuickReply = {
contentType: 'text';
title: string;
payload: string;
imageUrl?: string;
};
export declare type UserPhoneNumberQuickReply = {
contentType: 'user_phone_number';
};
export declare type UserEmailQuickReply = {
contentType: 'user_email';
};
export declare type QuickReply = TextQuickReply | UserPhoneNumberQuickReply | UserEmailQuickReply;
export declare type TextMessage = {
text?: string;
quickReplies?: QuickReply[];
};
export declare type AttachmentMessage = {
attachment?: Attachment;
quickReplies?: QuickReply[];
};
export declare type Message = TextMessage | AttachmentMessage;
export declare type MessagingType = 'RESPONSE' | 'UPDATE' | 'MESSAGE_TAG' | 'NON_PROMOTIONAL_SUBSCRIPTION';
export declare type MessageTag = 'CONFIRMED_EVENT_UPDATE' | 'POST_PURCHASE_UPDATE' | 'ACCOUNT_UPDATE' | 'HUMAN_AGENT';
export declare type InsightMetric = 'page_messages_blocked_conversations_unique' | 'page_messages_reported_conversations_unique' | 'page_messages_total_messaging_connections' | 'page_messages_new_conversations_unique';
export declare type InsightOptions = {
since?: number;
until?: number;
};
export declare type SendOption = {
messagingType?: MessagingType;
tag?: MessageTag;
quickReplies?: QuickReply[];
};
export declare type UploadOption = {
filename?: string;
isReusable?: boolean;
};
export declare type TemplateButton = {
type: string;
title: string;
url?: string;
payload?: string;
webviewHeightRatio?: 'compact' | 'tall' | 'full';
};
export declare type MenuItem = TemplateButton;
export declare type TemplateElement = {
title: string;
imageUrl: string;
subtitle: string;
defaultAction: {
type: string;
url: string;
isReusable?: boolean;
messengerExtensions: boolean;
webviewHeightRatio: string;
fallbackUrl: string;
};
export type AttachmentIdAttachmentPayload = {
attachmentId: string;
};
export type MediaAttachmentPayload = UrlMediaAttachmentPayload | AttachmentIdAttachmentPayload;
export type MediaAttachmentType = 'audio' | 'video' | 'image' | 'file';
export type FileDataAttachmentPayload = {
isReusable?: boolean;
};
export type FileDataMediaAttachment = {
type: MediaAttachmentType;
payload: FileDataAttachmentPayload;
};
export type FileDataMediaAttachmentMessage = {
attachment: FileDataMediaAttachment;
quickReplies?: QuickReply[];
};
export type MediaAttachment = {
type: MediaAttachmentType;
payload: MediaAttachmentPayload;
};
export type TemplateAttachmentPayload = {
templateType: 'button' | 'generic' | 'media' | 'receipt' | 'airline_boardingpass' | 'airline_checkin' | 'airline_itinerary' | 'airline_update' | 'one_time_notif_req';
[key: string]: any;
};
export type TemplateAttachment = {
type: 'template';
payload: TemplateAttachmentPayload;
};
export type Attachment = MediaAttachment | TemplateAttachment;
export type TextQuickReply = {
contentType: 'text';
title: string;
buttons: TemplateButton[];
};
export declare type MediaElement = {
mediaType: 'image' | 'video';
attachmentId?: string;
url?: string;
buttons?: TemplateButton[];
};
export declare type Address = {
street1: string;
street2?: string;
city: string;
postalCode: string;
state: string;
country: string;
};
export declare type Summary = {
subtotal?: number;
shippingCost?: number;
totalTax?: number;
totalCost: number;
};
export declare type Adjustment = {
name?: string;
amount?: number;
};
export declare type ReceiptElement = {
title: string;
subtitle?: string;
quantity?: number;
price: number;
currency?: string;
imageUrl: string;
};
export declare type ReceiptAttributes = {
recipientName: string;
merchantName?: string;
orderNumber: string;
currency: string;
paymentMethod: string;
timestamp?: string;
orderUrl?: string;
elements?: ReceiptElement[];
address?: Address;
summary: Summary;
adjustments?: Adjustment[];
};
export declare type Airport = {
airportCode: string;
city: string;
terminal?: string;
gate?: string;
};
export declare type FlightSchedule = {
boardingTime?: string;
departureTime: string;
arrivalTime?: string;
};
export declare type FlightInfo = {
connectionId: string;
segmentId: string | PassengerSegmentInfo;
flightNumber: string;
aircraftType?: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
travelClass: 'economy' | 'business' | 'first_class';
};
export declare type Field = {
label: string;
value: string;
};
export declare type BoardingPass = {
passengerName: string;
pnrNumber: string;
travelClass?: string;
seat?: string;
auxiliaryFields?: Field[];
secondaryFields?: Field[];
logoImageUrl: string;
headerImageUrl?: string;
headerTextField?: Field;
qrCode?: string;
barcodeImageUrl?: string;
aboveBarCodeImageUrl: string;
flightInfo: FlightInfo;
};
export declare type AirlineBoardingPassAttributes = {
introMessage: string;
locale: string;
boardingPass: BoardingPass[];
};
export declare type PassengerInfo = {
passengerId: string;
ticketNumber?: string;
name: string;
};
export declare type ProductInfo = {
title: string;
value: string;
};
export declare type PassengerSegmentInfo = {
segmentId: string;
passengerId: string;
seat: string;
seatType: string;
productInfo?: ProductInfo[];
};
export declare type PriceInfo = {
title: string;
amount: string;
currency?: string;
};
export declare type AirlineCheckinAttributes = {
introMessage: string;
locale: string;
pnrNumber?: string;
checkinUrl: string;
flightInfo: FlightInfo[];
};
export declare type AirlineItineraryAttributes = {
introMessage: string;
locale: string;
themeColor?: string;
pnrNumber: string;
passengerInfo: PassengerInfo[];
flightInfo: FlightInfo[];
passengerSegmentInfo: PassengerSegmentInfo[];
priceInfo?: PriceInfo[];
basePrice?: string;
tax?: string;
totalPrice: string;
currency: string;
};
export declare type UpdateFlightInfo = {
flightNumber: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
};
export declare type AirlineUpdateAttributes = {
introMessage: string;
themeColor?: string;
updateType: 'delay' | 'gate_change' | 'cancellation';
locale: string;
pnrNumber?: string;
updateFlightInfo: UpdateFlightInfo;
};
export declare type OneTimeNotifReqAttributes = {
title: string;
payload: string;
};
export declare type SenderAction = 'mark_seen' | 'typing_on' | 'typing_off';
/**
* Fields can be retrieved from a person's profile information
*/
export declare type UserProfileField = 'id' | 'name' | 'first_name' | 'last_name' | 'profile_pic' | 'locale' | 'timezone' | 'gender';
/**
* The User Profile API allows you to use a Page-scoped ID (PSID) to retrieve user profile information in this format
*/
export declare type User = {
id: string;
name: string;
firstName: string;
lastName: string;
profilePic: string;
locale?: string;
timezone?: number;
gender?: string;
};
export declare type PersistentMenuItem = {
locale: string;
composerInputDisabled: boolean;
callToActions: MenuItem[];
};
export declare type PersistentMenu = PersistentMenuItem[];
export declare type GreetingConfig = {
locale: string;
text: string;
};
export declare type IceBreaker = {
question: string;
payload: string;
};
export declare type UserPersistentMenu = {
userLevelPersistentMenu?: PersistentMenu;
pageLevelPersistentMenu?: PersistentMenu;
};
export declare type MessengerProfile = {
getStarted?: {
payload: string;
imageUrl?: string;
};
export type UserPhoneNumberQuickReply = {
contentType: 'user_phone_number';
};
export type UserEmailQuickReply = {
contentType: 'user_email';
};
export type QuickReply = TextQuickReply | UserPhoneNumberQuickReply | UserEmailQuickReply;
export type TextMessage = {
text?: string;
quickReplies?: QuickReply[];
};
export type AttachmentMessage = {
attachment?: Attachment;
quickReplies?: QuickReply[];
};
export type Message = TextMessage | AttachmentMessage;
export type MessagingType = 'RESPONSE' | 'UPDATE' | 'MESSAGE_TAG' | 'NON_PROMOTIONAL_SUBSCRIPTION';
export type MessageTag = 'CONFIRMED_EVENT_UPDATE' | 'POST_PURCHASE_UPDATE' | 'ACCOUNT_UPDATE' | 'HUMAN_AGENT';
export type InsightMetric = 'page_messages_blocked_conversations_unique' | 'page_messages_reported_conversations_unique' | 'page_messages_total_messaging_connections' | 'page_messages_new_conversations_unique';
export type InsightOptions = {
since?: number;
until?: number;
};
export type SendOption = {
messagingType?: MessagingType;
tag?: MessageTag;
quickReplies?: QuickReply[];
};
export type UploadOption = {
filename?: string;
isReusable?: boolean;
};
export type TemplateButton = {
type: string;
title: string;
url?: string;
payload?: string;
webviewHeightRatio?: 'compact' | 'tall' | 'full';
};
export type MenuItem = TemplateButton;
export type TemplateElement = {
title: string;
imageUrl: string;
subtitle: string;
defaultAction: {
type: string;
url: string;
messengerExtensions: boolean;
webviewHeightRatio: string;
fallbackUrl: string;
};
buttons: TemplateButton[];
};
export type MediaElement = {
mediaType: 'image' | 'video';
attachmentId?: string;
url?: string;
buttons?: TemplateButton[];
};
export type Address = {
street1: string;
street2?: string;
city: string;
postalCode: string;
state: string;
country: string;
};
export type Summary = {
subtotal?: number;
shippingCost?: number;
totalTax?: number;
totalCost: number;
};
export type Adjustment = {
name?: string;
amount?: number;
};
export type ReceiptElement = {
title: string;
subtitle?: string;
quantity?: number;
price: number;
currency?: string;
imageUrl: string;
};
export type ReceiptAttributes = {
recipientName: string;
merchantName?: string;
orderNumber: string;
currency: string;
paymentMethod: string;
timestamp?: string;
orderUrl?: string;
elements?: ReceiptElement[];
address?: Address;
summary: Summary;
adjustments?: Adjustment[];
};
export type Airport = {
airportCode: string;
city: string;
terminal?: string;
gate?: string;
};
export type FlightSchedule = {
boardingTime?: string;
departureTime: string;
arrivalTime?: string;
};
export type FlightInfo = {
connectionId: string;
segmentId: string | PassengerSegmentInfo;
flightNumber: string;
aircraftType?: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
travelClass: 'economy' | 'business' | 'first_class';
};
export type Field = {
label: string;
value: string;
};
export type BoardingPass = {
passengerName: string;
pnrNumber: string;
travelClass?: string;
seat?: string;
auxiliaryFields?: Field[];
secondaryFields?: Field[];
logoImageUrl: string;
headerImageUrl?: string;
headerTextField?: Field;
qrCode?: string;
barcodeImageUrl?: string;
aboveBarCodeImageUrl: string;
flightInfo: FlightInfo;
};
export type AirlineBoardingPassAttributes = {
introMessage: string;
persistentMenu?: PersistentMenu;
greeting?: {
locale: string;
boardingPass: BoardingPass[];
};
export type PassengerInfo = {
passengerId: string;
ticketNumber?: string;
name: string;
};
export type ProductInfo = {
title: string;
value: string;
};
export type PassengerSegmentInfo = {
segmentId: string;
passengerId: string;
seat: string;
seatType: string;
productInfo?: ProductInfo[];
};
export type PriceInfo = {
title: string;
amount: string;
currency?: string;
};
export type AirlineCheckinAttributes = {
introMessage: string;
locale: string;
pnrNumber?: string;
checkinUrl: string;
flightInfo: FlightInfo[];
};
export type AirlineItineraryAttributes = {
introMessage: string;
locale: string;
themeColor?: string;
pnrNumber: string;
passengerInfo: PassengerInfo[];
flightInfo: FlightInfo[];
passengerSegmentInfo: PassengerSegmentInfo[];
priceInfo?: PriceInfo[];
basePrice?: string;
tax?: string;
totalPrice: string;
currency: string;
};
export type UpdateFlightInfo = {
flightNumber: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
};
export type AirlineUpdateAttributes = {
introMessage: string;
themeColor?: string;
updateType: 'delay' | 'gate_change' | 'cancellation';
locale: string;
pnrNumber?: string;
updateFlightInfo: UpdateFlightInfo;
};
export type OneTimeNotifReqAttributes = {
title: string;
payload: string;
};
export type SenderAction = 'mark_seen' | 'typing_on' | 'typing_off';
/**
* Fields can be retrieved from a person's profile information
*/
export type UserProfileField = 'id' | 'name' | 'first_name' | 'last_name' | 'profile_pic' | 'locale' | 'timezone' | 'gender';
/**
* The User Profile API allows you to use a Page-scoped ID (PSID) to retrieve user profile information in this format
*/
export type User = {
id: string;
name: string;
firstName: string;
lastName: string;
profilePic: string;
locale?: string;
timezone?: number;
gender?: string;
};
export type PersistentMenuItem = {
locale: string;
composerInputDisabled: boolean;
callToActions: MenuItem[];
};
export type PersistentMenu = PersistentMenuItem[];
export type GreetingConfig = {
locale: string;
text: string;
};
export type IceBreaker = {
question: string;
payload: string;
};
export type UserPersistentMenu = {
userLevelPersistentMenu?: PersistentMenu;
pageLevelPersistentMenu?: PersistentMenu;
};
export type MessengerProfile = {
getStarted?: {
payload: string;
};
persistentMenu?: PersistentMenu;
greeting?: {
locale: string;
text: string;
}[];
iceBreakers?: IceBreaker[];
whitelistedDomains?: string[];
accountLinkingUrl?: string;
paymentSettings?: {
privacyUrl?: string;
publicKey?: string;
testUsers?: string[];
};
homeUrl?: {
url: string;
webviewHeightRatio: 'tall';
webviewShareButton?: 'hide' | 'show';
inTest: boolean;
};
};
export type MessengerProfileResponse = {
data: MessengerProfile[];
};
export type MutationSuccessResponse = {
result: string;
};
export type SendMessageSuccessResponse = {
recipientId: string;
messageId: string;
};
export type SendSenderActionResponse = {
recipientId: string;
};
export type MessageTagResponse = {
tag: MessageTag;
description: string;
}[];
export type FileData = Buffer | fs.ReadStream;
export type BatchRequestOptions = {
name?: string;
dependsOn?: string;
omitResponseOnSuccess?: boolean;
iceBreakers?: IceBreaker[];
whitelistedDomains?: string[];
accountLinkingUrl?: string;
paymentSettings?: {
privacyUrl?: string;
publicKey?: string;
testUsers?: string[];
};
export type 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';
export type MessengerNLPConfig = {
nlpEnabled?: boolean;
model?: Model;
customToken?: string;
verbose?: boolean;
nBest?: number;
homeUrl?: {
url: string;
webviewHeightRatio: 'tall';
webviewShareButton?: 'hide' | 'show';
inTest: boolean;
};
export type PageInfo = {
name: string;
id: string;
};
type Scope = string;
export type TokenInfo = {
appId: string;
type: 'PAGE' | 'APP' | 'USER';
application: string;
dataAccessExpiresAt: number;
expiresAt: number;
isValid: true;
issuedAt?: number;
profileId: string;
scopes: Scope[];
userId: string;
};
export type MessagingFeatureReview = {
feature: string;
status: 'pending' | 'rejected' | 'approved' | 'limited';
};
export type Persona = {
name: string;
profilePictureUrl: string;
};
export type SubscriptionFields = {
name: string;
version: string;
};
export type MessengerSubscription = {
object: string;
callbackUrl: string;
active: boolean;
fields: SubscriptionFields[];
};
export type BatchItem = {
method: string;
relativeUrl: string;
name?: string;
body?: Record<string, any>;
responseAccessPath?: string;
} & BatchRequestOptions;
export {};
}
};
export declare type MessengerProfileResponse = {
data: MessengerProfile[];
};
export declare type MutationSuccessResponse = {
result: string;
};
export declare type SendMessageSuccessResponse = {
recipientId: string;
messageId: string;
};
export declare type SendSenderActionResponse = {
recipientId: string;
};
export declare type MessageTagResponse = {
tag: MessageTag;
description: string;
}[];
export declare type FileData = Buffer | fs.ReadStream;
export declare type BatchRequestOptions = {
name?: string;
dependsOn?: string;
omitResponseOnSuccess?: boolean;
};
export declare type 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';
export declare type MessengerNLPConfig = {
nlpEnabled?: boolean;
model?: Model;
customToken?: string;
verbose?: boolean;
nBest?: number;
};
export declare type PageInfo = {
name: string;
id: string;
};
declare type Scope = string;
export declare type TokenInfo = {
appId: string;
type: 'PAGE' | 'APP' | 'USER';
application: string;
dataAccessExpiresAt: number;
expiresAt: number;
isValid: true;
issuedAt?: number;
profileId: string;
scopes: Scope[];
userId: string;
};
export declare type MessagingFeatureReview = {
feature: string;
status: 'pending' | 'rejected' | 'approved' | 'limited';
};
export declare type Persona = {
name: string;
profilePictureUrl: string;
};
export declare type SubscriptionFields = {
name: string;
version: string;
};
export declare type MessengerSubscription = {
object: string;
callbackUrl: string;
active: boolean;
fields: SubscriptionFields[];
};
export declare type BatchItem = {
method: string;
relativeUrl: string;
name?: string;
body?: Record<string, any>;
responseAccessPath?: string;
} & BatchRequestOptions;
export {};
//# sourceMappingURL=MessengerTypes.d.ts.map

@@ -9,3 +9,3 @@ {

},
"version": "1.0.0",
"version": "1.0.1",
"main": "dist/index.js",

@@ -36,3 +36,3 @@ "browser": "lib/browser.js",

},
"gitHead": "879afbd4bebbbb480dd5c1bd32e7cdcc5127437c"
"gitHead": "cc72282a84bd6f2176f63bec462b15ae4dd37265"
}

@@ -1,4 +0,4 @@

import Messenger from './Messenger';
import MessengerBatch from './MessengerBatch';
export { default as Messenger } from './Messenger';
export { default as MessengerBatch } from './MessengerBatch';
export { Messenger, MessengerBatch };
export * as MessengerTypes from './MessengerTypes';

@@ -1,6 +0,5 @@

import Messenger from './Messenger';
import MessengerBatch from './MessengerBatch';
import MessengerClient from './MessengerClient';
import type { MessengerTypes } from './MessengerTypes';
export { default as Messenger } from './Messenger';
export { default as MessengerBatch } from './MessengerBatch';
export { default as MessengerClient } from './MessengerClient';
export { Messenger, MessengerBatch, MessengerClient, MessengerTypes };
export * as MessengerTypes from './MessengerTypes';

@@ -5,3 +5,3 @@ import FormData from 'form-data';

import type { MessengerTypes } from './MessengerTypes';
import * as MessengerTypes from './MessengerTypes';

@@ -8,0 +8,0 @@ function createMessage(

@@ -5,3 +5,3 @@ import omit from 'lodash/omit';

import Messenger from './Messenger';
import type { MessengerTypes } from './MessengerTypes';
import * as MessengerTypes from './MessengerTypes';

@@ -8,0 +8,0 @@ function omitUndefinedFields(obj = {}): object {

@@ -5,576 +5,574 @@ import fs from 'fs';

export namespace MessengerTypes {
export type ClientConfig = {
accessToken: string;
appId?: string;
appSecret?: string;
version?: string;
origin?: string;
onRequest?: OnRequestFunction;
skipAppSecretProof?: boolean;
};
export type ClientConfig = {
accessToken: string;
appId?: string;
appSecret?: string;
version?: string;
origin?: string;
onRequest?: OnRequestFunction;
skipAppSecretProof?: boolean;
};
/**
* Page Scoped User ID (PSID) of the message recipient.
*/
export type RecipientWithID = {
id: string;
};
/**
* Page Scoped User ID (PSID) of the message recipient.
*/
export type RecipientWithID = {
id: string;
};
/**
* Used for Customer Matching. (Closed Beta)
*/
export type RecipientWithPhoneNumber = {
phoneNumber: string;
name?: Record<string, any>;
};
/**
* Used for Customer Matching. (Closed Beta)
*/
export type RecipientWithPhoneNumber = {
phoneNumber: string;
name?: Record<string, any>;
};
/**
* Used for the checkbox plugin.
*/
export type RecipientWithUserRef = {
userRef: string;
};
/**
* Used for the checkbox plugin.
*/
export type RecipientWithUserRef = {
userRef: string;
};
/**
* Used for Private Replies to reference the visitor post to reply to.
*/
export type RecipientWithPostId = {
postId: string;
};
/**
* Used for Private Replies to reference the visitor post to reply to.
*/
export type RecipientWithPostId = {
postId: string;
};
/**
* Used for Private Replies to reference the post comment to reply to.
*/
export type RecipientWithCommentId = {
commentId: string;
};
/**
* Used for Private Replies to reference the post comment to reply to.
*/
export type RecipientWithCommentId = {
commentId: string;
};
/**
* Used for the Messenger Platform's One-Time Notification API.
*/
export type RecipientWithOneTimeNotifToken = {
oneTimeNotifToken: string;
};
/**
* Used for the Messenger Platform's One-Time Notification API.
*/
export type RecipientWithOneTimeNotifToken = {
oneTimeNotifToken: string;
};
/**
* Description of the message recipient. All requests must include one to identify the recipient.
*/
export type Recipient =
| RecipientWithID
| RecipientWithPhoneNumber
| RecipientWithUserRef
| RecipientWithPostId
| RecipientWithCommentId
| RecipientWithOneTimeNotifToken;
/**
* Description of the message recipient. All requests must include one to identify the recipient.
*/
export type Recipient =
| RecipientWithID
| RecipientWithPhoneNumber
| RecipientWithUserRef
| RecipientWithPostId
| RecipientWithCommentId
| RecipientWithOneTimeNotifToken;
/**
* Description of the message recipient. If a string is provided, it will be recognized as a psid.
*/
export type PsidOrRecipient = string | Recipient;
/**
* Description of the message recipient. If a string is provided, it will be recognized as a psid.
*/
export type PsidOrRecipient = string | Recipient;
export type UrlMediaAttachmentPayload = {
url: string;
isReusable?: boolean;
};
export type UrlMediaAttachmentPayload = {
url: string;
isReusable?: boolean;
};
export type AttachmentIdAttachmentPayload = {
attachmentId: string;
};
export type AttachmentIdAttachmentPayload = {
attachmentId: string;
};
export type MediaAttachmentPayload =
| UrlMediaAttachmentPayload
| AttachmentIdAttachmentPayload;
export type MediaAttachmentPayload =
| UrlMediaAttachmentPayload
| AttachmentIdAttachmentPayload;
export type MediaAttachmentType = 'audio' | 'video' | 'image' | 'file';
export type MediaAttachmentType = 'audio' | 'video' | 'image' | 'file';
export type FileDataAttachmentPayload = {
isReusable?: boolean;
};
export type FileDataAttachmentPayload = {
isReusable?: boolean;
};
export type FileDataMediaAttachment = {
type: MediaAttachmentType;
payload: FileDataAttachmentPayload;
};
export type FileDataMediaAttachment = {
type: MediaAttachmentType;
payload: FileDataAttachmentPayload;
};
export type FileDataMediaAttachmentMessage = {
attachment: FileDataMediaAttachment;
quickReplies?: QuickReply[];
};
export type FileDataMediaAttachmentMessage = {
attachment: FileDataMediaAttachment;
quickReplies?: QuickReply[];
};
export type MediaAttachment = {
type: MediaAttachmentType;
payload: MediaAttachmentPayload;
};
export type MediaAttachment = {
type: MediaAttachmentType;
payload: MediaAttachmentPayload;
};
export type TemplateAttachmentPayload = {
templateType:
| 'button'
| 'generic'
| 'media'
| 'receipt'
| 'airline_boardingpass'
| 'airline_checkin'
| 'airline_itinerary'
| 'airline_update'
| 'one_time_notif_req';
[key: string]: any; // FIXME: list all of templates
};
export type TemplateAttachmentPayload = {
templateType:
| 'button'
| 'generic'
| 'media'
| 'receipt'
| 'airline_boardingpass'
| 'airline_checkin'
| 'airline_itinerary'
| 'airline_update'
| 'one_time_notif_req';
[key: string]: any; // FIXME: list all of templates
};
export type TemplateAttachment = {
type: 'template';
payload: TemplateAttachmentPayload;
};
export type TemplateAttachment = {
type: 'template';
payload: TemplateAttachmentPayload;
};
export type Attachment = MediaAttachment | TemplateAttachment;
export type Attachment = MediaAttachment | TemplateAttachment;
export type TextQuickReply = {
contentType: 'text';
title: string;
payload: string;
imageUrl?: string;
};
export type TextQuickReply = {
contentType: 'text';
title: string;
payload: string;
imageUrl?: string;
};
export type UserPhoneNumberQuickReply = {
contentType: 'user_phone_number';
};
export type UserPhoneNumberQuickReply = {
contentType: 'user_phone_number';
};
export type UserEmailQuickReply = {
contentType: 'user_email';
};
export type UserEmailQuickReply = {
contentType: 'user_email';
};
export type QuickReply =
| TextQuickReply
| UserPhoneNumberQuickReply
| UserEmailQuickReply;
export type QuickReply =
| TextQuickReply
| UserPhoneNumberQuickReply
| UserEmailQuickReply;
export type TextMessage = {
text?: string;
quickReplies?: QuickReply[];
};
export type TextMessage = {
text?: string;
quickReplies?: QuickReply[];
};
export type AttachmentMessage = {
attachment?: Attachment;
quickReplies?: QuickReply[];
};
export type AttachmentMessage = {
attachment?: Attachment;
quickReplies?: QuickReply[];
};
export type Message = TextMessage | AttachmentMessage;
export type Message = TextMessage | AttachmentMessage;
export type MessagingType =
| 'RESPONSE'
| 'UPDATE'
| 'MESSAGE_TAG'
| 'NON_PROMOTIONAL_SUBSCRIPTION';
export type MessagingType =
| 'RESPONSE'
| 'UPDATE'
| 'MESSAGE_TAG'
| 'NON_PROMOTIONAL_SUBSCRIPTION';
export type MessageTag =
| 'CONFIRMED_EVENT_UPDATE'
| 'POST_PURCHASE_UPDATE'
| 'ACCOUNT_UPDATE'
| 'HUMAN_AGENT';
export type MessageTag =
| 'CONFIRMED_EVENT_UPDATE'
| 'POST_PURCHASE_UPDATE'
| 'ACCOUNT_UPDATE'
| 'HUMAN_AGENT';
export type InsightMetric =
| 'page_messages_blocked_conversations_unique'
| 'page_messages_reported_conversations_unique'
| 'page_messages_total_messaging_connections'
| 'page_messages_new_conversations_unique';
export type InsightMetric =
| 'page_messages_blocked_conversations_unique'
| 'page_messages_reported_conversations_unique'
| 'page_messages_total_messaging_connections'
| 'page_messages_new_conversations_unique';
export type InsightOptions = {
since?: number;
until?: number;
};
export type InsightOptions = {
since?: number;
until?: number;
};
export type SendOption = {
messagingType?: MessagingType;
tag?: MessageTag;
quickReplies?: QuickReply[];
};
export type SendOption = {
messagingType?: MessagingType;
tag?: MessageTag;
quickReplies?: QuickReply[];
};
export type UploadOption = {
filename?: string;
isReusable?: boolean;
};
export type UploadOption = {
filename?: string;
isReusable?: boolean;
};
export type TemplateButton = {
export type TemplateButton = {
type: string;
title: string;
url?: string;
payload?: string;
webviewHeightRatio?: 'compact' | 'tall' | 'full';
};
export type MenuItem = TemplateButton;
export type TemplateElement = {
title: string;
imageUrl: string;
subtitle: string;
defaultAction: {
type: string;
title: string;
url?: string;
payload?: string;
webviewHeightRatio?: 'compact' | 'tall' | 'full';
url: string;
messengerExtensions: boolean;
webviewHeightRatio: string;
fallbackUrl: string;
};
buttons: TemplateButton[];
};
export type MenuItem = TemplateButton;
export type MediaElement = {
mediaType: 'image' | 'video';
attachmentId?: string;
url?: string;
buttons?: TemplateButton[];
};
export type TemplateElement = {
title: string;
imageUrl: string;
subtitle: string;
defaultAction: {
type: string;
url: string;
messengerExtensions: boolean;
webviewHeightRatio: string;
fallbackUrl: string;
};
buttons: TemplateButton[];
};
export type Address = {
street1: string;
street2?: string;
city: string;
postalCode: string;
state: string;
country: string;
};
export type MediaElement = {
mediaType: 'image' | 'video';
attachmentId?: string;
url?: string;
buttons?: TemplateButton[];
};
export type Summary = {
subtotal?: number;
shippingCost?: number;
totalTax?: number;
totalCost: number;
};
export type Address = {
street1: string;
street2?: string;
city: string;
postalCode: string;
state: string;
country: string;
};
export type Adjustment = {
name?: string;
amount?: number;
};
export type Summary = {
subtotal?: number;
shippingCost?: number;
totalTax?: number;
totalCost: number;
};
export type ReceiptElement = {
title: string;
subtitle?: string;
quantity?: number;
price: number;
currency?: string;
imageUrl: string;
};
export type Adjustment = {
name?: string;
amount?: number;
};
export type ReceiptAttributes = {
recipientName: string;
merchantName?: string;
orderNumber: string; // must be unique
currency: string;
paymentMethod: string;
timestamp?: string;
orderUrl?: string;
elements?: ReceiptElement[];
address?: Address;
summary: Summary;
adjustments?: Adjustment[];
};
export type ReceiptElement = {
title: string;
subtitle?: string;
quantity?: number;
price: number;
currency?: string;
imageUrl: string;
};
export type Airport = {
airportCode: string;
city: string;
terminal?: string;
gate?: string;
};
export type ReceiptAttributes = {
recipientName: string;
merchantName?: string;
orderNumber: string; // must be unique
currency: string;
paymentMethod: string;
timestamp?: string;
orderUrl?: string;
elements?: ReceiptElement[];
address?: Address;
summary: Summary;
adjustments?: Adjustment[];
};
export type FlightSchedule = {
boardingTime?: string;
departureTime: string;
arrivalTime?: string;
};
export type Airport = {
airportCode: string;
city: string;
terminal?: string;
gate?: string;
};
export type FlightInfo = {
connectionId: string;
segmentId: string | PassengerSegmentInfo;
flightNumber: string;
aircraftType?: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
travelClass: 'economy' | 'business' | 'first_class';
};
export type FlightSchedule = {
boardingTime?: string;
departureTime: string;
arrivalTime?: string;
};
export type Field = {
label: string;
value: string;
};
export type FlightInfo = {
connectionId: string;
segmentId: string | PassengerSegmentInfo;
flightNumber: string;
aircraftType?: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
travelClass: 'economy' | 'business' | 'first_class';
};
export type BoardingPass = {
passengerName: string;
pnrNumber: string;
travelClass?: string;
seat?: string;
auxiliaryFields?: Field[];
secondaryFields?: Field[];
logoImageUrl: string;
headerImageUrl?: string;
headerTextField?: Field;
qrCode?: string; // FIXME: qr_code or barcode_image_url
barcodeImageUrl?: string;
aboveBarCodeImageUrl: string;
flightInfo: FlightInfo;
};
export type Field = {
label: string;
value: string;
};
export type AirlineBoardingPassAttributes = {
introMessage: string;
locale: string;
boardingPass: BoardingPass[];
};
export type BoardingPass = {
passengerName: string;
pnrNumber: string;
travelClass?: string;
seat?: string;
auxiliaryFields?: Field[];
secondaryFields?: Field[];
logoImageUrl: string;
headerImageUrl?: string;
headerTextField?: Field;
qrCode?: string; // FIXME: qr_code or barcode_image_url
barcodeImageUrl?: string;
aboveBarCodeImageUrl: string;
flightInfo: FlightInfo;
};
export type PassengerInfo = {
passengerId: string;
ticketNumber?: string;
name: string;
};
export type AirlineBoardingPassAttributes = {
introMessage: string;
locale: string;
boardingPass: BoardingPass[];
};
export type ProductInfo = {
title: string;
value: string;
};
export type PassengerInfo = {
passengerId: string;
ticketNumber?: string;
name: string;
};
export type PassengerSegmentInfo = {
segmentId: string;
passengerId: string;
seat: string;
seatType: string;
productInfo?: ProductInfo[];
};
export type ProductInfo = {
title: string;
value: string;
};
export type PriceInfo = {
title: string;
amount: string;
currency?: string;
};
export type PassengerSegmentInfo = {
segmentId: string;
passengerId: string;
seat: string;
seatType: string;
productInfo?: ProductInfo[];
};
export type AirlineCheckinAttributes = {
introMessage: string;
locale: string;
pnrNumber?: string;
checkinUrl: string;
flightInfo: FlightInfo[];
};
export type PriceInfo = {
title: string;
amount: string;
currency?: string;
};
export type AirlineItineraryAttributes = {
introMessage: string;
locale: string;
themeColor?: string;
pnrNumber: string;
passengerInfo: PassengerInfo[];
flightInfo: FlightInfo[];
passengerSegmentInfo: PassengerSegmentInfo[];
priceInfo?: PriceInfo[];
basePrice?: string;
tax?: string;
totalPrice: string;
currency: string;
};
export type AirlineCheckinAttributes = {
introMessage: string;
locale: string;
pnrNumber?: string;
checkinUrl: string;
flightInfo: FlightInfo[];
};
export type UpdateFlightInfo = {
flightNumber: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
};
export type AirlineItineraryAttributes = {
introMessage: string;
locale: string;
themeColor?: string;
pnrNumber: string;
passengerInfo: PassengerInfo[];
flightInfo: FlightInfo[];
passengerSegmentInfo: PassengerSegmentInfo[];
priceInfo?: PriceInfo[];
basePrice?: string;
tax?: string;
totalPrice: string;
currency: string;
};
export type AirlineUpdateAttributes = {
introMessage: string;
themeColor?: string;
updateType: 'delay' | 'gate_change' | 'cancellation';
locale: string;
pnrNumber?: string;
updateFlightInfo: UpdateFlightInfo;
};
export type UpdateFlightInfo = {
flightNumber: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
};
export type OneTimeNotifReqAttributes = {
title: string;
payload: string;
};
export type AirlineUpdateAttributes = {
introMessage: string;
themeColor?: string;
updateType: 'delay' | 'gate_change' | 'cancellation';
locale: string;
pnrNumber?: string;
updateFlightInfo: UpdateFlightInfo;
};
export type SenderAction = 'mark_seen' | 'typing_on' | 'typing_off';
export type OneTimeNotifReqAttributes = {
title: string;
payload: string;
};
/**
* Fields can be retrieved from a person's profile information
*/
export type UserProfileField =
// Granted by default
| 'id'
| 'name'
| 'first_name'
| 'last_name'
| 'profile_pic'
// Needs approval by Facebook
| 'locale'
| 'timezone'
| 'gender';
export type SenderAction = 'mark_seen' | 'typing_on' | 'typing_off';
/**
* The User Profile API allows you to use a Page-scoped ID (PSID) to retrieve user profile information in this format
*/
export type User = {
id: string;
name: string;
firstName: string;
lastName: string;
profilePic: string;
locale?: string;
timezone?: number;
gender?: string;
};
/**
* Fields can be retrieved from a person's profile information
*/
export type UserProfileField =
// Granted by default
| 'id'
| 'name'
| 'first_name'
| 'last_name'
| 'profile_pic'
// Needs approval by Facebook
| 'locale'
| 'timezone'
| 'gender';
export type PersistentMenuItem = {
locale: string;
composerInputDisabled: boolean;
callToActions: MenuItem[];
};
/**
* The User Profile API allows you to use a Page-scoped ID (PSID) to retrieve user profile information in this format
*/
export type User = {
id: string;
name: string;
firstName: string;
lastName: string;
profilePic: string;
locale?: string;
timezone?: number;
gender?: string;
};
export type PersistentMenu = PersistentMenuItem[];
export type PersistentMenuItem = {
locale: string;
composerInputDisabled: boolean;
callToActions: MenuItem[];
};
export type GreetingConfig = {
locale: string;
text: string;
};
export type PersistentMenu = PersistentMenuItem[];
export type IceBreaker = {
question: string;
payload: string;
};
export type GreetingConfig = {
locale: string;
text: string;
};
export type UserPersistentMenu = {
userLevelPersistentMenu?: PersistentMenu;
pageLevelPersistentMenu?: PersistentMenu;
};
export type IceBreaker = {
question: string;
export type MessengerProfile = {
getStarted?: {
payload: string;
};
export type UserPersistentMenu = {
userLevelPersistentMenu?: PersistentMenu;
pageLevelPersistentMenu?: PersistentMenu;
persistentMenu?: PersistentMenu;
greeting?: {
locale: string;
text: string;
}[];
iceBreakers?: IceBreaker[];
whitelistedDomains?: string[];
accountLinkingUrl?: string;
paymentSettings?: {
privacyUrl?: string;
publicKey?: string;
testUsers?: string[];
};
export type MessengerProfile = {
getStarted?: {
payload: string;
};
persistentMenu?: PersistentMenu;
greeting?: {
locale: string;
text: string;
}[];
iceBreakers?: IceBreaker[];
whitelistedDomains?: string[];
accountLinkingUrl?: string;
paymentSettings?: {
privacyUrl?: string;
publicKey?: string;
testUsers?: string[];
};
homeUrl?: {
url: string;
webviewHeightRatio: 'tall';
webviewShareButton?: 'hide' | 'show';
inTest: boolean;
};
homeUrl?: {
url: string;
webviewHeightRatio: 'tall';
webviewShareButton?: 'hide' | 'show';
inTest: boolean;
};
};
export type MessengerProfileResponse = {
data: MessengerProfile[];
};
export type MessengerProfileResponse = {
data: MessengerProfile[];
};
export type MutationSuccessResponse = {
result: string;
};
export type MutationSuccessResponse = {
result: string;
};
export type SendMessageSuccessResponse = {
recipientId: string;
messageId: string;
};
export type SendMessageSuccessResponse = {
recipientId: string;
messageId: string;
};
export type SendSenderActionResponse = {
recipientId: string;
};
export type SendSenderActionResponse = {
recipientId: string;
};
export type MessageTagResponse = {
tag: MessageTag;
description: string;
}[];
export type MessageTagResponse = {
tag: MessageTag;
description: string;
}[];
export type FileData = Buffer | fs.ReadStream;
export type FileData = Buffer | fs.ReadStream;
export type BatchRequestOptions = {
name?: string;
dependsOn?: string;
omitResponseOnSuccess?: boolean;
};
export type BatchRequestOptions = {
name?: string;
dependsOn?: string;
omitResponseOnSuccess?: boolean;
};
export type 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';
export type 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';
export type MessengerNLPConfig = {
nlpEnabled?: boolean;
model?: Model;
customToken?: string;
verbose?: boolean;
nBest?: number;
};
export type MessengerNLPConfig = {
nlpEnabled?: boolean;
model?: Model;
customToken?: string;
verbose?: boolean;
nBest?: number;
};
export type PageInfo = {
name: string;
id: string;
};
export type PageInfo = {
name: string;
id: string;
};
type Scope = string;
type Scope = string;
export type TokenInfo = {
appId: string;
type: 'PAGE' | 'APP' | 'USER';
application: string;
dataAccessExpiresAt: number;
expiresAt: number;
isValid: true;
issuedAt?: number;
profileId: string;
scopes: Scope[];
userId: string;
};
export type TokenInfo = {
appId: string;
type: 'PAGE' | 'APP' | 'USER';
application: string;
dataAccessExpiresAt: number;
expiresAt: number;
isValid: true;
issuedAt?: number;
profileId: string;
scopes: Scope[];
userId: string;
};
export type MessagingFeatureReview = {
feature: string;
status: 'pending' | 'rejected' | 'approved' | 'limited';
};
export type MessagingFeatureReview = {
feature: string;
status: 'pending' | 'rejected' | 'approved' | 'limited';
};
export type Persona = {
name: string;
profilePictureUrl: string;
};
export type Persona = {
name: string;
profilePictureUrl: string;
};
export type SubscriptionFields = {
name: string;
version: string;
};
export type SubscriptionFields = {
name: string;
version: string;
};
export type MessengerSubscription = {
object: string;
callbackUrl: string;
active: boolean;
fields: SubscriptionFields[];
};
export type MessengerSubscription = {
object: string;
callbackUrl: string;
active: boolean;
fields: SubscriptionFields[];
};
export type BatchItem = {
method: string;
relativeUrl: string;
name?: string;
body?: Record<string, any>;
responseAccessPath?: string;
} & BatchRequestOptions;
}
export type BatchItem = {
method: string;
relativeUrl: string;
name?: string;
body?: Record<string, any>;
responseAccessPath?: string;
} & BatchRequestOptions;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc