@webex/internal-plugin-metrics 3.0.0-beta.40 → 3.0.0-beta.400

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