@webex/internal-plugin-device 3.0.0-bnr.5 → 3.0.0-next.1

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.
Files changed (45) hide show
  1. package/.eslintrc.js +6 -0
  2. package/babel.config.js +3 -0
  3. package/dist/config.js +1 -2
  4. package/dist/config.js.map +1 -1
  5. package/dist/constants.js +8 -16
  6. package/dist/constants.js.map +1 -1
  7. package/dist/device.js +25 -7
  8. package/dist/device.js.map +1 -1
  9. package/dist/features/feature-collection.js +1 -2
  10. package/dist/features/feature-collection.js.map +1 -1
  11. package/dist/features/feature-model.js +8 -11
  12. package/dist/features/feature-model.js.map +1 -1
  13. package/dist/features/features-model.js +1 -2
  14. package/dist/features/features-model.js.map +1 -1
  15. package/dist/features/index.js.map +1 -1
  16. package/dist/index.js +2 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/interceptors/device-url.js +6 -5
  19. package/dist/interceptors/device-url.js.map +1 -1
  20. package/dist/ipNetworkDetector.js +199 -0
  21. package/dist/ipNetworkDetector.js.map +1 -0
  22. package/dist/metrics.js +1 -2
  23. package/dist/metrics.js.map +1 -1
  24. package/jest.config.js +3 -0
  25. package/package.json +28 -12
  26. package/process +1 -0
  27. package/src/device.js +22 -0
  28. package/src/ipNetworkDetector.ts +176 -0
  29. package/test/unit/spec/device.js +77 -12
  30. package/test/unit/spec/features/feature-collection.js +1 -1
  31. package/test/unit/spec/features/feature-model.js +20 -20
  32. package/test/unit/spec/features/features-model.js +4 -4
  33. package/test/unit/spec/ipNetworkDetector.js +410 -0
  34. package/dist/internal-plugin-device.d.ts +0 -91
  35. package/dist/tsdoc-metadata.json +0 -11
  36. package/dist/types/config.d.ts +0 -10
  37. package/dist/types/constants.d.ts +0 -12
  38. package/dist/types/device.d.ts +0 -2
  39. package/dist/types/features/feature-collection.d.ts +0 -9
  40. package/dist/types/features/feature-model.d.ts +0 -29
  41. package/dist/types/features/features-model.d.ts +0 -9
  42. package/dist/types/features/index.d.ts +0 -4
  43. package/dist/types/index.d.ts +0 -8
  44. package/dist/types/interceptors/device-url.d.ts +0 -15
  45. package/dist/types/metrics.d.ts +0 -5
@@ -0,0 +1,410 @@
1
+ import {assert} from '@webex/test-helper-chai';
2
+ import sinon from 'sinon';
3
+ import IpNetworkDetector from '@webex/internal-plugin-device/src/ipNetworkDetector';
4
+ import MockWebex from '@webex/test-helper-mock-webex';
5
+
6
+ describe('plugin-device', () => {
7
+ describe('IpNetworkDetector', () => {
8
+ let webex;
9
+ let ipNetworkDetector;
10
+
11
+ beforeEach(() => {
12
+ webex = new MockWebex({});
13
+
14
+ ipNetworkDetector = new IpNetworkDetector({}, {parent: webex});
15
+ });
16
+
17
+ it('is initialized correctly', () => {
18
+ assert.equal(ipNetworkDetector.supportsIpV4, undefined);
19
+ assert.equal(ipNetworkDetector.supportsIpV6, undefined);
20
+ assert.equal(ipNetworkDetector.firstIpV4, -1);
21
+ assert.equal(ipNetworkDetector.firstIpV6, -1);
22
+ assert.equal(ipNetworkDetector.firstMdns, -1);
23
+ assert.equal(ipNetworkDetector.totalTime, -1);
24
+ });
25
+
26
+ describe('detect', () => {
27
+ let previousRTCPeerConnection;
28
+ let clock;
29
+ let fakePeerConnection;
30
+
31
+ const FAKE_OFFER = {type: 'offer', sdp: 'some sdp'};
32
+
33
+ beforeEach(() => {
34
+ clock = sinon.useFakeTimers();
35
+
36
+ previousRTCPeerConnection = global.RTCPeerConnection;
37
+
38
+ fakePeerConnection = {
39
+ createDataChannel: sinon.stub(),
40
+ createOffer: sinon.stub().resolves(FAKE_OFFER),
41
+ setLocalDescription: sinon.stub().resolves(),
42
+ close: sinon.stub(),
43
+ iceGatheringState: 'new',
44
+ };
45
+ global.RTCPeerConnection = sinon.stub().returns(fakePeerConnection);
46
+ });
47
+
48
+ afterEach(() => {
49
+ global.RTCPeerConnection = previousRTCPeerConnection;
50
+ clock.restore();
51
+ });
52
+
53
+ const simulateCandidate = (delay, address) => {
54
+ clock.tick(delay);
55
+
56
+ fakePeerConnection.onicecandidate({
57
+ candidate: {address},
58
+ });
59
+ };
60
+
61
+ const simulateEndOfCandidateGathering = (delay, useGatheringStateChange = true) => {
62
+ clock.tick(delay);
63
+
64
+ // browsers have 2 ways of notifying about ICE candidate gathering being completed
65
+ // 1. through gathering state change
66
+ // 2. by sending a null candidate
67
+ if (useGatheringStateChange) {
68
+ fakePeerConnection.iceGatheringState = 'complete';
69
+ fakePeerConnection.onicegatheringstatechange();
70
+ } else {
71
+ fakePeerConnection.onicecandidate({
72
+ candidate: null,
73
+ });
74
+ }
75
+ };
76
+
77
+ const checkResults = (expectedResults) => {
78
+ assert.equal(ipNetworkDetector.supportsIpV4, expectedResults.supportsIpV4);
79
+ assert.equal(ipNetworkDetector.supportsIpV6, expectedResults.supportsIpV6);
80
+ assert.equal(ipNetworkDetector.firstIpV4, expectedResults.timings.ipv4);
81
+ assert.equal(ipNetworkDetector.firstIpV6, expectedResults.timings.ipv6);
82
+ assert.equal(ipNetworkDetector.firstMdns, expectedResults.timings.mdns);
83
+ assert.equal(ipNetworkDetector.totalTime, expectedResults.timings.totalTime);
84
+ };
85
+
86
+ it('creates an RTCPeerConnection with a data channel and does ice candidate gathering', async () => {
87
+ const promise = ipNetworkDetector.detect();
88
+
89
+ simulateEndOfCandidateGathering();
90
+
91
+ await promise;
92
+
93
+ assert.calledOnceWithExactly(fakePeerConnection.createDataChannel, 'data');
94
+ assert.calledOnceWithExactly(fakePeerConnection.createOffer);
95
+ assert.calledOnceWithExactly(fakePeerConnection.setLocalDescription, FAKE_OFFER);
96
+ });
97
+
98
+ it('works correctly when we get only ipv4 candidates', async () => {
99
+ const promise = ipNetworkDetector.detect();
100
+
101
+ simulateCandidate(70, '192.168.0.1');
102
+ simulateCandidate(30, '192.168.16.1');
103
+ simulateEndOfCandidateGathering(50);
104
+
105
+ await promise;
106
+
107
+ checkResults({
108
+ supportsIpV4: true,
109
+ supportsIpV6: false,
110
+ timings: {
111
+ totalTime: 150,
112
+ ipv4: 70, // this should match the first ipv4 candidate's delay
113
+ ipv6: -1,
114
+ mdns: -1,
115
+ },
116
+ });
117
+ });
118
+
119
+ it('works correctly when we get only ipv6 candidates (chrome, safari)', async () => {
120
+ const promise = ipNetworkDetector.detect();
121
+
122
+ // chrome and safari for some reason wrap the ipv6 addresses with []
123
+ simulateCandidate(150, '[2a02:c7c:a0d0:8a00:db9b:d4de:d1f7:4c49]');
124
+ simulateCandidate(50, '[2a02:c7c:a0d0:8a00:d089:7baf:ceef:b9d8]');
125
+ simulateEndOfCandidateGathering(100);
126
+
127
+ await promise;
128
+
129
+ checkResults({
130
+ supportsIpV4: false,
131
+ supportsIpV6: true,
132
+ timings: {
133
+ totalTime: 300,
134
+ ipv4: -1,
135
+ ipv6: 150, // this should match the first ipv6 candidate's delay
136
+ mdns: -1,
137
+ },
138
+ });
139
+ });
140
+
141
+ it('works correctly when we get only ipv6 candidates (Firefox)', async () => {
142
+ const promise = ipNetworkDetector.detect();
143
+
144
+ simulateCandidate(150, '2a02:c7c:a0d0:8a00:db9b:d4de:d1f7:4c49');
145
+ simulateCandidate(50, '2a02:c7c:a0d0:8a00:d089:7baf:ceef:b9d8');
146
+ simulateEndOfCandidateGathering(100);
147
+
148
+ await promise;
149
+
150
+ checkResults({
151
+ supportsIpV4: false,
152
+ supportsIpV6: true,
153
+ timings: {
154
+ totalTime: 300,
155
+ ipv4: -1,
156
+ ipv6: 150, // this should match the first ipv6 candidate's delay
157
+ mdns: -1,
158
+ },
159
+ });
160
+ });
161
+
162
+ it('works correctly when we get both ipv6 and ipv4 candidates', async () => {
163
+ const promise = ipNetworkDetector.detect();
164
+
165
+ simulateCandidate(50, '2a02:c7c:a0d0:8a00:db9b:d4de:d1f7:4c49');
166
+ simulateCandidate(50, '192.168.10.10');
167
+
168
+ // at this point, as we've got at least 1 IPv4 and IPv6 candidate the promise should already be resolved
169
+ await promise;
170
+
171
+ checkResults({
172
+ supportsIpV4: true,
173
+ supportsIpV6: true,
174
+ timings: {
175
+ totalTime: -1, // ice gathering has not finished, so this one is still -1
176
+ ipv4: 100,
177
+ ipv6: 50,
178
+ mdns: -1,
179
+ },
180
+ });
181
+
182
+ // receiving any more candidates should not cause any problems
183
+ simulateCandidate(50, '192.168.1.1');
184
+ simulateCandidate(50, '2a02:c7c:a0d0:8a00:d089:7baf:ceef:b9d8');
185
+ simulateEndOfCandidateGathering(100);
186
+
187
+ // check final results haven't changed (except for totalTime)
188
+ checkResults({
189
+ supportsIpV4: true,
190
+ supportsIpV6: true,
191
+ timings: {
192
+ totalTime: 300,
193
+ ipv4: 100,
194
+ ipv6: 50,
195
+ mdns: -1,
196
+ },
197
+ });
198
+ });
199
+
200
+ it('works correctly when we get only mDNS candidates', async () => {
201
+ const promise = ipNetworkDetector.detect();
202
+
203
+ // simulate some mDNS candidates (this happens if we don't have user media permissions)
204
+ simulateCandidate(50, '686a3cac-2840-4c62-9f85-9f0b03e84298.local');
205
+ simulateCandidate(50, '12f3ab4a3-4741-48c8-b1c9-8dd93d123aa1.local');
206
+ simulateEndOfCandidateGathering(100);
207
+
208
+ await promise;
209
+
210
+ checkResults({
211
+ supportsIpV4: undefined,
212
+ supportsIpV6: undefined,
213
+ timings: {
214
+ totalTime: 200,
215
+ ipv4: -1,
216
+ ipv6: -1,
217
+ mdns: 50,
218
+ },
219
+ });
220
+ });
221
+
222
+ it('works correctly when we get no candidates at all', async () => {
223
+ const promise = ipNetworkDetector.detect();
224
+
225
+ simulateEndOfCandidateGathering(100);
226
+
227
+ await promise;
228
+
229
+ checkResults({
230
+ supportsIpV4: false,
231
+ supportsIpV6: false,
232
+ timings: {
233
+ totalTime: 100,
234
+ ipv4: -1,
235
+ ipv6: -1,
236
+ mdns: -1,
237
+ },
238
+ });
239
+ });
240
+
241
+ // this never happens right now, but in theory browsers might change and if we get
242
+ // mDNS candidates with IPv4, but without IPv6, it is probably safe to assume that we're only on IPv4 network
243
+ it('works correctly when we get mDNS and ipv4 candidates', async () => {
244
+ const promise = ipNetworkDetector.detect();
245
+
246
+ simulateCandidate(50, '686a3cac-2840-4c62-9f85-9f0b03e84298.local');
247
+ simulateCandidate(50, '192.168.0.0');
248
+ simulateEndOfCandidateGathering(100);
249
+
250
+ await promise;
251
+
252
+ checkResults({
253
+ supportsIpV4: true,
254
+ supportsIpV6: false,
255
+ timings: {
256
+ totalTime: 200,
257
+ ipv4: 100,
258
+ ipv6: -1,
259
+ mdns: 50,
260
+ },
261
+ });
262
+ });
263
+
264
+ // this never happens right now, but in theory browsers might change and if we get
265
+ // mDNS candidates with IPv6, but without IPv4, it is probably safe to assume that we're only on IPv6 network
266
+ it('works correctly when we get mDNS and ipv6 candidates', async () => {
267
+ const promise = ipNetworkDetector.detect();
268
+
269
+ simulateCandidate(50, '686a3cac-2840-4c62-9f85-9f0b03e84298.local');
270
+ simulateCandidate(50, '2a02:c7c:a0d0:8a00:db9b:d4de:d1f7:4c49');
271
+ simulateEndOfCandidateGathering(100);
272
+
273
+ await promise;
274
+
275
+ checkResults({
276
+ supportsIpV4: false,
277
+ supportsIpV6: true,
278
+ timings: {
279
+ totalTime: 200,
280
+ ipv4: -1,
281
+ ipv6: 100,
282
+ mdns: 50,
283
+ },
284
+ });
285
+ });
286
+
287
+ it('works correctly when we get null candidate at the end instead of gathering state change event', async () => {
288
+ const promise = ipNetworkDetector.detect();
289
+
290
+ simulateCandidate(50, '2a02:c7c:a0d0:8a00:db9b:d4de:d1f7:4c49');
291
+ simulateCandidate(50, '192.168.10.10');
292
+ simulateEndOfCandidateGathering(100, false);
293
+
294
+ await promise;
295
+
296
+ checkResults({
297
+ supportsIpV4: true,
298
+ supportsIpV6: true,
299
+ timings: {
300
+ totalTime: 200,
301
+ ipv4: 100,
302
+ ipv6: 50,
303
+ mdns: -1,
304
+ },
305
+ });
306
+ });
307
+
308
+ it('resets all the props when called again', async () => {
309
+ const promise = ipNetworkDetector.detect();
310
+
311
+ simulateCandidate(50, '192.168.0.1');
312
+ simulateCandidate(50, '2a02:c7c:a0d0:8a00:db9b:d4de:d1f7:4c49');
313
+ simulateEndOfCandidateGathering(10);
314
+
315
+ await promise;
316
+
317
+ checkResults({
318
+ supportsIpV4: true,
319
+ supportsIpV6: true,
320
+ timings: {
321
+ totalTime: 110,
322
+ ipv4: 50,
323
+ ipv6: 100,
324
+ mdns: -1,
325
+ },
326
+ });
327
+
328
+ // now call detect() again
329
+ const promise2 = ipNetworkDetector.detect();
330
+
331
+ // everything should have been reset
332
+ assert.equal(ipNetworkDetector.supportsIpV4, undefined);
333
+ assert.equal(ipNetworkDetector.supportsIpV6, undefined);
334
+ assert.equal(ipNetworkDetector.firstIpV4, -1);
335
+ assert.equal(ipNetworkDetector.firstIpV6, -1);
336
+ assert.equal(ipNetworkDetector.firstMdns, -1);
337
+ assert.equal(ipNetworkDetector.totalTime, -1);
338
+
339
+ simulateEndOfCandidateGathering(10);
340
+ await promise2;
341
+ });
342
+
343
+ it('rejects if one of RTCPeerConnection operations fails', async () => {
344
+ const fakeError = new Error('fake error');
345
+
346
+ fakePeerConnection.createOffer.rejects(fakeError);
347
+
348
+ await assert.isRejected(ipNetworkDetector.detect(), fakeError);
349
+
350
+ assert.calledOnce(fakePeerConnection.close);
351
+ });
352
+
353
+ describe('while detection is in progress', () => {
354
+ describe('supportsIpv4 prop', () => {
355
+ it('returns undefined before any ipv4 candidate is received and true afterwards', async () => {
356
+ const promise = ipNetworkDetector.detect();
357
+
358
+ assert.equal(ipNetworkDetector.supportsIpV4, undefined);
359
+ assert.equal(ipNetworkDetector.firstIpV4, -1);
360
+
361
+ simulateCandidate(50, 'fd64:17cf:f4ad:0:d089:7baf:ceef:b9d8');
362
+ // still no ipv4 candidates...
363
+ assert.equal(ipNetworkDetector.supportsIpV4, undefined);
364
+ assert.equal(ipNetworkDetector.firstIpV4, -1);
365
+
366
+ simulateCandidate(50, '686a3cac-2840-4c62-9f85-9f0b03e84298.local');
367
+ // still no ipv4 candidates...
368
+ assert.equal(ipNetworkDetector.supportsIpV4, undefined);
369
+ assert.equal(ipNetworkDetector.firstIpV4, -1);
370
+
371
+ simulateCandidate(50, '192.168.0.0');
372
+ // now we've got one
373
+ assert.equal(ipNetworkDetector.supportsIpV4, true);
374
+ assert.equal(ipNetworkDetector.firstIpV4, 150);
375
+
376
+ simulateEndOfCandidateGathering(1);
377
+ await promise;
378
+ });
379
+ });
380
+
381
+ describe('supportsIpv6 prop', () => {
382
+ it('returns undefined before any ipv6 candidate is received and true afterwards', async () => {
383
+ const promise = ipNetworkDetector.detect();
384
+
385
+ assert.equal(ipNetworkDetector.supportsIpV6, undefined);
386
+ assert.equal(ipNetworkDetector.firstIpV6, -1);
387
+
388
+ simulateCandidate(50, '192.168.0.0');
389
+ // still no ipv6 candidates...
390
+ assert.equal(ipNetworkDetector.supportsIpV6, undefined);
391
+ assert.equal(ipNetworkDetector.firstIpV6, -1);
392
+
393
+ simulateCandidate(50, '686a3cac-2860-6c62-9f85-9f0b03e86298.local');
394
+ // still no ipv6 candidates...
395
+ assert.equal(ipNetworkDetector.supportsIpV6, undefined);
396
+ assert.equal(ipNetworkDetector.firstIpV6, -1);
397
+
398
+ simulateCandidate(50, 'fd64:17cf:f4ad:0:d089:7baf:ceef:b9d8');
399
+ // now we've got one
400
+ assert.equal(ipNetworkDetector.supportsIpV6, true);
401
+ assert.equal(ipNetworkDetector.firstIpV6, 150);
402
+
403
+ simulateEndOfCandidateGathering(1);
404
+ await promise;
405
+ });
406
+ });
407
+ });
408
+ });
409
+ });
410
+ });
@@ -1,91 +0,0 @@
1
- declare const CISCO_DEVICE_URL: "cisco-device-url";
2
-
3
- export declare namespace config {
4
- export namespace device {
5
- const canRegisterWaitDuration: number;
6
- const defaults: any;
7
- const enableInactivityEnforcement: boolean;
8
- const ephemeral: boolean;
9
- const ephemeralDeviceTTL: boolean;
10
- }
11
- }
12
-
13
- declare namespace constants {
14
- export {
15
- FEATURE_COLLECTION_DEVELOPER,
16
- FEATURE_COLLECTION_ENTITLEMENT,
17
- FEATURE_COLLECTION_USER,
18
- CISCO_DEVICE_URL,
19
- FEATURE_COLLECTION_NAMES,
20
- FEATURE_TYPES,
21
- DEVICE_EVENT_REGISTRATION_SUCCESS,
22
- DEVICE_EVENTS
23
- }
24
- }
25
- export { constants }
26
-
27
- declare const Device: any;
28
- export default Device;
29
-
30
- declare const DEVICE_EVENT_REGISTRATION_SUCCESS: "registration:success";
31
-
32
- declare const DEVICE_EVENTS: string[];
33
-
34
- /**
35
- * Adds 'cisco-device-url' header, as appropriate, to requests
36
- */
37
- export declare class DeviceUrlInterceptor {
38
- /**
39
- * @returns {DeviceUrlInterceptor}
40
- */
41
- static create(): DeviceUrlInterceptor;
42
- /**
43
- * @see Interceptor#onRequest
44
- * @param {Object} options
45
- * @returns {Object}
46
- */
47
- onRequest(options: any): any;
48
- }
49
-
50
- declare const FEATURE_COLLECTION_DEVELOPER: "developer";
51
-
52
- declare const FEATURE_COLLECTION_ENTITLEMENT: "entitlement";
53
-
54
- declare const FEATURE_COLLECTION_NAMES: string[];
55
-
56
- declare const FEATURE_COLLECTION_USER: "user";
57
-
58
- declare namespace FEATURE_TYPES {
59
- const BOOLEAN: string;
60
- const NUMBER: string;
61
- const STRING: string;
62
- }
63
-
64
- /**
65
- * Feature collection model.
66
- *
67
- * @description
68
- * This model contains a collection of features under a specific collection
69
- * group.
70
- */
71
- export declare const FeatureCollection: any;
72
-
73
- /**
74
- * Feature model.
75
- *
76
- * @description
77
- * This model contains details on a single feature and is received from the
78
- * **WDM** service upon registration.
79
- */
80
- export declare const FeatureModel: any;
81
-
82
- /**
83
- * Feature collection parent container.
84
- *
85
- * @description
86
- * This class contains all of the feature collection class objects to help
87
- * organize the data retrieved from the **wdm** service on device registration.
88
- */
89
- export declare const FeaturesModel: any;
90
-
91
- export { }
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.34.4"
9
- }
10
- ]
11
- }
@@ -1,10 +0,0 @@
1
- declare namespace _default {
2
- namespace device {
3
- const canRegisterWaitDuration: number;
4
- const defaults: any;
5
- const enableInactivityEnforcement: boolean;
6
- const ephemeral: boolean;
7
- const ephemeralDeviceTTL: boolean;
8
- }
9
- }
10
- export default _default;
@@ -1,12 +0,0 @@
1
- export const FEATURE_COLLECTION_DEVELOPER: "developer";
2
- export const FEATURE_COLLECTION_ENTITLEMENT: "entitlement";
3
- export const FEATURE_COLLECTION_USER: "user";
4
- export const CISCO_DEVICE_URL: "cisco-device-url";
5
- export const FEATURE_COLLECTION_NAMES: string[];
6
- export namespace FEATURE_TYPES {
7
- const BOOLEAN: string;
8
- const NUMBER: string;
9
- const STRING: string;
10
- }
11
- export const DEVICE_EVENT_REGISTRATION_SUCCESS: "registration:success";
12
- export const DEVICE_EVENTS: string[];
@@ -1,2 +0,0 @@
1
- export default Device;
2
- declare const Device: any;
@@ -1,9 +0,0 @@
1
- export default FeatureCollection;
2
- /**
3
- * Feature collection model.
4
- *
5
- * @description
6
- * This model contains a collection of features under a specific collection
7
- * group.
8
- */
9
- declare const FeatureCollection: any;
@@ -1,29 +0,0 @@
1
- export default FeatureModel;
2
- /**
3
- * The model returned from the {@link FeatureModelparse } method.
4
- */
5
- export type ParsedFeatureModel = {
6
- /**
7
- * - The parsed val.
8
- */
9
- value: boolean | number | string;
10
- /**
11
- * - The type of the parsed val.
12
- */
13
- type: string;
14
- };
15
- /**
16
- * The model returned from the {@link FeatureModel#parse} method.
17
- *
18
- * @typedef {Object} ParsedFeatureModel
19
- * @property {boolean|number|string} ParsedFeatureModel.value - The parsed val.
20
- * @property {string} ParsedFeatureModel.type - The type of the parsed val.
21
- */
22
- /**
23
- * Feature model.
24
- *
25
- * @description
26
- * This model contains details on a single feature and is received from the
27
- * **WDM** service upon registration.
28
- */
29
- declare const FeatureModel: any;
@@ -1,9 +0,0 @@
1
- export default FeaturesModel;
2
- /**
3
- * Feature collection parent container.
4
- *
5
- * @description
6
- * This class contains all of the feature collection class objects to help
7
- * organize the data retrieved from the **wdm** service on device registration.
8
- */
9
- declare const FeaturesModel: any;
@@ -1,4 +0,0 @@
1
- import FeatureCollection from "./feature-collection";
2
- import FeatureModel from "./feature-model";
3
- import FeaturesModel from "./features-model";
4
- export { FeatureCollection, FeatureModel, FeaturesModel };
@@ -1,8 +0,0 @@
1
- export { default } from "./device";
2
- import config from "./config";
3
- import * as constants from "./constants";
4
- import DeviceUrlInterceptor from "./interceptors/device-url";
5
- import { FeatureCollection } from "./features/index";
6
- import { FeatureModel } from "./features/index";
7
- import { FeaturesModel } from "./features/index";
8
- export { config, constants, DeviceUrlInterceptor, FeatureCollection, FeatureModel, FeaturesModel };
@@ -1,15 +0,0 @@
1
- /**
2
- * Adds 'cisco-device-url' header, as appropriate, to requests
3
- */
4
- export default class DeviceUrlInterceptor {
5
- /**
6
- * @returns {DeviceUrlInterceptor}
7
- */
8
- static create(): DeviceUrlInterceptor;
9
- /**
10
- * @see Interceptor#onRequest
11
- * @param {Object} options
12
- * @returns {Object}
13
- */
14
- onRequest(options: any): any;
15
- }
@@ -1,5 +0,0 @@
1
- declare namespace _default {
2
- const JS_SDK_WDM_REGISTRATION_SUCCESSFUL: string;
3
- const JS_SDK_WDM_REGISTRATION_FAILED: string;
4
- }
5
- export default _default;