@microsoft/1ds-core-js 3.2.10 → 4.0.0

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 (95) hide show
  1. package/README.md +1 -1
  2. package/bundle/es5/ms.core-4.0.0.gbl.js +6221 -0
  3. package/bundle/es5/ms.core-4.0.0.gbl.js.map +1 -0
  4. package/bundle/es5/ms.core-4.0.0.gbl.min.js +7 -0
  5. package/bundle/es5/ms.core-4.0.0.gbl.min.js.map +1 -0
  6. package/bundle/es5/ms.core-4.0.0.integrity.json +46 -0
  7. package/bundle/es5/ms.core-4.0.0.js +6225 -0
  8. package/bundle/es5/ms.core-4.0.0.js.map +1 -0
  9. package/bundle/es5/ms.core-4.0.0.min.js +7 -0
  10. package/bundle/es5/ms.core-4.0.0.min.js.map +1 -0
  11. package/bundle/es5/ms.core.gbl.js +6221 -0
  12. package/bundle/es5/ms.core.gbl.js.map +1 -0
  13. package/bundle/es5/ms.core.gbl.min.js +7 -0
  14. package/bundle/es5/ms.core.gbl.min.js.map +1 -0
  15. package/bundle/es5/ms.core.integrity.json +46 -0
  16. package/bundle/es5/ms.core.js +6225 -0
  17. package/bundle/es5/ms.core.js.map +1 -0
  18. package/bundle/es5/ms.core.min.js +7 -0
  19. package/bundle/es5/ms.core.min.js.map +1 -0
  20. package/{bundle → dist/es5}/ms.core.js +3798 -2954
  21. package/dist/es5/ms.core.js.map +1 -0
  22. package/dist/es5/ms.core.min.js +7 -0
  23. package/dist/es5/ms.core.min.js.map +1 -0
  24. package/dist-es5/AppInsightsCore.js +91 -0
  25. package/dist-es5/AppInsightsCore.js.map +1 -0
  26. package/{dist-esm/src → dist-es5}/BaseCore.js +18 -11
  27. package/dist-es5/BaseCore.js.map +1 -0
  28. package/{dist-esm/src → dist-es5}/DataModels.js +1 -1
  29. package/{dist-esm/src → dist-es5}/Enums.js +3 -26
  30. package/dist-es5/Enums.js.map +1 -0
  31. package/{dist-esm/src → dist-es5}/Index.js +9 -14
  32. package/dist-es5/Index.js.map +1 -0
  33. package/{dist-esm/src → dist-es5}/InternalConstants.js +1 -3
  34. package/{dist-esm/src → dist-es5}/InternalConstants.js.map +1 -1
  35. package/{dist-esm/src → dist-es5}/Utils.js +19 -144
  36. package/dist-es5/Utils.js.map +1 -0
  37. package/{dist-esm/src → dist-es5}/ValueSanitizer.js +39 -3
  38. package/dist-es5/ValueSanitizer.js.map +1 -0
  39. package/package.json +18 -10
  40. package/tsconfig.json +5 -3
  41. package/types/1ds-core-js.d.ts +1106 -0
  42. package/types/1ds-core-js.namespaced.d.ts +1102 -0
  43. package/bundle/ms.core-3.2.10.gbl.js +0 -5357
  44. package/bundle/ms.core-3.2.10.gbl.js.map +0 -1
  45. package/bundle/ms.core-3.2.10.gbl.min.js +0 -7
  46. package/bundle/ms.core-3.2.10.gbl.min.js.map +0 -1
  47. package/bundle/ms.core-3.2.10.integrity.json +0 -46
  48. package/bundle/ms.core-3.2.10.js +0 -5360
  49. package/bundle/ms.core-3.2.10.js.map +0 -1
  50. package/bundle/ms.core-3.2.10.min.js +0 -7
  51. package/bundle/ms.core-3.2.10.min.js.map +0 -1
  52. package/bundle/ms.core.gbl.js +0 -5357
  53. package/bundle/ms.core.gbl.js.map +0 -1
  54. package/bundle/ms.core.gbl.min.js +0 -7
  55. package/bundle/ms.core.gbl.min.js.map +0 -1
  56. package/bundle/ms.core.integrity.json +0 -46
  57. package/bundle/ms.core.js.map +0 -1
  58. package/bundle/ms.core.min.js +0 -7
  59. package/bundle/ms.core.min.js.map +0 -1
  60. package/dist/ms.core.js +0 -1305
  61. package/dist/ms.core.js.map +0 -1
  62. package/dist/ms.core.min.js +0 -7
  63. package/dist/ms.core.min.js.map +0 -1
  64. package/dist-esm/src/AppInsightsCore.d.ts +0 -15
  65. package/dist-esm/src/AppInsightsCore.js +0 -114
  66. package/dist-esm/src/AppInsightsCore.js.map +0 -1
  67. package/dist-esm/src/BaseCore.d.ts +0 -13
  68. package/dist-esm/src/BaseCore.js.map +0 -1
  69. package/dist-esm/src/DataModels.d.ts +0 -273
  70. package/dist-esm/src/ESPromise.d.ts +0 -110
  71. package/dist-esm/src/ESPromise.js +0 -286
  72. package/dist-esm/src/ESPromise.js.map +0 -1
  73. package/dist-esm/src/ESPromiseScheduler.d.ts +0 -36
  74. package/dist-esm/src/ESPromiseScheduler.js +0 -274
  75. package/dist-esm/src/ESPromiseScheduler.js.map +0 -1
  76. package/dist-esm/src/Enums.d.ts +0 -356
  77. package/dist-esm/src/Enums.js.map +0 -1
  78. package/dist-esm/src/Index.d.ts +0 -19
  79. package/dist-esm/src/Index.js.map +0 -1
  80. package/dist-esm/src/InternalConstants.d.ts +0 -6
  81. package/dist-esm/src/Utils.d.ts +0 -190
  82. package/dist-esm/src/Utils.js.map +0 -1
  83. package/dist-esm/src/ValueSanitizer.d.ts +0 -40
  84. package/dist-esm/src/ValueSanitizer.js.map +0 -1
  85. package/src/AppInsightsCore.ts +0 -135
  86. package/src/BaseCore.ts +0 -72
  87. package/src/DataModels.ts +0 -297
  88. package/src/ESPromise.ts +0 -365
  89. package/src/ESPromiseScheduler.ts +0 -328
  90. package/src/Enums.ts +0 -386
  91. package/src/Index.ts +0 -81
  92. package/src/InternalConstants.ts +0 -16
  93. package/src/Utils.ts +0 -565
  94. package/src/ValueSanitizer.ts +0 -285
  95. /package/{dist-esm/src → dist-es5}/DataModels.js.map +0 -0
@@ -0,0 +1,1102 @@
1
+ /*
2
+ * 1DS JS SDK Core, 4.0.0
3
+ * Copyright (c) Microsoft and contributors. All rights reserved.
4
+ *
5
+ * Javascript Telemetry SDKs <TelReachSDK@microsoft.com>
6
+ * https://1dsdocs.azurewebsites.net/sdk.html
7
+ */
8
+
9
+ declare namespace oneDS {
10
+ import { __getRegisteredEvents } from '@microsoft/applicationinsights-core-js';
11
+ import { addEventHandler } from '@microsoft/applicationinsights-core-js';
12
+ import { addEventListeners } from '@microsoft/applicationinsights-core-js';
13
+ import { addPageHideEventListener } from '@microsoft/applicationinsights-core-js';
14
+ import { addPageShowEventListener } from '@microsoft/applicationinsights-core-js';
15
+ import { addPageUnloadEventListener } from '@microsoft/applicationinsights-core-js';
16
+ import { areCookiesSupported } from '@microsoft/applicationinsights-core-js';
17
+ import { arrForEach } from '@microsoft/applicationinsights-core-js';
18
+ import { arrIndexOf } from '@microsoft/applicationinsights-core-js';
19
+ import { arrMap } from '@microsoft/applicationinsights-core-js';
20
+ import { arrReduce } from '@microsoft/applicationinsights-core-js';
21
+ import { attachEvent } from '@microsoft/applicationinsights-core-js';
22
+ import { BaseTelemetryPlugin } from '@microsoft/applicationinsights-core-js';
23
+ import { blockDynamicConversion } from '@microsoft/applicationinsights-core-js';
24
+ import { createCookieMgr } from '@microsoft/applicationinsights-core-js';
25
+ import { createDynamicConfig } from '@microsoft/applicationinsights-core-js';
26
+ import { createEnumStyle } from '@microsoft/applicationinsights-core-js';
27
+ import { createProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
28
+ import { createTraceParent } from '@microsoft/applicationinsights-core-js';
29
+ import { createUniqueNamespace } from '@microsoft/applicationinsights-core-js';
30
+ import { createUnloadHandlerContainer } from '@microsoft/applicationinsights-core-js';
31
+ import { dateNow } from '@microsoft/applicationinsights-core-js';
32
+ import { detachEvent } from '@microsoft/applicationinsights-core-js';
33
+ import { DiagnosticLogger } from '@microsoft/applicationinsights-core-js';
34
+ import { uaDisallowsSameSiteNone as disallowsSameSiteNone } from '@microsoft/applicationinsights-core-js';
35
+ import { doPerf } from '@microsoft/applicationinsights-core-js';
36
+ import { dumpObj } from '@microsoft/applicationinsights-core-js';
37
+ import { _eInternalMessageId } from '@microsoft/applicationinsights-core-js';
38
+ import { eLoggingSeverity } from '@microsoft/applicationinsights-core-js';
39
+ import { EnumValue } from '@microsoft/applicationinsights-core-js';
40
+ import { eventOff } from '@microsoft/applicationinsights-core-js';
41
+ import { eventOn } from '@microsoft/applicationinsights-core-js';
42
+ import { EventsDiscardedReason } from '@microsoft/applicationinsights-core-js';
43
+ import { findW3cTraceParent } from '@microsoft/applicationinsights-core-js';
44
+ import { forceDynamicConversion } from '@microsoft/applicationinsights-core-js';
45
+ import { formatTraceParent } from '@microsoft/applicationinsights-core-js';
46
+ import { generateW3CId } from '@microsoft/applicationinsights-core-js';
47
+ import { getConsole } from '@microsoft/applicationinsights-core-js';
48
+ import { getCrypto } from '@microsoft/applicationinsights-core-js';
49
+ import { getDocument } from '@microsoft/applicationinsights-core-js';
50
+ import { getDynamicConfigHandler } from '@microsoft/applicationinsights-core-js';
51
+ import { getExceptionName } from '@microsoft/applicationinsights-core-js';
52
+ import { getGlobal } from '@microsoft/applicationinsights-core-js';
53
+ import { getGlobalInst } from '@microsoft/applicationinsights-core-js';
54
+ import { getHistory } from '@microsoft/applicationinsights-core-js';
55
+ import { getIEVersion } from '@microsoft/applicationinsights-core-js';
56
+ import { getJSON } from '@microsoft/applicationinsights-core-js';
57
+ import { getLocation } from '@microsoft/applicationinsights-core-js';
58
+ import { getMsCrypto } from '@microsoft/applicationinsights-core-js';
59
+ import { getNavigator } from '@microsoft/applicationinsights-core-js';
60
+ import { getPerformance } from '@microsoft/applicationinsights-core-js';
61
+ import { getSetValue } from '@microsoft/applicationinsights-core-js';
62
+ import { getWindow } from '@microsoft/applicationinsights-core-js';
63
+ import { hasDocument } from '@microsoft/applicationinsights-core-js';
64
+ import { hasHistory } from '@microsoft/applicationinsights-core-js';
65
+ import { hasJSON } from '@microsoft/applicationinsights-core-js';
66
+ import { hasNavigator } from '@microsoft/applicationinsights-core-js';
67
+ import { hasOwnProperty } from '@microsoft/applicationinsights-core-js';
68
+ import { hasWindow } from '@microsoft/applicationinsights-core-js';
69
+ import { IAppInsightsCore } from '@microsoft/applicationinsights-core-js';
70
+ import { IChannelControls } from '@microsoft/applicationinsights-core-js';
71
+ import { IConfigCheckFn } from '@microsoft/applicationinsights-core-js';
72
+ import { IConfigDefaultCheck } from '@microsoft/applicationinsights-core-js';
73
+ import { IConfigDefaults } from '@microsoft/applicationinsights-core-js';
74
+ import { IConfigSetFn } from '@microsoft/applicationinsights-core-js';
75
+ import { IConfiguration } from '@microsoft/applicationinsights-core-js';
76
+ import { ICookieMgr } from '@microsoft/applicationinsights-core-js';
77
+ import { ICookieMgrConfig } from '@microsoft/applicationinsights-core-js';
78
+ import { ICustomProperties } from '@microsoft/applicationinsights-core-js';
79
+ import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
80
+ import { IDistributedTraceContext } from '@microsoft/applicationinsights-core-js';
81
+ import { IDynamicConfigHandler } from '@microsoft/applicationinsights-core-js';
82
+ import { IDynamicPropertyHandler } from '@microsoft/applicationinsights-core-js';
83
+ import { ILegacyUnloadHook } from '@microsoft/applicationinsights-core-js';
84
+ import { INotificationListener } from '@microsoft/applicationinsights-core-js';
85
+ import { INotificationManager } from '@microsoft/applicationinsights-core-js';
86
+ import { AppInsightsCore as InternalAppInsightsCore } from '@microsoft/applicationinsights-core-js';
87
+ import { _InternalLogMessage } from '@microsoft/applicationinsights-core-js';
88
+ import { _InternalMessageId } from '@microsoft/applicationinsights-core-js';
89
+ import { IPerfEvent } from '@microsoft/applicationinsights-core-js';
90
+ import { IPerfManager } from '@microsoft/applicationinsights-core-js';
91
+ import { IPerfManagerProvider } from '@microsoft/applicationinsights-core-js';
92
+ import { IPlugin } from '@microsoft/applicationinsights-core-js';
93
+ import { IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
94
+ import { IProcessTelemetryUnloadContext } from '@microsoft/applicationinsights-core-js';
95
+ import { _IRegisteredEvents } from '@microsoft/applicationinsights-core-js';
96
+ import { isArray } from '@microsoft/applicationinsights-core-js';
97
+ import { isBeaconsSupported } from '@microsoft/applicationinsights-core-js';
98
+ import { isBoolean } from '@microsoft/applicationinsights-core-js';
99
+ import { isDate } from '@microsoft/applicationinsights-core-js';
100
+ import { isError } from '@microsoft/applicationinsights-core-js';
101
+ import { isFetchSupported } from '@microsoft/applicationinsights-core-js';
102
+ import { isFunction } from '@microsoft/applicationinsights-core-js';
103
+ import { isIE } from '@microsoft/applicationinsights-core-js';
104
+ import { isNotTruthy } from '@microsoft/applicationinsights-core-js';
105
+ import { isNullOrUndefined } from '@microsoft/applicationinsights-core-js';
106
+ import { isNumber } from '@microsoft/applicationinsights-core-js';
107
+ import { isObject } from '@microsoft/applicationinsights-core-js';
108
+ import { isReactNative } from '@microsoft/applicationinsights-core-js';
109
+ import { isSampledFlag } from '@microsoft/applicationinsights-core-js';
110
+ import { isString } from '@microsoft/applicationinsights-core-js';
111
+ import { isTruthy } from '@microsoft/applicationinsights-core-js';
112
+ import { isTypeof } from '@microsoft/applicationinsights-core-js';
113
+ import { isUndefined } from '@microsoft/applicationinsights-core-js';
114
+ import { isValidSpanId } from '@microsoft/applicationinsights-core-js';
115
+ import { isValidTraceId } from '@microsoft/applicationinsights-core-js';
116
+ import { isValidTraceParent } from '@microsoft/applicationinsights-core-js';
117
+ import { isXhrSupported } from '@microsoft/applicationinsights-core-js';
118
+ import { ITelemetryInitializerContainer } from '@microsoft/applicationinsights-core-js';
119
+ import { ITelemetryInitializerHandler } from '@microsoft/applicationinsights-core-js';
120
+ import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
121
+ import { ITelemetryPlugin } from '@microsoft/applicationinsights-core-js';
122
+ import { ITelemetryPluginChain } from '@microsoft/applicationinsights-core-js';
123
+ import { ITelemetryUnloadState } from '@microsoft/applicationinsights-core-js';
124
+ import { ITelemetryUpdateState } from '@microsoft/applicationinsights-core-js';
125
+ import { ITimerHandler } from '@nevware21/ts-utils';
126
+ import { IUnloadableComponent } from '@microsoft/applicationinsights-core-js';
127
+ import { IUnloadHandlerContainer } from '@microsoft/applicationinsights-core-js';
128
+ import { IUnloadHook } from '@microsoft/applicationinsights-core-js';
129
+ import { IUnloadHookContainer } from '@microsoft/applicationinsights-core-js';
130
+ import { IWatchDetails } from '@microsoft/applicationinsights-core-js';
131
+ import { IWatcherHandler } from '@microsoft/applicationinsights-core-js';
132
+ import { LoggingSeverity } from '@microsoft/applicationinsights-core-js';
133
+ import { _logInternalMessage } from '@microsoft/applicationinsights-core-js';
134
+ import { mergeEvtNamespace } from '@microsoft/applicationinsights-core-js';
135
+ import { MinChannelPriorty } from '@microsoft/applicationinsights-core-js';
136
+ import { newGuid } from '@microsoft/applicationinsights-core-js';
137
+ import { newId } from '@microsoft/applicationinsights-core-js';
138
+ import { normalizeJsName } from '@microsoft/applicationinsights-core-js';
139
+ import { NotificationManager } from '@microsoft/applicationinsights-core-js';
140
+ import { objDefineAccessors } from '@microsoft/applicationinsights-core-js';
141
+ import { objForEachKey } from '@microsoft/applicationinsights-core-js';
142
+ import { objFreeze } from '@microsoft/applicationinsights-core-js';
143
+ import { objKeys } from '@microsoft/applicationinsights-core-js';
144
+ import { objSeal } from '@microsoft/applicationinsights-core-js';
145
+ import { onConfigChange } from '@microsoft/applicationinsights-core-js';
146
+ import { optimizeObject } from '@microsoft/applicationinsights-core-js';
147
+ import { parseTraceParent } from '@microsoft/applicationinsights-core-js';
148
+ import { PerfEvent } from '@microsoft/applicationinsights-core-js';
149
+ import { PerfManager } from '@microsoft/applicationinsights-core-js';
150
+ import { perfNow } from '@microsoft/applicationinsights-core-js';
151
+ import { ProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
152
+ import { proxyAssign } from '@microsoft/applicationinsights-core-js';
153
+ import { proxyFunctionAs } from '@microsoft/applicationinsights-core-js';
154
+ import { proxyFunctions } from '@microsoft/applicationinsights-core-js';
155
+ import { random32 } from '@microsoft/applicationinsights-core-js';
156
+ import { randomValue } from '@microsoft/applicationinsights-core-js';
157
+ import { removeEventHandler } from '@microsoft/applicationinsights-core-js';
158
+ import { removeEventListeners } from '@microsoft/applicationinsights-core-js';
159
+ import { removePageHideEventListener } from '@microsoft/applicationinsights-core-js';
160
+ import { removePageShowEventListener } from '@microsoft/applicationinsights-core-js';
161
+ import { removePageUnloadEventListener } from '@microsoft/applicationinsights-core-js';
162
+ import { safeGetCookieMgr } from '@microsoft/applicationinsights-core-js';
163
+ import { safeGetLogger } from '@microsoft/applicationinsights-core-js';
164
+ import { SendRequestReason } from '@microsoft/applicationinsights-core-js';
165
+ import { setEnableEnvMocks } from '@microsoft/applicationinsights-core-js';
166
+ import { setValue } from '@microsoft/applicationinsights-core-js';
167
+ import { strContains } from '@microsoft/applicationinsights-core-js';
168
+ import { strEndsWith } from '@microsoft/applicationinsights-core-js';
169
+ import { strFunction } from '@microsoft/applicationinsights-core-js';
170
+ import { strObject } from '@microsoft/applicationinsights-core-js';
171
+ import { strPrototype } from '@microsoft/applicationinsights-core-js';
172
+ import { strStartsWith } from '@microsoft/applicationinsights-core-js';
173
+ import { strTrim } from '@microsoft/applicationinsights-core-js';
174
+ import { strUndefined } from '@microsoft/applicationinsights-core-js';
175
+ import { Tags } from '@microsoft/applicationinsights-core-js';
176
+ import { TelemetryInitializerFunction } from '@microsoft/applicationinsights-core-js';
177
+ import { TelemetryUnloadReason } from '@microsoft/applicationinsights-core-js';
178
+ import { throwError } from '@microsoft/applicationinsights-core-js';
179
+ import { _throwInternal } from '@microsoft/applicationinsights-core-js';
180
+ import { toISOString } from '@microsoft/applicationinsights-core-js';
181
+ import { UnloadHandler } from '@microsoft/applicationinsights-core-js';
182
+ import { useXDomainRequest } from '@microsoft/applicationinsights-core-js';
183
+ import { _warnToConsole } from '@microsoft/applicationinsights-core-js';
184
+ import { WatcherFunction } from '@microsoft/applicationinsights-core-js';
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ class AppInsightsCore extends InternalAppInsightsCore<IExtendedConfiguration> {
193
+ constructor();
194
+ /**
195
+ * Initialize the sdk.
196
+ * @param config - The configuration to initialize the SDK.
197
+ * @param extensions - An array of extensions that are to be used by the core.
198
+ */
199
+ initialize(config: IExtendedConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
200
+ track(item: IExtendedTelemetryItem | ITelemetryItem): void;
201
+ /**
202
+ * Periodically check logger.queue for
203
+ */
204
+ pollInternalLogs(eventName?: string): ITimerHandler;
205
+ }
206
+
207
+
208
+ const cookieAvailable: typeof areCookiesSupported;
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+ /**
221
+ * Create a new guid.
222
+ * @param style - The style of guid to generated, defaults to Digits
223
+ * Digits (Default) : 32 digits separated by hyphens: 00000000-0000-0000-0000-000000000000
224
+ * Braces - 32 digits separated by hyphens, enclosed in braces: {00000000-0000-0000-0000-000000000000}
225
+ * Parentheses - 32 digits separated by hyphens, enclosed in parentheses: (00000000-0000-0000-0000-000000000000)
226
+ * Numeric - 32 digits: 00000000000000000000000000000000
227
+ * @returns The formatted guid.
228
+ */
229
+ function createGuid(style?: GuidStyle): string;
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+ /**
242
+ * Enum for property types.
243
+ */
244
+ const enum eEventPropertyType {
245
+ Unspecified = 0,
246
+ String = 1,
247
+ Int32 = 2,
248
+ UInt32 = 3,
249
+ Int64 = 4,
250
+ UInt64 = 5,
251
+ Double = 6,
252
+ Bool = 7,
253
+ Guid = 8,
254
+ DateTime = 9
255
+ }
256
+
257
+ const enum _eExtendedInternalMessageId {
258
+ AuthHandShakeError = 501,
259
+ AuthRedirectFail = 502,
260
+ BrowserCannotReadLocalStorage = 503,
261
+ BrowserCannotWriteLocalStorage = 504,
262
+ BrowserDoesNotSupportLocalStorage = 505,
263
+ CannotParseBiBlobValue = 506,
264
+ CannotParseDataAttribute = 507,
265
+ CVPluginNotAvailable = 508,
266
+ DroppedEvent = 509,
267
+ ErrorParsingAISessionCookie = 510,
268
+ ErrorProvidedChannels = 511,
269
+ FailedToGetCookies = 512,
270
+ FailedToInitializeCorrelationVector = 513,
271
+ FailedToInitializeSDK = 514,
272
+ InvalidContentBlob = 515,
273
+ InvalidCorrelationValue = 516,
274
+ SessionRenewalDateIsZero = 517,
275
+ SendPostOnCompleteFailure = 518,
276
+ PostResponseHandler = 519,
277
+ SDKNotInitialized = 520
278
+ }
279
+
280
+
281
+
282
+ /**
283
+ * The TraceLevel contains a set of values that specify the trace level for the trace messages.
284
+ */
285
+ const enum eTraceLevel {
286
+ /**
287
+ * None.
288
+ */
289
+ NONE = 0,
290
+ /**
291
+ * Error trace.
292
+ */
293
+ ERROR = 1,
294
+ /**
295
+ * Warning trace.
296
+ */
297
+ WARNING = 2,
298
+ /**
299
+ * Information trace.
300
+ */
301
+ INFORMATION = 3
302
+ }
303
+
304
+ /**
305
+ * The eValueKind contains a set of values that specify value kind of the property.
306
+ * Either PII (Personal Identifiable Information) or customer content.
307
+ */
308
+ const enum eValueKind {
309
+ /**
310
+ * No kind.
311
+ */
312
+ NotSet = 0,
313
+ /**
314
+ * An LDAP distinguished name. For example, CN=Jeff Smith,OU=Sales,DC=Fabrikam,DC=COM.
315
+ */
316
+ Pii_DistinguishedName = 1,
317
+ /**
318
+ * Generic information.
319
+ */
320
+ Pii_GenericData = 2,
321
+ /**
322
+ * An IPV4 Internet address. For example, 192.0.2.1.
323
+ */
324
+ Pii_IPV4Address = 3,
325
+ /**
326
+ * An IPV6 Internet address. For example, 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
327
+ */
328
+ Pii_IPv6Address = 4,
329
+ /**
330
+ * The Subject of an e-mail message.
331
+ */
332
+ Pii_MailSubject = 5,
333
+ /**
334
+ * A telephone number.
335
+ */
336
+ Pii_PhoneNumber = 6,
337
+ /**
338
+ * A query string.
339
+ */
340
+ Pii_QueryString = 7,
341
+ /**
342
+ * An SIP (Session Internet Protocol) address.
343
+ */
344
+ Pii_SipAddress = 8,
345
+ /**
346
+ * An e-mail address.
347
+ */
348
+ Pii_SmtpAddress = 9,
349
+ /**
350
+ * An user ID.
351
+ */
352
+ Pii_Identity = 10,
353
+ /**
354
+ * A URI (Uniform Resource Identifier).
355
+ */
356
+ Pii_Uri = 11,
357
+ /**
358
+ * The fully-qualified domain name.
359
+ */
360
+ Pii_Fqdn = 12,
361
+ /**
362
+ * Scrubs the last octet in a IPV4 Internet address.
363
+ * For example: 10.121.227.147 becomes 10.121.227.*
364
+ */
365
+ Pii_IPV4AddressLegacy = 13,
366
+ /**
367
+ * Generic content.
368
+ */
369
+ CustomerContent_GenericContent = 32
370
+ }
371
+
372
+ /**
373
+ * The EventLatency contains a set of values that specify the latency with which an event is sent.
374
+ */
375
+ const EventLatency: EnumValue<typeof EventLatencyValue>;
376
+
377
+ type EventLatency = number | EventLatencyValue;
378
+
379
+ /**
380
+ * The EventLatency contains a set of values that specify the latency with which an event is sent.
381
+ */
382
+ const enum EventLatencyValue {
383
+ /**
384
+ * Normal latency.
385
+ */
386
+ Normal = 1,
387
+ /**
388
+ * Cost deferred latency. At the moment this latency is treated as Normal latency.
389
+ */
390
+ CostDeferred = 2,
391
+ /**
392
+ * Real time latency.
393
+ */
394
+ RealTime = 3,
395
+ /**
396
+ * Bypass normal batching/timing and send as soon as possible, this will still send asynchronously.
397
+ * Added in v3.1.1
398
+ */
399
+ Immediate = 4
400
+ }
401
+
402
+
403
+
404
+ /**
405
+ * The EventPersistence contains a set of values that specify the event's persistence.
406
+ */
407
+ const EventPersistence: EnumValue<typeof EventPersistenceValue>;
408
+
409
+ type EventPersistence = number | EventPersistenceValue;
410
+
411
+ /**
412
+ * The EventPersistence contains a set of values that specify the event's persistence.
413
+ */
414
+ const enum EventPersistenceValue {
415
+ /**
416
+ * Normal persistence.
417
+ */
418
+ Normal = 1,
419
+ /**
420
+ * Critical persistence.
421
+ */
422
+ Critical = 2
423
+ }
424
+
425
+ /**
426
+ * Enum for property types.
427
+ */
428
+ const EventPropertyType: EnumValue<typeof eEventPropertyType>;
429
+
430
+ type EventPropertyType = number | eEventPropertyType;
431
+
432
+
433
+ /**
434
+ * Define a specific way to send an event synchronously
435
+ */
436
+ const enum EventSendType {
437
+ /**
438
+ * Batch and send the event asynchronously, this is the same as either setting the event `sync` flag to false or not setting at all.
439
+ */
440
+ Batched = 0,
441
+ /**
442
+ * Attempt to send the event synchronously, this is the same as setting the event `sync` flag to true
443
+ */
444
+ Synchronous = 1,
445
+ /**
446
+ * Attempt to send the event synchronously with a preference for the sendBeacon() API.
447
+ * As per the specification, the payload of the event (when converted to JSON) must not be larger than 64kb,
448
+ * the sendHook is also not supported or used when sendBeacon.
449
+ */
450
+ SendBeacon = 2,
451
+ /**
452
+ * Attempt to send the event synchronously with a preference for the fetch() API with the keepalive flag,
453
+ * the SDK checks to ensure that the fetch() implementation supports the 'keepalive' flag and if not it
454
+ * will fallback to either sendBeacon() or a synchronous XHR request.
455
+ * As per the specification, the payload of the event (when converted to JSON) must not be larger than 64kb.
456
+ * Note: Not all browsers support the keepalive flag so for those environments the events may still fail
457
+ */
458
+ SyncFetch = 3
459
+ }
460
+
461
+ /**
462
+ * Pass in the objects to merge as arguments.
463
+ * @param obj1 - object to merge. Set this argument to 'true' for a deep extend.
464
+ * @param obj2 - object to merge.
465
+ * @param obj3 - object to merge.
466
+ * @param obj4 - object to merge.
467
+ * @param obj5 - object to merge.
468
+ * @returns The extended object.
469
+ */
470
+ function extend(obj?: any, obj2?: any, obj3?: any, obj4?: any, obj5?: any): any;
471
+
472
+ type _ExtendedInternalMessageId = number | _eExtendedInternalMessageId | _eInternalMessageId;
473
+
474
+ type FieldValueSanitizerFunc = (details: IFieldSanitizerDetails) => IEventProperty | null;
475
+
476
+ const enum FieldValueSanitizerType {
477
+ NotSet = 0,
478
+ String = 1,
479
+ Number = 2,
480
+ Boolean = 3,
481
+ Object = 4,
482
+ Array = 4096,
483
+ EventProperty = 8192
484
+ }
485
+
486
+ type FieldValueSanitizerTypes = string | number | boolean | object | string[] | number[] | boolean[] | IEventProperty;
487
+
488
+
489
+
490
+
491
+ const FullVersionString: string;
492
+
493
+
494
+ function getCommonSchemaMetaData(value: string | boolean | number | string[] | number[] | boolean[] | undefined, kind: number | undefined, type?: number | undefined): number;
495
+
496
+
497
+ /**
498
+ * Helper to get and decode the cookie value using decodeURIComponent, this is for historical
499
+ * backward compatibility where the document.cookie value was decoded before parsing.
500
+ * @param cookieMgr - The cookie manager to use
501
+ * @param name - The name of the cookie to get
502
+ * @param decode - A flag to indicate whether the cookie value should be decoded
503
+ * @returns The decoded cookie value (if available) otherwise an empty string.
504
+ */
505
+ function getCookieValue(cookieMgr: ICookieMgr, name: string, decode?: boolean): string;
506
+
507
+
508
+
509
+
510
+
511
+ /**
512
+ * Returns a bitwise value for the FieldValueSanitizerType enum representing the decoded type of the passed value
513
+ * @param value The value to determine the type
514
+ */
515
+ function getFieldValueType(value: any): FieldValueSanitizerType;
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+
527
+ /**
528
+ * Gets the tenant id from the tenant token.
529
+ * @param apiKey - The token from which the tenant id is to be extracted.
530
+ * @returns The tenant id.
531
+ */
532
+ function getTenantId(apiKey: string | undefined): string;
533
+
534
+ let getTime: typeof perfNow;
535
+
536
+
537
+ const enum GuidStyle {
538
+ Numeric = "N",
539
+ Digits = "D",
540
+ Braces = "B",
541
+ Parentheses = "P"
542
+ }
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+ /**
565
+ * An interface used to create an event property value along with tagging it as PII, or customer content.
566
+ * <b>Caution:</b> Customer content and PII are mutually exclusive. You can use only one of them at a time.
567
+ * If you use both, then the property will be considered invalid, and therefore won't be sent.
568
+ */
569
+ interface IEventProperty {
570
+ /**
571
+ * The value for the property.
572
+ */
573
+ value: string | number | boolean | string[] | number[] | boolean[];
574
+ /**
575
+ * [Optional] The value kind associated with property value. The constant enum ValueKind should be used to specify the
576
+ * different kinds.
577
+ */
578
+ kind?: number;
579
+ /**
580
+ * [Optional] The data type for the property. Valid values accepted by onecollector are
581
+ * "string", "bool", "double", "int64", "datetime", "guid".
582
+ * The EventPropertyType constant enum should be used to specify the different property type values.
583
+ */
584
+ propertyType?: number;
585
+ }
586
+
587
+ /**
588
+ * An interface used for telemetry event timings.
589
+ */
590
+ interface IEventTiming {
591
+ /**
592
+ * Time when 1DS Core calls track
593
+ */
594
+ trackStart?: number;
595
+ /**
596
+ * Array of times when each plugin configured in 1DS calls processTelemetry method
597
+ */
598
+ processTelemetryStart?: {
599
+ [key: string]: number;
600
+ };
601
+ /**
602
+ * Array of times when a specific channel tried to send the telemetry to configured endpoint
603
+ */
604
+ sendEventStart?: {
605
+ [key: string]: number;
606
+ };
607
+ /**
608
+ * Array of times when a specific channel received a response from endpoint or request timed out
609
+ */
610
+ sendEventCompleted?: {
611
+ [key: string]: number;
612
+ };
613
+ /**
614
+ * Array of times when a specific channel started serialization of the telemetry event
615
+ */
616
+ serializationStart?: {
617
+ [key: string]: number;
618
+ };
619
+ /**
620
+ * Array of times when a specific channel completed serialization of the telemetry event
621
+ */
622
+ serializationCompleted?: {
623
+ [key: string]: number;
624
+ };
625
+ }
626
+
627
+ /**
628
+ * The IExtendedConfiguration interface holds the configuration details passed to core during initialize.
629
+ */
630
+ interface IExtendedConfiguration extends IConfiguration {
631
+ /**
632
+ * [Optional] The property storage override that should be used to store
633
+ * internal SDK properties, otherwise stored as cookies. It is needed where cookies are not available.
634
+ */
635
+ propertyStorageOverride?: IPropertyStorageOverride;
636
+ /**
637
+ * [Optional] A boolean that indicated whether to disable the use of cookies by the 1DS Web SDK. The cookies added by the SDK are
638
+ * MicrosoftApplicationsTelemetryDeviceId. If cookies are disabled, then session events are not sent unless propertyStorageOverride
639
+ * is provided to store the values elsewhere.
640
+ */
641
+ disableCookiesUsage?: boolean;
642
+ /**
643
+ * [Optional] Name of the Anon cookie. The value will be set in the qsp header to collector requests. Collector will use this value to look for specific cookie to use for anid property.
644
+ */
645
+ anonCookieName?: string;
646
+ /**
647
+ * [Optional] Disables additional internal event timings that are added during processing of events, the timings are not sent as part telemetry items to the server
648
+ */
649
+ disableEventTimings?: boolean;
650
+ /**
651
+ * [Optional] Enables support for objects with compound keys which indirectly represent an object where the "key" of the object contains a "." as part of it's name.
652
+ * @example
653
+ * ```typescript
654
+ * event: { "somedata.embeddedvalue": 123 }
655
+ * ```
656
+ */
657
+ enableCompoundKey?: boolean;
658
+ /**
659
+ * [Optional] An array of the page unload events that you would like to be ignored, special note there must be at least one valid unload
660
+ * event hooked, if you list all or the runtime environment only supports a listed "disabled" event it will still be hooked, if required by the SDK.
661
+ * Unload events include "beforeunload", "unload", "visibilitychange" (with 'hidden' state) and "pagehide"
662
+ */
663
+ disablePageUnloadEvents?: string[];
664
+ /**
665
+ * [Optional] An array of page show events that you would like to be ignored, special note there must be at lease one valid show event
666
+ * hooked, if you list all or the runtime environment only supports a listed (disabled) event it will STILL be hooked, if required by the SDK.
667
+ * Page Show events include "pageshow" and "visibilitychange" (with 'visible' state)
668
+ */
669
+ disablePageShowEvents?: string[];
670
+ /**
671
+ * Add "&w=0" parameter to support UA Parsing when web-workers don't have access to Document.
672
+ * Default is false
673
+ */
674
+ enableWParam?: boolean;
675
+ }
676
+
677
+ /**
678
+ * An interface used to create an event, along with its name, properties, type, timestamp, and priority.
679
+ */
680
+ interface IExtendedTelemetryItem extends ITelemetryItem {
681
+ /**
682
+ * Properties to be captured about the telemetry item.
683
+ * Custom properties (alternatively referred to as Part C properties for a Common Schema event) can be
684
+ * directly added under data.
685
+ */
686
+ data?: {
687
+ [key: string]: string | number | boolean | string[] | number[] | boolean[] | IEventProperty | object;
688
+ };
689
+ /**
690
+ * Telemetry properties pertaining to domain about which data is being captured. Example, duration, referrerUri for browser page.
691
+ * These are alternatively referred to as Part B properties for a Common Schema event.
692
+ */
693
+ baseData?: {
694
+ [key: string]: string | number | boolean | string[] | number[] | boolean[] | IEventProperty | object;
695
+ };
696
+ /**
697
+ * An EventLatency value, that specifies the latency for the event.The EventLatency constant should be
698
+ * used to specify the different latency values.
699
+ */
700
+ latency?: number | EventLatencyValue;
701
+ /**
702
+ * [Optional] An EventPersistence value, that specifies the persistence for the event. The EventPersistence constant
703
+ * should be used to specify the different persistence values.
704
+ */
705
+ persistence?: number | EventPersistenceValue;
706
+ /**
707
+ * [Optional] A boolean that specifies whether the event should be sent as a sync request.
708
+ */
709
+ sync?: boolean | EventSendType;
710
+ /**
711
+ * [Optional] A timings object.
712
+ */
713
+ timings?: IEventTiming;
714
+ }
715
+
716
+ /**
717
+ * This interface defines the object that is passed to any provided FieldValueSanitizerFunc, it provides not only the value to be sanitized but also
718
+ * some context about the value like it's location within the envelope (serialized object), the format is defined via the
719
+ * [Common Schema 4.0](https://1dsdocs.azurewebsites.net/schema/README.html) specification.
720
+ */
721
+ interface IFieldSanitizerDetails {
722
+ /**
723
+ * The path within the event where the value is stored
724
+ */
725
+ path: string;
726
+ /**
727
+ * The name of the field with the event path that will store the value
728
+ */
729
+ name: string;
730
+ /**
731
+ * Identifies the type of the property value
732
+ */
733
+ type: FieldValueSanitizerType;
734
+ /**
735
+ * The value for the property.
736
+ */
737
+ prop: IEventProperty;
738
+ /**
739
+ * A reference to the value sanitizer that created the details
740
+ */
741
+ sanitizer: IValueSanitizer;
742
+ }
743
+
744
+ /**
745
+ * This interface is used during the serialization of individual fields when converting the events into envelope (serialized object) which is sent to the services,
746
+ * the format is defined via the [Common Schema 4.0](https://1dsdocs.azurewebsites.net/schema/README.html) specification. The path and field names used are based
747
+ * on how the data is serialized to the service (CS 4.0 location) and not specifically the location on the event object you pass into the track methods (unless they are the same).
748
+ */
749
+ interface IFieldValueSanitizerProvider {
750
+ /**
751
+ * Does this field value sanitizer handle this path / field combination
752
+ * @param path - The field path
753
+ * @param name - The name of the field
754
+ */
755
+ handleField(path: string, name: string): boolean;
756
+ /**
757
+ * Get the field sanitizer for this type of field based on the field type, value kind and/or event property type
758
+ * @param path - The field path
759
+ * @param name - The name of the field
760
+ * @param theType - The type of field
761
+ * @param theKind - The value kind of the field
762
+ * @param propType - The property type of the field
763
+ */
764
+ getSanitizer(path: string, name: string, theType: FieldValueSanitizerType, theKind?: number, propType?: number): FieldValueSanitizerFunc | null | undefined;
765
+ }
766
+
767
+
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+
778
+
779
+ /**
780
+ * The IPropertyStorageOverride interface provides a custom interface for storing internal SDK properties - otherwise they are
781
+ * stored as cookies.
782
+ * You need this interface when you intend to run auto collection for common properties, or when you log a session in
783
+ * a non browser environment.
784
+ */
785
+ interface IPropertyStorageOverride {
786
+ /**
787
+ * A function for passing key value pairs to be stored.
788
+ * @param key - The key for the key value pair.
789
+ * @param value - The value for the key value pair.
790
+ */
791
+ setProperty: (key: string, value: string) => void;
792
+ /**
793
+ * A function that gets a value for a given key.
794
+ * @param key - The key for which the value must be fetched.
795
+ */
796
+ getProperty: (key: string) => string;
797
+ }
798
+
799
+
800
+
801
+ function isArrayValid(value: any[]): boolean;
802
+
803
+
804
+
805
+ /**
806
+ * Helper to identify whether we are running in a chromium based browser environment
807
+ */
808
+ function isChromium(): boolean;
809
+
810
+
811
+ /**
812
+ * Checks if document object is available
813
+ */
814
+ const isDocumentObjectAvailable: boolean;
815
+
816
+
817
+
818
+
819
+ /**
820
+ * Check to see if the value is > 0
821
+ * @param value - The value to check
822
+ * @returns true if > 0 otherwise false
823
+ */
824
+ function isGreaterThanZero(value: number): boolean;
825
+
826
+
827
+ /**
828
+ * Checks if the value is a valid EventLatency.
829
+ * @param value - The value that needs to be checked.
830
+ * @returns True if the value is in AWTEventLatency, false otherwise.
831
+ */
832
+ function isLatency(value: EventLatency | undefined): boolean;
833
+
834
+
835
+
836
+
837
+
838
+
839
+
840
+
841
+
842
+
843
+ /**
844
+ * Checks if Uint8Array are available in the current environment. Safari and Firefox along with
845
+ * ReactNative are known to not support Uint8Array properly.
846
+ * @returns True if available, false otherwise.
847
+ */
848
+ function isUint8ArrayAvailable(): boolean;
849
+
850
+
851
+
852
+
853
+
854
+ /**
855
+ * Checks if value is assigned to the given param.
856
+ * @param value - The token from which the tenant id is to be extracted.
857
+ * @returns True/false denoting if value is assigned to the param.
858
+ */
859
+ function isValueAssigned(value: any): boolean;
860
+
861
+ function isValueKind(value: number | undefined): boolean;
862
+
863
+ /**
864
+ * Checks if window object is available
865
+ */
866
+ const isWindowObjectAvailable: boolean;
867
+
868
+
869
+
870
+
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+
879
+
880
+ /**
881
+ * This interface is used during the serialization of events into envelope (serialized object) which is sent to the services, the format is defined via the
882
+ * [Common Schema 4.0](https://1dsdocs.azurewebsites.net/schema/README.html) specification. The path and field names used are based on how the data is serialized
883
+ * to the service (CS 4.0 location) and not specifically the location on the event object you pass into the track methods (unless they are the same).
884
+ */
885
+ interface IValueSanitizer {
886
+ /**
887
+ * Add a value sanitizer as a fallback sanitizer if this sanitizer can't handle the path/name.
888
+ */
889
+ addSanitizer: (sanitizer: IValueSanitizer) => void;
890
+ /**
891
+ * Adds a field sanitizer to the evaluation list
892
+ */
893
+ addFieldSanitizer: (fieldSanitizer: IFieldValueSanitizerProvider) => void;
894
+ /**
895
+ * Removes the value sanitizer as a fallback sanitizer if this sanitizer can't handle the path/name if present.
896
+ */
897
+ rmSanitizer: (theSanitizer: IValueSanitizer) => void;
898
+ /**
899
+ * Removes the field sanitizer to the evaluation list if present
900
+ */
901
+ rmFieldSanitizer: (theFieldSanitizer: IFieldValueSanitizerProvider) => void;
902
+ /**
903
+ * Does this field value sanitizer handle this path / field combination
904
+ * @param path - The field path
905
+ * @param name - The name of the field
906
+ */
907
+ handleField: (path: string, name: string) => boolean;
908
+ /**
909
+ * Sanitizes the value. It checks the that the property name and value are valid. It also
910
+ * checks/populates the correct type and pii of the property value.
911
+ * @param path - The root path of the property
912
+ * @param name - The property name.
913
+ * @param value - The property value or an IEventProperty containing value, type ,pii and customer content.
914
+ * @param stringifyObjects - If supplied tells the sanitizer that it should JSON stringify() objects
915
+ * @returns IEventProperty containing valid name, value, pii and type or null if invalid.
916
+ */
917
+ value: (path: string, name: string, value: FieldValueSanitizerTypes, stringifyObjects?: boolean) => IEventProperty | null;
918
+ /**
919
+ * Sanitizes the Property. It checks the that the property name and value are valid. It also
920
+ * checks/populates the correct type and pii of the property value.
921
+ * @param path - The root path of the property
922
+ * @param name - The property name.
923
+ * @param property - The property value or an IEventProperty containing value, type ,pii and customer content.
924
+ * @param stringifyObjects - If supplied tells the sanitizer that it should JSON stringify() objects
925
+ * @returns IEventProperty containing valid name, value, pii and type or null if invalid.
926
+ */
927
+ property: (path: string, name: string, property: IEventProperty, stringifyObjects?: boolean) => IEventProperty | null;
928
+ }
929
+
930
+
931
+
932
+
933
+
934
+
935
+
936
+
937
+
938
+
939
+
940
+
941
+
942
+
943
+
944
+
945
+
946
+ /**
947
+ * Create and open an XMLHttpRequest object
948
+ * @param method - The request method
949
+ * @param urlString - The url
950
+ * @param withCredentials - Option flag indicating that credentials should be sent
951
+ * @param disabled - Optional flag indicating that the XHR object should be marked as disabled and not tracked (default is false)
952
+ * @param isSync - Optional flag indicating if the instance should be a synchronous request (defaults to false)
953
+ * @param timeout - Optional value identifying the timeout value that should be assigned to the XHR request
954
+ * @returns A new opened XHR request
955
+ */
956
+ function openXhr(method: string, urlString: string, withCredentials?: boolean, disabled?: boolean, isSync?: boolean, timeout?: number): XMLHttpRequest;
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+
970
+
971
+
972
+
973
+
974
+
975
+
976
+ /**
977
+ * Sanitizes the Property. It checks the that the property name and value are valid. It also
978
+ * checks/populates the correct type and pii of the property value.
979
+ * @param name - property name - The property name.
980
+ * @param property - The property value or an IEventProperty containing value,
981
+ * type ,pii and customer content.
982
+ * @returns IEventProperty containing valid name, value, pii and type or null if invalid.
983
+ */
984
+ function sanitizeProperty(name: string, property: string | number | boolean | string[] | number[] | boolean[] | object | IEventProperty, stringifyObjects?: boolean): IEventProperty | null;
985
+
986
+
987
+
988
+ function setProcessTelemetryTimings(event: ITelemetryItem, identifier: string): void;
989
+
990
+
991
+
992
+
993
+
994
+
995
+
996
+
997
+
998
+ const Undefined: typeof strUndefined;
999
+
1000
+
1001
+
1002
+
1003
+
1004
+
1005
+ const getISOString: typeof toISOString;
1006
+
1007
+ const TraceLevel: EnumValue<typeof eTraceLevel>;
1008
+
1009
+ type TraceLevel = number | eTraceLevel;
1010
+
1011
+ /**
1012
+ * An enumeration that identifies the transport type that are requested to be used, if the requested
1013
+ * transport is not available ir supported the SDK may choose the first available transport or it
1014
+ * will log a warning to the diagnostic logger.
1015
+ */
1016
+ const enum TransportType {
1017
+ /**
1018
+ * Use the default available api
1019
+ */
1020
+ NotSet = 0,
1021
+ /**
1022
+ * Use XMLHttpRequest or XMLDomainRequest if available
1023
+ */
1024
+ Xhr = 1,
1025
+ /**
1026
+ * Use the Fetch api if available
1027
+ */
1028
+ Fetch = 2,
1029
+ /**
1030
+ * Use sendBeacon api if available
1031
+ */
1032
+ Beacon = 3
1033
+ }
1034
+
1035
+
1036
+
1037
+ /**
1038
+ * The ValueKind contains a set of values that specify value kind of the property.
1039
+ * Either PII (Personal Identifiable Information) or customer content.
1040
+ */
1041
+ const ValueKind: EnumValue<typeof eValueKind>;
1042
+
1043
+ type ValueKind = number | eValueKind;
1044
+
1045
+ class ValueSanitizer implements IValueSanitizer {
1046
+ static getFieldType: typeof getFieldValueType;
1047
+ /**
1048
+ * Add a value sanitizer as a fallback sanitizer if this sanitizer can't handle the path/name.
1049
+ */
1050
+ addSanitizer: (sanitizer: IValueSanitizer) => void;
1051
+ /**
1052
+ * Adds a field sanitizer to the evaluation list
1053
+ */
1054
+ addFieldSanitizer: (fieldSanitizer: IFieldValueSanitizerProvider) => void;
1055
+ /**
1056
+ * Removes the value sanitizer as a fallback sanitizer if this sanitizer can't handle the path/name if present.
1057
+ */
1058
+ rmSanitizer: (theSanitizer: IValueSanitizer) => void;
1059
+ /**
1060
+ * Removes the field sanitizer to the evaluation list if present
1061
+ */
1062
+ rmFieldSanitizer: (theFieldSanitizer: IFieldValueSanitizerProvider) => void;
1063
+ /**
1064
+ * Does this field value sanitizer handle this path / field combination
1065
+ * @param path - The field path
1066
+ * @param name - The name of the field
1067
+ */
1068
+ handleField: (path: string, name: string) => boolean;
1069
+ /**
1070
+ * Sanitizes the value. It checks the that the property name and value are valid. It also
1071
+ * checks/populates the correct type and pii of the property value.
1072
+ * @param path - The root path of the property
1073
+ * @param name - The property name.
1074
+ * @param value - The property value or an IEventProperty containing value, type ,pii and customer content.
1075
+ * @param stringifyObjects - If supplied tells the sanitizer that it should JSON stringify() objects
1076
+ * @returns IEventProperty containing valid name, value, pii and type or null if invalid.
1077
+ */
1078
+ value: (path: string, name: string, value: FieldValueSanitizerTypes, stringifyObjects?: boolean) => IEventProperty | null;
1079
+ /**
1080
+ * Sanitizes the Property. It checks the that the property name and value are valid. It also
1081
+ * checks/populates the correct type and pii of the property value.
1082
+ * @param path - The root path of the property
1083
+ * @param name - The property name.
1084
+ * @param property - The property value or an IEventProperty containing value, type ,pii and customer content.
1085
+ * @param stringifyObjects - If supplied tells the sanitizer that it should JSON stringify() objects
1086
+ * @returns IEventProperty containing valid name, value, pii and type or null if invalid.
1087
+ */
1088
+ property: (path: string, name: string, property: IEventProperty, stringifyObjects?: boolean) => IEventProperty | null;
1089
+ /**
1090
+ * Returns whether this ValueSanitizer is empty
1091
+ * @return `true` if it contains no chained sanitizers or field sanitizers, otherwise `false`
1092
+ */
1093
+ isEmpty?: () => boolean;
1094
+ constructor(fieldSanitizerProvider?: IFieldValueSanitizerProvider);
1095
+ }
1096
+
1097
+ const Version = "4.0.0";
1098
+
1099
+
1100
+
1101
+
1102
+ }