@webex/plugin-attachment-actions 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 ADDED
@@ -0,0 +1,6 @@
1
+ const config = {
2
+ root: true,
3
+ extends: ['@webex/eslint-config-legacy'],
4
+ };
5
+
6
+ module.exports = config;
@@ -0,0 +1,3 @@
1
+ const babelConfigLegacy = require('@webex/babel-config-legacy');
2
+
3
+ module.exports = babelConfigLegacy;
@@ -8,9 +8,9 @@ _Object$defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _apply = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/reflect/apply"));
10
10
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
11
- var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
12
11
  var _webexCore = require("@webex/webex-core");
13
12
  var _common = require("@webex/common");
13
+ var _lodash = require("lodash");
14
14
  /*!
15
15
  * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.
16
16
  */
@@ -279,7 +279,7 @@ var AttachmentActions = _webexCore.WebexPlugin.extend({
279
279
  */
280
280
  getattachmentActionEvent: function getattachmentActionEvent(activity, event) {
281
281
  try {
282
- var sdkEvent = (0, _cloneDeep2.default)(this.eventEnvelope);
282
+ var sdkEvent = (0, _lodash.cloneDeep)(this.eventEnvelope);
283
283
  var cluster = (0, _common.getHydraClusterString)(this.webex, activity.target.url);
284
284
  sdkEvent.event = event;
285
285
  sdkEvent.data.created = activity.published;
@@ -302,8 +302,7 @@ var AttachmentActions = _webexCore.WebexPlugin.extend({
302
302
  return null;
303
303
  }
304
304
  },
305
- version: "3.0.0-bnr.5"
305
+ version: "3.0.0"
306
306
  });
307
- var _default = AttachmentActions;
308
- exports.default = _default;
307
+ var _default = exports.default = AttachmentActions;
309
308
  //# sourceMappingURL=attachmentActions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["debug","require","AttachmentActions","WebexPlugin","extend","initialize","args","prototype","listen","createEventEnvelope","webex","SDK_EVENT","EXTERNAL","RESOURCE","ATTACHMENT_ACTIONS","then","envelope","eventEnvelope","internal","mercury","connect","listenTo","INTERNAL","WEBEX_ACTIVITY","event","onWebexApiEvent","create","attachmentAction","request","method","service","resource","body","res","get","id","items","activity","data","verb","ACTIVITY_VERB","CARD_ACTION","createdEvent","getattachmentActionEvent","EVENT_TYPE","CREATED","trigger","sdkEvent","cluster","getHydraClusterString","target","url","created","published","actorId","constructHydraId","hydraTypes","PEOPLE","actor","entryUUID","roomId","ROOM","messageId","MESSAGE","parent","personId","ATTACHMENT_ACTION","object","inputs","type","objectType","e","logger","error","message"],"sources":["attachmentActions.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin} from '@webex/webex-core';\nimport {\n SDK_EVENT,\n createEventEnvelope,\n constructHydraId,\n getHydraClusterString,\n hydraTypes,\n} from '@webex/common';\nimport {cloneDeep} from 'lodash';\n\nconst debug = require('debug')('attachmentActions');\n\n/**\n * @typedef {Object} AttachmentActionObject\n * @property {string} id - (server generated) Unique identifier for the attachment action\n * @property {string} messageId - The ID of the message in which attachment action is to be performed\n * @property {string} type - The type of attachment action eg., submit\n * @property {Object} inputs - The inputs for form fields in attachment message\n * @property {string} personId - (server generated) The ID for the author of the attachment action\n * @property {string} roomId - (server generated) The ID for the room of the message\n * @property {isoDate} created - (server generated) The date and time that the message was created\n */\n\n/**\n * AttachmentActions are events that communicate information when a user clicks on an\n * Action.Submit button in a card displayed in Webex\n * Information conveyed in an AttachmentAction includes details about the user that\n * clicked the button along with any card specific inputs. See the\n * {@link https://developer.webex.com/docs/api/v1/attachment-actions|Attachments Actions API Documentation}\n * for more details\n * @class\n */\nconst AttachmentActions = WebexPlugin.extend({\n /**\n * Initializer used to generate AttachmentActions\n * as a plugin wrapped around the provided arguments.\n * @private\n * @see WebexPlugin.initialize\n * @param {...any} args\n * @returns {undefined}\n */\n initialize(...args) {\n Reflect.apply(WebexPlugin.prototype.initialize, this, args);\n },\n\n /**\n * Register to listen for incoming attachmentAction events\n * This is an alternate approach to registering for attachmentAction webhooks.\n * The events passed to any registered handlers will be similar to the webhook JSON,\n * but will omit webhook specific fields such as name, secret, url, etc.\n * The attachmentActions.listen() event objects can also include additional fields not\n * available in the webhook's JSON payload, specifically: `inputs`.\n * To utilize the `listen()` method, the authorization token used\n * will need to have `spark:all` and `spark:kms` scopes enabled.\n * Note that by configuring your application to enable or disable `spark:all`\n * via its configuration page will also enable or disable `spark:kms`.\n * See the <a href=\"https://webex.github.io/webex-js-sdk/samples/browser-socket/\">Sample App</a>\n * for more details.\n * @instance\n * @memberof Messages\n * @returns {Promise}\n * @example\n * webex.attachmentActions.listen()\n * .then(() => {\n * console.log('listening to attachmentActions events');\n * webex.attachmentActions.on('created', (event) => console.log(`Got an attachmentActions:created event:\\n${event}`));\n * })\n * .catch((e) => console.error(`Unable to register for attachmentAction events: ${e}`));\n * // Some app logic...\n * // WHen it is time to cleanup\n * webex.attachmentActions.stopListening();\n * webex.attachmentActions.off('created');\n */\n listen() {\n // Create a common envelope that we will wrap all events in\n return createEventEnvelope(this.webex, SDK_EVENT.EXTERNAL.RESOURCE.ATTACHMENT_ACTIONS).then(\n (envelope) => {\n this.eventEnvelope = envelope;\n\n // Register to listen to events\n return this.webex.internal.mercury.connect().then(() => {\n this.listenTo(this.webex.internal.mercury, SDK_EVENT.INTERNAL.WEBEX_ACTIVITY, (event) =>\n this.onWebexApiEvent(event)\n );\n });\n }\n );\n },\n\n /**\n * Post a new attachment action for a message with attachment.\n * @instance\n * @memberof AttachmentActions\n * @param {AttachmentActionObject} attachmentAction\n * @returns {Promise<AttachmentActionObject>}\n * @example\n * webex.rooms.create({title: 'Create Message with card Example'})\n * .then(function(room) {\n * return webex.messages.create({\n * text: 'Howdy!',\n * roomId: room.id,\n * attachments:[ {\n * contentType: 'application/vnd.microsoft.card.adaptive',\n * content: {\n * type: 'AdaptiveCard',\n * version: '1.0',\n * body: [\n * {\n * type: 'TextBlock',\n * text: '',\n * size: 'large'\n * },\n * {\n * type: 'TextBlock',\n * text: 'Adaptive Cards',\n * separation: 'none'\n * }\n * {\n * type: 'Input.Date',\n * id: 'dueDate'\n * }\n * ],\n * actions: [\n * {\n * type: 'Action.Submit',\n * title: 'Due Date'\n * }\n * ]\n * }\n * }]\n * });\n * })\n * .then(function(message) {\n * return webex.attachmentActions.create({\n * type: 'submit',\n * messageId: message.id,\n * inputs:{\n * dueDate: '26/06/1995'\n * }\n * })\n * .then(function(attachmentAction)){\n * var assert = require('assert');\n * assert(attachmentAction.id);\n * assert(attachmentAction.type);\n * assert(attachmentAction.personId);\n * assert(attachmentAction.inputs);\n * assert(attachmentAction.messageId);\n * assert(attachmentAction.roomId);\n * assert(attachmentAction.created);\n * return 'success';\n * }\n * });\n * // => success\n */\n create(attachmentAction) {\n return this.request({\n method: 'POST',\n service: 'hydra',\n resource: 'attachment/actions',\n body: attachmentAction,\n }).then((res) => res.body);\n },\n\n /**\n * Returns a single attachment action.\n * @instance\n * @memberof AttachmentActions\n * @param {string} attachmentAction\n * @returns {Promise<AttachmentActionObject>}\n * @example\n * var attachmentAction;\n * webex.rooms.create({title: 'Get Message Example'})\n * .then(function(room) {\n * return webex.messages.create({\n * text: 'Howdy!',\n * roomId: room.id,\n * attachments:[ {\n * contentType: 'application/vnd.microsoft.card.adaptive',\n * content: {\n * type: 'AdaptiveCard',\n * version: '1.0',\n * body: [\n * {\n * type: 'TextBlock',\n * text: '',\n * size: 'large'\n * },\n * {\n * type: 'TextBlock',\n * text: 'Adaptive Cards',\n * separation: 'none'\n * },\n * {\n * type: 'Input.Date',\n * id: 'dueDate'\n * }\n * ],\n * actions: [\n * {\n * type: 'Action.Submit',\n * title: 'Due Date'\n * }\n * ]\n * }\n * }]\n * });\n * })\n * .then(function(message) {\n * return webex.attachmentActions.create({\n * type: 'submit',\n * messageId: message.id,\n * inputs:{\n * dueDate: '26/06/1995'\n * });\n * })\n * .then(function(attachmentAction) {\n * return webex.attachmentActions.get(attachmentAction.id)\n * })\n * .then(function(attachmentAction){\n * var assert = require('assert');\n * assert.deepEqual(attachmentAction, attachmentAction);\n * return 'success';\n * })\n * // => success\n */\n get(attachmentAction) {\n const id = attachmentAction.id || attachmentAction;\n\n return this.request({\n service: 'hydra',\n resource: `attachment/actions/${id}`,\n }).then((res) => res.body.items || res.body);\n },\n\n /**\n * This function is called when an internal mercury events fires,\n * if the user registered for these events with the listen() function.\n * External users of the SDK should not call this function\n * @private\n * @memberof AttachmentAction\n * @param {Object} event\n * @returns {void}\n */\n onWebexApiEvent(event) {\n const {activity} = event.data;\n\n /* eslint-disable no-case-declarations */\n switch (activity.verb) {\n case SDK_EVENT.INTERNAL.ACTIVITY_VERB.CARD_ACTION:\n const createdEvent = this.getattachmentActionEvent(\n activity,\n SDK_EVENT.EXTERNAL.EVENT_TYPE.CREATED\n );\n\n if (createdEvent) {\n debug(`attachmentAction \"created\" payload: \\\n ${JSON.stringify(createdEvent)}`);\n this.trigger(SDK_EVENT.EXTERNAL.EVENT_TYPE.CREATED, createdEvent);\n }\n break;\n\n default: {\n break;\n }\n }\n },\n\n /**\n * Constructs the data object for an event on the attachmentAction resource,\n * adhering to Hydra's Webhook data structure messages.\n * External users of the SDK should not call this function\n * @private\n * @memberof AttachmentAction\n * @param {Object} activity from mercury\n * @param {Object} event type of \"webhook\" event\n * @returns {Object} constructed event\n */\n getattachmentActionEvent(activity, event) {\n try {\n const sdkEvent = cloneDeep(this.eventEnvelope);\n const cluster = getHydraClusterString(this.webex, activity.target.url);\n\n sdkEvent.event = event;\n sdkEvent.data.created = activity.published;\n sdkEvent.actorId = constructHydraId(hydraTypes.PEOPLE, activity.actor.entryUUID, cluster);\n sdkEvent.data.roomId = constructHydraId(hydraTypes.ROOM, activity.target.id, cluster);\n sdkEvent.data.messageId = constructHydraId(hydraTypes.MESSAGE, activity.parent.id, cluster);\n sdkEvent.data.personId = constructHydraId(\n hydraTypes.PEOPLE,\n activity.actor.entryUUID,\n cluster\n );\n // Seems like it would be nice to have this, but its not in the hydra webhook\n // sdkEvent.data.personEmail =\n // activity.actor.emailAddress || activity.actor.entryEmail;\n\n sdkEvent.data.id = constructHydraId(hydraTypes.ATTACHMENT_ACTION, activity.id, cluster);\n if (activity.object.inputs) {\n sdkEvent.data.inputs = activity.object.inputs;\n }\n sdkEvent.data.type = activity.object.objectType;\n\n return sdkEvent;\n } catch (e) {\n this.webex.logger.error(`Unable to generate SDK event from mercury \\\n'socket activity for attachmentAction:${event} event: ${e.message}`);\n\n return null;\n }\n },\n});\n\nexport default AttachmentActions;\n"],"mappings":";;;;;;;;;;;AAIA;AACA;AALA;AACA;AACA;;AAYA,IAAMA,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,mBAAmB,CAAC;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,iBAAiB,GAAGC,sBAAW,CAACC,MAAM,CAAC;EAC3C;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,UAAU,wBAAU;IAAA,kCAANC,IAAI;MAAJA,IAAI;IAAA;IAChB,oBAAcH,sBAAW,CAACI,SAAS,CAACF,UAAU,EAAE,IAAI,EAAEC,IAAI,CAAC;EAC7D,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;EACEE,MAAM,oBAAG;IAAA;IACP;IACA,OAAO,IAAAC,2BAAmB,EAAC,IAAI,CAACC,KAAK,EAAEC,iBAAS,CAACC,QAAQ,CAACC,QAAQ,CAACC,kBAAkB,CAAC,CAACC,IAAI,CACzF,UAACC,QAAQ,EAAK;MACZ,KAAI,CAACC,aAAa,GAAGD,QAAQ;;MAE7B;MACA,OAAO,KAAI,CAACN,KAAK,CAACQ,QAAQ,CAACC,OAAO,CAACC,OAAO,EAAE,CAACL,IAAI,CAAC,YAAM;QACtD,KAAI,CAACM,QAAQ,CAAC,KAAI,CAACX,KAAK,CAACQ,QAAQ,CAACC,OAAO,EAAER,iBAAS,CAACW,QAAQ,CAACC,cAAc,EAAE,UAACC,KAAK;UAAA,OAClF,KAAI,CAACC,eAAe,CAACD,KAAK,CAAC;QAAA,EAC5B;MACH,CAAC,CAAC;IACJ,CAAC,CACF;EACH,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;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;EACEE,MAAM,kBAACC,gBAAgB,EAAE;IACvB,OAAO,IAAI,CAACC,OAAO,CAAC;MAClBC,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE,OAAO;MAChBC,QAAQ,EAAE,oBAAoB;MAC9BC,IAAI,EAAEL;IACR,CAAC,CAAC,CAACZ,IAAI,CAAC,UAACkB,GAAG;MAAA,OAAKA,GAAG,CAACD,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;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;AAC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AC;EAAA;AACH,CAAC,CAAC;AAAC,eAEYxE,iBAAiB;AAAA"}
1
+ {"version":3,"names":["_webexCore","require","_common","_lodash","debug","AttachmentActions","WebexPlugin","extend","initialize","_len","arguments","length","args","Array","_key","_apply","default","prototype","listen","_this","createEventEnvelope","webex","SDK_EVENT","EXTERNAL","RESOURCE","ATTACHMENT_ACTIONS","then","envelope","eventEnvelope","internal","mercury","connect","listenTo","INTERNAL","WEBEX_ACTIVITY","event","onWebexApiEvent","create","attachmentAction","request","method","service","resource","body","res","get","id","concat","items","activity","data","verb","ACTIVITY_VERB","CARD_ACTION","createdEvent","getattachmentActionEvent","EVENT_TYPE","CREATED","_stringify","trigger","sdkEvent","cloneDeep","cluster","getHydraClusterString","target","url","created","published","actorId","constructHydraId","hydraTypes","PEOPLE","actor","entryUUID","roomId","ROOM","messageId","MESSAGE","parent","personId","ATTACHMENT_ACTION","object","inputs","type","objectType","e","logger","error","message","version","_default","exports"],"sources":["attachmentActions.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin} from '@webex/webex-core';\nimport {\n SDK_EVENT,\n createEventEnvelope,\n constructHydraId,\n getHydraClusterString,\n hydraTypes,\n} from '@webex/common';\nimport {cloneDeep} from 'lodash';\n\nconst debug = require('debug')('attachmentActions');\n\n/**\n * @typedef {Object} AttachmentActionObject\n * @property {string} id - (server generated) Unique identifier for the attachment action\n * @property {string} messageId - The ID of the message in which attachment action is to be performed\n * @property {string} type - The type of attachment action eg., submit\n * @property {Object} inputs - The inputs for form fields in attachment message\n * @property {string} personId - (server generated) The ID for the author of the attachment action\n * @property {string} roomId - (server generated) The ID for the room of the message\n * @property {isoDate} created - (server generated) The date and time that the message was created\n */\n\n/**\n * AttachmentActions are events that communicate information when a user clicks on an\n * Action.Submit button in a card displayed in Webex\n * Information conveyed in an AttachmentAction includes details about the user that\n * clicked the button along with any card specific inputs. See the\n * {@link https://developer.webex.com/docs/api/v1/attachment-actions|Attachments Actions API Documentation}\n * for more details\n * @class\n */\nconst AttachmentActions = WebexPlugin.extend({\n /**\n * Initializer used to generate AttachmentActions\n * as a plugin wrapped around the provided arguments.\n * @private\n * @see WebexPlugin.initialize\n * @param {...any} args\n * @returns {undefined}\n */\n initialize(...args) {\n Reflect.apply(WebexPlugin.prototype.initialize, this, args);\n },\n\n /**\n * Register to listen for incoming attachmentAction events\n * This is an alternate approach to registering for attachmentAction webhooks.\n * The events passed to any registered handlers will be similar to the webhook JSON,\n * but will omit webhook specific fields such as name, secret, url, etc.\n * The attachmentActions.listen() event objects can also include additional fields not\n * available in the webhook's JSON payload, specifically: `inputs`.\n * To utilize the `listen()` method, the authorization token used\n * will need to have `spark:all` and `spark:kms` scopes enabled.\n * Note that by configuring your application to enable or disable `spark:all`\n * via its configuration page will also enable or disable `spark:kms`.\n * See the <a href=\"https://webex.github.io/webex-js-sdk/samples/browser-socket/\">Sample App</a>\n * for more details.\n * @instance\n * @memberof Messages\n * @returns {Promise}\n * @example\n * webex.attachmentActions.listen()\n * .then(() => {\n * console.log('listening to attachmentActions events');\n * webex.attachmentActions.on('created', (event) => console.log(`Got an attachmentActions:created event:\\n${event}`));\n * })\n * .catch((e) => console.error(`Unable to register for attachmentAction events: ${e}`));\n * // Some app logic...\n * // WHen it is time to cleanup\n * webex.attachmentActions.stopListening();\n * webex.attachmentActions.off('created');\n */\n listen() {\n // Create a common envelope that we will wrap all events in\n return createEventEnvelope(this.webex, SDK_EVENT.EXTERNAL.RESOURCE.ATTACHMENT_ACTIONS).then(\n (envelope) => {\n this.eventEnvelope = envelope;\n\n // Register to listen to events\n return this.webex.internal.mercury.connect().then(() => {\n this.listenTo(this.webex.internal.mercury, SDK_EVENT.INTERNAL.WEBEX_ACTIVITY, (event) =>\n this.onWebexApiEvent(event)\n );\n });\n }\n );\n },\n\n /**\n * Post a new attachment action for a message with attachment.\n * @instance\n * @memberof AttachmentActions\n * @param {AttachmentActionObject} attachmentAction\n * @returns {Promise<AttachmentActionObject>}\n * @example\n * webex.rooms.create({title: 'Create Message with card Example'})\n * .then(function(room) {\n * return webex.messages.create({\n * text: 'Howdy!',\n * roomId: room.id,\n * attachments:[ {\n * contentType: 'application/vnd.microsoft.card.adaptive',\n * content: {\n * type: 'AdaptiveCard',\n * version: '1.0',\n * body: [\n * {\n * type: 'TextBlock',\n * text: '',\n * size: 'large'\n * },\n * {\n * type: 'TextBlock',\n * text: 'Adaptive Cards',\n * separation: 'none'\n * }\n * {\n * type: 'Input.Date',\n * id: 'dueDate'\n * }\n * ],\n * actions: [\n * {\n * type: 'Action.Submit',\n * title: 'Due Date'\n * }\n * ]\n * }\n * }]\n * });\n * })\n * .then(function(message) {\n * return webex.attachmentActions.create({\n * type: 'submit',\n * messageId: message.id,\n * inputs:{\n * dueDate: '26/06/1995'\n * }\n * })\n * .then(function(attachmentAction)){\n * var assert = require('assert');\n * assert(attachmentAction.id);\n * assert(attachmentAction.type);\n * assert(attachmentAction.personId);\n * assert(attachmentAction.inputs);\n * assert(attachmentAction.messageId);\n * assert(attachmentAction.roomId);\n * assert(attachmentAction.created);\n * return 'success';\n * }\n * });\n * // => success\n */\n create(attachmentAction) {\n return this.request({\n method: 'POST',\n service: 'hydra',\n resource: 'attachment/actions',\n body: attachmentAction,\n }).then((res) => res.body);\n },\n\n /**\n * Returns a single attachment action.\n * @instance\n * @memberof AttachmentActions\n * @param {string} attachmentAction\n * @returns {Promise<AttachmentActionObject>}\n * @example\n * var attachmentAction;\n * webex.rooms.create({title: 'Get Message Example'})\n * .then(function(room) {\n * return webex.messages.create({\n * text: 'Howdy!',\n * roomId: room.id,\n * attachments:[ {\n * contentType: 'application/vnd.microsoft.card.adaptive',\n * content: {\n * type: 'AdaptiveCard',\n * version: '1.0',\n * body: [\n * {\n * type: 'TextBlock',\n * text: '',\n * size: 'large'\n * },\n * {\n * type: 'TextBlock',\n * text: 'Adaptive Cards',\n * separation: 'none'\n * },\n * {\n * type: 'Input.Date',\n * id: 'dueDate'\n * }\n * ],\n * actions: [\n * {\n * type: 'Action.Submit',\n * title: 'Due Date'\n * }\n * ]\n * }\n * }]\n * });\n * })\n * .then(function(message) {\n * return webex.attachmentActions.create({\n * type: 'submit',\n * messageId: message.id,\n * inputs:{\n * dueDate: '26/06/1995'\n * });\n * })\n * .then(function(attachmentAction) {\n * return webex.attachmentActions.get(attachmentAction.id)\n * })\n * .then(function(attachmentAction){\n * var assert = require('assert');\n * assert.deepEqual(attachmentAction, attachmentAction);\n * return 'success';\n * })\n * // => success\n */\n get(attachmentAction) {\n const id = attachmentAction.id || attachmentAction;\n\n return this.request({\n service: 'hydra',\n resource: `attachment/actions/${id}`,\n }).then((res) => res.body.items || res.body);\n },\n\n /**\n * This function is called when an internal mercury events fires,\n * if the user registered for these events with the listen() function.\n * External users of the SDK should not call this function\n * @private\n * @memberof AttachmentAction\n * @param {Object} event\n * @returns {void}\n */\n onWebexApiEvent(event) {\n const {activity} = event.data;\n\n /* eslint-disable no-case-declarations */\n switch (activity.verb) {\n case SDK_EVENT.INTERNAL.ACTIVITY_VERB.CARD_ACTION:\n const createdEvent = this.getattachmentActionEvent(\n activity,\n SDK_EVENT.EXTERNAL.EVENT_TYPE.CREATED\n );\n\n if (createdEvent) {\n debug(`attachmentAction \"created\" payload: \\\n ${JSON.stringify(createdEvent)}`);\n this.trigger(SDK_EVENT.EXTERNAL.EVENT_TYPE.CREATED, createdEvent);\n }\n break;\n\n default: {\n break;\n }\n }\n },\n\n /**\n * Constructs the data object for an event on the attachmentAction resource,\n * adhering to Hydra's Webhook data structure messages.\n * External users of the SDK should not call this function\n * @private\n * @memberof AttachmentAction\n * @param {Object} activity from mercury\n * @param {Object} event type of \"webhook\" event\n * @returns {Object} constructed event\n */\n getattachmentActionEvent(activity, event) {\n try {\n const sdkEvent = cloneDeep(this.eventEnvelope);\n const cluster = getHydraClusterString(this.webex, activity.target.url);\n\n sdkEvent.event = event;\n sdkEvent.data.created = activity.published;\n sdkEvent.actorId = constructHydraId(hydraTypes.PEOPLE, activity.actor.entryUUID, cluster);\n sdkEvent.data.roomId = constructHydraId(hydraTypes.ROOM, activity.target.id, cluster);\n sdkEvent.data.messageId = constructHydraId(hydraTypes.MESSAGE, activity.parent.id, cluster);\n sdkEvent.data.personId = constructHydraId(\n hydraTypes.PEOPLE,\n activity.actor.entryUUID,\n cluster\n );\n // Seems like it would be nice to have this, but its not in the hydra webhook\n // sdkEvent.data.personEmail =\n // activity.actor.emailAddress || activity.actor.entryEmail;\n\n sdkEvent.data.id = constructHydraId(hydraTypes.ATTACHMENT_ACTION, activity.id, cluster);\n if (activity.object.inputs) {\n sdkEvent.data.inputs = activity.object.inputs;\n }\n sdkEvent.data.type = activity.object.objectType;\n\n return sdkEvent;\n } catch (e) {\n this.webex.logger.error(`Unable to generate SDK event from mercury \\\n'socket activity for attachmentAction:${event} event: ${e.message}`);\n\n return null;\n }\n },\n});\n\nexport default AttachmentActions;\n"],"mappings":";;;;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAOA,IAAAE,OAAA,GAAAF,OAAA;AAZA;AACA;AACA;;AAYA,IAAMG,KAAK,GAAGH,OAAO,CAAC,OAAO,CAAC,CAAC,mBAAmB,CAAC;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMI,iBAAiB,GAAGC,sBAAW,CAACC,MAAM,CAAC;EAC3C;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,UAAU,WAAAA,WAAA,EAAU;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAANC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAChB,IAAAC,MAAA,CAAAC,OAAA,EAAcV,sBAAW,CAACW,SAAS,CAACT,UAAU,EAAE,IAAI,EAAEI,IAAI,CAAC;EAC7D,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;EACEM,MAAM,WAAAA,OAAA,EAAG;IAAA,IAAAC,KAAA;IACP;IACA,OAAO,IAAAC,2BAAmB,EAAC,IAAI,CAACC,KAAK,EAAEC,iBAAS,CAACC,QAAQ,CAACC,QAAQ,CAACC,kBAAkB,CAAC,CAACC,IAAI,CACzF,UAACC,QAAQ,EAAK;MACZR,KAAI,CAACS,aAAa,GAAGD,QAAQ;;MAE7B;MACA,OAAOR,KAAI,CAACE,KAAK,CAACQ,QAAQ,CAACC,OAAO,CAACC,OAAO,CAAC,CAAC,CAACL,IAAI,CAAC,YAAM;QACtDP,KAAI,CAACa,QAAQ,CAACb,KAAI,CAACE,KAAK,CAACQ,QAAQ,CAACC,OAAO,EAAER,iBAAS,CAACW,QAAQ,CAACC,cAAc,EAAE,UAACC,KAAK;UAAA,OAClFhB,KAAI,CAACiB,eAAe,CAACD,KAAK,CAAC;QAAA,CAC7B,CAAC;MACH,CAAC,CAAC;IACJ,CACF,CAAC;EACH,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;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;EACEE,MAAM,WAAAA,OAACC,gBAAgB,EAAE;IACvB,OAAO,IAAI,CAACC,OAAO,CAAC;MAClBC,MAAM,EAAE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MACD;MACA;MACA;;MAEAF,QAAQ,CAACV,IAAI,CAACJ,EAAE,GAAG,IAAAuB,wBAAgB,EAACC,kBAAU,CAACU,iBAAiB,EAAE/B,QAAQ,CAACH,EAAE,EAAEgB,OAAO,CAAC;MACvF,IAAIb,QAAQ,CAACgC,MAAM,CAACC,MAAM,EAAE;QAC1BtB,QAAQ,CAACV,IAAI,CAACgC,MAAM,GAAGjC,QAAQ,CAACgC,MAAM,CAACC,MAAM;MAC/C;MACAtB,QAAQ,CAACV,IAAI,CAACiC,IAAI,GAAGlC,QAAQ,CAACgC,MAAM,CAACG,UAAU;MAE/C,OAAOxB,QAAQ;IACjB,CAAC,CAAC,OAAOyB,CAAC,EAAE;MACV,IAAI,CAAChE,KAAK,CAACiE,MAAM,CAACC,KAAK,oFAAAxC,MAAA,CACWZ,KAAK,cAAAY,MAAA,CAAWsC,CAAC,CAACG,OAAO,CAAE,CAAC;MAE9D,OAAO,IAAI;IACb;EACF,CAAC;EAAAC,OAAA;AACH,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA3E,OAAA,GAEYX,iBAAiB"}
package/dist/index.js CHANGED
@@ -17,6 +17,5 @@ var _attachmentActions = _interopRequireDefault(require("./attachmentActions"));
17
17
  // decrypt mercury activities
18
18
 
19
19
  (0, _webexCore.registerPlugin)('attachmentActions', _attachmentActions.default);
20
- var _default = _attachmentActions.default;
21
- exports.default = _default;
20
+ var _default = exports.default = _attachmentActions.default;
22
21
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["registerPlugin","AttachmentActions"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport '@webex/internal-plugin-conversation'; // decrypt mercury activities\nimport '@webex/internal-plugin-mercury';\n\nimport {registerPlugin} from '@webex/webex-core';\n\nimport AttachmentActions from './attachmentActions';\n\nregisterPlugin('attachmentActions', AttachmentActions);\n\nexport default AttachmentActions;\n"],"mappings":";;;;;;;;AAIA;AACA;AAEA;AAEA;AATA;AACA;AACA;;AAE8C;;AAO9C,IAAAA,yBAAc,EAAC,mBAAmB,EAAEC,0BAAiB,CAAC;AAAC,eAExCA,0BAAiB;AAAA"}
1
+ {"version":3,"names":["require","_webexCore","_attachmentActions","_interopRequireDefault","registerPlugin","AttachmentActions","_default","exports","default"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport '@webex/internal-plugin-conversation'; // decrypt mercury activities\nimport '@webex/internal-plugin-mercury';\n\nimport {registerPlugin} from '@webex/webex-core';\n\nimport AttachmentActions from './attachmentActions';\n\nregisterPlugin('attachmentActions', AttachmentActions);\n\nexport default AttachmentActions;\n"],"mappings":";;;;;;;;AAIAA,OAAA;AACAA,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AATA;AACA;AACA;;AAE8C;;AAO9C,IAAAI,yBAAc,EAAC,mBAAmB,EAAEC,0BAAiB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAExCH,0BAAiB"}
package/jest.config.js ADDED
@@ -0,0 +1,3 @@
1
+ const config = require('@webex/jest-config-legacy');
2
+
3
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "name": "@webex/plugin-attachment-actions",
3
- "version": "3.0.0-bnr.5",
4
3
  "description": "",
5
4
  "license": "MIT",
6
5
  "contributors": [
@@ -23,17 +22,38 @@
23
22
  ]
24
23
  },
25
24
  "dependencies": {
26
- "@webex/common": "3.0.0-bnr.5",
27
- "@webex/internal-plugin-conversation": "3.0.0-bnr.5",
28
- "@webex/internal-plugin-mercury": "3.0.0-bnr.5",
29
- "@webex/plugin-attachment-actions": "3.0.0-bnr.5",
30
- "@webex/plugin-logger": "3.0.0-bnr.5",
31
- "@webex/plugin-messages": "3.0.0-bnr.5",
32
- "@webex/plugin-people": "3.0.0-bnr.5",
33
- "@webex/test-helper-chai": "3.0.0-bnr.5",
34
- "@webex/test-helper-test-users": "3.0.0-bnr.5",
35
- "@webex/webex-core": "3.0.0-bnr.5",
25
+ "@webex/common": "3.0.0",
26
+ "@webex/internal-plugin-conversation": "3.0.0",
27
+ "@webex/internal-plugin-mercury": "3.0.0",
28
+ "@webex/plugin-logger": "3.0.0",
29
+ "@webex/plugin-messages": "3.0.0",
30
+ "@webex/plugin-people": "3.0.0",
31
+ "@webex/test-helper-chai": "3.0.0",
32
+ "@webex/test-helper-test-users": "3.0.0",
33
+ "@webex/webex-core": "3.0.0",
36
34
  "debug": "^4.3.4",
37
35
  "lodash": "^4.17.21"
38
- }
39
- }
36
+ },
37
+ "scripts": {
38
+ "build": "yarn build:src",
39
+ "build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
40
+ "deploy:npm": "yarn npm publish",
41
+ "test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
42
+ "test:browser:broken": "webex-legacy-tools test --integration --runner karma",
43
+ "test:style": "eslint ./src/**/*.*"
44
+ },
45
+ "devDependencies": {
46
+ "@babel/core": "^7.17.10",
47
+ "@webex/babel-config-legacy": "0.0.0",
48
+ "@webex/eslint-config-legacy": "0.0.0",
49
+ "@webex/jest-config-legacy": "0.0.0",
50
+ "@webex/legacy-tools": "0.0.0",
51
+ "@webex/test-helper-chai": "3.0.0",
52
+ "@webex/test-helper-mocha": "3.0.0",
53
+ "@webex/test-helper-mock-webex": "3.0.0",
54
+ "@webex/test-helper-test-users": "3.0.0",
55
+ "eslint": "^8.24.0",
56
+ "prettier": "^2.7.1"
57
+ },
58
+ "version": "3.0.0"
59
+ }
package/process ADDED
@@ -0,0 +1 @@
1
+ module.exports = {browser: true};
@@ -1,13 +0,0 @@
1
- /**
2
- * AttachmentActions are events that communicate information when a user clicks on an
3
- * Action.Submit button in a card displayed in Webex
4
- * Information conveyed in an AttachmentAction includes details about the user that
5
- * clicked the button along with any card specific inputs. See the
6
- * {@link https://developer.webex.com/docs/api/v1/attachment-actions|Attachments Actions API Documentation}
7
- * for more details
8
- * @class
9
- */
10
- declare const AttachmentActions: any;
11
- export default AttachmentActions;
12
-
13
- export { }
@@ -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
- }
@@ -1,51 +0,0 @@
1
- export default AttachmentActions;
2
- export type AttachmentActionObject = {
3
- /**
4
- * - (server generated) Unique identifier for the attachment action
5
- */
6
- id: string;
7
- /**
8
- * - The ID of the message in which attachment action is to be performed
9
- */
10
- messageId: string;
11
- /**
12
- * - The type of attachment action eg., submit
13
- */
14
- type: string;
15
- /**
16
- * - The inputs for form fields in attachment message
17
- */
18
- inputs: any;
19
- /**
20
- * - (server generated) The ID for the author of the attachment action
21
- */
22
- personId: string;
23
- /**
24
- * - (server generated) The ID for the room of the message
25
- */
26
- roomId: string;
27
- /**
28
- * - (server generated) The date and time that the message was created
29
- */
30
- created: isoDate;
31
- };
32
- /**
33
- * @typedef {Object} AttachmentActionObject
34
- * @property {string} id - (server generated) Unique identifier for the attachment action
35
- * @property {string} messageId - The ID of the message in which attachment action is to be performed
36
- * @property {string} type - The type of attachment action eg., submit
37
- * @property {Object} inputs - The inputs for form fields in attachment message
38
- * @property {string} personId - (server generated) The ID for the author of the attachment action
39
- * @property {string} roomId - (server generated) The ID for the room of the message
40
- * @property {isoDate} created - (server generated) The date and time that the message was created
41
- */
42
- /**
43
- * AttachmentActions are events that communicate information when a user clicks on an
44
- * Action.Submit button in a card displayed in Webex
45
- * Information conveyed in an AttachmentAction includes details about the user that
46
- * clicked the button along with any card specific inputs. See the
47
- * {@link https://developer.webex.com/docs/api/v1/attachment-actions|Attachments Actions API Documentation}
48
- * for more details
49
- * @class
50
- */
51
- declare const AttachmentActions: any;
@@ -1,2 +0,0 @@
1
- export default AttachmentActions;
2
- import AttachmentActions from "./attachmentActions";