@webex/plugin-meetings 3.12.0-next.61 → 3.12.0-next.62

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.
@@ -8,9 +8,11 @@ _Object$defineProperty(exports, "__esModule", {
8
8
  exports.deleteNestedObjectsWithHtMeta = void 0;
9
9
  exports.isMetadata = isMetadata;
10
10
  exports.isSelf = isSelf;
11
+ exports.sleep = sleep;
11
12
  exports.sortByInitPriority = sortByInitPriority;
12
13
  var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/is-array"));
13
14
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
15
+ var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
14
16
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
15
17
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
16
18
  var _types = require("./types");
@@ -88,4 +90,22 @@ function sortByInitPriority(items, priority) {
88
90
  });
89
91
  return [].concat((0, _toConsumableArray2.default)(prioritized), (0, _toConsumableArray2.default)(rest));
90
92
  }
93
+
94
+ /**
95
+ * Sleeps for the specified amount of milliseconds
96
+ *
97
+ * @param {number} ms amount of milliseconds to sleep
98
+ * @returns {Promise<void>} A promise that resolves after the specified delay
99
+ */
100
+ function sleep(ms) {
101
+ if (ms <= 0) {
102
+ return _promise.default.resolve();
103
+ }
104
+ return new _promise.default(function (resolve) {
105
+ // start a timer that will resolve the promise after the specified delay
106
+ setTimeout(function () {
107
+ resolve();
108
+ }, ms);
109
+ });
110
+ }
91
111
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_types","require","isSelf","object","htMeta","elementId","type","toLowerCase","ObjectType","self","isMetadata","metadata","deleteNestedObjectsWithHtMeta","exports","currentLocusPart","parent","currentKey","_typeof2","default","undefined","_isArray","splice","Number","i","length","_i","_Object$keys","_keys","key","Object","prototype","hasOwnProperty","call","sortByInitPriority","items","priority","prioritized","map","name","find","item","filter","Boolean","rest","includes","concat","_toConsumableArray2"],"sources":["utils.ts"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\n\nimport {ObjectType, HashTreeObject} from './types';\n\n/**\n * Checks if the given hash tree object is of type \"self\"\n * @param {HashTreeObject} object object to check\n * @returns {boolean} True if the object is of type \"self\", false otherwise\n */\nexport function isSelf(object: HashTreeObject) {\n return object.htMeta.elementId.type.toLowerCase() === ObjectType.self;\n}\n\n/**\n * Checks if the given hash tree object is of type \"Metadata\"\n * @param {HashTreeObject} object object to check\n * @returns {boolean} True if the object is of type \"Metadata\", false otherwise\n */\nexport function isMetadata(object: HashTreeObject) {\n return object.htMeta.elementId.type.toLowerCase() === ObjectType.metadata;\n}\n\n/**\n * Analyzes given part of Locus DTO recursively and delete any nested objects that have their own htMeta\n *\n * @param {Object} currentLocusPart part of locus DTO to analyze\n * @param {Object} parent parent object\n * @param {string|number} currentKey key of the parent object that currentLocusPart is\n * @returns {void}\n */\nexport const deleteNestedObjectsWithHtMeta = (\n currentLocusPart: any,\n parent?: any,\n currentKey?: string | number\n) => {\n if (typeof currentLocusPart !== 'object' || currentLocusPart === null) {\n return;\n }\n\n if (parent && currentKey !== undefined && currentLocusPart.htMeta) {\n if (Array.isArray(parent)) {\n parent.splice(Number(currentKey), 1);\n } else {\n delete parent[currentKey];\n }\n\n return;\n }\n\n if (Array.isArray(currentLocusPart)) {\n // iterate array in reverse, so that indexes remain valid when deleting elements\n for (let i = currentLocusPart.length - 1; i >= 0; i -= 1) {\n deleteNestedObjectsWithHtMeta(currentLocusPart[i], currentLocusPart, i);\n }\n } else {\n for (const key of Object.keys(currentLocusPart)) {\n if (Object.prototype.hasOwnProperty.call(currentLocusPart, key)) {\n deleteNestedObjectsWithHtMeta(currentLocusPart[key], currentLocusPart, key);\n }\n }\n }\n};\n\n/**\n * Reorders items so that those matching the given priority list come first (in priority order),\n * followed by everything else in their original order.\n *\n * @param {Array<T>} items - The items to reorder\n * @param {string[]} priority - Ordered list of names that should come first\n * @returns {Array<T>} A new array with prioritized items first\n */\nexport function sortByInitPriority<T extends {name: string}>(items: T[], priority: string[]): T[] {\n const prioritized = priority\n .map((name) => items.find((item) => item.name === name))\n .filter(Boolean) as T[];\n const rest = items.filter((item) => !priority.includes(item.name));\n\n return [...prioritized, ...rest];\n}\n"],"mappings":";;;;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAFA;;AAIA;AACA;AACA;AACA;AACA;AACO,SAASC,MAAMA,CAACC,MAAsB,EAAE;EAC7C,OAAOA,MAAM,CAACC,MAAM,CAACC,SAAS,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKC,iBAAU,CAACC,IAAI;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAACP,MAAsB,EAAE;EACjD,OAAOA,MAAM,CAACC,MAAM,CAACC,SAAS,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKC,iBAAU,CAACG,QAAQ;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMC,8BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG,SAAhCA,6BAA6BA,CACxCE,gBAAqB,EACrBC,MAAY,EACZC,UAA4B,EACzB;EACH,IAAI,IAAAC,QAAA,CAAAC,OAAA,EAAOJ,gBAAgB,MAAK,QAAQ,IAAIA,gBAAgB,KAAK,IAAI,EAAE;IACrE;EACF;EAEA,IAAIC,MAAM,IAAIC,UAAU,KAAKG,SAAS,IAAIL,gBAAgB,CAACV,MAAM,EAAE;IACjE,IAAI,IAAAgB,QAAA,CAAAF,OAAA,EAAcH,MAAM,CAAC,EAAE;MACzBA,MAAM,CAACM,MAAM,CAACC,MAAM,CAACN,UAAU,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC,MAAM;MACL,OAAOD,MAAM,CAACC,UAAU,CAAC;IAC3B;IAEA;EACF;EAE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5B,OAAA,EAAKyB,IAAI;AACjC","ignoreList":[]}
1
+ {"version":3,"names":["_types","require","isSelf","object","htMeta","elementId","type","toLowerCase","ObjectType","self","isMetadata","metadata","deleteNestedObjectsWithHtMeta","exports","currentLocusPart","parent","currentKey","_typeof2","default","undefined","_isArray","splice","Number","i","length","_i","_Object$keys","_keys","key","Object","prototype","hasOwnProperty","call","sortByInitPriority","items","priority","prioritized","map","name","find","item","filter","Boolean","rest","includes","concat","_toConsumableArray2","sleep","ms","_promise","resolve","setTimeout"],"sources":["utils.ts"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\n\nimport {ObjectType, HashTreeObject} from './types';\n\n/**\n * Checks if the given hash tree object is of type \"self\"\n * @param {HashTreeObject} object object to check\n * @returns {boolean} True if the object is of type \"self\", false otherwise\n */\nexport function isSelf(object: HashTreeObject) {\n return object.htMeta.elementId.type.toLowerCase() === ObjectType.self;\n}\n\n/**\n * Checks if the given hash tree object is of type \"Metadata\"\n * @param {HashTreeObject} object object to check\n * @returns {boolean} True if the object is of type \"Metadata\", false otherwise\n */\nexport function isMetadata(object: HashTreeObject) {\n return object.htMeta.elementId.type.toLowerCase() === ObjectType.metadata;\n}\n\n/**\n * Analyzes given part of Locus DTO recursively and delete any nested objects that have their own htMeta\n *\n * @param {Object} currentLocusPart part of locus DTO to analyze\n * @param {Object} parent parent object\n * @param {string|number} currentKey key of the parent object that currentLocusPart is\n * @returns {void}\n */\nexport const deleteNestedObjectsWithHtMeta = (\n currentLocusPart: any,\n parent?: any,\n currentKey?: string | number\n) => {\n if (typeof currentLocusPart !== 'object' || currentLocusPart === null) {\n return;\n }\n\n if (parent && currentKey !== undefined && currentLocusPart.htMeta) {\n if (Array.isArray(parent)) {\n parent.splice(Number(currentKey), 1);\n } else {\n delete parent[currentKey];\n }\n\n return;\n }\n\n if (Array.isArray(currentLocusPart)) {\n // iterate array in reverse, so that indexes remain valid when deleting elements\n for (let i = currentLocusPart.length - 1; i >= 0; i -= 1) {\n deleteNestedObjectsWithHtMeta(currentLocusPart[i], currentLocusPart, i);\n }\n } else {\n for (const key of Object.keys(currentLocusPart)) {\n if (Object.prototype.hasOwnProperty.call(currentLocusPart, key)) {\n deleteNestedObjectsWithHtMeta(currentLocusPart[key], currentLocusPart, key);\n }\n }\n }\n};\n\n/**\n * Reorders items so that those matching the given priority list come first (in priority order),\n * followed by everything else in their original order.\n *\n * @param {Array<T>} items - The items to reorder\n * @param {string[]} priority - Ordered list of names that should come first\n * @returns {Array<T>} A new array with prioritized items first\n */\nexport function sortByInitPriority<T extends {name: string}>(items: T[], priority: string[]): T[] {\n const prioritized = priority\n .map((name) => items.find((item) => item.name === name))\n .filter(Boolean) as T[];\n const rest = items.filter((item) => !priority.includes(item.name));\n\n return [...prioritized, ...rest];\n}\n\n/**\n * Sleeps for the specified amount of milliseconds\n *\n * @param {number} ms amount of milliseconds to sleep\n * @returns {Promise<void>} A promise that resolves after the specified delay\n */\nexport function sleep(ms: number): Promise<void> {\n if (ms <= 0) {\n return Promise.resolve();\n }\n\n return new Promise((resolve) => {\n // start a timer that will resolve the promise after the specified delay\n setTimeout(() => {\n resolve();\n }, ms);\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAFA;;AAIA;AACA;AACA;AACA;AACA;AACO,SAASC,MAAMA,CAACC,MAAsB,EAAE;EAC7C,OAAOA,MAAM,CAACC,MAAM,CAACC,SAAS,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKC,iBAAU,CAACC,IAAI;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAACP,MAAsB,EAAE;EACjD,OAAOA,MAAM,CAACC,MAAM,CAACC,SAAS,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKC,iBAAU,CAACG,QAAQ;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMC,8BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAA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2BC,KAAU,EAAEC,QAAkB,EAAO;EAChG,IAAMC,WAAW,GAAGD,QAAQ,CACzBE,GAAG,CAAC,UAACC,IAAI;IAAA,OAAKJ,KAAK,CAACK,IAAI,CAAC,UAACC,IAAI;MAAA,OAAKA,IAAI,CAACF,IAAI,KAAKA,IAAI;IAAA,EAAC;EAAA,EAAC,CACvDG,MAAM,CAACC,OAAO,CAAQ;EACzB,IAAMC,IAAI,GAAGT,KAAK,CAACO,MAAM,CAAC,UAACD,IAAI;IAAA,OAAK,CAACL,QAAQ,CAACS,QAAQ,CAACJ,IAAI,CAACF,IAAI,CAAC;EAAA,EAAC;EAElE,UAAAO,MAAA,KAAAC,mBAAA,CAAA5B,OAAA,EAAWkB,WAAW,OAAAU,mBAAA,CAAA5B,OAAA,EAAKyB,IAAI;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,KAAKA,CAACC,EAAU,EAAiB;EAC/C,IAAIA,EAAE,IAAI,CAAC,EAAE;IACX,OAAOC,QAAA,CAAA/B,OAAA,CAAQgC,OAAO,CAAC,CAAC;EAC1B;EAEA,OAAO,IAAAD,QAAA,CAAA/B,OAAA,CAAY,UAACgC,OAAO,EAAK;IAC9B;IACAC,UAAU,CAAC,YAAM;MACfD,OAAO,CAAC,CAAC;IACX,CAAC,EAAEF,EAAE,CAAC;EACR,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -381,7 +381,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
381
381
  throw error;
382
382
  });
383
383
  },
384
- version: "3.12.0-next.61"
384
+ version: "3.12.0-next.62"
385
385
  });
386
386
  var _default = exports.default = SimultaneousInterpretation;
387
387
  //# sourceMappingURL=index.js.map
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.12.0-next.61"
21
+ version: "3.12.0-next.62"
22
22
  });
23
23
  var _default = exports.default = SILanguage;
24
24
  //# sourceMappingURL=siLanguage.js.map
@@ -1085,16 +1085,25 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1085
1085
  * Triggers a sync of all hash tree datasets for all hash tree parsers associated with this meeting.
1086
1086
  * The syncs are executed sequentially within each parser.
1087
1087
  *
1088
+ * @param {Object} [options={}] - Options for syncing
1089
+ * @param {boolean} [options.onlyLLM=false] - Whether to sync only LLM based data sets
1088
1090
  * @returns {Promise<void>}
1089
1091
  */
1090
1092
  }, {
1091
1093
  key: "syncAllHashTreeDatasets",
1092
1094
  value: (function () {
1093
1095
  var _syncAllHashTreeDatasets = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
1094
- var _iterator3, _step3, _step3$value, entry, _t2;
1096
+ var options,
1097
+ _iterator3,
1098
+ _step3,
1099
+ _step3$value,
1100
+ entry,
1101
+ _args2 = arguments,
1102
+ _t2;
1095
1103
  return _regenerator.default.wrap(function (_context2) {
1096
1104
  while (1) switch (_context2.prev = _context2.next) {
1097
1105
  case 0:
1106
+ options = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
1098
1107
  _iterator3 = _createForOfIteratorHelper(this.hashTreeParsers);
1099
1108
  _context2.prev = 1;
1100
1109
  _iterator3.s();
@@ -1109,7 +1118,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1109
1118
  break;
1110
1119
  }
1111
1120
  _context2.next = 3;
1112
- return entry.parser.syncAllDatasets();
1121
+ return entry.parser.syncAllDatasets(options);
1113
1122
  case 3:
1114
1123
  _context2.next = 2;
1115
1124
  break;