@webex/internal-plugin-metrics 3.0.0-beta.35 → 3.0.0-beta.350

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 (68) hide show
  1. package/dist/batcher.js +2 -1
  2. package/dist/batcher.js.map +1 -1
  3. package/dist/call-diagnostic/call-diagnostic-metrics-batcher.js +65 -0
  4. package/dist/call-diagnostic/call-diagnostic-metrics-batcher.js.map +1 -0
  5. package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js +456 -0
  6. package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -0
  7. package/dist/call-diagnostic/call-diagnostic-metrics.js +827 -0
  8. package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -0
  9. package/dist/call-diagnostic/call-diagnostic-metrics.util.js +337 -0
  10. package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -0
  11. package/dist/call-diagnostic/config.js +610 -0
  12. package/dist/call-diagnostic/config.js.map +1 -0
  13. package/dist/client-metrics-batcher.js +2 -1
  14. package/dist/client-metrics-batcher.js.map +1 -1
  15. package/dist/config.js +2 -1
  16. package/dist/config.js.map +1 -1
  17. package/dist/index.js +18 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/metrics.js +23 -28
  20. package/dist/metrics.js.map +1 -1
  21. package/dist/metrics.types.js +7 -0
  22. package/dist/metrics.types.js.map +1 -0
  23. package/dist/new-metrics.js +333 -0
  24. package/dist/new-metrics.js.map +1 -0
  25. package/dist/types/batcher.d.ts +2 -0
  26. package/dist/types/call-diagnostic/call-diagnostic-metrics-batcher.d.ts +2 -0
  27. package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +194 -0
  28. package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +418 -0
  29. package/dist/types/call-diagnostic/call-diagnostic-metrics.util.d.ts +96 -0
  30. package/dist/types/call-diagnostic/config.d.ts +172 -0
  31. package/dist/types/client-metrics-batcher.d.ts +2 -0
  32. package/dist/types/config.d.ts +36 -0
  33. package/dist/types/index.d.ts +13 -0
  34. package/dist/types/metrics.d.ts +3 -0
  35. package/dist/types/metrics.types.d.ts +104 -0
  36. package/dist/types/new-metrics.d.ts +139 -0
  37. package/dist/types/utils.d.ts +6 -0
  38. package/dist/utils.js +27 -0
  39. package/dist/utils.js.map +1 -0
  40. package/package.json +13 -8
  41. package/src/batcher.js +1 -0
  42. package/src/call-diagnostic/call-diagnostic-metrics-batcher.ts +75 -0
  43. package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +419 -0
  44. package/src/call-diagnostic/call-diagnostic-metrics.ts +882 -0
  45. package/src/call-diagnostic/call-diagnostic-metrics.util.ts +362 -0
  46. package/src/call-diagnostic/config.ts +666 -0
  47. package/src/client-metrics-batcher.js +1 -0
  48. package/src/config.js +1 -0
  49. package/src/index.ts +43 -0
  50. package/src/metrics.js +18 -24
  51. package/src/metrics.types.ts +160 -0
  52. package/src/new-metrics.ts +317 -0
  53. package/src/utils.ts +17 -0
  54. package/test/unit/spec/batcher.js +2 -0
  55. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-batcher.ts +452 -0
  56. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-latencies.ts +506 -0
  57. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +2109 -0
  58. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +565 -0
  59. package/test/unit/spec/client-metrics-batcher.js +2 -0
  60. package/test/unit/spec/metrics.js +66 -97
  61. package/test/unit/spec/new-metrics.ts +267 -0
  62. package/test/unit/spec/utils.ts +22 -0
  63. package/tsconfig.json +6 -0
  64. package/dist/call-diagnostic-events-batcher.js +0 -60
  65. package/dist/call-diagnostic-events-batcher.js.map +0 -1
  66. package/src/call-diagnostic-events-batcher.js +0 -62
  67. package/src/index.js +0 -17
  68. package/test/unit/spec/call-diagnostic-events-batcher.js +0 -195
@@ -0,0 +1,418 @@
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 logger;
27
+ private hasLoggedBrowserSerial;
28
+ validator: (options: {
29
+ type: 'mqe' | 'ce';
30
+ event: Event;
31
+ }) => Promise<{
32
+ event: Event;
33
+ valid: boolean;
34
+ }>;
35
+ /**
36
+ * Constructor
37
+ * @param args
38
+ */
39
+ constructor(...args: any[]);
40
+ /**
41
+ * Returns the login type of the current user
42
+ * @returns one of 'login-ci','unverified-guest', null
43
+ */
44
+ getCurLoginType(): "unverified-guest" | "login-ci";
45
+ /**
46
+ * Returns if the meeting has converged architecture enabled
47
+ * @param options.meetingId
48
+ */
49
+ getIsConvergedArchitectureEnabled({ meetingId }: {
50
+ meetingId?: string;
51
+ }): boolean;
52
+ /**
53
+ * Returns meeting's subServiceType
54
+ * @param meeting
55
+ * @returns
56
+ */
57
+ getSubServiceType(meeting?: any): ClientSubServiceType;
58
+ /**
59
+ * Get origin object for Call Diagnostic Event payload.
60
+ * @param options
61
+ * @param meetingId
62
+ * @returns
63
+ */
64
+ getOrigin(options: GetOriginOptions, meetingId?: string): {
65
+ 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";
66
+ userAgent: string;
67
+ buildType?: "debug" | "test" | "prod" | "tap" | "analyzer-test";
68
+ upgradeChannel?: string;
69
+ instanceId?: string;
70
+ networkType: "wifi" | "ethernet" | "cellular" | "unknown";
71
+ localIP?: string;
72
+ usingProxy?: boolean;
73
+ mediaEngineSoftwareVersion?: string;
74
+ environment?: string;
75
+ newEnvironment?: string;
76
+ clientInfo?: {
77
+ os?: "windows" | "mac" | "ios" | "android" | "chrome" | "linux" | "other" | "android-x64" | "android-arm64" | "uwp-arm64";
78
+ osVersion?: string;
79
+ localIP?: string;
80
+ gatewayIP?: string;
81
+ macAddress?: string;
82
+ localNetworkPrefix?: string;
83
+ publicNetworkPrefix?: string;
84
+ browserLaunchMethod?: "url-handler" | "activex" | "npapi" | "extension" | "cwsapi" | "java" | "tfs" | "webacd" | "thinclient" | "switch-to-web" | "switch-to-native";
85
+ clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch" | "mc-cross-launch";
86
+ browser?: string;
87
+ browserVersion?: string;
88
+ 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";
89
+ 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";
90
+ clientVersion?: string;
91
+ clientVersionStatus?: "CURRENT" | "LEGACY" | "UNSUPPORTED";
92
+ localClientVersion?: string;
93
+ modelNumber?: string;
94
+ joinFirstUpdateLater?: "ep-enabled" | "sp-enabled" | "not-enabled";
95
+ standbyUsed?: boolean;
96
+ prefetchDocShowUsed?: boolean;
97
+ fastJoinUsed?: boolean;
98
+ clientDownloadSize?: number;
99
+ clientDownloadFileCount?: number;
100
+ nodeId?: number;
101
+ machineInfo?: string;
102
+ parentAppName?: string;
103
+ parentAppInPermitList?: boolean;
104
+ meetingSiteType?: "train" | "webex-11" | "orion";
105
+ CDNEnabled?: boolean;
106
+ clientMajorVersion?: string;
107
+ majorVersion?: number;
108
+ minorVersion?: number;
109
+ revision?: number;
110
+ isValidClientVersion?: boolean;
111
+ cpuInfo?: {
112
+ description: string;
113
+ clockSpeedGigaHertz: number;
114
+ numberOfCores: number;
115
+ architecture: "unknown" | "intel32" | "intel64" | "amd32" | "amd64" | "arm32" | "arm64";
116
+ staticPerformance?: string;
117
+ additionalProperties?: false;
118
+ };
119
+ 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";
120
+ videoDisplayMode?: "grid-view" | "active-speaker-view";
121
+ videoLayoutType?: "stack" | "stackWithShare" | "sideBySide" | "sideBySideWithShare" | "grid" | "floatingActive" | "floatingThumbnail" | "floatingGrid" | "overlay" | "focus" | "prominent" | "focusWithShare" | "prominentWithShare" | "equal" | "equalWithShare";
122
+ videoRenderType?: "wme" | "client_d3d" | "client_gdi";
123
+ vdiInfo?: {};
124
+ is64BitsClient?: boolean;
125
+ webexAppVersion?: string;
126
+ launch32BitsReason?: "forcewin32" | "disablewin64" | "platform_win32" | "platform_arm" | "platform_unknown" | "version_below_41.11";
127
+ inMeetingUpdate?: boolean;
128
+ mtaVersion?: string;
129
+ isWarholOpening?: boolean;
130
+ additionalProperties?: false;
131
+ };
132
+ emmVendorId?: string;
133
+ isHybridMedia?: boolean;
134
+ originData?: {};
135
+ additionalProperties?: false;
136
+ };
137
+ /**
138
+ * Gather identifier details for call diagnostic payload.
139
+ * @throws Error if initialization fails.
140
+ * @param options
141
+ */
142
+ getIdentifiers(options: GetIdentifiersOptions): {
143
+ attendeeId?: string;
144
+ breakoutGroupId?: string;
145
+ breakoutMoveId?: string;
146
+ breakoutSessionId?: string;
147
+ confluenceId?: string;
148
+ cpaasIdentifiers?: {
149
+ imiTenantId: string;
150
+ devClientId: string;
151
+ imiServiceId: string;
152
+ imiAppId: string;
153
+ sessionId: string;
154
+ sessionInstanceId: string;
155
+ additionalProperties?: false;
156
+ };
157
+ csdmDeviceUrl?: string;
158
+ destinationBreakoutSessionId?: string;
159
+ destinationLocusSessionId?: string;
160
+ destinationLocusUrl?: string;
161
+ destinationVenueId?: string;
162
+ deviceId?: string;
163
+ globalMeetingId?: string;
164
+ ivrCallId?: string;
165
+ ivrDialogId?: string;
166
+ ivrId?: string;
167
+ callId?: string;
168
+ locusId?: string;
169
+ locusSessionId?: string;
170
+ locusStartTime?: string;
171
+ locusUrl?: string;
172
+ machineId?: string;
173
+ mediaAgentAlias?: string;
174
+ mediaAgentGroupId?: string;
175
+ meetClusterName?: string;
176
+ meetingInstanceId?: string;
177
+ meetingLookupUrl?: string;
178
+ meetingOrgId?: string;
179
+ msteamsTenantGuid?: string;
180
+ msteamsConferenceId?: string;
181
+ oauth2ClientId?: string;
182
+ orgId?: string;
183
+ provisionalCorrelationId?: string;
184
+ roomId?: string;
185
+ sipCallId?: string;
186
+ sipSessionId?: {
187
+ local?: string;
188
+ remote?: string;
189
+ additionalProperties?: false;
190
+ };
191
+ sipUri?: string;
192
+ subConfId?: string;
193
+ tenantId?: string;
194
+ trackingId?: string;
195
+ userId?: string;
196
+ venueId?: string;
197
+ venueUrl?: string;
198
+ whiteboardUrl?: string;
199
+ webexConferenceId?: number;
200
+ webexClusterName?: string;
201
+ webexConferenceIdStr?: string;
202
+ webexDataCenter?: string;
203
+ webexGuestId?: number;
204
+ webexMeetingId?: number;
205
+ webexNodeId?: number;
206
+ webexSiteId?: number;
207
+ webexSiteName?: string;
208
+ webexSiteUuid?: string;
209
+ webexUserId?: number;
210
+ webexWebDomain?: string;
211
+ correlationId: string;
212
+ additionalProperties?: false;
213
+ } | {
214
+ attendeeId?: string;
215
+ breakoutGroupId?: string;
216
+ breakoutMoveId?: string;
217
+ breakoutSessionId?: string;
218
+ confluenceId?: string;
219
+ cpaasIdentifiers?: {
220
+ imiTenantId: string;
221
+ devClientId: string;
222
+ imiServiceId: string;
223
+ imiAppId: string;
224
+ sessionId: string;
225
+ sessionInstanceId: string;
226
+ additionalProperties?: false;
227
+ };
228
+ csdmDeviceUrl?: string;
229
+ destinationBreakoutSessionId?: string;
230
+ destinationLocusSessionId?: string;
231
+ destinationLocusUrl?: string;
232
+ destinationVenueId?: string;
233
+ deviceId?: string;
234
+ globalMeetingId?: string;
235
+ ivrCallId?: string;
236
+ ivrDialogId?: string;
237
+ ivrId?: string;
238
+ callId?: string;
239
+ locusId?: string;
240
+ locusSessionId?: string;
241
+ locusStartTime?: string;
242
+ locusUrl?: string;
243
+ machineId?: string;
244
+ mediaAgentAlias?: string;
245
+ mediaAgentGroupId?: string;
246
+ meetClusterName?: string;
247
+ meetingInstanceId?: string;
248
+ meetingLookupUrl?: string;
249
+ meetingOrgId?: string;
250
+ msteamsTenantGuid?: string;
251
+ msteamsConferenceId?: string;
252
+ oauth2ClientId?: string;
253
+ orgId?: string;
254
+ provisionalCorrelationId?: string;
255
+ roomId?: string;
256
+ sipCallId?: string;
257
+ sipSessionId?: {
258
+ local?: string;
259
+ remote?: string;
260
+ additionalProperties?: false;
261
+ };
262
+ sipUri?: string;
263
+ subConfId?: string;
264
+ tenantId?: string;
265
+ trackingId?: string;
266
+ userId?: string;
267
+ venueId?: string;
268
+ venueUrl?: string;
269
+ whiteboardUrl?: string;
270
+ webexConferenceId?: number;
271
+ webexClusterName?: string;
272
+ webexConferenceIdStr?: string;
273
+ webexDataCenter?: string;
274
+ webexGuestId?: number;
275
+ webexMeetingId?: number;
276
+ webexNodeId?: number;
277
+ webexSiteId?: number;
278
+ webexSiteName?: string;
279
+ webexSiteUuid?: string;
280
+ webexUserId?: number;
281
+ webexWebDomain?: string;
282
+ correlationId: string;
283
+ additionalProperties?: false;
284
+ };
285
+ /**
286
+ * Create diagnostic event, which can hold client event, feature event or MQE event data.
287
+ * This just initiates the shared properties that are required for all the 3 event categories.
288
+ * @param eventData
289
+ * @param options
290
+ * @returns
291
+ */
292
+ prepareDiagnosticEvent(eventData: Event['event'], options: any): Event;
293
+ /**
294
+ * TODO: NOT IMPLEMENTED
295
+ * Submit Feature Event
296
+ * @returns
297
+ */
298
+ submitFeatureEvent(): void;
299
+ /**
300
+ * Submit Media Quality Event
301
+ * @param args - submit params
302
+ * @param arg.name - event key
303
+ * @param arg.payload - additional payload to be merge with the default payload
304
+ * @param arg.options - options
305
+ */
306
+ submitMQE({ name, payload, options, }: {
307
+ name: MediaQualityEvent['name'];
308
+ payload: SubmitMQEPayload;
309
+ options: SubmitMQEOptions;
310
+ }): void;
311
+ /**
312
+ * Return Client Event payload by client error code
313
+ * @param arg - get error arg
314
+ * @param arg.clientErrorCode
315
+ * @param arg.serviceErrorCode
316
+ * @param arg.payloadOverrides
317
+ * @returns
318
+ */
319
+ getErrorPayloadForClientErrorCode({ clientErrorCode, serviceErrorCode, serviceErrorName, rawErrorMessage, payloadOverrides, }: {
320
+ clientErrorCode: number;
321
+ serviceErrorCode: any;
322
+ serviceErrorName?: any;
323
+ rawErrorMessage?: string;
324
+ payloadOverrides?: any;
325
+ }): ClientEventError;
326
+ /**
327
+ * Generate error payload for Client Event
328
+ * @param rawError
329
+ */
330
+ generateClientEventErrorPayload(rawError: any): {
331
+ fatal: boolean;
332
+ category: "other" | "signaling" | "media" | "network" | "expected";
333
+ errorDescription?: string;
334
+ errorCode?: number;
335
+ errorCodeStr?: string;
336
+ httpCode?: number;
337
+ errorCodeExt1?: number;
338
+ errorData?: {};
339
+ rawErrorMessage?: string;
340
+ shownToUser: boolean;
341
+ serviceErrorCode?: number;
342
+ name: "other" | "locus.response" | "media-engine" | "ice.failed" | "locus.leave" | "client.leave" | "media-device" | "media-sca" | "wxc";
343
+ additionalProperties?: false;
344
+ };
345
+ /**
346
+ * Create client event object for in meeting events
347
+ * @param arg - create args
348
+ * @param arg.event - event key
349
+ * @param arg.options - options
350
+ * @returns object
351
+ */
352
+ private createClientEventObjectInMeeting;
353
+ /**
354
+ * Create client event object for pre meeting events
355
+ * @param arg - create args
356
+ * @param arg.event - event key
357
+ * @param arg.options - payload
358
+ * @returns object
359
+ */
360
+ private createClientEventObjectPreMeeting;
361
+ /**
362
+ * Prepare Client Event CA event.
363
+ * @param arg - submit params
364
+ * @param arg.event - event key
365
+ * @param arg.payload - additional payload to be merged with default payload
366
+ * @param arg.options - payload
367
+ * @returns {any} options to be with fetch
368
+ * @throws
369
+ */
370
+ private prepareClientEvent;
371
+ /**
372
+ * Submit Client Event CA event.
373
+ * @param arg - submit params
374
+ * @param arg.event - event key
375
+ * @param arg.payload - additional payload to be merged with default payload
376
+ * @param arg.options - payload
377
+ * @throws
378
+ */
379
+ submitClientEvent({ name, payload, options, }: {
380
+ name: ClientEvent['name'];
381
+ payload?: ClientEventPayload;
382
+ options?: SubmitClientEventOptions;
383
+ }): Promise<any>;
384
+ /**
385
+ * Prepare the event and send the request to metrics-a service.
386
+ * @param event
387
+ * @returns promise
388
+ */
389
+ submitToCallDiagnostics(event: Event): Promise<any>;
390
+ /**
391
+ * Pre login events are not batched. We make the request directly.
392
+ * @param event
393
+ * @param preLoginId
394
+ * @returns
395
+ */
396
+ submitToCallDiagnosticsPreLogin: (event: Event, preLoginId?: string) => Promise<any>;
397
+ /**
398
+ * Builds a request options object to later be passed to fetch().
399
+ * @param arg - submit params
400
+ * @param arg.event - event key
401
+ * @param arg.payload - additional payload to be merged with default payload
402
+ * @param arg.options - client event options
403
+ * @returns {Promise<any>}
404
+ * @throws
405
+ */
406
+ buildClientEventFetchRequestOptions({ name, payload, options, }: {
407
+ name: ClientEvent['name'];
408
+ payload?: ClientEventPayload;
409
+ options?: SubmitClientEventOptions;
410
+ }): Promise<any>;
411
+ /**
412
+ * Returns true if the specified serviceErrorCode maps to an expected error.
413
+ * @param {number} serviceErrorCode the service error code
414
+ * @returns {boolean}
415
+ */
416
+ isServiceErrorExpected(serviceErrorCode: number): boolean;
417
+ }
418
+ export {};
@@ -0,0 +1,96 @@
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
+ * MDN Media Devices getUserMedia() method returns a name if it errs
57
+ * Documentation can be found here: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
58
+ *
59
+ * @param errorCode
60
+ * @returns
61
+ */
62
+ export declare const isBrowserMediaErrorName: (errorName: any) => boolean;
63
+ /**
64
+ * @param webClientDomain
65
+ * @returns
66
+ */
67
+ export declare const getBuildType: (webClientDomain: any, markAsTestEvent?: boolean) => Event['origin']['buildType'];
68
+ /**
69
+ * Prepare metric item for submission.
70
+ * @param {Object} webex sdk instance
71
+ * @param {Object} item
72
+ * @returns {Object} prepared item
73
+ */
74
+ export declare const prepareDiagnosticMetricItem: (webex: any, item: any) => any;
75
+ /**
76
+ * Sets the originTime value(s) before the request/fetch.
77
+ * This function is only useful if you are about to submit a metrics
78
+ * request using pre-built fetch options;
79
+ *
80
+ * @param {any} options
81
+ * @returns {any} the updated options object
82
+ */
83
+ export declare const setMetricTimings: (options: any) => any;
84
+ export declare const extractVersionMetadata: (version: string) => {
85
+ majorVersion: number;
86
+ minorVersion: number;
87
+ };
88
+ /**
89
+ * Generates client error codes for specific ice failures
90
+ * that happen when trying to add media in a meeting.
91
+ */
92
+ export declare const generateClientErrorCodeForIceFailure: ({ signalingState, iceConnectionState, turnServerUsed, }: {
93
+ signalingState: RTCPeerConnection['signalingState'];
94
+ iceConnectionState: RTCPeerConnection['iceConnectionState'];
95
+ turnServerUsed: boolean;
96
+ }) => number;
@@ -0,0 +1,172 @@
1
+ import { ClientEventError, ClientSubServiceType } from '../metrics.types';
2
+ export declare const CALL_DIAGNOSTIC_LOG_IDENTIFIER = "call-diagnostic-events -> ";
3
+ export declare const AUTHENTICATION_FAILED_CODE = 1010;
4
+ export declare const NETWORK_ERROR = 1026;
5
+ export declare const NEW_LOCUS_ERROR_CLIENT_CODE = 4008;
6
+ export declare const MEETING_INFO_LOOKUP_ERROR_CLIENT_CODE = 4100;
7
+ export declare const UNKNOWN_ERROR = 9999;
8
+ export declare const ICE_FAILURE_CLIENT_CODE = 2004;
9
+ export declare const MISSING_ROAP_ANSWER_CLIENT_CODE = 2007;
10
+ export declare const DTLS_HANDSHAKE_FAILED_CLIENT_CODE = 2008;
11
+ export declare const ICE_FAILED_WITH_TURN_TLS_CLIENT_CODE = 2010;
12
+ export declare const ICE_FAILED_WITHOUT_TURN_TLS_CLIENT_CODE = 2009;
13
+ export declare const WBX_APP_API_URL = "wbxappapi";
14
+ export declare const WEBEX_SUB_SERVICE_TYPES: Record<string, ClientSubServiceType>;
15
+ export declare const BROWSER_MEDIA_ERROR_NAME_TO_CLIENT_ERROR_CODES_MAP: {
16
+ [x: string]: number;
17
+ };
18
+ export declare const ERROR_DESCRIPTIONS: {
19
+ UNKNOWN_CALL_FAILURE: string;
20
+ LOCUS_RATE_LIMITED_INCOMING: string;
21
+ LOCUS_RATE_LIMITED_OUTGOING: string;
22
+ LOCUS_UNAVAILABLE: string;
23
+ LOCUS_CONFLICT: string;
24
+ TIMEOUT: string;
25
+ LOCUS_INVALID_SEQUENCE_HASH: string;
26
+ AUTHENTICATION_FAILED: string;
27
+ NETWORK_ERROR: string;
28
+ UPDATE_MEDIA_FAILED: string;
29
+ FAILED_TO_CONNECT_MEDIA: string;
30
+ MEDIA_ENGINE_LOST: string;
31
+ MEDIA_CONNECTION_LOST: string;
32
+ ICE_FAILURE: string;
33
+ MEDIA_ENGINE_HANG: string;
34
+ ICE_SERVER_REJECTED: string;
35
+ CALL_FULL: string;
36
+ ROOM_TOO_LARGE: string;
37
+ GUEST_ALREADY_ADDED: string;
38
+ LOCUS_USER_NOT_AUTHORISED: string;
39
+ CLOUDBERRY_UNAVAILABLE: string;
40
+ ROOM_TOO_LARGE_FREE_ACCOUNT: string;
41
+ MEETING_INACTIVE: string;
42
+ MEETING_LOCKED: string;
43
+ MEETING_TERMINATING: string;
44
+ MODERATOR_PIN_OR_GUEST_REQUIRED: string;
45
+ MODERATOR_PIN_OR_GUEST_PIN_REQUIRED: string;
46
+ MODERATOR_REQUIRED: string;
47
+ USER_NOT_MEMBER_OF_ROOM: string;
48
+ NEW_LOCUS_ERROR: string;
49
+ NETWORK_UNAVAILABLE: string;
50
+ MEETING_UNAVAILABLE: string;
51
+ MEETING_ID_INVALID: string;
52
+ MEETING_SITE_INVALID: string;
53
+ LOCUS_INVALID_JOINTIME: string;
54
+ LOBBY_EXPIRED: string;
55
+ MEDIA_CONNECTION_LOST_PAIRED: string;
56
+ PHONE_NUMBER_NOT_A_NUMBER: string;
57
+ PHONE_NUMBER_TOO_LONG: string;
58
+ INVALID_DIALABLE_KEY: string;
59
+ ONE_ON_ONE_TO_SELF_NOT_ALLOWED: string;
60
+ REMOVED_PARTICIPANT: string;
61
+ MEETING_LINK_NOT_FOUND: string;
62
+ PHONE_NUMBER_TOO_SHORT_AFTER_IDD: string;
63
+ INVALID_INVITEE_ADDRESS: string;
64
+ PMR_USER_ACCOUNT_LOCKED_OUT: string;
65
+ GUEST_FORBIDDEN: string;
66
+ PMR_ACCOUNT_SUSPENDED: string;
67
+ EMPTY_PHONE_NUMBER_OR_COUNTRY_CODE: string;
68
+ CONVERSATION_NOT_FOUND: string;
69
+ SIP_CALLEE_BUSY: string;
70
+ SIP_CALLEE_NOT_FOUND: string;
71
+ START_RECORDING_FAILED: string;
72
+ RECORDING_IN_PROGRESS_FAILED: string;
73
+ MEETING_INFO_LOOKUP_ERROR: string;
74
+ CALL_FULL_ADD_GUEST: string;
75
+ REQUIRE_WEBEX_LOGIN: string;
76
+ USER_NOT_ALLOWED_ACCESS_MEETING: string;
77
+ USER_NEEDS_ACTIVATION: string;
78
+ SIGN_UP_INVALID_EMAIL: string;
79
+ UNKNOWN_ERROR: string;
80
+ NO_MEDIA_FOUND: string;
81
+ STREAM_ERROR_NO_MEDIA: string;
82
+ CAMERA_PERMISSION_DENIED: string;
83
+ FRAUD_DETECTION: string;
84
+ E2EE_NOT_SUPPORTED: string;
85
+ LOCUS_LOBBY_FULL_CMR: string;
86
+ USER_NOT_INVITED_TO_JOIN: string;
87
+ MISSING_ROAP_ANSWER: string;
88
+ DTLS_HANDSHAKE_FAILED: string;
89
+ ICE_FAILED_WITHOUT_TURN_TLS: string;
90
+ ICE_FAILED_WITH_TURN_TLS: string;
91
+ };
92
+ export declare const SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP: {
93
+ 58400: number;
94
+ 99002: number;
95
+ 99009: number;
96
+ 58500: number;
97
+ 400001: number;
98
+ 403004: number;
99
+ 403028: number;
100
+ 403032: number;
101
+ 403034: number;
102
+ 403036: number;
103
+ 403038: number;
104
+ 403040: number;
105
+ 403041: number;
106
+ 403047: number;
107
+ 403408: number;
108
+ 403043: number;
109
+ 403048: number;
110
+ 403049: number;
111
+ 403100: number;
112
+ 403101: number;
113
+ 403102: number;
114
+ 403103: number;
115
+ 403104: number;
116
+ 404001: number;
117
+ 404006: number;
118
+ 423001: number;
119
+ 423005: number;
120
+ 423006: number;
121
+ 423010: number;
122
+ 423012: number;
123
+ 423013: number;
124
+ 429005: number;
125
+ 2403001: number;
126
+ 2403002: number;
127
+ 2403003: number;
128
+ 2403004: number;
129
+ 2403018: number;
130
+ 2403019: number;
131
+ 2423003: number;
132
+ 2423004: number;
133
+ 2423005: number;
134
+ 2423006: number;
135
+ 2423016: number;
136
+ 2423017: number;
137
+ 2423018: number;
138
+ 2423012: number;
139
+ 2423021: number;
140
+ 2423007: number;
141
+ 2403010: number;
142
+ 2403014: number;
143
+ 2403015: number;
144
+ 2423010: number;
145
+ 2400008: number;
146
+ 2400011: number;
147
+ 2400012: number;
148
+ 2403007: number;
149
+ 2401002: number;
150
+ 2404002: number;
151
+ 2400009: number;
152
+ 2400025: number;
153
+ 2423009: number;
154
+ 2403022: number;
155
+ 2423008: number;
156
+ 2400006: number;
157
+ 2400014: number;
158
+ 2404001: number;
159
+ 2403025: number;
160
+ 2405001: number;
161
+ 2409005: number;
162
+ 2409062: number;
163
+ 2423025: number;
164
+ 100002: number;
165
+ 100007: number;
166
+ 100001: number;
167
+ 100006: number;
168
+ 100005: number;
169
+ 100004: number;
170
+ };
171
+ export declare const CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD: Record<number, Partial<ClientEventError>>;
172
+ export declare const CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND = "js_sdk_call_diagnostic_event_failed_to_send";
@@ -0,0 +1,2 @@
1
+ export default ClientMetricsBatcher;
2
+ declare const ClientMetricsBatcher: any;