From 6930e91df6d9df7745688aa9ac117e2325f7c2b3 Mon Sep 17 00:00:00 2001 From: ItsSudip Date: Tue, 22 Oct 2024 16:35:08 +0530 Subject: [PATCH 1/3] feat: onboard linkedin audience destination --- .../linkedin_audience/db-config.json | 31 ++++++++++++++++ .../linkedin_audience/ui-config.json | 35 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 src/configurations/destinations/linkedin_audience/db-config.json create mode 100644 src/configurations/destinations/linkedin_audience/ui-config.json diff --git a/src/configurations/destinations/linkedin_audience/db-config.json b/src/configurations/destinations/linkedin_audience/db-config.json new file mode 100644 index 000000000..7016ebeb5 --- /dev/null +++ b/src/configurations/destinations/linkedin_audience/db-config.json @@ -0,0 +1,31 @@ +{ + "name": "LINKEDIN_AUDIENCE", + "displayName": "Linkedin Audience", + "config": { + "cdkV2Enabled": true, + "transformAtV1": "router", + "saveDestinationResponse": true, + "auth": { + "type": "OAuth", + "role": "linkedin_audience", + "rudderScopes": ["delivery"] + }, + "supportedSourceTypes": ["cloud", "warehouse"], + "supportedMessageTypes": { + "cloud": ["record"] + }, + "supportedConnectionModes": { + "cloud": ["cloud"], + "warehouse": ["cloud"] + }, + "destConfig": { + "defaultConfig": ["rudderAccountId", "hashData"], + "cloud": ["connectionMode", "oneTrustCookieCategories", "ketchConsentPurposes"], + "warehouse": ["connectionMode", "oneTrustCookieCategories", "ketchConsentPurposes"] + }, + "secretKeys": [] + }, + "options": { + "isBeta": true + } +} diff --git a/src/configurations/destinations/linkedin_audience/ui-config.json b/src/configurations/destinations/linkedin_audience/ui-config.json new file mode 100644 index 000000000..e11b909bb --- /dev/null +++ b/src/configurations/destinations/linkedin_audience/ui-config.json @@ -0,0 +1,35 @@ +{ + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Update your connection setting here", + "sections": [ + { + "groups": [ + { + "fields": [{}] + } + ] + }, + { + "groups": [ + { + "title": "Connection mode", + "note": [ + "Update how you want to route events from your source to destination. ", + { + "text": "Get help deciding.", + "link": "https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/" + } + ], + "icon": "sliders", + "fields": [] + } + ] + } + ] + } + ] + } +} From 5c526e59ba0286265196870a9ac53d11a2c14a0a Mon Sep 17 00:00:00 2001 From: ItsSudip Date: Wed, 13 Nov 2024 10:04:28 +0530 Subject: [PATCH 2/3] chore: remove unwanted parts --- .../destinations/linkedin_audience/db-config.json | 2 +- .../destinations/linkedin_audience/ui-config.json | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/configurations/destinations/linkedin_audience/db-config.json b/src/configurations/destinations/linkedin_audience/db-config.json index 7016ebeb5..d2ef3b7b7 100644 --- a/src/configurations/destinations/linkedin_audience/db-config.json +++ b/src/configurations/destinations/linkedin_audience/db-config.json @@ -19,7 +19,7 @@ "warehouse": ["cloud"] }, "destConfig": { - "defaultConfig": ["rudderAccountId", "hashData"], + "defaultConfig": ["rudderAccountId"], "cloud": ["connectionMode", "oneTrustCookieCategories", "ketchConsentPurposes"], "warehouse": ["connectionMode", "oneTrustCookieCategories", "ketchConsentPurposes"] }, diff --git a/src/configurations/destinations/linkedin_audience/ui-config.json b/src/configurations/destinations/linkedin_audience/ui-config.json index e11b909bb..c92612215 100644 --- a/src/configurations/destinations/linkedin_audience/ui-config.json +++ b/src/configurations/destinations/linkedin_audience/ui-config.json @@ -30,6 +30,11 @@ } ] } - ] + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [] + } } } From fc13343158158c588a85282db11dcb89fb5e317e Mon Sep 17 00:00:00 2001 From: ItsSudip Date: Wed, 13 Nov 2024 18:16:44 +0530 Subject: [PATCH 3/3] chore: fix test cases --- .../linkedin_audience/schema.json | 66 +++++++++ .../linkedin_audience/ui-config.json | 130 ++++++++++++++++++ 2 files changed, 196 insertions(+) create mode 100644 src/configurations/destinations/linkedin_audience/schema.json diff --git a/src/configurations/destinations/linkedin_audience/schema.json b/src/configurations/destinations/linkedin_audience/schema.json new file mode 100644 index 000000000..9b4cdf590 --- /dev/null +++ b/src/configurations/destinations/linkedin_audience/schema.json @@ -0,0 +1,66 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "oneTrustCookieCategories": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, + "ketchConsentPurposes": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + } + } + } +} diff --git a/src/configurations/destinations/linkedin_audience/ui-config.json b/src/configurations/destinations/linkedin_audience/ui-config.json index c92612215..ea373f092 100644 --- a/src/configurations/destinations/linkedin_audience/ui-config.json +++ b/src/configurations/destinations/linkedin_audience/ui-config.json @@ -35,6 +35,136 @@ "title": "Web SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "tagInput", + "label": "OneTrust consent category IDs", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "tagInput", + "label": "Ketch consent purpose IDs", + "note": "Input your Ketch consent purpose IDs by pressing 'Enter' after each entry.", + "configKey": "ketchConsentPurposes", + "tagKey": "purpose", + "placeholder": "e.g: marketing", + "default": [ + { + "purpose": "" + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } }