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-beta.34 to 1.0.0

2

dist/index.d.ts
import Messenger from './Messenger';
import MessengerBatch from './MessengerBatch';
import MessengerClient from './MessengerClient';
import * as MessengerTypes from './MessengerTypes';
import type { MessengerTypes } from './MessengerTypes';
export { Messenger, MessengerBatch, MessengerClient, MessengerTypes };
//# sourceMappingURL=index.d.ts.map
"use strict";
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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -25,3 +6,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
exports.MessengerTypes = exports.MessengerClient = exports.MessengerBatch = exports.Messenger = void 0;
exports.MessengerClient = exports.MessengerBatch = exports.Messenger = void 0;
const Messenger_1 = __importDefault(require("./Messenger"));

@@ -33,4 +14,2 @@ exports.Messenger = Messenger_1.default;

exports.MessengerClient = MessengerClient_1.default;
const MessengerTypes = __importStar(require("./MessengerTypes"));
exports.MessengerTypes = MessengerTypes;
//# sourceMappingURL=index.js.map
import FormData from 'form-data';
import * as Types from './MessengerTypes';
declare function createMessage(payload: Types.Message, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
import type { MessengerTypes } from './MessengerTypes';
declare function createMessage(payload: MessengerTypes.Message, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createText(text: string, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createAttachment(attachment: Types.Attachment, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createAudio(audio: string | Types.MediaAttachmentPayload, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createAudioFormData(audio: Types.FileData, options?: {
quickReplies?: Types.QuickReply[];
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createAttachment(attachment: MessengerTypes.Attachment, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createAudio(audio: string | MessengerTypes.MediaAttachmentPayload, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createAudioFormData(audio: MessengerTypes.FileData, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): FormData;
declare function createImage(image: string | Types.MediaAttachmentPayload, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createImageFormData(image: Types.FileData, options?: {
quickReplies?: Types.QuickReply[];
declare function createImage(image: string | MessengerTypes.MediaAttachmentPayload, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createImageFormData(image: MessengerTypes.FileData, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): FormData;
declare function createVideo(video: string | Types.MediaAttachmentPayload, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createVideoFormData(video: Types.FileData, options?: {
quickReplies?: Types.QuickReply[];
declare function createVideo(video: string | MessengerTypes.MediaAttachmentPayload, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createVideoFormData(video: MessengerTypes.FileData, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): FormData;
declare function createFile(file: string | Types.MediaAttachmentPayload, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createFileFormData(file: Types.FileData, options?: {
quickReplies?: Types.QuickReply[];
declare function createFile(file: string | MessengerTypes.MediaAttachmentPayload, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createFileFormData(file: MessengerTypes.FileData, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): FormData;
declare function createTemplate(payload: Types.TemplateAttachmentPayload, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createButtonTemplate(text: string, buttons: Types.TemplateButton[], options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createGenericTemplate(elements: Types.TemplateElement[], options?: {
declare function createTemplate(payload: MessengerTypes.TemplateAttachmentPayload, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createButtonTemplate(text: string, buttons: MessengerTypes.TemplateButton[], options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createGenericTemplate(elements: MessengerTypes.TemplateElement[], options?: {
imageAspectRatio?: 'horizontal' | 'square';
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createMediaTemplate(elements: Types.MediaElement[], options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createReceiptTemplate(attrs: Types.ReceiptAttributes, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createAirlineBoardingPassTemplate(attrs: Types.AirlineBoardingPassAttributes, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createAirlineCheckinTemplate(attrs: Types.AirlineCheckinAttributes, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createAirlineItineraryTemplate(attrs: Types.AirlineItineraryAttributes, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createAirlineUpdateTemplate(attrs: Types.AirlineUpdateAttributes, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
declare function createOneTimeNotifReqTemplate(attrs: Types.OneTimeNotifReqAttributes, options?: {
quickReplies?: Types.QuickReply[];
}): Types.Message;
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createMediaTemplate(elements: MessengerTypes.MediaElement[], options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createReceiptTemplate(receipt: MessengerTypes.ReceiptAttributes, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createAirlineBoardingPassTemplate(attrs: MessengerTypes.AirlineBoardingPassAttributes, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createAirlineCheckinTemplate(attrs: MessengerTypes.AirlineCheckinAttributes, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createAirlineItineraryTemplate(attrs: MessengerTypes.AirlineItineraryAttributes, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createAirlineUpdateTemplate(attrs: MessengerTypes.AirlineUpdateAttributes, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare function createOneTimeNotifReqTemplate(attrs: MessengerTypes.OneTimeNotifReqAttributes, options?: {
quickReplies?: MessengerTypes.QuickReply[];
}): MessengerTypes.Message;
declare const Messenger: {

@@ -68,0 +68,0 @@ createMessage: typeof createMessage;

@@ -165,4 +165,4 @@ "use strict";

}
function createReceiptTemplate(attrs, options) {
return createTemplate(Object.assign({ templateType: 'receipt' }, attrs), options);
function createReceiptTemplate(receipt, options) {
return createTemplate(Object.assign({ templateType: 'receipt' }, receipt), options);
}

@@ -169,0 +169,0 @@ function createAirlineBoardingPassTemplate(attrs, options) {

@@ -1,63 +0,63 @@

import * as Types from './MessengerTypes';
declare function sendRequest(body: object, options?: Types.BatchRequestOptions): Types.BatchItem;
declare function sendMessage(psidOrRecipient: Types.PsidOrRecipient, msg: Types.Message, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendText(psidOrRecipient: Types.PsidOrRecipient, text: string, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendAttachment(psidOrRecipient: Types.PsidOrRecipient, attachment: Types.Attachment, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendAudio(psidOrRecipient: Types.PsidOrRecipient, audio: string | Types.MediaAttachmentPayload, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendImage(psidOrRecipient: Types.PsidOrRecipient, image: string | Types.MediaAttachmentPayload, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendVideo(psidOrRecipient: Types.PsidOrRecipient, video: string | Types.MediaAttachmentPayload, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendFile(psidOrRecipient: Types.PsidOrRecipient, file: string | Types.MediaAttachmentPayload, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendTemplate(psidOrRecipient: Types.PsidOrRecipient, payload: Types.TemplateAttachmentPayload, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendButtonTemplate(psidOrRecipient: Types.PsidOrRecipient, text: string, buttons: Types.TemplateButton[], options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendGenericTemplate(psidOrRecipient: Types.PsidOrRecipient, elements: Types.TemplateElement[], { imageAspectRatio, ...options }?: {
import type { MessengerTypes } from './MessengerTypes';
declare function sendRequest(body: object, options?: MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendMessage(psidOrRecipient: MessengerTypes.PsidOrRecipient, msg: MessengerTypes.Message, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendText(psidOrRecipient: MessengerTypes.PsidOrRecipient, text: string, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendAttachment(psidOrRecipient: MessengerTypes.PsidOrRecipient, attachment: MessengerTypes.Attachment, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendAudio(psidOrRecipient: MessengerTypes.PsidOrRecipient, audio: string | MessengerTypes.MediaAttachmentPayload, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendImage(psidOrRecipient: MessengerTypes.PsidOrRecipient, image: string | MessengerTypes.MediaAttachmentPayload, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendVideo(psidOrRecipient: MessengerTypes.PsidOrRecipient, video: string | MessengerTypes.MediaAttachmentPayload, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendFile(psidOrRecipient: MessengerTypes.PsidOrRecipient, file: string | MessengerTypes.MediaAttachmentPayload, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, payload: MessengerTypes.TemplateAttachmentPayload, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendButtonTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, text: string, buttons: MessengerTypes.TemplateButton[], options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendGenericTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, elements: MessengerTypes.TemplateElement[], { imageAspectRatio, ...options }?: {
imageAspectRatio?: 'horizontal' | 'square';
} & Types.SendOption): Types.BatchItem;
declare function sendReceiptTemplate(psidOrRecipient: Types.PsidOrRecipient, attrs: Types.ReceiptAttributes, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendMediaTemplate(psidOrRecipient: Types.PsidOrRecipient, elements: Types.MediaElement[], options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendAirlineBoardingPassTemplate(psidOrRecipient: Types.PsidOrRecipient, attrs: Types.AirlineBoardingPassAttributes, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendAirlineCheckinTemplate(psidOrRecipient: Types.PsidOrRecipient, attrs: Types.AirlineCheckinAttributes, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendAirlineItineraryTemplate(psidOrRecipient: Types.PsidOrRecipient, attrs: Types.AirlineItineraryAttributes, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendAirlineUpdateTemplate(psidOrRecipient: Types.PsidOrRecipient, attrs: Types.AirlineUpdateAttributes, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function sendOneTimeNotifReqTemplate(psidOrRecipient: Types.PsidOrRecipient, attrs: Types.OneTimeNotifReqAttributes, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.SendOption): MessengerTypes.BatchItem;
declare function sendReceiptTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, receipt: MessengerTypes.ReceiptAttributes, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendMediaTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, elements: MessengerTypes.MediaElement[], options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendAirlineBoardingPassTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, attrs: MessengerTypes.AirlineBoardingPassAttributes, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendAirlineCheckinTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, attrs: MessengerTypes.AirlineCheckinAttributes, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendAirlineItineraryTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, attrs: MessengerTypes.AirlineItineraryAttributes, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendAirlineUpdateTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, attrs: MessengerTypes.AirlineUpdateAttributes, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendOneTimeNotifReqTemplate(psidOrRecipient: MessengerTypes.PsidOrRecipient, attrs: MessengerTypes.OneTimeNotifReqAttributes, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function getUserProfile(userId: string, options?: {
fields?: Types.UserProfileField[];
fields?: MessengerTypes.UserProfileField[];
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function getUserPersistentMenu(userId: string, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
declare function setUserPersistentMenu(userId: string, menuItems: Types.MenuItem[] | Types.PersistentMenuItem[], options?: {
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function setUserPersistentMenu(userId: string, menuItems: MessengerTypes.MenuItem[] | MessengerTypes.PersistentMenuItem[], options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function deleteUserPersistentMenu(userId: string, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
declare function sendSenderAction(psidOrRecipient: Types.PsidOrRecipient, senderAction: Types.SenderAction, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function typingOn(idOrRecipient: Types.PsidOrRecipient, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function typingOff(idOrRecipient: Types.PsidOrRecipient, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
declare function markSeen(idOrRecipient: Types.PsidOrRecipient, options?: Types.SendOption & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function sendSenderAction(psidOrRecipient: MessengerTypes.PsidOrRecipient, senderAction: MessengerTypes.SenderAction, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function typingOn(idOrRecipient: MessengerTypes.PsidOrRecipient, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function typingOff(idOrRecipient: MessengerTypes.PsidOrRecipient, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function markSeen(idOrRecipient: MessengerTypes.PsidOrRecipient, options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function passThreadControl(recipientId: string, targetAppId: number, metadata?: string, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function passThreadControlToPageInbox(recipientId: string, metadata?: string, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function takeThreadControl(recipientId: string, metadata?: string, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function requestThreadControl(recipientId: string, metadata?: string, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function getThreadOwner(recipientId: string, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function associateLabel(userId: string, labelId: number, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function dissociateLabel(userId: string, labelId: number, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare function getAssociatedLabels(userId: string, options?: {
accessToken?: string;
} & Types.BatchRequestOptions): Types.BatchItem;
} & MessengerTypes.BatchRequestOptions): MessengerTypes.BatchItem;
declare const MessengerBatch: {

@@ -64,0 +64,0 @@ sendRequest: typeof sendRequest;

@@ -77,4 +77,4 @@ "use strict";

}
function sendReceiptTemplate(psidOrRecipient, attrs, options) {
return sendMessage(psidOrRecipient, Messenger_1.default.createReceiptTemplate(attrs, options), options);
function sendReceiptTemplate(psidOrRecipient, receipt, options) {
return sendMessage(psidOrRecipient, Messenger_1.default.createReceiptTemplate(receipt, options), options);
}

@@ -81,0 +81,0 @@ function sendMediaTemplate(psidOrRecipient, elements, options) {

/// <reference types="node" />
import fs from 'fs';
import { OnRequestFunction } from 'messaging-api-common';
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;
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 = {
url: string;
messengerExtensions: boolean;
webviewHeightRatio: string;
fallbackUrl: string;
isReusable?: boolean;
};
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?: {
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;
payload: string;
imageUrl?: string;
};
persistentMenu?: PersistentMenu;
greeting?: {
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;
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;
}[];
iceBreakers?: IceBreaker[];
whitelistedDomains?: string[];
accountLinkingUrl?: string;
paymentSettings?: {
privacyUrl?: string;
publicKey?: string;
testUsers?: string[];
export type FileData = Buffer | fs.ReadStream;
export type BatchRequestOptions = {
name?: string;
dependsOn?: string;
omitResponseOnSuccess?: boolean;
};
homeUrl?: {
url: string;
webviewHeightRatio: 'tall';
webviewShareButton?: 'hide' | 'show';
inTest: 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 MessengerNLPConfig = {
nlpEnabled?: boolean;
model?: Model;
customToken?: string;
verbose?: boolean;
nBest?: number;
};
};
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 {};
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 {};
}
//# sourceMappingURL=MessengerTypes.d.ts.map

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

},
"version": "1.0.0-beta.34",
"version": "1.0.0",
"main": "dist/index.js",

@@ -20,6 +20,6 @@ "browser": "lib/browser.js",

"axios": "^0.19.2",
"axios-error": "^1.0.0-beta.27",
"axios-error": "^1.0.0",
"form-data": "^3.0.0",
"lodash": "^4.17.15",
"messaging-api-common": "^1.0.0-beta.29",
"messaging-api-common": "^1.0.0",
"ts-invariant": "^0.4.4",

@@ -37,3 +37,3 @@ "warning": "^4.0.3"

},
"gitHead": "dffb3adafba268a22ff08614dcdf9716ff7bb406"
"gitHead": "879afbd4bebbbb480dd5c1bd32e7cdcc5127437c"
}

@@ -1289,6 +1289,5 @@ import MockAdapter from 'axios-mock-adapter';

expect(res).toEqual({
accountLinkingUrl:
'https://www.example.com/oauth?response_type=code&client_id=1234567890&scope=basic',
});
expect(res).toEqual(
'https://www.example.com/oauth?response_type=code&client_id=1234567890&scope=basic'
);
});

@@ -1295,0 +1294,0 @@

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

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

import * as Types from './MessengerTypes';
import type { MessengerTypes } from './MessengerTypes';
function createMessage(
payload: Types.Message,
options: { quickReplies?: Types.QuickReply[] } = {}
): Types.Message {
payload: MessengerTypes.Message,
options: { quickReplies?: MessengerTypes.QuickReply[] } = {}
): MessengerTypes.Message {
const message = {

@@ -31,4 +31,4 @@ ...payload,

text: string,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createMessage({ text }, options);

@@ -38,7 +38,7 @@ }

function createMessageFormData(
payload: Types.FileDataMediaAttachmentMessage,
filedata: Types.FileData,
options: { quickReplies?: Types.QuickReply[] } = {}
payload: MessengerTypes.FileDataMediaAttachmentMessage,
filedata: MessengerTypes.FileData,
options: { quickReplies?: MessengerTypes.QuickReply[] } = {}
): FormData {
const message: Types.FileDataMediaAttachmentMessage = {
const message: MessengerTypes.FileDataMediaAttachmentMessage = {
...payload,

@@ -71,5 +71,5 @@ };

function createAttachment(
attachment: Types.Attachment,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
attachment: MessengerTypes.Attachment,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createMessage(

@@ -84,5 +84,5 @@ {

function createAttachmentFormData(
attachment: Types.FileDataMediaAttachment,
filedata: Types.FileData,
options?: { quickReplies?: Types.QuickReply[] }
attachment: MessengerTypes.FileDataMediaAttachment,
filedata: MessengerTypes.FileData,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): FormData {

@@ -99,7 +99,7 @@ return createMessageFormData(

function createAudio(
audio: string | Types.MediaAttachmentPayload,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
audio: string | MessengerTypes.MediaAttachmentPayload,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
if (typeof audio === 'string') {
const attachment: Types.Attachment = {
const attachment: MessengerTypes.Attachment = {
type: 'audio',

@@ -113,5 +113,5 @@ payload: {

const attachment: Types.Attachment = {
const attachment: MessengerTypes.Attachment = {
type: 'audio',
payload: audio as Types.MediaAttachmentPayload,
payload: audio as MessengerTypes.MediaAttachmentPayload,
};

@@ -122,6 +122,6 @@ return createAttachment(attachment, options);

function createAudioFormData(
audio: Types.FileData,
options?: { quickReplies?: Types.QuickReply[] }
audio: MessengerTypes.FileData,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): FormData {
const attachment: Types.FileDataMediaAttachment = {
const attachment: MessengerTypes.FileDataMediaAttachment = {
type: 'audio',

@@ -135,7 +135,7 @@ payload: {},

function createImage(
image: string | Types.MediaAttachmentPayload,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
image: string | MessengerTypes.MediaAttachmentPayload,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
if (typeof image === 'string') {
const attachment: Types.Attachment = {
const attachment: MessengerTypes.Attachment = {
type: 'image',

@@ -149,5 +149,5 @@ payload: {

const attachment: Types.Attachment = {
const attachment: MessengerTypes.Attachment = {
type: 'image',
payload: image as Types.MediaAttachmentPayload,
payload: image as MessengerTypes.MediaAttachmentPayload,
};

@@ -158,6 +158,6 @@ return createAttachment(attachment, options);

function createImageFormData(
image: Types.FileData,
options?: { quickReplies?: Types.QuickReply[] }
image: MessengerTypes.FileData,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): FormData {
const attachment: Types.FileDataMediaAttachment = {
const attachment: MessengerTypes.FileDataMediaAttachment = {
type: 'image',

@@ -171,7 +171,7 @@ payload: {},

function createVideo(
video: string | Types.MediaAttachmentPayload,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
video: string | MessengerTypes.MediaAttachmentPayload,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
if (typeof video === 'string') {
const attachment: Types.Attachment = {
const attachment: MessengerTypes.Attachment = {
type: 'video',

@@ -185,5 +185,5 @@ payload: {

const attachment: Types.Attachment = {
const attachment: MessengerTypes.Attachment = {
type: 'video',
payload: video as Types.MediaAttachmentPayload,
payload: video as MessengerTypes.MediaAttachmentPayload,
};

@@ -194,6 +194,6 @@ return createAttachment(attachment, options);

function createVideoFormData(
video: Types.FileData,
options?: { quickReplies?: Types.QuickReply[] }
video: MessengerTypes.FileData,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): FormData {
const attachment: Types.FileDataMediaAttachment = {
const attachment: MessengerTypes.FileDataMediaAttachment = {
type: 'video',

@@ -207,7 +207,7 @@ payload: {},

function createFile(
file: string | Types.MediaAttachmentPayload,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
file: string | MessengerTypes.MediaAttachmentPayload,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
if (typeof file === 'string') {
const attachment: Types.Attachment = {
const attachment: MessengerTypes.Attachment = {
type: 'file',

@@ -221,5 +221,5 @@ payload: {

const attachment: Types.Attachment = {
const attachment: MessengerTypes.Attachment = {
type: 'file',
payload: file as Types.MediaAttachmentPayload,
payload: file as MessengerTypes.MediaAttachmentPayload,
};

@@ -230,6 +230,6 @@ return createAttachment(attachment, options);

function createFileFormData(
file: Types.FileData,
options?: { quickReplies?: Types.QuickReply[] }
file: MessengerTypes.FileData,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): FormData {
const attachment: Types.FileDataMediaAttachment = {
const attachment: MessengerTypes.FileDataMediaAttachment = {
type: 'file',

@@ -243,5 +243,5 @@ payload: {},

function createTemplate(
payload: Types.TemplateAttachmentPayload,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
payload: MessengerTypes.TemplateAttachmentPayload,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createAttachment(

@@ -258,5 +258,5 @@ {

text: string,
buttons: Types.TemplateButton[],
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
buttons: MessengerTypes.TemplateButton[],
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createTemplate(

@@ -273,8 +273,8 @@ {

function createGenericTemplate(
elements: Types.TemplateElement[],
elements: MessengerTypes.TemplateElement[],
options: {
imageAspectRatio?: 'horizontal' | 'square';
quickReplies?: Types.QuickReply[];
quickReplies?: MessengerTypes.QuickReply[];
} = {}
): Types.Message {
): MessengerTypes.Message {
return createTemplate(

@@ -293,5 +293,5 @@ {

function createMediaTemplate(
elements: Types.MediaElement[],
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
elements: MessengerTypes.MediaElement[],
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createTemplate(

@@ -307,9 +307,9 @@ {

function createReceiptTemplate(
attrs: Types.ReceiptAttributes,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
receipt: MessengerTypes.ReceiptAttributes,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createTemplate(
{
templateType: 'receipt',
...attrs,
...receipt,
},

@@ -321,5 +321,5 @@ options

function createAirlineBoardingPassTemplate(
attrs: Types.AirlineBoardingPassAttributes,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
attrs: MessengerTypes.AirlineBoardingPassAttributes,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createTemplate(

@@ -335,5 +335,5 @@ {

function createAirlineCheckinTemplate(
attrs: Types.AirlineCheckinAttributes,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
attrs: MessengerTypes.AirlineCheckinAttributes,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createTemplate(

@@ -349,5 +349,5 @@ {

function createAirlineItineraryTemplate(
attrs: Types.AirlineItineraryAttributes,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
attrs: MessengerTypes.AirlineItineraryAttributes,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createTemplate(

@@ -363,5 +363,5 @@ {

function createAirlineUpdateTemplate(
attrs: Types.AirlineUpdateAttributes,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
attrs: MessengerTypes.AirlineUpdateAttributes,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createTemplate(

@@ -377,5 +377,5 @@ {

function createOneTimeNotifReqTemplate(
attrs: Types.OneTimeNotifReqAttributes,
options?: { quickReplies?: Types.QuickReply[] }
): Types.Message {
attrs: MessengerTypes.OneTimeNotifReqAttributes,
options?: { quickReplies?: MessengerTypes.QuickReply[] }
): MessengerTypes.Message {
return createTemplate(

@@ -382,0 +382,0 @@ {

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

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

@@ -12,3 +12,3 @@ function omitUndefinedFields(obj = {}): object {

function pickBatchOptions<T extends Types.BatchRequestOptions>(
function pickBatchOptions<T extends MessengerTypes.BatchRequestOptions>(
options: T

@@ -19,3 +19,3 @@ ): Pick<T, 'name' | 'dependsOn' | 'omitResponseOnSuccess'> {

function omitBatchOptions<T extends Types.BatchRequestOptions>(
function omitBatchOptions<T extends MessengerTypes.BatchRequestOptions>(
options: T

@@ -28,4 +28,4 @@ ): Omit<T, 'name' | 'dependsOn' | 'omitResponseOnSuccess'> {

body: object,
options?: Types.BatchRequestOptions
): Types.BatchItem {
options?: MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return {

@@ -40,6 +40,6 @@ method: 'POST',

function sendMessage(
psidOrRecipient: Types.PsidOrRecipient,
msg: Types.Message,
options: Types.SendOption & Types.BatchRequestOptions = {}
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
msg: MessengerTypes.Message,
options: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const recipient =

@@ -72,6 +72,6 @@ typeof psidOrRecipient === 'string'

function sendText(
psidOrRecipient: Types.PsidOrRecipient,
psidOrRecipient: MessengerTypes.PsidOrRecipient,
text: string,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -85,6 +85,6 @@ psidOrRecipient,

function sendAttachment(
psidOrRecipient: Types.PsidOrRecipient,
attachment: Types.Attachment,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
attachment: MessengerTypes.Attachment,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -98,6 +98,6 @@ psidOrRecipient,

function sendAudio(
psidOrRecipient: Types.PsidOrRecipient,
audio: string | Types.MediaAttachmentPayload,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
audio: string | MessengerTypes.MediaAttachmentPayload,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -111,6 +111,6 @@ psidOrRecipient,

function sendImage(
psidOrRecipient: Types.PsidOrRecipient,
image: string | Types.MediaAttachmentPayload,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
image: string | MessengerTypes.MediaAttachmentPayload,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -124,6 +124,6 @@ psidOrRecipient,

function sendVideo(
psidOrRecipient: Types.PsidOrRecipient,
video: string | Types.MediaAttachmentPayload,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
video: string | MessengerTypes.MediaAttachmentPayload,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -137,6 +137,6 @@ psidOrRecipient,

function sendFile(
psidOrRecipient: Types.PsidOrRecipient,
file: string | Types.MediaAttachmentPayload,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
file: string | MessengerTypes.MediaAttachmentPayload,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -150,6 +150,6 @@ psidOrRecipient,

function sendTemplate(
psidOrRecipient: Types.PsidOrRecipient,
payload: Types.TemplateAttachmentPayload,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
payload: MessengerTypes.TemplateAttachmentPayload,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -163,7 +163,7 @@ psidOrRecipient,

function sendButtonTemplate(
psidOrRecipient: Types.PsidOrRecipient,
psidOrRecipient: MessengerTypes.PsidOrRecipient,
text: string,
buttons: Types.TemplateButton[],
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
buttons: MessengerTypes.TemplateButton[],
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -177,4 +177,4 @@ psidOrRecipient,

function sendGenericTemplate(
psidOrRecipient: Types.PsidOrRecipient,
elements: Types.TemplateElement[],
psidOrRecipient: MessengerTypes.PsidOrRecipient,
elements: MessengerTypes.TemplateElement[],
{

@@ -185,4 +185,4 @@ imageAspectRatio = 'horizontal',

imageAspectRatio?: 'horizontal' | 'square';
} & Types.SendOption = {}
): Types.BatchItem {
} & MessengerTypes.SendOption = {}
): MessengerTypes.BatchItem {
return sendMessage(

@@ -200,9 +200,9 @@ psidOrRecipient,

function sendReceiptTemplate(
psidOrRecipient: Types.PsidOrRecipient,
attrs: Types.ReceiptAttributes,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
receipt: MessengerTypes.ReceiptAttributes,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(
psidOrRecipient,
Messenger.createReceiptTemplate(attrs, options),
Messenger.createReceiptTemplate(receipt, options),
options

@@ -213,6 +213,6 @@ );

function sendMediaTemplate(
psidOrRecipient: Types.PsidOrRecipient,
elements: Types.MediaElement[],
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
elements: MessengerTypes.MediaElement[],
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -226,6 +226,6 @@ psidOrRecipient,

function sendAirlineBoardingPassTemplate(
psidOrRecipient: Types.PsidOrRecipient,
attrs: Types.AirlineBoardingPassAttributes,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
attrs: MessengerTypes.AirlineBoardingPassAttributes,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -239,6 +239,6 @@ psidOrRecipient,

function sendAirlineCheckinTemplate(
psidOrRecipient: Types.PsidOrRecipient,
attrs: Types.AirlineCheckinAttributes,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
attrs: MessengerTypes.AirlineCheckinAttributes,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -252,6 +252,6 @@ psidOrRecipient,

function sendAirlineItineraryTemplate(
psidOrRecipient: Types.PsidOrRecipient,
attrs: Types.AirlineItineraryAttributes,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
attrs: MessengerTypes.AirlineItineraryAttributes,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -265,6 +265,6 @@ psidOrRecipient,

function sendAirlineUpdateTemplate(
psidOrRecipient: Types.PsidOrRecipient,
attrs: Types.AirlineUpdateAttributes,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
attrs: MessengerTypes.AirlineUpdateAttributes,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -278,6 +278,6 @@ psidOrRecipient,

function sendOneTimeNotifReqTemplate(
psidOrRecipient: Types.PsidOrRecipient,
attrs: Types.OneTimeNotifReqAttributes,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
attrs: MessengerTypes.OneTimeNotifReqAttributes,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendMessage(

@@ -293,6 +293,6 @@ psidOrRecipient,

options: {
fields?: Types.UserProfileField[];
fields?: MessengerTypes.UserProfileField[];
accessToken?: string;
} & Types.BatchRequestOptions = {}
): Types.BatchItem {
} & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -321,4 +321,4 @@

accessToken?: string;
} & Types.BatchRequestOptions = {}
): Types.BatchItem {
} & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -337,7 +337,7 @@

userId: string,
menuItems: Types.MenuItem[] | Types.PersistentMenuItem[],
menuItems: MessengerTypes.MenuItem[] | MessengerTypes.PersistentMenuItem[],
options: {
accessToken?: string;
} & Types.BatchRequestOptions = {}
): Types.BatchItem {
} & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -347,3 +347,3 @@

menuItems.some(
(item: Types.MenuItem | Types.PersistentMenuItem) =>
(item: MessengerTypes.MenuItem | MessengerTypes.PersistentMenuItem) =>
'locale' in item && item.locale === 'default'

@@ -376,3 +376,3 @@ )

composerInputDisabled: false,
callToActions: menuItems as Types.MenuItem[],
callToActions: menuItems as MessengerTypes.MenuItem[],
},

@@ -389,4 +389,4 @@ ],

accessToken?: string;
} & Types.BatchRequestOptions = {}
): Types.BatchItem {
} & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -404,6 +404,6 @@

function sendSenderAction(
psidOrRecipient: Types.PsidOrRecipient,
senderAction: Types.SenderAction,
options: Types.SendOption & Types.BatchRequestOptions = {}
): Types.BatchItem {
psidOrRecipient: MessengerTypes.PsidOrRecipient,
senderAction: MessengerTypes.SenderAction,
options: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const recipient =

@@ -429,5 +429,5 @@ typeof psidOrRecipient === 'string'

function typingOn(
idOrRecipient: Types.PsidOrRecipient,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
idOrRecipient: MessengerTypes.PsidOrRecipient,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendSenderAction(idOrRecipient, 'typing_on', options);

@@ -437,5 +437,5 @@ }

function typingOff(
idOrRecipient: Types.PsidOrRecipient,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
idOrRecipient: MessengerTypes.PsidOrRecipient,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendSenderAction(idOrRecipient, 'typing_off', options);

@@ -445,5 +445,5 @@ }

function markSeen(
idOrRecipient: Types.PsidOrRecipient,
options?: Types.SendOption & Types.BatchRequestOptions
): Types.BatchItem {
idOrRecipient: MessengerTypes.PsidOrRecipient,
options?: MessengerTypes.SendOption & MessengerTypes.BatchRequestOptions
): MessengerTypes.BatchItem {
return sendSenderAction(idOrRecipient, 'mark_seen', options);

@@ -456,4 +456,4 @@ }

metadata?: string,
options: { accessToken?: string } & Types.BatchRequestOptions = {}
): Types.BatchItem {
options: { accessToken?: string } & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -477,4 +477,4 @@

metadata?: string,
options: { accessToken?: string } & Types.BatchRequestOptions = {}
): Types.BatchItem {
options: { accessToken?: string } & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
return passThreadControl(recipientId, 263902037430900, metadata, options);

@@ -486,4 +486,4 @@ }

metadata?: string,
options: { accessToken?: string } & Types.BatchRequestOptions = {}
): Types.BatchItem {
options: { accessToken?: string } & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -506,4 +506,4 @@

metadata?: string,
options: { accessToken?: string } & Types.BatchRequestOptions = {}
): Types.BatchItem {
options: { accessToken?: string } & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -525,4 +525,4 @@

recipientId: string,
options: { accessToken?: string } & Types.BatchRequestOptions = {}
): Types.BatchItem {
options: { accessToken?: string } & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -543,4 +543,4 @@

labelId: number,
options: { accessToken?: string } & Types.BatchRequestOptions = {}
): Types.BatchItem {
options: { accessToken?: string } & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -562,4 +562,4 @@

labelId: number,
options: { accessToken?: string } & Types.BatchRequestOptions = {}
): Types.BatchItem {
options: { accessToken?: string } & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -580,4 +580,4 @@

userId: string,
options: { accessToken?: string } & Types.BatchRequestOptions = {}
): Types.BatchItem {
options: { accessToken?: string } & MessengerTypes.BatchRequestOptions = {}
): MessengerTypes.BatchItem {
const batchRequestOptions = pickBatchOptions(options);

@@ -584,0 +584,0 @@

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

export type ClientConfig = {
accessToken: string;
appId?: string;
appSecret?: string;
version?: string;
origin?: string;
onRequest?: OnRequestFunction;
skipAppSecretProof?: boolean;
};
export 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;
};
/**
* 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 = {
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: {
export type TemplateButton = {
type: string;
url: string;
messengerExtensions: boolean;
webviewHeightRatio: string;
fallbackUrl: string;
title: string;
url?: string;
payload?: string;
webviewHeightRatio?: 'compact' | 'tall' | 'full';
};
buttons: TemplateButton[];
};
export type MediaElement = {
mediaType: 'image' | 'video';
attachmentId?: string;
url?: string;
buttons?: TemplateButton[];
};
export type MenuItem = TemplateButton;
export type Address = {
street1: string;
street2?: string;
city: string;
postalCode: string;
state: string;
country: string;
};
export type TemplateElement = {
title: string;
imageUrl: string;
subtitle: string;
defaultAction: {
type: string;
url: string;
messengerExtensions: boolean;
webviewHeightRatio: string;
fallbackUrl: string;
};
buttons: TemplateButton[];
};
export type Summary = {
subtotal?: number;
shippingCost?: number;
totalTax?: number;
totalCost: number;
};
export type MediaElement = {
mediaType: 'image' | 'video';
attachmentId?: string;
url?: string;
buttons?: TemplateButton[];
};
export type Adjustment = {
name?: string;
amount?: number;
};
export type Address = {
street1: string;
street2?: string;
city: string;
postalCode: string;
state: string;
country: string;
};
export type ReceiptElement = {
title: string;
subtitle?: string;
quantity?: number;
price: number;
currency?: string;
imageUrl: string;
};
export type Summary = {
subtotal?: number;
shippingCost?: number;
totalTax?: number;
totalCost: 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 Adjustment = {
name?: string;
amount?: number;
};
export type Airport = {
airportCode: string;
city: string;
terminal?: string;
gate?: string;
};
export type ReceiptElement = {
title: string;
subtitle?: string;
quantity?: number;
price: number;
currency?: string;
imageUrl: string;
};
export type FlightSchedule = {
boardingTime?: string;
departureTime: string;
arrivalTime?: 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 FlightInfo = {
connectionId: string;
segmentId: string | PassengerSegmentInfo;
flightNumber: string;
aircraftType?: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
travelClass: 'economy' | 'business' | 'first_class';
};
export type Airport = {
airportCode: string;
city: string;
terminal?: string;
gate?: string;
};
export type Field = {
label: string;
value: string;
};
export type FlightSchedule = {
boardingTime?: string;
departureTime: string;
arrivalTime?: string;
};
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 FlightInfo = {
connectionId: string;
segmentId: string | PassengerSegmentInfo;
flightNumber: string;
aircraftType?: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
travelClass: 'economy' | 'business' | 'first_class';
};
export type AirlineBoardingPassAttributes = {
introMessage: string;
locale: string;
boardingPass: BoardingPass[];
};
export type Field = {
label: string;
value: string;
};
export type PassengerInfo = {
passengerId: string;
ticketNumber?: string;
name: string;
};
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 ProductInfo = {
title: string;
value: string;
};
export type AirlineBoardingPassAttributes = {
introMessage: string;
locale: string;
boardingPass: BoardingPass[];
};
export type PassengerSegmentInfo = {
segmentId: string;
passengerId: string;
seat: string;
seatType: string;
productInfo?: ProductInfo[];
};
export type PassengerInfo = {
passengerId: string;
ticketNumber?: string;
name: string;
};
export type PriceInfo = {
title: string;
amount: string;
currency?: string;
};
export type ProductInfo = {
title: string;
value: string;
};
export type AirlineCheckinAttributes = {
introMessage: string;
locale: string;
pnrNumber?: string;
checkinUrl: string;
flightInfo: FlightInfo[];
};
export type PassengerSegmentInfo = {
segmentId: string;
passengerId: string;
seat: string;
seatType: string;
productInfo?: ProductInfo[];
};
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 PriceInfo = {
title: string;
amount: string;
currency?: string;
};
export type UpdateFlightInfo = {
flightNumber: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
};
export type AirlineCheckinAttributes = {
introMessage: string;
locale: string;
pnrNumber?: string;
checkinUrl: string;
flightInfo: FlightInfo[];
};
export type AirlineUpdateAttributes = {
introMessage: string;
themeColor?: string;
updateType: 'delay' | 'gate_change' | 'cancellation';
locale: string;
pnrNumber?: string;
updateFlightInfo: UpdateFlightInfo;
};
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 OneTimeNotifReqAttributes = {
title: string;
payload: string;
};
export type UpdateFlightInfo = {
flightNumber: string;
departureAirport: Airport;
arrivalAirport: Airport;
flightSchedule: FlightSchedule;
};
export type SenderAction = 'mark_seen' | 'typing_on' | 'typing_off';
export type AirlineUpdateAttributes = {
introMessage: string;
themeColor?: string;
updateType: 'delay' | 'gate_change' | 'cancellation';
locale: string;
pnrNumber?: string;
updateFlightInfo: UpdateFlightInfo;
};
/**
* 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 OneTimeNotifReqAttributes = {
title: string;
payload: string;
};
/**
* 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 SenderAction = 'mark_seen' | 'typing_on' | 'typing_off';
export type PersistentMenuItem = {
locale: string;
composerInputDisabled: boolean;
callToActions: MenuItem[];
};
/**
* 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 PersistentMenu = PersistentMenuItem[];
/**
* 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 GreetingConfig = {
locale: string;
text: string;
};
export type PersistentMenuItem = {
locale: string;
composerInputDisabled: boolean;
callToActions: MenuItem[];
};
export type IceBreaker = {
question: string;
payload: string;
};
export type PersistentMenu = PersistentMenuItem[];
export type UserPersistentMenu = {
userLevelPersistentMenu?: PersistentMenu;
pageLevelPersistentMenu?: PersistentMenu;
};
export type GreetingConfig = {
locale: string;
text: string;
};
export type MessengerProfile = {
getStarted?: {
export type IceBreaker = {
question: string;
payload: string;
};
persistentMenu?: PersistentMenu;
greeting?: {
locale: string;
text: string;
}[];
iceBreakers?: IceBreaker[];
whitelistedDomains?: string[];
accountLinkingUrl?: string;
paymentSettings?: {
privacyUrl?: string;
publicKey?: string;
testUsers?: string[];
export type UserPersistentMenu = {
userLevelPersistentMenu?: PersistentMenu;
pageLevelPersistentMenu?: PersistentMenu;
};
homeUrl?: {
url: string;
webviewHeightRatio: 'tall';
webviewShareButton?: 'hide' | 'show';
inTest: boolean;
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 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 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 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