@adobe/spacecat-shared-rum-api-client 1.4.4 → 1.6.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-rum-api-client-v1.6.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.5.0...@adobe/spacecat-shared-rum-api-client-v1.6.0) (2024-02-07)
2
+
3
+
4
+ ### Features
5
+
6
+ * experimentation RUM API method ([#133](https://github.com/adobe/spacecat-shared/issues/133)) ([f95eded](https://github.com/adobe/spacecat-shared/commit/f95ededcc5ba373717a90a577f20e75e1fad80d4))
7
+
8
+ # [@adobe/spacecat-shared-rum-api-client-v1.5.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.4.4...@adobe/spacecat-shared-rum-api-client-v1.5.0) (2024-02-06)
9
+
10
+
11
+ ### Features
12
+
13
+ * rum client createRUMURL function ([0c68dcc](https://github.com/adobe/spacecat-shared/commit/0c68dccdf494c89a938cdfe2a841d2965813b0eb))
14
+
1
15
  # [@adobe/spacecat-shared-rum-api-client-v1.4.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.4.3...@adobe/spacecat-shared-rum-api-client-v1.4.4) (2024-02-05)
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.4.4",
3
+ "version": "1.6.0",
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.js CHANGED
@@ -22,6 +22,7 @@ const APIS = {
22
22
  RUM_DASHBOARD: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-dashboard',
23
23
  DOMAIN_LIST: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/dash/domain-list',
24
24
  RUM_SOURCES: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-sources',
25
+ RUM_EXPERIMENTS: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-experiments',
25
26
  };
26
27
 
27
28
  const DOMAIN_LIST_DEFAULT_PARAMS = {
@@ -120,17 +121,34 @@ export default class RUMAPIClient {
120
121
  );
121
122
  }
122
123
 
123
- async getRUMDashboard(params = {}) {
124
- return sendRequest(createUrl(
124
+ createRUMURL(params = {}) {
125
+ return createUrl(
125
126
  APIS.RUM_DASHBOARD,
126
- { domainkey: this.domainkey, ...RUM_DEFAULT_PARAMS, ...params },
127
- ));
127
+ {
128
+ domainkey: this.domainkey, ...RUM_DEFAULT_PARAMS, ...params,
129
+ },
130
+ );
131
+ }
132
+
133
+ async getRUMDashboard(params = {}) {
134
+ return sendRequest(this.createRUMURL(params));
135
+ }
136
+
137
+ createExperimentationURL(params = {}) {
138
+ return createUrl(
139
+ APIS.RUM_EXPERIMENTS,
140
+ {
141
+ domainkey: this.domainkey, ...RUM_DEFAULT_PARAMS, ...params,
142
+ },
143
+ );
144
+ }
145
+
146
+ async getExperimentationData(params = {}) {
147
+ return sendRequest(this.createExperimentationURL(params));
128
148
  }
129
149
 
130
150
  async get404Sources(params = {}) {
131
- return sendRequest(this.create404URL(
132
- params,
133
- ));
151
+ return sendRequest(this.create404URL(params));
134
152
  }
135
153
 
136
154
  async getDomainList(params = {}) {