@webex/plugin-webhooks 3.0.0-bnr.5 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +6 -0
- package/babel.config.js +3 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/webhooks.js +2 -4
- package/dist/webhooks.js.map +1 -1
- package/jest.config.js +3 -0
- package/package.json +26 -10
- package/process +1 -0
- package/test/integration/spec/webhooks.js +2 -1
- package/dist/plugin-webhooks.d.ts +0 -10
- package/dist/tsdoc-metadata.json +0 -11
- package/dist/types/index.d.ts +0 -2
- package/dist/types/webhooks.d.ts +0 -48
package/.eslintrc.js
ADDED
package/babel.config.js
ADDED
package/dist/index.js
CHANGED
|
@@ -13,6 +13,5 @@ var _webhooks = _interopRequireDefault(require("./webhooks"));
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
(0, _webexCore.registerPlugin)('webhooks', _webhooks.default);
|
|
16
|
-
var _default = _webhooks.default;
|
|
17
|
-
exports.default = _default;
|
|
16
|
+
var _default = exports.default = _webhooks.default;
|
|
18
17
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerPlugin","Webhooks"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {registerPlugin} from '@webex/webex-core';\n\nimport Webhooks from './webhooks';\n\nregisterPlugin('webhooks', Webhooks);\n\nexport default Webhooks;\n"],"mappings":";;;;;;;;AAIA;AAEA;AANA;AACA;AACA;;AAMA,
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_webhooks","_interopRequireDefault","registerPlugin","Webhooks","_default","exports","default"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {registerPlugin} from '@webex/webex-core';\n\nimport Webhooks from './webhooks';\n\nregisterPlugin('webhooks', Webhooks);\n\nexport default Webhooks;\n"],"mappings":";;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AANA;AACA;AACA;;AAMA,IAAAG,yBAAc,EAAC,UAAU,EAAEC,iBAAQ,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEtBH,iBAAQ"}
|
package/dist/webhooks.js
CHANGED
|
@@ -20,7 +20,6 @@ var _webexCore = require("@webex/webex-core");
|
|
|
20
20
|
* @property {string} name - A user-friendly name for this webhook
|
|
21
21
|
* @property {string} created - (server generated) The date and time that the webhook was created
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
23
|
/**
|
|
25
24
|
* Webhooks allow your app to be notified via HTTP when a specific event
|
|
26
25
|
* occurs on Webex. For example, your app can register a webhook to be
|
|
@@ -242,8 +241,7 @@ var Webhooks = _webexCore.WebexPlugin.extend({
|
|
|
242
241
|
return res.body;
|
|
243
242
|
});
|
|
244
243
|
},
|
|
245
|
-
version: "3.0.0
|
|
244
|
+
version: "3.0.0"
|
|
246
245
|
});
|
|
247
|
-
var _default = Webhooks;
|
|
248
|
-
exports.default = _default;
|
|
246
|
+
var _default = exports.default = Webhooks;
|
|
249
247
|
//# sourceMappingURL=webhooks.js.map
|
package/dist/webhooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Webhooks","WebexPlugin","extend","create","webhook","request","method","service","resource","body","then","res","get","id","items","list","options","qs","Page","webex","remove","statusCode","undefined","update"],"sources":["webhooks.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin, Page} from '@webex/webex-core';\n\n/**\n * @typedef {Object} WebhookObject\n * @property {string} id - (server generated) Unique identifier for the webhook\n * @property {string} resource - The resource type for the webhook\n * @property {string} event - The event type for the webhook\n * @property {string} filter - The filter that defines the webhook scope\n * @property {string} targetUrl - The URL that receives POST requests for each event\n * @property {string} name - A user-friendly name for this webhook\n * @property {string} created - (server generated) The date and time that the webhook was created\n */\n\n/**\n * Webhooks allow your app to be notified via HTTP when a specific event\n * occurs on Webex. For example, your app can register a webhook to be\n * notified when a new message is posted into a specific room.\n * @class\n */\nconst Webhooks = WebexPlugin.extend({\n /**\n * Posts a webhook.\n * @instance\n * @memberof Webhooks\n * @param {WebhookObject} webhook\n * @returns {Promise<Webhook>}\n * @example\n * webex.rooms.create({title: 'Create Webhook Example'})\n * .then(function(room) {\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(webhook) {\n * var assert = require('assert');\n * assert(webhook.id);\n * assert(webhook.resource);\n * assert(webhook.event);\n * assert(webhook.filter);\n * assert(webhook.targetUrl);\n * assert(webhook.name);\n * return 'success';\n * });\n * // => success\n */\n create(webhook) {\n return this.request({\n method: 'POST',\n service: 'hydra',\n resource: 'webhooks',\n body: webhook,\n }).then((res) => res.body);\n },\n\n /**\n * Shows details for a webhook.\n * @instance\n * @memberof Webhooks\n * @param {Webhook|string} webhook\n * @returns {Promise<Webhook>}\n * @example\n * var webhook;\n * webex.rooms.create({title: 'Get Webhook Example'})\n * .then(function(room) {\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(w) {\n * webhook = w;\n * return webex.webhooks.get(webhook.id);\n * })\n * .then(function(webhook2) {\n * var assert = require('assert');\n * assert.deepEqual(webhook2, webhook);\n * return 'success';\n * });\n * // => success\n */\n get(webhook) {\n const id = webhook.id || webhook;\n\n return this.request({\n service: 'hydra',\n resource: `webhooks/${id}`,\n }).then((res) => res.body.items || res.body);\n },\n\n /**\n * Lists all webhooks.\n * @instance\n * @memberof Webhooks\n * @param {Object} options\n * @param {integer} options.max Limit the maximum number of webhooks in the response.\n * @returns {Promise<Array<Webhook>>}\n * @example\n * var room, webhook;\n * webex.rooms.create({title: 'List Webhooks Example'})\n * .then(function(r) {\n * room = r;\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(w) {\n * webhook = w;\n * return webex.webhooks.list();\n * })\n * .then(function(webhooks) {\n * var assert = require('assert');\n * assert.equal(webhooks.items.filter(function(w) {\n * return w.id === webhook.id;\n * }).length, 1);\n * return 'success';\n * });\n * // => success\n */\n list(options) {\n return this.request({\n service: 'hydra',\n resource: 'webhooks/',\n qs: options,\n }).then((res) => new Page(res, this.webex));\n },\n\n /**\n * Delete a webhook.\n * @instance\n * @memberof Webhooks\n * @param {Webhook|string} webhook\n * @returns {Promise}\n * @example\n * var room, webhook;\n * webex.rooms.create({title: 'Remove Webhook Example'})\n * .then(function(r) {\n * room = r;\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(w) {\n * webhook = w;\n * return webex.webhooks.remove(webhook);\n * })\n * .then(function() {\n * return webex.webhooks.list();\n * })\n * .then(function(webhooks) {\n * var assert = require('assert');\n * assert.equal(webhooks.items.filter(function(w) {\n * return w.id === webhook.id;\n * }).length, 0);\n * return 'success';\n * });\n * // => success\n */\n remove(webhook) {\n const id = webhook.id || webhook;\n\n return this.request({\n method: 'DELETE',\n service: 'hydra',\n resource: `webhooks/${id}`,\n }).then((res) => {\n // Firefox has some issues with 204s and/or DELETE. This should move to\n // http-core\n if (res.statusCode === 204) {\n return undefined;\n }\n\n return res.body;\n });\n },\n\n /**\n * Update a webhook.\n * @instance\n * @memberof Webhooks\n * @param {Webhook} webhook\n * @returns {Promise<Webhook>}\n * @example\n * var webhook;\n * webex.rooms.create({title: 'Webhook Example'})\n * .then(function(room) {\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(w) {\n * webhook = w;\n * webhook.targetUrl = 'https://example.com/webhook/newtarget';\n * return webex.webhooks.update(webhook);\n * })\n * .then(function() {\n * return webex.webhooks.get(webhook);\n * })\n * .then(function(webhook) {\n * var assert = require('assert');\n * assert.equal(webhook.targetUrl, 'https://example.com/webhook/newtarget');\n * return 'success';\n * });\n * // => success\n */\n update(webhook) {\n const {id} = webhook;\n\n return this.request({\n method: 'PUT',\n service: 'hydra',\n resource: `webhooks/${id}`,\n body: webhook,\n }).then((res) => res.body);\n },\n});\n\nexport default Webhooks;\n"],"mappings":";;;;;;;AAIA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"names":["_webexCore","require","Webhooks","WebexPlugin","extend","create","webhook","request","method","service","resource","body","then","res","get","id","concat","items","list","options","_this","qs","Page","webex","remove","statusCode","undefined","update","version","_default","exports","default"],"sources":["webhooks.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin, Page} from '@webex/webex-core';\n\n/**\n * @typedef {Object} WebhookObject\n * @property {string} id - (server generated) Unique identifier for the webhook\n * @property {string} resource - The resource type for the webhook\n * @property {string} event - The event type for the webhook\n * @property {string} filter - The filter that defines the webhook scope\n * @property {string} targetUrl - The URL that receives POST requests for each event\n * @property {string} name - A user-friendly name for this webhook\n * @property {string} created - (server generated) The date and time that the webhook was created\n */\n\n/**\n * Webhooks allow your app to be notified via HTTP when a specific event\n * occurs on Webex. For example, your app can register a webhook to be\n * notified when a new message is posted into a specific room.\n * @class\n */\nconst Webhooks = WebexPlugin.extend({\n /**\n * Posts a webhook.\n * @instance\n * @memberof Webhooks\n * @param {WebhookObject} webhook\n * @returns {Promise<Webhook>}\n * @example\n * webex.rooms.create({title: 'Create Webhook Example'})\n * .then(function(room) {\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(webhook) {\n * var assert = require('assert');\n * assert(webhook.id);\n * assert(webhook.resource);\n * assert(webhook.event);\n * assert(webhook.filter);\n * assert(webhook.targetUrl);\n * assert(webhook.name);\n * return 'success';\n * });\n * // => success\n */\n create(webhook) {\n return this.request({\n method: 'POST',\n service: 'hydra',\n resource: 'webhooks',\n body: webhook,\n }).then((res) => res.body);\n },\n\n /**\n * Shows details for a webhook.\n * @instance\n * @memberof Webhooks\n * @param {Webhook|string} webhook\n * @returns {Promise<Webhook>}\n * @example\n * var webhook;\n * webex.rooms.create({title: 'Get Webhook Example'})\n * .then(function(room) {\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(w) {\n * webhook = w;\n * return webex.webhooks.get(webhook.id);\n * })\n * .then(function(webhook2) {\n * var assert = require('assert');\n * assert.deepEqual(webhook2, webhook);\n * return 'success';\n * });\n * // => success\n */\n get(webhook) {\n const id = webhook.id || webhook;\n\n return this.request({\n service: 'hydra',\n resource: `webhooks/${id}`,\n }).then((res) => res.body.items || res.body);\n },\n\n /**\n * Lists all webhooks.\n * @instance\n * @memberof Webhooks\n * @param {Object} options\n * @param {integer} options.max Limit the maximum number of webhooks in the response.\n * @returns {Promise<Array<Webhook>>}\n * @example\n * var room, webhook;\n * webex.rooms.create({title: 'List Webhooks Example'})\n * .then(function(r) {\n * room = r;\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(w) {\n * webhook = w;\n * return webex.webhooks.list();\n * })\n * .then(function(webhooks) {\n * var assert = require('assert');\n * assert.equal(webhooks.items.filter(function(w) {\n * return w.id === webhook.id;\n * }).length, 1);\n * return 'success';\n * });\n * // => success\n */\n list(options) {\n return this.request({\n service: 'hydra',\n resource: 'webhooks/',\n qs: options,\n }).then((res) => new Page(res, this.webex));\n },\n\n /**\n * Delete a webhook.\n * @instance\n * @memberof Webhooks\n * @param {Webhook|string} webhook\n * @returns {Promise}\n * @example\n * var room, webhook;\n * webex.rooms.create({title: 'Remove Webhook Example'})\n * .then(function(r) {\n * room = r;\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(w) {\n * webhook = w;\n * return webex.webhooks.remove(webhook);\n * })\n * .then(function() {\n * return webex.webhooks.list();\n * })\n * .then(function(webhooks) {\n * var assert = require('assert');\n * assert.equal(webhooks.items.filter(function(w) {\n * return w.id === webhook.id;\n * }).length, 0);\n * return 'success';\n * });\n * // => success\n */\n remove(webhook) {\n const id = webhook.id || webhook;\n\n return this.request({\n method: 'DELETE',\n service: 'hydra',\n resource: `webhooks/${id}`,\n }).then((res) => {\n // Firefox has some issues with 204s and/or DELETE. This should move to\n // http-core\n if (res.statusCode === 204) {\n return undefined;\n }\n\n return res.body;\n });\n },\n\n /**\n * Update a webhook.\n * @instance\n * @memberof Webhooks\n * @param {Webhook} webhook\n * @returns {Promise<Webhook>}\n * @example\n * var webhook;\n * webex.rooms.create({title: 'Webhook Example'})\n * .then(function(room) {\n * return webex.webhooks.create({\n * resource: 'messages',\n * event: 'created',\n * filter: 'roomId=' + room.id,\n * targetUrl: 'https://example.com/webhook',\n * name: 'Test Webhook'\n * });\n * })\n * .then(function(w) {\n * webhook = w;\n * webhook.targetUrl = 'https://example.com/webhook/newtarget';\n * return webex.webhooks.update(webhook);\n * })\n * .then(function() {\n * return webex.webhooks.get(webhook);\n * })\n * .then(function(webhook) {\n * var assert = require('assert');\n * assert.equal(webhook.targetUrl, 'https://example.com/webhook/newtarget');\n * return 'success';\n * });\n * // => success\n */\n update(webhook) {\n const {id} = webhook;\n\n return this.request({\n method: 'PUT',\n service: 'hydra',\n resource: `webhooks/${id}`,\n body: webhook,\n }).then((res) => res.body);\n },\n});\n\nexport default Webhooks;\n"],"mappings":";;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,QAAQ,GAAGC,sBAAW,CAACC,MAAM,CAAC;EAClC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,MAAM,WAAAA,OAACC,OAAO,EAAE;IACd,OAAO,IAAI,CAACC,OAAO,CAAC;MAClBC,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE,OAAO;MAChBC,QAAQ,EAAE,UAAU;MACpBC,IAAI,EAAEL;IACR,CAAC,CAAC,CAACM,IAAI,CAAC,UAACC,GAAG;MAAA,OAAKA,GAAG,CAACF,IAAI;IAAA,EAAC;EAC5B,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEG,GAAG,WAAAA,IAACR,OAAO,EAAE;IACX,IAAMS,EAAE,GAAGT,OAAO,CAACS,EAAE,IAAIT,OAAO;IAEhC,OAAO,IAAI,CAACC,OAAO,CAAC;MAClBE,OAAO,EAAE,OAAO;MAChBC,QAAQ,cAAAM,MAAA,CAAcD,EAAE;IAC1B,CAAC,CAAC,CAACH,IAAI,CAAC,UAACC,GAAG;MAAA,OAAKA,GAAG,CAACF,IAAI,CAACM,KAAK,IAAIJ,GAAG,CAACF,IAAI;IAAA,EAAC;EAC9C,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEO,IAAI,WAAAA,KAACC,OAAO,EAAE;IAAA,IAAAC,KAAA;IACZ,OAAO,IAAI,CAACb,OAAO,CAAC;MAClBE,OAAO,EAAE,OAAO;MAChBC,QAAQ,EAAE,WAAW;MACrBW,EAAE,EAAEF;IACN,CAAC,CAAC,CAACP,IAAI,CAAC,UAACC,GAAG;MAAA,OAAK,IAAIS,eAAI,CAACT,GAAG,EAAEO,KAAI,CAACG,KAAK,CAAC;IAAA,EAAC;EAC7C,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,MAAM,WAAAA,OAAClB,OAAO,EAAE;IACd,IAAMS,EAAE,GAAGT,OAAO,CAACS,EAAE,IAAIT,OAAO;IAEhC,OAAO,IAAI,CAACC,OAAO,CAAC;MAClBC,MAAM,EAAE,QAAQ;MAChBC,OAAO,EAAE,OAAO;MAChBC,QAAQ,cAAAM,MAAA,CAAcD,EAAE;IAC1B,CAAC,CAAC,CAACH,IAAI,CAAC,UAACC,GAAG,EAAK;MACf;MACA;MACA,IAAIA,GAAG,CAACY,UAAU,KAAK,GAAG,EAAE;QAC1B,OAAOC,SAAS;MAClB;MAEA,OAAOb,GAAG,CAACF,IAAI;IACjB,CAAC,CAAC;EACJ,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEgB,MAAM,WAAAA,OAACrB,OAAO,EAAE;IACd,IAAOS,EAAE,GAAIT,OAAO,CAAbS,EAAE;IAET,OAAO,IAAI,CAACR,OAAO,CAAC;MAClBC,MAAM,EAAE,KAAK;MACbC,OAAO,EAAE,OAAO;MAChBC,QAAQ,cAAAM,MAAA,CAAcD,EAAE,CAAE;MAC1BJ,IAAI,EAAEL;IACR,CAAC,CAAC,CAACM,IAAI,CAAC,UAACC,GAAG;MAAA,OAAKA,GAAG,CAACF,IAAI;IAAA,EAAC;EAC5B,CAAC;EAAAiB,OAAA;AACH,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEY7B,QAAQ"}
|
package/jest.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-webhooks",
|
|
3
|
-
"version": "3.0.0-bnr.5",
|
|
4
3
|
"description": "",
|
|
5
4
|
"license": "MIT",
|
|
6
5
|
"main": "dist/index.js",
|
|
@@ -20,15 +19,32 @@
|
|
|
20
19
|
]
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
23
|
-
"@
|
|
24
|
-
"@webex/
|
|
22
|
+
"@babel/core": "^7.17.10",
|
|
23
|
+
"@webex/babel-config-legacy": "0.0.0",
|
|
24
|
+
"@webex/eslint-config-legacy": "0.0.0",
|
|
25
|
+
"@webex/jest-config-legacy": "0.0.0",
|
|
26
|
+
"@webex/legacy-tools": "0.0.0",
|
|
27
|
+
"@webex/test-helper-chai": "3.0.0",
|
|
28
|
+
"@webex/test-helper-mocha": "3.0.0",
|
|
29
|
+
"@webex/test-helper-mock-webex": "3.0.0",
|
|
30
|
+
"@webex/test-helper-test-users": "3.0.0",
|
|
31
|
+
"eslint": "^8.24.0",
|
|
32
|
+
"prettier": "^2.7.1",
|
|
25
33
|
"sinon": "^9.2.4"
|
|
26
34
|
},
|
|
27
35
|
"dependencies": {
|
|
28
|
-
"@webex/internal-plugin-device": "3.0.0
|
|
29
|
-
"@webex/plugin-logger": "3.0.0
|
|
30
|
-
"@webex/plugin-rooms": "3.0.0
|
|
31
|
-
"@webex/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
"@webex/internal-plugin-device": "3.0.0",
|
|
37
|
+
"@webex/plugin-logger": "3.0.0",
|
|
38
|
+
"@webex/plugin-rooms": "3.0.0",
|
|
39
|
+
"@webex/webex-core": "3.0.0"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "yarn build:src",
|
|
43
|
+
"build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
|
|
44
|
+
"deploy:npm": "yarn npm publish",
|
|
45
|
+
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
46
|
+
"test:browser": "webex-legacy-tools test --integration --runner karma",
|
|
47
|
+
"test:style": "eslint ./src/**/*.*"
|
|
48
|
+
},
|
|
49
|
+
"version": "3.0.0"
|
|
50
|
+
}
|
package/process
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {browser: true};
|
|
@@ -11,7 +11,8 @@ import {assert} from '@webex/test-helper-chai';
|
|
|
11
11
|
import sinon from 'sinon';
|
|
12
12
|
import testUsers from '@webex/test-helper-test-users';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// SPARK-413317
|
|
15
|
+
describe.skip('plugin-webhooks', function () {
|
|
15
16
|
this.timeout(60000);
|
|
16
17
|
|
|
17
18
|
let webex;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Webhooks allow your app to be notified via HTTP when a specific event
|
|
3
|
-
* occurs on Webex. For example, your app can register a webhook to be
|
|
4
|
-
* notified when a new message is posted into a specific room.
|
|
5
|
-
* @class
|
|
6
|
-
*/
|
|
7
|
-
declare const Webhooks: any;
|
|
8
|
-
export default Webhooks;
|
|
9
|
-
|
|
10
|
-
export { }
|
package/dist/tsdoc-metadata.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.34.4"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
package/dist/types/index.d.ts
DELETED
package/dist/types/webhooks.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export default Webhooks;
|
|
2
|
-
export type WebhookObject = {
|
|
3
|
-
/**
|
|
4
|
-
* - (server generated) Unique identifier for the webhook
|
|
5
|
-
*/
|
|
6
|
-
id: string;
|
|
7
|
-
/**
|
|
8
|
-
* - The resource type for the webhook
|
|
9
|
-
*/
|
|
10
|
-
resource: string;
|
|
11
|
-
/**
|
|
12
|
-
* - The event type for the webhook
|
|
13
|
-
*/
|
|
14
|
-
event: string;
|
|
15
|
-
/**
|
|
16
|
-
* - The filter that defines the webhook scope
|
|
17
|
-
*/
|
|
18
|
-
filter: string;
|
|
19
|
-
/**
|
|
20
|
-
* - The URL that receives POST requests for each event
|
|
21
|
-
*/
|
|
22
|
-
targetUrl: string;
|
|
23
|
-
/**
|
|
24
|
-
* - A user-friendly name for this webhook
|
|
25
|
-
*/
|
|
26
|
-
name: string;
|
|
27
|
-
/**
|
|
28
|
-
* - (server generated) The date and time that the webhook was created
|
|
29
|
-
*/
|
|
30
|
-
created: string;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* @typedef {Object} WebhookObject
|
|
34
|
-
* @property {string} id - (server generated) Unique identifier for the webhook
|
|
35
|
-
* @property {string} resource - The resource type for the webhook
|
|
36
|
-
* @property {string} event - The event type for the webhook
|
|
37
|
-
* @property {string} filter - The filter that defines the webhook scope
|
|
38
|
-
* @property {string} targetUrl - The URL that receives POST requests for each event
|
|
39
|
-
* @property {string} name - A user-friendly name for this webhook
|
|
40
|
-
* @property {string} created - (server generated) The date and time that the webhook was created
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* Webhooks allow your app to be notified via HTTP when a specific event
|
|
44
|
-
* occurs on Webex. For example, your app can register a webhook to be
|
|
45
|
-
* notified when a new message is posted into a specific room.
|
|
46
|
-
* @class
|
|
47
|
-
*/
|
|
48
|
-
declare const Webhooks: any;
|