@adobe/spacecat-shared-rum-api-client 1.7.2 → 1.8.1
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 +1 -1
- package/src/index.d.ts +12 -28
- package/src/index.js +9 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v1.8.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v1.8.0...@adobe/spacecat-shared-rum-api-client-v1.8.1) (2024-04-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* use 404 new endpoint ([23ec007](https://github.com/adobe/spacecat-shared/commit/23ec0073540eabf3d460f4705ba4dd40f27f46a0))
|
|
7
|
+
|
|
8
|
+
# [@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)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* calculate conversion for customer domains ([#214](https://github.com/adobe/spacecat-shared/issues/214)) ([0ce20fc](https://github.com/adobe/spacecat-shared/commit/0ce20fce05ac96273d23248c990b7e7eed93be1e))
|
|
14
|
+
|
|
1
15
|
# [@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)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
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.
|
|
@@ -161,4 +137,12 @@ export default class RUMAPIClient {
|
|
|
161
137
|
* or an array of all domain urls .
|
|
162
138
|
*/
|
|
163
139
|
getDomainList(params?: RUMAPIOptions): Promise<Array<string>>;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Asynchronous method to return the rum-sources API call response data.
|
|
143
|
+
* @param {RUMAPIOptions} params - An object representing the parameters to be included
|
|
144
|
+
* for the rum-sources data API call.
|
|
145
|
+
* @returns A Promise resolving to the conversion response data.
|
|
146
|
+
*/
|
|
147
|
+
getConversionData(params?: RUMAPIOptions): Promise<Array<string>>;
|
|
164
148
|
}
|
package/src/index.js
CHANGED
|
@@ -21,10 +21,9 @@ const APIS = {
|
|
|
21
21
|
NOT_FOUND_DASHBOARD_UI: 'https://data.aem.live/404-reports',
|
|
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
|
+
RUM_404: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-404',
|
|
24
25
|
RUM_SOURCES: 'https://helix-pages.anywhere.run/helix-services/run-query@v3/rum-sources',
|
|
25
26
|
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
27
|
};
|
|
29
28
|
|
|
30
29
|
const DOMAIN_LIST_DEFAULT_PARAMS = {
|
|
@@ -39,20 +38,16 @@ export const RUM_DEFAULT_PARAMS = {
|
|
|
39
38
|
limit: 101,
|
|
40
39
|
};
|
|
41
40
|
|
|
42
|
-
export const NOT_FOUND_DEFAULT_PARAMS = {
|
|
43
|
-
...RUM_DEFAULT_PARAMS,
|
|
44
|
-
checkpoint: 404,
|
|
45
|
-
};
|
|
46
|
-
|
|
47
41
|
export const CONVERSION_DEFAULT_PARAMS = {
|
|
48
42
|
...RUM_DEFAULT_PARAMS,
|
|
49
43
|
checkpoint: 'convert',
|
|
44
|
+
aggregate: false,
|
|
50
45
|
};
|
|
51
46
|
|
|
52
47
|
export const create404URL = (params = {}) => createUrl(
|
|
53
|
-
APIS.
|
|
48
|
+
APIS.RUM_404,
|
|
54
49
|
{
|
|
55
|
-
...
|
|
50
|
+
...RUM_DEFAULT_PARAMS, ...params,
|
|
56
51
|
},
|
|
57
52
|
);
|
|
58
53
|
|
|
@@ -71,14 +66,7 @@ export const createExperimentationURL = (params = {}) => createUrl(
|
|
|
71
66
|
);
|
|
72
67
|
|
|
73
68
|
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,
|
|
69
|
+
APIS.RUM_SOURCES,
|
|
82
70
|
{
|
|
83
71
|
...CONVERSION_DEFAULT_PARAMS, ...params,
|
|
84
72
|
},
|
|
@@ -173,6 +161,10 @@ export default class RUMAPIClient {
|
|
|
173
161
|
return sendRequest(createExperimentationURL({ ...params, domainkey: this.domainkey }));
|
|
174
162
|
}
|
|
175
163
|
|
|
164
|
+
async getConversionData(params = {}) {
|
|
165
|
+
return sendRequest(createConversionURL({ ...params, domainkey: this.domainkey }));
|
|
166
|
+
}
|
|
167
|
+
|
|
176
168
|
async get404Sources(params = {}) {
|
|
177
169
|
return sendRequest(create404URL({ ...params, domainkey: this.domainkey }));
|
|
178
170
|
}
|
|
@@ -205,12 +197,4 @@ export default class RUMAPIClient {
|
|
|
205
197
|
params,
|
|
206
198
|
);
|
|
207
199
|
}
|
|
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
200
|
}
|