@vonage/messages
Version:
Multi-channel messaging that integrates WhatsApp, Facebook, Viber, SMS, and MMS
40 lines • 1.39 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.File = void 0;
const MessengerFile_1 = require("./MessengerFile");
const debug_1 = __importDefault(require("debug"));
const log = (0, debug_1.default)('vonage:messages:messenger');
/**
* @deprecated please use the MessengerFile class instead
*
* @group Messenger
*/
class File extends MessengerFile_1.MessengerFile {
/**
* Constructs a new `File` instance.
*
* @param {FileObject} file - The file object containing the URL and optional caption.
* @param {string} to - The recipient's ID.
* @param {string} from - The sender's ID.
* @param {MessageType} messenger - The messenger object specifying the message category and tag.
* @param {string} clientRef - The client reference.
*/
constructor(file, to, from, messenger, clientRef) {
log('Please update to use the MessengerFile class instead');
super({
file: file,
to: to,
from: from,
messenger: {
category: messenger?.category,
tag: messenger?.tag,
},
clientRef: clientRef,
});
}
}
exports.File = File;
//# sourceMappingURL=File.js.map
;