@adobe/spacecat-shared-rum-api-client 1.6.4 → 1.6.6
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 +2 -2
- package/src/index.js +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.6.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.6.5...@adobe/spacecat-shared-rum-api-client-v1.6.6) (2024-03-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([#177](https://github.com/adobe/spacecat-shared/issues/177)) ([dbe3b90](https://github.com/adobe/spacecat-shared/commit/dbe3b9051f682ca2c1a6677eea9d1fcdf021dbdb))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.6.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.6.4...@adobe/spacecat-shared-rum-api-client-v1.6.5) (2024-03-01)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* fix data desk params ([bb0c231](https://github.com/adobe/spacecat-shared/commit/bb0c23153ac8da510644b96da489135f0209d3c2))
|
|
14
|
+
|
|
1
15
|
# [@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
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.6",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Rum API client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
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.4",
|
|
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,15 +88,19 @@ async function generateDomainKey(domainkey, url, expiry) {
|
|
|
88
88
|
return data[0].key;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
async function createBacklink(dashboardUrl, domainKey, domainUrl, expiry, params) {
|
|
91
|
+
async function createBacklink(dashboardUrl, domainKey, domainUrl, expiry, params = {}) {
|
|
92
92
|
const scopedDomainKey = await generateDomainKey(domainKey, domainUrl, expiry);
|
|
93
|
+
const dataDeskParams = { ...params };
|
|
94
|
+
if (dataDeskParams.startdate) {
|
|
95
|
+
delete dataDeskParams.interval;
|
|
96
|
+
}
|
|
93
97
|
return createUrl(dashboardUrl, {
|
|
94
98
|
offset: 0,
|
|
95
99
|
limit: 100,
|
|
96
100
|
url: domainUrl,
|
|
97
101
|
domainkey: scopedDomainKey,
|
|
98
|
-
interval: expiry,
|
|
99
|
-
...
|
|
102
|
+
...(dataDeskParams?.startdate ? {} : { interval: expiry }),
|
|
103
|
+
...dataDeskParams,
|
|
100
104
|
});
|
|
101
105
|
}
|
|
102
106
|
|