@webex/internal-plugin-metrics 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 (78) hide show
  1. package/.eslintrc.js +6 -0
  2. package/babel.config.js +3 -0
  3. package/dist/batcher.js +41 -3
  4. package/dist/batcher.js.map +1 -1
  5. package/dist/call-diagnostic/call-diagnostic-metrics-batcher.js +64 -0
  6. package/dist/call-diagnostic/call-diagnostic-metrics-batcher.js.map +1 -0
  7. package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js +474 -0
  8. package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -0
  9. package/dist/call-diagnostic/call-diagnostic-metrics.js +849 -0
  10. package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -0
  11. package/dist/call-diagnostic/call-diagnostic-metrics.util.js +349 -0
  12. package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -0
  13. package/dist/call-diagnostic/config.js +609 -0
  14. package/dist/call-diagnostic/config.js.map +1 -0
  15. package/dist/client-metrics-batcher.js +3 -3
  16. package/dist/client-metrics-batcher.js.map +1 -1
  17. package/dist/config.js +6 -9
  18. package/dist/config.js.map +1 -1
  19. package/dist/index.js +35 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/metrics.js +24 -22
  22. package/dist/metrics.js.map +1 -1
  23. package/dist/metrics.types.js +7 -0
  24. package/dist/metrics.types.js.map +1 -0
  25. package/dist/new-metrics.js +302 -0
  26. package/dist/new-metrics.js.map +1 -0
  27. package/dist/prelogin-metrics-batcher.js +81 -0
  28. package/dist/prelogin-metrics-batcher.js.map +1 -0
  29. package/dist/types/batcher.d.ts +5 -0
  30. package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +204 -0
  31. package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +427 -0
  32. package/dist/types/call-diagnostic/call-diagnostic-metrics.util.d.ts +103 -0
  33. package/dist/types/call-diagnostic/config.d.ts +178 -0
  34. package/dist/types/config.d.ts +18 -0
  35. package/dist/types/index.d.ts +15 -3
  36. package/dist/types/metrics.d.ts +1 -0
  37. package/dist/types/metrics.types.d.ts +105 -0
  38. package/dist/types/new-metrics.d.ts +131 -0
  39. package/dist/types/prelogin-metrics-batcher.d.ts +2 -0
  40. package/dist/types/utils.d.ts +6 -0
  41. package/dist/utils.js +26 -0
  42. package/dist/utils.js.map +1 -0
  43. package/jest.config.js +3 -0
  44. package/package.json +34 -10
  45. package/process +1 -0
  46. package/src/batcher.js +38 -0
  47. package/src/call-diagnostic/call-diagnostic-metrics-batcher.ts +72 -0
  48. package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +435 -0
  49. package/src/call-diagnostic/call-diagnostic-metrics.ts +912 -0
  50. package/src/call-diagnostic/call-diagnostic-metrics.util.ts +392 -0
  51. package/src/call-diagnostic/config.ts +685 -0
  52. package/src/client-metrics-batcher.js +1 -0
  53. package/src/config.js +1 -0
  54. package/src/index.ts +54 -0
  55. package/src/metrics.js +17 -16
  56. package/src/metrics.types.ts +168 -0
  57. package/src/new-metrics.ts +278 -0
  58. package/src/prelogin-metrics-batcher.ts +95 -0
  59. package/src/utils.ts +17 -0
  60. package/test/unit/spec/batcher.js +2 -0
  61. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-batcher.ts +458 -0
  62. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-latencies.ts +520 -0
  63. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +2276 -0
  64. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +628 -0
  65. package/test/unit/spec/client-metrics-batcher.js +2 -0
  66. package/test/unit/spec/metrics.js +68 -95
  67. package/test/unit/spec/new-metrics.ts +233 -0
  68. package/test/unit/spec/prelogin-metrics-batcher.ts +250 -0
  69. package/test/unit/spec/utils.ts +22 -0
  70. package/tsconfig.json +6 -0
  71. package/dist/call-diagnostic-events-batcher.js +0 -60
  72. package/dist/call-diagnostic-events-batcher.js.map +0 -1
  73. package/dist/internal-plugin-metrics.d.ts +0 -21
  74. package/dist/tsdoc-metadata.json +0 -11
  75. package/src/call-diagnostic-events-batcher.js +0 -62
  76. package/src/index.js +0 -17
  77. package/test/unit/spec/call-diagnostic-events-batcher.js +0 -195
  78. package/dist/types/{call-diagnostic-events-batcher.d.ts → call-diagnostic/call-diagnostic-metrics-batcher.d.ts} +1 -1
@@ -0,0 +1,427 @@
1
+ import { StatelessWebexPlugin } from '@webex/webex-core';
2
+ import { Event, ClientType, SubClientType, NetworkType, EnvironmentType, NewEnvironmentType, ClientEvent, SubmitClientEventOptions, MediaQualityEvent, SubmitMQEOptions, SubmitMQEPayload, ClientLaunchMethodType, ClientEventError, ClientEventPayload, ClientSubServiceType } from '../metrics.types';
3
+ type GetOriginOptions = {
4
+ clientType: ClientType;
5
+ subClientType: SubClientType;
6
+ networkType?: NetworkType;
7
+ clientLaunchMethod?: ClientLaunchMethodType;
8
+ environment?: EnvironmentType;
9
+ newEnvironment?: NewEnvironmentType;
10
+ };
11
+ type GetIdentifiersOptions = {
12
+ meeting?: any;
13
+ mediaConnections?: any[];
14
+ correlationId?: string;
15
+ preLoginId?: string;
16
+ globalMeetingId?: string;
17
+ webexConferenceIdStr?: string;
18
+ };
19
+ /**
20
+ * @description Util class to handle Call Analyzer Metrics
21
+ * @export
22
+ * @class CallDiagnosticMetrics
23
+ */
24
+ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
25
+ private callDiagnosticEventsBatcher;
26
+ private preLoginMetricsBatcher;
27
+ private logger;
28
+ private hasLoggedBrowserSerial;
29
+ validator: (options: {
30
+ type: 'mqe' | 'ce';
31
+ event: Event;
32
+ }) => Promise<{
33
+ event: Event;
34
+ valid: boolean;
35
+ }>;
36
+ /**
37
+ * Constructor
38
+ * @param args
39
+ */
40
+ constructor(...args: any[]);
41
+ /**
42
+ * Returns the login type of the current user
43
+ * @returns one of 'login-ci','unverified-guest', null
44
+ */
45
+ getCurLoginType(): "unverified-guest" | "login-ci";
46
+ /**
47
+ * Returns if the meeting has converged architecture enabled
48
+ * @param options.meetingId
49
+ */
50
+ getIsConvergedArchitectureEnabled({ meetingId }: {
51
+ meetingId?: string;
52
+ }): boolean;
53
+ /**
54
+ * Returns meeting's subServiceType
55
+ * @param meeting
56
+ * @returns
57
+ */
58
+ getSubServiceType(meeting?: any): ClientSubServiceType;
59
+ /**
60
+ * Get origin object for Call Diagnostic Event payload.
61
+ * @param options
62
+ * @param meetingId
63
+ * @returns
64
+ */
65
+ getOrigin(options: GetOriginOptions, meetingId?: string): {
66
+ name: "endpoint" | "antares" | "beech" | "breakout" | "cb" | "cloudproxy" | "edonus" | "givr" | "hecate" | "hedge" | "hesiod" | "homer" | "superhomer" | "l2sip" | "linus" | "locus" | "mcc" | "mcs" | "mercury" | "mes" | "mjs" | "mmp" | "mygdon" | "orpheus" | "page" | "poros" | "rhesos" | "terminus" | "tpgw" | "ucc" | "wdm" | "webexivr";
67
+ userAgent: string;
68
+ buildType?: "debug" | "test" | "prod" | "tap" | "analyzer-test";
69
+ upgradeChannel?: string;
70
+ instanceId?: string;
71
+ networkType: "wifi" | "ethernet" | "cellular" | "unknown";
72
+ localIP?: string;
73
+ usingProxy?: boolean;
74
+ mediaEngineSoftwareVersion?: string;
75
+ environment?: string;
76
+ newEnvironment?: string;
77
+ clientInfo?: {
78
+ os?: "windows" | "mac" | "ios" | "android" | "chrome" | "linux" | "other" | "android-x64" | "android-arm64" | "uwp-arm64";
79
+ osVersion?: string;
80
+ localIP?: string;
81
+ gatewayIP?: string;
82
+ macAddress?: string;
83
+ localNetworkPrefix?: string;
84
+ publicNetworkPrefix?: string;
85
+ browserLaunchMethod?: "url-handler" | "activex" | "npapi" | "extension" | "cwsapi" | "java" | "tfs" | "webacd" | "thinclient" | "switch-to-web" | "switch-to-native";
86
+ clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch" | "mc-cross-launch";
87
+ browser?: string;
88
+ browserVersion?: string;
89
+ clientType?: "MEETING_CENTER" | "EVENT_CENTER" | "TRAINING_CENTER" | "TEAMS_CLIENT" | "TEAMS_DEVICE" | "TEAMS_SHARE" | "SIP" | "RECORDING" | "CLOUD_AWARE_SIP" | "TEAMS_WXC_CLIENT" | "WXC_CLIENT" | "WXC_DEVICE" | "WEBEX_JS_SDK" | "VOICEA_CLIENT" | "CISCO_SIP_GW" | "WEBEX_SDK" | "CPAAS_THIRD_PARTY_SDK" | "WXC_THIRD_PARTY" | "WXCC";
90
+ subClientType?: "TEAMS_DEVICE" | "DESKTOP_APP" | "DESKTOP_APP_VDI" | "DEVICE_CURRENT" | "DEVICE_LEGACY_2020" | "HOLOGRAM_HEADSET_APP" | "HVDI_APP" | "MOBILE_APP" | "MOBILE_NETWORK" | "VDI_APP" | "WEB_APP";
91
+ clientVersion?: string; /**
92
+ * Returns the login type of the current user
93
+ * @returns one of 'login-ci','unverified-guest', null
94
+ */
95
+ clientVersionStatus?: "CURRENT" | "LEGACY" | "UNSUPPORTED";
96
+ localClientVersion?: string;
97
+ modelNumber?: string;
98
+ joinFirstUpdateLater?: "ep-enabled" | "sp-enabled" | "not-enabled"; /**
99
+ * Returns if the meeting has converged architecture enabled
100
+ * @param options.meetingId
101
+ */
102
+ standbyUsed?: boolean;
103
+ prefetchDocShowUsed?: boolean;
104
+ fastJoinUsed?: boolean;
105
+ clientDownloadSize?: number;
106
+ clientDownloadFileCount?: number;
107
+ nodeId?: number;
108
+ machineInfo?: string;
109
+ parentAppName?: string;
110
+ parentAppInPermitList?: boolean;
111
+ meetingSiteType?: "train" | "webex-11" | "orion";
112
+ CDNEnabled?: boolean;
113
+ clientMajorVersion?: string;
114
+ majorVersion?: number;
115
+ minorVersion?: number;
116
+ revision?: number;
117
+ isValidClientVersion?: boolean;
118
+ cpuInfo?: {
119
+ description: string;
120
+ clockSpeedGigaHertz: number;
121
+ numberOfCores: number;
122
+ architecture: "unknown" | "intel32" | "intel64" | "amd32" | "amd64" | "arm32" | "arm64";
123
+ staticPerformance?: string;
124
+ additionalProperties?: false;
125
+ };
126
+ shareType?: "cb-normal-share" | "ce-airplay-share" | "ce-direct-share" | "ce-gui-loopback-share" | "ce-input-source-share" | "ce-input-source-share-hdmi" | "ce-input-source-share-usbc" | "ce-jpg-share" | "ce-miracast-share" | "mcs-normal-share" | "mcs-normal-audio-share" | "mcs-hfps-share" | "mcs-hfps-audio-share";
127
+ videoDisplayMode?: "grid-view" | "active-speaker-view";
128
+ videoLayoutType?: "stack" | "stackWithShare" | "sideBySide" | "sideBySideWithShare" | "grid" | "floatingActive" | "floatingThumbnail" | "floatingGrid" | "overlay" | "focus" | "prominent" | "focusWithShare" | "prominentWithShare" | "equal" | "equalWithShare";
129
+ videoRenderType?: "wme" | "client_d3d" | "client_gdi";
130
+ vdiInfo?: {};
131
+ is64BitsClient?: boolean;
132
+ webexAppVersion?: string;
133
+ launch32BitsReason?: "forcewin32" | "disablewin64" | "platform_win32" | "platform_arm" | "platform_unknown" | "version_below_41.11";
134
+ inMeetingUpdate?: boolean;
135
+ mtaVersion?: string;
136
+ isWarholOpening?: boolean;
137
+ additionalProperties?: false;
138
+ };
139
+ emmVendorId?: string;
140
+ isHybridMedia?: boolean;
141
+ originData?: {};
142
+ additionalProperties?: false;
143
+ };
144
+ /**
145
+ * Gather identifier details for call diagnostic payload.
146
+ * @throws Error if initialization fails.
147
+ * @param options
148
+ */
149
+ getIdentifiers(options: GetIdentifiersOptions): {
150
+ attendeeId?: string;
151
+ breakoutGroupId?: string;
152
+ breakoutMoveId?: string;
153
+ breakoutSessionId?: string;
154
+ confluenceId?: string;
155
+ cpaasIdentifiers?: {
156
+ imiTenantId: string;
157
+ devClientId: string;
158
+ imiServiceId: string;
159
+ imiAppId: string;
160
+ sessionId: string;
161
+ sessionInstanceId: string;
162
+ additionalProperties?: false;
163
+ };
164
+ csdmDeviceUrl?: string;
165
+ destinationBreakoutSessionId?: string;
166
+ destinationLocusSessionId?: string;
167
+ destinationLocusUrl?: string;
168
+ destinationVenueId?: string;
169
+ deviceId?: string;
170
+ globalMeetingId?: string;
171
+ ivrCallId?: string;
172
+ ivrDialogId?: string;
173
+ ivrId?: string;
174
+ callId?: string;
175
+ locusId?: string;
176
+ locusSessionId?: string;
177
+ locusStartTime?: string;
178
+ locusUrl?: string;
179
+ machineId?: string;
180
+ mediaAgentAlias?: string;
181
+ mediaAgentGroupId?: string;
182
+ meetClusterName?: string;
183
+ meetingInstanceId?: string;
184
+ meetingLookupUrl?: string;
185
+ meetingOrgId?: string;
186
+ msteamsTenantGuid?: string;
187
+ msteamsConferenceId?: string;
188
+ oauth2ClientId?: string;
189
+ orgId?: string;
190
+ provisionalCorrelationId?: string;
191
+ roomId?: string;
192
+ sipCallId?: string;
193
+ sipSessionId?: {
194
+ local?: string;
195
+ remote?: string;
196
+ additionalProperties?: false;
197
+ };
198
+ sipUri?: string;
199
+ subConfId?: string;
200
+ tenantId?: string;
201
+ trackingId?: string;
202
+ userId?: string;
203
+ venueId?: string;
204
+ venueUrl?: string;
205
+ whiteboardUrl?: string;
206
+ webexConferenceId?: number;
207
+ webexClusterName?: string;
208
+ webexConferenceIdStr?: string;
209
+ webexDataCenter?: string;
210
+ webexGuestId?: number;
211
+ webexMeetingId?: number;
212
+ webexNodeId?: number;
213
+ webexSiteId?: number;
214
+ webexSiteName?: string;
215
+ webexSiteUuid?: string;
216
+ webexUserId?: number;
217
+ webexWebDomain?: string;
218
+ correlationId: string;
219
+ additionalProperties?: false;
220
+ } | {
221
+ attendeeId?: string;
222
+ breakoutGroupId?: string;
223
+ breakoutMoveId?: string;
224
+ breakoutSessionId?: string;
225
+ confluenceId?: string;
226
+ cpaasIdentifiers?: {
227
+ imiTenantId: string;
228
+ devClientId: string;
229
+ imiServiceId: string;
230
+ imiAppId: string;
231
+ sessionId: string;
232
+ sessionInstanceId: string;
233
+ additionalProperties?: false;
234
+ };
235
+ csdmDeviceUrl?: string;
236
+ destinationBreakoutSessionId?: string;
237
+ destinationLocusSessionId?: string;
238
+ destinationLocusUrl?: string;
239
+ destinationVenueId?: string;
240
+ deviceId?: string;
241
+ globalMeetingId?: string;
242
+ ivrCallId?: string;
243
+ ivrDialogId?: string;
244
+ ivrId?: string;
245
+ callId?: string;
246
+ locusId?: string;
247
+ locusSessionId?: string;
248
+ locusStartTime?: string;
249
+ locusUrl?: string;
250
+ machineId?: string;
251
+ mediaAgentAlias?: string;
252
+ mediaAgentGroupId?: string;
253
+ meetClusterName?: string;
254
+ meetingInstanceId?: string;
255
+ meetingLookupUrl?: string;
256
+ meetingOrgId?: string;
257
+ msteamsTenantGuid?: string;
258
+ msteamsConferenceId?: string;
259
+ oauth2ClientId?: string;
260
+ orgId?: string;
261
+ provisionalCorrelationId?: string;
262
+ roomId?: string;
263
+ sipCallId?: string;
264
+ sipSessionId?: {
265
+ local?: string;
266
+ remote?: string;
267
+ additionalProperties?: false;
268
+ };
269
+ sipUri?: string;
270
+ subConfId?: string;
271
+ tenantId?: string;
272
+ trackingId?: string;
273
+ userId?: string;
274
+ venueId?: string;
275
+ venueUrl?: string;
276
+ whiteboardUrl?: string;
277
+ webexConferenceId?: number;
278
+ webexClusterName?: string;
279
+ webexConferenceIdStr?: string;
280
+ webexDataCenter?: string;
281
+ webexGuestId?: number;
282
+ webexMeetingId?: number;
283
+ webexNodeId?: number;
284
+ webexSiteId?: number;
285
+ webexSiteName?: string;
286
+ webexSiteUuid?: string;
287
+ webexUserId?: number;
288
+ webexWebDomain?: string;
289
+ correlationId: string;
290
+ additionalProperties?: false;
291
+ };
292
+ /**
293
+ * Create diagnostic event, which can hold client event, feature event or MQE event data.
294
+ * This just initiates the shared properties that are required for all the 3 event categories.
295
+ * @param eventData
296
+ * @param options
297
+ * @returns
298
+ */
299
+ prepareDiagnosticEvent(eventData: Event['event'], options: any): Event;
300
+ /**
301
+ * TODO: NOT IMPLEMENTED
302
+ * Submit Feature Event
303
+ * @returns
304
+ */
305
+ submitFeatureEvent(): void;
306
+ /**
307
+ * Submit Media Quality Event
308
+ * @param args - submit params
309
+ * @param arg.name - event key
310
+ * @param arg.payload - additional payload to be merge with the default payload
311
+ * @param arg.options - options
312
+ */
313
+ submitMQE({ name, payload, options, }: {
314
+ name: MediaQualityEvent['name'];
315
+ payload: SubmitMQEPayload;
316
+ options: SubmitMQEOptions;
317
+ }): void;
318
+ /**
319
+ * Return Client Event payload by client error code
320
+ * @param arg - get error arg
321
+ * @param arg.clientErrorCode
322
+ * @param arg.serviceErrorCode
323
+ * @param arg.payloadOverrides
324
+ * @param arg.httpStatusCode
325
+ * @returns
326
+ */
327
+ getErrorPayloadForClientErrorCode({ clientErrorCode, serviceErrorCode, serviceErrorName, rawErrorMessage, payloadOverrides, httpStatusCode, }: {
328
+ clientErrorCode: number;
329
+ serviceErrorCode: any;
330
+ serviceErrorName?: any;
331
+ rawErrorMessage?: string;
332
+ payloadOverrides?: any;
333
+ httpStatusCode?: number;
334
+ }): ClientEventError;
335
+ /**
336
+ * Generate error payload for Client Event
337
+ * @param rawError
338
+ */
339
+ generateClientEventErrorPayload(rawError: any): {
340
+ fatal: boolean;
341
+ category: "other" | "signaling" | "media" | "network" | "expected";
342
+ errorDescription?: string;
343
+ errorCode?: number;
344
+ errorCodeStr?: string;
345
+ httpCode?: number;
346
+ errorCodeExt1?: number;
347
+ errorData?: {};
348
+ rawErrorMessage?: string;
349
+ shownToUser: boolean;
350
+ serviceErrorCode?: number;
351
+ name: "other" | "locus.response" | "media-engine" | "ice.failed" | "locus.leave" | "client.leave" | "media-device" | "media-sca" | "wxc";
352
+ additionalProperties?: false;
353
+ };
354
+ /**
355
+ * Create client event object for in meeting events
356
+ * @param arg - create args
357
+ * @param arg.event - event key
358
+ * @param arg.options - options
359
+ * @returns object
360
+ */
361
+ private createClientEventObjectInMeeting;
362
+ /**
363
+ * Create client event object for pre meeting events
364
+ * @param arg - create args
365
+ * @param arg.event - event key
366
+ * @param arg.options - payload
367
+ * @returns object
368
+ */
369
+ private createClientEventObjectPreMeeting;
370
+ /**
371
+ * Prepare Client Event CA event.
372
+ * @param arg - submit params
373
+ * @param arg.event - event key
374
+ * @param arg.payload - additional payload to be merged with default payload
375
+ * @param arg.options - payload
376
+ * @returns {any} options to be with fetch
377
+ * @throws
378
+ */
379
+ private prepareClientEvent;
380
+ /**
381
+ * Submit Client Event CA event.
382
+ * @param arg - submit params
383
+ * @param arg.event - event key
384
+ * @param arg.payload - additional payload to be merged with default payload
385
+ * @param arg.options - payload
386
+ * @throws
387
+ */
388
+ submitClientEvent({ name, payload, options, }: {
389
+ name: ClientEvent['name'];
390
+ payload?: ClientEventPayload;
391
+ options?: SubmitClientEventOptions;
392
+ }): Promise<any>;
393
+ /**
394
+ * Prepare the event and send the request to metrics-a service.
395
+ * @param event
396
+ * @returns promise
397
+ */
398
+ submitToCallDiagnostics(event: Event): Promise<any>;
399
+ /**
400
+ * Prepare the event and send the request to metrics-a service, pre login.
401
+ * @param event
402
+ * @param preLoginId
403
+ * @returns
404
+ */
405
+ submitToCallDiagnosticsPreLogin: (event: Event, preLoginId?: string) => Promise<any>;
406
+ /**
407
+ * Builds a request options object to later be passed to fetch().
408
+ * @param arg - submit params
409
+ * @param arg.event - event key
410
+ * @param arg.payload - additional payload to be merged with default payload
411
+ * @param arg.options - client event options
412
+ * @returns {Promise<any>}
413
+ * @throws
414
+ */
415
+ buildClientEventFetchRequestOptions({ name, payload, options, }: {
416
+ name: ClientEvent['name'];
417
+ payload?: ClientEventPayload;
418
+ options?: SubmitClientEventOptions;
419
+ }): Promise<any>;
420
+ /**
421
+ * Returns true if the specified serviceErrorCode maps to an expected error.
422
+ * @param {number} serviceErrorCode the service error code
423
+ * @returns {boolean}
424
+ */
425
+ isServiceErrorExpected(serviceErrorCode: number): boolean;
426
+ }
427
+ export {};
@@ -0,0 +1,103 @@
1
+ import { Event } from '../metrics.types';
2
+ export declare const anonymizeIPAddress: (localIp: any) => string;
3
+ /**
4
+ * Returns a formated string of the user agent.
5
+ *
6
+ * @returns {string} formatted user agent information
7
+ */
8
+ export declare const userAgentToString: ({ clientName, webexVersion }: {
9
+ clientName: any;
10
+ webexVersion: any;
11
+ }) => string;
12
+ /**
13
+ * Iterates object recursively and removes any
14
+ * property that returns isEmpty for it's associated value
15
+ * isEmpty = implementation from Lodash.
16
+ *
17
+ * It modifies the object in place (mutable)
18
+ *
19
+ * @param obj - input
20
+ * @returns
21
+ */
22
+ export declare const clearEmptyKeysRecursively: (obj: any) => void;
23
+ /**
24
+ * Locus error codes start with 2. The next three digits are the
25
+ * HTTP status code related to the error code (like 400, 403, 502, etc.)
26
+ * The remaining three digits are just an increasing integer.
27
+ * If it is 7 digits and starts with a 2, it is locus.
28
+ *
29
+ * @param errorCode
30
+ * @returns {boolean}
31
+ */
32
+ export declare const isLocusServiceErrorCode: (errorCode: string | number) => boolean;
33
+ /**
34
+ * MeetingInfo errors sometimes has body.data.meetingInfo object
35
+ * MeetingInfo errors come with a wbxappapi url
36
+ *
37
+ * @param {Object} rawError
38
+ * @returns {boolean}
39
+ */
40
+ export declare const isMeetingInfoServiceError: (rawError: any) => boolean;
41
+ /**
42
+ * Returns true if the raw error is a network related error
43
+ *
44
+ * @param {Object} rawError
45
+ * @returns {boolean}
46
+ */
47
+ export declare const isNetworkError: (rawError: any) => boolean;
48
+ /**
49
+ * Returns true if the error is an unauthorized error
50
+ *
51
+ * @param {Object} rawError
52
+ * @returns {boolean}
53
+ */
54
+ export declare const isUnauthorizedError: (rawError: any) => boolean;
55
+ /**
56
+ * Returns true if the error is an SdpOfferCreation error
57
+ *
58
+ * @param {Object} rawError
59
+ * @returns {boolean}
60
+ */
61
+ export declare const isSdpOfferCreationError: (rawError: any) => boolean;
62
+ /**
63
+ * MDN Media Devices getUserMedia() method returns a name if it errs
64
+ * Documentation can be found here: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
65
+ *
66
+ * @param errorCode
67
+ * @returns
68
+ */
69
+ export declare const isBrowserMediaErrorName: (errorName: any) => boolean;
70
+ /**
71
+ * @param webClientDomain
72
+ * @returns
73
+ */
74
+ export declare const getBuildType: (webClientDomain: any, markAsTestEvent?: boolean) => Event['origin']['buildType'];
75
+ /**
76
+ * Prepare metric item for submission.
77
+ * @param {Object} webex sdk instance
78
+ * @param {Object} item
79
+ * @returns {Object} prepared item
80
+ */
81
+ export declare const prepareDiagnosticMetricItem: (webex: any, item: any) => any;
82
+ /**
83
+ * Sets the originTime value(s) before the request/fetch.
84
+ * This function is only useful if you are about to submit a metrics
85
+ * request using pre-built fetch options;
86
+ *
87
+ * @param {any} options
88
+ * @returns {any} the updated options object
89
+ */
90
+ export declare const setMetricTimings: (options: any) => any;
91
+ export declare const extractVersionMetadata: (version: string) => {
92
+ majorVersion: number;
93
+ minorVersion: number;
94
+ };
95
+ /**
96
+ * Generates client error codes for specific ice failures
97
+ * that happen when trying to add media in a meeting.
98
+ */
99
+ export declare const generateClientErrorCodeForIceFailure: ({ signalingState, iceConnectionState, turnServerUsed, }: {
100
+ signalingState: RTCPeerConnection['signalingState'];
101
+ iceConnectionState: RTCPeerConnection['iceConnectionState'];
102
+ turnServerUsed: boolean;
103
+ }) => number;