@adobe/spacecat-shared-rum-api-client 1.6.8 → 1.6.10
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 +24 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.6.10](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.6.9...@adobe/spacecat-shared-rum-api-client-v1.6.10) (2024-03-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([#197](https://github.com/adobe/spacecat-shared/issues/197)) ([776c657](https://github.com/adobe/spacecat-shared/commit/776c657b3ebb2d5b2cd2379aed82d3b9a85ded51))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.6.9](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.6.8...@adobe/spacecat-shared-rum-api-client-v1.6.9) (2024-03-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* don t expose rum domain key ([3930026](https://github.com/adobe/spacecat-shared/commit/39300265e14f2598cc0963f7ea74a6c8d964d446))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-rum-api-client-v1.6.8](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.6.7...@adobe/spacecat-shared-rum-api-client-v1.6.8) (2024-03-19)
|
|
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.10",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Rum API client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -42,6 +42,6 @@
|
|
|
42
42
|
"nock": "13.5.4",
|
|
43
43
|
"sinon": "17.0.1",
|
|
44
44
|
"sinon-chai": "3.7.0",
|
|
45
|
-
"typescript": "5.4.
|
|
45
|
+
"typescript": "5.4.3"
|
|
46
46
|
}
|
|
47
47
|
}
|
package/src/index.js
CHANGED
|
@@ -42,6 +42,27 @@ export const NOT_FOUND_DEFAULT_PARAMS = {
|
|
|
42
42
|
checkpoint: 404,
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
export const create404URL = (params = {}) => createUrl(
|
|
46
|
+
APIS.RUM_SOURCES,
|
|
47
|
+
{
|
|
48
|
+
...NOT_FOUND_DEFAULT_PARAMS, ...params,
|
|
49
|
+
},
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export const createRUMURL = (params = {}) => createUrl(
|
|
53
|
+
APIS.RUM_DASHBOARD,
|
|
54
|
+
{
|
|
55
|
+
...RUM_DEFAULT_PARAMS, ...params,
|
|
56
|
+
},
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
export const createExperimentationURL = (params = {}) => createUrl(
|
|
60
|
+
APIS.RUM_EXPERIMENTS,
|
|
61
|
+
{
|
|
62
|
+
...RUM_DEFAULT_PARAMS, ...params,
|
|
63
|
+
},
|
|
64
|
+
);
|
|
65
|
+
|
|
45
66
|
export async function sendRequest(url, opts) {
|
|
46
67
|
let respJson;
|
|
47
68
|
try {
|
|
@@ -123,43 +144,16 @@ export default class RUMAPIClient {
|
|
|
123
144
|
this.domainkey = domainkey;
|
|
124
145
|
}
|
|
125
146
|
|
|
126
|
-
create404URL(params = {}) {
|
|
127
|
-
return createUrl(
|
|
128
|
-
APIS.RUM_SOURCES,
|
|
129
|
-
{
|
|
130
|
-
domainkey: this.domainkey, ...NOT_FOUND_DEFAULT_PARAMS, ...params,
|
|
131
|
-
},
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
createRUMURL(params = {}) {
|
|
136
|
-
return createUrl(
|
|
137
|
-
APIS.RUM_DASHBOARD,
|
|
138
|
-
{
|
|
139
|
-
domainkey: this.domainkey, ...RUM_DEFAULT_PARAMS, ...params,
|
|
140
|
-
},
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
147
|
async getRUMDashboard(params = {}) {
|
|
145
|
-
return sendRequest(
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
createExperimentationURL(params = {}) {
|
|
149
|
-
return createUrl(
|
|
150
|
-
APIS.RUM_EXPERIMENTS,
|
|
151
|
-
{
|
|
152
|
-
domainkey: this.domainkey, ...RUM_DEFAULT_PARAMS, ...params,
|
|
153
|
-
},
|
|
154
|
-
);
|
|
148
|
+
return sendRequest(createRUMURL({ ...params, domainkey: this.domainkey }));
|
|
155
149
|
}
|
|
156
150
|
|
|
157
151
|
async getExperimentationData(params = {}) {
|
|
158
|
-
return sendRequest(
|
|
152
|
+
return sendRequest(createExperimentationURL({ ...params, domainkey: this.domainkey }));
|
|
159
153
|
}
|
|
160
154
|
|
|
161
155
|
async get404Sources(params = {}) {
|
|
162
|
-
return sendRequest(
|
|
156
|
+
return sendRequest(create404URL({ ...params, domainkey: this.domainkey }));
|
|
163
157
|
}
|
|
164
158
|
|
|
165
159
|
async getDomainList(params = {}) {
|