@adobe/spacecat-shared-athena-client 1.8.0 → 1.8.2

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-athena-client-v1.8.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-athena-client-v1.8.1...@adobe/spacecat-shared-athena-client-v1.8.2) (2025-12-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix query for PTRv2 weekly trend ([#1209](https://github.com/adobe/spacecat-shared/issues/1209)) ([5a8fa92](https://github.com/adobe/spacecat-shared/commit/5a8fa9226ec7ab9dd022f022fc2ed930155dec9f))
7
+
8
+ # [@adobe/spacecat-shared-athena-client-v1.8.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-athena-client-v1.8.0...@adobe/spacecat-shared-athena-client-v1.8.1) (2025-12-03)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * expose traffic_loss in result mapper for consent-banner ([#1208](https://github.com/adobe/spacecat-shared/issues/1208)) ([2b89f67](https://github.com/adobe/spacecat-shared/commit/2b89f6754ebc9766b8853ece11fa99dbb2c6a1c5))
14
+
1
15
  # [@adobe/spacecat-shared-athena-client-v1.8.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-athena-client-v1.7.6...@adobe/spacecat-shared-athena-client-v1.8.0) (2025-12-02)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-athena-client",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "Shared modules of the Spacecat Services - AWS Athena Client",
5
5
  "type": "module",
6
6
  "engines": {
@@ -21,7 +21,8 @@ import { getTemporalCondition } from '@adobe/spacecat-shared-utils';
21
21
  * @returns {Object} Previous period with week/month and year
22
22
  */
23
23
  export function getPreviousPeriod({ week, month, year }) {
24
- if (week !== undefined) {
24
+ // Check if week is defined and valid (prioritize week over month)
25
+ if (Number.isInteger(week)) {
25
26
  // Calculate previous week
26
27
  const prevWeek = week - 1;
27
28
  if (prevWeek < 1) {
@@ -33,7 +34,7 @@ export function getPreviousPeriod({ week, month, year }) {
33
34
  return { week: prevWeek, year };
34
35
  }
35
36
 
36
- if (month !== undefined) {
37
+ if (Number.isInteger(month)) {
37
38
  // Calculate previous month
38
39
  const prevMonth = month - 1;
39
40
  if (prevMonth < 1) {
@@ -58,6 +58,11 @@ export const TrafficDataWithCWVDto = {
58
58
  * inp_score: string,
59
59
  * cls_score: string,
60
60
  * overall_cwv_score: string,
61
+ * traffic_loss: number,
62
+ * url: string,
63
+ * path: string,
64
+ * page_type: string,
65
+ * device: string,
61
66
  * }} JSON object.
62
67
  */
63
68
  toJSON: (data, thresholdConfig, baseUrl) => {
@@ -85,6 +90,7 @@ export const TrafficDataWithCWVDto = {
85
90
  path: data.path,
86
91
  page_type: data.page_type,
87
92
  device: data.device,
93
+ traffic_loss: data.traffic_loss,
88
94
  p70_lcp: lcp,
89
95
  p70_cls: cls,
90
96
  p70_inp: inp,