@webex/internal-plugin-metrics 3.8.1 → 3.9.0-multi-llms.2

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 (35) hide show
  1. package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js +92 -14
  2. package/dist/call-diagnostic/call-diagnostic-metrics-latencies.js.map +1 -1
  3. package/dist/call-diagnostic/call-diagnostic-metrics.js +351 -48
  4. package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
  5. package/dist/call-diagnostic/call-diagnostic-metrics.util.js +21 -0
  6. package/dist/call-diagnostic/call-diagnostic-metrics.util.js.map +1 -1
  7. package/dist/call-diagnostic/config.js +3 -1
  8. package/dist/call-diagnostic/config.js.map +1 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/metrics.js +1 -1
  11. package/dist/metrics.types.js.map +1 -1
  12. package/dist/new-metrics.js +43 -1
  13. package/dist/new-metrics.js.map +1 -1
  14. package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +23 -1
  15. package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +177 -10
  16. package/dist/types/call-diagnostic/config.d.ts +2 -0
  17. package/dist/types/index.d.ts +2 -2
  18. package/dist/types/metrics.types.d.ts +19 -7
  19. package/dist/types/new-metrics.d.ts +19 -2
  20. package/package.json +12 -13
  21. package/src/call-diagnostic/call-diagnostic-metrics-latencies.ts +104 -14
  22. package/src/call-diagnostic/call-diagnostic-metrics.ts +368 -25
  23. package/src/call-diagnostic/call-diagnostic-metrics.util.ts +20 -0
  24. package/src/call-diagnostic/config.ts +3 -0
  25. package/src/index.ts +2 -0
  26. package/src/metrics.types.ts +26 -6
  27. package/src/new-metrics.ts +52 -1
  28. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-batcher.ts +20 -1
  29. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics-latencies.ts +255 -0
  30. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +864 -39
  31. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.util.ts +6 -0
  32. package/test/unit/spec/new-metrics.ts +67 -2
  33. package/test/unit/spec/prelogin-metrics-batcher.ts +72 -3
  34. package/dist/call-diagnostic-events-batcher.js +0 -60
  35. package/dist/call-diagnostic-events-batcher.js.map +0 -1
@@ -73,7 +73,10 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
73
73
  * @param b end
74
74
  * @returns latency
75
75
  */
76
- getDiffBetweenTimestamps(a: MetricEventNames, b: MetricEventNames): number;
76
+ getDiffBetweenTimestamps(a: MetricEventNames, b: MetricEventNames, clampValues?: {
77
+ minimum?: number;
78
+ maximum?: number;
79
+ }): number;
77
80
  /**
78
81
  * Meeting Info Request
79
82
  * @note Meeting Info request happen not just in the join phase. CA requires
@@ -160,6 +163,11 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
160
163
  * @returns - latency
161
164
  */
162
165
  getClickToInterstitial(): number;
166
+ /**
167
+ * Click To Interstitial With User Delay
168
+ * @returns - latency
169
+ */
170
+ getClickToInterstitialWithUserDelay(): number;
163
171
  /**
164
172
  * Interstitial To Join Ok
165
173
  * @returns - latency
@@ -180,6 +188,11 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
180
188
  * @returns - latency
181
189
  */
182
190
  getTotalJMT(): number;
191
+ /**
192
+ * Total JMT With User Delay
193
+ * @returns - latency
194
+ */
195
+ getTotalJMTWithUserDelay(): number;
183
196
  /**
184
197
  * Join Conf JMT
185
198
  * @returns - latency
@@ -190,6 +203,11 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
190
203
  * @returns - latency
191
204
  */
192
205
  getTotalMediaJMT(): number;
206
+ /**
207
+ * Total Media JMT With User Delay
208
+ * @returns - latency
209
+ */
210
+ getTotalMediaJMTWithUserDelay(): number;
193
211
  /**
194
212
  * Client JMT
195
213
  * @returns - latency
@@ -215,6 +233,10 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
215
233
  * Video setup delay transmit
216
234
  */
217
235
  getVideoJoinRespTxStart(): number;
236
+ /**
237
+ * Time from share initiation to share stop (ms).
238
+ */
239
+ getShareDuration(): number;
218
240
  /**
219
241
  * Total latency for all exchange ci token.
220
242
  */
@@ -1,5 +1,5 @@
1
1
  import { StatelessWebexPlugin } from '@webex/webex-core';
2
- import { Event, ClientType, SubClientType, NetworkType, EnvironmentType, NewEnvironmentType, ClientEvent, SubmitClientEventOptions, MediaQualityEvent, SubmitMQEOptions, SubmitMQEPayload, ClientLaunchMethodType, ClientEventError, ClientEventPayload, ClientSubServiceType, BrowserLaunchMethodType, DelayedClientEvent } from '../metrics.types';
2
+ import { Event, ClientType, SubClientType, NetworkType, EnvironmentType, NewEnvironmentType, ClientEvent, SubmitClientEventOptions, MediaQualityEvent, SubmitMQEOptions, SubmitMQEPayload, ClientLaunchMethodType, ClientEventError, ClientEventPayload, ClientSubServiceType, BrowserLaunchMethodType, DelayedClientEvent, FeatureEvent, ClientFeatureEventPayload } from '../metrics.types';
3
3
  type GetOriginOptions = {
4
4
  clientType: ClientType;
5
5
  subClientType: SubClientType;
@@ -8,6 +8,7 @@ type GetOriginOptions = {
8
8
  browserLaunchMethod?: BrowserLaunchMethodType;
9
9
  environment?: EnvironmentType;
10
10
  newEnvironment?: NewEnvironmentType;
11
+ vendorId?: string;
11
12
  };
12
13
  type GetIdentifiersOptions = {
13
14
  meeting?: any;
@@ -30,7 +31,11 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
30
31
  private hasLoggedBrowserSerial;
31
32
  private device;
32
33
  private delayedClientEvents;
34
+ private delayedClientFeatureEvents;
33
35
  private eventErrorCache;
36
+ private isMercuryConnected;
37
+ private eventLimitTracker;
38
+ private eventLimitWarningsLogged;
34
39
  validator: (options: {
35
40
  type: 'mqe' | 'ce';
36
41
  event: Event;
@@ -55,6 +60,13 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
55
60
  getIsConvergedArchitectureEnabled({ meetingId }: {
56
61
  meetingId?: string;
57
62
  }): boolean;
63
+ /**
64
+ * Sets mercury connected status for event data object in CA events
65
+ * @public
66
+ * @param status - boolean value indicating mercury connection status
67
+ * @return {void}
68
+ */
69
+ setMercuryConnectedStatus(status: boolean): void;
58
70
  /**
59
71
  * Returns meeting's subServiceType
60
72
  * @param meeting
@@ -68,7 +80,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
68
80
  * @returns
69
81
  */
70
82
  getOrigin(options: GetOriginOptions, meetingId?: string): {
71
- name: "endpoint" | "addin" | "antares" | "appapi" | "beech" | "breakout" | "calendar" | "cb" | "cca" | "ccc" | "cloudproxy" | "crc" | "edonus" | "givr" | "hecate" | "hedge" | "hesiod" | "homer" | "idbroker" | "superhomer" | "l2sip" | "linus" | "locus" | "mbs" | "mcc" | "mcs" | "mercury" | "mes" | "mjs" | "mmp" | "mygdon" | "ngservice" | "orpheus" | "page" | "poros" | "publicapi" | "rhesos" | "terminus" | "tpgw" | "ucc" | "wdm" | "webexivr" | "meetingcontainer";
83
+ name: "endpoint" | "addin" | "antares" | "appapi" | "beech" | "breakout" | "calendar" | "cb" | "cca" | "ccc" | "cloudproxy" | "crc" | "edonus" | "givr" | "hecate" | "hedge" | "hesiod" | "homer" | "idbroker" | "superhomer" | "l2sip" | "linus" | "locus" | "mbs" | "mcc" | "mcs" | "mercury" | "mes" | "mjs" | "mmp" | "mrs" | "mygdon" | "ngpage" | "ngservice" | "oauth" | "orpheus" | "page" | "poros" | "publicapi" | "rhesos" | "sbs" | "terminus" | "tpgw" | "ucc" | "wdm" | "webexivr" | "meetingcontainer";
72
84
  userAgent: string;
73
85
  buildType?: "debug" | "test" | "prod" | "tap" | "analyzer-test";
74
86
  upgradeChannel?: string;
@@ -88,18 +100,17 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
88
100
  localNetworkPrefix?: string;
89
101
  publicNetworkPrefix?: string;
90
102
  browserLaunchMethod?: "url-handler" | "activex" | "npapi" | "extension" | "cwsapi" | "java" | "tfs" | "webacd" | "thinclient" | "switch-to-web" | "switch-to-native";
91
- clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch" | "mc-cross-launch" | "cws" | "launcher" | "cws-launcher";
103
+ clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch" | "mc-cross-launch" | "cws" | "installer" | "installer-launcher" | "launcher" | "cws-launcher";
104
+ urlProtocolLaunchMethod?: "manual" | "auto" | "extension-fallback";
92
105
  browser?: string;
93
106
  browserVersion?: string;
94
- 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" | "TEAMS_PHONE"; /**
95
- * Constructor
96
- * @param args
97
- */
98
- subClientType?: "TEAMS_DEVICE" | "AUTOMOTIVE_APP" | "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" | "PHONE_NOVUM" | "PHONE_ESPRESSO" | "PHONE_BUMBLEBEE";
107
+ 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" | "TEAMS_PHONE" | "WEBEX_RELAY";
108
+ subClientType?: "TEAMS_DEVICE" | "SIP" | "AUTOMOTIVE_APP" | "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" | "PHONE_NOVUM" | "PHONE_ESPRESSO" | "PHONE_BUMBLEBEE" | "SIP_PSTN";
99
109
  schedulingClientType?: "TEAMS_CLIENT" | "GOOGLE_ADDON" | "PT" | "PUBLIC_API" | "UNIFIED_PAGE" | "WEBEX_PAGE" | "GOOGLE_NOTIFICATION_CALENDAR" | "MSFT_NOTIFICATION_ADDIN" | "MSFT_NOTIFICATION_CALENDAR" | "OUTLOOK_ADDIN";
100
110
  clientVersion?: string;
101
111
  clientVersionStatus?: "CURRENT" | "LEGACY" | "UNSUPPORTED";
102
112
  localClientVersion?: string;
113
+ launcherVersion?: string;
103
114
  modelNumber?: string;
104
115
  joinFirstUpdateLater?: "ep-enabled" | "sp-enabled" | "not-enabled";
105
116
  standbyUsed?: boolean;
@@ -137,6 +148,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
137
148
  inMeetingUpdate?: boolean;
138
149
  mtaVersion?: string;
139
150
  isWarholOpening?: boolean;
151
+ vendorId?: string;
140
152
  additionalProperties?: false;
141
153
  };
142
154
  emmVendorId?: string;
@@ -181,6 +193,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
181
193
  ivrDialogId?: string;
182
194
  ivrId?: string;
183
195
  callId?: string;
196
+ pairCallId?: string;
184
197
  locusId?: string;
185
198
  locusJoinUrl?: string;
186
199
  locusSessionId?: string;
@@ -232,6 +245,8 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
232
245
  webexWebDomain?: string;
233
246
  recordingId?: string;
234
247
  clientCorrelationId?: string;
248
+ idForEndpointAB?: string;
249
+ customerOrgId?: string;
235
250
  correlationId: string;
236
251
  additionalProperties?: false;
237
252
  } | {
@@ -265,6 +280,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
265
280
  ivrDialogId?: string;
266
281
  ivrId?: string;
267
282
  callId?: string;
283
+ pairCallId?: string;
268
284
  locusId?: string;
269
285
  locusJoinUrl?: string;
270
286
  locusSessionId?: string;
@@ -316,6 +332,95 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
316
332
  webexWebDomain?: string;
317
333
  recordingId?: string;
318
334
  clientCorrelationId?: string;
335
+ idForEndpointAB?: string;
336
+ customerOrgId?: string;
337
+ correlationId: string;
338
+ additionalProperties?: false;
339
+ } | {
340
+ aggregatedBreakoutMoveId?: string;
341
+ attendeeId?: string;
342
+ participantId?: string;
343
+ breakoutGroupId?: string;
344
+ breakoutMoveId?: string;
345
+ breakoutSessionId?: string;
346
+ ciExchangeTokenUrl?: string;
347
+ confluenceId?: string;
348
+ cpaasIdentifiers?: {
349
+ imiTenantId: string;
350
+ devClientId: string;
351
+ imiServiceId: string;
352
+ imiAppId: string;
353
+ sessionId: string;
354
+ sessionInstanceId: string;
355
+ additionalProperties?: false;
356
+ };
357
+ csdmDeviceUrl?: string;
358
+ destinationBreakoutSessionId?: string;
359
+ destinationLocusSessionId?: string;
360
+ destinationLocusUrl?: string;
361
+ destinationVenueId?: string;
362
+ deviceId?: string;
363
+ globalMeetingId?: string;
364
+ installationId?: string;
365
+ webexMeetingUUID?: string;
366
+ ivrCallId?: string;
367
+ ivrDialogId?: string;
368
+ ivrId?: string;
369
+ callId?: string;
370
+ pairCallId?: string;
371
+ locusId?: string;
372
+ locusJoinUrl?: string;
373
+ locusSessionId?: string;
374
+ locusStartTime?: string;
375
+ locusUrl?: string;
376
+ machineId?: string;
377
+ mediaAgentAlias?: string;
378
+ mediaAgentGroupId?: string;
379
+ meetClusterName?: string;
380
+ meetingInstanceId?: string;
381
+ meetingLookupUrl?: string;
382
+ meetingOrgId?: string;
383
+ metricServiceUrl?: string;
384
+ msteamsTenantGuid?: string;
385
+ msteamsConferenceId?: string;
386
+ msteamsMeetingId?: string;
387
+ oauth2ClientId?: string;
388
+ orgId?: string;
389
+ provisionalCorrelationId?: string;
390
+ roomId?: string;
391
+ sessionCorrelationId?: string;
392
+ sharedMediaId?: string;
393
+ sipCallId?: string;
394
+ sipSessionId?: {
395
+ local?: string;
396
+ remote?: string;
397
+ additionalProperties?: false;
398
+ };
399
+ sipUri?: string;
400
+ subConfId?: string;
401
+ tenantId?: string;
402
+ trackingId?: string;
403
+ userId?: string;
404
+ venueId?: string;
405
+ venueUrl?: string;
406
+ whiteboardUrl?: string;
407
+ wdmDeviceRegistrationUrl?: string;
408
+ webexConferenceId?: number;
409
+ webexClusterName?: string;
410
+ webexConferenceIdStr?: string;
411
+ webexDataCenter?: string;
412
+ webexGuestId?: number;
413
+ webexMeetingId?: number;
414
+ webexNodeId?: number;
415
+ webexSiteId?: number;
416
+ webexSiteName?: string;
417
+ webexSiteUuid?: string;
418
+ webexUserId?: number;
419
+ webexWebDomain?: string;
420
+ recordingId?: string;
421
+ clientCorrelationId?: string;
422
+ idForEndpointAB?: string;
423
+ customerOrgId?: string;
319
424
  correlationId: string;
320
425
  additionalProperties?: false;
321
426
  };
@@ -328,11 +433,30 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
328
433
  */
329
434
  prepareDiagnosticEvent(eventData: Event['event'], options: any): Event;
330
435
  /**
331
- * TODO: NOT IMPLEMENTED
436
+ * Create feature event
437
+ * @param name
438
+ * @param payload
439
+ * @param options
440
+ * @returns
441
+ */
442
+ private prepareClientFeatureEvent;
443
+ /**
332
444
  * Submit Feature Event
445
+ * submit to business_ucf
333
446
  * @returns
334
447
  */
335
- submitFeatureEvent(): void;
448
+ submitFeatureEvent({ name, payload, options, delaySubmitEvent, }: {
449
+ name: FeatureEvent['name'];
450
+ payload?: ClientFeatureEventPayload;
451
+ options?: SubmitClientEventOptions;
452
+ delaySubmitEvent?: boolean;
453
+ }): Promise<any>;
454
+ /**
455
+ * Submit Feature Event
456
+ * type is business
457
+ * @param event
458
+ */
459
+ submitToCallFeatures(event: Event): Promise<any>;
336
460
  /**
337
461
  * Submit Media Quality Event
338
462
  * @param args - submit params
@@ -366,11 +490,43 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
366
490
  * Clear the error cache
367
491
  */
368
492
  clearErrorCache(): void;
493
+ /**
494
+ * Checks if an event should be limited based on criteria defined in the event dictionary.
495
+ * Returns true if the event should be sent, false if it has reached its limit.
496
+ * @param event - The diagnostic event object
497
+ * @returns boolean indicating whether the event should be sent
498
+ */
499
+ private shouldSendEvent;
500
+ /**
501
+ * Checks the current count for a limit key and increments if under limit.
502
+ * @param limitKey - The unique key for this limit combination
503
+ * @param maxCount - Maximum allowed count
504
+ * @param eventDescription - Description for logging
505
+ * @returns true if under limit and incremented, false if at/over limit
506
+ */
507
+ private checkAndIncrementEventCount;
508
+ /**
509
+ * Clears event limit tracking
510
+ */
511
+ clearEventLimits(): void;
512
+ /**
513
+ * Clears event limit tracking for a specific correlationId only.
514
+ * Keeps limits for other meetings intact.
515
+ */
516
+ clearEventLimitsForCorrelationId(correlationId: string): void;
369
517
  /**
370
518
  * Generate error payload for Client Event
371
519
  * @param rawError
372
520
  */
373
521
  generateClientEventErrorPayload(rawError: any): any[];
522
+ /**
523
+ * Create common object for in meeting events
524
+ * @param name
525
+ * @param options
526
+ * @param eventType - 'client' | 'feature'
527
+ * @returns object
528
+ */
529
+ private createCommonEventObjectInMeeting;
374
530
  /**
375
531
  * Create client event object for in meeting events
376
532
  * @param arg - create args
@@ -379,6 +535,13 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
379
535
  * @returns object
380
536
  */
381
537
  private createClientEventObjectInMeeting;
538
+ /**
539
+ * Create feature event object for in meeting function event
540
+ * @param name
541
+ * @param options
542
+ * @returns object
543
+ */
544
+ private createFeatureEventObjectInMeeting;
382
545
  /**
383
546
  * Create client event object for pre meeting events
384
547
  * @param arg - create args
@@ -416,6 +579,10 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
416
579
  * Submit Delayed Client Event CA events. Clears delayedClientEvents array after submission.
417
580
  */
418
581
  submitDelayedClientEvents(overrides?: Partial<DelayedClientEvent['options']>): Promise<any[]> | Promise<void>;
582
+ /**
583
+ * Submit Delayed feature Event CA events. Clears submitDelayedClientFeatureEvents array after submission.
584
+ */
585
+ submitDelayedClientFeatureEvents(overrides?: Partial<DelayedClientEvent['options']>): Promise<any[]> | Promise<void>;
419
586
  /**
420
587
  * Prepare the event and send the request to metrics-a service.
421
588
  * @param event
@@ -1,5 +1,6 @@
1
1
  import { ClientEventError, ClientSubServiceType } from '../metrics.types';
2
2
  export declare const CALL_DIAGNOSTIC_LOG_IDENTIFIER = "call-diagnostic-events -> ";
3
+ export declare const CALL_FEATURE_LOG_IDENTIFIER = "call-diagnostic-events-feature -> ";
3
4
  export declare const AUTHENTICATION_FAILED_CODE = 1010;
4
5
  export declare const NETWORK_ERROR = 1026;
5
6
  export declare const NEW_LOCUS_ERROR_CLIENT_CODE = 4008;
@@ -195,3 +196,4 @@ export declare const SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP: {
195
196
  };
196
197
  export declare const CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD: Record<number, Partial<ClientEventError>>;
197
198
  export declare const CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND = "js_sdk_call_diagnostic_event_failed_to_send";
199
+ export declare const CALL_FEATURE_EVENT_FAILED_TO_SEND = "js_sdk_call_feature_event_failed_to_send";
@@ -4,7 +4,7 @@
4
4
  import config from './config';
5
5
  import NewMetrics from './new-metrics';
6
6
  import * as Utils from './utils';
7
- import { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitOperationalEvent, SubmitBusinessEvent, SubmitMQE, PreComputedLatencies } from './metrics.types';
7
+ import { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitOperationalEvent, SubmitBusinessEvent, SubmitMQE, PreComputedLatencies, SubmitFeatureEvent } from './metrics.types';
8
8
  import * as CALL_DIAGNOSTIC_CONFIG from './call-diagnostic/config';
9
9
  import * as CallDiagnosticUtils from './call-diagnostic/call-diagnostic-metrics.util';
10
10
  import CallDiagnosticMetrics from './call-diagnostic/call-diagnostic-metrics';
@@ -15,4 +15,4 @@ import BusinessMetrics from './business-metrics';
15
15
  import RtcMetrics from './rtcMetrics';
16
16
  export { default, getOSNameInternal } from './metrics';
17
17
  export { config, CALL_DIAGNOSTIC_CONFIG, NewMetrics, Utils, CallDiagnosticUtils, CallDiagnosticLatencies, CallDiagnosticMetrics, BehavioralMetrics, OperationalMetrics, BusinessMetrics, RtcMetrics, };
18
- export type { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitMQE, SubmitOperationalEvent, SubmitBusinessEvent, PreComputedLatencies, };
18
+ export type { ClientEvent, ClientEventLeaveReason, SubmitBehavioralEvent, SubmitClientEvent, SubmitInternalEvent, SubmitMQE, SubmitOperationalEvent, SubmitBusinessEvent, PreComputedLatencies, SubmitFeatureEvent, };
@@ -1,6 +1,6 @@
1
- import { ClientEvent as RawClientEvent, Event as RawEvent, MediaQualityEvent as RawMediaQualityEvent } from '@webex/event-dictionary-ts';
1
+ import { ClientEvent as RawClientEvent, Event as RawEvent, MediaQualityEvent as RawMediaQualityEvent, FeatureEvent as RawFeatureEvent } from '@webex/event-dictionary-ts';
2
2
  export type Event = Omit<RawEvent, 'event'> & {
3
- event: RawClientEvent | RawMediaQualityEvent;
3
+ event: RawClientEvent | RawMediaQualityEvent | RawFeatureEvent;
4
4
  };
5
5
  export type ClientEventError = NonNullable<RawClientEvent['errors']>[0];
6
6
  export type EnvironmentType = NonNullable<RawEvent['origin']['environment']>;
@@ -32,6 +32,7 @@ export type SubmitClientEventOptions = {
32
32
  triggeredTime?: string;
33
33
  emailInput?: ClientEmailInput;
34
34
  userNameInput?: ClientUserNameInput;
35
+ vendorId?: string;
35
36
  };
36
37
  export type SubmitMQEOptions = {
37
38
  meetingId: string;
@@ -41,7 +42,7 @@ export type SubmitMQEOptions = {
41
42
  globalMeetingId?: string;
42
43
  };
43
44
  export type InternalEvent = {
44
- name: 'internal.client.meetinginfo.request' | 'internal.client.meetinginfo.response' | 'internal.register.device.request' | 'internal.register.device.response' | 'internal.reset.join.latencies' | 'internal.client.meeting.click.joinbutton' | 'internal.host.meeting.participant.admitted' | 'internal.client.meeting.interstitial-window.showed' | 'internal.client.interstitial-window.click.joinbutton' | 'internal.client.add-media.turn-discovery.start' | 'internal.client.add-media.turn-discovery.end';
45
+ name: 'internal.client.meetinginfo.request' | 'internal.client.meetinginfo.response' | 'internal.register.device.request' | 'internal.register.device.response' | 'internal.reset.join.latencies' | 'internal.client.meeting.click.joinbutton' | 'internal.host.meeting.participant.admitted' | 'internal.client.meeting.interstitial-window.showed' | 'internal.client.interstitial-window.click.joinbutton' | 'internal.client.add-media.turn-discovery.start' | 'internal.client.add-media.turn-discovery.end' | 'internal.client.share.initiated' | 'internal.client.share.stopped';
45
46
  payload?: never;
46
47
  options?: never;
47
48
  };
@@ -89,9 +90,9 @@ export interface TaggedEvent {
89
90
  export type BehavioralEvent = TaggedEvent;
90
91
  export type OperationalEvent = TaggedEvent;
91
92
  export interface FeatureEvent {
92
- name: never;
93
- payload?: never;
94
- options?: never;
93
+ name: RawFeatureEvent['name'];
94
+ payload?: RawFeatureEvent;
95
+ options?: SubmitClientEventOptions;
95
96
  }
96
97
  export interface MediaQualityEvent {
97
98
  name: RawMediaQualityEvent['name'];
@@ -110,6 +111,7 @@ export type ClientSubServiceType = ClientEvent['payload']['webexSubServiceType']
110
111
  export type ClientEventPayload = RecursivePartial<ClientEvent['payload']>;
111
112
  export type ClientEventLeaveReason = ClientEvent['payload']['leaveReason'];
112
113
  export type ClientEventPayloadError = ClientEvent['payload']['errors'];
114
+ export type ClientFeatureEventPayload = RecursivePartial<FeatureEvent['payload']>;
113
115
  export type MediaQualityEventAudioSetupDelayPayload = NonNullable<MediaQualityEvent['payload']>['audioSetupDelay'];
114
116
  export type MediaQualityEventVideoSetupDelayPayload = NonNullable<MediaQualityEvent['payload']>['videoSetupDelay'];
115
117
  export type SubmitMQEPayload = RecursivePartial<MediaQualityEvent['payload']> & {
@@ -152,7 +154,7 @@ export type BuildClientEventFetchRequestOptions = (args: {
152
154
  payload?: RecursivePartial<ClientEvent['payload']>;
153
155
  options?: SubmitClientEventOptions;
154
156
  }) => Promise<any>;
155
- export type PreComputedLatencies = 'internal.client.pageJMT' | 'internal.download.time' | 'internal.get.cluster.time' | 'internal.click.to.interstitial' | 'internal.refresh.captcha.time' | 'internal.exchange.ci.token.time' | 'internal.get.u2c.time' | 'internal.call.init.join.req' | 'internal.other.app.api.time' | 'internal.api.fetch.intelligence.models';
157
+ export type PreComputedLatencies = 'internal.client.pageJMT' | 'internal.download.time' | 'internal.get.cluster.time' | 'internal.click.to.interstitial' | 'internal.click.to.interstitial.with.user.delay' | 'internal.refresh.captcha.time' | 'internal.exchange.ci.token.time' | 'internal.get.u2c.time' | 'internal.call.init.join.req' | 'internal.other.app.api.time' | 'internal.api.fetch.intelligence.models';
156
158
  export interface IdType {
157
159
  meetingId?: string;
158
160
  callId?: string;
@@ -172,4 +174,14 @@ export interface DelayedClientEvent {
172
174
  payload?: RecursivePartial<ClientEvent['payload']>;
173
175
  options?: SubmitClientEventOptions;
174
176
  }
177
+ export type SubmitFeatureEvent = (args: {
178
+ name: FeatureEvent['name'];
179
+ payload?: RecursivePartial<FeatureEvent['payload']>;
180
+ options?: SubmitClientEventOptions;
181
+ }) => Promise<any>;
182
+ export interface DelayedClientFeatureEvent {
183
+ name: FeatureEvent['name'];
184
+ payload?: RecursivePartial<FeatureEvent['payload']>;
185
+ options?: SubmitClientEventOptions;
186
+ }
175
187
  export {};
@@ -3,7 +3,7 @@ import CallDiagnosticMetrics from './call-diagnostic/call-diagnostic-metrics';
3
3
  import BehavioralMetrics from './behavioral-metrics';
4
4
  import OperationalMetrics from './operational-metrics';
5
5
  import BusinessMetrics from './business-metrics';
6
- import { RecursivePartial, MetricEventProduct, MetricEventAgent, MetricEventVerb, ClientEvent, FeatureEvent, EventPayload, MediaQualityEvent, InternalEvent, SubmitClientEventOptions, Table, DelayedClientEvent } from './metrics.types';
6
+ import { RecursivePartial, MetricEventProduct, MetricEventAgent, MetricEventVerb, ClientEvent, FeatureEvent, EventPayload, MediaQualityEvent, InternalEvent, SubmitClientEventOptions, Table, DelayedClientEvent, DelayedClientFeatureEvent } from './metrics.types';
7
7
  import CallDiagnosticLatencies from './call-diagnostic/call-diagnostic-metrics-latencies';
8
8
  /**
9
9
  * Metrics plugin to centralize all types of metrics.
@@ -22,10 +22,15 @@ declare class Metrics extends WebexPlugin {
22
22
  * Whether or not to delay the submission of client events.
23
23
  */
24
24
  delaySubmitClientEvents: boolean;
25
+ /**
26
+ * Whether or not to delay the submission of feature events.
27
+ */
28
+ delaySubmitClientFeatureEvents: boolean;
25
29
  /**
26
30
  * Overrides for delayed client events. E.g. if you want to override the correlationId for all delayed client events, you can set this to { correlationId: 'newCorrelationId' }
27
31
  */
28
32
  delayedClientEventsOverrides: Partial<DelayedClientEvent['options']>;
33
+ delayedClientFeatureEventsOverrides: Partial<DelayedClientFeatureEvent['options']>;
29
34
  /**
30
35
  * Constructor
31
36
  * @param args
@@ -119,7 +124,7 @@ declare class Metrics extends WebexPlugin {
119
124
  name: FeatureEvent['name'];
120
125
  payload?: RecursivePartial<FeatureEvent['payload']>;
121
126
  options: any;
122
- }): void;
127
+ }): Promise<any>;
123
128
  /**
124
129
  * Call Analyzer: Client Event
125
130
  * @public
@@ -188,5 +193,17 @@ declare class Metrics extends WebexPlugin {
188
193
  shouldDelay: boolean;
189
194
  overrides?: Partial<DelayedClientEvent['options']>;
190
195
  }): Promise<any[]> | Promise<void>;
196
+ /**
197
+ * Sets the value of setDelaySubmitClientFeatureEvents.
198
+ * If set to true, feature events will be delayed until submitDelayedClientFeatureEvents is called.
199
+ * If set to false, delayed feature events will be submitted.
200
+ *
201
+ * @param {object} options - {shouldDelay: A boolean value indicating whether to delay the submission of feature events,
202
+ * overrides: An object containing overrides for the feature events}
203
+ */
204
+ setDelaySubmitClientFeatureEvents({ shouldDelay, overrides, }: {
205
+ shouldDelay: boolean;
206
+ overrides?: Partial<DelayedClientFeatureEvent['options']>;
207
+ }): Promise<any[]> | Promise<void>;
191
208
  }
192
209
  export default Metrics;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "directory": "packages/@webex/internal-plugin-metrics"
12
12
  },
13
13
  "engines": {
14
- "node": ">=16"
14
+ "node": ">=18"
15
15
  },
16
16
  "browserify": {
17
17
  "transform": [
@@ -26,22 +26,21 @@
26
26
  "@webex/eslint-config-legacy": "0.0.0",
27
27
  "@webex/jest-config-legacy": "0.0.0",
28
28
  "@webex/legacy-tools": "0.0.0",
29
- "@webex/test-helper-chai": "3.8.1",
30
- "@webex/test-helper-mocha": "3.8.1",
31
- "@webex/test-helper-mock-webex": "3.8.1",
32
- "@webex/test-helper-test-users": "3.8.1",
29
+ "@webex/test-helper-chai": "3.9.0-multi-llms.0",
30
+ "@webex/test-helper-mocha": "3.9.0-multi-llms.0",
31
+ "@webex/test-helper-mock-webex": "3.9.0-multi-llms.0",
32
+ "@webex/test-helper-test-users": "3.9.0-multi-llms.0",
33
33
  "eslint": "^8.24.0",
34
34
  "prettier": "^2.7.1",
35
35
  "sinon": "^9.2.4"
36
36
  },
37
37
  "dependencies": {
38
- "@webex/common": "3.8.1",
39
- "@webex/common-timers": "3.8.1",
40
- "@webex/event-dictionary-ts": "^1.0.1753",
41
- "@webex/internal-plugin-metrics": "3.8.1",
42
- "@webex/test-helper-chai": "3.8.1",
43
- "@webex/test-helper-mock-webex": "3.8.1",
44
- "@webex/webex-core": "3.8.1",
38
+ "@webex/common": "3.9.0-multi-llms.0",
39
+ "@webex/common-timers": "3.9.0-multi-llms.0",
40
+ "@webex/event-dictionary-ts": "^1.0.1930",
41
+ "@webex/test-helper-chai": "3.9.0-multi-llms.0",
42
+ "@webex/test-helper-mock-webex": "3.9.0-multi-llms.0",
43
+ "@webex/webex-core": "3.9.0-multi-llms.2",
45
44
  "ip-anonymize": "^0.1.0",
46
45
  "lodash": "^4.17.21",
47
46
  "uuid": "^3.3.2"
@@ -54,5 +53,5 @@
54
53
  "test:style": "eslint ./src/**/*.*",
55
54
  "test:unit": "webex-legacy-tools test --unit --runner mocha"
56
55
  },
57
- "version": "3.8.1"
56
+ "version": "3.9.0-multi-llms.2"
58
57
  }