Socket
Socket
Sign inDemoInstall

chat-bridge

Package Overview
Dependencies
86
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0-alpha to 1.2.0

48

dist/core/client.js

@@ -71,3 +71,3 @@ "use strict";

var static_1 = require("@fastify/static");
var constants_1 = require("@/core/constants");
var constants_1 = require("./constants");
var events_1 = require("events");

@@ -288,2 +288,22 @@ var undici_1 = require("undici");

/**
* Send a message
* @memberof Client
* @example
* client.send("USER_ID", {
* text: "Hello, World!",
* quick_replies: [
* {
* content_type: "text",
* title: "Hello",
* payload: "HELLO",
* }
* ]
* });
* @param {string} recipientId
* @param {object} message
*/
Client.prototype.send = function (recipientId, message) {
return this.sendApiMessage(recipientId, message);
};
/**
* Get page information

@@ -334,3 +354,3 @@ * @memberof Client

* @param {string} recipientId
* @param {string} type
* @param {string} type - image, audio, video, file
* @param {string} url

@@ -345,3 +365,3 @@ * @param {boolean} [isReusable=false]

attachment: {
type: type,
type: type, // image, audio, video, file
payload: {

@@ -424,4 +444,26 @@ url: url,

};
/**
* Set typing indicator
* @memberof Client
* @example
* client.setTyping("USER_ID", true);
* @param {string} recipientId
* @param {boolean} typing
*/
Client.prototype.setTyping = function (recipientId, typing) {
return __awaiter(this, void 0, void 0, function () {
var body;
return __generator(this, function (_a) {
body = {
recipient: {
id: recipientId
},
sender_action: typing ? 'typing_on' : 'typing_off'
};
return [2 /*return*/, this.sendRequest({ method: 'POST', path: 'messages', body: body })];
});
});
};
return Client;
}(events_1.EventEmitter));
exports.Client = Client;

7

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Constants = exports.Collections = exports.Client = void 0;
require("module-alias/register");
var client_1 = require("@/core/client");
var client_1 = require("./core/client");
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return client_1.Client; } });
var collections_1 = require("@/core/collections");
var collections_1 = require("./core/collections");
Object.defineProperty(exports, "Collections", { enumerable: true, get: function () { return collections_1.Collections; } });
var constants_1 = require("@/core/constants");
var constants_1 = require("./core/constants");
Object.defineProperty(exports, "Constants", { enumerable: true, get: function () { return constants_1.Constants; } });
{
"name": "chat-bridge",
"version": "1.1.0-alpha",
"version": "1.2.0",
"description": "Chat Bridge simplifies the integration of Facebook Messenger webhook handling into your Node.js applications.",

@@ -29,3 +29,8 @@ "repository": {

"homepage": "https://onyx-innovators.github.io/Chat-Bridge/",
"dependencies": {
"@fastify/static": "^6.12.0",
"fastify": "^4.25.2",
"undici": "^6.2.1"
},
"main": "dist/index.js"
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc