@adobe/spacecat-shared-google-client 1.4.62 → 1.5.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-google-client-v1.5.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-google-client-v1.4.63...@adobe/spacecat-shared-google-client-v1.5.0) (2026-02-03)
2
+
3
+
4
+ ### Features
5
+
6
+ * **google-client:** support separate OAuth client for LLMO UI ([#1311](https://github.com/adobe/spacecat-shared/issues/1311)) ([656d9e8](https://github.com/adobe/spacecat-shared/commit/656d9e8a8c7c6c2e0ce563f369aa4b1bcd629828))
7
+
8
+ # [@adobe/spacecat-shared-google-client-v1.4.63](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-google-client-v1.4.62...@adobe/spacecat-shared-google-client-v1.4.63) (2026-01-29)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update dependency @adobe/helix-universal to v5.4.0 ([#1295](https://github.com/adobe/spacecat-shared/issues/1295)) ([5c1595b](https://github.com/adobe/spacecat-shared/commit/5c1595bd7cba9b7053da867b8f46e302f8683eba))
14
+
1
15
  # [@adobe/spacecat-shared-google-client-v1.4.62](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-google-client-v1.4.61...@adobe/spacecat-shared-google-client-v1.4.62) (2025-11-28)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-google-client",
3
- "version": "1.4.62",
3
+ "version": "1.5.0",
4
4
  "description": "Shared modules of the Spacecat Services - Google Client",
5
5
  "type": "module",
6
6
  "engines": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@adobe/fetch": "4.2.3",
38
- "@adobe/helix-universal": "5.3.0",
38
+ "@adobe/helix-universal": "5.4.0",
39
39
  "@adobe/spacecat-shared-http-utils": "1.19.3",
40
40
  "@adobe/spacecat-shared-utils": "1.81.1",
41
41
  "@aws-sdk/client-secrets-manager": "3.940.0",
package/src/index.js CHANGED
@@ -73,6 +73,11 @@ export default class GoogleClient {
73
73
  const response = await client.send(command);
74
74
  const secrets = JSON.parse(response.SecretString);
75
75
 
76
+ // Check if request is from LLMO UI to use different OAuth client
77
+ const clientType = context.pathInfo?.headers?.['x-client-type'];
78
+ const llmoClientType = context.env.LLMO_CLIENT_TYPE || 'llm-optimizer-ui';
79
+ const isLlmoClient = clientType === llmoClientType;
80
+
76
81
  const config = {
77
82
  accessToken: secrets.access_token,
78
83
  refreshToken: secrets.refresh_token,
@@ -80,9 +85,15 @@ export default class GoogleClient {
80
85
  expiryDate: secrets.expiry_date,
81
86
  siteUrl: secrets.site_url,
82
87
  baseUrl: baseURL,
83
- clientId: context.env.GOOGLE_CLIENT_ID,
84
- clientSecret: context.env.GOOGLE_CLIENT_SECRET,
85
- redirectUri: context.env.GOOGLE_REDIRECT_URI,
88
+ clientId: isLlmoClient
89
+ ? context.env.LLMO_GOOGLE_CLIENT_ID
90
+ : context.env.GOOGLE_CLIENT_ID,
91
+ clientSecret: isLlmoClient
92
+ ? context.env.LLMO_GOOGLE_CLIENT_SECRET
93
+ : context.env.GOOGLE_CLIENT_SECRET,
94
+ redirectUri: isLlmoClient
95
+ ? context.env.LLMO_GOOGLE_REDIRECT_URI
96
+ : context.env.GOOGLE_REDIRECT_URI,
86
97
  };
87
98
 
88
99
  const googleClient = new GoogleClient(config, context.log);