@webex/internal-plugin-metrics 3.0.0-beta.30 → 3.0.0-beta.301

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