@webex/plugin-meetings 3.0.0-beta.416 → 3.0.0-beta.418

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.
@@ -209,7 +209,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
209
209
  sessionId: this.sessionId
210
210
  });
211
211
  },
212
- version: "3.0.0-beta.416"
212
+ version: "3.0.0-beta.418"
213
213
  });
214
214
  var _default = Breakout;
215
215
  exports.default = _default;
@@ -1041,7 +1041,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1041
1041
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1042
1042
  }
1043
1043
  },
1044
- version: "3.0.0-beta.416"
1044
+ version: "3.0.0-beta.418"
1045
1045
  });
1046
1046
  var _default = Breakouts;
1047
1047
  exports.default = _default;
@@ -373,7 +373,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
373
373
  throw error;
374
374
  });
375
375
  },
376
- version: "3.0.0-beta.416"
376
+ version: "3.0.0-beta.418"
377
377
  });
378
378
  var _default = SimultaneousInterpretation;
379
379
  exports.default = _default;
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.0.0-beta.416"
21
+ version: "3.0.0-beta.418"
22
22
  });
23
23
  var _default = SILanguage;
24
24
  exports.default = _default;
@@ -27,16 +27,18 @@ function ReachabilityRequest(webex) {
27
27
  (0, _classCallCheck2.default)(this, ReachabilityRequest);
28
28
  (0, _defineProperty2.default)(this, "webex", void 0);
29
29
  (0, _defineProperty2.default)(this, "getClusters", function (ipVersion) {
30
- return _this.webex.request({
31
- method: _constants.HTTP_VERBS.GET,
32
- shouldRefreshAccessToken: false,
33
- api: _constants.API.CALLIOPEDISCOVERY,
34
- resource: _constants.RESOURCE.CLUSTERS,
35
- qs: {
36
- JCSupport: 1,
37
- ipver: ipVersion
38
- }
39
- }).then(function (res) {
30
+ return _this.webex.internal.newMetrics.callDiagnosticLatencies.measureLatency(function () {
31
+ return _this.webex.request({
32
+ method: _constants.HTTP_VERBS.GET,
33
+ shouldRefreshAccessToken: false,
34
+ api: _constants.API.CALLIOPEDISCOVERY,
35
+ resource: _constants.RESOURCE.CLUSTERS,
36
+ qs: {
37
+ JCSupport: 1,
38
+ ipver: ipVersion
39
+ }
40
+ });
41
+ }, 'internal.get.cluster.time').then(function (res) {
40
42
  var _res$body = res.body,
41
43
  clusters = _res$body.clusters,
42
44
  joinCookie = _res$body.joinCookie;
@@ -1 +1 @@
1
- {"version":3,"names":["ReachabilityRequest","webex","ipVersion","request","method","HTTP_VERBS","GET","shouldRefreshAccessToken","api","API","CALLIOPEDISCOVERY","resource","RESOURCE","CLUSTERS","qs","JCSupport","ipver","then","res","body","clusters","joinCookie","forEach","key","isVideoMesh","clusterClasses","hybridMedia","includes","LoggerProxy","logger","log","localSDPList","POST","REACHABILITY","offers"],"sources":["request.ts"],"sourcesContent":["import LoggerProxy from '../common/logs/logger-proxy';\nimport {HTTP_VERBS, RESOURCE, API, IP_VERSION} from '../constants';\n\nexport interface ClusterNode {\n isVideoMesh: boolean;\n udp: Array<string>;\n tcp: Array<string>;\n xtls: Array<string>;\n}\n\nexport type ClusterList = {\n [key: string]: ClusterNode;\n};\n\n/**\n * @class ReachabilityRequest\n */\nclass ReachabilityRequest {\n webex: any;\n\n /**\n * Creates an instance of ReachabilityRequest.\n * @param {object} webex\n * @memberof ReachabilityRequest\n */\n constructor(webex: object) {\n this.webex = webex;\n }\n\n /**\n * Gets the cluster information\n *\n * @param {IP_VERSION} ipVersion information about current ip network we're on\n * @returns {Promise}\n */\n getClusters = (ipVersion?: IP_VERSION): Promise<{clusters: ClusterList; joinCookie: any}> =>\n this.webex\n .request({\n method: HTTP_VERBS.GET,\n shouldRefreshAccessToken: false,\n api: API.CALLIOPEDISCOVERY,\n resource: RESOURCE.CLUSTERS,\n qs: {\n JCSupport: 1,\n ipver: ipVersion,\n },\n })\n .then((res) => {\n const {clusters, joinCookie} = res.body;\n\n Object.keys(clusters).forEach((key) => {\n clusters[key].isVideoMesh = !!res.body.clusterClasses?.hybridMedia?.includes(key);\n });\n\n LoggerProxy.logger.log(\n `Reachability:request#getClusters --> get clusters (ipver=${ipVersion}) successful:${JSON.stringify(\n clusters\n )}`\n );\n\n return {\n clusters,\n joinCookie,\n };\n });\n\n /**\n * gets remote SDP For Clusters\n * @param {Object} localSDPList localSDPs for the cluster\n * @returns {Object}\n */\n remoteSDPForClusters = (localSDPList: object) =>\n this.webex\n .request({\n method: HTTP_VERBS.POST,\n shouldRefreshAccessToken: false,\n api: API.CALLIOPEDISCOVERY,\n resource: RESOURCE.REACHABILITY,\n body: {offers: localSDPList},\n })\n .then((res) => {\n LoggerProxy.logger.log(\n 'Reachability:request#remoteSDPForClusters --> Remote SDPs got succcessfully'\n );\n\n return res.body;\n });\n}\n\nexport default ReachabilityRequest;\n"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AAaA;AACA;AACA;AAFA,IAGMA,mBAAmB;AAGvB;AACF;AACA;AACA;AACA;AACE,6BAAYC,KAAa,EAAE;EAAA;EAAA;EAAA;EAAA,mDAUb,UAACC,SAAsB;IAAA,OACnC,KAAI,CAACD,KAAK,CACPE,OAAO,CAAC;MACPC,MAAM,EAAEC,qBAAU,CAACC,GAAG;MACtBC,wBAAwB,EAAE,KAAK;MAC/BC,GAAG,EAAEC,cAAG,CAACC,iBAAiB;MAC1BC,QAAQ,EAAEC,mBAAQ,CAACC,QAAQ;MAC3BC,EAAE,EAAE;QACFC,SAAS,EAAE,CAAC;QACZC,KAAK,EAAEd;MACT;IACF,CAAC,CAAC,CACDe,IAAI,CAAC,UAACC,GAAG,EAAK;MACb,gBAA+BA,GAAG,CAACC,IAAI;QAAhCC,QAAQ,aAARA,QAAQ;QAAEC,UAAU,aAAVA,UAAU;MAE3B,mBAAYD,QAAQ,CAAC,CAACE,OAAO,CAAC,UAACC,GAAG,EAAK;QAAA;QACrCH,QAAQ,CAACG,GAAG,CAAC,CAACC,WAAW,GAAG,CAAC,2BAACN,GAAG,CAACC,IAAI,CAACM,cAAc,4EAAvB,sBAAyBC,WAAW,mDAApC,uBAAsCC,QAAQ,CAACJ,GAAG,CAAC;MACnF,CAAC,CAAC;MAEFK,oBAAW,CAACC,MAAM,CAACC,GAAG,oEACwC5B,SAAS,0BAAgB,wBACnFkB,QAAQ,CACT,EACF;MAED,OAAO;QACLA,QAAQ,EAARA,QAAQ;QACRC,UAAU,EAAVA;MACF,CAAC;IACH,CAAC,CAAC;EAAA;EAAA,4DAOiB,UAACU,YAAoB;IAAA,OAC1C,KAAI,CAAC9B,KAAK,CACPE,OAAO,CAAC;MACPC,MAAM,EAAEC,qBAAU,CAAC2B,IAAI;MACvBzB,wBAAwB,EAAE,KAAK;MAC/BC,GAAG,EAAEC,cAAG,CAACC,iBAAiB;MAC1BC,QAAQ,EAAEC,mBAAQ,CAACqB,YAAY;MAC/Bd,IAAI,EAAE;QAACe,MAAM,EAAEH;MAAY;IAC7B,CAAC,CAAC,CACDd,IAAI,CAAC,UAACC,GAAG,EAAK;MACbU,oBAAW,CAACC,MAAM,CAACC,GAAG,CACpB,6EAA6E,CAC9E;MAED,OAAOZ,GAAG,CAACC,IAAI;IACjB,CAAC,CAAC;EAAA;EA5DJ,IAAI,CAAClB,KAAK,GAAGA,KAAK;AACpB;;AAEA;AACF;AACA;AACA;AACA;AACA,GALE;AAAA,eA4DaD,mBAAmB;AAAA"}
1
+ {"version":3,"names":["ReachabilityRequest","webex","ipVersion","internal","newMetrics","callDiagnosticLatencies","measureLatency","request","method","HTTP_VERBS","GET","shouldRefreshAccessToken","api","API","CALLIOPEDISCOVERY","resource","RESOURCE","CLUSTERS","qs","JCSupport","ipver","then","res","body","clusters","joinCookie","forEach","key","isVideoMesh","clusterClasses","hybridMedia","includes","LoggerProxy","logger","log","localSDPList","POST","REACHABILITY","offers"],"sources":["request.ts"],"sourcesContent":["import LoggerProxy from '../common/logs/logger-proxy';\nimport {HTTP_VERBS, RESOURCE, API, IP_VERSION} from '../constants';\n\nexport interface ClusterNode {\n isVideoMesh: boolean;\n udp: Array<string>;\n tcp: Array<string>;\n xtls: Array<string>;\n}\n\nexport type ClusterList = {\n [key: string]: ClusterNode;\n};\n\n/**\n * @class ReachabilityRequest\n */\nclass ReachabilityRequest {\n webex: any;\n\n /**\n * Creates an instance of ReachabilityRequest.\n * @param {object} webex\n * @memberof ReachabilityRequest\n */\n constructor(webex: object) {\n this.webex = webex;\n }\n\n /**\n * Gets the cluster information\n *\n * @param {IP_VERSION} ipVersion information about current ip network we're on\n * @returns {Promise}\n */\n getClusters = (ipVersion?: IP_VERSION): Promise<{clusters: ClusterList; joinCookie: any}> =>\n this.webex.internal.newMetrics.callDiagnosticLatencies\n .measureLatency(\n () =>\n this.webex.request({\n method: HTTP_VERBS.GET,\n shouldRefreshAccessToken: false,\n api: API.CALLIOPEDISCOVERY,\n resource: RESOURCE.CLUSTERS,\n qs: {\n JCSupport: 1,\n ipver: ipVersion,\n },\n }),\n 'internal.get.cluster.time'\n )\n .then((res) => {\n const {clusters, joinCookie} = res.body;\n\n Object.keys(clusters).forEach((key) => {\n clusters[key].isVideoMesh = !!res.body.clusterClasses?.hybridMedia?.includes(key);\n });\n\n LoggerProxy.logger.log(\n `Reachability:request#getClusters --> get clusters (ipver=${ipVersion}) successful:${JSON.stringify(\n clusters\n )}`\n );\n\n return {\n clusters,\n joinCookie,\n };\n });\n\n /**\n * gets remote SDP For Clusters\n * @param {Object} localSDPList localSDPs for the cluster\n * @returns {Object}\n */\n remoteSDPForClusters = (localSDPList: object) =>\n this.webex\n .request({\n method: HTTP_VERBS.POST,\n shouldRefreshAccessToken: false,\n api: API.CALLIOPEDISCOVERY,\n resource: RESOURCE.REACHABILITY,\n body: {offers: localSDPList},\n })\n .then((res) => {\n LoggerProxy.logger.log(\n 'Reachability:request#remoteSDPForClusters --> Remote SDPs got succcessfully'\n );\n\n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CAAC;MACPC,MAAM,EAAEC,qBAAU,CAAC2B,IAAI;MACvBzB,wBAAwB,EAAE,KAAK;MAC/BC,GAAG,EAAEC,cAAG,CAACC,iBAAiB;MAC1BC,QAAQ,EAAEC,mBAAQ,CAACqB,YAAY;MAC/Bd,IAAI,EAAE;QAACe,MAAM,EAAEH;MAAY;IAC7B,CAAC,CAAC,CACDd,IAAI,CAAC,UAACC,GAAG,EAAK;MACbU,oBAAW,CAACC,MAAM,CAACC,GAAG,CACpB,6EAA6E,CAC9E;MAED,OAAOZ,GAAG,CAACC,IAAI;IACjB,CAAC,CAAC;EAAA;EAhEJ,IAAI,CAACtB,KAAK,GAAGA,KAAK;AACpB;;AAEA;AACF;AACA;AACA;AACA;AACA,GALE;AAAA,eAgEaD,mBAAmB;AAAA"}
@@ -62,7 +62,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
62
62
  updateCanManageWebcast: function updateCanManageWebcast(canManageWebcast) {
63
63
  this.set('canManageWebcast', canManageWebcast);
64
64
  },
65
- version: "3.0.0-beta.416"
65
+ version: "3.0.0-beta.418"
66
66
  });
67
67
  var _default = Webinar;
68
68
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "3.0.0-beta.416",
3
+ "version": "3.0.0-beta.418",
4
4
  "description": "",
5
5
  "license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
6
6
  "contributors": [
@@ -33,12 +33,12 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@peculiar/webcrypto": "^1.4.3",
36
- "@webex/plugin-meetings": "3.0.0-beta.416",
37
- "@webex/test-helper-chai": "3.0.0-beta.416",
38
- "@webex/test-helper-mocha": "3.0.0-beta.416",
39
- "@webex/test-helper-mock-webex": "3.0.0-beta.416",
40
- "@webex/test-helper-retry": "3.0.0-beta.416",
41
- "@webex/test-helper-test-users": "3.0.0-beta.416",
36
+ "@webex/plugin-meetings": "3.0.0-beta.418",
37
+ "@webex/test-helper-chai": "3.0.0-beta.418",
38
+ "@webex/test-helper-mocha": "3.0.0-beta.418",
39
+ "@webex/test-helper-mock-webex": "3.0.0-beta.418",
40
+ "@webex/test-helper-retry": "3.0.0-beta.418",
41
+ "@webex/test-helper-test-users": "3.0.0-beta.418",
42
42
  "chai": "^4.3.4",
43
43
  "chai-as-promised": "^7.1.1",
44
44
  "jsdom-global": "3.0.2",
@@ -47,19 +47,19 @@
47
47
  "typescript": "^4.7.4"
48
48
  },
49
49
  "dependencies": {
50
- "@webex/common": "3.0.0-beta.416",
50
+ "@webex/common": "3.0.0-beta.418",
51
51
  "@webex/internal-media-core": "2.3.3",
52
- "@webex/internal-plugin-conversation": "3.0.0-beta.416",
53
- "@webex/internal-plugin-device": "3.0.0-beta.416",
54
- "@webex/internal-plugin-llm": "3.0.0-beta.416",
55
- "@webex/internal-plugin-mercury": "3.0.0-beta.416",
56
- "@webex/internal-plugin-metrics": "3.0.0-beta.416",
57
- "@webex/internal-plugin-support": "3.0.0-beta.416",
58
- "@webex/internal-plugin-user": "3.0.0-beta.416",
59
- "@webex/media-helpers": "3.0.0-beta.416",
60
- "@webex/plugin-people": "3.0.0-beta.416",
61
- "@webex/plugin-rooms": "3.0.0-beta.416",
62
- "@webex/webex-core": "3.0.0-beta.416",
52
+ "@webex/internal-plugin-conversation": "3.0.0-beta.418",
53
+ "@webex/internal-plugin-device": "3.0.0-beta.418",
54
+ "@webex/internal-plugin-llm": "3.0.0-beta.418",
55
+ "@webex/internal-plugin-mercury": "3.0.0-beta.418",
56
+ "@webex/internal-plugin-metrics": "3.0.0-beta.418",
57
+ "@webex/internal-plugin-support": "3.0.0-beta.418",
58
+ "@webex/internal-plugin-user": "3.0.0-beta.418",
59
+ "@webex/media-helpers": "3.0.0-beta.418",
60
+ "@webex/plugin-people": "3.0.0-beta.418",
61
+ "@webex/plugin-rooms": "3.0.0-beta.418",
62
+ "@webex/webex-core": "3.0.0-beta.418",
63
63
  "ampersand-collection": "^2.0.2",
64
64
  "bowser": "^2.11.0",
65
65
  "btoa": "^1.2.1",
@@ -34,17 +34,21 @@ class ReachabilityRequest {
34
34
  * @returns {Promise}
35
35
  */
36
36
  getClusters = (ipVersion?: IP_VERSION): Promise<{clusters: ClusterList; joinCookie: any}> =>
37
- this.webex
38
- .request({
39
- method: HTTP_VERBS.GET,
40
- shouldRefreshAccessToken: false,
41
- api: API.CALLIOPEDISCOVERY,
42
- resource: RESOURCE.CLUSTERS,
43
- qs: {
44
- JCSupport: 1,
45
- ipver: ipVersion,
46
- },
47
- })
37
+ this.webex.internal.newMetrics.callDiagnosticLatencies
38
+ .measureLatency(
39
+ () =>
40
+ this.webex.request({
41
+ method: HTTP_VERBS.GET,
42
+ shouldRefreshAccessToken: false,
43
+ api: API.CALLIOPEDISCOVERY,
44
+ resource: RESOURCE.CLUSTERS,
45
+ qs: {
46
+ JCSupport: 1,
47
+ ipver: ipVersion,
48
+ },
49
+ }),
50
+ 'internal.get.cluster.time'
51
+ )
48
52
  .then((res) => {
49
53
  const {clusters, joinCookie} = res.body;
50
54
 
@@ -4,6 +4,7 @@ import MockWebex from '@webex/test-helper-mock-webex';
4
4
  import Meetings from '@webex/plugin-meetings';
5
5
  import ReachabilityRequest from '@webex/plugin-meetings/src/reachability/request';
6
6
  import {IP_VERSION} from '@webex/plugin-meetings/src/constants';
7
+ import {NewMetrics} from '@webex/internal-plugin-metrics';
7
8
 
8
9
 
9
10
  describe('plugin-meetings/reachability', () => {
@@ -14,6 +15,7 @@ describe('plugin-meetings/reachability', () => {
14
15
  webex = new MockWebex({
15
16
  children: {
16
17
  meetings: Meetings,
18
+ newMetrics: NewMetrics
17
19
  },
18
20
  });
19
21
 
@@ -22,19 +24,25 @@ describe('plugin-meetings/reachability', () => {
22
24
  regionCode: 'WEST-COAST',
23
25
  };
24
26
 
25
- webex.internal = {
26
- services: {
27
- get: sinon.mock().returns('locusUrl'),
28
- waitForCatalog: sinon.mock().returns(Promise.resolve({})),
29
- },
27
+ webex.internal.services = {
28
+ get: sinon.mock().returns('locusUrl'),
29
+ waitForCatalog: sinon.mock().returns(Promise.resolve({})),
30
30
  };
31
31
 
32
-
33
32
  reachabilityRequest = new ReachabilityRequest(webex);
34
33
 
35
34
  });
36
35
 
37
36
  describe('#getClusters', () => {
37
+
38
+ beforeEach(() => {
39
+ sinon.spy(webex.internal.newMetrics.callDiagnosticLatencies, 'measureLatency');
40
+ });
41
+
42
+ afterEach(() => {
43
+ sinon.restore();
44
+ });
45
+
38
46
  it('sends a GET request with the correct params', async () => {
39
47
  webex.request = sinon.mock().returns(Promise.resolve({
40
48
  body: {
@@ -49,7 +57,6 @@ describe('plugin-meetings/reachability', () => {
49
57
  }));
50
58
 
51
59
  const res = await reachabilityRequest.getClusters(IP_VERSION.only_ipv4);
52
-
53
60
  const requestParams = webex.request.getCall(0).args[0];
54
61
 
55
62
  assert.equal(requestParams.method, 'GET');
@@ -63,6 +70,7 @@ describe('plugin-meetings/reachability', () => {
63
70
  });
64
71
  assert.deepEqual(res.clusters.clusterId, {udp: "testUDP", isVideoMesh: true})
65
72
  assert.deepEqual(res.joinCookie, {anycastEntryPoint: "aws-eu-west-1"})
73
+ assert.calledOnceWithExactly(webex.internal.newMetrics.callDiagnosticLatencies.measureLatency, sinon.match.func, 'internal.get.cluster.time');
66
74
  });
67
75
  });
68
76
  });