@webex/internal-plugin-metrics 3.8.1-web-workers-keepalive.1 → 3.9.0-multipleLLM.1

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.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_webexCore","require","_metrics","_interopRequireWildcard","_config","_interopRequireDefault","_newMetrics","Utils","exports","CALL_DIAGNOSTIC_CONFIG","CallDiagnosticUtils","_callDiagnosticMetrics2","_callDiagnosticMetricsLatencies","_behavioralMetrics","_operationalMetrics","_businessMetrics","_rtcMetrics","_getRequireWildcardCache","e","_WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","_Object$defineProperty","_Object$getOwnPropertyDescriptor","u","Object","prototype","hasOwnProperty","call","i","set","registerInternalPlugin","Metrics","config","NewMetrics"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {registerInternalPlugin} from '@webex/webex-core';\n\nimport Metrics from './metrics';\nimport config from './config';\nimport NewMetrics from './new-metrics';\nimport * as Utils from './utils';\nimport {\n ClientEvent,\n ClientEventLeaveReason,\n SubmitBehavioralEvent,\n SubmitClientEvent,\n SubmitInternalEvent,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n SubmitMQE,\n PreComputedLatencies,\n} from './metrics.types';\nimport * as CALL_DIAGNOSTIC_CONFIG from './call-diagnostic/config';\nimport * as CallDiagnosticUtils from './call-diagnostic/call-diagnostic-metrics.util';\nimport CallDiagnosticMetrics from './call-diagnostic/call-diagnostic-metrics';\nimport CallDiagnosticLatencies from './call-diagnostic/call-diagnostic-metrics-latencies';\nimport BehavioralMetrics from './behavioral-metrics';\nimport OperationalMetrics from './operational-metrics';\nimport BusinessMetrics from './business-metrics';\nimport RtcMetrics from './rtcMetrics';\n\nregisterInternalPlugin('metrics', Metrics, {\n config,\n});\n\nregisterInternalPlugin('newMetrics', NewMetrics, {\n config,\n});\n\nexport {default, getOSNameInternal} from './metrics';\n\nexport {\n config,\n CALL_DIAGNOSTIC_CONFIG,\n NewMetrics,\n Utils,\n CallDiagnosticUtils,\n CallDiagnosticLatencies,\n CallDiagnosticMetrics,\n BehavioralMetrics,\n OperationalMetrics,\n BusinessMetrics,\n RtcMetrics,\n};\nexport type {\n ClientEvent,\n ClientEventLeaveReason,\n SubmitBehavioralEvent,\n SubmitClientEvent,\n SubmitInternalEvent,\n SubmitMQE,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n PreComputedLatencies,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,KAAA,GAAAJ,uBAAA,CAAAF,OAAA;AAAiCO,OAAA,CAAAD,KAAA,GAAAA,KAAA;AAYjC,IAAAE,sBAAA,GAAAN,uBAAA,CAAAF,OAAA;AAAmEO,OAAA,CAAAC,sBAAA,GAAAA,sBAAA;AACnE,IAAAC,mBAAA,GAAAP,uBAAA,CAAAF,OAAA;AAAsFO,OAAA,CAAAE,mBAAA,GAAAA,mBAAA;AACtF,IAAAC,uBAAA,GAAAN,sBAAA,CAAAJ,OAAA;AACA,IAAAW,+BAAA,GAAAP,sBAAA,CAAAJ,OAAA;AACA,IAAAY,kBAAA,GAAAR,sBAAA,CAAAJ,OAAA;AACA,IAAAa,mBAAA,GAAAT,sBAAA,CAAAJ,OAAA;AACA,IAAAc,gBAAA,GAAAV,sBAAA,CAAAJ,OAAA;AACA,IAAAe,WAAA,GAAAX,sBAAA,CAAAJ,OAAA;AAAsC,SAAAgB,yBAAAC,CAAA,6BAAAC,QAAA,mBAAAC,CAAA,OAAAD,QAAA,IAAAE,CAAA,OAAAF,QAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAf,wBAAAe,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,sBAAA,IAAAC,gCAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAlB,CAAA,EAAAc,CAAA,SAAAK,CAAA,GAAAR,CAAA,GAAAE,gCAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAK,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,sBAAA,CAAAH,CAAA,EAAAK,CAAA,EAAAK,CAAA,IAAAV,CAAA,CAAAK,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAL,CAAA,CAAAH,OAAA,GAAAN,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAiB,GAAA,CAAApB,CAAA,EAAAS,CAAA,GAAAA,CAAA;AA5BtC;AACA;AACA;;AA4BA,IAAAY,iCAAsB,EAAC,SAAS,EAAEC,gBAAO,EAAE;EACzCC,MAAM,EAANA;AACF,CAAC,CAAC;AAEF,IAAAF,iCAAsB,EAAC,YAAY,EAAEG,mBAAU,EAAE;EAC/CD,MAAM,EAANA;AACF,CAAC,CAAC"}
1
+ {"version":3,"names":["_webexCore","require","_metrics","_interopRequireWildcard","_config","_interopRequireDefault","_newMetrics","Utils","exports","CALL_DIAGNOSTIC_CONFIG","CallDiagnosticUtils","_callDiagnosticMetrics2","_callDiagnosticMetricsLatencies","_behavioralMetrics","_operationalMetrics","_businessMetrics","_rtcMetrics","_getRequireWildcardCache","e","_WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","_Object$defineProperty","_Object$getOwnPropertyDescriptor","u","Object","prototype","hasOwnProperty","call","i","set","registerInternalPlugin","Metrics","config","NewMetrics"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {registerInternalPlugin} from '@webex/webex-core';\n\nimport Metrics from './metrics';\nimport config from './config';\nimport NewMetrics from './new-metrics';\nimport * as Utils from './utils';\nimport {\n ClientEvent,\n ClientEventLeaveReason,\n SubmitBehavioralEvent,\n SubmitClientEvent,\n SubmitInternalEvent,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n SubmitMQE,\n PreComputedLatencies,\n SubmitFeatureEvent,\n} from './metrics.types';\nimport * as CALL_DIAGNOSTIC_CONFIG from './call-diagnostic/config';\nimport * as CallDiagnosticUtils from './call-diagnostic/call-diagnostic-metrics.util';\nimport CallDiagnosticMetrics from './call-diagnostic/call-diagnostic-metrics';\nimport CallDiagnosticLatencies from './call-diagnostic/call-diagnostic-metrics-latencies';\nimport BehavioralMetrics from './behavioral-metrics';\nimport OperationalMetrics from './operational-metrics';\nimport BusinessMetrics from './business-metrics';\nimport RtcMetrics from './rtcMetrics';\n\nregisterInternalPlugin('metrics', Metrics, {\n config,\n});\n\nregisterInternalPlugin('newMetrics', NewMetrics, {\n config,\n});\n\nexport {default, getOSNameInternal} from './metrics';\n\nexport {\n config,\n CALL_DIAGNOSTIC_CONFIG,\n NewMetrics,\n Utils,\n CallDiagnosticUtils,\n CallDiagnosticLatencies,\n CallDiagnosticMetrics,\n BehavioralMetrics,\n OperationalMetrics,\n BusinessMetrics,\n RtcMetrics,\n};\nexport type {\n ClientEvent,\n ClientEventLeaveReason,\n SubmitBehavioralEvent,\n SubmitClientEvent,\n SubmitInternalEvent,\n SubmitMQE,\n SubmitOperationalEvent,\n SubmitBusinessEvent,\n PreComputedLatencies,\n SubmitFeatureEvent,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,KAAA,GAAAJ,uBAAA,CAAAF,OAAA;AAAiCO,OAAA,CAAAD,KAAA,GAAAA,KAAA;AAajC,IAAAE,sBAAA,GAAAN,uBAAA,CAAAF,OAAA;AAAmEO,OAAA,CAAAC,sBAAA,GAAAA,sBAAA;AACnE,IAAAC,mBAAA,GAAAP,uBAAA,CAAAF,OAAA;AAAsFO,OAAA,CAAAE,mBAAA,GAAAA,mBAAA;AACtF,IAAAC,uBAAA,GAAAN,sBAAA,CAAAJ,OAAA;AACA,IAAAW,+BAAA,GAAAP,sBAAA,CAAAJ,OAAA;AACA,IAAAY,kBAAA,GAAAR,sBAAA,CAAAJ,OAAA;AACA,IAAAa,mBAAA,GAAAT,sBAAA,CAAAJ,OAAA;AACA,IAAAc,gBAAA,GAAAV,sBAAA,CAAAJ,OAAA;AACA,IAAAe,WAAA,GAAAX,sBAAA,CAAAJ,OAAA;AAAsC,SAAAgB,yBAAAC,CAAA,6BAAAC,QAAA,mBAAAC,CAAA,OAAAD,QAAA,IAAAE,CAAA,OAAAF,QAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAf,wBAAAe,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,sBAAA,IAAAC,gCAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAlB,CAAA,EAAAc,CAAA,SAAAK,CAAA,GAAAR,CAAA,GAAAE,gCAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAK,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,sBAAA,CAAAH,CAAA,EAAAK,CAAA,EAAAK,CAAA,IAAAV,CAAA,CAAAK,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAL,CAAA,CAAAH,OAAA,GAAAN,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAiB,GAAA,CAAApB,CAAA,EAAAS,CAAA,GAAAA,CAAA;AA7BtC;AACA;AACA;;AA6BA,IAAAY,iCAAsB,EAAC,SAAS,EAAEC,gBAAO,EAAE;EACzCC,MAAM,EAANA;AACF,CAAC,CAAC;AAEF,IAAAF,iCAAsB,EAAC,YAAY,EAAEG,mBAAU,EAAE;EAC/CD,MAAM,EAANA;AACF,CAAC,CAAC"}
package/dist/metrics.js CHANGED
@@ -148,7 +148,7 @@ var Metrics = _webexCore.WebexPlugin.extend({
148
148
  }
149
149
  });
150
150
  },
151
- version: "3.8.1-web-workers-keepalive.1"
151
+ version: "3.9.0-multipleLLM.1"
152
152
  });
153
153
  var _default = exports.default = Metrics;
154
154
  //# sourceMappingURL=metrics.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["metrics.types.ts"],"sourcesContent":["import {\n ClientEvent as RawClientEvent,\n Event as RawEvent,\n MediaQualityEvent as RawMediaQualityEvent,\n FeatureEvent as RawFeatureEvent,\n} from '@webex/event-dictionary-ts';\n\nexport type Event = Omit<RawEvent, 'event'> & {\n event: RawClientEvent | RawMediaQualityEvent | RawFeatureEvent;\n};\n\nexport type ClientEventError = NonNullable<RawClientEvent['errors']>[0];\n\nexport type EnvironmentType = NonNullable<RawEvent['origin']['environment']>;\n\nexport type NewEnvironmentType = NonNullable<RawEvent['origin']['newEnvironment']>;\n\nexport type ClientLaunchMethodType = NonNullable<\n RawEvent['origin']['clientInfo']\n>['clientLaunchMethod'];\n\nexport type ClientUserNameInput = NonNullable<RawClientEvent['userNameInput']>;\n\nexport type ClientEmailInput = NonNullable<RawClientEvent['emailInput']>;\n\nexport type BrowserLaunchMethodType = NonNullable<\n RawEvent['origin']['clientInfo']\n>['browserLaunchMethod'];\n\nexport type MetricEventProduct = 'webex' | 'wxcc_desktop' | 'wxcc_crm' | 'wxcc_sdk';\n\nexport type MetricEventAgent = 'user' | 'browser' | 'system' | 'sdk' | 'redux' | 'service' | 'api';\n\nexport type MetricEventVerb =\n | 'abort'\n | 'accept'\n | 'activate'\n | 'apply'\n | 'answer'\n | 'authorize'\n | 'build'\n | 'cancel'\n | 'change'\n | 'click'\n | 'close'\n | 'complete'\n | 'connect'\n | 'create'\n | 'deactivate'\n | 'decrypt'\n | 'delete'\n | 'deliver'\n | 'destroy'\n | 'disable'\n | 'disconnect'\n | 'dismiss'\n | 'display'\n | 'download'\n | 'edit'\n | 'enable'\n | 'encrypt'\n | 'end'\n | 'expire'\n | 'fail'\n | 'fetch'\n | 'fire'\n | 'generate'\n | 'get'\n | 'hide'\n | 'hover'\n | 'ignore'\n | 'initialize'\n | 'initiate'\n | 'invalidate'\n | 'join'\n | 'list'\n | 'load'\n | 'login'\n | 'logout'\n | 'notify'\n | 'offer'\n | 'open'\n | 'press'\n | 'receive'\n | 'refer'\n | 'refresh'\n | 'register'\n | 'release'\n | 'reload'\n | 'reject'\n | 'request'\n | 'reset'\n | 'resize'\n | 'respond'\n | 'retry'\n | 'revoke'\n | 'save'\n | 'search'\n | 'select'\n | 'send'\n | 'set'\n | 'sign'\n | 'start'\n | 'submit'\n | 'switch'\n | 'sync'\n | 'toggle'\n | 'transfer'\n | 'unregister'\n | 'update'\n | 'upload'\n | 'use'\n | 'validate'\n | 'view'\n | 'visit'\n | 'wait'\n | 'warn'\n | 'exit';\n\nexport type MetricEventJoinFlowVersion = 'Other' | 'NewFTE';\nexport type MetricEventMeetingJoinPhase = 'pre-join' | 'join' | 'in-meeting';\n\nexport type SubmitClientEventOptions = {\n meetingId?: string;\n mediaConnections?: any[];\n rawError?: any;\n correlationId?: string;\n sessionCorrelationId?: string;\n preLoginId?: string;\n environment?: EnvironmentType;\n newEnvironmentType?: NewEnvironmentType;\n clientLaunchMethod?: ClientLaunchMethodType;\n browserLaunchMethod?: BrowserLaunchMethodType;\n webexConferenceIdStr?: string;\n globalMeetingId?: string;\n joinFlowVersion?: MetricEventJoinFlowVersion;\n meetingJoinPhase?: MetricEventMeetingJoinPhase;\n triggeredTime?: string;\n emailInput?: ClientEmailInput;\n userNameInput?: ClientUserNameInput;\n};\n\nexport type SubmitMQEOptions = {\n meetingId: string;\n mediaConnections?: any[];\n networkType?: Event['origin']['networkType'];\n webexConferenceIdStr?: string;\n globalMeetingId?: string;\n};\n\nexport type InternalEvent = {\n name:\n | 'internal.client.meetinginfo.request'\n | 'internal.client.meetinginfo.response'\n | 'internal.register.device.request'\n | 'internal.register.device.response'\n | 'internal.reset.join.latencies'\n | 'internal.client.meeting.click.joinbutton'\n | 'internal.host.meeting.participant.admitted'\n | 'internal.client.meeting.interstitial-window.showed'\n | 'internal.client.interstitial-window.click.joinbutton'\n | 'internal.client.add-media.turn-discovery.start'\n | 'internal.client.add-media.turn-discovery.end';\n\n payload?: never;\n options?: never;\n};\n\nexport interface ClientEvent {\n name: RawClientEvent['name'];\n payload?: RawClientEvent;\n options?: SubmitClientEventOptions;\n}\n\nexport interface DeviceContext {\n app: {version: string};\n device: {id: string};\n locale: string;\n os: {\n name: string;\n version: string;\n };\n}\n\nexport type MetricType = 'behavioral' | 'operational' | 'business';\n\nexport type Table = 'wbxapp_callend_metrics' | 'business_metrics' | 'business_ucf' | 'default';\n\ntype InternalEventPayload = string | number | boolean;\nexport type EventPayload = Record<string, InternalEventPayload>;\nexport type BehavioralEventPayload = EventPayload; // for compatibilty, can be remove after wxcc-desktop did change their imports.\n\nexport interface BusinessEventPayload {\n metricName: string;\n timestamp: number;\n context: DeviceContext;\n browserDetails: EventPayload;\n value: EventPayload;\n}\n\nexport interface BusinessEvent {\n type: string[];\n eventPayload: BusinessEventPayload;\n}\n\nexport interface TaggedEvent {\n context: DeviceContext;\n metricName: string;\n tags: EventPayload;\n timestamp: number;\n type: [MetricType];\n}\n\nexport type BehavioralEvent = TaggedEvent;\nexport type OperationalEvent = TaggedEvent;\n\nexport interface FeatureEvent {\n name: RawFeatureEvent['name'];\n payload?: RawFeatureEvent;\n options?: SubmitClientEventOptions;\n}\n\nexport interface MediaQualityEvent {\n name: RawMediaQualityEvent['name'];\n payload?: RawMediaQualityEvent;\n options: SubmitMQEOptions;\n}\n\nexport type RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? RecursivePartial<U>[]\n : T[P] extends object\n ? RecursivePartial<T[P]>\n : T[P];\n};\n\nexport type MetricEventNames =\n | InternalEvent['name']\n | ClientEvent['name']\n | BehavioralEvent['metricName']\n | OperationalEvent['metricName']\n | BusinessEvent['eventPayload']['metricName']\n | FeatureEvent['name']\n | MediaQualityEvent['name'];\n\nexport type ClientInfo = NonNullable<RawEvent['origin']['clientInfo']>;\nexport type ClientType = NonNullable<RawEvent['origin']['clientInfo']>['clientType'];\nexport type SubClientType = NonNullable<RawEvent['origin']['clientInfo']>['subClientType'];\nexport type NetworkType = NonNullable<RawEvent['origin']>['networkType'];\n\nexport type ClientSubServiceType = ClientEvent['payload']['webexSubServiceType'];\nexport type ClientEventPayload = RecursivePartial<ClientEvent['payload']>;\nexport type ClientEventLeaveReason = ClientEvent['payload']['leaveReason'];\nexport type ClientEventPayloadError = ClientEvent['payload']['errors'];\n\nexport type ClientFeatureEventPayload = RecursivePartial<FeatureEvent['payload']>;\n\nexport type MediaQualityEventAudioSetupDelayPayload = NonNullable<\n MediaQualityEvent['payload']\n>['audioSetupDelay'];\nexport type MediaQualityEventVideoSetupDelayPayload = NonNullable<\n MediaQualityEvent['payload']\n>['videoSetupDelay'];\n\nexport type SubmitMQEPayload = RecursivePartial<MediaQualityEvent['payload']> & {\n intervals: NonNullable<MediaQualityEvent['payload']>['intervals'];\n};\n\nexport type SubmitInternalEvent = (args: {\n name: InternalEvent['name'];\n payload?: RecursivePartial<InternalEvent['payload']>;\n options?: any;\n}) => void;\n\nexport type SubmitBehavioralEvent = (args: {\n product: MetricEventProduct;\n agent: MetricEventAgent;\n target: string;\n verb: MetricEventVerb;\n payload?: EventPayload;\n}) => void;\n\nexport type SubmitClientEvent = (args: {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport type SubmitOperationalEvent = (args: {\n name: OperationalEvent['metricName'];\n payload: EventPayload;\n}) => void;\n\nexport type SubmitBusinessEvent = (args: {\n name: OperationalEvent['metricName'];\n payload: EventPayload;\n metadata?: EventPayload;\n table?: Table;\n}) => void;\n\nexport type SubmitMQE = (args: {\n name: MediaQualityEvent['name'];\n payload: SubmitMQEPayload;\n options: any;\n}) => void;\n\nexport type BuildClientEventFetchRequestOptions = (args: {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport type PreComputedLatencies =\n | 'internal.client.pageJMT'\n | 'internal.download.time'\n | 'internal.get.cluster.time'\n | 'internal.click.to.interstitial'\n | 'internal.click.to.interstitial.with.user.delay'\n | 'internal.refresh.captcha.time'\n | 'internal.exchange.ci.token.time'\n | 'internal.get.u2c.time'\n | 'internal.call.init.join.req'\n | 'internal.other.app.api.time'\n | 'internal.api.fetch.intelligence.models';\n\nexport interface IdType {\n meetingId?: string;\n callId?: string;\n}\n\nexport interface IMetricsAttributes {\n type: string;\n version: string;\n userId: string;\n correlationId: string;\n connectionId: string;\n data: any[];\n meetingId?: string;\n callId?: string;\n}\n\nexport interface DelayedClientEvent {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}\n\nexport type SubmitFeatureEvent = (args: {\n name: FeatureEvent['name'];\n payload?: RecursivePartial<FeatureEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport interface DelayedClientFeatureEvent {\n name: FeatureEvent['name'];\n payload?: RecursivePartial<FeatureEvent['payload']>;\n options?: SubmitClientEventOptions;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["metrics.types.ts"],"sourcesContent":["import {\n ClientEvent as RawClientEvent,\n Event as RawEvent,\n MediaQualityEvent as RawMediaQualityEvent,\n FeatureEvent as RawFeatureEvent,\n} from '@webex/event-dictionary-ts';\n\nexport type Event = Omit<RawEvent, 'event'> & {\n event: RawClientEvent | RawMediaQualityEvent | RawFeatureEvent;\n};\n\nexport type ClientEventError = NonNullable<RawClientEvent['errors']>[0];\n\nexport type EnvironmentType = NonNullable<RawEvent['origin']['environment']>;\n\nexport type NewEnvironmentType = NonNullable<RawEvent['origin']['newEnvironment']>;\n\nexport type ClientLaunchMethodType = NonNullable<\n RawEvent['origin']['clientInfo']\n>['clientLaunchMethod'];\n\nexport type ClientUserNameInput = NonNullable<RawClientEvent['userNameInput']>;\n\nexport type ClientEmailInput = NonNullable<RawClientEvent['emailInput']>;\n\nexport type BrowserLaunchMethodType = NonNullable<\n RawEvent['origin']['clientInfo']\n>['browserLaunchMethod'];\n\nexport type MetricEventProduct = 'webex' | 'wxcc_desktop' | 'wxcc_crm' | 'wxcc_sdk';\n\nexport type MetricEventAgent = 'user' | 'browser' | 'system' | 'sdk' | 'redux' | 'service' | 'api';\n\nexport type MetricEventVerb =\n | 'abort'\n | 'accept'\n | 'activate'\n | 'apply'\n | 'answer'\n | 'authorize'\n | 'build'\n | 'cancel'\n | 'change'\n | 'click'\n | 'close'\n | 'complete'\n | 'connect'\n | 'create'\n | 'deactivate'\n | 'decrypt'\n | 'delete'\n | 'deliver'\n | 'destroy'\n | 'disable'\n | 'disconnect'\n | 'dismiss'\n | 'display'\n | 'download'\n | 'edit'\n | 'enable'\n | 'encrypt'\n | 'end'\n | 'expire'\n | 'fail'\n | 'fetch'\n | 'fire'\n | 'generate'\n | 'get'\n | 'hide'\n | 'hover'\n | 'ignore'\n | 'initialize'\n | 'initiate'\n | 'invalidate'\n | 'join'\n | 'list'\n | 'load'\n | 'login'\n | 'logout'\n | 'notify'\n | 'offer'\n | 'open'\n | 'press'\n | 'receive'\n | 'refer'\n | 'refresh'\n | 'register'\n | 'release'\n | 'reload'\n | 'reject'\n | 'request'\n | 'reset'\n | 'resize'\n | 'respond'\n | 'retry'\n | 'revoke'\n | 'save'\n | 'search'\n | 'select'\n | 'send'\n | 'set'\n | 'sign'\n | 'start'\n | 'submit'\n | 'switch'\n | 'sync'\n | 'toggle'\n | 'transfer'\n | 'unregister'\n | 'update'\n | 'upload'\n | 'use'\n | 'validate'\n | 'view'\n | 'visit'\n | 'wait'\n | 'warn'\n | 'exit';\n\nexport type MetricEventJoinFlowVersion = 'Other' | 'NewFTE';\nexport type MetricEventMeetingJoinPhase = 'pre-join' | 'join' | 'in-meeting';\n\nexport type SubmitClientEventOptions = {\n meetingId?: string;\n mediaConnections?: any[];\n rawError?: any;\n correlationId?: string;\n sessionCorrelationId?: string;\n preLoginId?: string;\n environment?: EnvironmentType;\n newEnvironmentType?: NewEnvironmentType;\n clientLaunchMethod?: ClientLaunchMethodType;\n browserLaunchMethod?: BrowserLaunchMethodType;\n webexConferenceIdStr?: string;\n globalMeetingId?: string;\n joinFlowVersion?: MetricEventJoinFlowVersion;\n meetingJoinPhase?: MetricEventMeetingJoinPhase;\n triggeredTime?: string;\n emailInput?: ClientEmailInput;\n userNameInput?: ClientUserNameInput;\n vendorId?: string;\n};\n\nexport type SubmitMQEOptions = {\n meetingId: string;\n mediaConnections?: any[];\n networkType?: Event['origin']['networkType'];\n webexConferenceIdStr?: string;\n globalMeetingId?: string;\n};\n\nexport type InternalEvent = {\n name:\n | 'internal.client.meetinginfo.request'\n | 'internal.client.meetinginfo.response'\n | 'internal.register.device.request'\n | 'internal.register.device.response'\n | 'internal.reset.join.latencies'\n | 'internal.client.meeting.click.joinbutton'\n | 'internal.host.meeting.participant.admitted'\n | 'internal.client.meeting.interstitial-window.showed'\n | 'internal.client.interstitial-window.click.joinbutton'\n | 'internal.client.add-media.turn-discovery.start'\n | 'internal.client.add-media.turn-discovery.end'\n | 'internal.client.share.initiated'\n | 'internal.client.share.stopped';\n\n payload?: never;\n options?: never;\n};\n\nexport interface ClientEvent {\n name: RawClientEvent['name'];\n payload?: RawClientEvent;\n options?: SubmitClientEventOptions;\n}\n\nexport interface DeviceContext {\n app: {version: string};\n device: {id: string};\n locale: string;\n os: {\n name: string;\n version: string;\n };\n}\n\nexport type MetricType = 'behavioral' | 'operational' | 'business';\n\nexport type Table = 'wbxapp_callend_metrics' | 'business_metrics' | 'business_ucf' | 'default';\n\ntype InternalEventPayload = string | number | boolean;\nexport type EventPayload = Record<string, InternalEventPayload>;\nexport type BehavioralEventPayload = EventPayload; // for compatibilty, can be remove after wxcc-desktop did change their imports.\n\nexport interface BusinessEventPayload {\n metricName: string;\n timestamp: number;\n context: DeviceContext;\n browserDetails: EventPayload;\n value: EventPayload;\n}\n\nexport interface BusinessEvent {\n type: string[];\n eventPayload: BusinessEventPayload;\n}\n\nexport interface TaggedEvent {\n context: DeviceContext;\n metricName: string;\n tags: EventPayload;\n timestamp: number;\n type: [MetricType];\n}\n\nexport type BehavioralEvent = TaggedEvent;\nexport type OperationalEvent = TaggedEvent;\n\nexport interface FeatureEvent {\n name: RawFeatureEvent['name'];\n payload?: RawFeatureEvent;\n options?: SubmitClientEventOptions;\n}\n\nexport interface MediaQualityEvent {\n name: RawMediaQualityEvent['name'];\n payload?: RawMediaQualityEvent;\n options: SubmitMQEOptions;\n}\n\nexport type RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[]\n ? RecursivePartial<U>[]\n : T[P] extends object\n ? RecursivePartial<T[P]>\n : T[P];\n};\n\nexport type MetricEventNames =\n | InternalEvent['name']\n | ClientEvent['name']\n | BehavioralEvent['metricName']\n | OperationalEvent['metricName']\n | BusinessEvent['eventPayload']['metricName']\n | FeatureEvent['name']\n | MediaQualityEvent['name'];\n\nexport type ClientInfo = NonNullable<RawEvent['origin']['clientInfo']>;\nexport type ClientType = NonNullable<RawEvent['origin']['clientInfo']>['clientType'];\nexport type SubClientType = NonNullable<RawEvent['origin']['clientInfo']>['subClientType'];\nexport type NetworkType = NonNullable<RawEvent['origin']>['networkType'];\n\nexport type ClientSubServiceType = ClientEvent['payload']['webexSubServiceType'];\nexport type ClientEventPayload = RecursivePartial<ClientEvent['payload']>;\nexport type ClientEventLeaveReason = ClientEvent['payload']['leaveReason'];\nexport type ClientEventPayloadError = ClientEvent['payload']['errors'];\n\nexport type ClientFeatureEventPayload = RecursivePartial<FeatureEvent['payload']>;\n\nexport type MediaQualityEventAudioSetupDelayPayload = NonNullable<\n MediaQualityEvent['payload']\n>['audioSetupDelay'];\nexport type MediaQualityEventVideoSetupDelayPayload = NonNullable<\n MediaQualityEvent['payload']\n>['videoSetupDelay'];\n\nexport type SubmitMQEPayload = RecursivePartial<MediaQualityEvent['payload']> & {\n intervals: NonNullable<MediaQualityEvent['payload']>['intervals'];\n};\n\nexport type SubmitInternalEvent = (args: {\n name: InternalEvent['name'];\n payload?: RecursivePartial<InternalEvent['payload']>;\n options?: any;\n}) => void;\n\nexport type SubmitBehavioralEvent = (args: {\n product: MetricEventProduct;\n agent: MetricEventAgent;\n target: string;\n verb: MetricEventVerb;\n payload?: EventPayload;\n}) => void;\n\nexport type SubmitClientEvent = (args: {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport type SubmitOperationalEvent = (args: {\n name: OperationalEvent['metricName'];\n payload: EventPayload;\n}) => void;\n\nexport type SubmitBusinessEvent = (args: {\n name: OperationalEvent['metricName'];\n payload: EventPayload;\n metadata?: EventPayload;\n table?: Table;\n}) => void;\n\nexport type SubmitMQE = (args: {\n name: MediaQualityEvent['name'];\n payload: SubmitMQEPayload;\n options: any;\n}) => void;\n\nexport type BuildClientEventFetchRequestOptions = (args: {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport type PreComputedLatencies =\n | 'internal.client.pageJMT'\n | 'internal.download.time'\n | 'internal.get.cluster.time'\n | 'internal.click.to.interstitial'\n | 'internal.click.to.interstitial.with.user.delay'\n | 'internal.refresh.captcha.time'\n | 'internal.exchange.ci.token.time'\n | 'internal.get.u2c.time'\n | 'internal.call.init.join.req'\n | 'internal.other.app.api.time'\n | 'internal.api.fetch.intelligence.models';\n\nexport interface IdType {\n meetingId?: string;\n callId?: string;\n}\n\nexport interface IMetricsAttributes {\n type: string;\n version: string;\n userId: string;\n correlationId: string;\n connectionId: string;\n data: any[];\n meetingId?: string;\n callId?: string;\n}\n\nexport interface DelayedClientEvent {\n name: ClientEvent['name'];\n payload?: RecursivePartial<ClientEvent['payload']>;\n options?: SubmitClientEventOptions;\n}\n\nexport type SubmitFeatureEvent = (args: {\n name: FeatureEvent['name'];\n payload?: RecursivePartial<FeatureEvent['payload']>;\n options?: SubmitClientEventOptions;\n}) => Promise<any>;\n\nexport interface DelayedClientFeatureEvent {\n name: FeatureEvent['name'];\n payload?: RecursivePartial<FeatureEvent['payload']>;\n options?: SubmitClientEventOptions;\n}\n"],"mappings":""}
@@ -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
@@ -230,6 +233,10 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
230
233
  * Video setup delay transmit
231
234
  */
232
235
  getVideoJoinRespTxStart(): number;
236
+ /**
237
+ * Time from share initiation to share stop (ms).
238
+ */
239
+ getShareDuration(): number;
233
240
  /**
234
241
  * Total latency for all exchange ci token.
235
242
  */
@@ -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;
@@ -33,6 +34,8 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
33
34
  private delayedClientFeatureEvents;
34
35
  private eventErrorCache;
35
36
  private isMercuryConnected;
37
+ private eventLimitTracker;
38
+ private eventLimitWarningsLogged;
36
39
  validator: (options: {
37
40
  type: 'mqe' | 'ce';
38
41
  event: Event;
@@ -77,7 +80,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
77
80
  * @returns
78
81
  */
79
82
  getOrigin(options: GetOriginOptions, meetingId?: string): {
80
- 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" | "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";
81
84
  userAgent: string;
82
85
  buildType?: "debug" | "test" | "prod" | "tap" | "analyzer-test";
83
86
  upgradeChannel?: string;
@@ -98,10 +101,11 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
98
101
  publicNetworkPrefix?: string;
99
102
  browserLaunchMethod?: "url-handler" | "activex" | "npapi" | "extension" | "cwsapi" | "java" | "tfs" | "webacd" | "thinclient" | "switch-to-web" | "switch-to-native";
100
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";
101
105
  browser?: string;
102
106
  browserVersion?: string;
103
- 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";
104
- 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";
105
109
  schedulingClientType?: "TEAMS_CLIENT" | "GOOGLE_ADDON" | "PT" | "PUBLIC_API" | "UNIFIED_PAGE" | "WEBEX_PAGE" | "GOOGLE_NOTIFICATION_CALENDAR" | "MSFT_NOTIFICATION_ADDIN" | "MSFT_NOTIFICATION_CALENDAR" | "OUTLOOK_ADDIN";
106
110
  clientVersion?: string;
107
111
  clientVersionStatus?: "CURRENT" | "LEGACY" | "UNSUPPORTED";
@@ -144,6 +148,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
144
148
  inMeetingUpdate?: boolean;
145
149
  mtaVersion?: string;
146
150
  isWarholOpening?: boolean;
151
+ vendorId?: string;
147
152
  additionalProperties?: false;
148
153
  };
149
154
  emmVendorId?: string;
@@ -241,6 +246,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
241
246
  recordingId?: string;
242
247
  clientCorrelationId?: string;
243
248
  idForEndpointAB?: string;
249
+ customerOrgId?: string;
244
250
  correlationId: string;
245
251
  additionalProperties?: false;
246
252
  } | {
@@ -327,6 +333,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
327
333
  recordingId?: string;
328
334
  clientCorrelationId?: string;
329
335
  idForEndpointAB?: string;
336
+ customerOrgId?: string;
330
337
  correlationId: string;
331
338
  additionalProperties?: false;
332
339
  } | {
@@ -413,6 +420,7 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
413
420
  recordingId?: string;
414
421
  clientCorrelationId?: string;
415
422
  idForEndpointAB?: string;
423
+ customerOrgId?: string;
416
424
  correlationId: string;
417
425
  additionalProperties?: false;
418
426
  };
@@ -482,6 +490,30 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
482
490
  * Clear the error cache
483
491
  */
484
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;
485
517
  /**
486
518
  * Generate error payload for Client Event
487
519
  * @param rawError
@@ -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, };
@@ -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
  };
package/package.json CHANGED
@@ -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-web-workers-keepalive.1",
30
- "@webex/test-helper-mocha": "3.8.1-web-workers-keepalive.1",
31
- "@webex/test-helper-mock-webex": "3.8.1-web-workers-keepalive.1",
32
- "@webex/test-helper-test-users": "3.8.1-web-workers-keepalive.1",
29
+ "@webex/test-helper-chai": "3.9.0-multipleLLM.0",
30
+ "@webex/test-helper-mocha": "3.9.0-multipleLLM.0",
31
+ "@webex/test-helper-mock-webex": "3.9.0-multipleLLM.0",
32
+ "@webex/test-helper-test-users": "3.9.0-multipleLLM.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-web-workers-keepalive.1",
39
- "@webex/common-timers": "3.8.1-web-workers-keepalive.1",
40
- "@webex/event-dictionary-ts": "^1.0.1819",
41
- "@webex/internal-plugin-metrics": "3.8.1-web-workers-keepalive.1",
42
- "@webex/test-helper-chai": "3.8.1-web-workers-keepalive.1",
43
- "@webex/test-helper-mock-webex": "3.8.1-web-workers-keepalive.1",
44
- "@webex/webex-core": "3.8.1-web-workers-keepalive.1",
38
+ "@webex/common": "3.9.0-multipleLLM.0",
39
+ "@webex/common-timers": "3.9.0-multipleLLM.0",
40
+ "@webex/event-dictionary-ts": "^1.0.1930",
41
+ "@webex/test-helper-chai": "3.9.0-multipleLLM.0",
42
+ "@webex/test-helper-mock-webex": "3.9.0-multipleLLM.0",
43
+ "@webex/webex-core": "3.9.0-multipleLLM.1",
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-web-workers-keepalive.1"
56
+ "version": "3.9.0-multipleLLM.1"
58
57
  }
@@ -148,15 +148,27 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
148
148
  * @param b end
149
149
  * @returns latency
150
150
  */
151
- public getDiffBetweenTimestamps(a: MetricEventNames, b: MetricEventNames) {
151
+ public getDiffBetweenTimestamps(
152
+ a: MetricEventNames,
153
+ b: MetricEventNames,
154
+ clampValues?: {minimum?: number; maximum?: number}
155
+ ) {
152
156
  const start = this.latencyTimestamps.get(a);
153
157
  const end = this.latencyTimestamps.get(b);
154
158
 
155
- if (typeof start === 'number' && typeof end === 'number') {
156
- return end - start;
159
+ if (typeof start !== 'number' || typeof end !== 'number') {
160
+ return undefined;
157
161
  }
158
162
 
159
- return undefined;
163
+ const diff = end - start;
164
+
165
+ if (!clampValues) {
166
+ return diff;
167
+ }
168
+
169
+ const {minimum = 0, maximum} = clampValues;
170
+
171
+ return Math.min(maximum ?? Infinity, Math.max(diff, minimum));
160
172
  }
161
173
 
162
174
  /**
@@ -172,7 +184,8 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
172
184
  public getMeetingInfoReqResp() {
173
185
  return this.getDiffBetweenTimestamps(
174
186
  'internal.client.meetinginfo.request',
175
- 'internal.client.meetinginfo.response'
187
+ 'internal.client.meetinginfo.response',
188
+ {maximum: 1200000}
176
189
  );
177
190
  }
178
191
 
@@ -215,7 +228,8 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
215
228
  public getCallInitJoinReq() {
216
229
  return this.getDiffBetweenTimestamps(
217
230
  'internal.client.interstitial-window.click.joinbutton',
218
- 'client.locus.join.request'
231
+ 'client.locus.join.request',
232
+ {maximum: 1200000}
219
233
  );
220
234
  }
221
235
 
@@ -224,7 +238,11 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
224
238
  * @returns - latency
225
239
  */
226
240
  public getJoinReqResp() {
227
- return this.getDiffBetweenTimestamps('client.locus.join.request', 'client.locus.join.response');
241
+ return this.getDiffBetweenTimestamps(
242
+ 'client.locus.join.request',
243
+ 'client.locus.join.response',
244
+ {maximum: 1200000}
245
+ );
228
246
  }
229
247
 
230
248
  /**
@@ -245,7 +263,8 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
245
263
  public getLocalSDPGenRemoteSDPRecv() {
246
264
  return this.getDiffBetweenTimestamps(
247
265
  'client.media-engine.local-sdp-generated',
248
- 'client.media-engine.remote-sdp-received'
266
+ 'client.media-engine.remote-sdp-received',
267
+ {maximum: 1200000}
249
268
  );
250
269
  }
251
270
 
@@ -254,7 +273,7 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
254
273
  * @returns - latency
255
274
  */
256
275
  public getICESetupTime() {
257
- return this.getDiffBetweenTimestamps('client.ice.start', 'client.ice.end');
276
+ return this.getDiffBetweenTimestamps('client.ice.start', 'client.ice.end', {maximum: 1200000});
258
277
  }
259
278
 
260
279
  /**
@@ -378,7 +397,8 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
378
397
  public getCallInitMediaEngineReady() {
379
398
  return this.getDiffBetweenTimestamps(
380
399
  'internal.client.interstitial-window.click.joinbutton',
381
- 'client.media-engine.ready'
400
+ 'client.media-engine.ready',
401
+ {maximum: 1200000}
382
402
  );
383
403
  }
384
404
 
@@ -398,7 +418,9 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
398
418
  const lobbyTime = typeof lobbyTimeLatency === 'number' ? lobbyTimeLatency : 0;
399
419
 
400
420
  if (interstitialJoinClickTimestamp && connectedMedia) {
401
- return connectedMedia - interstitialJoinClickTimestamp - lobbyTime;
421
+ const interstitialToMediaOKJmt = connectedMedia - interstitialJoinClickTimestamp - lobbyTime;
422
+
423
+ return Math.max(0, interstitialToMediaOKJmt);
402
424
  }
403
425
 
404
426
  return undefined;
@@ -463,12 +485,12 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
463
485
  const lobbyTime = this.getStayLobbyTime();
464
486
 
465
487
  if (clickToInterstitial && interstitialToJoinOk && joinConfJMT) {
466
- const totalMediaJMT = clickToInterstitial + interstitialToJoinOk + joinConfJMT;
488
+ const totalMediaJMT = Math.max(0, clickToInterstitial + interstitialToJoinOk + joinConfJMT);
467
489
  if (this.getMeeting()?.allowMediaInLobby) {
468
490
  return totalMediaJMT;
469
491
  }
470
492
 
471
- return totalMediaJMT - lobbyTime;
493
+ return Math.max(0, totalMediaJMT - lobbyTime);
472
494
  }
473
495
 
474
496
  return undefined;
@@ -484,7 +506,7 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
484
506
  const joinConfJMT = this.getJoinConfJMT();
485
507
 
486
508
  if (clickToInterstitialWithUserDelay && interstitialToJoinOk && joinConfJMT) {
487
- return clickToInterstitialWithUserDelay + interstitialToJoinOk + joinConfJMT;
509
+ return Math.max(0, clickToInterstitialWithUserDelay + interstitialToJoinOk + joinConfJMT);
488
510
  }
489
511
 
490
512
  return undefined;
@@ -499,7 +521,7 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
499
521
  const joinConfJMT = this.getJoinConfJMT();
500
522
 
501
523
  if (typeof interstitialToJoinOk === 'number' && typeof joinConfJMT === 'number') {
502
- return interstitialToJoinOk - joinConfJMT;
524
+ return Math.max(0, interstitialToJoinOk - joinConfJMT);
503
525
  }
504
526
 
505
527
  return undefined;
@@ -544,6 +566,16 @@ export default class CallDiagnosticLatencies extends WebexPlugin {
544
566
  return this.getDiffBetweenTimestamps('client.locus.join.response', 'client.media.tx.start');
545
567
  }
546
568
 
569
+ /**
570
+ * Time from share initiation to share stop (ms).
571
+ */
572
+ public getShareDuration() {
573
+ return this.getDiffBetweenTimestamps(
574
+ 'internal.client.share.initiated',
575
+ 'internal.client.share.stopped'
576
+ );
577
+ }
578
+
547
579
  /**
548
580
  * Total latency for all exchange ci token.
549
581
  */
@@ -75,6 +75,7 @@ type GetOriginOptions = {
75
75
  browserLaunchMethod?: BrowserLaunchMethodType;
76
76
  environment?: EnvironmentType;
77
77
  newEnvironment?: NewEnvironmentType;
78
+ vendorId?: string;
78
79
  };
79
80
 
80
81
  type GetIdentifiersOptions = {
@@ -105,6 +106,8 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
105
106
  private delayedClientFeatureEvents: DelayedClientFeatureEvent[] = [];
106
107
  private eventErrorCache: WeakMap<any, any> = new WeakMap();
107
108
  private isMercuryConnected = false;
109
+ private eventLimitTracker: Map<string, number> = new Map();
110
+ private eventLimitWarningsLogged: Set<string> = new Set();
108
111
 
109
112
  // the default validator before piping an event to the batcher
110
113
  // this function can be overridden by the user
@@ -295,6 +298,10 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
295
298
  origin.clientInfo.browserLaunchMethod = options.browserLaunchMethod;
296
299
  }
297
300
 
301
+ if (options?.vendorId) {
302
+ origin.clientInfo.vendorId = options.vendorId;
303
+ }
304
+
298
305
  return origin;
299
306
  }
300
307
 
@@ -665,6 +672,144 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
665
672
  this.eventErrorCache = new WeakMap();
666
673
  }
667
674
 
675
+ /**
676
+ * Checks if an event should be limited based on criteria defined in the event dictionary.
677
+ * Returns true if the event should be sent, false if it has reached its limit.
678
+ * @param event - The diagnostic event object
679
+ * @returns boolean indicating whether the event should be sent
680
+ */
681
+ private shouldSendEvent({event}: Event): boolean {
682
+ const eventName = event?.name as string;
683
+ const correlationId = event?.identifiers?.correlationId;
684
+
685
+ if (!correlationId || correlationId === 'unknown') {
686
+ return true;
687
+ }
688
+
689
+ const limitKeyPrefix = `${eventName}:${correlationId}`;
690
+
691
+ switch (eventName) {
692
+ case 'client.media.render.start':
693
+ case 'client.media.render.stop':
694
+ case 'client.media.rx.start':
695
+ case 'client.media.rx.stop':
696
+ case 'client.media.tx.start':
697
+ case 'client.media.tx.stop': {
698
+ // Send only once per mediaType-correlationId pair (or mediaType-correlationId-shareInstanceId for share/share_audio)
699
+ const mediaType = event?.mediaType;
700
+ if (mediaType) {
701
+ if (mediaType === 'share' || mediaType === 'share_audio') {
702
+ const shareInstanceId = event?.shareInstanceId;
703
+ if (shareInstanceId) {
704
+ const limitKey = `${limitKeyPrefix}:${mediaType}:${shareInstanceId}`;
705
+
706
+ return this.checkAndIncrementEventCount(
707
+ limitKey,
708
+ 1,
709
+ `${eventName} for ${mediaType} instance ${shareInstanceId}`
710
+ );
711
+ }
712
+ } else {
713
+ const limitKey = `${limitKeyPrefix}:${mediaType}`;
714
+
715
+ return this.checkAndIncrementEventCount(
716
+ limitKey,
717
+ 1,
718
+ `${eventName} for mediaType ${mediaType}`
719
+ );
720
+ }
721
+ }
722
+ break;
723
+ }
724
+
725
+ case 'client.roap-message.received':
726
+ case 'client.roap-message.sent': {
727
+ // Send only once per correlationId and roap.messageType/roap.type
728
+ const roapMessageType = event?.roap?.messageType || event?.roap?.type;
729
+ if (roapMessageType) {
730
+ const limitKey = `${limitKeyPrefix}:${roapMessageType}`;
731
+
732
+ return this.checkAndIncrementEventCount(
733
+ limitKey,
734
+ 1,
735
+ `${eventName} for ROAP type ${roapMessageType}`
736
+ );
737
+ }
738
+ break;
739
+ }
740
+
741
+ default:
742
+ return true;
743
+ }
744
+
745
+ return true;
746
+ }
747
+
748
+ /**
749
+ * Checks the current count for a limit key and increments if under limit.
750
+ * @param limitKey - The unique key for this limit combination
751
+ * @param maxCount - Maximum allowed count
752
+ * @param eventDescription - Description for logging
753
+ * @returns true if under limit and incremented, false if at/over limit
754
+ */
755
+ private checkAndIncrementEventCount(
756
+ limitKey: string,
757
+ maxCount: number,
758
+ eventDescription: string
759
+ ): boolean {
760
+ const currentCount = this.eventLimitTracker.get(limitKey) || 0;
761
+
762
+ if (currentCount >= maxCount) {
763
+ // Log warning only once per limit key
764
+ if (!this.eventLimitWarningsLogged.has(limitKey)) {
765
+ this.logger.log(
766
+ CALL_DIAGNOSTIC_LOG_IDENTIFIER,
767
+ `CallDiagnosticMetrics: Event limit reached for ${eventDescription}. ` +
768
+ `Max count ${maxCount} exceeded. Event will not be sent.`,
769
+ `limitKey: ${limitKey}`
770
+ );
771
+ this.eventLimitWarningsLogged.add(limitKey);
772
+ }
773
+
774
+ return false;
775
+ }
776
+
777
+ // Increment count and allow event
778
+ this.eventLimitTracker.set(limitKey, currentCount + 1);
779
+
780
+ return true;
781
+ }
782
+
783
+ /**
784
+ * Clears event limit tracking
785
+ */
786
+ public clearEventLimits(): void {
787
+ this.eventLimitTracker.clear();
788
+ this.eventLimitWarningsLogged.clear();
789
+ }
790
+
791
+ /**
792
+ * Clears event limit tracking for a specific correlationId only.
793
+ * Keeps limits for other meetings intact.
794
+ */
795
+ public clearEventLimitsForCorrelationId(correlationId: string): void {
796
+ if (!correlationId) {
797
+ return;
798
+ }
799
+ // Keys are formatted as "eventName:correlationId:..." across all limiters.
800
+ const hasCorrIdAtSecondToken = (key: string) => key.split(':')[1] === correlationId;
801
+ for (const key of Array.from(this.eventLimitTracker.keys())) {
802
+ if (hasCorrIdAtSecondToken(key)) {
803
+ this.eventLimitTracker.delete(key);
804
+ }
805
+ }
806
+ for (const key of Array.from(this.eventLimitWarningsLogged.values())) {
807
+ if (hasCorrIdAtSecondToken(key)) {
808
+ this.eventLimitWarningsLogged.delete(key);
809
+ }
810
+ }
811
+ }
812
+
668
813
  /**
669
814
  * Generate error payload for Client Event
670
815
  * @param rawError
@@ -1099,6 +1244,10 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
1099
1244
  );
1100
1245
  const diagnosticEvent = this.prepareClientEvent({name, payload, options});
1101
1246
 
1247
+ if (!this.shouldSendEvent(diagnosticEvent)) {
1248
+ return Promise.resolve();
1249
+ }
1250
+
1102
1251
  if (options?.preLoginId) {
1103
1252
  return this.submitToCallDiagnosticsPreLogin(diagnosticEvent, options?.preLoginId);
1104
1253
  }
@@ -239,6 +239,20 @@ export const prepareDiagnosticMetricItem = (webex: any, item: any) => {
239
239
 
240
240
  // Set upgradeChannel to 'gold' if buildType is 'prod', otherwise to the buildType value
241
241
  const upgradeChannel = buildType === 'prod' ? 'gold' : buildType;
242
+ if (webex.devicemanager) {
243
+ const pairedDevice = webex.devicemanager.getPairedDevice();
244
+ if (pairedDevice) {
245
+ const devicePayload = {
246
+ deviceId: pairedDevice.deviceInfo?.id,
247
+ devicePairingType: webex.devicemanager.getPairedMethod(),
248
+ deviceURL: pairedDevice.url,
249
+ isPersonalDevice: pairedDevice.mode === 'personal',
250
+ productName: pairedDevice.devices[0]?.productName,
251
+ };
252
+ item.eventPayload.event.pairingState = 'paired';
253
+ item.eventPayload.event.pairedDevice = devicePayload;
254
+ }
255
+ }
242
256
 
243
257
  const origin: Partial<Event['origin']> = {
244
258
  buildType,