webex 3.0.0-beta.2 → 3.0.0-beta.20

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/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Webex
2
2
 
3
-
4
3
  [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
5
4
 
6
5
  # The Cisco Webex JS SDK
7
6
 
8
7
  > Upgrading from CiscoSpark to Webex?
8
+ >
9
9
  > - [Follow this short guide.](../../../UPGRADING.md)
10
10
  > - [Read why this is more than just a rebrand.](https://developer.webex.com/blog/the-new-cisco-webex-for-developers-is-here---what-developers-need-to-know-from-our-rebrand)
11
11
 
@@ -13,8 +13,8 @@
13
13
  - [The Cisco Webex JS SDK](#the-cisco-webex-js-sdk)
14
14
  - [Install](#install)
15
15
  - [Usage](#usage)
16
- - [_A note on browser usage_](#a-note-on-browser-usage)
17
- - [_Still using `webex/env` or `ciscospark/env`?_](#still-using-webexenv-or-ciscosparkenv)
16
+ - [_A note on browser usage_](#a-note-on-browser-usage)
17
+ - [_Still using `webex/env` or `ciscospark/env`?_](#still-using-webexenv-or-ciscosparkenv)
18
18
  - [API](#api)
19
19
  - [Maintainers](#maintainers)
20
20
  - [Contribute](#contribute)
package/browser.js CHANGED
@@ -3,6 +3,6 @@
3
3
  */
4
4
 
5
5
  // eslint-disable-next-line
6
- var Webex = window.webex = require('webex');
6
+ var Webex = (window.webex = require('webex'));
7
7
 
8
8
  module.exports = Webex;
package/dist/_setup.js CHANGED
@@ -1,26 +1,21 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
4
-
5
4
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
6
-
7
5
  /*!
8
6
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
9
7
  */
10
- // Disable eslint because this file needs to be es5 compatible
11
8
 
9
+ // Disable eslint because this file needs to be es5 compatible
12
10
  /* eslint-disable */
13
- var testUsers = require('@webex/test-helper-test-users');
14
11
 
12
+ var testUsers = require('@webex/test-helper-test-users');
15
13
  var Webex = require("webex");
16
-
17
14
  before(function () {
18
15
  this.timeout(60000);
19
-
20
16
  if (global.webex) {
21
17
  return _promise.default.resolve();
22
18
  }
23
-
24
19
  return testUsers.create({
25
20
  count: 1
26
21
  }).then(function (users) {
@@ -1 +1 @@
1
- {"version":3,"names":["testUsers","require","Webex","before","timeout","global","webex","resolve","create","count","then","users","credentials","token"],"sources":["_setup.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Disable eslint because this file needs to be es5 compatible\n/* eslint-disable */\n\nvar testUsers = require('@webex/test-helper-test-users');\nvar Webex = require(`webex`);\n\nbefore(function() {\n this.timeout(60000);\n\n if (global.webex) {\n return Promise.resolve();\n }\n\n return testUsers.create({count: 1})\n .then(function(users) {\n /* eslint camelcase: [0] */\n global.webex = new Webex({credentials: users[0].token});\n });\n});\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAEA;;AACA;AAEA,IAAIA,SAAS,GAAGC,OAAO,CAAC,+BAAD,CAAvB;;AACA,IAAIC,KAAK,GAAGD,OAAO,SAAnB;;AAEAE,MAAM,CAAC,YAAW;EAChB,KAAKC,OAAL,CAAa,KAAb;;EAEA,IAAIC,MAAM,CAACC,KAAX,EAAkB;IAChB,OAAO,iBAAQC,OAAR,EAAP;EACD;;EAED,OAAOP,SAAS,CAACQ,MAAV,CAAiB;IAACC,KAAK,EAAE;EAAR,CAAjB,EACJC,IADI,CACC,UAASC,KAAT,EAAgB;IACpB;IACAN,MAAM,CAACC,KAAP,GAAe,IAAIJ,KAAJ,CAAU;MAACU,WAAW,EAAED,KAAK,CAAC,CAAD,CAAL,CAASE;IAAvB,CAAV,CAAf;EACD,CAJI,CAAP;AAKD,CAZK,CAAN"}
1
+ {"version":3,"names":["testUsers","require","Webex","before","timeout","global","webex","resolve","create","count","then","users","credentials","token"],"sources":["_setup.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Disable eslint because this file needs to be es5 compatible\n/* eslint-disable */\n\nvar testUsers = require('@webex/test-helper-test-users');\nvar Webex = require(`webex`);\n\nbefore(function () {\n this.timeout(60000);\n\n if (global.webex) {\n return Promise.resolve();\n }\n\n return testUsers.create({count: 1}).then(function (users) {\n /* eslint camelcase: [0] */\n global.webex = new Webex({credentials: users[0].token});\n });\n});\n"],"mappings":";;;;AAAA;AACA;AACA;;AAEA;AACA;;AAEA,IAAIA,SAAS,GAAGC,OAAO,CAAC,+BAA+B,CAAC;AACxD,IAAIC,KAAK,GAAGD,OAAO,SAAS;AAE5BE,MAAM,CAAC,YAAY;EACjB,IAAI,CAACC,OAAO,CAAC,KAAK,CAAC;EAEnB,IAAIC,MAAM,CAACC,KAAK,EAAE;IAChB,OAAO,iBAAQC,OAAO,EAAE;EAC1B;EAEA,OAAOP,SAAS,CAACQ,MAAM,CAAC;IAACC,KAAK,EAAE;EAAC,CAAC,CAAC,CAACC,IAAI,CAAC,UAAUC,KAAK,EAAE;IACxD;IACAN,MAAM,CAACC,KAAK,GAAG,IAAIJ,KAAK,CAAC;MAACU,WAAW,EAAED,KAAK,CAAC,CAAC,CAAC,CAACE;IAAK,CAAC,CAAC;EACzD,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,15 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
4
  _Object$defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
-
9
7
  exports.default = void 0;
10
-
11
8
  var _webexCore = require("@webex/webex-core");
12
-
13
9
  /*!
14
10
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
15
11
  */
@@ -1 +1 @@
1
- {"version":3,"names":["boundedAdapter","MemoryStoreAdapter","unboundedAdapter"],"sources":["config-storage.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {MemoryStoreAdapter} from '@webex/webex-core';\n\nexport default {\n boundedAdapter: MemoryStoreAdapter,\n unboundedAdapter: MemoryStoreAdapter\n};\n"],"mappings":";;;;;;;;;;AAIA;;AAJA;AACA;AACA;eAIe;EACbA,cAAc,EAAEC,6BADH;EAEbC,gBAAgB,EAAED;AAFL,C"}
1
+ {"version":3,"names":["boundedAdapter","MemoryStoreAdapter","unboundedAdapter"],"sources":["config-storage.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {MemoryStoreAdapter} from '@webex/webex-core';\n\nexport default {\n boundedAdapter: MemoryStoreAdapter,\n unboundedAdapter: MemoryStoreAdapter,\n};\n"],"mappings":";;;;;;;AAIA;AAJA;AACA;AACA;AAFA,eAMe;EACbA,cAAc,EAAEC,6BAAkB;EAClCC,gBAAgB,EAAED;AACpB,CAAC;AAAA"}
@@ -1,19 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
6
-
7
5
  _Object$defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
-
11
8
  exports.default = void 0;
12
-
13
9
  var _webexCore = require("@webex/webex-core");
14
-
15
10
  var _storageAdapterLocalStorage = _interopRequireDefault(require("@webex/storage-adapter-local-storage"));
16
-
17
11
  /*!
18
12
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
19
13
  */
@@ -1 +1 @@
1
- {"version":3,"names":["boundedAdapter","LocalStorageStoreAdapter","unboundedAdapter","MemoryStoreAdapter"],"sources":["config-storage.shim.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {MemoryStoreAdapter} from '@webex/webex-core';\nimport LocalStorageStoreAdapter from '@webex/storage-adapter-local-storage';\n\nexport default {\n boundedAdapter: new LocalStorageStoreAdapter('webex'),\n unboundedAdapter: MemoryStoreAdapter\n};\n"],"mappings":";;;;;;;;;;;;AAIA;;AACA;;AALA;AACA;AACA;eAKe;EACbA,cAAc,EAAE,IAAIC,mCAAJ,CAA6B,OAA7B,CADH;EAEbC,gBAAgB,EAAEC;AAFL,C"}
1
+ {"version":3,"names":["boundedAdapter","LocalStorageStoreAdapter","unboundedAdapter","MemoryStoreAdapter"],"sources":["config-storage.shim.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {MemoryStoreAdapter} from '@webex/webex-core';\nimport LocalStorageStoreAdapter from '@webex/storage-adapter-local-storage';\n\nexport default {\n boundedAdapter: new LocalStorageStoreAdapter('webex'),\n unboundedAdapter: MemoryStoreAdapter,\n};\n"],"mappings":";;;;;;;;AAIA;AACA;AALA;AACA;AACA;AAFA,eAOe;EACbA,cAAc,EAAE,IAAIC,mCAAwB,CAAC,OAAO,CAAC;EACrDC,gBAAgB,EAAEC;AACpB,CAAC;AAAA"}
package/dist/config.js CHANGED
@@ -1,17 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
6
-
7
5
  _Object$defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
-
11
8
  exports.default = void 0;
12
-
13
9
  var _configStorage = _interopRequireDefault(require("./config-storage"));
14
-
15
10
  /*!
16
11
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
17
12
  */
@@ -1 +1 @@
1
- {"version":3,"names":["hydra","process","env","HYDRA_SERVICE_URL","hydraServiceUrl","credentials","clientType","device","validateDomains","ephemeral","storage","boundedAdapter","storageConfig","unboundedAdapter"],"sources":["config.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport storageConfig from './config-storage';\n\nexport default {\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n hydraServiceUrl: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n credentials: {\n clientType: 'confidential'\n },\n device: {\n validateDomains: true,\n ephemeral: true\n },\n storage: {\n boundedAdapter: storageConfig,\n unboundedAdapter: storageConfig\n }\n};\n"],"mappings":";;;;;;;;;;;;AAIA;;AAJA;AACA;AACA;eAIe;EACbA,KAAK,EAAEC,OAAO,CAACC,GAAR,CAAYC,iBAAZ,IAAiC,+BAD3B;EAEbC,eAAe,EAAEH,OAAO,CAACC,GAAR,CAAYC,iBAAZ,IAAiC,+BAFrC;EAGbE,WAAW,EAAE;IACXC,UAAU,EAAE;EADD,CAHA;EAMbC,MAAM,EAAE;IACNC,eAAe,EAAE,IADX;IAENC,SAAS,EAAE;EAFL,CANK;EAUbC,OAAO,EAAE;IACPC,cAAc,EAAEC,sBADT;IAEPC,gBAAgB,EAAED;EAFX;AAVI,C"}
1
+ {"version":3,"names":["hydra","process","env","HYDRA_SERVICE_URL","hydraServiceUrl","credentials","clientType","device","validateDomains","ephemeral","storage","boundedAdapter","storageConfig","unboundedAdapter"],"sources":["config.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport storageConfig from './config-storage';\n\nexport default {\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n hydraServiceUrl: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n credentials: {\n clientType: 'confidential',\n },\n device: {\n validateDomains: true,\n ephemeral: true,\n },\n storage: {\n boundedAdapter: storageConfig,\n unboundedAdapter: storageConfig,\n },\n};\n"],"mappings":";;;;;;;;AAIA;AAJA;AACA;AACA;AAFA,eAMe;EACbA,KAAK,EAAEC,OAAO,CAACC,GAAG,CAACC,iBAAiB,IAAI,+BAA+B;EACvEC,eAAe,EAAEH,OAAO,CAACC,GAAG,CAACC,iBAAiB,IAAI,+BAA+B;EACjFE,WAAW,EAAE;IACXC,UAAU,EAAE;EACd,CAAC;EACDC,MAAM,EAAE;IACNC,eAAe,EAAE,IAAI;IACrBC,SAAS,EAAE;EACb,CAAC;EACDC,OAAO,EAAE;IACPC,cAAc,EAAEC,sBAAa;IAC7BC,gBAAgB,EAAED;EACpB;AACF,CAAC;AAAA"}
package/dist/index.js CHANGED
@@ -9,8 +9,8 @@ if (!global._babelPolyfill) {
9
9
  /* eslint global-require: [0] */
10
10
  require('@babel/polyfill');
11
11
  }
12
-
13
12
  module.exports = require('./webex');
13
+
14
14
  /**
15
15
  * The date and time, specified in ISO 8601 extended offset date/time
16
16
  * format (e.g. `2015-10-18T14:26:16+00:00`).
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["global","_babelPolyfill","require","module","exports"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* istanbul ignore else */\nif (!global._babelPolyfill) {\n /* eslint global-require: [0] */\n require('@babel/polyfill');\n}\n\nmodule.exports = require('./webex');\n\n/**\n * The date and time, specified in ISO 8601 extended offset date/time\n * format (e.g. `2015-10-18T14:26:16+00:00`).\n *\n * @typedef {string} isoDate\n */\n\n/**\n * An email address, as a string.\n * @typedef {string} email\n */\n"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA,IAAI,CAACA,MAAM,CAACC,cAAZ,EAA4B;EAC1B;EACAC,OAAO,CAAC,iBAAD,CAAP;AACD;;AAEDC,MAAM,CAACC,OAAP,GAAiBF,OAAO,CAAC,SAAD,CAAxB;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA"}
1
+ {"version":3,"names":["global","_babelPolyfill","require","module","exports"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* istanbul ignore else */\nif (!global._babelPolyfill) {\n /* eslint global-require: [0] */\n require('@babel/polyfill');\n}\n\nmodule.exports = require('./webex');\n\n/**\n * The date and time, specified in ISO 8601 extended offset date/time\n * format (e.g. `2015-10-18T14:26:16+00:00`).\n *\n * @typedef {string} isoDate\n */\n\n/**\n * An email address, as a string.\n * @typedef {string} email\n */\n"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA,IAAI,CAACA,MAAM,CAACC,cAAc,EAAE;EAC1B;EACAC,OAAO,CAAC,iBAAiB,CAAC;AAC5B;AAEAC,MAAM,CAACC,OAAO,GAAGF,OAAO,CAAC,SAAS,CAAC;;AAEnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA"}
package/dist/webex.js CHANGED
@@ -3,52 +3,38 @@
3
3
  /*!
4
4
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
5
5
  */
6
+
6
7
  // Note: this file is written using commonjs instead of import/export to
7
8
  // simplify consumption by those less familiar with the current state of
8
9
  // JavaScript modularization
9
10
 
10
11
  /* eslint camelcase: [0] */
11
- require('@webex/plugin-authorization'); // explicitly load wdm, since we're relying on preDiscoveryServices and the
12
- // url interceptor
13
-
14
12
 
13
+ require('@webex/plugin-authorization');
14
+ // explicitly load wdm, since we're relying on preDiscoveryServices and the
15
+ // url interceptor
15
16
  require('@webex/internal-plugin-calendar');
16
-
17
17
  require('@webex/internal-plugin-device');
18
-
19
18
  require('@webex/internal-plugin-presence');
20
-
21
19
  require('@webex/internal-plugin-support');
22
-
20
+ require('@webex/internal-plugin-llm');
23
21
  require('@webex/plugin-attachment-actions');
24
-
25
22
  require('@webex/plugin-device-manager');
26
-
27
23
  require('@webex/plugin-logger');
28
-
29
24
  require('@webex/plugin-meetings');
30
-
31
25
  require('@webex/plugin-messages');
32
-
33
26
  require('@webex/plugin-memberships');
34
-
35
27
  require('@webex/plugin-people');
36
-
37
28
  require('@webex/plugin-rooms');
38
-
39
29
  require('@webex/plugin-teams');
40
-
41
30
  require('@webex/plugin-team-memberships');
42
-
43
31
  require('@webex/plugin-webhooks');
44
-
45
32
  var merge = require('lodash/merge');
46
-
47
33
  var WebexCore = require('@webex/webex-core').default;
34
+ var config = require('./config');
48
35
 
49
- var config = require('./config'); // documentation.js puts hashes in relative urls, so need to specify full urls
36
+ // documentation.js puts hashes in relative urls, so need to specify full urls
50
37
  // here
51
-
52
38
  /**
53
39
  * See {@link https://webex.github.io/webex-js-sdk/example/browsers|Browser Guide} and
54
40
  * {@link https://webex.github.io/webex-js-sdk/example/servers|Server Guide}
@@ -56,12 +42,11 @@ var config = require('./config'); // documentation.js puts hashes in relative ur
56
42
  * @see {@link /example/servers|Server Guide}
57
43
  * @class Webex
58
44
  */
59
-
60
-
61
45
  var Webex = WebexCore.extend({
62
46
  webex: true,
63
- version: "3.0.0-beta.2"
47
+ version: "3.0.0-beta.20"
64
48
  });
49
+
65
50
  /**
66
51
  * Create a new {@link Webex} instance
67
52
  *
@@ -87,13 +72,11 @@ var Webex = WebexCore.extend({
87
72
  * @memberof Webex
88
73
  * @returns {Webex}
89
74
  */
90
-
91
75
  Webex.init = function init() {
92
76
  var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
93
77
  attrs.config = merge({}, config, attrs.config); // eslint-disable-line no-param-reassign
94
78
 
95
79
  return new Webex(attrs);
96
80
  };
97
-
98
81
  module.exports = Webex;
99
82
  //# sourceMappingURL=webex.js.map
package/dist/webex.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["require","merge","WebexCore","default","config","Webex","extend","webex","version","init","attrs","module","exports"],"sources":["webex.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Note: this file is written using commonjs instead of import/export to\n// simplify consumption by those less familiar with the current state of\n// JavaScript modularization\n\n/* eslint camelcase: [0] */\n\nrequire('@webex/plugin-authorization');\n// explicitly load wdm, since we're relying on preDiscoveryServices and the\n// url interceptor\nrequire('@webex/internal-plugin-calendar');\nrequire('@webex/internal-plugin-device');\nrequire('@webex/internal-plugin-presence');\nrequire('@webex/internal-plugin-support');\nrequire('@webex/plugin-attachment-actions');\nrequire('@webex/plugin-device-manager');\nrequire('@webex/plugin-logger');\nrequire('@webex/plugin-meetings');\nrequire('@webex/plugin-messages');\nrequire('@webex/plugin-memberships');\nrequire('@webex/plugin-people');\nrequire('@webex/plugin-rooms');\nrequire('@webex/plugin-teams');\nrequire('@webex/plugin-team-memberships');\nrequire('@webex/plugin-webhooks');\n\nconst merge = require('lodash/merge');\nconst WebexCore = require('@webex/webex-core').default;\n\nconst config = require('./config');\n\n// documentation.js puts hashes in relative urls, so need to specify full urls\n// here\n/**\n * See {@link https://webex.github.io/webex-js-sdk/example/browsers|Browser Guide} and\n * {@link https://webex.github.io/webex-js-sdk/example/servers|Server Guide}\n * @see {@link /example/browsers|Browser Guide}\n * @see {@link /example/servers|Server Guide}\n * @class Webex\n */\nconst Webex = WebexCore.extend({\n webex: true,\n version: PACKAGE_VERSION\n});\n\n/**\n * Create a new {@link Webex} instance\n *\n * @example\n * <caption>Create a new Webex instance configured for your OAuth client</caption>\n * const webex = Webex.init({\n * config: {\n * credentials: {\n * authorizationString: `<AUTHORIZATION URL FROM DEVELOPER PORTAL>`\n * }\n * }\n * });\n *\n * @example\n * <caption>Create a new Webex instance configured for a Bot</caption>\n * const webex = Webex.init({\n * credentials: `<BOT TOKEN FROM DEVELOPER PORTAL>`\n * });\n *\n *\n * @param {Object} attrs\n * @param {Object} attrs.config (optional)\n * @memberof Webex\n * @returns {Webex}\n */\nWebex.init = function init(attrs = {}) {\n attrs.config = merge({}, config, attrs.config); // eslint-disable-line no-param-reassign\n\n return new Webex(attrs);\n};\n\nmodule.exports = Webex;\n"],"mappings":";;AAAA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AAEAA,OAAO,CAAC,6BAAD,CAAP,C,CACA;AACA;;;AACAA,OAAO,CAAC,iCAAD,CAAP;;AACAA,OAAO,CAAC,+BAAD,CAAP;;AACAA,OAAO,CAAC,iCAAD,CAAP;;AACAA,OAAO,CAAC,gCAAD,CAAP;;AACAA,OAAO,CAAC,kCAAD,CAAP;;AACAA,OAAO,CAAC,8BAAD,CAAP;;AACAA,OAAO,CAAC,sBAAD,CAAP;;AACAA,OAAO,CAAC,wBAAD,CAAP;;AACAA,OAAO,CAAC,wBAAD,CAAP;;AACAA,OAAO,CAAC,2BAAD,CAAP;;AACAA,OAAO,CAAC,sBAAD,CAAP;;AACAA,OAAO,CAAC,qBAAD,CAAP;;AACAA,OAAO,CAAC,qBAAD,CAAP;;AACAA,OAAO,CAAC,gCAAD,CAAP;;AACAA,OAAO,CAAC,wBAAD,CAAP;;AAEA,IAAMC,KAAK,GAAGD,OAAO,CAAC,cAAD,CAArB;;AACA,IAAME,SAAS,GAAGF,OAAO,CAAC,mBAAD,CAAP,CAA6BG,OAA/C;;AAEA,IAAMC,MAAM,GAAGJ,OAAO,CAAC,UAAD,CAAtB,C,CAEA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMK,KAAK,GAAGH,SAAS,CAACI,MAAV,CAAiB;EAC7BC,KAAK,EAAE,IADsB;EAE7BC,OAAO;AAFsB,CAAjB,CAAd;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACAH,KAAK,CAACI,IAAN,GAAa,SAASA,IAAT,GAA0B;EAAA,IAAZC,KAAY,uEAAJ,EAAI;EACrCA,KAAK,CAACN,MAAN,GAAeH,KAAK,CAAC,EAAD,EAAKG,MAAL,EAAaM,KAAK,CAACN,MAAnB,CAApB,CADqC,CACW;;EAEhD,OAAO,IAAIC,KAAJ,CAAUK,KAAV,CAAP;AACD,CAJD;;AAMAC,MAAM,CAACC,OAAP,GAAiBP,KAAjB"}
1
+ {"version":3,"names":["require","merge","WebexCore","default","config","Webex","extend","webex","version","init","attrs","module","exports"],"sources":["webex.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n// Note: this file is written using commonjs instead of import/export to\n// simplify consumption by those less familiar with the current state of\n// JavaScript modularization\n\n/* eslint camelcase: [0] */\n\nrequire('@webex/plugin-authorization');\n// explicitly load wdm, since we're relying on preDiscoveryServices and the\n// url interceptor\nrequire('@webex/internal-plugin-calendar');\nrequire('@webex/internal-plugin-device');\nrequire('@webex/internal-plugin-presence');\nrequire('@webex/internal-plugin-support');\nrequire('@webex/internal-plugin-llm');\nrequire('@webex/plugin-attachment-actions');\nrequire('@webex/plugin-device-manager');\nrequire('@webex/plugin-logger');\nrequire('@webex/plugin-meetings');\nrequire('@webex/plugin-messages');\nrequire('@webex/plugin-memberships');\nrequire('@webex/plugin-people');\nrequire('@webex/plugin-rooms');\nrequire('@webex/plugin-teams');\nrequire('@webex/plugin-team-memberships');\nrequire('@webex/plugin-webhooks');\n\nconst merge = require('lodash/merge');\nconst WebexCore = require('@webex/webex-core').default;\n\nconst config = require('./config');\n\n// documentation.js puts hashes in relative urls, so need to specify full urls\n// here\n/**\n * See {@link https://webex.github.io/webex-js-sdk/example/browsers|Browser Guide} and\n * {@link https://webex.github.io/webex-js-sdk/example/servers|Server Guide}\n * @see {@link /example/browsers|Browser Guide}\n * @see {@link /example/servers|Server Guide}\n * @class Webex\n */\nconst Webex = WebexCore.extend({\n webex: true,\n version: PACKAGE_VERSION,\n});\n\n/**\n * Create a new {@link Webex} instance\n *\n * @example\n * <caption>Create a new Webex instance configured for your OAuth client</caption>\n * const webex = Webex.init({\n * config: {\n * credentials: {\n * authorizationString: `<AUTHORIZATION URL FROM DEVELOPER PORTAL>`\n * }\n * }\n * });\n *\n * @example\n * <caption>Create a new Webex instance configured for a Bot</caption>\n * const webex = Webex.init({\n * credentials: `<BOT TOKEN FROM DEVELOPER PORTAL>`\n * });\n *\n *\n * @param {Object} attrs\n * @param {Object} attrs.config (optional)\n * @memberof Webex\n * @returns {Webex}\n */\nWebex.init = function init(attrs = {}) {\n attrs.config = merge({}, config, attrs.config); // eslint-disable-line no-param-reassign\n\n return new Webex(attrs);\n};\n\nmodule.exports = Webex;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEAA,OAAO,CAAC,6BAA6B,CAAC;AACtC;AACA;AACAA,OAAO,CAAC,iCAAiC,CAAC;AAC1CA,OAAO,CAAC,+BAA+B,CAAC;AACxCA,OAAO,CAAC,iCAAiC,CAAC;AAC1CA,OAAO,CAAC,gCAAgC,CAAC;AACzCA,OAAO,CAAC,4BAA4B,CAAC;AACrCA,OAAO,CAAC,kCAAkC,CAAC;AAC3CA,OAAO,CAAC,8BAA8B,CAAC;AACvCA,OAAO,CAAC,sBAAsB,CAAC;AAC/BA,OAAO,CAAC,wBAAwB,CAAC;AACjCA,OAAO,CAAC,wBAAwB,CAAC;AACjCA,OAAO,CAAC,2BAA2B,CAAC;AACpCA,OAAO,CAAC,sBAAsB,CAAC;AAC/BA,OAAO,CAAC,qBAAqB,CAAC;AAC9BA,OAAO,CAAC,qBAAqB,CAAC;AAC9BA,OAAO,CAAC,gCAAgC,CAAC;AACzCA,OAAO,CAAC,wBAAwB,CAAC;AAEjC,IAAMC,KAAK,GAAGD,OAAO,CAAC,cAAc,CAAC;AACrC,IAAME,SAAS,GAAGF,OAAO,CAAC,mBAAmB,CAAC,CAACG,OAAO;AAEtD,IAAMC,MAAM,GAAGJ,OAAO,CAAC,UAAU,CAAC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMK,KAAK,GAAGH,SAAS,CAACI,MAAM,CAAC;EAC7BC,KAAK,EAAE,IAAI;EACXC,OAAO;AACT,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAH,KAAK,CAACI,IAAI,GAAG,SAASA,IAAI,GAAa;EAAA,IAAZC,KAAK,uEAAG,CAAC,CAAC;EACnCA,KAAK,CAACN,MAAM,GAAGH,KAAK,CAAC,CAAC,CAAC,EAAEG,MAAM,EAAEM,KAAK,CAACN,MAAM,CAAC,CAAC,CAAC;;EAEhD,OAAO,IAAIC,KAAK,CAACK,KAAK,CAAC;AACzB,CAAC;AAEDC,MAAM,CAACC,OAAO,GAAGP,KAAK"}
package/env.js CHANGED
@@ -11,7 +11,7 @@ if (inBrowser) {
11
11
  const Webex = require('webex');
12
12
 
13
13
  const webex = new Webex({
14
- credentials: process.env.WEBEX_ACCESS_TOKEN
14
+ credentials: process.env.WEBEX_ACCESS_TOKEN,
15
15
  });
16
16
 
17
17
  module.exports = webex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webex",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.20",
4
4
  "description": "SDK for Cisco Webex",
5
5
  "license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
6
6
  "contributors": [
@@ -34,34 +34,35 @@
34
34
  ]
35
35
  },
36
36
  "devDependencies": {
37
- "@webex/plugin-authorization": "3.0.0-beta.2",
38
- "@webex/test-helper-chai": "3.0.0-beta.2",
39
- "@webex/test-helper-mocha": "3.0.0-beta.2",
40
- "@webex/test-helper-test-users": "3.0.0-beta.2",
37
+ "@webex/plugin-authorization": "3.0.0-beta.20",
38
+ "@webex/test-helper-chai": "3.0.0-beta.20",
39
+ "@webex/test-helper-mocha": "3.0.0-beta.20",
40
+ "@webex/test-helper-test-users": "3.0.0-beta.20",
41
41
  "sinon": "^9.2.4",
42
- "webex": "3.0.0-beta.2"
42
+ "webex": "3.0.0-beta.20"
43
43
  },
44
44
  "dependencies": {
45
45
  "@babel/polyfill": "^7.12.1",
46
- "@webex/common": "3.0.0-beta.2",
47
- "@webex/internal-plugin-calendar": "3.0.0-beta.2",
48
- "@webex/internal-plugin-device": "3.0.0-beta.2",
49
- "@webex/internal-plugin-presence": "3.0.0-beta.2",
50
- "@webex/internal-plugin-support": "3.0.0-beta.2",
51
- "@webex/plugin-attachment-actions": "3.0.0-beta.2",
52
- "@webex/plugin-authorization": "3.0.0-beta.2",
53
- "@webex/plugin-device-manager": "3.0.0-beta.2",
54
- "@webex/plugin-logger": "3.0.0-beta.2",
55
- "@webex/plugin-meetings": "3.0.0-beta.2",
56
- "@webex/plugin-memberships": "3.0.0-beta.2",
57
- "@webex/plugin-messages": "3.0.0-beta.2",
58
- "@webex/plugin-people": "3.0.0-beta.2",
59
- "@webex/plugin-rooms": "3.0.0-beta.2",
60
- "@webex/plugin-team-memberships": "3.0.0-beta.2",
61
- "@webex/plugin-teams": "3.0.0-beta.2",
62
- "@webex/plugin-webhooks": "3.0.0-beta.2",
63
- "@webex/storage-adapter-local-storage": "3.0.0-beta.2",
64
- "@webex/webex-core": "3.0.0-beta.2",
46
+ "@webex/common": "3.0.0-beta.20",
47
+ "@webex/internal-plugin-calendar": "3.0.0-beta.20",
48
+ "@webex/internal-plugin-device": "3.0.0-beta.20",
49
+ "@webex/internal-plugin-llm": "3.0.0-beta.20",
50
+ "@webex/internal-plugin-presence": "3.0.0-beta.20",
51
+ "@webex/internal-plugin-support": "3.0.0-beta.20",
52
+ "@webex/plugin-attachment-actions": "3.0.0-beta.20",
53
+ "@webex/plugin-authorization": "3.0.0-beta.20",
54
+ "@webex/plugin-device-manager": "3.0.0-beta.20",
55
+ "@webex/plugin-logger": "3.0.0-beta.20",
56
+ "@webex/plugin-meetings": "3.0.0-beta.20",
57
+ "@webex/plugin-memberships": "3.0.0-beta.20",
58
+ "@webex/plugin-messages": "3.0.0-beta.20",
59
+ "@webex/plugin-people": "3.0.0-beta.20",
60
+ "@webex/plugin-rooms": "3.0.0-beta.20",
61
+ "@webex/plugin-team-memberships": "3.0.0-beta.20",
62
+ "@webex/plugin-teams": "3.0.0-beta.20",
63
+ "@webex/plugin-webhooks": "3.0.0-beta.20",
64
+ "@webex/storage-adapter-local-storage": "3.0.0-beta.20",
65
+ "@webex/webex-core": "3.0.0-beta.20",
65
66
  "lodash": "^4.17.21"
66
67
  }
67
68
  }
package/src/_setup.js CHANGED
@@ -8,16 +8,15 @@
8
8
  var testUsers = require('@webex/test-helper-test-users');
9
9
  var Webex = require(`webex`);
10
10
 
11
- before(function() {
11
+ before(function () {
12
12
  this.timeout(60000);
13
13
 
14
14
  if (global.webex) {
15
15
  return Promise.resolve();
16
16
  }
17
17
 
18
- return testUsers.create({count: 1})
19
- .then(function(users) {
20
- /* eslint camelcase: [0] */
21
- global.webex = new Webex({credentials: users[0].token});
22
- });
18
+ return testUsers.create({count: 1}).then(function (users) {
19
+ /* eslint camelcase: [0] */
20
+ global.webex = new Webex({credentials: users[0].token});
21
+ });
23
22
  });
@@ -6,5 +6,5 @@ import {MemoryStoreAdapter} from '@webex/webex-core';
6
6
 
7
7
  export default {
8
8
  boundedAdapter: MemoryStoreAdapter,
9
- unboundedAdapter: MemoryStoreAdapter
9
+ unboundedAdapter: MemoryStoreAdapter,
10
10
  };
@@ -7,5 +7,5 @@ import LocalStorageStoreAdapter from '@webex/storage-adapter-local-storage';
7
7
 
8
8
  export default {
9
9
  boundedAdapter: new LocalStorageStoreAdapter('webex'),
10
- unboundedAdapter: MemoryStoreAdapter
10
+ unboundedAdapter: MemoryStoreAdapter,
11
11
  };
package/src/config.js CHANGED
@@ -8,14 +8,14 @@ export default {
8
8
  hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',
9
9
  hydraServiceUrl: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',
10
10
  credentials: {
11
- clientType: 'confidential'
11
+ clientType: 'confidential',
12
12
  },
13
13
  device: {
14
14
  validateDomains: true,
15
- ephemeral: true
15
+ ephemeral: true,
16
16
  },
17
17
  storage: {
18
18
  boundedAdapter: storageConfig,
19
- unboundedAdapter: storageConfig
20
- }
19
+ unboundedAdapter: storageConfig,
20
+ },
21
21
  };
package/src/webex.js CHANGED
@@ -15,6 +15,7 @@ require('@webex/internal-plugin-calendar');
15
15
  require('@webex/internal-plugin-device');
16
16
  require('@webex/internal-plugin-presence');
17
17
  require('@webex/internal-plugin-support');
18
+ require('@webex/internal-plugin-llm');
18
19
  require('@webex/plugin-attachment-actions');
19
20
  require('@webex/plugin-device-manager');
20
21
  require('@webex/plugin-logger');
@@ -43,7 +44,7 @@ const config = require('./config');
43
44
  */
44
45
  const Webex = WebexCore.extend({
45
46
  webex: true,
46
- version: PACKAGE_VERSION
47
+ version: PACKAGE_VERSION,
47
48
  });
48
49
 
49
50
  /**
@@ -19,11 +19,12 @@ describe('webex', function () {
19
19
  nodeOnly(describe)('when WEBEX_ACCESS_TOKEN is set', () => {
20
20
  let initialEnvToken;
21
21
 
22
- before(() => testUsers.create({count: 1})
23
- .then(([user]) => {
22
+ before(() =>
23
+ testUsers.create({count: 1}).then(([user]) => {
24
24
  initialEnvToken = process.env.WEBEX_ACCESS_TOKEN;
25
25
  process.env.WEBEX_ACCESS_TOKEN = user.token.access_token;
26
- }));
26
+ })
27
+ );
27
28
 
28
29
  after(() => {
29
30
  process.env.WEBEX_ACCESS_TOKEN = initialEnvToken;
@@ -35,8 +36,9 @@ describe('webex', function () {
35
36
 
36
37
  assert.isTrue(webex.canAuthorize);
37
38
 
38
- return new Promise((resolve) => webex.once('ready', resolve))
39
- .then(() => assert.isTrue(webex.canAuthorize));
39
+ return new Promise((resolve) => webex.once('ready', resolve)).then(() =>
40
+ assert.isTrue(webex.canAuthorize)
41
+ );
40
42
  });
41
43
  });
42
44
  });
@@ -16,26 +16,26 @@ describe('webex', function () {
16
16
  credentials: {
17
17
  /* eslint-disable camelcase */
18
18
  client_id: 'id',
19
- client_secret: 'secret'
20
- }
21
- }
19
+ client_secret: 'secret',
20
+ },
21
+ },
22
22
  });
23
23
 
24
24
  assert.equal(webex.config.credentials.client_id, 'id');
25
25
  assert.equal(webex.config.credentials.client_secret, 'secret');
26
26
  });
27
27
 
28
- it('produces an authorized sdk instance', () => testUsers.create({count: 1})
29
- .then(([user]) => {
28
+ it('produces an authorized sdk instance', () =>
29
+ testUsers.create({count: 1}).then(([user]) => {
30
30
  const webex = Webex.init({
31
- credentials: user.token
31
+ credentials: user.token,
32
32
  });
33
33
 
34
34
  assert.isTrue(webex.canAuthorize);
35
35
 
36
36
  return webex.request({
37
37
  service: 'hydra',
38
- resource: '/build_info'
38
+ resource: '/build_info',
39
39
  });
40
40
  }));
41
41
  });
@@ -14,42 +14,20 @@ describe('webex', function () {
14
14
 
15
15
  let webex;
16
16
 
17
- before(() => testUsers.create({count: 1})
18
- .then(([user]) => {
17
+ before(() =>
18
+ testUsers.create({count: 1}).then(([user]) => {
19
19
  webex = new Webex({credentials: user.token});
20
- }));
20
+ })
21
+ );
21
22
 
22
23
  describe('Webex', () => {
23
24
  describe('#request', () => {
24
- it('can make requests', () => webex.request({
25
- service: 'hydra',
26
- resource: '/ping'
27
- })
28
- .then((res) => {
29
- assert.statusCode(res, 200);
30
- assert.property(res.options, 'headers');
31
- assert.property(res.options.headers, 'authorization');
32
- assert.isDefined(res.options.headers.authorization);
33
- assert.isNotNull(res.options.headers.authorization);
34
- }));
35
-
36
- it('includes webex in the spark-user-agent header', () => webex.request({
37
- service: 'hydra',
38
- resource: '/ping'
39
- })
40
- .then((res) => {
41
- assert.property(res, 'options');
42
- assert.property(res.options, 'headers');
43
- assert.property(res.options.headers, 'spark-user-agent');
44
- assert.equal(res.options.headers['spark-user-agent'], `webex/${pkg.version} (${typeof window === 'undefined' ? 'node' : 'web'})`);
45
- }));
46
-
47
- describe('after registering against wdm', () => {
48
- before(() => webex.internal.device.register());
49
- it('can make authorized requests', () => webex.request({
50
- service: 'hydra',
51
- resource: '/ping'
52
- })
25
+ it('can make requests', () =>
26
+ webex
27
+ .request({
28
+ service: 'hydra',
29
+ resource: '/ping',
30
+ })
53
31
  .then((res) => {
54
32
  assert.statusCode(res, 200);
55
33
  assert.property(res.options, 'headers');
@@ -58,13 +36,42 @@ describe('webex', function () {
58
36
  assert.isNotNull(res.options.headers.authorization);
59
37
  }));
60
38
 
39
+ it('includes webex in the spark-user-agent header', () =>
40
+ webex
41
+ .request({
42
+ service: 'hydra',
43
+ resource: '/ping',
44
+ })
45
+ .then((res) => {
46
+ assert.property(res, 'options');
47
+ assert.property(res.options, 'headers');
48
+ assert.property(res.options.headers, 'spark-user-agent');
49
+ assert.equal(
50
+ res.options.headers['spark-user-agent'],
51
+ `webex/${pkg.version} (${typeof window === 'undefined' ? 'node' : 'web'})`
52
+ );
53
+ }));
54
+
55
+ describe('after registering against wdm', () => {
56
+ before(() => webex.internal.device.register());
57
+ it('can make authorized requests', () =>
58
+ webex
59
+ .request({
60
+ service: 'hydra',
61
+ resource: '/ping',
62
+ })
63
+ .then((res) => {
64
+ assert.statusCode(res, 200);
65
+ assert.property(res.options, 'headers');
66
+ assert.property(res.options.headers, 'authorization');
67
+ assert.isDefined(res.options.headers.authorization);
68
+ assert.isNotNull(res.options.headers.authorization);
69
+ }));
70
+
61
71
  it('handles pagination', () => {
62
72
  const spy = sinon.spy();
63
73
 
64
- return Promise.all([
65
- webex.rooms.create({title: '1'}),
66
- webex.rooms.create({title: '2'})
67
- ])
74
+ return Promise.all([webex.rooms.create({title: '1'}), webex.rooms.create({title: '2'})])
68
75
  .then(() => webex.rooms.list({max: 1}))
69
76
  .then((rooms) => {
70
77
  assert.lengthOf(rooms, 1);
@@ -83,7 +90,7 @@ describe('webex', function () {
83
90
  }
84
91
 
85
92
  return Promise.resolve();
86
- }(rooms));
93
+ })(rooms);
87
94
  })
88
95
  .then(() => {
89
96
  assert.isAbove(spy.callCount, 1);
@@ -29,7 +29,7 @@ describe('webex', () => {
29
29
 
30
30
  const fedramp = {
31
31
  hydra: 'https://api-usgov.webex.com/v1',
32
- u2c: 'https://u2c.gov.ciscospark.com/u2c/api/v1'
32
+ u2c: 'https://u2c.gov.ciscospark.com/u2c/api/v1',
33
33
  };
34
34
 
35
35
  it('is set false by default', () => {
@@ -40,11 +40,11 @@ describe('webex', () => {
40
40
  it('sets correct services when fedramp is true', () => {
41
41
  webex = Webex.init({
42
42
  config: {
43
- fedramp: true
43
+ fedramp: true,
44
44
  },
45
45
  credentials: {
46
- access_token: 'Bearer 1234'
47
- }
46
+ access_token: 'Bearer 1234',
47
+ },
48
48
  });
49
49
 
50
50
  assert.property(webex.config, 'fedramp');