@adobe/spacecat-shared-google-client 1.1.2 → 1.1.3

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,10 @@
1
+ # [@adobe/spacecat-shared-google-client-v1.1.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-google-client-v1.1.2...@adobe/spacecat-shared-google-client-v1.1.3) (2024-05-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * allow domain properties for organic search data ([#246](https://github.com/adobe/spacecat-shared/issues/246)) ([d692fda](https://github.com/adobe/spacecat-shared/commit/d692fda3efb89b8acbcbb5a2f2a2bcfbbd0256a5))
7
+
1
8
  # [@adobe/spacecat-shared-google-client-v1.1.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-google-client-v1.1.1...@adobe/spacecat-shared-google-client-v1.1.2) (2024-05-27)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-google-client",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Shared modules of the Spacecat Services - Google Client",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -89,8 +89,8 @@ export default class GoogleClient {
89
89
  }
90
90
 
91
91
  async getOrganicSearchData(startDate, endDate, dimensions = ['date'], rowLimit = 1000, startRow = 0) {
92
- if (!isValidUrl(this.siteUrl)) {
93
- throw new Error('Error retrieving organic search data from Google API: Invalid site URL in secret');
92
+ if (!isValidUrl(this.siteUrl) && !this.siteUrl.startsWith('sc-domain')) {
93
+ throw new Error(`Error retrieving organic search data from Google API: Invalid site URL in secret (${this.siteUrl})`);
94
94
  }
95
95
  if (!isValidDate(startDate) || !isValidDate(endDate)) {
96
96
  throw new Error('Error retrieving organic search data from Google API: Invalid date format');