@webex/internal-plugin-dss 3.0.0-beta.15 → 3.0.0-beta.16
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/dist/constants.js +0 -2
- package/dist/constants.js.map +1 -1
- package/dist/dss.js +6 -61
- package/dist/dss.js.map +1 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +1 -1
- package/dist/types.js +0 -5
- package/dist/types.js.map +1 -1
- package/package.json +6 -6
package/dist/constants.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
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.SEARCH_TYPES = exports.DSS_UNREGISTERED = exports.DSS_SERVICE_NAME = exports.DSS_SEARCH_MERCURY_EVENT = exports.DSS_RESULT = exports.DSS_REGISTERED = exports.DSS_LOOKUP_RESULT = exports.DSS_LOOKUP_MERCURY_EVENT = void 0;
|
|
10
8
|
var DSS_REGISTERED = 'dss:registered';
|
|
11
9
|
exports.DSS_REGISTERED = DSS_REGISTERED;
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DSS_REGISTERED","DSS_UNREGISTERED","DSS_LOOKUP_MERCURY_EVENT","DSS_SEARCH_MERCURY_EVENT","DSS_LOOKUP_RESULT","DSS_RESULT","DSS_SERVICE_NAME","SEARCH_TYPES","PERSON","CALLING_SERVICE","EXTERNAL_CALLING","ROOM","ROBOT"],"sources":["constants.ts"],"sourcesContent":["export const DSS_REGISTERED = 'dss:registered';\nexport const DSS_UNREGISTERED = 'dss:unregistered';\nexport const DSS_LOOKUP_MERCURY_EVENT = 'event:directory.lookup';\nexport const DSS_SEARCH_MERCURY_EVENT = 'event:directory.search';\nexport const DSS_LOOKUP_RESULT = 'dss:lookup.result';\nexport const DSS_RESULT = 'dss:result';\nexport const DSS_SERVICE_NAME = 'directorySearch';\nexport const SEARCH_TYPES = {\n PERSON: 'PERSON',\n CALLING_SERVICE: 'CALLING_SERVICE',\n EXTERNAL_CALLING: 'EXTERNAL_CALLING',\n ROOM: 'ROOM',\n ROBOT: 'ROBOT',\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["DSS_REGISTERED","DSS_UNREGISTERED","DSS_LOOKUP_MERCURY_EVENT","DSS_SEARCH_MERCURY_EVENT","DSS_LOOKUP_RESULT","DSS_RESULT","DSS_SERVICE_NAME","SEARCH_TYPES","PERSON","CALLING_SERVICE","EXTERNAL_CALLING","ROOM","ROBOT"],"sources":["constants.ts"],"sourcesContent":["export const DSS_REGISTERED = 'dss:registered';\nexport const DSS_UNREGISTERED = 'dss:unregistered';\nexport const DSS_LOOKUP_MERCURY_EVENT = 'event:directory.lookup';\nexport const DSS_SEARCH_MERCURY_EVENT = 'event:directory.search';\nexport const DSS_LOOKUP_RESULT = 'dss:lookup.result';\nexport const DSS_RESULT = 'dss:result';\nexport const DSS_SERVICE_NAME = 'directorySearch';\nexport const SEARCH_TYPES = {\n PERSON: 'PERSON',\n CALLING_SERVICE: 'CALLING_SERVICE',\n EXTERNAL_CALLING: 'EXTERNAL_CALLING',\n ROOM: 'ROOM',\n ROBOT: 'ROBOT',\n};\n"],"mappings":";;;;;;;AAAO,IAAMA,cAAc,GAAG,gBAAgB;AAAC;AACxC,IAAMC,gBAAgB,GAAG,kBAAkB;AAAC;AAC5C,IAAMC,wBAAwB,GAAG,wBAAwB;AAAC;AAC1D,IAAMC,wBAAwB,GAAG,wBAAwB;AAAC;AAC1D,IAAMC,iBAAiB,GAAG,mBAAmB;AAAC;AAC9C,IAAMC,UAAU,GAAG,YAAY;AAAC;AAChC,IAAMC,gBAAgB,GAAG,iBAAiB;AAAC;AAC3C,IAAMC,YAAY,GAAG;EAC1BC,MAAM,EAAE,QAAQ;EAChBC,eAAe,EAAE,iBAAiB;EAClCC,gBAAgB,EAAE,kBAAkB;EACpCC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE;AACT,CAAC;AAAC"}
|
package/dist/dss.js
CHANGED
|
@@ -1,54 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$keys2 = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
4
|
-
|
|
5
4
|
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
6
|
-
|
|
7
5
|
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
8
|
-
|
|
9
6
|
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
10
|
-
|
|
11
7
|
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
12
|
-
|
|
13
8
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
14
|
-
|
|
15
9
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
16
|
-
|
|
17
10
|
_Object$defineProperty(exports, "__esModule", {
|
|
18
11
|
value: true
|
|
19
12
|
});
|
|
20
|
-
|
|
21
13
|
exports.default = void 0;
|
|
22
|
-
|
|
23
14
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
24
|
-
|
|
25
15
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
26
|
-
|
|
27
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
28
|
-
|
|
29
17
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
30
|
-
|
|
31
18
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
32
|
-
|
|
33
19
|
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
34
|
-
|
|
35
20
|
var _range2 = _interopRequireDefault(require("lodash/range"));
|
|
36
|
-
|
|
37
21
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
38
|
-
|
|
39
22
|
var _webexCore = require("@webex/webex-core");
|
|
40
|
-
|
|
41
23
|
require("@webex/internal-plugin-mercury");
|
|
42
|
-
|
|
43
24
|
var _constants = require("./constants");
|
|
44
|
-
|
|
45
25
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
46
|
-
|
|
47
26
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
48
|
-
|
|
49
27
|
var DSS = _webexCore.WebexPlugin.extend({
|
|
50
28
|
namespace: 'DSS',
|
|
51
|
-
|
|
52
29
|
/**
|
|
53
30
|
* registered value indicating events registration is successful
|
|
54
31
|
* @instance
|
|
@@ -56,7 +33,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
56
33
|
* @memberof DSS
|
|
57
34
|
*/
|
|
58
35
|
registered: false,
|
|
59
|
-
|
|
60
36
|
/**
|
|
61
37
|
* Explicitly sets up the DSS plugin by connecting to mercury, and listening for DSS events.
|
|
62
38
|
* @returns {Promise}
|
|
@@ -65,30 +41,23 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
65
41
|
*/
|
|
66
42
|
register: function register() {
|
|
67
43
|
var _this = this;
|
|
68
|
-
|
|
69
44
|
if (!this.webex.canAuthorize) {
|
|
70
45
|
this.logger.error('DSS->register#ERROR, Unable to register, SDK cannot authorize');
|
|
71
46
|
return _promise.default.reject(new Error('SDK cannot authorize'));
|
|
72
47
|
}
|
|
73
|
-
|
|
74
48
|
if (this.registered) {
|
|
75
49
|
this.logger.info('dss->register#INFO, DSS plugin already registered');
|
|
76
50
|
return _promise.default.resolve();
|
|
77
51
|
}
|
|
78
|
-
|
|
79
52
|
return this.webex.internal.mercury.connect().then(function () {
|
|
80
53
|
_this.listenForEvents();
|
|
81
|
-
|
|
82
54
|
_this.trigger(_constants.DSS_REGISTERED);
|
|
83
|
-
|
|
84
55
|
_this.registered = true;
|
|
85
56
|
}).catch(function (error) {
|
|
86
57
|
_this.logger.error("DSS->register#ERROR, Unable to register, ".concat(error.message));
|
|
87
|
-
|
|
88
58
|
return _promise.default.reject(error);
|
|
89
59
|
});
|
|
90
60
|
},
|
|
91
|
-
|
|
92
61
|
/**
|
|
93
62
|
* Explicitly tears down the DSS plugin by disconnecting from mercury, and stops listening to DSS events
|
|
94
63
|
* @returns {Promise}
|
|
@@ -97,20 +66,16 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
97
66
|
*/
|
|
98
67
|
unregister: function unregister() {
|
|
99
68
|
var _this2 = this;
|
|
100
|
-
|
|
101
69
|
if (!this.registered) {
|
|
102
70
|
this.logger.info('DSS->unregister#INFO, DSS plugin already unregistered');
|
|
103
71
|
return _promise.default.resolve();
|
|
104
72
|
}
|
|
105
|
-
|
|
106
73
|
this.stopListeningForEvents();
|
|
107
74
|
return this.webex.internal.mercury.disconnect().then(function () {
|
|
108
75
|
_this2.trigger(_constants.DSS_UNREGISTERED);
|
|
109
|
-
|
|
110
76
|
_this2.registered = false;
|
|
111
77
|
});
|
|
112
78
|
},
|
|
113
|
-
|
|
114
79
|
/**
|
|
115
80
|
* registers for DSS events through mercury
|
|
116
81
|
* @returns {undefined}
|
|
@@ -118,7 +83,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
118
83
|
*/
|
|
119
84
|
listenForEvents: function listenForEvents() {
|
|
120
85
|
var _this3 = this;
|
|
121
|
-
|
|
122
86
|
this.webex.internal.mercury.on(_constants.DSS_LOOKUP_MERCURY_EVENT, function (envelope) {
|
|
123
87
|
_this3._handleEvent(envelope.data);
|
|
124
88
|
});
|
|
@@ -126,7 +90,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
126
90
|
_this3._handleEvent(envelope.data);
|
|
127
91
|
});
|
|
128
92
|
},
|
|
129
|
-
|
|
130
93
|
/**
|
|
131
94
|
* unregisteres all the DSS events from mercury
|
|
132
95
|
* @returns {undefined}
|
|
@@ -136,7 +99,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
136
99
|
this.webex.internal.mercury.off(_constants.DSS_LOOKUP_MERCURY_EVENT);
|
|
137
100
|
this.webex.internal.mercury.off(_constants.DSS_SEARCH_MERCURY_EVENT);
|
|
138
101
|
},
|
|
139
|
-
|
|
140
102
|
/**
|
|
141
103
|
* @param {UUID} requestId the id of the request
|
|
142
104
|
* @returns {string}
|
|
@@ -144,7 +106,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
144
106
|
_getResultEventName: function _getResultEventName(requestId) {
|
|
145
107
|
return "".concat(_constants.DSS_RESULT).concat(requestId);
|
|
146
108
|
},
|
|
147
|
-
|
|
148
109
|
/**
|
|
149
110
|
* @param {Object} data the event data
|
|
150
111
|
* @returns {undefined}
|
|
@@ -153,7 +114,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
153
114
|
this.trigger(this._getResultEventName(data.requestId), data);
|
|
154
115
|
this.trigger(_constants.DSS_LOOKUP_RESULT, data);
|
|
155
116
|
},
|
|
156
|
-
|
|
157
117
|
/**
|
|
158
118
|
* Makes the request to the directory service
|
|
159
119
|
* @param {Object} options
|
|
@@ -164,43 +124,33 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
164
124
|
*/
|
|
165
125
|
_request: function _request(options) {
|
|
166
126
|
var _this4 = this;
|
|
167
|
-
|
|
168
127
|
var resource = options.resource,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
128
|
+
params = options.params,
|
|
129
|
+
dataPath = options.dataPath;
|
|
172
130
|
var requestId = _uuid.default.v4();
|
|
173
|
-
|
|
174
131
|
var eventName = this._getResultEventName(requestId);
|
|
175
|
-
|
|
176
132
|
var result = {};
|
|
177
133
|
var expectedSeqNums;
|
|
178
134
|
return new _promise.default(function (resolve) {
|
|
179
135
|
_this4.listenTo(_this4, eventName, function (data) {
|
|
180
136
|
var resultData = (0, _get2.default)(data, dataPath);
|
|
181
137
|
result[data.sequence] = resultData;
|
|
182
|
-
|
|
183
138
|
if (data.finished) {
|
|
184
139
|
expectedSeqNums = (0, _range2.default)(data.sequence + 1).map(String);
|
|
185
140
|
}
|
|
186
|
-
|
|
187
141
|
var done = (0, _isEqual2.default)(expectedSeqNums, (0, _keys.default)(result));
|
|
188
|
-
|
|
189
142
|
if (done) {
|
|
190
143
|
var resultArray = [];
|
|
191
144
|
expectedSeqNums.forEach(function (index) {
|
|
192
145
|
var seqResult = result[index];
|
|
193
|
-
|
|
194
146
|
if (seqResult) {
|
|
195
147
|
resultArray.push.apply(resultArray, (0, _toConsumableArray2.default)(seqResult));
|
|
196
148
|
}
|
|
197
149
|
});
|
|
198
150
|
resolve(resultArray);
|
|
199
|
-
|
|
200
151
|
_this4.stopListening(_this4, eventName);
|
|
201
152
|
}
|
|
202
153
|
});
|
|
203
|
-
|
|
204
154
|
_this4.webex.request({
|
|
205
155
|
service: _constants.DSS_SERVICE_NAME,
|
|
206
156
|
resource: resource,
|
|
@@ -212,7 +162,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
212
162
|
});
|
|
213
163
|
});
|
|
214
164
|
},
|
|
215
|
-
|
|
216
165
|
/**
|
|
217
166
|
* Retrieves detailed information about an entity
|
|
218
167
|
* @param {Object} options
|
|
@@ -226,7 +175,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
226
175
|
resource: "/lookup/orgid/".concat(this.webex.internal.device.orgId, "/identity/").concat(id, "/detail")
|
|
227
176
|
});
|
|
228
177
|
},
|
|
229
|
-
|
|
230
178
|
/**
|
|
231
179
|
* Retrieves basic information about a list entities within an organization
|
|
232
180
|
* @param {Object} options
|
|
@@ -236,7 +184,7 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
236
184
|
*/
|
|
237
185
|
lookup: function lookup(options) {
|
|
238
186
|
var ids = options.ids,
|
|
239
|
-
|
|
187
|
+
entityProviderType = options.entityProviderType;
|
|
240
188
|
var resource = entityProviderType ? "/lookup/orgid/".concat(this.webex.internal.device.orgId, "/entityprovidertype/").concat(entityProviderType) : "/lookup/orgid/".concat(this.webex.internal.device.orgId, "/identities");
|
|
241
189
|
return this._request({
|
|
242
190
|
dataPath: 'lookupResult.entities',
|
|
@@ -246,7 +194,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
246
194
|
}
|
|
247
195
|
});
|
|
248
196
|
},
|
|
249
|
-
|
|
250
197
|
/**
|
|
251
198
|
* Retrieves basic information about a list entities within an organization
|
|
252
199
|
* @param {Object} options
|
|
@@ -263,7 +210,6 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
263
210
|
}
|
|
264
211
|
});
|
|
265
212
|
},
|
|
266
|
-
|
|
267
213
|
/**
|
|
268
214
|
* Search for information about entities
|
|
269
215
|
* @param {Object} options
|
|
@@ -274,8 +220,8 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
274
220
|
*/
|
|
275
221
|
search: function search(options) {
|
|
276
222
|
var requestedTypes = options.requestedTypes,
|
|
277
|
-
|
|
278
|
-
|
|
223
|
+
resultSize = options.resultSize,
|
|
224
|
+
queryString = options.queryString;
|
|
279
225
|
return this._request({
|
|
280
226
|
dataPath: 'directoryEntities',
|
|
281
227
|
resource: "/search/orgid/".concat(this.webex.internal.device.orgId, "/entities"),
|
|
@@ -286,9 +232,8 @@ var DSS = _webexCore.WebexPlugin.extend({
|
|
|
286
232
|
}
|
|
287
233
|
});
|
|
288
234
|
},
|
|
289
|
-
version: "3.0.0-beta.
|
|
235
|
+
version: "3.0.0-beta.16"
|
|
290
236
|
});
|
|
291
|
-
|
|
292
237
|
var _default = DSS;
|
|
293
238
|
exports.default = _default;
|
|
294
239
|
//# sourceMappingURL=dss.js.map
|
package/dist/dss.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DSS","WebexPlugin","extend","namespace","registered","register","webex","canAuthorize","logger","error","reject","Error","info","resolve","internal","mercury","connect","then","listenForEvents","trigger","DSS_REGISTERED","catch","message","unregister","stopListeningForEvents","disconnect","DSS_UNREGISTERED","on","DSS_LOOKUP_MERCURY_EVENT","envelope","_handleEvent","data","DSS_SEARCH_MERCURY_EVENT","off","_getResultEventName","requestId","DSS_RESULT","DSS_LOOKUP_RESULT","_request","options","resource","params","dataPath","uuid","v4","eventName","result","expectedSeqNums","listenTo","resultData","sequence","finished","map","String","done","resultArray","forEach","index","seqResult","push","stopListening","request","service","DSS_SERVICE_NAME","method","contentType","body","lookupDetail","id","device","orgId","lookup","ids","entityProviderType","lookupValues","lookupByEmail","emails","search","requestedTypes","resultSize","queryString"],"sources":["dss.ts"],"sourcesContent":["/* eslint-disable no-underscore-dangle */\n/*!\n * Copyright (c) 2015-2022 Cisco Systems, Inc. See LICENSE file.\n */\nimport uuid from 'uuid';\nimport {WebexPlugin} from '@webex/webex-core';\nimport '@webex/internal-plugin-mercury';\nimport {range, isEqual, get} from 'lodash';\nimport type {\n SearchOptions,\n LookupDetailOptions,\n LookupOptions,\n LookupByEmailOptions,\n} from './types';\n\nimport {\n DSS_REGISTERED,\n DSS_UNREGISTERED,\n DSS_LOOKUP_MERCURY_EVENT,\n DSS_LOOKUP_RESULT,\n DSS_SERVICE_NAME,\n DSS_SEARCH_MERCURY_EVENT,\n DSS_RESULT,\n} from './constants';\n\nconst DSS = WebexPlugin.extend({\n namespace: 'DSS',\n\n /**\n * registered value indicating events registration is successful\n * @instance\n * @type {Boolean}\n * @memberof DSS\n */\n registered: false,\n\n /**\n * Explicitly sets up the DSS plugin by connecting to mercury, and listening for DSS events.\n * @returns {Promise}\n * @public\n * @memberof DSS\n */\n register() {\n if (!this.webex.canAuthorize) {\n this.logger.error('DSS->register#ERROR, Unable to register, SDK cannot authorize');\n\n return Promise.reject(new Error('SDK cannot authorize'));\n }\n\n if (this.registered) {\n this.logger.info('dss->register#INFO, DSS plugin already registered');\n\n return Promise.resolve();\n }\n\n return this.webex.internal.mercury\n .connect()\n .then(() => {\n this.listenForEvents();\n this.trigger(DSS_REGISTERED);\n this.registered = true;\n })\n .catch((error) => {\n this.logger.error(`DSS->register#ERROR, Unable to register, ${error.message}`);\n\n return Promise.reject(error);\n });\n },\n\n /**\n * Explicitly tears down the DSS plugin by disconnecting from mercury, and stops listening to DSS events\n * @returns {Promise}\n * @public\n * @memberof DSS\n */\n unregister() {\n if (!this.registered) {\n this.logger.info('DSS->unregister#INFO, DSS plugin already unregistered');\n\n return Promise.resolve();\n }\n\n this.stopListeningForEvents();\n\n return this.webex.internal.mercury.disconnect().then(() => {\n this.trigger(DSS_UNREGISTERED);\n this.registered = false;\n });\n },\n\n /**\n * registers for DSS events through mercury\n * @returns {undefined}\n * @private\n */\n listenForEvents() {\n this.webex.internal.mercury.on(DSS_LOOKUP_MERCURY_EVENT, (envelope) => {\n this._handleEvent(envelope.data);\n });\n this.webex.internal.mercury.on(DSS_SEARCH_MERCURY_EVENT, (envelope) => {\n this._handleEvent(envelope.data);\n });\n },\n\n /**\n * unregisteres all the DSS events from mercury\n * @returns {undefined}\n * @private\n */\n stopListeningForEvents() {\n this.webex.internal.mercury.off(DSS_LOOKUP_MERCURY_EVENT);\n this.webex.internal.mercury.off(DSS_SEARCH_MERCURY_EVENT);\n },\n\n /**\n * @param {UUID} requestId the id of the request\n * @returns {string}\n */\n _getResultEventName(requestId) {\n return `${DSS_RESULT}${requestId}`;\n },\n\n /**\n * @param {Object} data the event data\n * @returns {undefined}\n */\n _handleEvent(data) {\n this.trigger(this._getResultEventName(data.requestId), data);\n this.trigger(DSS_LOOKUP_RESULT, data);\n },\n\n /**\n * Makes the request to the directory service\n * @param {Object} options\n * @param {string} options.resource the URL to query\n * @param {string} options.params additional params for the body of the request\n * @param {string} options.dataPath to path to get the data in the result object\n * @returns {Promise} Resolves with an array of entities found\n */\n _request(options) {\n const {resource, params, dataPath} = options;\n\n const requestId = uuid.v4();\n const eventName = this._getResultEventName(requestId);\n const result = {};\n let expectedSeqNums;\n\n return new Promise((resolve) => {\n this.listenTo(this, eventName, (data) => {\n const resultData = get(data, dataPath);\n\n result[data.sequence] = resultData;\n\n if (data.finished) {\n expectedSeqNums = range(data.sequence + 1).map(String);\n }\n\n const done = isEqual(expectedSeqNums, Object.keys(result));\n\n if (done) {\n const resultArray = [];\n expectedSeqNums.forEach((index) => {\n const seqResult = result[index];\n if (seqResult) {\n resultArray.push(...seqResult);\n }\n });\n\n resolve(resultArray);\n this.stopListening(this, eventName);\n }\n });\n this.webex.request({\n service: DSS_SERVICE_NAME,\n resource,\n method: 'POST',\n contentType: 'application/json',\n body: {requestId, ...params},\n });\n });\n },\n\n /**\n * Retrieves detailed information about an entity\n * @param {Object} options\n * @param {UUID} options.id the id of the entity to lookup\n * @returns {Promise} Resolves with an array of entities found\n */\n lookupDetail(options: LookupDetailOptions) {\n const {id} = options;\n\n return this._request({\n dataPath: 'lookupResult.entities',\n resource: `/lookup/orgid/${this.webex.internal.device.orgId}/identity/${id}/detail`,\n });\n },\n\n /**\n * Retrieves basic information about a list entities within an organization\n * @param {Object} options\n * @param {UUID} options.ids the id of the entity to lookup\n * @param {UUID} options.entityProviderType the provider to query (optional)\n * @returns {Promise} Resolves with an array of entities found\n */\n lookup(options: LookupOptions) {\n const {ids, entityProviderType} = options;\n\n const resource = entityProviderType\n ? `/lookup/orgid/${this.webex.internal.device.orgId}/entityprovidertype/${entityProviderType}`\n : `/lookup/orgid/${this.webex.internal.device.orgId}/identities`;\n\n return this._request({\n dataPath: 'lookupResult.entities',\n resource,\n params: {\n lookupValues: ids,\n },\n });\n },\n\n /**\n * Retrieves basic information about a list entities within an organization\n * @param {Object} options\n * @param {UUID} options.emails the emails of the entities to lookup\n * @returns {Promise} Resolves with an array of entities found\n */\n lookupByEmail(options: LookupByEmailOptions) {\n const {emails} = options;\n\n return this._request({\n dataPath: 'lookupResult.entities',\n resource: `/lookup/orgid/${this.webex.internal.device.orgId}/emails`,\n params: {\n lookupValues: emails,\n },\n });\n },\n\n /**\n * Search for information about entities\n * @param {Object} options\n * @param {SearchType[]} options.requestedTypes an array of search types from: PERSON, CALLING_SERVICE, EXTERNAL_CALLING, ROOM, ROBOT\n * @param {string[]} options.queryString A query string that will be transformed into a Directory search filter query. It is used to search the following fields: username, givenName, familyName, displayName and email\n * @param {number} options.resultSize The maximum number of results returned from each provider\n * @returns {Promise} Resolves with an array of entities found\n */\n search(options: SearchOptions) {\n const {requestedTypes, resultSize, queryString} = options;\n\n return this._request({\n dataPath: 'directoryEntities',\n resource: `/search/orgid/${this.webex.internal.device.orgId}/entities`,\n params: {\n queryString,\n resultSize,\n requestedTypes,\n },\n });\n },\n});\n\nexport default DSS;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;AACA;;AACA;;AASA;;;;;;AAUA,IAAMA,GAAG,GAAGC,sBAAA,CAAYC,MAAZ,CAAmB;EAC7BC,SAAS,EAAE,KADkB;;EAG7B;AACF;AACA;AACA;AACA;AACA;EACEC,UAAU,EAAE,KATiB;;EAW7B;AACF;AACA;AACA;AACA;AACA;EACEC,QAjB6B,sBAiBlB;IAAA;;IACT,IAAI,CAAC,KAAKC,KAAL,CAAWC,YAAhB,EAA8B;MAC5B,KAAKC,MAAL,CAAYC,KAAZ,CAAkB,+DAAlB;MAEA,OAAO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D,CAAmCyC,WAAnC;IAEA,OAAO,KAAK1C,QAAL,CAAc;MACnBI,QAAQ,EAAE,mBADS;MAEnBF,QAAQ,0BAAmB,KAAKlC,KAAL,CAAWQ,QAAX,CAAoBuD,MAApB,CAA2BC,KAA9C,cAFW;MAGnB7B,MAAM,EAAE;QACNuC,WAAW,EAAXA,WADM;QAEND,UAAU,EAAVA,UAFM;QAGND,cAAc,EAAdA;MAHM;IAHW,CAAd,CAAP;EASD,CAzO4B;EAAA;AAAA,CAAnB,CAAZ;;eA4Oe9E,G"}
|
|
1
|
+
{"version":3,"names":["DSS","WebexPlugin","extend","namespace","registered","register","webex","canAuthorize","logger","error","reject","Error","info","resolve","internal","mercury","connect","then","listenForEvents","trigger","DSS_REGISTERED","catch","message","unregister","stopListeningForEvents","disconnect","DSS_UNREGISTERED","on","DSS_LOOKUP_MERCURY_EVENT","envelope","_handleEvent","data","DSS_SEARCH_MERCURY_EVENT","off","_getResultEventName","requestId","DSS_RESULT","DSS_LOOKUP_RESULT","_request","options","resource","params","dataPath","uuid","v4","eventName","result","expectedSeqNums","listenTo","resultData","sequence","finished","map","String","done","resultArray","forEach","index","seqResult","push","stopListening","request","service","DSS_SERVICE_NAME","method","contentType","body","lookupDetail","id","device","orgId","lookup","ids","entityProviderType","lookupValues","lookupByEmail","emails","search","requestedTypes","resultSize","queryString"],"sources":["dss.ts"],"sourcesContent":["/* eslint-disable no-underscore-dangle */\n/*!\n * Copyright (c) 2015-2022 Cisco Systems, Inc. See LICENSE file.\n */\nimport uuid from 'uuid';\nimport {WebexPlugin} from '@webex/webex-core';\nimport '@webex/internal-plugin-mercury';\nimport {range, isEqual, get} from 'lodash';\nimport type {\n SearchOptions,\n LookupDetailOptions,\n LookupOptions,\n LookupByEmailOptions,\n} from './types';\n\nimport {\n DSS_REGISTERED,\n DSS_UNREGISTERED,\n DSS_LOOKUP_MERCURY_EVENT,\n DSS_LOOKUP_RESULT,\n DSS_SERVICE_NAME,\n DSS_SEARCH_MERCURY_EVENT,\n DSS_RESULT,\n} from './constants';\n\nconst DSS = WebexPlugin.extend({\n namespace: 'DSS',\n\n /**\n * registered value indicating events registration is successful\n * @instance\n * @type {Boolean}\n * @memberof DSS\n */\n registered: false,\n\n /**\n * Explicitly sets up the DSS plugin by connecting to mercury, and listening for DSS events.\n * @returns {Promise}\n * @public\n * @memberof DSS\n */\n register() {\n if (!this.webex.canAuthorize) {\n this.logger.error('DSS->register#ERROR, Unable to register, SDK cannot authorize');\n\n return Promise.reject(new Error('SDK cannot authorize'));\n }\n\n if (this.registered) {\n this.logger.info('dss->register#INFO, DSS plugin already registered');\n\n return Promise.resolve();\n }\n\n return this.webex.internal.mercury\n .connect()\n .then(() => {\n this.listenForEvents();\n this.trigger(DSS_REGISTERED);\n this.registered = true;\n })\n .catch((error) => {\n this.logger.error(`DSS->register#ERROR, Unable to register, ${error.message}`);\n\n return Promise.reject(error);\n });\n },\n\n /**\n * Explicitly tears down the DSS plugin by disconnecting from mercury, and stops listening to DSS events\n * @returns {Promise}\n * @public\n * @memberof DSS\n */\n unregister() {\n if (!this.registered) {\n this.logger.info('DSS->unregister#INFO, DSS plugin already unregistered');\n\n return Promise.resolve();\n }\n\n this.stopListeningForEvents();\n\n return this.webex.internal.mercury.disconnect().then(() => {\n this.trigger(DSS_UNREGISTERED);\n this.registered = false;\n });\n },\n\n /**\n * registers for DSS events through mercury\n * @returns {undefined}\n * @private\n */\n listenForEvents() {\n this.webex.internal.mercury.on(DSS_LOOKUP_MERCURY_EVENT, (envelope) => {\n this._handleEvent(envelope.data);\n });\n this.webex.internal.mercury.on(DSS_SEARCH_MERCURY_EVENT, (envelope) => {\n this._handleEvent(envelope.data);\n });\n },\n\n /**\n * unregisteres all the DSS events from mercury\n * @returns {undefined}\n * @private\n */\n stopListeningForEvents() {\n this.webex.internal.mercury.off(DSS_LOOKUP_MERCURY_EVENT);\n this.webex.internal.mercury.off(DSS_SEARCH_MERCURY_EVENT);\n },\n\n /**\n * @param {UUID} requestId the id of the request\n * @returns {string}\n */\n _getResultEventName(requestId) {\n return `${DSS_RESULT}${requestId}`;\n },\n\n /**\n * @param {Object} data the event data\n * @returns {undefined}\n */\n _handleEvent(data) {\n this.trigger(this._getResultEventName(data.requestId), data);\n this.trigger(DSS_LOOKUP_RESULT, data);\n },\n\n /**\n * Makes the request to the directory service\n * @param {Object} options\n * @param {string} options.resource the URL to query\n * @param {string} options.params additional params for the body of the request\n * @param {string} options.dataPath to path to get the data in the result object\n * @returns {Promise} Resolves with an array of entities found\n */\n _request(options) {\n const {resource, params, dataPath} = options;\n\n const requestId = uuid.v4();\n const eventName = this._getResultEventName(requestId);\n const result = {};\n let expectedSeqNums;\n\n return new Promise((resolve) => {\n this.listenTo(this, eventName, (data) => {\n const resultData = get(data, dataPath);\n\n result[data.sequence] = resultData;\n\n if (data.finished) {\n expectedSeqNums = range(data.sequence + 1).map(String);\n }\n\n const done = isEqual(expectedSeqNums, Object.keys(result));\n\n if (done) {\n const resultArray = [];\n expectedSeqNums.forEach((index) => {\n const seqResult = result[index];\n if (seqResult) {\n resultArray.push(...seqResult);\n }\n });\n\n resolve(resultArray);\n this.stopListening(this, eventName);\n }\n });\n this.webex.request({\n service: DSS_SERVICE_NAME,\n resource,\n method: 'POST',\n contentType: 'application/json',\n body: {requestId, ...params},\n });\n });\n },\n\n /**\n * Retrieves detailed information about an entity\n * @param {Object} options\n * @param {UUID} options.id the id of the entity to lookup\n * @returns {Promise} Resolves with an array of entities found\n */\n lookupDetail(options: LookupDetailOptions) {\n const {id} = options;\n\n return this._request({\n dataPath: 'lookupResult.entities',\n resource: `/lookup/orgid/${this.webex.internal.device.orgId}/identity/${id}/detail`,\n });\n },\n\n /**\n * Retrieves basic information about a list entities within an organization\n * @param {Object} options\n * @param {UUID} options.ids the id of the entity to lookup\n * @param {UUID} options.entityProviderType the provider to query (optional)\n * @returns {Promise} Resolves with an array of entities found\n */\n lookup(options: LookupOptions) {\n const {ids, entityProviderType} = options;\n\n const resource = entityProviderType\n ? `/lookup/orgid/${this.webex.internal.device.orgId}/entityprovidertype/${entityProviderType}`\n : `/lookup/orgid/${this.webex.internal.device.orgId}/identities`;\n\n return this._request({\n dataPath: 'lookupResult.entities',\n resource,\n params: {\n lookupValues: ids,\n },\n });\n },\n\n /**\n * Retrieves basic information about a list entities within an organization\n * @param {Object} options\n * @param {UUID} options.emails the emails of the entities to lookup\n * @returns {Promise} Resolves with an array of entities found\n */\n lookupByEmail(options: LookupByEmailOptions) {\n const {emails} = options;\n\n return this._request({\n dataPath: 'lookupResult.entities',\n resource: `/lookup/orgid/${this.webex.internal.device.orgId}/emails`,\n params: {\n lookupValues: emails,\n },\n });\n },\n\n /**\n * Search for information about entities\n * @param {Object} options\n * @param {SearchType[]} options.requestedTypes an array of search types from: PERSON, CALLING_SERVICE, EXTERNAL_CALLING, ROOM, ROBOT\n * @param {string[]} options.queryString A query string that will be transformed into a Directory search filter query. It is used to search the following fields: username, givenName, familyName, displayName and email\n * @param {number} options.resultSize The maximum number of results returned from each provider\n * @returns {Promise} Resolves with an array of entities found\n */\n search(options: SearchOptions) {\n const {requestedTypes, resultSize, queryString} = options;\n\n return this._request({\n dataPath: 'directoryEntities',\n resource: `/search/orgid/${this.webex.internal.device.orgId}/entities`,\n params: {\n queryString,\n resultSize,\n requestedTypes,\n },\n });\n },\n});\n\nexport default DSS;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA;AACA;AACA;AASA;AAQqB;AAAA;AAErB,IAAMA,GAAG,GAAGC,sBAAW,CAACC,MAAM,CAAC;EAC7BC,SAAS,EAAE,KAAK;EAEhB;AACF;AACA;AACA;AACA;AACA;EACEC,UAAU,EAAE,KAAK;EAEjB;AACF;AACA;AACA;AACA;AACA;EACEC,QAAQ,sBAAG;IAAA;IACT,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,YAAY,EAAE;MAC5B,IAAI,CAACC,MAAM,CAACC,KAAK,CAAC,+DAA+D,CAAC;MAElF,OAAO,iBAAQC,MAAM,CAAC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nBI,QAAQ,EAAE,mBAAmB;MAC7BF,QAAQ,0BAAmB,IAAI,CAAClC,KAAK,CAACQ,QAAQ,CAACuD,MAAM,CAACC,KAAK,cAAW;MACtE7B,MAAM,EAAE;QACNuC,WAAW,EAAXA,WAAW;QACXD,UAAU,EAAVA,UAAU;QACVD,cAAc,EAAdA;MACF;IACF,CAAC,CAAC;EACJ,CAAC;EAAA;AACH,CAAC,CAAC;AAAC,eAEY9E,GAAG;AAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
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
|
_Object$defineProperty(exports, "default", {
|
|
12
9
|
enumerable: true,
|
|
13
10
|
get: function get() {
|
|
14
11
|
return _dss.default;
|
|
15
12
|
}
|
|
16
13
|
});
|
|
17
|
-
|
|
18
14
|
var _webexCore = require("@webex/webex-core");
|
|
19
|
-
|
|
20
15
|
var _dss = _interopRequireDefault(require("./dss"));
|
|
21
|
-
|
|
22
16
|
(0, _webexCore.registerInternalPlugin)('dss', _dss.default);
|
|
23
17
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerInternalPlugin","DSS"],"sources":["index.ts"],"sourcesContent":["import {registerInternalPlugin} from '@webex/webex-core';\n\nimport DSS from './dss';\n\nregisterInternalPlugin('dss', DSS);\n\nexport {default} from './dss';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["registerInternalPlugin","DSS"],"sources":["index.ts"],"sourcesContent":["import {registerInternalPlugin} from '@webex/webex-core';\n\nimport DSS from './dss';\n\nregisterInternalPlugin('dss', DSS);\n\nexport {default} from './dss';\n"],"mappings":";;;;;;;;;;;;;AAAA;AAEA;AAEA,IAAAA,iCAAsB,EAAC,KAAK,EAAEC,YAAG,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
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.SearchType = exports.EntityProviderType = void 0;
|
|
10
8
|
// eslint-disable-next-line no-shadow
|
|
11
9
|
var EntityProviderType;
|
|
12
10
|
exports.EntityProviderType = EntityProviderType;
|
|
13
|
-
|
|
14
11
|
(function (EntityProviderType) {
|
|
15
12
|
EntityProviderType["CI_USER"] = "CI_USER";
|
|
16
13
|
EntityProviderType["CI_MACHINE"] = "CI_MACHINE";
|
|
17
14
|
EntityProviderType["CONTACTS"] = "CONTACTS";
|
|
18
15
|
EntityProviderType["CSDM"] = "CSDM";
|
|
19
16
|
})(EntityProviderType || (exports.EntityProviderType = EntityProviderType = {}));
|
|
20
|
-
|
|
21
17
|
// eslint-disable-next-line no-shadow
|
|
22
18
|
var SearchType;
|
|
23
19
|
exports.SearchType = SearchType;
|
|
24
|
-
|
|
25
20
|
(function (SearchType) {
|
|
26
21
|
SearchType["PERSON"] = "PERSON";
|
|
27
22
|
SearchType["CALLING_SERVICE"] = "CALLING_SERVICE";
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EntityProviderType","SearchType"],"sources":["types.ts"],"sourcesContent":["export interface LookupDetailOptions {\n id: string;\n}\n\n// eslint-disable-next-line no-shadow\nexport enum EntityProviderType {\n CI_USER = 'CI_USER',\n CI_MACHINE = 'CI_MACHINE',\n CONTACTS = 'CONTACTS',\n CSDM = 'CSDM',\n}\n\nexport interface LookupOptions {\n ids: string[];\n entityProviderType?: EntityProviderType;\n}\n\nexport interface LookupByEmailOptions {\n emails: string[];\n}\n\n// eslint-disable-next-line no-shadow\nexport enum SearchType {\n PERSON = 'PERSON',\n CALLING_SERVICE = 'CALLING_SERVICE',\n EXTERNAL_CALLING = 'EXTERNAL_CALLING',\n ROOM = 'ROOM',\n ROBOT = 'ROBOT',\n}\n\nexport interface SearchOptions {\n requestedTypes: SearchType[];\n resultSize: number;\n queryString: string;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["EntityProviderType","SearchType"],"sources":["types.ts"],"sourcesContent":["export interface LookupDetailOptions {\n id: string;\n}\n\n// eslint-disable-next-line no-shadow\nexport enum EntityProviderType {\n CI_USER = 'CI_USER',\n CI_MACHINE = 'CI_MACHINE',\n CONTACTS = 'CONTACTS',\n CSDM = 'CSDM',\n}\n\nexport interface LookupOptions {\n ids: string[];\n entityProviderType?: EntityProviderType;\n}\n\nexport interface LookupByEmailOptions {\n emails: string[];\n}\n\n// eslint-disable-next-line no-shadow\nexport enum SearchType {\n PERSON = 'PERSON',\n CALLING_SERVICE = 'CALLING_SERVICE',\n EXTERNAL_CALLING = 'EXTERNAL_CALLING',\n ROOM = 'ROOM',\n ROBOT = 'ROBOT',\n}\n\nexport interface SearchOptions {\n requestedTypes: SearchType[];\n resultSize: number;\n queryString: string;\n}\n"],"mappings":";;;;;;;AAIA;AAAA,IACYA,kBAAkB;AAAA;AAAA,WAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;AAAA,GAAlBA,kBAAkB,kCAAlBA,kBAAkB;AAgB9B;AAAA,IACYC,UAAU;AAAA;AAAA,WAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;AAAA,GAAVA,UAAU,0BAAVA,UAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/internal-plugin-dss",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Colin Read <coread@cisco.com>",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
25
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
24
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.16",
|
|
25
|
+
"@webex/webex-core": "3.0.0-beta.16",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"uuid": "^3.3.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@webex/internal-plugin-dss": "3.0.0-beta.
|
|
31
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
32
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
30
|
+
"@webex/internal-plugin-dss": "3.0.0-beta.16",
|
|
31
|
+
"@webex/test-helper-chai": "3.0.0-beta.16",
|
|
32
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.16"
|
|
33
33
|
}
|
|
34
34
|
}
|