@adobe/spacecat-shared-rum-api-client 1.7.1 → 1.8.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 +14 -0
- package/package.json +3 -3
- package/src/index.d.ts +4 -28
- package/src/index.js +6 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.8.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.7.2...@adobe/spacecat-shared-rum-api-client-v1.8.0) (2024-04-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* calculate conversion for customer domains ([#214](https://github.com/adobe/spacecat-shared/issues/214)) ([0ce20fc](https://github.com/adobe/spacecat-shared/commit/0ce20fce05ac96273d23248c990b7e7eed93be1e))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.7.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.7.1...@adobe/spacecat-shared-rum-api-client-v1.7.2) (2024-04-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @adobe/helix-universal to v4.5.2 ([#211](https://github.com/adobe/spacecat-shared/issues/211)) ([e261e67](https://github.com/adobe/spacecat-shared/commit/e261e677558a6ee165cf0d560625cf665276e144))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-rum-api-client-v1.7.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.7.0...@adobe/spacecat-shared-rum-api-client-v1.7.1) (2024-04-16)
|
|
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.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Rum API client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@adobe/fetch": "4.1.2",
|
|
34
|
-
"@adobe/helix-shared-wrap": "2.0.
|
|
35
|
-
"@adobe/helix-universal": "4.5.
|
|
34
|
+
"@adobe/helix-shared-wrap": "2.0.2",
|
|
35
|
+
"@adobe/helix-universal": "4.5.2",
|
|
36
36
|
"@adobe/spacecat-shared-utils": "1.4.0",
|
|
37
37
|
"aws4": "1.12.0"
|
|
38
38
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -97,36 +97,12 @@ export default class RUMAPIClient {
|
|
|
97
97
|
createExperimentationURL(params?: RUMAPIOptions): string;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
|
|
101
|
-
* @param {RUMAPIOptions} params - An object representing the parameters to be included
|
|
102
|
-
* for the conversion data API call.
|
|
103
|
-
* @returns A Promise resolving to the conversion response data.
|
|
104
|
-
*/
|
|
105
|
-
getConversionData(params?: RUMAPIOptions): Promise<Array<object>>;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Method to return the url composed of params that the conversion API is called with.
|
|
109
|
-
* @param {RUMAPIOptions} params - An object representing the parameters to be included
|
|
110
|
-
* for the conversion API call.
|
|
111
|
-
* @returns A string returning the conversion url including query parameters.
|
|
112
|
-
*/
|
|
113
|
-
createConversionURL(params?: RUMAPIOptions): string;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Asynchronous method to return the conversion API call response data.
|
|
100
|
+
* Method to return the url composed of params that the rum-sources API is called with.
|
|
117
101
|
* @param {RUMAPIOptions} params - An object representing the parameters to be included
|
|
118
|
-
* for the
|
|
119
|
-
* @returns A
|
|
102
|
+
* for the rum-sources API call.
|
|
103
|
+
* @returns A string returning the rum-sources url including query parameters.
|
|
120
104
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Method to return the url composed of params that the conversion API is called with.
|
|
125
|
-
* @param {RUMAPIOptions} params - An object representing the parameters to be included
|
|
126
|
-
* for the conversion API call.
|
|
127
|
-
* @returns A string returning the conversion url including query parameters.
|
|
128
|
-
*/
|
|
129
|
-
createRUMFormsURL(params?: RUMAPIOptions): string;
|
|
105
|
+
createConversionURL(params?: RUMAPIOptions): string;
|
|
130
106
|
|
|
131
107
|
/**
|
|
132
108
|
* Asynchronous method to return the 404 sources API call response data.
|
package/src/index.js
CHANGED
|
@@ -23,8 +23,6 @@ const APIS = {
|
|
|
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
25
|
RUM_EXPERIMENTS: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-experiments',
|
|
26
|
-
RUM_SOURCES_TARGETS: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-sources-targets',
|
|
27
|
-
RUM_FROMS_DASHBOARD: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-forms-dashboard',
|
|
28
26
|
};
|
|
29
27
|
|
|
30
28
|
const DOMAIN_LIST_DEFAULT_PARAMS = {
|
|
@@ -47,6 +45,7 @@ export const NOT_FOUND_DEFAULT_PARAMS = {
|
|
|
47
45
|
export const CONVERSION_DEFAULT_PARAMS = {
|
|
48
46
|
...RUM_DEFAULT_PARAMS,
|
|
49
47
|
checkpoint: 'convert',
|
|
48
|
+
aggregate: false,
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
export const create404URL = (params = {}) => createUrl(
|
|
@@ -71,14 +70,7 @@ export const createExperimentationURL = (params = {}) => createUrl(
|
|
|
71
70
|
);
|
|
72
71
|
|
|
73
72
|
export const createConversionURL = (params = {}) => createUrl(
|
|
74
|
-
APIS.
|
|
75
|
-
{
|
|
76
|
-
...CONVERSION_DEFAULT_PARAMS, ...params,
|
|
77
|
-
},
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
export const createRUMFormsURL = (params = {}) => createUrl(
|
|
81
|
-
APIS.RUM_FROMS_DASHBOARD,
|
|
73
|
+
APIS.RUM_SOURCES,
|
|
82
74
|
{
|
|
83
75
|
...CONVERSION_DEFAULT_PARAMS, ...params,
|
|
84
76
|
},
|
|
@@ -173,6 +165,10 @@ export default class RUMAPIClient {
|
|
|
173
165
|
return sendRequest(createExperimentationURL({ ...params, domainkey: this.domainkey }));
|
|
174
166
|
}
|
|
175
167
|
|
|
168
|
+
async getConversionData(params = {}) {
|
|
169
|
+
return sendRequest(createConversionURL({ ...params, domainkey: this.domainkey }));
|
|
170
|
+
}
|
|
171
|
+
|
|
176
172
|
async get404Sources(params = {}) {
|
|
177
173
|
return sendRequest(create404URL({ ...params, domainkey: this.domainkey }));
|
|
178
174
|
}
|
|
@@ -205,12 +201,4 @@ export default class RUMAPIClient {
|
|
|
205
201
|
params,
|
|
206
202
|
);
|
|
207
203
|
}
|
|
208
|
-
|
|
209
|
-
async getConversionData(params = {}) {
|
|
210
|
-
return sendRequest(createConversionURL({ ...params, domainkey: this.domainkey }));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
async getRUMFormsDashboard(params = {}) {
|
|
214
|
-
return sendRequest(createRUMFormsURL({ ...params, domainkey: this.domainkey }));
|
|
215
|
-
}
|
|
216
204
|
}
|