@webex/internal-plugin-metrics 3.0.0-beta.32 → 3.0.0-beta.321

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 +819 -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 +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 +417 -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 +861 -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 +20 -0
  49. package/src/index.ts +43 -0
  50. package/src/metrics.js +25 -27
  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 +1973 -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,417 @@
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
+ 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
+ * Returns meeting's subServiceType
53
+ * @param meeting
54
+ * @returns
55
+ */
56
+ getSubServiceType(meeting?: any): ClientSubServiceType;
57
+ /**
58
+ * Get origin object for Call Diagnostic Event payload.
59
+ * @param options
60
+ * @param meetingId
61
+ * @returns
62
+ */
63
+ getOrigin(options: GetOriginOptions, meetingId?: string): {
64
+ 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";
65
+ userAgent: string;
66
+ buildType?: "debug" | "test" | "prod" | "tap" | "analyzer-test";
67
+ upgradeChannel?: string;
68
+ instanceId?: string;
69
+ networkType: "wifi" | "ethernet" | "cellular" | "unknown";
70
+ localIP?: string;
71
+ usingProxy?: boolean;
72
+ mediaEngineSoftwareVersion?: string;
73
+ environment?: string;
74
+ newEnvironment?: string;
75
+ clientInfo?: {
76
+ os?: "windows" | "mac" | "ios" | "android" | "chrome" | "linux" | "other" | "android-x64" | "android-arm64" | "uwp-arm64";
77
+ osVersion?: string;
78
+ localIP?: string;
79
+ gatewayIP?: string;
80
+ macAddress?: string;
81
+ localNetworkPrefix?: string;
82
+ publicNetworkPrefix?: string;
83
+ browserLaunchMethod?: "url-handler" | "activex" | "npapi" | "extension" | "cwsapi" | "java" | "tfs" | "webacd" | "thinclient" | "switch-to-web" | "switch-to-native";
84
+ clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch" | "mc-cross-launch";
85
+ browser?: string;
86
+ browserVersion?: string;
87
+ 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";
88
+ 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";
89
+ clientVersion?: string;
90
+ clientVersionStatus?: "CURRENT" | "LEGACY" | "UNSUPPORTED";
91
+ localClientVersion?: string;
92
+ modelNumber?: string;
93
+ joinFirstUpdateLater?: "ep-enabled" | "sp-enabled" | "not-enabled";
94
+ standbyUsed?: boolean;
95
+ prefetchDocShowUsed?: boolean;
96
+ fastJoinUsed?: boolean;
97
+ clientDownloadSize?: number;
98
+ clientDownloadFileCount?: number;
99
+ nodeId?: number;
100
+ machineInfo?: string;
101
+ parentAppName?: string;
102
+ parentAppInPermitList?: boolean;
103
+ meetingSiteType?: "train" | "webex-11" | "orion";
104
+ CDNEnabled?: boolean;
105
+ clientMajorVersion?: string;
106
+ majorVersion?: number;
107
+ minorVersion?: number;
108
+ revision?: number;
109
+ isValidClientVersion?: boolean;
110
+ cpuInfo?: {
111
+ description: string;
112
+ clockSpeedGigaHertz: number;
113
+ numberOfCores: number;
114
+ architecture: "unknown" | "intel32" | "intel64" | "amd32" | "amd64" | "arm32" | "arm64";
115
+ staticPerformance?: string;
116
+ additionalProperties?: false;
117
+ };
118
+ 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";
119
+ videoDisplayMode?: "grid-view" | "active-speaker-view";
120
+ videoLayoutType?: "stack" | "stackWithShare" | "sideBySide" | "sideBySideWithShare" | "grid" | "floatingActive" | "floatingThumbnail" | "floatingGrid" | "overlay" | "focus" | "prominent" | "focusWithShare" | "prominentWithShare" | "equal" | "equalWithShare";
121
+ videoRenderType?: "wme" | "client_d3d" | "client_gdi";
122
+ vdiInfo?: {};
123
+ is64BitsClient?: boolean;
124
+ webexAppVersion?: string;
125
+ launch32BitsReason?: "forcewin32" | "disablewin64" | "platform_win32" | "platform_arm" | "platform_unknown" | "version_below_41.11";
126
+ inMeetingUpdate?: boolean;
127
+ mtaVersion?: string;
128
+ isWarholOpening?: boolean;
129
+ additionalProperties?: false;
130
+ };
131
+ emmVendorId?: string;
132
+ isHybridMedia?: boolean;
133
+ originData?: {};
134
+ additionalProperties?: false;
135
+ };
136
+ /**
137
+ * Gather identifier details for call diagnostic payload.
138
+ * @throws Error if initialization fails.
139
+ * @param options
140
+ */
141
+ getIdentifiers(options: GetIdentifiersOptions): {
142
+ attendeeId?: string;
143
+ breakoutGroupId?: string;
144
+ breakoutMoveId?: string;
145
+ breakoutSessionId?: string;
146
+ confluenceId?: string;
147
+ cpaasIdentifiers?: {
148
+ imiTenantId: string;
149
+ devClientId: string;
150
+ imiServiceId: string;
151
+ imiAppId: string;
152
+ sessionId: string;
153
+ sessionInstanceId: string;
154
+ additionalProperties?: false;
155
+ };
156
+ csdmDeviceUrl?: string;
157
+ destinationBreakoutSessionId?: string;
158
+ destinationLocusSessionId?: string;
159
+ destinationLocusUrl?: string;
160
+ destinationVenueId?: string;
161
+ deviceId?: string;
162
+ globalMeetingId?: string;
163
+ ivrCallId?: string;
164
+ ivrDialogId?: string;
165
+ ivrId?: string;
166
+ callId?: string;
167
+ locusId?: string;
168
+ locusSessionId?: string;
169
+ locusStartTime?: string;
170
+ locusUrl?: string;
171
+ machineId?: string;
172
+ mediaAgentAlias?: string;
173
+ mediaAgentGroupId?: string;
174
+ meetClusterName?: string;
175
+ meetingInstanceId?: string;
176
+ meetingLookupUrl?: string;
177
+ meetingOrgId?: string;
178
+ msteamsTenantGuid?: string;
179
+ msteamsConferenceId?: string;
180
+ oauth2ClientId?: string;
181
+ orgId?: string;
182
+ provisionalCorrelationId?: string;
183
+ roomId?: string;
184
+ sipCallId?: string;
185
+ sipSessionId?: {
186
+ local?: string;
187
+ remote?: string;
188
+ additionalProperties?: false;
189
+ };
190
+ sipUri?: string;
191
+ subConfId?: string;
192
+ tenantId?: string;
193
+ trackingId?: string;
194
+ userId?: string;
195
+ venueId?: string;
196
+ venueUrl?: string;
197
+ whiteboardUrl?: string;
198
+ webexConferenceId?: number;
199
+ webexClusterName?: string;
200
+ webexConferenceIdStr?: string;
201
+ webexDataCenter?: string;
202
+ webexGuestId?: number;
203
+ webexMeetingId?: number;
204
+ webexNodeId?: number;
205
+ webexSiteId?: number;
206
+ webexSiteName?: string;
207
+ webexSiteUuid?: string;
208
+ webexUserId?: number;
209
+ webexWebDomain?: string;
210
+ correlationId: string;
211
+ additionalProperties?: false;
212
+ } | {
213
+ attendeeId?: string;
214
+ breakoutGroupId?: string;
215
+ breakoutMoveId?: string;
216
+ breakoutSessionId?: string;
217
+ confluenceId?: string;
218
+ cpaasIdentifiers?: {
219
+ imiTenantId: string;
220
+ devClientId: string;
221
+ imiServiceId: string;
222
+ imiAppId: string;
223
+ sessionId: string;
224
+ sessionInstanceId: string;
225
+ additionalProperties?: false;
226
+ };
227
+ csdmDeviceUrl?: string;
228
+ destinationBreakoutSessionId?: string;
229
+ destinationLocusSessionId?: string;
230
+ destinationLocusUrl?: string;
231
+ destinationVenueId?: string;
232
+ deviceId?: string;
233
+ globalMeetingId?: string;
234
+ ivrCallId?: string;
235
+ ivrDialogId?: string;
236
+ ivrId?: string;
237
+ callId?: string;
238
+ locusId?: string;
239
+ locusSessionId?: string;
240
+ locusStartTime?: string;
241
+ locusUrl?: string;
242
+ machineId?: string;
243
+ mediaAgentAlias?: string;
244
+ mediaAgentGroupId?: string;
245
+ meetClusterName?: string;
246
+ meetingInstanceId?: string;
247
+ meetingLookupUrl?: string;
248
+ meetingOrgId?: string;
249
+ msteamsTenantGuid?: string;
250
+ msteamsConferenceId?: string;
251
+ oauth2ClientId?: string;
252
+ orgId?: string;
253
+ provisionalCorrelationId?: string;
254
+ roomId?: string;
255
+ sipCallId?: string;
256
+ sipSessionId?: {
257
+ local?: string;
258
+ remote?: string;
259
+ additionalProperties?: false;
260
+ };
261
+ sipUri?: string;
262
+ subConfId?: string;
263
+ tenantId?: string;
264
+ trackingId?: string;
265
+ userId?: string;
266
+ venueId?: string;
267
+ venueUrl?: string;
268
+ whiteboardUrl?: string;
269
+ webexConferenceId?: number;
270
+ webexClusterName?: string;
271
+ webexConferenceIdStr?: string;
272
+ webexDataCenter?: string;
273
+ webexGuestId?: number;
274
+ webexMeetingId?: number;
275
+ webexNodeId?: number;
276
+ webexSiteId?: number;
277
+ webexSiteName?: string;
278
+ webexSiteUuid?: string;
279
+ webexUserId?: number;
280
+ webexWebDomain?: string;
281
+ correlationId: string;
282
+ additionalProperties?: false;
283
+ };
284
+ /**
285
+ * Create diagnostic event, which can hold client event, feature event or MQE event data.
286
+ * This just initiates the shared properties that are required for all the 3 event categories.
287
+ * @param eventData
288
+ * @param options
289
+ * @returns
290
+ */
291
+ prepareDiagnosticEvent(eventData: Event['event'], options: any): Event;
292
+ /**
293
+ * TODO: NOT IMPLEMENTED
294
+ * Submit Feature Event
295
+ * @returns
296
+ */
297
+ submitFeatureEvent(): void;
298
+ /**
299
+ * Submit Media Quality Event
300
+ * @param args - submit params
301
+ * @param arg.name - event key
302
+ * @param arg.payload - additional payload to be merge with the default payload
303
+ * @param arg.options - options
304
+ */
305
+ submitMQE({ name, payload, options, }: {
306
+ name: MediaQualityEvent['name'];
307
+ payload: SubmitMQEPayload;
308
+ options: SubmitMQEOptions;
309
+ }): void;
310
+ /**
311
+ * Return Client Event payload by client error code
312
+ * @param arg - get error arg
313
+ * @param arg.clientErrorCode
314
+ * @param arg.serviceErrorCode
315
+ * @param arg.payloadOverrides
316
+ * @returns
317
+ */
318
+ getErrorPayloadForClientErrorCode({ clientErrorCode, serviceErrorCode, serviceErrorName, rawErrorMessage, payloadOverrides, }: {
319
+ clientErrorCode: number;
320
+ serviceErrorCode: any;
321
+ serviceErrorName?: any;
322
+ rawErrorMessage?: string;
323
+ payloadOverrides?: any;
324
+ }): ClientEventError;
325
+ /**
326
+ * Generate error payload for Client Event
327
+ * @param rawError
328
+ */
329
+ generateClientEventErrorPayload(rawError: any): {
330
+ fatal: boolean;
331
+ category: "other" | "signaling" | "media" | "network" | "expected";
332
+ errorDescription?: string;
333
+ errorCode?: number;
334
+ errorCodeStr?: string;
335
+ httpCode?: number;
336
+ errorCodeExt1?: number;
337
+ errorData?: {};
338
+ rawErrorMessage?: string;
339
+ shownToUser: boolean;
340
+ serviceErrorCode?: number;
341
+ name: "other" | "locus.response" | "media-engine" | "ice.failed" | "locus.leave" | "client.leave" | "media-device" | "media-sca" | "wxc";
342
+ additionalProperties?: false;
343
+ };
344
+ /**
345
+ * Create client event object for in meeting events
346
+ * @param arg - create args
347
+ * @param arg.event - event key
348
+ * @param arg.options - options
349
+ * @returns object
350
+ */
351
+ private createClientEventObjectInMeeting;
352
+ /**
353
+ * Create client event object for pre meeting events
354
+ * @param arg - create args
355
+ * @param arg.event - event key
356
+ * @param arg.options - payload
357
+ * @returns object
358
+ */
359
+ private createClientEventObjectPreMeeting;
360
+ /**
361
+ * Prepare Client Event CA event.
362
+ * @param arg - submit params
363
+ * @param arg.event - event key
364
+ * @param arg.payload - additional payload to be merged with default payload
365
+ * @param arg.options - payload
366
+ * @returns {any} options to be with fetch
367
+ * @throws
368
+ */
369
+ private prepareClientEvent;
370
+ /**
371
+ * Submit 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
+ * @throws
377
+ */
378
+ submitClientEvent({ name, payload, options, }: {
379
+ name: ClientEvent['name'];
380
+ payload?: ClientEventPayload;
381
+ options?: SubmitClientEventOptions;
382
+ }): Promise<any>;
383
+ /**
384
+ * Prepare the event and send the request to metrics-a service.
385
+ * @param event
386
+ * @returns promise
387
+ */
388
+ submitToCallDiagnostics(event: Event): Promise<any>;
389
+ /**
390
+ * Pre login events are not batched. We make the request directly.
391
+ * @param event
392
+ * @param preLoginId
393
+ * @returns
394
+ */
395
+ submitToCallDiagnosticsPreLogin: (event: Event, preLoginId?: string) => Promise<any>;
396
+ /**
397
+ * Builds a request options object to later be passed to fetch().
398
+ * @param arg - submit params
399
+ * @param arg.event - event key
400
+ * @param arg.payload - additional payload to be merged with default payload
401
+ * @param arg.options - client event options
402
+ * @returns {Promise<any>}
403
+ * @throws
404
+ */
405
+ buildClientEventFetchRequestOptions({ name, payload, options, }: {
406
+ name: ClientEvent['name'];
407
+ payload?: ClientEventPayload;
408
+ options?: SubmitClientEventOptions;
409
+ }): Promise<any>;
410
+ /**
411
+ * Returns true if the specified serviceErrorCode maps to an expected error.
412
+ * @param {number} serviceErrorCode the service error code
413
+ * @returns {boolean}
414
+ */
415
+ isServiceErrorExpected(serviceErrorCode: number): boolean;
416
+ }
417
+ 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;