@adobe/spacecat-shared-rum-api-client 1.3.6 → 1.4.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.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.d.ts +8 -0
- package/src/index.js +11 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.4.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.3.6...@adobe/spacecat-shared-rum-api-client-v1.4.0) (2024-01-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add create404Url method to RUMAPIClient ([9282a2d](https://github.com/adobe/spacecat-shared/commit/9282a2d97cf5f42868dcee16a40cbf26109a37fc))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-rum-api-client-v1.3.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.3.5...@adobe/spacecat-shared-rum-api-client-v1.3.6) (2024-01-24)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -74,6 +74,14 @@ export default class RUMAPIClient {
|
|
|
74
74
|
*/
|
|
75
75
|
get404Sources(params?: RUMAPIOptions): Promise<Array<object>>;
|
|
76
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Method to return the url composed of params that the 404 sources API is called with.
|
|
79
|
+
* @param {RUMAPIOptions} params - An object representing the parameters to be included
|
|
80
|
+
* for the 404 sources API call.
|
|
81
|
+
* @returns A string returning to the 404 sources url including query parameters.
|
|
82
|
+
*/
|
|
83
|
+
create404URL(params?: RUMAPIOptions): string;
|
|
84
|
+
|
|
77
85
|
/**
|
|
78
86
|
* Asynchronous method to return an array with the domain for a specific url
|
|
79
87
|
* or an array of all domain urls
|
package/src/index.js
CHANGED
|
@@ -106,6 +106,15 @@ export default class RUMAPIClient {
|
|
|
106
106
|
this.domainkey = domainkey;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
create404URL(params = {}) {
|
|
110
|
+
return createUrl(
|
|
111
|
+
APIS.RUM_SOURCES,
|
|
112
|
+
{
|
|
113
|
+
domainkey: this.domainkey, ...RUM_DEFAULT_PARAMS, checkpoint: 404, ...params,
|
|
114
|
+
},
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
109
118
|
async getRUMDashboard(params = {}) {
|
|
110
119
|
return sendRequest(createUrl(
|
|
111
120
|
APIS.RUM_DASHBOARD,
|
|
@@ -114,11 +123,8 @@ export default class RUMAPIClient {
|
|
|
114
123
|
}
|
|
115
124
|
|
|
116
125
|
async get404Sources(params = {}) {
|
|
117
|
-
return sendRequest(
|
|
118
|
-
|
|
119
|
-
{
|
|
120
|
-
domainkey: this.domainkey, ...RUM_DEFAULT_PARAMS, checkpoint: 404, ...params,
|
|
121
|
-
},
|
|
126
|
+
return sendRequest(this.create404URL(
|
|
127
|
+
params,
|
|
122
128
|
));
|
|
123
129
|
}
|
|
124
130
|
|