@adobe/spacecat-shared-rum-api-client 1.6.3 → 1.6.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [@adobe/spacecat-shared-rum-api-client-v1.6.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.6.3...@adobe/spacecat-shared-rum-api-client-v1.6.4) (2024-02-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * create404Backlink and createRUMBacklink documentation ([#165](https://github.com/adobe/spacecat-shared/issues/165)) ([418ec68](https://github.com/adobe/spacecat-shared/commit/418ec68a1cabf22054688342438dcf2ea60acf38))
7
+
1
8
  # [@adobe/spacecat-shared-rum-api-client-v1.6.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.6.2...@adobe/spacecat-shared-rum-api-client-v1.6.3) (2024-02-27)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-rum-api-client",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "Shared modules of the Spacecat Services - Rum API client",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.d.ts CHANGED
@@ -14,11 +14,23 @@ import { UniversalContext } from '@adobe/helix-universal';
14
14
 
15
15
  export interface RUMAPIOptions {
16
16
  interval?: number;
17
+ startdate?: string,
18
+ enddate?: string,
17
19
  offset?: number;
18
20
  limit?: number;
19
21
  url?: string;
20
22
  }
21
23
 
24
+ export interface RUMDashboardOptions {
25
+ interval?: number;
26
+ startdate?: string,
27
+ enddate?: string,
28
+ offset?: number;
29
+ limit?: number;
30
+ domainkey?: string,
31
+ url?: string;
32
+ }
33
+
22
34
  export default class RUMAPIClient {
23
35
  /**
24
36
  * Static factory method to create an instance of RUMAPIClient.
@@ -42,21 +54,23 @@ export default class RUMAPIClient {
42
54
  * Asynchronous method to create a RUM backlink.
43
55
  * @param {string} url - A string representing the URL for the backlink.
44
56
  * @param {number} expiry - An integer representing the expiry value for the backlink.
57
+ * @param {RUMDashboardOptions} params - An object representing the parameters to be included
45
58
  * @returns A Promise resolving to a string representing url of the created backlink.
46
59
  * @remarks This method creates a backlink to the RUM dashboard, allowing users
47
60
  * to view their reports and monitor real user activities.
48
61
  */
49
- createRUMBacklink(url: string, expiry: number): Promise<string>;
62
+ createRUMBacklink(url: string, expiry: number, params?: RUMDashboardOptions): Promise<string>;
50
63
 
51
64
  /**
52
65
  * Asynchronous method to create a 404 backlink.
53
66
  * @param {string} url - A string representing the URL for the backlink.
54
67
  * @param {number} expiry - An integer representing the expiry value for the backlink.
68
+ * @param {RUMDashboardOptions} params - An object representing the parameters to be included
55
69
  * @returns A Promise resolving to a string representing url of the created backlink.
56
70
  * @remarks This method creates a backlink to the 404 report, allowing users
57
71
  * to view their 404 pages.
58
72
  */
59
- create404Backlink(url: string, expiry: number): Promise<string>;
73
+ create404Backlink(url: string, expiry: number, params?: RUMDashboardOptions): Promise<string>;
60
74
 
61
75
  /**
62
76
  * Asynchronous method to return the RUM dashboard API call response data.