@webex/internal-plugin-metrics 3.0.0-beta.163 → 3.0.0-beta.164
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/metrics.js +1 -1
- package/dist/types/batcher.d.ts +2 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics-batcher.d.ts +2 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics-latencies.d.ts +149 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +324 -0
- package/dist/types/call-diagnostic/call-diagnostic-metrics.util.d.ts +31 -0
- package/dist/types/call-diagnostic/config.d.ts +57 -0
- package/dist/types/call-diagnostic/generated-types-temp/ClientEvent.d.ts +1112 -0
- package/dist/types/call-diagnostic/generated-types-temp/Event.d.ts +4851 -0
- package/dist/types/call-diagnostic/generated-types-temp/MediaQualityEvent.d.ts +2121 -0
- package/dist/types/client-metrics-batcher.d.ts +2 -0
- package/dist/types/config.d.ts +35 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/metrics.d.ts +3 -0
- package/dist/types/metrics.types.d.ts +89 -0
- package/dist/types/new-metrics.d.ts +83 -0
- package/package.json +8 -8
package/dist/metrics.js
CHANGED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { MetricEventNames } from '../metrics.types';
|
|
2
|
+
/**
|
|
3
|
+
* @description Helper class to store latencies timestamp and to calculate various latencies for CA.
|
|
4
|
+
* @exports
|
|
5
|
+
* @class CallDiagnosticLatencies
|
|
6
|
+
*/
|
|
7
|
+
export default class CallDiagnosticLatencies {
|
|
8
|
+
latencyTimestamps: Map<MetricEventNames, number>;
|
|
9
|
+
/**
|
|
10
|
+
* @constructor
|
|
11
|
+
*/
|
|
12
|
+
constructor();
|
|
13
|
+
/**
|
|
14
|
+
* Clear timestamps
|
|
15
|
+
*/
|
|
16
|
+
clearTimestamps(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Store timestamp value
|
|
19
|
+
* @param key - key
|
|
20
|
+
* @param value -value
|
|
21
|
+
* @throws
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
saveTimestamp(key: MetricEventNames, value?: number): void;
|
|
25
|
+
/**
|
|
26
|
+
* Helper to calculate end - start
|
|
27
|
+
* @param a start
|
|
28
|
+
* @param b end
|
|
29
|
+
* @returns latency
|
|
30
|
+
*/
|
|
31
|
+
getDiffBetweenTimestamps(a: MetricEventNames, b: MetricEventNames): number;
|
|
32
|
+
/**
|
|
33
|
+
* Meeting Info Request
|
|
34
|
+
* @note Meeting Info request happen not just in the join phase. CA requires
|
|
35
|
+
* metrics around meeting info request that are only part of join phase.
|
|
36
|
+
* This internal.* event is used to track the real timestamps
|
|
37
|
+
* (when the actual request/response happen). This is because the actual CA event is
|
|
38
|
+
* sent inside the join method on the meeting object based on some logic, but that's not exactly when
|
|
39
|
+
* those events are actually fired. The logic only confirms that they have happened, and we send them over.
|
|
40
|
+
* @returns - latency
|
|
41
|
+
*/
|
|
42
|
+
getMeetingInfoReqResp(): number;
|
|
43
|
+
/**
|
|
44
|
+
* Interstitial Time
|
|
45
|
+
* @returns - latency
|
|
46
|
+
*/
|
|
47
|
+
getShowInterstitialTime(): number;
|
|
48
|
+
/**
|
|
49
|
+
* Call Init Join Request
|
|
50
|
+
* @returns - latency
|
|
51
|
+
*/
|
|
52
|
+
getCallInitJoinReq(): number;
|
|
53
|
+
/**
|
|
54
|
+
* Locus Join Request
|
|
55
|
+
* @returns - latency
|
|
56
|
+
*/
|
|
57
|
+
getJoinReqResp(): number;
|
|
58
|
+
/**
|
|
59
|
+
* Locus Join Response Sent Received
|
|
60
|
+
* @returns - latency
|
|
61
|
+
*/
|
|
62
|
+
getJoinRespSentReceived(): any;
|
|
63
|
+
/**
|
|
64
|
+
* Local SDP Generated Remote SDP REceived
|
|
65
|
+
* @returns - latency
|
|
66
|
+
*/
|
|
67
|
+
getLocalSDPGenRemoteSDPRecv(): number;
|
|
68
|
+
/**
|
|
69
|
+
* ICE Setup Time
|
|
70
|
+
* @returns - latency
|
|
71
|
+
*/
|
|
72
|
+
getICESetupTime(): number;
|
|
73
|
+
/**
|
|
74
|
+
* Audio ICE time
|
|
75
|
+
* @returns - latency
|
|
76
|
+
*/
|
|
77
|
+
getAudioICESetupTime(): number;
|
|
78
|
+
/**
|
|
79
|
+
* Video ICE Time
|
|
80
|
+
* @returns - latency
|
|
81
|
+
*/
|
|
82
|
+
getVideoICESetupTime(): number;
|
|
83
|
+
/**
|
|
84
|
+
* Share ICE Time
|
|
85
|
+
* @returns - latency
|
|
86
|
+
*/
|
|
87
|
+
getShareICESetupTime(): number;
|
|
88
|
+
/**
|
|
89
|
+
* Stay Lobby Time
|
|
90
|
+
* @returns - latency
|
|
91
|
+
*/
|
|
92
|
+
getStayLobbyTime(): number;
|
|
93
|
+
/**
|
|
94
|
+
* Page JMT
|
|
95
|
+
* @returns - latency
|
|
96
|
+
*/
|
|
97
|
+
getPageJMT(): number;
|
|
98
|
+
/**
|
|
99
|
+
* Click To Interstitial
|
|
100
|
+
* @returns - latency
|
|
101
|
+
*/
|
|
102
|
+
getClickToInterstitial(): number;
|
|
103
|
+
/**
|
|
104
|
+
* Interstitial To Join Ok
|
|
105
|
+
* @returns - latency
|
|
106
|
+
*/
|
|
107
|
+
getInterstitialToJoinOK(): number;
|
|
108
|
+
/**
|
|
109
|
+
* Interstitial To Media Ok
|
|
110
|
+
* @returns - latency
|
|
111
|
+
*/
|
|
112
|
+
getInterstitialToMediaOK(): number;
|
|
113
|
+
/**
|
|
114
|
+
* Total JMT
|
|
115
|
+
* @returns - latency
|
|
116
|
+
*/
|
|
117
|
+
getTotalJMT(): number;
|
|
118
|
+
/**
|
|
119
|
+
* Join Conf JMT
|
|
120
|
+
* @returns - latency
|
|
121
|
+
*/
|
|
122
|
+
getJoinConfJMT(): number;
|
|
123
|
+
/**
|
|
124
|
+
* Total Media JMT
|
|
125
|
+
* @returns - latency
|
|
126
|
+
*/
|
|
127
|
+
getTotalMediaJMT(): number;
|
|
128
|
+
/**
|
|
129
|
+
* Client JMT
|
|
130
|
+
* @returns - latency
|
|
131
|
+
*/
|
|
132
|
+
getClientJMT(): number;
|
|
133
|
+
/**
|
|
134
|
+
* Audio setup delay receive
|
|
135
|
+
*/
|
|
136
|
+
getAudioJoinRespRxStart(): number;
|
|
137
|
+
/**
|
|
138
|
+
* Video setup delay receive
|
|
139
|
+
*/
|
|
140
|
+
getVideoJoinRespRxStart(): number;
|
|
141
|
+
/**
|
|
142
|
+
* Audio setup delay transmit
|
|
143
|
+
*/
|
|
144
|
+
getAudioJoinRespTxStart(): number;
|
|
145
|
+
/**
|
|
146
|
+
* Video setup delay transmit
|
|
147
|
+
*/
|
|
148
|
+
getVideoJoinRespTxStart(): number;
|
|
149
|
+
}
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { StatelessWebexPlugin } from '@webex/webex-core';
|
|
2
|
+
import { Event, ClientType, SubClientType, NetworkType, ClientEvent, SubmitClientEventOptions, MediaQualityEvent, SubmitMQEOptions, SubmitMQEPayload, ClientEventError, ClientEventPayload } from '../metrics.types';
|
|
3
|
+
type GetOriginOptions = {
|
|
4
|
+
clientType: ClientType;
|
|
5
|
+
subClientType: SubClientType;
|
|
6
|
+
networkType?: NetworkType;
|
|
7
|
+
};
|
|
8
|
+
type GetIdentifiersOptions = {
|
|
9
|
+
meeting?: any;
|
|
10
|
+
mediaConnections?: any[];
|
|
11
|
+
correlationId?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @description Util class to handle Call Analyzer Metrics
|
|
15
|
+
* @export
|
|
16
|
+
* @class CallDiagnosticMetrics
|
|
17
|
+
*/
|
|
18
|
+
export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
|
|
19
|
+
private callDiagnosticEventsBatcher;
|
|
20
|
+
/**
|
|
21
|
+
* Constructor
|
|
22
|
+
* @param args
|
|
23
|
+
*/
|
|
24
|
+
constructor(...args: any[]);
|
|
25
|
+
/**
|
|
26
|
+
* Returns the login type of the current user
|
|
27
|
+
* @returns one of 'login-ci','unverified-guest', null
|
|
28
|
+
*/
|
|
29
|
+
getCurLoginType(): "login-ci" | "unverified-guest";
|
|
30
|
+
/**
|
|
31
|
+
* Get origin object for Call Diagnostic Event payload.
|
|
32
|
+
* @param options
|
|
33
|
+
* @param meetingId
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
getOrigin(options: GetOriginOptions, meetingId?: string): {
|
|
37
|
+
name: "antares" | "beech" | "breakout" | "cb" | "cloudproxy" | "edonus" | "endpoint" | "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";
|
|
38
|
+
userAgent: string;
|
|
39
|
+
buildType?: "debug" | "test" | "prod" | "tap" | "analyzer-test";
|
|
40
|
+
upgradeChannel?: string;
|
|
41
|
+
instanceId?: string;
|
|
42
|
+
networkType: "unknown" | "wifi" | "ethernet" | "cellular";
|
|
43
|
+
localIP?: string;
|
|
44
|
+
usingProxy?: boolean;
|
|
45
|
+
mediaEngineSoftwareVersion?: string;
|
|
46
|
+
environment?: string;
|
|
47
|
+
newEnvironment?: string;
|
|
48
|
+
clientInfo?: {
|
|
49
|
+
os: "windows" | "mac" | "ios" | "android" | "chrome" | "linux" | "other" | "uwp-arm64";
|
|
50
|
+
osVersion: string;
|
|
51
|
+
localIP?: string;
|
|
52
|
+
gatewayIP?: string;
|
|
53
|
+
macAddress?: string;
|
|
54
|
+
localNetworkPrefix?: string;
|
|
55
|
+
publicNetworkPrefix?: string;
|
|
56
|
+
browserLaunchMethod?: "activex" | "npapi" | "extension" | "cwsapi" | "java" | "tfs" | "webacd" | "url-handler" | "thinclient";
|
|
57
|
+
clientLaunchMethod?: "url-handler" | "universal-link" | "voice-command" | "notification" | "manual" | "teams-cross-launch";
|
|
58
|
+
browser?: string;
|
|
59
|
+
browserVersion?: string;
|
|
60
|
+
clientType?: "SIP" | "MEETING_CENTER" | "EVENT_CENTER" | "TRAINING_CENTER" | "TEAMS_CLIENT" | "TEAMS_DEVICE" | "TEAMS_SHARE" | "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";
|
|
61
|
+
subClientType?: "DESKTOP_APP" | "DESKTOP_APP_VDI" | "DEVICE_CURRENT" | "DEVICE_LEGACY_2020" | "HVDI_APP" | "MOBILE_APP" | "VDI_APP" | "WEB_APP" | "MOBILE_NETWORK" | "HOLOGRAM_HEADSET_APP";
|
|
62
|
+
clientVersion?: string;
|
|
63
|
+
localClientVersion?: string;
|
|
64
|
+
modelNumber?: string;
|
|
65
|
+
joinFirstUpdateLater?: "ep-enabled" | "sp-enabled" | "not-enabled";
|
|
66
|
+
standbyUsed?: boolean;
|
|
67
|
+
prefetchDocShowUsed?: boolean;
|
|
68
|
+
fastJoinUsed?: boolean;
|
|
69
|
+
clientDownloadSize?: number;
|
|
70
|
+
clientDownloadFileCount?: number;
|
|
71
|
+
nodeId?: number;
|
|
72
|
+
machineInfo?: string;
|
|
73
|
+
parentAppName?: string;
|
|
74
|
+
parentAppInPermitList?: boolean;
|
|
75
|
+
meetingSiteType?: "train" | "webex-11" | "orion";
|
|
76
|
+
CDNEnabled?: boolean;
|
|
77
|
+
clientMajorVersion?: string;
|
|
78
|
+
majorVersion?: number;
|
|
79
|
+
minorVersion?: number;
|
|
80
|
+
revision?: number;
|
|
81
|
+
isValidClientVersion?: boolean;
|
|
82
|
+
cpuInfo?: {
|
|
83
|
+
description: string;
|
|
84
|
+
clockSpeedGigaHertz: number;
|
|
85
|
+
numberOfCores: number;
|
|
86
|
+
architecture: "unknown" | "intel32" | "intel64" | "amd32" | "amd64" | "arm32" | "arm64";
|
|
87
|
+
staticPerformance?: string;
|
|
88
|
+
};
|
|
89
|
+
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";
|
|
90
|
+
videoDisplayMode?: "grid-view" | "active-speaker-view";
|
|
91
|
+
videoLayoutType?: "stack" | "stackWithShare" | "sideBySide" | "sideBySideWithShare" | "grid" | "floatingActive" | "floatingThumbnail" | "floatingGrid" | "overlay" | "focus" | "prominent" | "focusWithShare" | "prominentWithShare" | "equal" | "equalWithShare";
|
|
92
|
+
videoRenderType?: "wme" | "client_d3d" | "client_gdi";
|
|
93
|
+
vdiInfo?: unknown;
|
|
94
|
+
is64BitsClient?: boolean;
|
|
95
|
+
webexAppVersion?: string;
|
|
96
|
+
launch32BitsReason?: "forcewin32" | "disablewin64" | "platform_win32" | "platform_arm" | "platform_unknown" | "version_below_41.11";
|
|
97
|
+
inMeetingUpdate?: boolean;
|
|
98
|
+
mtaVersion?: string;
|
|
99
|
+
isWarholOpening?: boolean;
|
|
100
|
+
};
|
|
101
|
+
isHybridMedia?: boolean;
|
|
102
|
+
originData?: {};
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Gather identifier details for call diagnostic payload.
|
|
106
|
+
* @throws Error if initialization fails.
|
|
107
|
+
* @param options
|
|
108
|
+
*/
|
|
109
|
+
getIdentifiers(options: GetIdentifiersOptions): {
|
|
110
|
+
attendeeId?: string;
|
|
111
|
+
breakoutGroupId?: string;
|
|
112
|
+
breakoutMoveId?: string;
|
|
113
|
+
breakoutSessionId?: string;
|
|
114
|
+
confluenceId?: string;
|
|
115
|
+
cpaasIdentifiers?: {
|
|
116
|
+
imiTenantId: string;
|
|
117
|
+
devClientId: string;
|
|
118
|
+
imiServiceId: string;
|
|
119
|
+
imiAppId: string;
|
|
120
|
+
sessionId: string;
|
|
121
|
+
sessionInstanceId: string;
|
|
122
|
+
};
|
|
123
|
+
csdmDeviceUrl?: string;
|
|
124
|
+
destinationBreakoutSessionId?: string;
|
|
125
|
+
destinationLocusSessionId?: string;
|
|
126
|
+
destinationLocusUrl?: string;
|
|
127
|
+
destinationVenueId?: string;
|
|
128
|
+
deviceId?: string;
|
|
129
|
+
ivrCallId?: string;
|
|
130
|
+
ivrDialogId?: string;
|
|
131
|
+
ivrId?: string;
|
|
132
|
+
locusId?: string;
|
|
133
|
+
locusSessionId?: string;
|
|
134
|
+
locusStartTime?: string;
|
|
135
|
+
locusUrl?: string;
|
|
136
|
+
mediaAgentAlias?: string;
|
|
137
|
+
mediaAgentGroupId?: string;
|
|
138
|
+
meetClusterName?: string;
|
|
139
|
+
meetingLookupUrl?: string;
|
|
140
|
+
meetingOrgId?: string;
|
|
141
|
+
msteamsTenantGuid?: string;
|
|
142
|
+
msteamsConferenceId?: string;
|
|
143
|
+
oauth2ClientId?: string;
|
|
144
|
+
orgId?: string;
|
|
145
|
+
roomId?: string;
|
|
146
|
+
sipCallId?: string;
|
|
147
|
+
sipSessionId?: {
|
|
148
|
+
local?: string;
|
|
149
|
+
remote?: string;
|
|
150
|
+
};
|
|
151
|
+
sipUri?: string;
|
|
152
|
+
subConfId?: string;
|
|
153
|
+
tenantId?: string;
|
|
154
|
+
trackingId?: string;
|
|
155
|
+
userId?: string;
|
|
156
|
+
venueId?: string;
|
|
157
|
+
venueUrl?: string;
|
|
158
|
+
whiteboardUrl?: string;
|
|
159
|
+
webexConferenceId?: number;
|
|
160
|
+
webexClusterName?: string;
|
|
161
|
+
webexConferenceIdStr?: string;
|
|
162
|
+
webexDataCenter?: string;
|
|
163
|
+
webexGuestId?: number;
|
|
164
|
+
webexMeetingId?: number;
|
|
165
|
+
webexNodeId?: number;
|
|
166
|
+
webexSiteId?: number;
|
|
167
|
+
webexSiteName?: string;
|
|
168
|
+
webexUserId?: number;
|
|
169
|
+
webexWebDomain?: string;
|
|
170
|
+
correlationId: string;
|
|
171
|
+
} | {
|
|
172
|
+
attendeeId?: string;
|
|
173
|
+
breakoutGroupId?: string;
|
|
174
|
+
breakoutMoveId?: string;
|
|
175
|
+
breakoutSessionId?: string;
|
|
176
|
+
confluenceId?: string;
|
|
177
|
+
cpaasIdentifiers?: {
|
|
178
|
+
imiTenantId: string;
|
|
179
|
+
devClientId: string;
|
|
180
|
+
imiServiceId: string;
|
|
181
|
+
imiAppId: string;
|
|
182
|
+
sessionId: string;
|
|
183
|
+
sessionInstanceId: string;
|
|
184
|
+
};
|
|
185
|
+
csdmDeviceUrl?: string;
|
|
186
|
+
destinationBreakoutSessionId?: string;
|
|
187
|
+
destinationLocusSessionId?: string;
|
|
188
|
+
destinationLocusUrl?: string;
|
|
189
|
+
destinationVenueId?: string;
|
|
190
|
+
deviceId?: string;
|
|
191
|
+
ivrCallId?: string;
|
|
192
|
+
ivrDialogId?: string;
|
|
193
|
+
ivrId?: string;
|
|
194
|
+
locusId?: string;
|
|
195
|
+
locusSessionId?: string;
|
|
196
|
+
locusStartTime?: string;
|
|
197
|
+
locusUrl?: string;
|
|
198
|
+
mediaAgentAlias?: string;
|
|
199
|
+
mediaAgentGroupId?: string;
|
|
200
|
+
meetClusterName?: string;
|
|
201
|
+
meetingLookupUrl?: string;
|
|
202
|
+
meetingOrgId?: string;
|
|
203
|
+
msteamsTenantGuid?: string;
|
|
204
|
+
msteamsConferenceId?: string;
|
|
205
|
+
oauth2ClientId?: string;
|
|
206
|
+
orgId?: string;
|
|
207
|
+
provisionalCorrelationId?: string;
|
|
208
|
+
roomId?: string;
|
|
209
|
+
sipCallId?: string;
|
|
210
|
+
sipSessionId?: {
|
|
211
|
+
local?: string;
|
|
212
|
+
remote?: string;
|
|
213
|
+
};
|
|
214
|
+
sipUri?: string;
|
|
215
|
+
subConfId?: string;
|
|
216
|
+
tenantId?: string;
|
|
217
|
+
trackingId?: string;
|
|
218
|
+
userId?: string;
|
|
219
|
+
venueId?: string;
|
|
220
|
+
venueUrl?: string;
|
|
221
|
+
whiteboardUrl?: string;
|
|
222
|
+
webexConferenceId?: number;
|
|
223
|
+
webexClusterName?: string;
|
|
224
|
+
webexConferenceIdStr?: string;
|
|
225
|
+
webexDataCenter?: string;
|
|
226
|
+
webexGuestId?: number;
|
|
227
|
+
webexMeetingId?: number;
|
|
228
|
+
webexNodeId?: number;
|
|
229
|
+
webexSiteId?: number;
|
|
230
|
+
webexSiteName?: string;
|
|
231
|
+
webexUserId?: number;
|
|
232
|
+
webexWebDomain?: string;
|
|
233
|
+
correlationId: string;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Create diagnostic event, which can hold client event, feature event or MQE event data.
|
|
237
|
+
* This just initiates the shared properties that are required for all the 3 event categories.
|
|
238
|
+
* @param eventData
|
|
239
|
+
* @param options
|
|
240
|
+
* @returns
|
|
241
|
+
*/
|
|
242
|
+
prepareDiagnosticEvent(eventData: Event['event'], options: any): Event;
|
|
243
|
+
/**
|
|
244
|
+
* TODO: NOT IMPLEMENTED
|
|
245
|
+
* Submit Feature Event
|
|
246
|
+
* @returns
|
|
247
|
+
*/
|
|
248
|
+
submitFeatureEvent(): void;
|
|
249
|
+
/**
|
|
250
|
+
* Submit Media Quality Event
|
|
251
|
+
* @param args - submit params
|
|
252
|
+
* @param arg.name - event key
|
|
253
|
+
* @param arg.payload - additional payload to be merge with the default payload
|
|
254
|
+
* @param arg.options - options
|
|
255
|
+
*/
|
|
256
|
+
submitMQE({ name, payload, options, }: {
|
|
257
|
+
name: MediaQualityEvent['name'];
|
|
258
|
+
payload: SubmitMQEPayload;
|
|
259
|
+
options: SubmitMQEOptions;
|
|
260
|
+
}): void;
|
|
261
|
+
/**
|
|
262
|
+
* Return Client Event payload by client error code
|
|
263
|
+
* @param arg - get error arg
|
|
264
|
+
* @param arg.clientErrorCode
|
|
265
|
+
* @param arg.serviceErrorCode
|
|
266
|
+
* @returns
|
|
267
|
+
*/
|
|
268
|
+
getErrorPayloadForClientErrorCode({ clientErrorCode, serviceErrorCode, }: {
|
|
269
|
+
clientErrorCode: number;
|
|
270
|
+
serviceErrorCode: any;
|
|
271
|
+
}): ClientEventError;
|
|
272
|
+
/**
|
|
273
|
+
* Generate error payload for Client Event
|
|
274
|
+
* @param rawError
|
|
275
|
+
*/
|
|
276
|
+
generateClientEventErrorPayload(rawError: any): {
|
|
277
|
+
fatal: boolean;
|
|
278
|
+
category: "other" | "signaling" | "media" | "expected";
|
|
279
|
+
errorDescription?: string;
|
|
280
|
+
errorCode?: number;
|
|
281
|
+
errorCodeStr?: string;
|
|
282
|
+
httpCode?: number;
|
|
283
|
+
errorData?: {};
|
|
284
|
+
shownToUser: boolean;
|
|
285
|
+
serviceErrorCode?: number;
|
|
286
|
+
name: "other" | "media-engine" | "ice.failed" | "locus.response" | "locus.leave" | "client.leave" | "media-device" | "media-sca";
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Create client event object for in meeting events
|
|
290
|
+
* @param arg - create args
|
|
291
|
+
* @param arg.event - event key
|
|
292
|
+
* @param arg.options - options
|
|
293
|
+
* @returns object
|
|
294
|
+
*/
|
|
295
|
+
private createClientEventObjectInMeeting;
|
|
296
|
+
/**
|
|
297
|
+
* Create client event object for pre meeting events
|
|
298
|
+
* @param arg - create args
|
|
299
|
+
* @param arg.event - event key
|
|
300
|
+
* @param arg.options - payload
|
|
301
|
+
* @returns object
|
|
302
|
+
*/
|
|
303
|
+
private createClientEventObjectPreMeeting;
|
|
304
|
+
/**
|
|
305
|
+
* Submit Client Event CA event.
|
|
306
|
+
* @param arg - submit params
|
|
307
|
+
* @param arg.event - event key
|
|
308
|
+
* @param arg.payload - additional payload to be merged with default payload
|
|
309
|
+
* @param arg.options - payload
|
|
310
|
+
* @throws
|
|
311
|
+
*/
|
|
312
|
+
submitClientEvent({ name, payload, options, }: {
|
|
313
|
+
name: ClientEvent['name'];
|
|
314
|
+
payload?: ClientEventPayload;
|
|
315
|
+
options: SubmitClientEventOptions;
|
|
316
|
+
}): void;
|
|
317
|
+
/**
|
|
318
|
+
* Prepare the event and send the request to metrics-a service.
|
|
319
|
+
* @param event
|
|
320
|
+
* @returns promise
|
|
321
|
+
*/
|
|
322
|
+
submitToCallDiagnostics(event: Event): Promise<void>;
|
|
323
|
+
}
|
|
324
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const anonymizeIPAddress: (localIp: any) => string;
|
|
2
|
+
/**
|
|
3
|
+
* Returns a formated string of the user agent.
|
|
4
|
+
*
|
|
5
|
+
* @returns {string} formatted user agent information
|
|
6
|
+
*/
|
|
7
|
+
export declare const userAgentToString: ({ clientName, webexVersion }: {
|
|
8
|
+
clientName: any;
|
|
9
|
+
webexVersion: any;
|
|
10
|
+
}) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Iterates object recursively and removes any
|
|
13
|
+
* property that returns isEmpty for it's associated value
|
|
14
|
+
* isEmpty = implementation from Lodash.
|
|
15
|
+
*
|
|
16
|
+
* It modifies the object in place (mutable)
|
|
17
|
+
*
|
|
18
|
+
* @param obj - input
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare const clearEmptyKeysRecursively: (obj: any) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Locus error codes start with 2. The next three digits are the
|
|
24
|
+
* HTTP status code related to the error code (like 400, 403, 502, etc.)
|
|
25
|
+
* The remaining three digits are just an increasing integer.
|
|
26
|
+
* If it is 7 digits and starts with a 2, it is locus.
|
|
27
|
+
*
|
|
28
|
+
* @param errorCode
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
export declare const isLocusServiceErrorCode: (errorCode: string | number) => boolean;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ClientEventError } from '../metrics.types';
|
|
2
|
+
export declare const NEW_LOCUS_ERROR_CLIENT_CODE = 4008;
|
|
3
|
+
export declare const MEETING_INFO_LOOKUP_ERROR_CLIENT_CODE = 4100;
|
|
4
|
+
export declare const ICE_FAILURE_CLIENT_CODE = 2004;
|
|
5
|
+
export declare const SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP: {
|
|
6
|
+
58400: number;
|
|
7
|
+
99002: number;
|
|
8
|
+
99009: number;
|
|
9
|
+
403040: number;
|
|
10
|
+
403041: number;
|
|
11
|
+
403038: number;
|
|
12
|
+
403036: number;
|
|
13
|
+
403043: number;
|
|
14
|
+
403048: number;
|
|
15
|
+
403049: number;
|
|
16
|
+
403100: number;
|
|
17
|
+
403101: number;
|
|
18
|
+
403102: number;
|
|
19
|
+
403103: number;
|
|
20
|
+
403104: number;
|
|
21
|
+
404001: number;
|
|
22
|
+
404006: number;
|
|
23
|
+
429005: number;
|
|
24
|
+
2403001: number;
|
|
25
|
+
2403002: number;
|
|
26
|
+
2403003: number;
|
|
27
|
+
2403004: number;
|
|
28
|
+
2403018: number;
|
|
29
|
+
2403019: number;
|
|
30
|
+
2423003: number;
|
|
31
|
+
2423004: number;
|
|
32
|
+
2423005: number;
|
|
33
|
+
2423007: number;
|
|
34
|
+
2403010: number;
|
|
35
|
+
2403014: number;
|
|
36
|
+
2403015: number;
|
|
37
|
+
2423010: number;
|
|
38
|
+
2400008: number;
|
|
39
|
+
2400011: number;
|
|
40
|
+
2400012: number;
|
|
41
|
+
2403007: number;
|
|
42
|
+
2401002: number;
|
|
43
|
+
2404002: number;
|
|
44
|
+
2400009: number;
|
|
45
|
+
2400025: number;
|
|
46
|
+
2423009: number;
|
|
47
|
+
2403022: number;
|
|
48
|
+
2423008: number;
|
|
49
|
+
2400006: number;
|
|
50
|
+
2400014: number;
|
|
51
|
+
2404001: number;
|
|
52
|
+
2403025: number;
|
|
53
|
+
2405001: number;
|
|
54
|
+
2409005: number;
|
|
55
|
+
};
|
|
56
|
+
export declare const CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD: Record<number, Partial<ClientEventError>>;
|
|
57
|
+
export declare const CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND = "js_sdk_call_diagnostic_event_failed_to_send";
|