From 8e6a8c59963e123d9a7475013d2562854cd9ed5e Mon Sep 17 00:00:00 2001 From: a-rampalli Date: Wed, 24 Jan 2024 19:09:55 +0530 Subject: [PATCH 01/18] chore: updates hubspot image --- src/configurations/sources/singer_hubspot/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/sources/singer_hubspot/db-config.json b/src/configurations/sources/singer_hubspot/db-config.json index 0b1b874e7..ee20639b0 100644 --- a/src/configurations/sources/singer_hubspot/db-config.json +++ b/src/configurations/sources/singer_hubspot/db-config.json @@ -7,7 +7,7 @@ "oauthRole": "hubspot" }, "digest": "sha256:4e4d43d688a81ce3e166b5d7c20c0050101c43f8b50187e0da8d63a37e2b412b", - "image": "rudderstack/source-hubspot:v8.1.10", + "image": "rudderstack/source-hubspot:v8.2.4", "isBeta": false }, "type": "cloudSource" From 89b2ad81e451b3aa89fc03b3d1dfc0db9124a839 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com> Date: Wed, 24 Jan 2024 20:06:07 +0530 Subject: [PATCH 02/18] fix: supported message type for mobile integrations (#1169) --- src/configurations/destinations/adj/db-config.json | 8 ++++---- src/configurations/destinations/af/db-config.json | 10 +++++----- src/configurations/destinations/am/db-config.json | 8 ++++---- src/configurations/destinations/braze/db-config.json | 8 ++++---- src/configurations/destinations/bugsnag/db-config.json | 4 ++-- .../destinations/clevertap/db-config.json | 6 +++--- .../destinations/comscore/db-config.json | 10 ++++++++++ src/configurations/destinations/fb/db-config.json | 4 ++-- .../destinations/fullstory/db-config.json | 4 ++-- src/configurations/destinations/ga4/db-config.json | 4 ++-- src/configurations/destinations/kochava/db-config.json | 6 +++++- .../destinations/lotame_mobile/db-config.json | 4 ++-- .../destinations/moengage/db-config.json | 6 +++--- .../destinations/optimizely_fullstack/db-config.json | 4 ++-- .../destinations/tiktok_ads/db-config.json | 4 +--- 15 files changed, 51 insertions(+), 39 deletions(-) diff --git a/src/configurations/destinations/adj/db-config.json b/src/configurations/destinations/adj/db-config.json index 427055bf3..6104286c5 100644 --- a/src/configurations/destinations/adj/db-config.json +++ b/src/configurations/destinations/adj/db-config.json @@ -28,10 +28,10 @@ "supportedMessageTypes": { "cloud": ["track"], "device": { - "android": ["track"], - "ios": ["track"], - "flutter": ["track"], - "unity": ["track"] + "android": ["identify", "track"], + "ios": ["identify", "track"], + "flutter": ["identify", "track"], + "unity": ["identify", "track"] } }, "supportedConnectionModes": { diff --git a/src/configurations/destinations/af/db-config.json b/src/configurations/destinations/af/db-config.json index b85a93b79..8899d8812 100644 --- a/src/configurations/destinations/af/db-config.json +++ b/src/configurations/destinations/af/db-config.json @@ -30,11 +30,11 @@ "supportedMessageTypes": { "cloud": ["track", "screen", "page"], "device": { - "android": ["track", "screen", "page"], - "cordova": ["track", "screen", "page"], - "ios": ["track", "screen", "page"], - "flutter": ["track", "screen", "page"], - "reactnative": ["track", "screen", "page"] + "android": ["track", "screen", "identify"], + "cordova": ["track", "screen", "identify"], + "ios": ["track", "screen", "identify"], + "flutter": ["track", "screen", "identify"], + "reactnative": ["track", "screen", "identify"] } }, "supportedConnectionModes": { diff --git a/src/configurations/destinations/am/db-config.json b/src/configurations/destinations/am/db-config.json index ca3688ab5..27bac822d 100644 --- a/src/configurations/destinations/am/db-config.json +++ b/src/configurations/destinations/am/db-config.json @@ -59,10 +59,10 @@ "cloud": ["alias", "group", "identify", "page", "screen", "track"], "device": { "web": ["identify", "track", "page", "group"], - "android": ["identify", "track", "page", "group"], - "ios": ["identify", "track", "page", "group"], - "reactnative": ["identify", "track", "page", "group"], - "flutter": ["identify", "track", "page", "group"] + "android": ["identify", "track", "screen"], + "ios": ["identify", "track", "screen"], + "reactnative": ["identify", "track", "screen"], + "flutter": ["identify", "track", "screen"] } }, "supportedConnectionModes": { diff --git a/src/configurations/destinations/braze/db-config.json b/src/configurations/destinations/braze/db-config.json index e9c1c2ead..4fd489056 100644 --- a/src/configurations/destinations/braze/db-config.json +++ b/src/configurations/destinations/braze/db-config.json @@ -51,10 +51,10 @@ "cloud": ["group", "identify", "page", "screen", "track", "alias"], "device": { "web": ["identify", "track", "page"], - "android": ["identify", "track", "page"], - "ios": ["identify", "track", "page"], - "flutter": ["identify", "track", "page"], - "reactnative": ["identify", "track", "page"] + "android": ["identify", "track"], + "ios": ["identify", "track"], + "flutter": ["identify", "track"], + "reactnative": ["identify", "track"] } }, "hybridModeCloudEventsFilter": { diff --git a/src/configurations/destinations/bugsnag/db-config.json b/src/configurations/destinations/bugsnag/db-config.json index c84c9ac45..51fb2e026 100644 --- a/src/configurations/destinations/bugsnag/db-config.json +++ b/src/configurations/destinations/bugsnag/db-config.json @@ -17,8 +17,8 @@ "supportedMessageTypes": { "device": { "web": ["identify"], - "android": ["identify"], - "ios": ["identify"] + "android": ["identify", "track", "screen"], + "ios": ["identify", "track", "screen"] } }, "supportedConnectionModes": { diff --git a/src/configurations/destinations/clevertap/db-config.json b/src/configurations/destinations/clevertap/db-config.json index 75b407504..5f9e9dd20 100644 --- a/src/configurations/destinations/clevertap/db-config.json +++ b/src/configurations/destinations/clevertap/db-config.json @@ -32,9 +32,9 @@ "cloud": ["identify", "page", "screen", "track", "alias"], "device": { "web": ["identify", "track", "page"], - "android": ["identify", "track", "page"], - "ios": ["identify", "track", "page"], - "reactnative": ["identify", "track", "page"] + "android": ["identify", "track", "screen"], + "ios": ["identify", "track", "screen"], + "reactnative": ["identify", "track", "screen"] } }, "supportedConnectionModes": { diff --git a/src/configurations/destinations/comscore/db-config.json b/src/configurations/destinations/comscore/db-config.json index 15e560769..265e6892f 100644 --- a/src/configurations/destinations/comscore/db-config.json +++ b/src/configurations/destinations/comscore/db-config.json @@ -16,6 +16,16 @@ ], "excludeKeys": [], "supportedSourceTypes": ["android", "ios"], + "supportedMessageTypes": { + "device": { + "android": ["identify", "track", "screen"], + "ios": ["identify", "track", "screen"] + } + }, + "supportedConnectionModes": { + "android": ["device"], + "ios": ["device"] + }, "destConfig": { "defaultConfig": [ "publisherId", diff --git a/src/configurations/destinations/fb/db-config.json b/src/configurations/destinations/fb/db-config.json index 539d25cae..1295c2010 100644 --- a/src/configurations/destinations/fb/db-config.json +++ b/src/configurations/destinations/fb/db-config.json @@ -30,8 +30,8 @@ "supportedMessageTypes": { "cloud": ["page", "screen", "track"], "device": { - "android": ["identify", "page", "screen", "track"], - "ios": ["identify", "page", "screen", "track"] + "android": ["identify", "screen", "track"], + "ios": ["identify", "screen", "track"] } }, "supportedConnectionModes": { diff --git a/src/configurations/destinations/fullstory/db-config.json b/src/configurations/destinations/fullstory/db-config.json index 5b13f9996..06c804243 100644 --- a/src/configurations/destinations/fullstory/db-config.json +++ b/src/configurations/destinations/fullstory/db-config.json @@ -43,8 +43,8 @@ "cloud": ["track", "identify"], "device": { "web": ["identify", "track", "page"], - "android": ["identify", "track", "page", "screen"], - "ios": ["identify", "track", "page", "screen"] + "android": ["identify", "track", "screen"], + "ios": ["identify", "track", "screen"] } }, "destConfig": { diff --git a/src/configurations/destinations/ga4/db-config.json b/src/configurations/destinations/ga4/db-config.json index 1a737bd29..c85dcd8cb 100644 --- a/src/configurations/destinations/ga4/db-config.json +++ b/src/configurations/destinations/ga4/db-config.json @@ -37,8 +37,8 @@ "cloud": ["track", "group", "page"], "device": { "web": ["identify", "track", "page", "group"], - "android": ["identify", "track", "page", "group"], - "ios": ["identify", "track", "page", "group"] + "android": ["identify", "track", "screen"], + "ios": ["identify", "track", "screen"] } }, "supportedConnectionModes": { diff --git a/src/configurations/destinations/kochava/db-config.json b/src/configurations/destinations/kochava/db-config.json index bc73827e6..b3dfe303d 100644 --- a/src/configurations/destinations/kochava/db-config.json +++ b/src/configurations/destinations/kochava/db-config.json @@ -29,7 +29,11 @@ "shopify" ], "supportedMessageTypes": { - "cloud": ["screen", "track"] + "cloud": ["screen", "track"], + "device": { + "android": ["screen", "track"], + "ios": ["screen", "track"] + } }, "supportedConnectionModes": { "android": ["cloud", "device"], diff --git a/src/configurations/destinations/lotame_mobile/db-config.json b/src/configurations/destinations/lotame_mobile/db-config.json index 948843311..1373ec039 100644 --- a/src/configurations/destinations/lotame_mobile/db-config.json +++ b/src/configurations/destinations/lotame_mobile/db-config.json @@ -21,8 +21,8 @@ }, "supportedMessageTypes": { "device": { - "ios": [], - "android": [] + "ios": ["identify", "screen"], + "android": ["identify", "screen"] } }, "destConfig": { diff --git a/src/configurations/destinations/moengage/db-config.json b/src/configurations/destinations/moengage/db-config.json index 5b1d901b9..d9fde81d0 100644 --- a/src/configurations/destinations/moengage/db-config.json +++ b/src/configurations/destinations/moengage/db-config.json @@ -31,9 +31,9 @@ "cloud": ["identify", "track", "alias"], "device": { "web": ["identify", "track"], - "android": ["identify", "track"], - "ios": ["identify", "track"], - "reactnative": ["identify", "track"] + "android": ["identify", "track", "alias"], + "ios": ["identify", "track", "alias"], + "reactnative": ["identify", "track", "alias"] } }, "supportedConnectionModes": { diff --git a/src/configurations/destinations/optimizely_fullstack/db-config.json b/src/configurations/destinations/optimizely_fullstack/db-config.json index 99422063b..51a27fac4 100644 --- a/src/configurations/destinations/optimizely_fullstack/db-config.json +++ b/src/configurations/destinations/optimizely_fullstack/db-config.json @@ -44,8 +44,8 @@ "supportedMessageTypes": { "cloud": ["identify", "track", "page", "screen"], "device": { - "android": ["identify", "track", "page", "screen"], - "ios": ["identify", "track", "page", "screen"] + "android": ["identify", "track"], + "ios": ["identify", "track"] } }, "destConfig": { diff --git a/src/configurations/destinations/tiktok_ads/db-config.json b/src/configurations/destinations/tiktok_ads/db-config.json index 187e22fd8..a44df62ff 100644 --- a/src/configurations/destinations/tiktok_ads/db-config.json +++ b/src/configurations/destinations/tiktok_ads/db-config.json @@ -21,9 +21,7 @@ "supportedMessageTypes": { "cloud": ["track"], "device": { - "web": ["identify", "track", "page"], - "ios": ["identify", "track", "page"], - "android": ["identify", "track", "page"] + "web": ["identify", "track", "page"] } }, "supportedConnectionModes": { From a20bb423bea832bdc3391c6c215301752fec9743 Mon Sep 17 00:00:00 2001 From: nidhilashkari17 <108564211+nidhilashkari17@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:55:50 +0530 Subject: [PATCH 03/18] chore: updates stripe image (#1172) --- src/configurations/sources/singer_stripe/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/sources/singer_stripe/db-config.json b/src/configurations/sources/singer_stripe/db-config.json index cf9cb0d13..ba39a3225 100644 --- a/src/configurations/sources/singer_stripe/db-config.json +++ b/src/configurations/sources/singer_stripe/db-config.json @@ -3,7 +3,7 @@ "category": "singer-protocol", "displayName": "Stripe", "options": { - "image": "rudderstack/source-stripe:v8.2.3" + "image": "rudderstack/source-stripe:v8.2.5" }, "type": "cloudSource" } From fcc0bc421f741ffebe94c26d86d9382a98e8b489 Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:40:09 +0530 Subject: [PATCH 04/18] fix(braze): add filtering of appKey and restApiKey (#1138) --- .../destinations/braze/schema.json | 234 +++++++++++++++++- .../destinations/braze/ui-config.json | 51 +++- test/data/validation/destinations/braze.json | 92 ++++++- 3 files changed, 358 insertions(+), 19 deletions(-) diff --git a/src/configurations/destinations/braze/schema.json b/src/configurations/destinations/braze/schema.json index 8fa99e6ec..b2a69c6ec 100644 --- a/src/configurations/destinations/braze/schema.json +++ b/src/configurations/destinations/braze/schema.json @@ -1,17 +1,9 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": ["appKey", "restApiKey", "dataCenter"], + "required": ["dataCenter"], "type": "object", "properties": { - "appKey": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" - }, - "restApiKey": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" - }, "dataCenter": { "type": "string", "enum": [ @@ -140,6 +132,22 @@ "flutter": { "type": "string", "enum": ["cloud", "device"] + }, + "unity": { + "type": "string", + "enum": ["cloud"] + }, + "amp": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] } } }, @@ -159,6 +167,212 @@ } } } - } + }, + "additonalProperties": false, + "allOf": [ + { + "if": { + "properties": { + "connectionMode": { + "type": "object", + "anyOf": [ + { + "required": ["web"], + "properties": { + "web": { + "const": "cloud" + } + } + }, + { + "required": ["ios"], + "properties": { + "ios": { + "const": "cloud" + } + } + }, + { + "required": ["android"], + "properties": { + "android": { + "const": "cloud" + } + } + }, + { + "required": ["unity"], + "properties": { + "unity": { + "const": "cloud" + } + } + }, + { + "required": ["amp"], + "properties": { + "amp": { + "const": "cloud" + } + } + }, + { + "required": ["reactnative"], + "properties": { + "reactnative": { + "const": "cloud" + } + } + }, + { + "required": ["flutter"], + "properties": { + "flutter": { + "const": "cloud" + } + } + }, + { + "required": ["cordova"], + "properties": { + "cordova": { + "const": "cloud" + } + } + }, + { + "required": ["shopify"], + "properties": { + "shopify": { + "const": "cloud" + } + } + } + ] + } + }, + "required": ["connectionMode"] + }, + "then": { + "properties": { + "restApiKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + } + }, + "required": ["restApiKey"] + } + }, + { + "if": { + "properties": { + "connectionMode": { + "type": "object", + "anyOf": [ + { + "required": ["web"], + "properties": { + "web": { + "const": "device" + } + } + }, + { + "required": ["ios"], + "properties": { + "ios": { + "const": "device" + } + } + }, + { + "required": ["android"], + "properties": { + "android": { + "const": "device" + } + } + }, + { + "required": ["flutter"], + "properties": { + "flutter": { + "const": "device" + } + } + }, + { + "required": ["reactnative"], + "properties": { + "reactnative": { + "const": "device" + } + } + } + ] + } + }, + "required": ["connectionMode"] + }, + "then": { + "properties": { + "appKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + } + }, + "required": ["appKey"] + } + }, + { + "if": { + "properties": { + "connectionMode": { + "type": "object", + "anyOf": [ + { + "required": ["web"], + "properties": { + "web": { + "const": "hybrid" + } + } + }, + { + "required": ["ios"], + "properties": { + "ios": { + "const": "hybrid" + } + } + }, + { + "required": ["android"], + "properties": { + "android": { + "const": "hybrid" + } + } + } + ] + } + }, + "required": ["connectionMode"] + }, + "then": { + "properties": { + "restApiKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "appKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + } + }, + "required": ["restApiKey", "appKey"] + } + } + ] } } diff --git a/src/configurations/destinations/braze/ui-config.json b/src/configurations/destinations/braze/ui-config.json index 85004f69c..c285661e5 100644 --- a/src/configurations/destinations/braze/ui-config.json +++ b/src/configurations/destinations/braze/ui-config.json @@ -18,9 +18,45 @@ "configKey": "appKey", "regex": "^(.{1,100})$", "regexErrorMessage": "Invalid App Key", - "required": true, "placeholder": "e.g: f2c7c97a-XXXX-XXXX-XXXX-faffc22c7c7f", - "secret": true + "secret": true, + "preRequisites": { + "fields": [ + { + "configKey": "connectionMode.android", + "value": "device" + }, + { + "configKey": "connectionMode.ios", + "value": "device" + }, + { + "configKey": "connectionMode.flutter", + "value": "device" + }, + { + "configKey": "connectionMode.reactnative", + "value": "device" + }, + { + "configKey": "connectionMode.web", + "value": "device" + }, + { + "configKey": "connectionMode.android", + "value": "hybrid" + }, + { + "configKey": "connectionMode.ios", + "value": "hybrid" + }, + { + "configKey": "connectionMode.web", + "value": "hybrid" + } + ], + "condition": "or" + } }, { "type": "textInput", @@ -28,9 +64,16 @@ "configKey": "restApiKey", "regex": "^(.{1,100})$", "regexErrorMessage": "Invalid Rest Api Key", - "required": true, "placeholder": "e.g: 06c19c59-XXXX-XXXX-XXXX-faffc22c7c7f", - "secret": true + "secret": true, + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } }, { "type": "singleSelect", diff --git a/test/data/validation/destinations/braze.json b/test/data/validation/destinations/braze.json index ba2649504..d49c73fbf 100644 --- a/test/data/validation/destinations/braze.json +++ b/test/data/validation/destinations/braze.json @@ -14,7 +14,6 @@ }, { "config": { - "restApiKey": "3af4cd7-b40d-44cf-80ea-787029fe980b", "dataCenter": "EU-01", "useNativeSDK": { "android": false @@ -26,7 +25,12 @@ } }, "result": false, - "err": [" must have required property 'appKey'"] + "err": [ + " must have required property 'restApiKey'", + " must match \"then\" schema", + " must have required property 'appKey'", + " must match \"then\" schema" + ] }, { "config": { @@ -42,7 +46,7 @@ } }, "result": false, - "err": [" must have required property 'restApiKey'"] + "err": [" must have required property 'restApiKey'", " must match \"then\" schema"] }, { "config": { @@ -103,11 +107,15 @@ "config": { "appKey": "78100f65-3e76-464d-ba20-425b2fd81a13", "restApiKey": "78100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13", - "dataCenter": "EU-01" + "dataCenter": "EU-01", + "connectionMode": { + "web": "cloud" + } }, "result": false, "err": [ - "restApiKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"" + "restApiKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"", + " must match \"then\" schema" ] }, { @@ -211,5 +219,79 @@ } }, "result": false + }, + { + "config": { + "appKey": "78100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13", + "restApiKey": "78100f65-3e76-464d-ba20-425b2fd81a13", + "dataCenter": "EU-01", + "connectionMode": { + "android": "device" + } + }, + "result": false, + "err": [ + "appKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"", + " must match \"then\" schema" + ] + }, + { + "config": { + "appKey": "78100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13", + "restApiKey": "78100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13", + "dataCenter": "EU-01", + "connectionMode": { + "android": "hybrid" + } + }, + "result": false, + "err": [ + "restApiKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"", + "appKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"", + " must match \"then\" schema" + ] + }, + { + "config": { + "appKey": "", + "restApiKey": "78100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13", + "dataCenter": "EU-01", + "connectionMode": { + "web": "hybrid" + } + }, + "result": false, + "err": [ + "restApiKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"", + "appKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"", + " must match \"then\" schema" + ] + }, + { + "config": { + "appKey": "", + "restApiKey": "78100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13", + "dataCenter": "EU-01", + "connectionMode": { + "unity": "cloud" + } + }, + "result": false, + "err": [ + "restApiKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"", + " must match \"then\" schema" + ] + }, + { + "config": { + "appKey": "", + "restApiKey": "78100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a1378100f65-3e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a133e76-464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13464d-ba20-425b2fd81a13", + "dataCenter": "EU-01", + "connectionMode": { + "unity": "device" + } + }, + "result": false, + "err": ["connectionMode.unity must be equal to one of the allowed values"] } ] From d3da357f49cb27b3932b56dc175687be0b827f97 Mon Sep 17 00:00:00 2001 From: yeshwanth vuppu Date: Tue, 30 Jan 2024 12:47:50 +0530 Subject: [PATCH 05/18] chore: enable trino by default (#1178) --- src/configurations/sources/trino/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/sources/trino/db-config.json b/src/configurations/sources/trino/db-config.json index c3160b686..50e7e2b5a 100644 --- a/src/configurations/sources/trino/db-config.json +++ b/src/configurations/sources/trino/db-config.json @@ -3,7 +3,7 @@ "category": "warehouse", "displayName": "Trino", "options": { - "hidden": true, + "hidden": false, "syncBehaviours": ["upsert", "mirror"], "isSqlModelSupported": true, "isAudienceSupported": true From 6cd1416ae74f039e679e1d18f928259733ecec81 Mon Sep 17 00:00:00 2001 From: a-rampalli Date: Tue, 30 Jan 2024 18:25:29 +0530 Subject: [PATCH 06/18] chore: removes v2 from singer marketo --- src/configurations/sources/singer_marketo/db-config.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/configurations/sources/singer_marketo/db-config.json b/src/configurations/sources/singer_marketo/db-config.json index 6e30bf360..37fcd2599 100644 --- a/src/configurations/sources/singer_marketo/db-config.json +++ b/src/configurations/sources/singer_marketo/db-config.json @@ -1,10 +1,9 @@ { "name": "singer-marketo", "category": "singer-protocol", - "displayName": "Marketo V2", + "displayName": "Marketo", "options": { - "image": "rudderstack/source-marketo:v6.3.0", - "isBeta": true + "image": "rudderstack/source-marketo:v6.3.0" }, "type": "cloudSource" } From 11ca4bd49707e1e8b7a3f75ec4ffbbd58740bc96 Mon Sep 17 00:00:00 2001 From: yeshwanth vuppu Date: Tue, 30 Jan 2024 19:47:14 +0530 Subject: [PATCH 07/18] chore: disable trino by default (#1179) --- src/configurations/sources/trino/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/sources/trino/db-config.json b/src/configurations/sources/trino/db-config.json index 50e7e2b5a..c3160b686 100644 --- a/src/configurations/sources/trino/db-config.json +++ b/src/configurations/sources/trino/db-config.json @@ -3,7 +3,7 @@ "category": "warehouse", "displayName": "Trino", "options": { - "hidden": false, + "hidden": true, "syncBehaviours": ["upsert", "mirror"], "isSqlModelSupported": true, "isAudienceSupported": true From ebb47d90393df2680663bd93cc4b06e123ebc095 Mon Sep 17 00:00:00 2001 From: ashishRudder <74043614+ashishRudder@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:02:52 +0530 Subject: [PATCH 08/18] feat: add trino doc links (#1181) --- src/configurations/sources/trino/ui-config.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/configurations/sources/trino/ui-config.json b/src/configurations/sources/trino/ui-config.json index 65db17052..934634e2b 100644 --- a/src/configurations/sources/trino/ui-config.json +++ b/src/configurations/sources/trino/ui-config.json @@ -4,10 +4,10 @@ "title": "Connection Credentials", "secretFields": ["password"], "docLinks": { - "grantPermissions": "", - "verifyingCredentials": "", - "jsonMapperUseInstructions": "", - "setupInstructions": "" + "grantPermissions": "https://www.rudderstack.com/docs/sources/reverse-etl/trino/#granting-permissions", + "verifyingCredentials": "https://www.rudderstack.com/docs/sources/reverse-etl/trino/#what-do-the-three-validations-under-verifying-credentials-imply", + "jsonMapperUseInstructions": "https://www.rudderstack.com/docs/sources/reverse-etl/trino/#specifying-the-data-to-import", + "setupInstructions": "https://www.rudderstack.com/docs/sources/reverse-etl/trino" }, "nameField": "user", "fields": [ From 6f80bc95a28886fc69d4b9036c227494225dff3a Mon Sep 17 00:00:00 2001 From: George Bardis <109069547+bardisg@users.noreply.github.com> Date: Thu, 1 Feb 2024 11:22:33 +0200 Subject: [PATCH 09/18] feat: add generic consent management fields in initially onboarded destinations config (#1058) --- package.json | 3 +- scripts/run-schema-validation.sh | 0 scripts/schemaGenerator.py | 182 +++++-- .../destinations/customerio/db-config.json | 18 +- .../destinations/customerio/schema.json | 465 ++++++++++++++++++ .../destinations/customerio/ui-config.json | 211 ++++++-- .../destinations/ga4/db-config.json | 22 +- .../destinations/ga4/schema.json | 443 +++++++++++++++++ .../destinations/ga4/ui-config.json | 216 ++++++-- .../destinations/mp/db-config.json | 11 +- .../destinations/mp/schema.json | 419 ++++++++++++++++ .../destinations/mp/ui-config.json | 107 +++- .../destinations/snowflake/db-config.json | 12 +- .../destinations/snowflake/schema.json | 419 ++++++++++++++++ .../destinations/snowflake/ui-config.json | 107 +++- test/configData/ui-config.json | 12 + .../validation/destinations/customerio.json | 103 ++++ test/data/validation/destinations/ga4.json | 135 +++++ test/data/validation/destinations/mp.json | 98 ++++ .../validation/destinations/snowflake.json | 118 +++++ test/validation.test.ts | 8 +- 21 files changed, 2958 insertions(+), 151 deletions(-) mode change 100644 => 100755 scripts/run-schema-validation.sh diff --git a/package.json b/package.json index ad3500bb5..63938c26a 100755 --- a/package.json +++ b/package.json @@ -32,7 +32,8 @@ "update:schema:source": "python3 scripts/schemaGenerator.py source -update -name ", "check:schema:destination:all": "python3 scripts/schemaGenerator.py destination -all", "check:schema:destination": "python3 scripts/schemaGenerator.py destination -name ", - "update:schema:destination": "python3 scripts/schemaGenerator.py destination -update -name " + "update:schema:destination": "python3 scripts/schemaGenerator.py destination -update -name ", + "deploy:db:local": "python3 scripts/deployToDB.py http://localhost:5050" }, "devDependencies": { "@babel/core": "^7.21.3", diff --git a/scripts/run-schema-validation.sh b/scripts/run-schema-validation.sh old mode 100644 new mode 100755 diff --git a/scripts/schemaGenerator.py b/scripts/schemaGenerator.py index 0f99cf66e..96e590670 100644 --- a/scripts/schemaGenerator.py +++ b/scripts/schemaGenerator.py @@ -73,6 +73,8 @@ def generalize_regex_pattern(field): if defaultEnvPattern not in pattern and (('value' not in field or field['value'] != 'purpose') and ('configKey' not in field or field['configKey'] != 'purpose')): indexToPlace = pattern.find(defaultSubPattern) + len(defaultSubPattern) pattern = pattern[:indexToPlace] + '|' + defaultEnvPattern + pattern[indexToPlace:] + # TODO: we should not use a case here for the individual properties. Just pass the desired pattern as regex property + # in ketch purpose fields and delete next case elif ('value' in field and field['value'] == 'purpose') or ('configKey' in field and field['configKey'] == 'purpose'): pattern = '^(.{0,100})$' else: @@ -121,7 +123,7 @@ def is_field_present_in_default_config(field, dbConfig, schema_field_name): return False def generate_schema_for_default_checkbox(field, dbConfig, schema_field_name): - """Creates an schema object of defaultCheckbox. + """Creates a schema object of defaultCheckbox. Args: field (object): Individual field in ui-config. @@ -144,7 +146,7 @@ def generate_schema_for_default_checkbox(field, dbConfig, schema_field_name): def generate_schema_for_checkbox(field, dbConfig, schema_field_name): - """Creates an schema object of checkbox. + """Creates a schema object of checkbox. Args: field (object): Individual field in ui-config. @@ -173,7 +175,7 @@ def generate_schema_for_checkbox(field, dbConfig, schema_field_name): def generate_schema_for_textinput(field, dbConfig, schema_field_name): - """Creates an schema object of textinput. + """Creates a schema object of textinput. Args: field (object): Individual field in ui-config. @@ -204,7 +206,7 @@ def generate_schema_for_textinput(field, dbConfig, schema_field_name): def generate_schema_for_textarea_input(field, dbConfig, schema_field_name): - """Creates an schema object of textareaInput. + """Creates a schema object of textareaInput. Args: field (object): Individual field in ui-config. @@ -222,7 +224,7 @@ def generate_schema_for_textarea_input(field, dbConfig, schema_field_name): def generate_schema_for_single_select(field, dbConfig, schema_field_name): - """Creates an schema object of singleSelect. + """Creates a schema object of singleSelect. Args: field (object): Individual field in ui-config. @@ -269,7 +271,7 @@ def generate_schema_for_single_select(field, dbConfig, schema_field_name): def generate_schema_for_dynamic_custom_form(field, dbConfig, schema_field_name): - """Creates an schema object of dynamicCustomForm. + """Creates a schema object of dynamicCustomForm. Args: field (object): Individual field in ui-config. @@ -285,21 +287,39 @@ def generate_schema_for_dynamic_custom_form(field, dbConfig, schema_field_name): dynamicCustomFormItemObj = {} dynamicCustomFormItemObj["type"] = FieldTypeEnum.OBJECT.value dynamicCustomFormItemObj["properties"] = {} - for customField in field["customFields"]: - customeFieldSchemaObj = uiTypetoSchemaFn.get(customField["type"])(customField, dbConfig, schema_field_name) + allOfSchemaObj = {} + + # For old schema types customFields contains the children, for v2 its is rowFields + customFieldsKey = "customFields" + if "rowFields" in field: + customFieldsKey = "rowFields" + + allOfSchemaObj = generate_schema_for_dynamic_custom_form_allOf(field[customFieldsKey], dbConfig, schema_field_name) + + for customField in field[customFieldsKey]: + customFieldSchemaObj = uiTypetoSchemaFn.get(customField["type"])(customField, dbConfig, schema_field_name) isCustomFieldDependentOnSource = is_dest_field_dependent_on_source(customField, dbConfig, schema_field_name) - if 'pattern' not in customeFieldSchemaObj and not isCustomFieldDependentOnSource and customeFieldSchemaObj["type"]==FieldTypeEnum.STRING.value: - customeFieldSchemaObj["pattern"] = generalize_regex_pattern(customField) + + if "preRequisites" in customField: + continue + + if 'pattern' not in customFieldSchemaObj and not isCustomFieldDependentOnSource and customFieldSchemaObj["type"] == FieldTypeEnum.STRING.value and customField["type"] != "singleSelect" and customField["type"] != "dynamicSelectForm": + customFieldSchemaObj["pattern"] = generalize_regex_pattern(customField) + # If the custom field is source dependent, we remove the source keys as it's not required inside custom fields, rather they need to be moved to top. if isCustomFieldDependentOnSource: for sourceType in dbConfig["supportedSourceTypes"]: if sourceType in dbConfig["destConfig"] and field[schema_field_name] in dbConfig["destConfig"][sourceType]: - customeFieldSchemaObj = customeFieldSchemaObj["properties"][sourceType] + customFieldSchemaObj = customFieldSchemaObj["properties"][sourceType] break - dynamicCustomFormItemObj["properties"][customField[schema_field_name]] = customeFieldSchemaObj + dynamicCustomFormItemObj["properties"][customField[schema_field_name]] = customFieldSchemaObj + + if allOfSchemaObj: + dynamicCustomFormItemObj['allOf'] = allOfSchemaObj dynamicCustomFormObj["items"] = dynamicCustomFormItemObj isSourceDependent = is_dest_field_dependent_on_source(field, dbConfig, schema_field_name) + # If the field is source dependent, new schema object is created by setting the fields inside the source. if isSourceDependent: newDynamicCustomFormObj = {"type": FieldTypeEnum.OBJECT.value} @@ -308,11 +328,62 @@ def generate_schema_for_dynamic_custom_form(field, dbConfig, schema_field_name): if sourceType in dbConfig["destConfig"] and field[schema_field_name] in dbConfig["destConfig"][sourceType]: newDynamicCustomFormObj["properties"][sourceType] = dynamicCustomFormObj dynamicCustomFormObj = newDynamicCustomFormObj + return dynamicCustomFormObj + +def generate_schema_for_dynamic_custom_form_allOf(customFields, dbConfig, schema_field_name): + """Creates the allOf structure of schema, empty if not required. + - Finds the list of unique preRequisites. + - For each unique preRequisites, the properties are found by matching the current preRequisites. + - preRequisites becomes if block and corresponding properties become then block. + + Args: + customFields (collection): child fields from file content of ui-config.json. + dbConfig (object): Configurations of db-config.json. + schema_field_name (string): Specifies which key has the field's name in schema. + For old schema types, it is 'value' else 'configKey'. + + Returns: + object: allOf object of schema + """ + allOfItemList = [] + preRequisitesList = [] + + for field in customFields: + if "preRequisites" not in field: + continue + isPresent = False + for preRequisites in preRequisitesList: + if compare_pre_requisite_fields(preRequisites, field["preRequisites"]["fields"], True): + isPresent = True + break + if not isPresent: + preRequisitesList.append(field["preRequisites"]["fields"]) + + for preRequisites in preRequisitesList: + ifObj = generate_if_object(preRequisites, True) + thenObj = {"properties": {}, "required": []} + allOfItemObj = {"if": ifObj} + + for field in customFields: + if "preRequisites" not in field: + continue + if compare_pre_requisite_fields(field["preRequisites"]["fields"], preRequisites, True): + thenObj["properties"][field[schema_field_name]] = uiTypetoSchemaFn.get(field["type"])(field, dbConfig, schema_field_name) + if "required" in field and field["required"] == True: + thenObj["required"].append(field[schema_field_name]) + allOfItemObj["then"] = thenObj + allOfItemList.append(allOfItemObj) + + # Calling anyOf to check if two conditions can be grouped as anyOf. + allOfItemList = generate_schema_for_anyOf(allOfItemList, schema_field_name) + return allOfItemList + + def generate_schema_for_dynamic_form(field, dbConfig, schema_field_name): - """Creates an schema object of dynamicForm. + """Creates a schema object of dynamicForm. Args: field (object): Individual field in ui-config. @@ -363,7 +434,7 @@ def generate_key(forFieldWithTo): def generate_schema_for_dynamic_select_form(field, dbConfig, schema_field_name): - """Creates an schema object of dynamicSelectForm. + """Creates a schema object of dynamicSelectForm. Args: field (object): Individual field in ui-config. @@ -377,7 +448,7 @@ def generate_schema_for_dynamic_select_form(field, dbConfig, schema_field_name): return generate_schema_for_dynamic_form(field, dbConfig, schema_field_name) def generate_schema_for_mapping(field, dbConfig, schema_field_name): - """Creates an schema object of mapping. + """Creates a schema object of mapping. Args: field (object): Individual field in ui-config. @@ -392,7 +463,7 @@ def generate_schema_for_mapping(field, dbConfig, schema_field_name): def generate_schema_for_tag_input(field, dbConfig, schema_field_name): - """Creates an schema object of tagInput. + """Creates a schema object of tagInput. Args: field (object): Individual field in ui-config. @@ -428,7 +499,7 @@ def generate_schema_for_tag_input(field, dbConfig, schema_field_name): def generate_schema_for_time_range_picker(field, dbConfig, schema_field_name): - """Creates an schema object of timeRangePicker. + """Creates a schema object of timeRangePicker. Args: field (object): Individual field in ui-config. @@ -451,7 +522,7 @@ def generate_schema_for_time_range_picker(field, dbConfig, schema_field_name): def generate_schema_for_time_picker(field, dbConfig, schema_field_name): - """Creates an schema object of timePicker. + """Creates a schema object of timePicker. Args: field (object): Individual field in ui-config. @@ -466,26 +537,35 @@ def generate_schema_for_time_picker(field, dbConfig, schema_field_name): "type": FieldTypeEnum.STRING.value } -def compare_pre_requisite_fields(fieldA, fieldB): - """Compares two preRequisiteFields fieldA and fieldB for each property and checks if there "selectedValue" match. + +def compare_pre_requisite_fields(fieldA, fieldB, isV2 = False): + """Compares two preRequisiteFields fieldA and fieldB for each property and checks if their value matches. Args: - fieldA (list or object): contains two properties, 'name' and 'selectedValue'. - fieldB (list or object): + fieldA (list or object): contains two properties representing 'name' and 'selectedValue'. + fieldB (list or object): contains two properties representing 'name' and 'selectedValue'. + isV2 (bool): determines if new property names should be used Returns: boolean: If all the properties have the same 'name' and 'selectedValue', then it returns True else False. - """ + """ + valueKey = 'selectedValue' + nameKey = 'name' + + if isV2: + valueKey = 'value' + nameKey = 'configKey' + if type(fieldA) != type(fieldB): return False elif type(fieldA) == list: if len(fieldA) != len(fieldB): return False for i in range(0, len(fieldA)): - if fieldA[i]['name'] != fieldB[i]['name'] or fieldA[i]['selectedValue'] != fieldB[i]['selectedValue']: + if fieldA[i][nameKey] != fieldB[i][nameKey] or fieldA[i][valueKey] != fieldB[i][valueKey]: return False else: - if fieldA['name'] != fieldB['name'] or fieldA['selectedValue'] != fieldB['selectedValue']: + if fieldA[nameKey] != fieldB[nameKey] or fieldA[valueKey] != fieldB[valueKey]: return False return True @@ -514,27 +594,35 @@ def get_unique_pre_requisite_fields(uiConfig): return preRequisiteFieldsList -def generate_if_object(preRequisiteField): +def generate_if_object(preRequisiteField, isV2 = False): """Creates an if object for the given preRequisiteField. The preRequisiteField becomes an if condition in the schema. Args: preRequisiteField (list or object): contains two properties, 'name' and 'selectedValue'. + isV2 (bool): if it should use the v2 or the legacy property key names Returns: object: if block for given preRequisiteField. - """ + """ ifObj = {"properties": {}, "required": []} + valueKey = 'selectedValue' + nameKey = 'name' + + if isV2: + valueKey = 'value' + nameKey = 'configKey' + if type(preRequisiteField) == list: for field in preRequisiteField: - ifObj["properties"][field["name"]] = { - "const": field["selectedValue"] + ifObj["properties"][field[nameKey]] = { + "const": field[valueKey] } - ifObj["required"].append(field["name"]) + ifObj["required"].append(field[nameKey]) else: - ifObj["properties"][preRequisiteField["name"]] = { - "const": preRequisiteField["selectedValue"] + ifObj["properties"][preRequisiteField[nameKey]] = { + "const": preRequisiteField[valueKey] } - ifObj["required"].append(preRequisiteField["name"]) + ifObj["required"].append(preRequisiteField[nameKey]) return ifObj @@ -764,6 +852,7 @@ def generate_schema_properties(uiConfig, dbConfig, schemaObject, properties, nam if selector == 'destination': baseTemplate = uiConfig.get('baseTemplate', []) sdkTemplate = uiConfig.get('sdkTemplate', {}) + consentSettingsTemplate = uiConfig.get('consentSettingsTemplate', {}) for template in baseTemplate: for section in template.get('sections', []): for group in section.get('groups', []): @@ -785,6 +874,14 @@ def generate_schema_properties(uiConfig, dbConfig, schemaObject, properties, nam if field.get('required', False) == True and is_field_present_in_default_config(field, dbConfig, "configKey"): schemaObject['required'].append(field['configKey']) + for field in consentSettingsTemplate.get('fields', []): + generateFunction = uiTypetoSchemaFn.get(field['type'], None) + if generateFunction: + properties[field['configKey']] = generateFunction( + field, dbConfig, 'configKey') + if field.get('required', False) == True and is_field_present_in_default_config(field, dbConfig, "configKey"): + schemaObject['required'].append(field['configKey']) + # default properties in new ui-config based schemas. schemaObject['properties']['useNativeSDK'] = generate_schema_for_checkbox({"type":"checkbox", "value":"useNativeSDK"}, dbConfig, "value") @@ -890,6 +987,7 @@ def generate_warnings_for_each_type(uiConfig, dbConfig, schema, curUiType): else: baseTemplate = uiConfig.get('baseTemplate', []) sdkTemplate = uiConfig.get('sdkTemplate', {}) + consentSettingsTemplate = uiConfig.get('consentSettingsTemplate', {}) for template in baseTemplate: for section in template.get('sections', []): for group in section.get('groups', []): @@ -931,6 +1029,24 @@ def generate_warnings_for_each_type(uiConfig, dbConfig, schema, curUiType): warnings.warn("For type:{} field:{} Difference is : \n\n {} \n".format( curUiType, field["configKey"], schemaDiff), UserWarning) + for field in consentSettingsTemplate.get('fields', []): + if "preRequisites" in field: + continue + generateFunction = uiTypetoSchemaFn.get(field['type'], None) + if generateFunction: + if generateFunction and field["type"] == curUiType: + if field["configKey"] not in schema["properties"]: + warnings.warn( + f'{field["configKey"]} field is not in schema \n', UserWarning) + else: + curSchemaField = schema["properties"][field["configKey"]] + newSchemaField = uiTypetoSchemaFn.get( + curUiType)(field, dbConfig, "configKey") + schemaDiff = diff(newSchemaField, curSchemaField) + if schemaDiff: + warnings.warn("For type:{} field:{} Difference is : \n\n {} \n".format( + curUiType, field["configKey"], schemaDiff), UserWarning) + uiTypetoSchemaFn = { "defaultCheckbox": generate_schema_for_default_checkbox, diff --git a/src/configurations/destinations/customerio/db-config.json b/src/configurations/destinations/customerio/db-config.json index 310a6d308..8411d5188 100644 --- a/src/configurations/destinations/customerio/db-config.json +++ b/src/configurations/destinations/customerio/db-config.json @@ -14,6 +14,7 @@ "whitelistedEvents", "oneTrustCookieCategories", "ketchConsentPurposes", + "consentManagement", "eventFilteringOption", "sendPageNameInSDK", "dataUseInApp" @@ -53,7 +54,22 @@ "oneTrustCookieCategories", "ketchConsentPurposes" ], - "web": ["connectionMode", "dataUseInApp", "useNativeSDK", "sendPageNameInSDK"] + "android": ["consentManagement"], + "ios": ["consentManagement"], + "web": [ + "connectionMode", + "dataUseInApp", + "useNativeSDK", + "sendPageNameInSDK", + "consentManagement" + ], + "unity": ["consentManagement"], + "amp": ["consentManagement"], + "warehouse": ["consentManagement"], + "reactnative": ["consentManagement"], + "flutter": ["consentManagement"], + "cordova": ["consentManagement"], + "shopify": ["consentManagement"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/customerio/schema.json b/src/configurations/destinations/customerio/schema.json index 8c74ee62c..d34677d77 100644 --- a/src/configurations/destinations/customerio/schema.json +++ b/src/configurations/destinations/customerio/schema.json @@ -103,6 +103,471 @@ } } } + }, + "consentManagement": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } } } diff --git a/src/configurations/destinations/customerio/ui-config.json b/src/configurations/destinations/customerio/ui-config.json index 6aab25384..d1b515603 100644 --- a/src/configurations/destinations/customerio/ui-config.json +++ b/src/configurations/destinations/customerio/ui-config.json @@ -79,7 +79,7 @@ "icon": "settings", "groups": [ { - "title": "Destiantion Specific Setting", + "title": "Destination Specific Setting", "note": "Configure a few Customerio settings here", "fields": [ { @@ -97,6 +97,90 @@ } ] }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ + { + "title": "OneTrust consent settings", + "note": [ + "Enter your OneTrust consent category IDs if you have them configured. 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.", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" + }, + "about RudderStack's OneTrust Consent Management feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Consent categories", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "title": "Ketch consent purpose settings", + "note": [ + "Enter your Ketch purpose Id if you have them configured. ", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/ketch/" + }, + "about RudderStack and Ketch Consent Manager integration." + ], + "fields": [ + { + "type": "tagInput", + "label": "Purpose ID", + "note": "Input your Ketch purpose Id 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" + } + } + ] + }, { "title": "Other settings", "note": "Configure advanced RudderStack features here", @@ -178,51 +262,6 @@ } } ] - }, - { - "title": "OneTrust cookie consent settings", - "note": [ - "Enter your OneTrust category names if you have them configured. ", - { - "text": "Learn more ", - "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" - }, - "about RudderStack’s OneTrust Consent Manager feature." - ], - "fields": [ - { - "type": "tagInput", - "label": "Cookie category name", - "note": "Input your OneTrust category names by pressing ‘Enter’ after each entry", - "configKey": "oneTrustCookieCategories", - "tagKey": "oneTrustCookieCategory", - "placeholder": "e.g: Credit card visit", - "default": [ - { - "oneTrustCookieCategory": "" - } - ] - } - ] - }, - { - "title": "Ketch consent settings", - "note": "Enter your Ketch Consent Purposes if you have them configured.", - "fields": [ - { - "type": "tagInput", - "label": "Ketch consent purpose", - "note": "Input your Ketch consent purpose by pressing ‘Enter’ after each entry", - "configKey": "ketchConsentPurposes", - "tagKey": "purpose", - "placeholder": "e.g: Marketing", - "default": [ - { - "purpose": "" - } - ] - } - ] } ] } @@ -248,6 +287,86 @@ "default": false } ] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "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 + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/ga4/db-config.json b/src/configurations/destinations/ga4/db-config.json index c85dcd8cb..48278279d 100644 --- a/src/configurations/destinations/ga4/db-config.json +++ b/src/configurations/destinations/ga4/db-config.json @@ -15,9 +15,10 @@ "eventFilteringOption", "extendPageViewParams", "piiPropertiesToIgnore", - "oneTrustCookieCategories", "overrideClientAndSessionId", - "ketchConsentPurposes" + "oneTrustCookieCategories", + "ketchConsentPurposes", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -68,8 +69,8 @@ "blacklistedEvents", "eventFilteringOption", "piiPropertiesToIgnore", - "ketchConsentPurposes", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "ketchConsentPurposes" ], "web": [ "debugView", @@ -78,10 +79,17 @@ "capturePageView", "useNativeSDKToSend", "extendPageViewParams", - "overrideClientAndSessionId" + "overrideClientAndSessionId", + "consentManagement" ], - "android": ["useNativeSDK", "connectionMode"], - "ios": ["useNativeSDK", "connectionMode"] + "android": ["useNativeSDK", "connectionMode", "consentManagement"], + "ios": ["useNativeSDK", "connectionMode", "consentManagement"], + "unity": ["consentManagement"], + "amp": ["consentManagement"], + "reactnative": ["consentManagement"], + "flutter": ["consentManagement"], + "cordova": ["consentManagement"], + "shopify": ["consentManagement"] }, "secretKeys": ["apiSecret"] }, diff --git a/src/configurations/destinations/ga4/schema.json b/src/configurations/destinations/ga4/schema.json index a1dce8048..ee55cb8ad 100644 --- a/src/configurations/destinations/ga4/schema.json +++ b/src/configurations/destinations/ga4/schema.json @@ -82,6 +82,425 @@ } } }, + "consentManagement": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } + }, "capturePageView": { "type": "object", "properties": { @@ -144,6 +563,30 @@ "web": { "type": "string", "enum": ["cloud", "device", "hybrid"] + }, + "unity": { + "type": "string", + "enum": ["cloud"] + }, + "amp": { + "type": "string", + "enum": ["cloud"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] } } } diff --git a/src/configurations/destinations/ga4/ui-config.json b/src/configurations/destinations/ga4/ui-config.json index 1f0987c4c..b267e427e 100644 --- a/src/configurations/destinations/ga4/ui-config.json +++ b/src/configurations/destinations/ga4/ui-config.json @@ -146,6 +146,90 @@ } ] }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ + { + "title": "OneTrust consent settings", + "note": [ + "Enter your OneTrust consent category IDs if you have them configured. 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.", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" + }, + "about RudderStack's OneTrust Consent Management feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Consent categories", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "title": "Ketch consent purpose settings", + "note": [ + "Enter your Ketch purpose Id if you have them configured. ", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/ketch/" + }, + "about RudderStack and Ketch Consent Manager integration." + ], + "fields": [ + { + "type": "tagInput", + "label": "Purpose ID", + "note": "Input your Ketch purpose Id 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" + } + } + ] + }, { "title": "Other settings", "note": "Configure advanced RudderStack features here", @@ -232,58 +316,6 @@ } } ] - }, - { - "title": "OneTrust consent settings", - "note": [ - "Enter your OneTrust consent category IDs if you have them configured. 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.", - { - "text": "Learn more ", - "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/onetrust/" - }, - "about RudderStack's OneTrust Consent Management feature." - ], - "fields": [ - { - "type": "tagInput", - "label": "Consent categories", - "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry.", - "configKey": "oneTrustCookieCategories", - "tagKey": "oneTrustCookieCategory", - "placeholder": "e.g: C0001", - "default": [ - { - "oneTrustCookieCategory": "" - } - ] - } - ] - }, - { - "title": "Ketch consent purpose settings", - "note": [ - "Enter your Ketch purpose Id if you have them configured. ", - { - "text": "Learn more ", - "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/consent-manager/ketch/" - }, - "about RudderStack and Ketch Consent Manager integration." - ], - "fields": [ - { - "type": "tagInput", - "label": "Purpose ID", - "note": "Input your Ketch purpose Id by pressing 'Enter' after each entry", - "configKey": "ketchConsentPurposes", - "tagKey": "purpose", - "placeholder": "e.g: Marketing", - "default": [ - { - "purpose": "" - } - ] - } - ] } ] } @@ -361,6 +393,86 @@ "default": true } ] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "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 + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/mp/db-config.json b/src/configurations/destinations/mp/db-config.json index 378743d71..e313f0a10 100644 --- a/src/configurations/destinations/mp/db-config.json +++ b/src/configurations/destinations/mp/db-config.json @@ -29,6 +29,7 @@ "whitelistedEvents", "oneTrustCookieCategories", "ketchConsentPurposes", + "consentManagement", "eventFilteringOption", "identityMergeApi", "ignoreDnt" @@ -101,7 +102,15 @@ "strictMode", "ignoreDnt" ], - "web": ["useNativeSDK"] + "android": ["consentManagement"], + "web": ["useNativeSDK", "consentManagement"], + "ios": ["consentManagement"], + "unity": ["consentManagement"], + "amp": ["consentManagement"], + "reactnative": ["consentManagement"], + "flutter": ["consentManagement"], + "cordova": ["consentManagement"], + "shopify": ["consentManagement"] }, "secretKeys": ["token", "gdprApiToken"] } diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index cccaa19ae..3a20b0006 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -221,6 +221,425 @@ } } } + }, + "consentManagement": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "anyOf": [ diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index 29977215f..9a5e9c565 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -422,7 +422,19 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } }, { "type": "dynamicCustomForm", @@ -437,7 +449,98 @@ "regex": "^(.{0,100})$", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "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.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/src/configurations/destinations/snowflake/db-config.json b/src/configurations/destinations/snowflake/db-config.json index dfe0b741f..03c4c97ed 100644 --- a/src/configurations/destinations/snowflake/db-config.json +++ b/src/configurations/destinations/snowflake/db-config.json @@ -5,7 +5,6 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "includeKeys": ["oneTrustCookieCategories", "ketchConsentPurposes"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -62,7 +61,16 @@ "useRudderStorage", "oneTrustCookieCategories", "ketchConsentPurposes" - ] + ], + "android": ["consentManagement"], + "ios": ["consentManagement"], + "web": ["useNativeSDK", "consentManagement"], + "unity": ["consentManagement"], + "amp": ["consentManagement"], + "reactnative": ["consentManagement"], + "flutter": ["consentManagement"], + "cordova": ["consentManagement"], + "shopify": ["consentManagement"] }, "secretKeys": ["password", "accessKeyID", "accessKey", "accountKey", "sasToken"] } diff --git a/src/configurations/destinations/snowflake/schema.json b/src/configurations/destinations/snowflake/schema.json index b7e6f1da6..993dec98c 100644 --- a/src/configurations/destinations/snowflake/schema.json +++ b/src/configurations/destinations/snowflake/schema.json @@ -91,6 +91,425 @@ } } } + }, + "consentManagement": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + } + } } }, "allOf": [ diff --git a/src/configurations/destinations/snowflake/ui-config.json b/src/configurations/destinations/snowflake/ui-config.json index 3feccaa0c..15992e650 100644 --- a/src/configurations/destinations/snowflake/ui-config.json +++ b/src/configurations/destinations/snowflake/ui-config.json @@ -561,7 +561,19 @@ "label": "Category ID", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } }, { "type": "dynamicCustomForm", @@ -576,7 +588,98 @@ "regex": "^(.{0,100})$", "required": false } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "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.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } } ] } diff --git a/test/configData/ui-config.json b/test/configData/ui-config.json index 2c2ecef16..84c8a7207 100644 --- a/test/configData/ui-config.json +++ b/test/configData/ui-config.json @@ -134,6 +134,13 @@ ] } ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [] } ] } @@ -142,6 +149,11 @@ "title": "Web SDK settings", "note": "not visible in the ui", "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [] } } } diff --git a/test/data/validation/destinations/customerio.json b/test/data/validation/destinations/customerio.json index b4c248a94..2795eae0c 100644 --- a/test/data/validation/destinations/customerio.json +++ b/test/data/validation/destinations/customerio.json @@ -185,5 +185,108 @@ "err": [ "deviceTokenEventName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "siteID": "95bd1331112976i0ff9b", + "apiKey": "95bd1330072974f0ff9b", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "siteID": "95bd1331112976i0ff9b", + "apiKey": "95bd1330072974f0ff9b", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "siteID": "95bd1331112976i0ff9b", + "apiKey": "95bd1330072974f0ff9b", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "siteID": "95bd1331112976i0ff9b", + "apiKey": "95bd1330072974f0ff9b", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "siteID": "95bd1331112976i0ff9b", + "apiKey": "95bd1330072974f0ff9b", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/ga4.json b/test/data/validation/destinations/ga4.json index e3db15dc0..74584e071 100644 --- a/test/data/validation/destinations/ga4.json +++ b/test/data/validation/destinations/ga4.json @@ -324,5 +324,140 @@ ] }, "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiSecret": "QyWIGHj8QhG2L4ePAPiXCA", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "apiSecret": "QyWIGHj8QhG2L4ePAPiXCA", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiSecret": "QyWIGHj8QhG2L4ePAPiXCA", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "apiSecret": "QyWIGHj8QhG2L4ePAPiXCA", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiSecret": "QyWIGHj8QhG2L4ePAPiXCA", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "config": { + "apiSecret": "QyWIGHj8QhG2L4ePAPiXCA", + "debugMode": false, + "typesOfClient": "gtag", + "measurementId": "G-adfg", + "firebaseAppId": "", + "whitelistedEvents": [{ "eventName": "" }], + "blacklistedEvents": [{ "eventName": "" }], + "eventFilteringOption": "disable", + "piiPropertiesToIgnore": [{ "piiProperty": "" }], + "oneTrustCookieCategories": [{ "oneTrustCookieCategory": "" }], + "ketchConsentPurposes": [{ "purpose": "" }], + "consentManagement": { + "web": [ + { + "provider": "custom", + "resolutionStrategy": "or", + "consents": [{ "consent": "vjvh" }, { "consent": "hkvhkv" }, { "consent": "jhvjh" }] + }, + { + "provider": "oneTrust", + "resolutionStrategy": "and", + "consents": [{ "consent": "mvhvjv" }, { "consent": "jvjvjv" }] + } + ] + }, + "debugView": { "web": true }, + "useNativeSDK": { "web": false }, + "connectionMode": { "web": "cloud" }, + "capturePageView": { "web": "rs" }, + "useNativeSDKToSend": { "web": false }, + "extendPageViewParams": { "web": false }, + "overrideClientAndSessionId": { "web": true } + }, + "result": true } ] diff --git a/test/data/validation/destinations/mp.json b/test/data/validation/destinations/mp.json index 658ba1bb1..90d3d9ff1 100644 --- a/test/data/validation/destinations/mp.json +++ b/test/data/validation/destinations/mp.json @@ -214,5 +214,103 @@ "ignoreDnt must be boolean", "persistenceType must be equal to one of the allowed values" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "token": "2de18c6hf6v45201ab43d2344b0c128x", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "token": "2de18c6hf6v45201ab43d2344b0c128x", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "token": "2de18c6hf6v45201ab43d2344b0c128x", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "token": "2de18c6hf6v45201ab43d2344b0c128x", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "token": "2de18c6hf6v45201ab43d2344b0c128x", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/data/validation/destinations/snowflake.json b/test/data/validation/destinations/snowflake.json index be514ee0f..e99290d79 100644 --- a/test/data/validation/destinations/snowflake.json +++ b/test/data/validation/destinations/snowflake.json @@ -381,5 +381,123 @@ "containerName must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(?=.{3,63}$)[a-z0-9]+(-[a-z0-9]+)*$\"", " must match \"then\" schema" ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "password": "test-password", + "consentManagement": { + "web": [ + { + "provider": "custom", + "consents": [ + { + "consent": "Marketing" + } + ], + "resolutionStrategy": "or" + }, + { + "provider": "oneTrust", + "consents": [ + { + "consent": "Marketing" + } + ] + }, + { + "provider": "ketch", + "consents": [] + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "password": "test-password", + "consentManagement": { + "android": [ + { + "provider": "custom", + "resolutionStrategy": "nor" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0.resolutionStrategy must be equal to one of the allowed values", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "password": "test-password", + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management OneTrust provider config and no resolutionStrategy value", + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "password": "test-password", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "password": "test-password", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ] diff --git a/test/validation.test.ts b/test/validation.test.ts index 12e4f0ff1..86c37691c 100644 --- a/test/validation.test.ts +++ b/test/validation.test.ts @@ -19,12 +19,12 @@ command const cmdOpts = command.opts(); -function getIntegrationNames(type) { +function getIntegrationNames(type: string) { const dirPath = path.resolve(`src/configurations/${type}`); return fs.readdirSync(dirPath).filter((file) => fs.statSync(`${dirPath}/${file}`).isDirectory()); } -function getIntegrationData(name, type): Record[] { +function getIntegrationData(name: string, type: string): Record[] { // eslint-disable-next-line @typescript-eslint/no-explicit-any let intgData: any; try { @@ -120,7 +120,7 @@ describe('Validation Tests', () => { Object.keys(destTcData).forEach((dest: string, destIdx: number) => { describe(`${destIdx + 1}. Destination - ${dest}`, () => { destTcData[dest].forEach((td: Record, tcIdx: number) => { - it(`TC ${tcIdx + 1}`, () => { + it(`TC ${tcIdx + 1}${td.testTitle ? ` - ${td.testTitle}` : ''}`, async () => { if (td.result === true) { expect( validateConfig(dest, td.config as Record, 'destinations', true), @@ -139,7 +139,7 @@ describe('Validation Tests', () => { Object.keys(srcTcData).forEach((src: string, srcIdx: number) => { describe(`${srcIdx + 1}. Source - ${src}`, () => { srcTcData[src].forEach((td: Record, tcIdx: number) => { - it(`TC ${tcIdx + 1}`, () => { + it(`TC ${tcIdx + 1}${td.testTitle ? ` - ${td.testTitle}` : ''}`, async () => { if (td.result === true) { expect( validateConfig(src, td.config as Record, 'sources', true), From ae9757999030e2d1fbba990969a4e1bcf608ffb2 Mon Sep 17 00:00:00 2001 From: Mihir Bhalala <77438541+mihir-4116@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:20:06 +0530 Subject: [PATCH 10/18] feat(INT-177): move intercom to new ui (#1065) Co-authored-by: Anant Jain <62471433+anantjain45823@users.noreply.github.com> --- .../destinations/intercom/db-config.json | 19 +- .../destinations/intercom/schema.json | 145 +++++- .../destinations/intercom/ui-config.json | 471 ++++++++++++------ .../validation/destinations/intercom.json | 70 ++- 4 files changed, 519 insertions(+), 186 deletions(-) diff --git a/src/configurations/destinations/intercom/db-config.json b/src/configurations/destinations/intercom/db-config.json index 4eb738df2..1bc42b2a7 100644 --- a/src/configurations/destinations/intercom/db-config.json +++ b/src/configurations/destinations/intercom/db-config.json @@ -2,6 +2,7 @@ "name": "INTERCOM", "displayName": "Intercom", "config": { + "cdkV2Enabled": true, "supportsVisualMapper": true, "transformAtV1": "router", "saveDestinationResponse": true, @@ -13,8 +14,7 @@ "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", - "eventFilteringOption", - "updateLastRequestAt" + "eventFilteringOption" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -51,19 +51,20 @@ }, "destConfig": { "defaultConfig": [ - "apiKey", "appId", - "collectContext", + "apiKey", + "apiServer", + "apiVersion", "sendAnonymousId", "blacklistedEvents", "whitelistedEvents", + "updateLastRequestAt", "eventFilteringOption", - "oneTrustCookieCategories", - "updateLastRequestAt" + "oneTrustCookieCategories" ], - "android": ["useNativeSDK", "mobileApiKeyAndroid"], - "ios": ["useNativeSDK", "mobileApiKeyIOS"], - "web": ["useNativeSDK"] + "android": ["useNativeSDK", "connectionMode", "mobileApiKeyAndroid"], + "ios": ["useNativeSDK", "connectionMode", "mobileApiKeyIOS"], + "web": ["useNativeSDK", "connectionMode"] }, "secretKeys": [] } diff --git a/src/configurations/destinations/intercom/schema.json b/src/configurations/destinations/intercom/schema.json index 5684fe8dd..3c90346f4 100644 --- a/src/configurations/destinations/intercom/schema.json +++ b/src/configurations/destinations/intercom/schema.json @@ -1,16 +1,18 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": ["apiKey", "appId"], + "required": [], "type": "object", "properties": { - "apiKey": { + "apiServer": { "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + "enum": ["standard", "eu", "au"], + "default": "standard" }, - "appId": { + "apiVersion": { "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + "enum": ["v1", "v2"], + "default": "v2" }, "mobileApiKeyAndroid": { "type": "object", @@ -30,24 +32,6 @@ } } }, - "useNativeSDK": { - "type": "object", - "properties": { - "android": { - "type": "boolean" - }, - "ios": { - "type": "boolean" - }, - "web": { - "type": "boolean" - } - } - }, - "collectContext": { - "type": "boolean", - "default": false - }, "sendAnonymousId": { "type": "boolean", "default": false @@ -96,7 +80,120 @@ } } } + }, + "useNativeSDK": { + "type": "object", + "properties": { + "android": { + "type": "boolean" + }, + "ios": { + "type": "boolean" + }, + "web": { + "type": "boolean" + } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "android": { + "type": "string", + "enum": ["cloud", "device"] + }, + "ios": { + "type": "string", + "enum": ["cloud", "device"] + }, + "web": { + "type": "string", + "enum": ["cloud", "device"] + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "connectionMode": { + "type": "object", + "additionalProperties": false, + "properties": { + "web": { + "const": "device" + }, + "ios": { + "const": "device" + }, + "android": { + "const": "device" + } + } + } + }, + "required": ["connectionMode"] + }, + "then": { + "properties": { + "appId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + } + }, + "required": ["appId"] + } + }, + { + "if": { + "properties": { + "connectionMode": { + "type": "object", + "additionalProperties": false, + "properties": { + "web": { + "const": "cloud" + }, + "ios": { + "const": "cloud" + }, + "android": { + "const": "cloud" + }, + "unity": { + "const": "cloud" + }, + "amp": { + "const": "cloud" + }, + "reactnative": { + "const": "cloud" + }, + "flutter": { + "const": "cloud" + }, + "cordova": { + "const": "cloud" + }, + "shopify": { + "const": "cloud" + } + } + } + }, + "required": ["connectionMode"] + }, + "then": { + "properties": { + "apiKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + } + }, + "required": ["apiKey"] + } } - } + ] } } diff --git a/src/configurations/destinations/intercom/ui-config.json b/src/configurations/destinations/intercom/ui-config.json index 2cf814625..37b51d543 100644 --- a/src/configurations/destinations/intercom/ui-config.json +++ b/src/configurations/destinations/intercom/ui-config.json @@ -1,156 +1,347 @@ { - "uiConfig": [ - { - "title": "1. Connection Settings", + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "Connection Settings", + "note": "Update your connection settings here", + "icon": "settings", + "fields": [ + { + "type": "textInput", + "label": "Access Token", + "configKey": "apiKey", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Access Token", + "placeholder": "e.g: FGHrOjU4ZDc0MjEyXzhjYmNfNDZmYl85ODUxX2RjZDk0Mzk1M2VlMDoxOjA=", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + }, + { + "type": "singleSelect", + "label": "Intercom REST API Version", + "configKey": "apiVersion", + "options": [ + { + "label": "1.4", + "value": "v1" + }, + { + "label": "latest", + "value": "v2" + } + ], + "default": "v2", + "note": "Select your Intercom REST API Version to send data to intercom. Rudderstack supports both versions for backward compatibity", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + }, + { + "type": "singleSelect", + "label": "API Server", + "configKey": "apiServer", + "options": [ + { + "label": "Standard", + "value": "standard" + }, + { + "label": "EU", + "value": "eu" + }, + { + "label": "AU", + "value": "au" + } + ], + "default": "standard", + "note": "Select your Intercom API Server", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + }, + { + "configKey": "apiVersion", + "value": "v2" + } + ], + "condition": "and" + } + }, + { + "type": "textInput", + "label": "App Id", + "configKey": "appId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid App Id", + "note": "Intercom appId. Applicable to device mode only", + "placeholder": "e.g: fll5vd90", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.webDevice", + "value": true + }, + { + "configKey": "connectionModes.mobileDevice", + "value": true + } + ], + "condition": "or" + } + } + ] + } + ] + }, + { + "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": [] + } + ] + } + ] + }, + { + "title": "Configuration settings", + "note": "Manage the settings for your destination", + "sections": [ + { + "title": "Destination settings", + "note": "Configure advanced destination-specific settings here", + "icon": "settings", + "groups": [ + { + "title": "Intercom IT", + "fields": [ + { + "type": "checkbox", + "label": "Send AnonymousId as Secondary UserId", + "configKey": "sendAnonymousId", + "default": false, + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + }, + { + "type": "checkbox", + "label": "Enable this to update the last seen to the current time", + "configKey": "updateLastRequestAt", + "default": true, + "note": [ + "For more details refer update_last_request_at in this ", + { + "text": "link", + "link": "https://developers.intercom.com/intercom-api-reference/v1.2/reference/updating-the-last-seen-time" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + }, + { + "configKey": "apiVersion", + "value": "v1" + } + ], + "condition": "and" + } + } + ] + } + ] + }, + { + "title": "Other settings", + "note": "Configure advanced RudderStack features here", + "icon": "otherSettings", + "groups": [ + { + "title": "Client-side event filtering", + "note": "Decide what events are allowed (allowlisting) and blocked (denylisting)", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.webDevice", + "value": true + }, + { + "configKey": "connectionModes.mobileDevice", + "value": true + } + ], + "condition": "or" + }, + "fields": [ + { + "type": "singleSelect", + "label": "Choose if you want to turn on events filtering:", + "configKey": "eventFilteringOption", + "note": "You must select either allowlist or denylist to enable events filtering", + "options": [ + { + "label": "No events filtering", + "value": "disable" + }, + { + "label": "Filter via allowlist", + "value": "whitelistedEvents" + }, + { + "label": "Filter via denylist", + "value": "blacklistedEvents" + } + ], + "default": "disable" + }, + { + "type": "tagInput", + "label": "Allowlisted events", + "note": "Input separate events by pressing ‘Enter’.\nInput the events you want to allowlist.", + "configKey": "whitelistedEvents", + "tagKey": "eventName", + "placeholder": "e.g: Anonymous page visit", + "default": [ + { + "eventName": "" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "eventFilteringOption", + "value": "whitelistedEvents" + } + ] + } + }, + { + "type": "tagInput", + "label": "Denylisted events", + "note": "Input separate events by pressing ‘Enter’.\nInput the events you want to denylist. ", + "configKey": "blacklistedEvents", + "tagKey": "eventName", + "placeholder": "e.g: Anonymous page visit", + "default": [ + { + "eventName": "" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "eventFilteringOption", + "value": "blacklistedEvents" + } + ] + } + } + ] + }, + { + "title": "OneTrust cookie consent settings", + "note": [ + "Enter your OneTrust category names if you have them configured. ", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" + }, + "about RudderStack’s OneTrust Consent Manager feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Cookie category name", + "note": "Input your OneTrust category names by pressing ‘Enter’ after each entry", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: Credit card visit", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", "fields": [ { "type": "textInput", - "label": "Access Token", - "value": "apiKey", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "regexErrorMessage": "Invalid Access Token", - "required": true, - "placeholder": "e.g: FGHrOjU4ZDc0MjEyXzhjYmXXXXX85ODUxX2RjZXX0Mzk1M2VlMDoxOjA=" - }, - { - "type": "textInput", - "label": "App Id", - "value": "appId", + "label": "iOS API Key", + "configKey": "mobileApiKeyIOS", "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "regexErrorMessage": "Invalid App Id", - "required": true, - "placeholder": "e.g: fll5Xd90" + "regexErrorMessage": "Invalid iOS API Key", + "placeholder": "e.g: ios_sdk-5fe73e0bb7fcae17a1a75fdbad227191a69f6c00", + "preRequisites": { + "fields": [ + { + "configKey": "connectionMode.ios", + "value": "device" + } + ] + } }, { "type": "textInput", "label": "Android API Key", - "value": "mobileApiKeyAndroid", + "configKey": "mobileApiKeyAndroid", "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", "regexErrorMessage": "Invalid Android API Key", - "required": false, - "placeholder": "e.g: android_sdk-67f114561f2267e2XXX6e6687bc7a9ba455cf90" - }, - { - "type": "textInput", - "label": "iOS API Key", - "value": "mobileApiKeyIOS", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "regexErrorMessage": "Invalid iOS API Key", - "required": false, - "placeholder": "e.g: ios_sdk-5fe73e0bb7fcaeXXXXa75fdbad227191a69f6c00" - } - ] - }, - { - "title": "2. Native SDK", - "fields": [ - { - "type": "checkbox", - "label": "Use device-mode to send events", - "value": "useNativeSDK", - "default": false - } - ] - }, - { - "title": "3. Other Setttings", - "fields": [ - { - "type": "checkbox", - "label": "Include Context with Identify Calls", - "value": "collectContext", - "default": false - }, - { - "type": "checkbox", - "label": "Send AnonymousId as Secondary UserId", - "value": "sendAnonymousId", - "default": false - }, - { - "type": "checkbox", - "label": "Enable this to update the last seen to the current time", - "value": "updateLastRequestAt", - "footerNote": "For more details refer update_last_request_at in this link https://developers.intercom.com/intercom-api-reference/v1.2/reference/updating-the-last-seen-time", - "default": true - } - ] - }, - { - "title": "Client-side Events Filtering", - "sectionNote": "Applicable only for device-mode integrations. If enabled, it works only with either allowlisted or denylisted events", - "fields": [ - { - "type": "singleSelect", - "value": "eventFilteringOption", - "required": false, - "options": [ - { - "name": "Disable", - "value": "disable" - }, - { - "name": "Allowlist", - "value": "whitelistedEvents" - }, - { - "name": "Denylist", - "value": "blacklistedEvents" - } - ], - "defaultOption": { - "name": "Disable", - "value": "disable" + "placeholder": "e.g: android_sdk-67f114561f2267e242466e6687bc7a9ba455cf90", + "preRequisites": { + "fields": [ + { + "configKey": "connectionMode.android", + "value": "device" + } + ] } - }, - { - "type": "dynamicCustomForm", - "value": "whitelistedEvents", - "label": "Allowlist", - "customFields": [ - { - "type": "textInput", - "value": "eventName", - "required": false, - "placeholder": "e.g: Anonymous Page Visit" - } - ] - }, - { - "type": "dynamicCustomForm", - "value": "blacklistedEvents", - "label": "Denylist", - "customFields": [ - { - "type": "textInput", - "value": "eventName", - "required": false, - "placeholder": "e.g: Credit Card Added" - } - ] - } - ] - }, - { - "title": "Consent Settings", - "fields": [ - { - "type": "dynamicCustomForm", - "value": "oneTrustCookieCategories", - "label": "OneTrust Consent Categories", - "footerNote": "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.", - "customFields": [ - { - "type": "textInput", - "placeholder": "C0001", - "value": "oneTrustCookieCategory", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "label": "Category ID", - "required": false - } - ] } ] } - ] + } } diff --git a/test/data/validation/destinations/intercom.json b/test/data/validation/destinations/intercom.json index 6cd1dc34b..33783efe6 100644 --- a/test/data/validation/destinations/intercom.json +++ b/test/data/validation/destinations/intercom.json @@ -1,9 +1,10 @@ [ { "config": { - "apiKey": "cdsfvgertefdvcdfgrtfvdgrfvd", - "useNativeSDK": { - "web": false + "appId": "", + "apiVersion": "v2", + "connectionMode": { + "ios": "cloud" }, "blacklistedEvents": [ { @@ -21,21 +22,40 @@ "eventFilteringOption": "blacklistedEvents", "oneTrustCookieCategories": [ { - "oneTrustCookieCategory": "Sales" - }, + "oneTrustCookieCategory": "" + } + ] + }, + "result": false, + "err": [" must have required property 'apiKey'", " must match \"then\" schema"] + }, + { + "config": { + "apiKey": "", + "apiVersion": "v2", + "connectionMode": { "web": "cloud" }, + "blacklistedEvents": [{ "eventName": "Pin Generated" }, { "eventName": "Pin Expired" }], + "whitelistedEvents": [{ "eventName": "" }], + "eventFilteringOption": "blacklistedEvents", + "oneTrustCookieCategories": [ { - "oneTrustCookieCategory": "Marketing" + "oneTrustCookieCategory": "" } ] }, "result": false, - "err": [" must have required property 'appId'"] + "err": [ + "apiKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"", + " must match \"then\" schema" + ] }, { "config": { - "appId": "bhjjknlmnbhjnklm", "useNativeSDK": { - "web": false + "web": true + }, + "connectionMode": { + "web": "device" }, "blacklistedEvents": [ { @@ -58,14 +78,16 @@ ] }, "result": false, - "error": [" must have required property 'apiKey'"] + "err": [" must have required property 'appId'", " must match \"then\" schema"] }, { "config": { - "apiKey": "dfvgtbheygrefdbfgtyhrgfghtgrfdv", - "appId": "bhjjknlmnbhjnklm", + "appId": "", "useNativeSDK": { - "web": false + "web": true + }, + "connectionMode": { + "web": "device" }, "blacklistedEvents": [ { @@ -87,6 +109,28 @@ } ] }, + "result": false, + "err": [ + "appId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"", + " must match \"then\" schema" + ] + }, + { + "config": { + "apiKey": "dfvgtbheygrefdbfgtyhrgfghtgrfdv", + "appId": "bhjjknlmnbhjnklm", + "apiServer": "standard", + "apiVersion": "v2", + "useNativeSDK": { "web": false }, + "blacklistedEvents": [{ "eventName": "Pin Generated" }, { "eventName": "Pin Expired" }], + "whitelistedEvents": [{ "eventName": "" }], + "eventFilteringOption": "blacklistedEvents", + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "" + } + ] + }, "result": true } ] From bd4001e1ef153866bc17ec77fab5b71040cd9f75 Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:20:39 +0530 Subject: [PATCH 11/18] feat: onboard new destination (#1171) --- .../destinations/rakuten/db-config.json | 47 +++++++++++++++ .../destinations/rakuten/schema.json | 13 +++++ .../destinations/rakuten/ui-config.json | 58 +++++++++++++++++++ .../data/validation/destinations/rakuten.json | 13 +++++ 4 files changed, 131 insertions(+) create mode 100644 src/configurations/destinations/rakuten/db-config.json create mode 100644 src/configurations/destinations/rakuten/schema.json create mode 100644 src/configurations/destinations/rakuten/ui-config.json create mode 100644 test/data/validation/destinations/rakuten.json diff --git a/src/configurations/destinations/rakuten/db-config.json b/src/configurations/destinations/rakuten/db-config.json new file mode 100644 index 000000000..b2cd49308 --- /dev/null +++ b/src/configurations/destinations/rakuten/db-config.json @@ -0,0 +1,47 @@ +{ + "name": "RAKUTEN", + "displayName": "Rakuten", + "config": { + "cdkV2Enabled": true, + "transformAtV1": "processor", + "saveDestinationResponse": true, + "includeKeys": ["mid"], + "excludeKeys": [], + "supportedSourceTypes": [ + "android", + "ios", + "unity", + "amp", + "web", + "cloud", + "warehouse", + "reactnative", + "flutter", + "cordova", + "shopify" + ], + "supportedMessageTypes": { + "cloud": ["track"] + }, + "supportedConnectionModes": { + "web": ["cloud"], + "android": ["cloud"], + "ios": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "shopify": ["cloud"], + "warehouse": ["cloud"], + "cloud": ["cloud"] + }, + "destConfig": { + "defaultConfig": ["mid"] + }, + "secretKeys": ["mid"] + }, + "options": { + "isBeta": true + } +} diff --git a/src/configurations/destinations/rakuten/schema.json b/src/configurations/destinations/rakuten/schema.json new file mode 100644 index 000000000..4f836d99a --- /dev/null +++ b/src/configurations/destinations/rakuten/schema.json @@ -0,0 +1,13 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": ["mid"], + "type": "object", + "properties": { + "mid": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } +} diff --git a/src/configurations/destinations/rakuten/ui-config.json b/src/configurations/destinations/rakuten/ui-config.json new file mode 100644 index 000000000..7c61c7ed5 --- /dev/null +++ b/src/configurations/destinations/rakuten/ui-config.json @@ -0,0 +1,58 @@ +{ + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "Connection settings", + "note": "Update your connection settings here", + "icon": "settings", + "fields": [ + { + "type": "textInput", + "label": "Merchant ID", + "configKey": "mid", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid Marketing ID", + "placeholder": "e.g: *3**4", + "note": "Enter your static numeric merchant ID (to identify you in the Rakuten Marketing system) provided to you by Rakuten Marketing" + } + ] + } + ] + }, + { + "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": [] + } + ] + } + ] + }, + { + "title": "Configuration settings", + "note": "No configuration settings for this destination", + "sections": [] + } + ], + "sdkTemplate": { + "title": "SDK settings", + "note": "not visible in the ui", + "fields": [] + } + } +} diff --git a/test/data/validation/destinations/rakuten.json b/test/data/validation/destinations/rakuten.json new file mode 100644 index 000000000..be9ef62ad --- /dev/null +++ b/test/data/validation/destinations/rakuten.json @@ -0,0 +1,13 @@ +[ + { + "config": { + "mid": "1234595bd1331112976i0ff9b" + }, + "result": true + }, + { + "config": {}, + "result": false, + "err": [" must have required property 'mid'"] + } +] From 62a2e2bf61277946ad7e5d6a52c7e2775b1d85bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:31:24 +0530 Subject: [PATCH 12/18] chore(release): pull main into develop post release v1.63.1 (#1175) Co-authored-by: devops-github-rudderstack <88187154+devops-github-rudderstack@users.noreply.github.com> Co-authored-by: nidhilashkari17 <108564211+nidhilashkari17@users.noreply.github.com> Co-authored-by: a-rampalli Co-authored-by: GitHub Actions --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- src/configurations/sources/singer_salesforce/db-config.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdf5c890b..093fe6469 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.63.1](https://github.com/rudderlabs/rudder-config-schema/compare/v1.63.0...v1.63.1) (2024-01-29) + ## [1.63.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.62.1...v1.63.0) (2024-01-22) diff --git a/package-lock.json b/package-lock.json index e0de2f71f..418566f09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.63.0", + "version": "1.63.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.63.0", + "version": "1.63.1", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 63938c26a..2d14ea83a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.63.0", + "version": "1.63.1", "description": "", "main": "src/index.ts", "private": true, diff --git a/src/configurations/sources/singer_salesforce/db-config.json b/src/configurations/sources/singer_salesforce/db-config.json index ad452bb2b..0fa54c3f0 100644 --- a/src/configurations/sources/singer_salesforce/db-config.json +++ b/src/configurations/sources/singer_salesforce/db-config.json @@ -7,7 +7,7 @@ "oauthRole": "singer-salesforce" }, "isBeta": false, - "image": "rudderstack/source-salesforce:v4.0.5-alpha.dc36e92d3b" + "image": "rudderstack/source-salesforce:v8.2.6" }, "type": "cloudSource" } From 6e7901a1feb1cda145a46b5bafac298843e6646e Mon Sep 17 00:00:00 2001 From: nidhilashkari17 <108564211+nidhilashkari17@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:46:21 +0530 Subject: [PATCH 13/18] chore: update google ads api version (#1185) --- src/configurations/sources/singer_google_ads/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/sources/singer_google_ads/db-config.json b/src/configurations/sources/singer_google_ads/db-config.json index 08c2bb53b..571ec0532 100644 --- a/src/configurations/sources/singer_google_ads/db-config.json +++ b/src/configurations/sources/singer_google_ads/db-config.json @@ -6,7 +6,7 @@ "auth": { "provider": "Google" }, - "image": "rudderstack/source-google-ads:v6.2.0-fix-google-ads-validation-check" + "image": "rudderstack/source-google-ads:v8.2.7" }, "type": "cloudSource" } From f17106d5043788af3066ce9d573790d311d16437 Mon Sep 17 00:00:00 2001 From: nidhilashkari17 <108564211+nidhilashkari17@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:46:39 +0530 Subject: [PATCH 14/18] chore: update shopify image (#1184) --- src/configurations/sources/singer_shopify/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/sources/singer_shopify/db-config.json b/src/configurations/sources/singer_shopify/db-config.json index c0655908d..6ef782fc3 100644 --- a/src/configurations/sources/singer_shopify/db-config.json +++ b/src/configurations/sources/singer_shopify/db-config.json @@ -3,7 +3,7 @@ "category": "singer-protocol", "displayName": "Shopify", "options": { - "image": "rudderstack/source-shopify:v8.1.0" + "image": "rudderstack/source-shopify:v8.2.9" }, "type": "cloudSource" } From 373845ab68afd0151220b5afeac0aa651d205f79 Mon Sep 17 00:00:00 2001 From: nidhilashkari17 <108564211+nidhilashkari17@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:46:53 +0530 Subject: [PATCH 15/18] chore: update facebook marketing api version to v18.0 (#1183) --- .../sources/singer_facebook_marketing/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/sources/singer_facebook_marketing/db-config.json b/src/configurations/sources/singer_facebook_marketing/db-config.json index cfaab6937..42f57300f 100644 --- a/src/configurations/sources/singer_facebook_marketing/db-config.json +++ b/src/configurations/sources/singer_facebook_marketing/db-config.json @@ -3,7 +3,7 @@ "category": "singer-protocol", "displayName": "Facebook Ads", "options": { - "image": "rudderstack/source-facebook-marketing:v8.2.1" + "image": "rudderstack/source-facebook-marketing:v8.2.8" }, "type": "cloudSource" } From 2bfdb1d3650a0d931996d48b5b4f4e689ccd5224 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:09:52 +0530 Subject: [PATCH 16/18] feat: trade desk real time conversions (#1155) --- .../the_trade_desk/db-config.json | 31 +++- .../destinations/the_trade_desk/schema.json | 46 +++++- .../the_trade_desk/ui-config.json | 154 ++++++++++++++++++ .../destinations/the_trade_desk.json | 21 ++- 4 files changed, 247 insertions(+), 5 deletions(-) diff --git a/src/configurations/destinations/the_trade_desk/db-config.json b/src/configurations/destinations/the_trade_desk/db-config.json index cd8efbb4d..561963d52 100644 --- a/src/configurations/destinations/the_trade_desk/db-config.json +++ b/src/configurations/destinations/the_trade_desk/db-config.json @@ -9,12 +9,34 @@ "disableJsonMapper": true, "isAudienceSupported": true, "supportsVisualMapper": true, - "supportedSourceTypes": ["warehouse"], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "warehouse", + "reactnative", + "flutter", + "cordova", + "shopify" + ], "supportedMessageTypes": { - "cloud": ["record"] + "cloud": ["record", "track"] }, "supportedConnectionModes": { - "warehouse": ["cloud"] + "android": ["cloud"], + "ios": ["cloud"], + "web": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "cloud": ["cloud"], + "warehouse": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "shopify": ["cloud"] }, "syncBehaviours": ["mirror"], "destConfig": { @@ -22,7 +44,10 @@ "audienceId", "advertiserId", "advertiserSecretKey", + "customProperties", "dataServer", + "eventsMapping", + "trackerId", "ttlInDays", "oneTrustCookieCategories" ] diff --git a/src/configurations/destinations/the_trade_desk/schema.json b/src/configurations/destinations/the_trade_desk/schema.json index 5d7bf4421..6258c81f6 100644 --- a/src/configurations/destinations/the_trade_desk/schema.json +++ b/src/configurations/destinations/the_trade_desk/schema.json @@ -1,7 +1,7 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": ["advertiserId", "advertiserSecretKey", "dataServer"], + "required": ["advertiserId", "advertiserSecretKey", "trackerId", "dataServer"], "type": "object", "properties": { "audienceId": { @@ -20,6 +20,10 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^([0-9]|[1-9][0-9]|1[0-7][0-9]|180)$" }, + "trackerId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, "dataServer": { "type": "string", "enum": ["apac", "tokyo", "usEastCoast", "usWestCoast", "ukEu", "china"], @@ -40,9 +44,49 @@ "connectionMode": { "type": "object", "properties": { + "android": { + "type": "string", + "enum": ["cloud"] + }, + "ios": { + "type": "string", + "enum": ["cloud"] + }, + "web": { + "type": "string", + "enum": ["cloud"] + }, + "unity": { + "type": "string", + "enum": ["cloud"] + }, + "amp": { + "type": "string", + "enum": ["cloud"] + }, + "cloud": { + "type": "string", + "enum": ["cloud"] + }, "warehouse": { "type": "string", "enum": ["cloud"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] } } } diff --git a/src/configurations/destinations/the_trade_desk/ui-config.json b/src/configurations/destinations/the_trade_desk/ui-config.json index 64cb50bb1..a45abd74b 100644 --- a/src/configurations/destinations/the_trade_desk/ui-config.json +++ b/src/configurations/destinations/the_trade_desk/ui-config.json @@ -31,6 +31,15 @@ "placeholder": "e.g: u8a7f3k9p2nXXXXX4q5r2m8d7z1o9", "secret": true }, + { + "type": "textInput", + "label": "Tracking Tag ID", + "note": "Tracking tag ID from advertiser preferences page in the TTD platform UI. If you can't find your tracking tag ID, contact your Technical Account Manager.", + "configKey": "trackerId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Tracking Tag ID", + "placeholder": "e.g: hcXXXke" + }, { "type": "singleSelect", "label": "Data Server", @@ -147,12 +156,157 @@ ] } ] + }, + { + "title": "Event mapping", + "note": "Map RudderStack to Trade Desk events", + "hideEditIcon": true, + "sections": [ + { + "groups": [ + { + "title": "RudderStack to Trade Desk event mappings", + "fields": [ + { + "type": "redirect", + "redirectGroupKey": "eventAndPropertiesMapping", + "label": "Event and property mappings", + "note": "Map RudderStack events/properties to Trade Desk events/properties" + } + ] + } + ] + } + ] } ], "sdkTemplate": { "title": "SDK settings", "note": "not visible in the ui", "fields": [] + }, + "redirectGroups": { + "eventAndPropertiesMapping": { + "tabs": [ + { + "name": "Event", + "fields": [ + { + "type": "mapping", + "label": "Map your RudderStack Events to Trade Desk Events", + "note": "Enter the input event name which you want to map with a Trade Desk Event Name", + "configKey": "eventsMapping", + "default": [], + "columns": [ + { + "type": "textInput", + "key": "from", + "label": "RudderStack Event", + "placeholder": "e.g: Product Searched" + }, + { + "type": "singleSelect", + "key": "to", + "label": "Trade Desk Event", + "options": [ + { + "name": "searchitem", + "value": "searchitem" + }, + { + "name": "searchcategory", + "value": "searchcategory" + }, + { + "name": "login", + "value": "login" + }, + { + "name": "messagebusiness", + "value": "messagebusiness" + }, + { + "name": "direction", + "value": "direction" + }, + { + "name": "sitevisit", + "value": "sitevisit" + } + ] + } + ] + } + ] + }, + { + "name": "Custom properties", + "fields": [ + { + "type": "mapping", + "label": "Map custom properties", + "configKey": "customProperties", + "default": [], + "columns": [ + { + "type": "textInput", + "key": "rudderProperty", + "label": "RudderStack property path", + "placeholder": "e.g properties.key1" + }, + { + "type": "singleSelect", + "key": "tradeDeskProperty", + "label": "Trade Desk custom property", + "options": [ + { + "label": "td1", + "value": "td1" + }, + { + "label": "td2", + "value": "td2" + }, + { + "label": "td3", + "value": "td3" + }, + { + "label": "td4", + "value": "td4" + }, + { + "label": "td5", + "value": "td5" + }, + { + "label": "td6", + "value": "td6" + }, + { + "label": "td7", + "value": "td7" + }, + { + "label": "td8", + "value": "td8" + }, + { + "label": "td9", + "value": "td9" + }, + { + "label": "td10", + "value": "td10" + } + ] + } + ] + } + ] + } + ] + } } } } diff --git a/test/data/validation/destinations/the_trade_desk.json b/test/data/validation/destinations/the_trade_desk.json index 349b2c492..78d75059e 100644 --- a/test/data/validation/destinations/the_trade_desk.json +++ b/test/data/validation/destinations/the_trade_desk.json @@ -4,12 +4,25 @@ "audienceId": "test-segment", "advertiserId": "test-advertiserId", "advertiserSecretKey": "test-advertiserSecretKey", + "trackerId": "test-trackerId", "segmentName": "test-segment", "dataServer": "usEastCoast", "oneTrustCookieCategories": [ { "oneTrustCookieCategory": "Marketing" } + ], + "eventsMapping": [ + { + "from": "Product Added", + "to": "addToCart" + } + ], + "customProperties": [ + { + "rudderProperty": "properties.key1", + "tradeDeskProperty": "td1" + } ] }, "result": true @@ -18,6 +31,7 @@ "config": { "audienceId": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", "advertiserId": "test-advertiserId", + "trackerId": "test-trackerId", "advertiserSecretKey": "test-advertiserSecretKey", "segmentName": "test-segment", "dataServer": "usEastCoast", @@ -36,6 +50,7 @@ "config": { "audienceId": "test-segment", "advertiserId": "", + "trackerId": "test-trackerId", "advertiserSecretKey": "test-advertiserSecretKey", "segmentName": "test-segment", "dataServer": "usEastCoast", @@ -54,6 +69,7 @@ "config": { "audienceId": "test-segment", "advertiserId": "test-advertiserId", + "trackerId": "test-trackerId", "advertiserSecretKey": "test-advertiserSecretKey", "segmentName": "test-segment", "dataServer": "test-server", @@ -79,6 +95,9 @@ ] }, "result": false, - "err": [" must have required property 'advertiserSecretKey'"] + "err": [ + " must have required property 'advertiserSecretKey'", + " must have required property 'trackerId'" + ] } ] From 0b6769274090ed2213b1a9875c38f37fd448222f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 5 Feb 2024 10:48:12 +0000 Subject: [PATCH 17/18] chore(release): 1.64.0 --- CHANGELOG.md | 17 +++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b47d11f6..167e1b116 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.64.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.63.2...v1.64.0) (2024-02-05) + + +### Features + +* add generic consent management fields in initially onboarded destinations config ([#1058](https://github.com/rudderlabs/rudder-config-schema/issues/1058)) ([6f80bc9](https://github.com/rudderlabs/rudder-config-schema/commit/6f80bc95a28886fc69d4b9036c227494225dff3a)) +* add trino doc links ([#1181](https://github.com/rudderlabs/rudder-config-schema/issues/1181)) ([ebb47d9](https://github.com/rudderlabs/rudder-config-schema/commit/ebb47d90393df2680663bd93cc4b06e123ebc095)) +* **INT-177:** move intercom to new ui ([#1065](https://github.com/rudderlabs/rudder-config-schema/issues/1065)) ([ae97579](https://github.com/rudderlabs/rudder-config-schema/commit/ae9757999030e2d1fbba990969a4e1bcf608ffb2)) +* onboard new destination ([#1171](https://github.com/rudderlabs/rudder-config-schema/issues/1171)) ([bd4001e](https://github.com/rudderlabs/rudder-config-schema/commit/bd4001e1ef153866bc17ec77fab5b71040cd9f75)) +* trade desk real time conversions ([#1155](https://github.com/rudderlabs/rudder-config-schema/issues/1155)) ([2bfdb1d](https://github.com/rudderlabs/rudder-config-schema/commit/2bfdb1d3650a0d931996d48b5b4f4e689ccd5224)) + + +### Bug Fixes + +* **braze:** add filtering of appKey and restApiKey ([#1138](https://github.com/rudderlabs/rudder-config-schema/issues/1138)) ([fcc0bc4](https://github.com/rudderlabs/rudder-config-schema/commit/fcc0bc421f741ffebe94c26d86d9382a98e8b489)) +* supported message type for mobile integrations ([#1169](https://github.com/rudderlabs/rudder-config-schema/issues/1169)) ([89b2ad8](https://github.com/rudderlabs/rudder-config-schema/commit/89b2ad81e451b3aa89fc03b3d1dfc0db9124a839)) + ### [1.63.2](https://github.com/rudderlabs/rudder-config-schema/compare/v1.63.1...v1.63.2) (2024-02-05) ### [1.63.1](https://github.com/rudderlabs/rudder-config-schema/compare/v1.63.0...v1.63.1) (2024-01-29) diff --git a/package-lock.json b/package-lock.json index 161778247..9bb005469 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.63.2", + "version": "1.64.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.63.2", + "version": "1.64.0", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 99327dc41..534f118ac 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.63.2", + "version": "1.64.0", "description": "", "main": "src/index.ts", "private": true, From c1b992fad16fc523ae37ac8fd955583d1af043c2 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Wed, 7 Feb 2024 12:18:53 +0530 Subject: [PATCH 18/18] fix: update tiktok_ads supported sources (#1193) --- src/configurations/destinations/tiktok_ads/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/tiktok_ads/db-config.json b/src/configurations/destinations/tiktok_ads/db-config.json index a44df62ff..b56a92240 100644 --- a/src/configurations/destinations/tiktok_ads/db-config.json +++ b/src/configurations/destinations/tiktok_ads/db-config.json @@ -17,7 +17,7 @@ "ketchConsentPurposes" ], "excludeKeys": [], - "supportedSourceTypes": ["web", "cloud", "ios", "android"], + "supportedSourceTypes": ["web", "cloud", "ios", "android", "unity", "amp", "warehouse", "reactnative", "flutter", "cordova"], "supportedMessageTypes": { "cloud": ["track"], "device": {