@adobe/spacecat-shared-rum-api-client 1.6.1 → 1.6.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.
- package/CHANGELOG.md +14 -0
- package/package.json +3 -3
- package/src/index.js +25 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@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
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add backlink params ([cbf715d](https://github.com/adobe/spacecat-shared/commit/cbf715d2e04762a8e8fb40bb7daca7f6f9df193a))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.6.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.6.1...@adobe/spacecat-shared-rum-api-client-v1.6.2) (2024-02-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @adobe/helix-universal to v4.5.0 ([#159](https://github.com/adobe/spacecat-shared/issues/159)) ([3006346](https://github.com/adobe/spacecat-shared/commit/3006346f180abf78c950334135e423eabd2c1765))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-rum-api-client-v1.6.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.6.0...@adobe/spacecat-shared-rum-api-client-v1.6.1) (2024-02-07)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-rum-api-client",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Rum API client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@adobe/fetch": "4.1.1",
|
|
34
34
|
"@adobe/helix-shared-wrap": "2.0.1",
|
|
35
|
-
"@adobe/helix-universal": "4.
|
|
35
|
+
"@adobe/helix-universal": "4.5.0",
|
|
36
36
|
"@adobe/spacecat-shared-utils": "1.4.0",
|
|
37
37
|
"aws4": "1.12.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"chai": "4.4.1",
|
|
41
41
|
"chai-as-promised": "7.1.1",
|
|
42
|
-
"nock": "13.5.
|
|
42
|
+
"nock": "13.5.3",
|
|
43
43
|
"sinon": "17.0.1",
|
|
44
44
|
"sinon-chai": "3.7.0",
|
|
45
45
|
"typescript": "5.3.3"
|
package/src/index.js
CHANGED
|
@@ -88,9 +88,16 @@ async function generateDomainKey(domainkey, url, expiry) {
|
|
|
88
88
|
return data[0].key;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
async function createBacklink(dashboardUrl, domainKey, domainUrl, expiry) {
|
|
91
|
+
async function createBacklink(dashboardUrl, domainKey, domainUrl, expiry, params) {
|
|
92
92
|
const scopedDomainKey = await generateDomainKey(domainKey, domainUrl, expiry);
|
|
93
|
-
return
|
|
93
|
+
return createUrl(dashboardUrl, {
|
|
94
|
+
offset: 0,
|
|
95
|
+
limit: 100,
|
|
96
|
+
url: domainUrl,
|
|
97
|
+
domainkey: scopedDomainKey,
|
|
98
|
+
interval: expiry,
|
|
99
|
+
...params,
|
|
100
|
+
});
|
|
94
101
|
}
|
|
95
102
|
|
|
96
103
|
export default class RUMAPIClient {
|
|
@@ -160,11 +167,23 @@ export default class RUMAPIClient {
|
|
|
160
167
|
return data.map((row) => row.hostname);
|
|
161
168
|
}
|
|
162
169
|
|
|
163
|
-
async createRUMBacklink(url, expiry) {
|
|
164
|
-
return createBacklink(
|
|
170
|
+
async createRUMBacklink(url, expiry, params) {
|
|
171
|
+
return createBacklink(
|
|
172
|
+
APIS.RUM_DASHBOARD_UI,
|
|
173
|
+
this.domainkey,
|
|
174
|
+
url,
|
|
175
|
+
expiry,
|
|
176
|
+
params,
|
|
177
|
+
);
|
|
165
178
|
}
|
|
166
179
|
|
|
167
|
-
async create404Backlink(url, expiry) {
|
|
168
|
-
return createBacklink(
|
|
180
|
+
async create404Backlink(url, expiry, params) {
|
|
181
|
+
return createBacklink(
|
|
182
|
+
APIS.NOT_FOUND_DASHBOARD_UI,
|
|
183
|
+
this.domainkey,
|
|
184
|
+
url,
|
|
185
|
+
expiry,
|
|
186
|
+
params,
|
|
187
|
+
);
|
|
169
188
|
}
|
|
170
189
|
}
|