@dynatrace/dtrum-api-types 1.261.2 → 1.263.3

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 (3) hide show
  1. package/README.md +1 -1
  2. package/dtrum.d.ts +74 -72
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  This package contains the Typescript type information for the Dtrum Api of the javascript agent.
3
3
 
4
4
  Keep in mind that when the javascript agent is updated, this type package might not provide accurate types.
5
- Version: 1.261.2
5
+ Version: 1.263.3
6
6
 
7
7
  ## Installation
8
8
  > npm install --save-dev @dynatrace/dtrum-api-types
package/dtrum.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Signature of the function passed as callback in {@link addLeaveActionListener}
3
3
  *
4
- * @param actionId the ID for which the leave is called
5
- * @param stoptime start resp. endtime of the action
4
+ * @param actionId the ID for which the leave is called
5
+ * @param stoptime start resp. endtime of the action
6
6
  * @param isRootAction true if the action with the provided ID is a root action
7
7
  */
8
8
  export interface ActionLeaveListener {
@@ -12,10 +12,10 @@ export interface ActionLeaveListener {
12
12
  /**
13
13
  * Signature of the function passed as callback in {@link addEnterActionListener}
14
14
  *
15
- * @param actionId the ID for which the enter is called
16
- * @param starttime start resp. endtime of the action
15
+ * @param actionId the ID for which the enter is called
16
+ * @param starttime start resp. endtime of the action
17
17
  * @param isRootAction true if the action with the provided ID is a root action
18
- * @param [element] the element which resulted in the initiation of the event
18
+ * @param [element] the element which resulted in the initiation of the event
19
19
  */
20
20
  export interface ActionEnterListener {
21
21
  (actionId: number, starttime: number, isRootAction: boolean, element?: EventTarget | string): void;
@@ -171,8 +171,8 @@ export interface DtrumApi {
171
171
  * Needs to be called before the onload event of the page has finished, otherwise the information will be discarded.
172
172
  *
173
173
  * @param responseCode Sets the HTTP status code
174
- * @param message An additional informational message
175
- * @returns false if the values were incorrect or the function has been called too late, true otherwise
174
+ * @param message An additional informational message
175
+ * @returns false if the values were incorrect or the function has been called too late, true otherwise
176
176
  */
177
177
  markAsErrorPage(responseCode: number, message: string): boolean;
178
178
  /**
@@ -181,11 +181,11 @@ export interface DtrumApi {
181
181
  * by the server indicates a failed request.
182
182
  * Needs to be called before the XHR action is finished and all listeners have been invoked.
183
183
  *
184
- * @param responseCode The response code of the current XHR action
185
- * @param message An additional informational message
184
+ * @param responseCode The response code of the current XHR action
185
+ * @param message An additional informational message
186
186
  * @param parentActionId The optional ID of the action to mark as failed. If it is not present,
187
- * the currently open action is used.
188
- * @returns false if the values were incorrect or the function has been called too late, true otherwise
187
+ * the currently open action is used.
188
+ * @returns false if the values were incorrect or the function has been called too late, true otherwise
189
189
  */
190
190
  markXHRFailed(responseCode: number, message: string, parentActionId?: number): boolean;
191
191
  /**
@@ -193,8 +193,8 @@ export interface DtrumApi {
193
193
  * For example, use before a window unload event by adding a {@link addPageLeavingListener}.
194
194
  *
195
195
  * @see {@link addPageLeavingListener}
196
- * @param forceSync Force synchronous sending of beacons. If false, the beacon will be sent asynchronously.
197
- * @param sendPreview Force sending of preview beacons which haven't been closed yet.
196
+ * @param forceSync Force synchronous sending of beacons. If false, the beacon will be sent asynchronously.
197
+ * @param sendPreview Force sending of preview beacons which haven't been closed yet.
198
198
  * @param killUnfinished Kills unfinished actions and sends them immediately. Handle with care, actions might be inaccurate.
199
199
  */
200
200
  sendBeacon(forceSync: boolean, sendPreview: boolean, killUnfinished: boolean): void;
@@ -205,9 +205,9 @@ export interface DtrumApi {
205
205
  * @see {@link leaveAction}
206
206
  * @param actionName Name of the action
207
207
  * @param actionType DEPRECATED: not used any more and has no effect if provided
208
- * @param startTime Timestamp in milliseconds. if null, current time is used.
209
- * @param sourceUrl Source url for the action
210
- * @returns ID of the created action
208
+ * @param startTime Timestamp in milliseconds. if null, current time is used.
209
+ * @param sourceUrl Source url for the action
210
+ * @returns ID of the created action
211
211
  */
212
212
  "enterAction"(actionName: string, actionType?: string, startTime?: number, sourceUrl?: string): number;
213
213
  /**
@@ -235,12 +235,12 @@ export interface DtrumApi {
235
235
  * Needs to be called after {@link enterAction}.
236
236
  *
237
237
  * @see {@link enterAction}
238
- * @param actionId ID of the action to leave. must be the value returned by enterAction
239
- * @param stopTime Timestamp in milliseconds.
240
- * Note that, when providing a stop time, it will force stop the action and prevent visually complete from extending it.
238
+ * @param actionId ID of the action to leave. must be the value returned by enterAction
239
+ * @param stopTime Timestamp in milliseconds.
240
+ * Note that, when providing a stop time, it will force stop the action and prevent visually complete from extending it.
241
241
  * @param startTime Optional start time in milliseconds (necessary if start time should be modified).
242
- * Note that, when providing a start time, it mustn't be longer than an hour in the past, otherwise the
243
- * RUM monitoring code will ignore it.
242
+ * Note that, when providing a start time, it mustn't be longer than an hour in the past, otherwise the
243
+ * RUM monitoring code will ignore it.
244
244
  */
245
245
  "leaveAction"(actionId: number, stopTime?: number, startTime?: number): void;
246
246
  /**
@@ -251,34 +251,34 @@ export interface DtrumApi {
251
251
  *
252
252
  * @see {@link removeLeaveActionListener}
253
253
  * @see {@link addActionProperties}
254
- * @param listener A function that will be called when leaving an action
254
+ * @param listener A function that will be called when leaving an action
255
255
  */
256
256
  addLeaveActionListener(listener: ActionLeaveListener): void;
257
257
  /**
258
258
  * Removes a previously attached listener that detects the leave action event
259
259
  *
260
- * @param listener A leave action listener to be removed
260
+ * @param listener A leave action listener to be removed
261
261
  */
262
262
  removeLeaveActionListener(listener: ActionLeaveListener): void;
263
263
  /**
264
264
  * Adds custom {@link https://www.dynatrace.com/support/help/shortlink/user-session-properties | action properties}
265
265
  * to the currently active action. <br />
266
266
  * Only accepts valid java long, java double (as a string representation), Date objects, and
267
- * short strings with a maximum length of 100 characters. <br />
267
+ * short strings with a maximum length of 100 characters. <br />
268
268
  * Action properties must be defined first under Application settings and use a lower case key.
269
269
  *
270
270
  * @see {@link sendSessionProperties}
271
271
  * @param parentActionId ID of the action.
272
- * @param javaLong JSON object containing key value pairs of valid numbers. <br /> Value should be between
273
- * range -9223372036854776000 & 9223372036854776000
274
- * @param date JSON object containing key value pairs of JavaScript Date objects.<br /> Value should be JavaScript Date object
275
- * @param shortString JSON object containing key value pairs of strings.<br /> Value character count should be less
276
- * than 100 characters
277
- * @param javaDouble JSON object containing key value pairs of valid floating point numbers.<br />
278
- * Value should be between range -1.7976931348623157e+308 & 1.7976931348623157e+308
272
+ * @param javaLong JSON object containing key value pairs of valid numbers. <br /> Value should be between
273
+ * range -9223372036854776000 & 9223372036854776000
274
+ * @param date JSON object containing key value pairs of JavaScript Date objects.<br /> Value should be JavaScript Date object
275
+ * @param shortString JSON object containing key value pairs of strings.<br /> Value character count should be less
276
+ * than 100 characters
277
+ * @param javaDouble JSON object containing key value pairs of valid floating point numbers.<br />
278
+ * Value should be between range -1.7976931348623157e+308 & 1.7976931348623157e+308
279
279
  *
280
- * Each key value pair must be defined in the following format 'key: { value: value<AllowedMapTypes>, public?: boolean }'
281
- * Public property is optional and if not declared as true values will be sent as masked(dT_pv) in doNotTrack mode
280
+ * Each key value pair must be defined in the following format 'key: { value: value<AllowedMapTypes>, public?: boolean }'
281
+ * Public property is optional and if not declared as true values will be sent as masked(dT_pv) in doNotTrack mode
282
282
  */
283
283
  addActionProperties(parentActionId: number, javaLong?: PropertyMap<number>, date?: PropertyMap<Date>, shortString?: PropertyMap<string>, javaDouble?: PropertyMap<number>): void;
284
284
  /**
@@ -288,10 +288,10 @@ export interface DtrumApi {
288
288
  * by the global JavaScript {@link https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror | onerror event handler},
289
289
  * which is used by Dynatrace to automatically capture JavaScritp errors.
290
290
  *
291
- * @param error The error to be reported. Any browser error object is supported and if the error doesn't
292
- * have a stacktrace the RUM JavaScipt monitoring code will attempt to generate one.
293
- * Alternatively create your own object that has the following properties set: 'message',
294
- * 'file', 'line', 'column', and 'stack'. The 'message' property must be provided; all other values are optional.
291
+ * @param error The error to be reported. Any browser error object is supported and if the error doesn't
292
+ * have a stacktrace the RUM JavaScipt monitoring code will attempt to generate one.
293
+ * Alternatively create your own object that has the following properties set: 'message',
294
+ * 'file', 'line', 'column', and 'stack'. The 'message' property must be provided; all other values are optional.
295
295
  * @param parentActionId parent action id. if not passed or null, error is added to current action
296
296
  */
297
297
  reportError(error: Error | string, parentActionId?: number): void;
@@ -312,15 +312,15 @@ export interface DtrumApi {
312
312
  /**
313
313
  * Indicates the start of a user input. User inputs must always be stopped by calling {@link endUserInput}.
314
314
  * If an XHR call or a page load happens, the RUM monitoring code checks if a user input is active. If so, that user input is
315
- * set to have triggered the user action.
315
+ * set to have triggered the user action.
316
316
  * Use when a user input is not automatically detected by the RUM monitoring code.
317
317
  *
318
318
  * @see {@link endUserInput}
319
- * @param domNode DOM node which triggered the action (button, etc) or a string is used for determining its caption
320
- * @param type Type of action: 'click', 'keypress', 'scroll',...
321
- * @param addInfo Additional info for user input such as key, mouse button, etc ('F5', 'RETURN',...)
319
+ * @param domNode DOM node which triggered the action (button, etc) or a string is used for determining its caption
320
+ * @param type Type of action: 'click', 'keypress', 'scroll',...
321
+ * @param addInfo Additional info for user input such as key, mouse button, etc ('F5', 'RETURN',...)
322
322
  * @param validTime How long this userInput should be valid(in ms)
323
- * @returns An object containing all the information about the userInput
323
+ * @returns An object containing all the information about the userInput
324
324
  */
325
325
  beginUserInput(domNode: HTMLElement | string, type: string, addInfo?: string, validTime?: number): DtRumUserInput;
326
326
  /**
@@ -338,19 +338,21 @@ export interface DtrumApi {
338
338
  * Needs to be called before {@link leaveXhrAction}.
339
339
  *
340
340
  * @see {@link leaveXhrAction}
341
- * @param type Optional additional info about type of XHR (e.g., framework name, etc.)
342
- * @param xmode XHR action creation mode
343
- * 0 ... Just extend running XHR actions
344
- * 1 ... Extend any running action
345
- * 3 ... Start action if user input is present
341
+ * @param type Optional additional info about type of XHR (e.g., framework name, etc.)
342
+ * @param xmode XHR action creation mode
343
+ * 0 ... Just extend running XHR actions
344
+ * 1 ... Extend any running action
345
+ * 3 ... Start action if user input is present
346
346
  * @param xhrUrl url of the requested resource
347
- * @returns ID of the XhrAction
347
+ * note that in the future, this argument will be required
348
+ * if not provided, the request will be marked as `/undefined` in the waterfall
349
+ * @returns ID of the XhrAction
348
350
  */
349
351
  enterXhrAction(type: string, xmode?: 0 | 1 | 3, xhrUrl?: string): number;
350
352
  /**
351
353
  * Indicates the end of an XHR action
352
354
  *
353
- * @param actionId ID of the XHR Action
355
+ * @param actionId ID of the XHR Action
354
356
  * @param [stopTime] The stop time of the XHR Action
355
357
  */
356
358
  leaveXhrAction(actionId: number, stopTime?: number): void;
@@ -398,8 +400,8 @@ export interface DtrumApi {
398
400
  * Sets the actionName of the currently active action, or the action with the provided id
399
401
  *
400
402
  * @param actionName The new name of the action
401
- * @param actionId The action ID of the to be updated action name
402
- * @returns an {@link ActionNameResult} whether the process was successful
403
+ * @param actionId The action ID of the to be updated action name
404
+ * @returns an {@link ActionNameResult} whether the process was successful
403
405
  */
404
406
  actionName(actionName: string, actionId?: number): ActionNameResult;
405
407
  /**
@@ -471,15 +473,15 @@ export interface DtrumApi {
471
473
  * Read more about {@link https://www.dynatrace.com/support/help/shortlink/cookies#cookie-storage | cookie storage}.
472
474
  *
473
475
  * @param remember If true, this configuration state is persisted in local storage, so that it doesn't
474
- * reset on each page load
476
+ * reset on each page load
475
477
  */
476
478
  disablePersistentValues(remember: boolean): void;
477
479
  /**
478
480
  * Registers a method which will be invoked before the 'diff' action in session replay during recording.
479
481
  *
480
482
  * @param method Listener which will be called before diff action. Listener receives one argument
481
- * which is a string with diff. Listener also must return the diff string.
482
- * Read more about {@link https://www.dynatrace.com/support/help/shortlink/cookies#cookie-storage | cookie storage}.
483
+ * which is a string with diff. Listener also must return the diff string.
484
+ * Read more about {@link https://www.dynatrace.com/support/help/shortlink/cookies#cookie-storage | cookie storage}.
483
485
  */
484
486
  registerPreDiffMethod(method: (diff: string) => string): void;
485
487
  /**
@@ -492,37 +494,37 @@ export interface DtrumApi {
492
494
  *
493
495
  * @see {@link addActionProperties} is related and works similarly.
494
496
  * @param javaLongOrObject JSON object containing key value pairs of valid numbers. <br /> Value should be between range -9223372036854776000 & 9223372036854776000
495
- * @param date JSON object containing key value pairs of JavaScript date objects.<br /> Value should be JavaScript Date object
496
- * @param shortString JSON object containing key value pairs of strings.<br /> Value character count should be less than
497
- * 100 characters
498
- * @param javaDouble JSON object containing key value pairs of valid floating point numbers.<br />
499
- * Value should be between range -1.7976931348623157e+308 & 1.7976931348623157e+308
497
+ * @param date JSON object containing key value pairs of JavaScript date objects.<br /> Value should be JavaScript Date object
498
+ * @param shortString JSON object containing key value pairs of strings.<br /> Value character count should be less than
499
+ * 100 characters
500
+ * @param javaDouble JSON object containing key value pairs of valid floating point numbers.<br />
501
+ * Value should be between range -1.7976931348623157e+308 & 1.7976931348623157e+308
500
502
  *
501
- * Each key value pair must be defined in the following format 'key: { value: value<AllowedMapTypes>, public?: boolean }'
502
- * Public property is optional and if not declared as true values will be sent as masked(dT_pv) in doNotTrack mode
503
+ * Each key value pair must be defined in the following format 'key: { value: value<AllowedMapTypes>, public?: boolean }'
504
+ * Public property is optional and if not declared as true values will be sent as masked(dT_pv) in doNotTrack mode
503
505
  *
504
- * @returns Status report about properties that were passed to the function.
505
- * It contains data about failed properties with the failure reason.
506
- * Contains data about properties that were sent successfully and a general message with information about total failed properties.
506
+ * @returns Status report about properties that were passed to the function.
507
+ * It contains data about failed properties with the failure reason.
508
+ * Contains data about properties that were sent successfully and a general message with information about total failed properties.
507
509
  */
508
510
  sendSessionProperties(
509
511
  javaLongOrObject?: PropertyMap<number> | PropertyObject,
510
512
  date?: PropertyMap<Date>,
511
513
  shortString?: PropertyMap<string>,
512
514
  javaDouble?: PropertyMap<number>
513
- // eslint-disable-next-line @dynatrace/dem-eslint-rules/correct-null-void-undefined -- jquery types return void by design - keep native types
515
+
514
516
  ): PropertiesSendingReport | undefined;
515
517
  /**
516
518
  * Report your own{@link https://www.dynatrace.com/support/help/shortlink/configure-application-errors#configure-custom-errors | custom errors}.
517
519
  * For example, use when you want to capture form validation errors in your signup process.
518
520
  * Custom errors must first be defined in the Application settings.
519
521
  *
520
- * @param key The key of the error. For example, 'validation error'
521
- * @param value The error value. For example, 'Email validation failed'
522
- * @param hint A hint to pinpoint the problem, e.g. content of the input element which triggered the failed validation
522
+ * @param key The key of the error. For example, 'validation error'
523
+ * @param value The error value. For example, 'Email validation failed'
524
+ * @param hint A hint to pinpoint the problem, e.g. content of the input element which triggered the failed validation
523
525
  * @param parentingInfo How the custom error should be attached (default = false),
524
- * [case number]: To which open action the custom error event should be attached,
525
- * [case boolean]: If true it will get attached to the current active action
526
+ * [case number]: To which open action the custom error event should be attached,
527
+ * [case boolean]: If true it will get attached to the current active action
526
528
  */
527
529
  reportCustomError(key: string, value: string, hint?: string, parentingInfo?: number | boolean): void;
528
530
 
@@ -539,8 +541,8 @@ export interface DtrumApi {
539
541
  * @param newPage New page containing page name and page group.
540
542
  * @returns 1 if new page is started succesfully.
541
543
  * 2 if new page is started during onload. It means it is cached and will be sent with load action.
542
- * -1 if page that is being set is the same as previous one.
543
- * -2 if page is trying to be set but mechanism is not active. Probably 'dtrum.enableManualPageDetection()' was not called.
544
+ * - 1 if page that is being set is the same as previous one.
545
+ * - 2 if page is trying to be set but mechanism is not active. Probably 'dtrum.enableManualPageDetection()' was not called.
544
546
  * Negative number means new page failed to start and positive means that new page is started successfully.
545
547
  */
546
548
  "setPage"(newPage: APIPage): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace/dtrum-api-types",
3
- "version": "1.261.2",
3
+ "version": "1.263.3",
4
4
  "description": "Typescript types for Dynatrace jsagents dtrum api.",
5
5
  "main": "",
6
6
  "typings": "dtrum.d.ts",