From bc2a044063ff69caa0a7d368a93a9f41cc06961e Mon Sep 17 00:00:00 2001 From: Sai Sankeerth Date: Mon, 28 Oct 2024 15:20:51 +0530 Subject: [PATCH] feat: optional oauth in hubspot --- .../destinations/hs/db-config.json | 7 +++++++ .../destinations/hs/ui-config.json | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/configurations/destinations/hs/db-config.json b/src/configurations/destinations/hs/db-config.json index 0230a22f9..fa3588ba7 100644 --- a/src/configurations/destinations/hs/db-config.json +++ b/src/configurations/destinations/hs/db-config.json @@ -2,6 +2,12 @@ "name": "HS", "displayName": "HubSpot", "config": { + "auth": { + "type": "optional", + "role": "hubspot", + "rudderScopes": ["delivery"], + "authTypeField": "authorizationType" + }, "isAudienceSupported": true, "supportsVisualMapper": true, "transformAtV1": "router", @@ -51,6 +57,7 @@ "destConfig": { "defaultConfig": [ "authorizationType", + "rudderAccountId", "hubID", "apiKey", "accessToken", diff --git a/src/configurations/destinations/hs/ui-config.json b/src/configurations/destinations/hs/ui-config.json index 0eaf31f8c..5e8daaa1a 100644 --- a/src/configurations/destinations/hs/ui-config.json +++ b/src/configurations/destinations/hs/ui-config.json @@ -24,6 +24,10 @@ { "label": "Private Apps", "value": "newPrivateAppApi" + }, + { + "label": "OAuth", + "value": "OAuth" } ], "default": "legacyApiKey" @@ -64,6 +68,19 @@ ] } }, + { + "type": "OAuthField", + "configKey": "rudderAccountId", + "note": "Your Rudder Account ID (Settings -> Account -> Account ID)", + "preRequisites": { + "fields": [ + { + "configKey": "authorizationType", + "value": "OAuth" + } + ] + } + }, { "type": "singleSelect", "label": "API Version",