From bdb7f1caae7c9843c9ad4a4e30471d915a7ec040 Mon Sep 17 00:00:00 2001 From: Alexandros Milaios Date: Tue, 15 Oct 2024 12:26:30 +0300 Subject: [PATCH 01/18] chore: update singer fb marketing image to v8.3.11 (#1746) --- .../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 2c86bac06..0bf2035a1 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.3.4" + "image": "rudderstack/source-facebook-marketing:v8.3.11" }, "type": "cloudSource" } From ae60ba3e2eb767c47d577b32b4d9cf7e4f43782a Mon Sep 17 00:00:00 2001 From: Aris Plakias Date: Mon, 21 Oct 2024 16:03:09 +0300 Subject: [PATCH 02/18] chore: remove number prefix from title (#1757) --- .../destinations/azure_datalake/ui-config.json | 2 +- .../destinations/azure_synapse/ui-config.json | 2 +- .../destinations/digital_ocean_spaces/ui-config.json | 2 +- src/configurations/destinations/firebase/ui-config.json | 2 +- src/configurations/destinations/gcs/ui-config.json | 2 +- src/configurations/destinations/gcs_datalake/ui-config.json | 2 +- src/configurations/destinations/googlepubsub/ui-config.json | 2 +- src/configurations/destinations/gtm/ui-config.json | 4 ++-- src/configurations/destinations/hotjar/ui-config.json | 4 ++-- src/configurations/destinations/keen/ui-config.json | 6 +++--- src/configurations/destinations/mailchimp/ui-config.json | 4 ++-- src/configurations/destinations/minio/ui-config.json | 2 +- src/configurations/destinations/mssql/ui-config.json | 2 +- src/configurations/destinations/personalize/ui-config.json | 6 +++--- .../destinations/quantummetric/ui-config.json | 4 ++-- src/configurations/destinations/redis/ui-config.json | 2 +- src/configurations/destinations/s3/ui-config.json | 2 +- src/configurations/destinations/snowflake/ui-config.json | 2 +- src/configurations/destinations/splitio/ui-config.json | 4 ++-- 19 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/configurations/destinations/azure_datalake/ui-config.json b/src/configurations/destinations/azure_datalake/ui-config.json index 770c38f86..993582e19 100644 --- a/src/configurations/destinations/azure_datalake/ui-config.json +++ b/src/configurations/destinations/azure_datalake/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Credentials", + "title": "Connection Credentials", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/azure_synapse/ui-config.json b/src/configurations/destinations/azure_synapse/ui-config.json index a54861bb5..9d8d6f840 100644 --- a/src/configurations/destinations/azure_synapse/ui-config.json +++ b/src/configurations/destinations/azure_synapse/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Credentials", + "title": "Connection Credentials", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/digital_ocean_spaces/ui-config.json b/src/configurations/destinations/digital_ocean_spaces/ui-config.json index 5abb542a9..3125d9f0b 100644 --- a/src/configurations/destinations/digital_ocean_spaces/ui-config.json +++ b/src/configurations/destinations/digital_ocean_spaces/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/firebase/ui-config.json b/src/configurations/destinations/firebase/ui-config.json index ffd24140a..b462cd594 100644 --- a/src/configurations/destinations/firebase/ui-config.json +++ b/src/configurations/destinations/firebase/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Native SDK", + "title": "Native SDK", "fields": [ { "type": "defaultCheckbox", diff --git a/src/configurations/destinations/gcs/ui-config.json b/src/configurations/destinations/gcs/ui-config.json index d7b429e53..6c5582ed3 100644 --- a/src/configurations/destinations/gcs/ui-config.json +++ b/src/configurations/destinations/gcs/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/gcs_datalake/ui-config.json b/src/configurations/destinations/gcs_datalake/ui-config.json index 855297cd5..5b9328b6d 100644 --- a/src/configurations/destinations/gcs_datalake/ui-config.json +++ b/src/configurations/destinations/gcs_datalake/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Credentials", + "title": "Connection Credentials", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/googlepubsub/ui-config.json b/src/configurations/destinations/googlepubsub/ui-config.json index 40546873a..a459f9363 100644 --- a/src/configurations/destinations/googlepubsub/ui-config.json +++ b/src/configurations/destinations/googlepubsub/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/gtm/ui-config.json b/src/configurations/destinations/gtm/ui-config.json index 1327f45e3..06650bcac 100644 --- a/src/configurations/destinations/gtm/ui-config.json +++ b/src/configurations/destinations/gtm/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", @@ -24,7 +24,7 @@ ] }, { - "title": "2. Native SDK", + "title": "Native SDK", "fields": [ { "type": "defaultCheckbox", diff --git a/src/configurations/destinations/hotjar/ui-config.json b/src/configurations/destinations/hotjar/ui-config.json index 90b816079..e71f518f5 100644 --- a/src/configurations/destinations/hotjar/ui-config.json +++ b/src/configurations/destinations/hotjar/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", @@ -15,7 +15,7 @@ ] }, { - "title": "2. Native SDK", + "title": "Native SDK", "fields": [ { "type": "defaultCheckbox", diff --git a/src/configurations/destinations/keen/ui-config.json b/src/configurations/destinations/keen/ui-config.json index 316844922..402fafb21 100644 --- a/src/configurations/destinations/keen/ui-config.json +++ b/src/configurations/destinations/keen/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", @@ -23,7 +23,7 @@ ] }, { - "title": "2. Native SDK", + "title": "Native SDK", "fields": [ { "type": "checkbox", @@ -34,7 +34,7 @@ ] }, { - "title": "3. Add On", + "title": "Add On", "fields": [ { "type": "checkbox", diff --git a/src/configurations/destinations/mailchimp/ui-config.json b/src/configurations/destinations/mailchimp/ui-config.json index b6ffe6c4c..ef092f513 100644 --- a/src/configurations/destinations/mailchimp/ui-config.json +++ b/src/configurations/destinations/mailchimp/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", @@ -33,7 +33,7 @@ ] }, { - "title": "2. Event Map Setting", + "title": "Event Map Setting", "fields": [ { "type": "checkbox", diff --git a/src/configurations/destinations/minio/ui-config.json b/src/configurations/destinations/minio/ui-config.json index f6f1e1c82..89b067daa 100644 --- a/src/configurations/destinations/minio/ui-config.json +++ b/src/configurations/destinations/minio/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/mssql/ui-config.json b/src/configurations/destinations/mssql/ui-config.json index 21d48b402..8fe0c0262 100644 --- a/src/configurations/destinations/mssql/ui-config.json +++ b/src/configurations/destinations/mssql/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Credentials", + "title": "Connection Credentials", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/personalize/ui-config.json b/src/configurations/destinations/personalize/ui-config.json index 5bde93f36..25ad6f651 100644 --- a/src/configurations/destinations/personalize/ui-config.json +++ b/src/configurations/destinations/personalize/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Credentials", + "title": "Connection Credentials", "fields": [ { "type": "checkbox", @@ -64,7 +64,7 @@ ] }, { - "title": "2. Information on Dataset Group", + "title": "Information on Dataset Group", "fields": [ { "type": "textInput", @@ -87,7 +87,7 @@ ] }, { - "title": "3. Operational Choice", + "title": "Operational Choice", "fields": [ { "type": "singleSelect", diff --git a/src/configurations/destinations/quantummetric/ui-config.json b/src/configurations/destinations/quantummetric/ui-config.json index d7c066d5e..bac48da0a 100644 --- a/src/configurations/destinations/quantummetric/ui-config.json +++ b/src/configurations/destinations/quantummetric/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", @@ -15,7 +15,7 @@ ] }, { - "title": "2. Native SDK", + "title": "Native SDK", "fields": [ { "type": "defaultCheckbox", diff --git a/src/configurations/destinations/redis/ui-config.json b/src/configurations/destinations/redis/ui-config.json index 4e4cd0a98..c84d88187 100644 --- a/src/configurations/destinations/redis/ui-config.json +++ b/src/configurations/destinations/redis/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/s3/ui-config.json b/src/configurations/destinations/s3/ui-config.json index 19eb9cc0f..a67978dc0 100644 --- a/src/configurations/destinations/s3/ui-config.json +++ b/src/configurations/destinations/s3/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Settings", + "title": "Connection Settings", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/snowflake/ui-config.json b/src/configurations/destinations/snowflake/ui-config.json index a5ab4b86a..4eb1cde8c 100644 --- a/src/configurations/destinations/snowflake/ui-config.json +++ b/src/configurations/destinations/snowflake/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Credentials", + "title": "Connection Credentials", "fields": [ { "type": "textInput", diff --git a/src/configurations/destinations/splitio/ui-config.json b/src/configurations/destinations/splitio/ui-config.json index 6b51ca8aa..6be487430 100644 --- a/src/configurations/destinations/splitio/ui-config.json +++ b/src/configurations/destinations/splitio/ui-config.json @@ -1,7 +1,7 @@ { "uiConfig": [ { - "title": "1. Connection Credentials", + "title": "Connection Credentials", "fields": [ { "type": "textInput", @@ -22,7 +22,7 @@ ] }, { - "title": "2. Information on Traffic", + "title": "Information on Traffic", "fields": [ { "type": "textInput", From b7d98d2d034646fac05a6569af319bf78021f708 Mon Sep 17 00:00:00 2001 From: Vamsi Krishna Kandi Date: Tue, 22 Oct 2024 12:35:27 +0530 Subject: [PATCH 03/18] feat: ssh config for RS and POSTGRES destinations (#1751) --- .../destinations/postgres/schema.json | 34 +++++++++++ .../destinations/postgres/ui-config.json | 59 +++++++++++++++++++ .../destinations/rs/schema.json | 48 +++++++++++++++ .../destinations/rs/ui-config.json | 59 +++++++++++++++++++ .../validation/destinations/postgres.json | 2 +- 5 files changed, 201 insertions(+), 1 deletion(-) diff --git a/src/configurations/destinations/postgres/schema.json b/src/configurations/destinations/postgres/schema.json index 7d41fe703..01b758cde 100644 --- a/src/configurations/destinations/postgres/schema.json +++ b/src/configurations/destinations/postgres/schema.json @@ -45,6 +45,10 @@ "type": "string", "pattern": "(^env[.].*)|^((?!pg_|PG_|pG_|Pg_).{0,64})$" }, + "useSSH": { + "type": "boolean", + "default": false + }, "sslMode": { "type": "string", "pattern": "^(disable|require|verify-ca)$" @@ -1153,6 +1157,36 @@ }, "required": ["clientKey", "clientCert", "serverCA"] } + }, + { + "if": { + "properties": { + "useSSH": { + "const": true + } + }, + "required": ["useSSH"] + }, + "then": { + "properties": { + "sshHost": { + "type": "string", + "pattern": "^(.{0,100})$" + }, + "sshPort": { + "type": "string", + "pattern": "^(.{0,100})$" + }, + "sshUser": { + "type": "string", + "pattern": "^(.{0,100})$" + }, + "sshPublicKey": { + "type": "string" + } + }, + "required": ["sshHost", "sshPort", "sshUser", "sshPublicKey"] + } } ], "additionalProperties": true diff --git a/src/configurations/destinations/postgres/ui-config.json b/src/configurations/destinations/postgres/ui-config.json index 61c26d05b..912879e5d 100644 --- a/src/configurations/destinations/postgres/ui-config.json +++ b/src/configurations/destinations/postgres/ui-config.json @@ -59,6 +59,65 @@ "footerNote": "Default will be the source name", "immutable": true }, + { + "type": "checkbox", + "label": "SSH Connection", + "value": "useSSH", + "default": false, + "footerNote": "Establish ssh tunnel connection", + "preRequisiteFeatureFlag": "WAREHOUSE_SSH_TUNNELLING" + }, + { + "type": "textInput", + "label": "SSH Host", + "value": "sshHost", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid SSH Host", + "placeholder": "e.g: www.abc.com", + "required": true, + "preRequisiteField": { + "name": "useSSH", + "selectedValue": true + } + }, + { + "type": "textInput", + "label": "SSH Port", + "value": "sshPort", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Port", + "placeholder": "e.g: 22", + "required": true, + "preRequisiteField": { + "name": "useSSH", + "selectedValue": true + } + }, + { + "type": "textInput", + "label": "SSH User", + "value": "sshUser", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid User", + "placeholder": "e.g: user1", + "required": true, + "preRequisiteField": { + "name": "useSSH", + "selectedValue": true + } + }, + { + "type": "textareaInputCopy", + "label": "SSH Public Key", + "value": "sshPublicKey", + "default": "", + "required": true, + "preRequisiteField": { + "name": "useSSH", + "selectedValue": true + }, + "readOnly": true + }, { "type": "singleSelect", "label": "SSL Mode", diff --git a/src/configurations/destinations/rs/schema.json b/src/configurations/destinations/rs/schema.json index d7678a83b..bace1857e 100644 --- a/src/configurations/destinations/rs/schema.json +++ b/src/configurations/destinations/rs/schema.json @@ -24,6 +24,10 @@ "type": "boolean", "default": false }, + "useSSH": { + "type": "boolean", + "default": false + }, "syncFrequency": { "type": "string", "enum": ["5", "15", "30", "60", "180", "360", "720", "1440"], @@ -1063,6 +1067,50 @@ }, "required": [] } + }, + { + "if": { + "properties": { + "useSSH": { + "const": false + } + }, + "required": [] + }, + "then": { + "properties": {}, + "required": [] + } + }, + { + "if": { + "properties": { + "useSSH": { + "const": true + } + }, + "required": ["useSSH"] + }, + "then": { + "properties": { + "sshHost": { + "type": "string", + "pattern": "^(.{0,100})$" + }, + "sshPort": { + "type": "string", + "pattern": "^(.{0,100})$" + }, + "sshUser": { + "type": "string", + "pattern": "^(.{0,100})$" + }, + "sshPublicKey": { + "type": "string" + } + }, + "required": ["sshHost", "sshPort", "sshUser", "sshPublicKey"] + } } ] } diff --git a/src/configurations/destinations/rs/ui-config.json b/src/configurations/destinations/rs/ui-config.json index 5e8d04057..8f3a0abbe 100644 --- a/src/configurations/destinations/rs/ui-config.json +++ b/src/configurations/destinations/rs/ui-config.json @@ -166,6 +166,65 @@ "footerNote": "Default will be the source name", "immutable": true }, + { + "type": "checkbox", + "label": "SSH Connection", + "value": "useSSH", + "default": false, + "footerNote": "Establish ssh tunnel connection", + "preRequisiteFeatureFlag": "WAREHOUSE_SSH_TUNNELLING" + }, + { + "type": "textInput", + "label": "SSH Host", + "value": "sshHost", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid SSH Host", + "placeholder": "e.g: www.abc.com", + "required": true, + "preRequisiteField": { + "name": "useSSH", + "selectedValue": true + } + }, + { + "type": "textInput", + "label": "SSH Port", + "value": "sshPort", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Port", + "placeholder": "e.g: 22", + "required": true, + "preRequisiteField": { + "name": "useSSH", + "selectedValue": true + } + }, + { + "type": "textInput", + "label": "SSH User", + "value": "sshUser", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid User", + "placeholder": "e.g: user1", + "required": true, + "preRequisiteField": { + "name": "useSSH", + "selectedValue": true + } + }, + { + "type": "textareaInputCopy", + "label": "SSH Public Key", + "value": "sshPublicKey", + "default": "", + "required": true, + "preRequisiteField": { + "name": "useSSH", + "selectedValue": true + }, + "readOnly": true + }, { "type": "singleSelect", "label": "Sync Frequency", diff --git a/test/data/validation/destinations/postgres.json b/test/data/validation/destinations/postgres.json index 3f5114680..6c3fdf0fc 100644 --- a/test/data/validation/destinations/postgres.json +++ b/test/data/validation/destinations/postgres.json @@ -440,7 +440,7 @@ "user": "test-user", "password": "test-password", "port": "0000", - "useSSH": false, + "useSSH": true, "sshHost": "www.abc.com", "sshPort": "22", "sshUser": "user1", From 2565f39709cb581244257f4aaa43b57f0272b7da Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti <110057617+aanshi07@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:34:58 +0530 Subject: [PATCH 04/18] feat: onboard tune destination (#1744) --- .../destinations/tune/db-config.json | 107 ++ .../destinations/tune/schema.json | 912 ++++++++++++++++++ .../destinations/tune/ui-config.json | 437 +++++++++ test/data/validation/destinations/tune.json | 231 +++++ 4 files changed, 1687 insertions(+) create mode 100644 src/configurations/destinations/tune/db-config.json create mode 100644 src/configurations/destinations/tune/schema.json create mode 100644 src/configurations/destinations/tune/ui-config.json create mode 100644 test/data/validation/destinations/tune.json diff --git a/src/configurations/destinations/tune/db-config.json b/src/configurations/destinations/tune/db-config.json new file mode 100644 index 000000000..e018d0ac5 --- /dev/null +++ b/src/configurations/destinations/tune/db-config.json @@ -0,0 +1,107 @@ +{ + "name": "TUNE", + "displayName": "Tune", + "config": { + "transformAtV1": "processor", + "saveDestinationResponse": true, + "excludeKeys": [], + "supportedSourceTypes": [ + "android", + "ios", + "unity", + "amp", + "web", + "cloud", + "warehouse", + "reactnative", + "flutter", + "cordova", + "shopify" + ], + "supportedMessageTypes": { "cloud": ["track"] }, + "supportedConnectionModes": { + "android": ["cloud"], + "ios": ["cloud"], + "web": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "shopify": ["cloud"], + "cloud": ["cloud"], + "warehouse": ["cloud"] + }, + "destConfig": { + "defaultConfig": ["tuneEvents"], + "android": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "ios": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "unity": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "amp": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "reactnative": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "flutter": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cordova": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "web": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cloud": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "shopify": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "warehouse": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ] + }, + "secretKeys": [] + }, + "options": { "isBeta": true } +} diff --git a/src/configurations/destinations/tune/schema.json b/src/configurations/destinations/tune/schema.json new file mode 100644 index 000000000..1938f3053 --- /dev/null +++ b/src/configurations/destinations/tune/schema.json @@ -0,0 +1,912 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": [], + "type": "object", + "properties": { + "url": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$|^$" + }, + "eventName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "standardMapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "to": { + "type": "string", + "enum": [ + "aff_id", + "promo_code", + "amount", + "conversion_unique_id", + "goal_id", + "goal_ref", + "offer_id", + "payout", + "revenue", + "security_token", + "status", + "transaction_id" + ] + } + } + } + }, + "advSubIdMapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "to": { + "type": "string", + "enum": ["adv_sub", "adv_sub2", "adv_sub3", "adv_sub4", "adv_sub5"] + } + } + } + }, + "advUniqueIdMapping": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "to": { + "type": "string", + "enum": ["adv_unique1", "adv_unique2", "adv_unique3", "adv_unique4", "adv_unique5"] + } + } + } + }, + "oneTrustCookieCategories": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "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"] + } + } + ] + } + }, + "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"] + } + } + ] + } + } + } + }, + "ketchConsentPurposes": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, + "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"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] + }, + "cloud": { + "type": "string", + "enum": ["cloud"] + }, + "warehouse": { + "type": "string", + "enum": ["cloud"] + } + } + } + } + } +} diff --git a/src/configurations/destinations/tune/ui-config.json b/src/configurations/destinations/tune/ui-config.json new file mode 100644 index 000000000..d2f7815fa --- /dev/null +++ b/src/configurations/destinations/tune/ui-config.json @@ -0,0 +1,437 @@ +{ + "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": [] + } + ] + }, + { + "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": [ + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [] + } + ] + }, + { + "title": "Event mapping", + "note": "Map RudderStack events to Tune events", + "hideEditIcon": true, + "sections": [ + { + "groups": [ + { + "title": "RudderStack Event to Tune Event Mapping", + "fields": [ + { + "type": "redirect", + "redirectGroupKey": "conversionMapping", + "label": "Event and property mappings", + "note": "Map RudderStack events/properties to Tune events/properties" + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "SDK settings", + "note": "not visible in the ui", + "fields": [] + }, + "redirectGroups": { + "conversionMapping": { + "fields": [ + { + "type": "dynamicCustomForm", + "label": "Map RudderStack event to Tune event", + "configKey": "tuneEvents", + "rowFields": [ + { + "type": "textInput", + "label": "URL", + "configKey": "url", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$|^$", + "regexErrorMessage": "Invalid URL", + "placeholder": "e.g. https://demo.go2cloud.org/aff_l?offer_id=45&aff_id=1029" + }, + { + "type": "textInput", + "label": "Event name", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "configKey": "eventName", + "placeholder": "e.g: Product Added" + }, + { + "label": "Map Rudder properties to Tune properties", + "type": "mapping", + "configKey": "standardMapping", + "default": [ + { + "from": "affId", + "to": "aff_id" + }, + { + "from": "promoCode", + "to": "promo_code" + }, + { + "from": "amount", + "to": "amount" + }, + { + "from": "conversionUniqueId", + "to": "conversion_unique_id" + }, + { + "from": "goalId", + "to": "goal_id" + }, + { + "from": "goalRef", + "to": "goal_ref" + }, + { + "from": "offerId", + "to": "offer_id" + }, + { + "from": "payout", + "to": "payout" + }, + { + "from": "revenue", + "to": "revenue" + }, + { + "from": "securityToken", + "to": "security_token" + }, + { + "from": "status", + "to": "status" + }, + { + "from": "transactionId", + "to": "transaction_id" + } + ], + "columns": [ + { + "type": "textInput", + "key": "from", + "label": "Rudder Payload Field", + "placeholder": "e.g: Purchase Event" + }, + { + "type": "singleSelect", + "key": "to", + "label": "Tune Field", + "placeholder": "e.g: purchase", + "options": [ + { + "name": "aff_id", + "value": "aff_id" + }, + { + "name": "promo_code", + "value": "promo_code" + }, + { + "name": "amount", + "value": "amount" + }, + { + "name": "conversion_unique_id", + "value": "conversion_unique_id" + }, + { + "name": "goal_id", + "value": "goal_id" + }, + { + "name": "goal_ref", + "value": "goal_ref" + }, + { + "name": "offer_id", + "value": "offer_id" + }, + { + "name": "payout", + "value": "payout" + }, + { + "name": "revenue", + "value": "revenue" + }, + { + "name": "security_token", + "value": "security_token" + }, + { + "name": "status", + "value": "status" + }, + { + "name": "transaction_id", + "value": "transaction_id" + } + ] + } + ] + }, + { + "label": "Map Rudder properties to Tune Advertiser Sub Ids", + "type": "mapping", + "configKey": "advSubIdMapping", + "columns": [ + { + "type": "textInput", + "key": "from", + "label": "Rudder Payload Field", + "placeholder": "e.g: Purchase Event" + }, + { + "type": "singleSelect", + "key": "to", + "label": "Tune Field", + "placeholder": "e.g: purchase", + "options": [ + { + "name": "adv_sub", + "value": "adv_sub" + }, + { + "name": "adv_sub2", + "value": "adv_sub2" + }, + { + "name": "adv_sub3", + "value": "adv_sub3" + }, + { + "name": "adv_sub4", + "value": "adv_sub4" + }, + { + "name": "adv_sub5", + "value": "adv_sub5" + } + ] + } + ] + }, + { + "label": "Map Rudder properties to Tune Advertiser Unique Ids", + "type": "mapping", + "configKey": "advUniqueIdMapping", + "columns": [ + { + "type": "textInput", + "key": "from", + "label": "Rudder Payload Field", + "placeholder": "e.g: Purchase Event" + }, + { + "type": "singleSelect", + "key": "to", + "label": "Tune Field", + "placeholder": "e.g: purchase", + "options": [ + { + "name": "adv_unique1", + "value": "adv_unique1" + }, + { + "name": "adv_unique2", + "value": "adv_unique2" + }, + { + "name": "adv_unique3", + "value": "adv_unique3" + }, + { + "name": "adv_unique4", + "value": "adv_unique4" + }, + { + "name": "adv_unique5", + "value": "adv_unique5" + } + ] + } + ] + } + ] + } + ] + } + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "tagInput", + "label": "OneTrust consent category IDs", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "tagInput", + "label": "Ketch consent purpose IDs", + "note": "Input your Ketch consent purpose IDs by pressing 'Enter' after each entry.", + "configKey": "ketchConsentPurposes", + "tagKey": "purpose", + "placeholder": "e.g: marketing", + "default": [ + { + "purpose": "" + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] + } + } +} diff --git a/test/data/validation/destinations/tune.json b/test/data/validation/destinations/tune.json new file mode 100644 index 000000000..30695bd15 --- /dev/null +++ b/test/data/validation/destinations/tune.json @@ -0,0 +1,231 @@ +[ + { + "config": { + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "tuneEvents": [ + { + "url": "https://demo.com", + "eventName": "product added", + "standardMapping": [ + { + "to": "aff_id", + "from": "affId" + }, + { + "to": "transaction_id", + "from": "transactionId" + } + ], + "advSubIdMapping": [ + { + "from": "purchase event", + "to": "adv_sub2" + } + ], + "advUniqueIdMapping": [ + { + "from": "oder completed", + "to": "adv_unique3" + } + ] + } + ] + }, + "result": true + }, + { + "config": { + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "tuneEvents": [ + { + "url": "https://demo.com", + "eventName": "product added", + "standardMapping": [ + { + "to": "aff_id", + "from": "affId" + }, + { + "to": "transaction_id", + "from": "transactionId" + } + ], + "advSubIdMapping": [ + { + "from": "purchase event", + "to": "adv_sub2" + } + ], + "advUniqueIdMapping": [ + { + "from": "oder completed", + "to": "adv_unique3" + } + ] + }, + { + "url": "https://demo11.com", + "eventName": "order completed", + "standardMapping": [ + { + "to": "aff_id", + "from": "affId" + } + ], + "advSubIdMapping": [ + { + "from": "purchase event", + "to": "adv_sub2" + } + ], + "advUniqueIdMapping": [ + { + "from": "oder completed", + "to": "adv_unique3" + } + ] + } + ] + }, + "result": true + }, + { + "config": { + "connectionMode": { + "web": "abc" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "tuneEvents": [ + { + "url": "https://demo.com", + "eventName": "product added", + "standardMapping": [ + { + "to": "aff_id", + "from": "affId" + }, + { + "to": "transaction_id", + "from": "transactionId" + } + ], + "advSubIdMapping": [ + { + "from": "purchase event", + "to": "adv_sub2" + } + ], + "advUniqueIdMapping": [ + { + "from": "oder completed", + "to": "adv_unique3" + } + ] + } + ] + }, + "result": false, + "err": ["connectionMode.web must be equal to one of the allowed values"] + }, + { + "config": { + "connectionMode": { + "web": "device" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "tuneEvents": [ + { + "url": "https://demo.com", + "eventName": "product added", + "standardMapping": [ + { + "to": "aff_id", + "from": "affId" + } + ], + "advSubIdMapping": [ + { + "from": "purchase event", + "to": "adv_sub2" + } + ], + "advUniqueIdMapping": [ + { + "from": "oder completed", + "to": "adv_unique3" + } + ] + } + ] + }, + "result": false, + "err": ["connectionMode.web must be equal to one of the allowed values"] + }, + { + "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", + "config": { + "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": { + "consentManagement": { + "android": [ + { + "provider": "custom" + } + ] + } + }, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "result": false, + "err": [ + "consentManagement.android.0 must have required property 'resolutionStrategy'", + "consentManagement.android.0 must match \"then\" schema" + ] + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + }, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {} + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + } +] From 8a5e3eae47b7ccb899c18371272e54110fd18c67 Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Wed, 23 Oct 2024 09:17:00 +0530 Subject: [PATCH 05/18] chore(slack): updated placeholders and labels in ui-config (#1754) --- src/configurations/destinations/slack/ui-config.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/configurations/destinations/slack/ui-config.json b/src/configurations/destinations/slack/ui-config.json index 84050fb54..d6ebb2102 100644 --- a/src/configurations/destinations/slack/ui-config.json +++ b/src/configurations/destinations/slack/ui-config.json @@ -25,6 +25,7 @@ "footerNote": "If legacy is choosed then channel mapping will be done based on channel name else it will be done based on channel webhook" }, { + "label": "Event Channel Settings", "type": "dynamicCustomForm", "value": "eventChannelSettings", "customFields": [ @@ -85,6 +86,7 @@ "title": "Event Template", "fields": [ { + "label": "Event Template Settings", "type": "dynamicCustomForm", "value": "eventTemplateSettings", "customFields": [ @@ -95,7 +97,7 @@ "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", "regexErrorMessage": "Invalid Event Name", "required": false, - "placeholder": "e.g: ABCDEFG" + "placeholder": "e.g: ^slack\\.events\\.[a-zA-Z_]+$\n" }, { "type": "textInput", @@ -104,7 +106,7 @@ "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,1000})$", "regexErrorMessage": "Invalid Event Template", "required": false, - "placeholder": "e.g: ABCDEFG" + "placeholder": "e.g: {{name}} did {{event}}" }, { "type": "checkbox", From 9e2d536cba53e1d031cb5767d3867378d4489ef1 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:22:26 +0530 Subject: [PATCH 06/18] feat: onboard mixpanel on new form builder (#1733) --- .../destinations/mp/schema.json | 2 +- .../destinations/mp/ui-config.json | 860 ++++++++++-------- 2 files changed, 469 insertions(+), 393 deletions(-) diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index 72a86ebab..2f98b2f0b 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -1,7 +1,7 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": ["token"], + "required": ["token", "dataResidency", "identityMergeApi"], "type": "object", "properties": { "token": { diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index fc0d43b19..d45e867fe 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -1,448 +1,531 @@ { - "uiConfig": [ - { - "title": "Connection Settings", - "fields": [ - { - "type": "textInput", - "label": "Project Token", - "value": "token", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", - "regexErrorMessage": "Invalid Project Token", - "required": true, - "placeholder": "c24f56ed8172XXXX6de5a5f0befe8b92", - "secret": true - }, - { - "type": "singleSelect", - "label": "Data Residency", - "value": "dataResidency", - "options": [ - { - "name": "US", - "value": "us" - }, - { - "name": "EU", - "value": "eu" - } - ], - "defaultOption": { - "name": "US", - "value": "us" - }, - "required": false - }, - { - "type": "singleSelect", - "label": "Identity Merge", - "value": "identityMergeApi", - "footerNote": "Select Identity Merge API. For more information about Simplified vs Original ID Merge API refer doc (https://help.mixpanel.com/hc/en-us/articles/14383975110292)", - "options": [ - { - "name": "Simplified ID Merge", - "value": "simplified" - }, - { - "name": "Original ID Merge", - "value": "original" - } - ], - "defaultOption": { - "name": "Original ID Merge", - "value": "original" - }, - "required": false - }, - { - "type": "singleSelect", - "label": "User Deletion", - "value": "userDeletionApi", - "footerNote": "Select Mixpanel User Deletion API. For more information about difference between the two APIs refer doc (https://www.rudderstack.com/docs/destinations/streaming-destinations/mixpanel/#deleting-a-user)", - "options": [ - { - "name": "Delete Profile", - "value": "engage" - }, - { - "name": "Delete Profile and Associated Events", - "value": "task" - } - ], - "defaultOption": { - "name": "Delete Profile", - "value": "engage" - }, - "required": false - }, - { - "type": "textInput", - "preRequisiteField": { - "name": "userDeletionApi", - "selectedValue": "task" + "uiConfig": { + "baseTemplate": [ + { + "title": "Initial setup", + "note": "Review how this destination is set up", + "sections": [ + { + "groups": [ + { + "title": "Connection settings", + "icon": "settings", + "fields": [ + { + "type": "textInput", + "label": "Project Token", + "configKey": "token", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Project Token", + "placeholder": "c24f56ed817221606de5a5f0befe8b92", + "secret": true, + "note": [ + "Obtain the Project Token by navigating to Project > Project Settings > Access Key. For detailed instructions", + { + "text": "Learn more here", + "link": "https://docs.mixpanel.com/docs/tracking/how-tos/api-credentials#project-token" + } + ] + }, + { + "type": "singleSelect", + "label": "Data Residency", + "configKey": "dataResidency", + "options": [ + { + "label": "US", + "value": "us" + }, + { + "label": "EU", + "value": "eu" + } + ], + "default": "us" + }, + { + "type": "singleSelect", + "label": "Identity Merge", + "configKey": "identityMergeApi", + "note": [ + "Select Identity Merge API.", + { + "text": "Learn more", + "link": "https://help.mixpanel.com/hc/en-us/articles/14383975110292" + }, + " about Simplified vs Original ID Merge API." + ], + "options": [ + { + "label": "Simplified ID Merge", + "value": "simplified" + }, + { + "label": "Original ID Merge", + "value": "original" + } + ], + "default": "original" + } + ] + } + ] }, - "label": "GDPR API Token", - "value": "gdprApiToken", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", - "regexErrorMessage": "Invalid GDPR API Token", - "required": true, - "placeholder": "e.g: 7vwaux7et2tkXXXX1o0qtbt1x97n2je", - "secret": true - }, - { - "type": "checkbox", - "label": "Strict Mode", - "value": "strictMode", - "default": false, - "footerNote": "If enabled, Mixpanel will validate the request and return errors per event that failed" - }, - { - "type": "checkbox", - "label": "Ignore \"Do Not Track\"", - "value": "ignoreDnt", - "default": false, - "footerNote": "If enabled, Mixpanel will ignore \"Do Not Track\" setting of browser" - }, - { - "type": "checkbox", - "label": "Use Custom Page Event Name", - "value": "useUserDefinedPageEventName", - "default": false, - "footerNote": "Send custom event name in page call" - }, - { - "type": "textInput", - "label": "Page Event Name Template", - "value": "userDefinedPageEventTemplate", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$", - "regexErrorMessage": "Invalid Page Event Name", - "required": true, - "default": "Viewed {{ category }} {{ name }} page", - "footerNote": "Assign a event name for your page calls. Text {{ }} will be replaced with event payload value", - "preRequisites": { - "fields": [ + { + "groups": [ { - "configKey": "useUserDefinedPageEventName", - "value": true + "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": [] } ] } - }, - { - "type": "checkbox", - "label": "Use Custom Screen Event Name", - "value": "useUserDefinedScreenEventName", - "default": false, - "footerNote": "Send custom event name in screen call" - }, - { - "type": "textInput", - "label": "Screen Event Name Template", - "value": "userDefinedScreenEventTemplate", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$", - "regexErrorMessage": "Invalid Screen Event Name", - "required": true, - "default": "Viewed {{ category }} {{ name }} screen", - "footerNote": "Assign a event name for your screen calls. Text {{ }} will be replaced with event payload value", - "preRequisites": { - "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": [ { - "configKey": "useUserDefinedScreenEventName", - "value": true + "title": "Page settings", + "note": "Set how you want to send your page calls to Mixpanel", + "icon": "file", + "fields": [ + { + "type": "checkbox", + "label": "Use Custom Page Event Name", + "configKey": "useUserDefinedPageEventName", + "note": "Send custom event name in page call", + "default": false + }, + { + "type": "textInput", + "label": "Page Event Name Template", + "configKey": "userDefinedPageEventTemplate", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$", + "regexErrorMessage": "Invalid Page Event Name", + "required": true, + "default": "Viewed {{ category }} {{ name }} page", + "note": "Assign a event name for your page calls. Text {{ }} will be replaced with event payload value", + "preRequisites": { + "fields": [ + { + "configKey": "useUserDefinedPageEventName", + "value": true + } + ] + } + } + ] + }, + { + "title": "Screen settings", + "note": "Set how you want to send your page calls to Mixpanel", + "icon": "file", + "fields": [ + { + "type": "checkbox", + "label": "Use Custom Screen Event Name", + "configKey": "useUserDefinedScreenEventName", + "note": "Send custom event name in screen call", + "default": false + }, + { + "type": "textInput", + "label": "Screen Event Name Template", + "configKey": "userDefinedScreenEventTemplate", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$", + "regexErrorMessage": "Invalid Screen Event Name", + "required": true, + "default": "Viewed {{ category }} {{ name }} screen", + "note": "Assign a event name for your screen calls. Text {{ }} will be replaced with event payload value", + "preRequisites": { + "fields": [ + { + "configKey": "useUserDefinedScreenEventName", + "value": true + } + ] + } + } + ] + }, + { + "title": "Mixpanel Configuration Settings", + "fields": [ + { + "type": "checkbox", + "label": "Strict Mode", + "configKey": "strictMode", + "default": false, + "note": "If enabled, Mixpanel will validate the request and return errors per event that failed", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + }, + { + "type": "tagInput", + "configKey": "propIncrements", + "label": "Properties to increment in People", + "tagKey": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "placeholder": "e.g: Cart-Value" + } + ] + }, + { + "title": "Event Map Setting", + "fields": [ + { + "type": "checkbox", + "configKey": "useNewMapping", + "label": "Use New Mapping", + "default": false, + "note": "It is recommended to set this to on as we are deprecating support for the old mapping soon.", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + } + ] + }, + { + "title": "Group Key Settings", + "fields": [ + { + "type": "tagInput", + "configKey": "groupKeySettings", + "tagKey": "groupKey", + "label": "Group Keys", + "placeholder": "e.g: company", + "default": [ + { + "groupKey": "" + } + ] + } + ] + }, + { + "title": "User Deletion Setting", + "fields": [ + { + "type": "singleSelect", + "label": "User Deletion", + "configKey": "userDeletionApi", + "note": [ + "Select Mixpanel User Deletion API.", + { + "text": "Learn more", + "link": "https://www.rudderstack.com/docs/destinations/streaming-destinations/mixpanel/#deleting-a-user" + }, + " about difference between the two APIs" + ], + "options": [ + { + "label": "Delete Profile", + "value": "engage" + }, + { + "label": "Delete Profile and Associated Events", + "value": "task" + } + ], + "default": "engage", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + }, + { + "type": "textInput", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + }, + { + "configKey": "userDeletionApi", + "value": "task" + } + ], + "condition": "and" + }, + "label": "GDPR API Token", + "configKey": "gdprApiToken", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid GDPR API Token", + "required": true, + "placeholder": "e.g: 7vwaux7et2tkXXXX1o0qtbt1x97n2je", + "secret": true + } + ] + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [] + }, + { + "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)", + "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": "Disabled", + "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": "Device Mode Settings", + ] + } + ], + "sdkTemplate": { + "title": "SDK settings", "fields": [ { "type": "checkbox", "label": "Use Mixpanel People", - "value": "people", + "configKey": "people", "default": false, - "footerNote": "This will send all of your identify calls to Mixpanel's People feature." + "note": "This will send all of your identify calls to Mixpanel's People feature." }, { "type": "checkbox", "label": "Automatically set all Traits as Super Properties and People Properties", - "value": "setAllTraitsByDefault", + "configKey": "setAllTraitsByDefault", "default": false, - "footerNote": "While this is checked, our integration automatically sets all traits on identify calls as super properties and people properties if Mixpanel People is checked as well." + "note": "While this is checked, our integration automatically sets all traits on identify calls as super properties and people properties if Mixpanel People is checked as well." }, { - "type": "dynamicCustomForm", - "value": "superProperties", - "customFields": [ - { - "type": "textInput", - "label": "Property to send as super Properties", - "value": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "required": false, - "placeholder": "e.g: residence" - } - ] - }, - { - "type": "dynamicCustomForm", - "value": "setOnceProperties", - "footerNote": "Set this for those properties who's values are not supposed to change in profile level. Reference: https://developer.mixpanel.com/reference/profile-set-property-once", - "customFields": [ - { - "type": "textInput", - "label": "Properties to set only once", - "value": "property", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "required": false, - "placeholder": "e.g: joiningDate" - } - ] - }, - { - "type": "dynamicCustomForm", - "value": "peopleProperties", - "customFields": [ - { - "type": "textInput", - "label": "Traits to set as People Properties", - "value": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "required": false, - "placeholder": "e.g: address" - } - ] - }, - { - "type": "dynamicCustomForm", - "value": "eventIncrements", - "customFields": [ - { - "type": "textInput", - "label": "Events to increment in People", - "value": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "required": false, - "placeholder": "e.g: Added-to-cart" - } - ] - }, - { - "type": "dynamicCustomForm", - "value": "propIncrements", - "customFields": [ - { - "type": "textInput", - "label": "Properties to increment in People", - "value": "property", - "regex": "^(.{0,100})$", - "regexErrorMessage": "Invalid Property Name", - "required": false, - "placeholder": "e.g: Cart-Value" - } - ] + "type": "checkbox", + "label": "Ignore \"Do Not Track\"", + "configKey": "ignoreDnt", + "default": false, + "note": "If enabled, Mixpanel will ignore \"Do Not Track\" setting of browser" }, { "type": "checkbox", "label": "Track All Pages to Mixpanel with a Consolidated Event Name", - "value": "consolidatedPageCalls", + "configKey": "consolidatedPageCalls", "default": true, - "footerNote": "This will track Loaded a Page events to Mixpanel for all page method calls. We enable this by default as it's how Mixpanel suggests sending these calls." + "note": "This will track Loaded a Page events to Mixpanel for all page method calls. We enable this by default as it's how Mixpanel suggests sending these calls." }, { "type": "checkbox", "label": "Track Categorized Pages to Mixpanel", - "value": "trackCategorizedPages", + "configKey": "trackCategorizedPages", "default": false, - "footerNote": "This will track events to Mixpanel for page method calls that have a category associated with them. For example page('Docs', 'Index') would translate to Viewed Docs Index Page." + "note": "This will track events to Mixpanel for page method calls that have a category associated with them. For example page('Docs', 'Index') would translate to Viewed Docs Index Page." }, { "type": "checkbox", "label": "Track Named Pages to Mixpanel", - "value": "trackNamedPages", + "configKey": "trackNamedPages", "default": false, - "footerNote": "This will track events to Mixpanel for page method calls that have a name associated with them. For example page('Signup') would translate to Viewed Signup Page." + "note": "This will track events to Mixpanel for page method calls that have a name associated with them. For example page('Signup') would translate to Viewed Signup Page." }, { "type": "textInput", "label": "Source Name", - "value": "sourceName", + "configKey": "sourceName", "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", "regexErrorMessage": "Invalid Source Name", "required": false, "placeholder": "e.g: Rudder-JS", - "footerNote": "This value, if it's not blank, will be sent as rudderstack_source_name to Mixpanel for every event/page/screen call." + "note": "This value, if it's not blank, will be sent as rudderstack_source_name to Mixpanel for every event/page/screen call." }, { "type": "checkbox", "label": "Cross Subdomain Cookie", - "value": "crossSubdomainCookie", + "configKey": "crossSubdomainCookie", "default": false, - "footerNote": "This will allow the Mixpanel cookie to persist between different pages of your application." + "note": "This will allow the Mixpanel cookie to persist between different pages of your application." }, { "type": "singleSelect", "label": "Persistence Type", - "value": "persistenceType", + "configKey": "persistenceType", "options": [ { - "name": "None", + "label": "None", "value": "none" }, { - "name": "Cookie", + "label": "Cookie", "value": "cookie" }, { - "name": "Local Storage", + "label": "Local Storage", "value": "localStorage" } ], - "defaultOption": { - "name": "Cookie", - "value": "cookie" - }, - "footerNote": "Choose the persistence type for Mixpanel cookie. If 'Local Storage' is selected, then any existing Mixpanel cookie value with the same persistence name will be transferred to 'Local Storage' and deleted." + "default": "cookie", + "note": "Choose the persistence type for Mixpanel cookie. If 'Local Storage' is selected, then any existing Mixpanel cookie value with the same persistence name will be transferred to 'Local Storage' and deleted." }, { "type": "textInput", "label": "Persistence Name", - "value": "persistenceName", + "configKey": "persistenceName", "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "footerNote": "Enter a persistence name for the Mixpanel cookie." + "note": "Enter a persistence name for the Mixpanel cookie." }, { "type": "checkbox", "label": "Secure Cookie", - "value": "secureCookie", + "configKey": "secureCookie", "default": false, - "footerNote": "This will mark the Mixpanel cookie as secure, meaning it will only be transmitted over https" - } - ] - }, - { - "title": "Group Key Settings", - "fields": [ - { - "type": "dynamicCustomForm", - "value": "groupKeySettings", - "label": "Group Keys", - "customFields": [ - { - "type": "textInput", - "label": "Group Key", - "value": "groupKey", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "regexErrorMessage": "Invalid Group Key", - "required": false, - "placeholder": "company" - } - ] - } - ] - }, - { - "title": "Native SDK", - "fields": [ - { - "type": "checkbox", - "label": "Use device-mode to send events", - "value": "useNativeSDK", - "default": false - } - ] - }, - { - "title": "Event Map Setting", - "fields": [ + "note": "This will mark the Mixpanel cookie as secure, meaning it will only be transmitted over https" + }, { - "type": "checkbox", - "value": "useNewMapping", - "label": "Use New Mapping", - "default": false, - "footerNote": "It is recomended to set this to on as we are deprecating support for the old mapping soon." - } - ] - }, - { - "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": "tagInput", + "configKey": "superProperties", + "label": "Property to send as super Properties", + "tagKey": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "placeholder": "e.g: residence" + }, { - "type": "singleSelect", - "value": "eventFilteringOption", - "required": false, - "options": [ - { - "name": "Disable", - "value": "disable" - }, - { - "name": "Allowlist", - "value": "whitelistedEvents" - }, - { - "name": "Denylist", - "value": "blacklistedEvents" - } - ], - "defaultOption": { - "name": "Disable", - "value": "disable" - } + "type": "tagInput", + "configKey": "setOnceProperties", + "label": "Properties to set only once", + "note": "Set this for those properties who's values are not supposed to change in profile level. Reference: https://developer.mixpanel.com/reference/profile-set-property-once", + "tagKey": "property", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "placeholder": "e.g: joiningDate" }, { - "type": "dynamicCustomForm", - "value": "whitelistedEvents", - "label": "Allowlist", - "customFields": [ - { - "type": "textInput", - "value": "eventName", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "required": false, - "placeholder": "e.g: Anonymous Page Visit" - } - ] + "type": "tagInput", + "configKey": "peopleProperties", + "label": "Traits to set as People Properties", + "tagKey": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "placeholder": "e.g: address" }, { - "type": "dynamicCustomForm", - "value": "blacklistedEvents", - "label": "Denylist", - "customFields": [ - { - "type": "textInput", - "value": "eventName", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "required": false, - "placeholder": "e.g: Credit Card Added" - } - ] + "type": "tagInput", + "configKey": "eventIncrements", + "label": "Events to increment in People", + "tagKey": "property", + "regex": "^(.{0,100})$", + "regexErrorMessage": "Invalid Property Name", + "placeholder": "e.g: Added-to-cart" } ] }, - { - "title": "Consent Settings", + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", "fields": [ { - "type": "dynamicCustomForm", - "value": "oneTrustCookieCategories", - "label": "OneTrust Consent Category IDs", - "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": "tagInput", + "label": "OneTrust consent category IDs", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ { - "type": "textInput", - "placeholder": "C0001", - "value": "oneTrustCookieCategory", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "label": "Category ID", - "required": false + "oneTrustCookieCategory": "" } ], "preRequisites": { @@ -459,17 +542,15 @@ } }, { - "type": "dynamicCustomForm", - "value": "ketchConsentPurposes", - "label": "Ketch Consent Purpose IDs", - "customFields": [ + "type": "tagInput", + "label": "Ketch consent purpose IDs", + "note": "Input your Ketch consent purpose IDs by pressing 'Enter' after each entry.", + "configKey": "ketchConsentPurposes", + "tagKey": "purpose", + "placeholder": "e.g: marketing", + "default": [ { - "type": "textInput", - "placeholder": "marketing", - "value": "purpose", - "label": "Purpose ID", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "required": false + "purpose": "" } ], "preRequisites": { @@ -487,45 +568,41 @@ }, { "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": [ + "configKey": "consentManagement", + "default": [], + "rowFields": [ { "type": "singleSelect", "label": "Consent management provider", - "value": "provider", + "configKey": "provider", "options": [ { - "name": "Custom", + "label": "Custom", "value": "custom" }, { - "name": "Ketch", + "label": "Ketch", "value": "ketch" }, { - "name": "OneTrust", + "label": "OneTrust", "value": "oneTrust" } ], - "defaultOption": { - "name": "OneTrust", - "value": "oneTrust" - }, + "default": "oneTrust", "required": true }, { "type": "singleSelect", "label": "the required consent logic", - "value": "resolutionStrategy", + "configKey": "resolutionStrategy", "options": [ { - "name": "AND", + "label": "AND", "value": "and" }, { - "name": "OR", + "label": "OR", "value": "or" } ], @@ -541,16 +618,15 @@ } }, { - "type": "dynamicCustomForm", - "value": "consents", + "type": "tagInput", "label": "Enter consent category ID’s", - "customFields": [ + "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": [ { - "type": "textInput", - "placeholder": "Marketing", - "value": "consent", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "required": false + "consent": "" } ] } @@ -566,5 +642,5 @@ } ] } - ] + } } From 70b81c3634d668836d62dd38c179f95da871afb4 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Wed, 23 Oct 2024 13:52:08 +0530 Subject: [PATCH 07/18] chore: enable hashing by default for amazon audience (#1761) --- src/configurations/destinations/amazon_audience/ui-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/amazon_audience/ui-config.json b/src/configurations/destinations/amazon_audience/ui-config.json index 86ccce9c6..82bdc3867 100644 --- a/src/configurations/destinations/amazon_audience/ui-config.json +++ b/src/configurations/destinations/amazon_audience/ui-config.json @@ -81,7 +81,7 @@ "Do not enable it if you already pass hash data to rudderstack" ], "configKey": "enableHash", - "default": false + "default": true } ] }, From fae32ff1d659308effc2b2a83034006abc1d9dfd Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:46:19 +0530 Subject: [PATCH 08/18] feat: gainsight px device mode support (#1741) Co-authored-by: shrouti1507 --- .../destinations/gainsight_px/db-config.json | 10 ++- .../destinations/gainsight_px/schema.json | 62 ++++++++++++++++++- .../destinations/gainsight_px/ui-config.json | 28 ++++++++- .../validation/destinations/gainsight_px.json | 6 ++ 4 files changed, 99 insertions(+), 7 deletions(-) diff --git a/src/configurations/destinations/gainsight_px/db-config.json b/src/configurations/destinations/gainsight_px/db-config.json index bacef9474..bcef0081e 100644 --- a/src/configurations/destinations/gainsight_px/db-config.json +++ b/src/configurations/destinations/gainsight_px/db-config.json @@ -10,7 +10,7 @@ "identify": 1 } }, - "includeKeys": ["oneTrustCookieCategories", "consentManagement"], + "includeKeys": ["oneTrustCookieCategories", "consentManagement", "dataCenter", "productTagKey"], "excludeKeys": [], "supportedSourceTypes": [ "android", @@ -26,12 +26,15 @@ "shopify" ], "supportedMessageTypes": { - "cloud": ["group", "identify", "track"] + "cloud": ["group", "identify", "track"], + "device": { + "web": ["group", "identify", "track"] + } }, "supportedConnectionModes": { "android": ["cloud"], "ios": ["cloud"], - "web": ["cloud"], + "web": ["cloud", "device"], "unity": ["cloud"], "amp": ["cloud"], "reactnative": ["cloud"], @@ -62,6 +65,7 @@ "ketchConsentPurposes" ], "web": [ + "dataCenter", "connectionMode", "consentManagement", "oneTrustCookieCategories", diff --git a/src/configurations/destinations/gainsight_px/schema.json b/src/configurations/destinations/gainsight_px/schema.json index ed136c1a2..380808f3d 100644 --- a/src/configurations/destinations/gainsight_px/schema.json +++ b/src/configurations/destinations/gainsight_px/schema.json @@ -6,11 +6,69 @@ "properties": { "apiKey": { "type": "string", - "pattern": ".*" + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" }, "productTagKey": { "type": "string", - "pattern": "^(.{0,100})$" + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "dataCenter": { + "type": "object", + "properties": { + "web": { + "type": "string", + "enum": ["US", "EU", "US2"], + "default": "US" + } + } + }, + "userAttributeMap": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "to": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "accountAttributeMap": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "to": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "globalContextMap": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "to": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } }, "consentManagement": { "type": "object", diff --git a/src/configurations/destinations/gainsight_px/ui-config.json b/src/configurations/destinations/gainsight_px/ui-config.json index 117d8094a..f073f39a0 100644 --- a/src/configurations/destinations/gainsight_px/ui-config.json +++ b/src/configurations/destinations/gainsight_px/ui-config.json @@ -7,7 +7,7 @@ "type": "textInput", "label": "API Key", "value": "apiKey", - "regex": ".*", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", "footerNote": "Your Gainsight PX API Key", "required": true, "placeholder": "e.g: 94f71917XXX93k90caa4c-us20143", @@ -17,12 +17,36 @@ "type": "textInput", "label": "Product Tag Key", "value": "productTagKey", - "regex": "^(.{0,100})$", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", "regexErrorMessage": "Invalid Product Tag Key", "required": true, "placeholder": "e.g: AP-XXXXXX-1", "footerNote": "Your Webapp Product Tag Key", "secret": true + }, + { + "type": "singleSelect", + "label": "Data Center", + "value": "dataCenter", + "required": true, + "options": [ + { + "name": "US", + "value": "US" + }, + { + "name": "EU", + "value": "EU" + }, + { + "name": "US2", + "value": "US2" + } + ], + "defaultOption": { + "name": "US", + "value": "US" + } } ] }, diff --git a/test/data/validation/destinations/gainsight_px.json b/test/data/validation/destinations/gainsight_px.json index c4c9f1a60..329247d27 100644 --- a/test/data/validation/destinations/gainsight_px.json +++ b/test/data/validation/destinations/gainsight_px.json @@ -4,6 +4,12 @@ "config": { "apiKey": "test-host", "productTagKey": "AP-XXXXXX-1", + "dataCenter": { + "web": "EU" + }, + "useNativeSDK": { + "web": true + }, "consentManagement": { "web": [ { From c6c21249ffe4ef158e1f727043dcc9042ab8faaf Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:53:52 +0530 Subject: [PATCH 09/18] feat: mixpanel session replay (#1760) Co-authored-by: Gauravudia --- src/configurations/destinations/mp/db-config.json | 2 ++ src/configurations/destinations/mp/schema.json | 9 +++++++++ src/configurations/destinations/mp/ui-config.json | 10 ++++++++++ test/data/validation/destinations/mp.json | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/src/configurations/destinations/mp/db-config.json b/src/configurations/destinations/mp/db-config.json index e76493086..298fadbe9 100644 --- a/src/configurations/destinations/mp/db-config.json +++ b/src/configurations/destinations/mp/db-config.json @@ -20,6 +20,7 @@ "trackCategorizedPages", "trackNamedPages", "sourceName", + "sessionReplayPercentage", "crossSubdomainCookie", "persistence", "persistenceType", @@ -117,6 +118,7 @@ "ketchConsentPurposes" ], "web": [ + "sessionReplayPercentage", "useNativeSDK", "consentManagement", "connectionMode", diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index 2f98b2f0b..eabd4e256 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -123,6 +123,15 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, + "sessionReplayPercentage": { + "type": "object", + "properties": { + "web": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(100|[1-9]?[0-9])$" + } + } + }, "crossSubdomainCookie": { "type": "boolean", "default": false diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index d45e867fe..e5320ab75 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -431,6 +431,16 @@ "placeholder": "e.g: Rudder-JS", "note": "This value, if it's not blank, will be sent as rudderstack_source_name to Mixpanel for every event/page/screen call." }, + { + "type": "textInput", + "label": "Percentage of SDK initializations that will qualify for replay data capture", + "value": "sessionReplayPercentage", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(100|[1-9]?[0-9])$", + "regexErrorMessage": "Invalid Percentage", + "required": false, + "placeholder": "e.g: 1", + "note": "This value, if it's not blank, will be sent as record_sessions_percent to Mixpanel for every event/page/screen call." + }, { "type": "checkbox", "label": "Cross Subdomain Cookie", diff --git a/test/data/validation/destinations/mp.json b/test/data/validation/destinations/mp.json index 527a9be2d..34054629c 100644 --- a/test/data/validation/destinations/mp.json +++ b/test/data/validation/destinations/mp.json @@ -527,6 +527,9 @@ "trackCategorizedPages": false, "trackNamedPages": false, "sourceName": "AWS", + "sessionReplayPercentage": { + "web": "1" + }, "crossSubdomainCookie": true, "persistence": "cookie", "persistenceType": "cookie", @@ -611,6 +614,9 @@ "trackCategorizedPages": false, "trackNamedPages": false, "sourceName": "AWS", + "sessionReplayPercentage": { + "web": "abc" + }, "crossSubdomainCookie": true, "persistence": "cookie", "persistenceType": "cookie", @@ -725,6 +731,7 @@ }, "result": false, "err": [ + "sessionReplayPercentage.web must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(100|[1-9]?[0-9])$\"", "oneTrustCookieCategories.android.0.oneTrustCookieCategory must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", "oneTrustCookieCategories.ios.0.oneTrustCookieCategory must be string", "oneTrustCookieCategories.web must be array", From 11494f2bbbe944b0e2a6263db990812440765128 Mon Sep 17 00:00:00 2001 From: Manish Kumar <144022547+manish339k@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:57:58 +0530 Subject: [PATCH 10/18] feat: onboarding intercom v2 destination (#1655) --- .../destinations/intercom_v2/db-config.json | 105 +++ .../destinations/intercom_v2/schema.json | 697 ++++++++++++++++++ .../destinations/intercom_v2/ui-config.json | 227 ++++++ .../validation/destinations/intercom_v2.json | 337 +++++++++ 4 files changed, 1366 insertions(+) create mode 100644 src/configurations/destinations/intercom_v2/db-config.json create mode 100644 src/configurations/destinations/intercom_v2/schema.json create mode 100644 src/configurations/destinations/intercom_v2/ui-config.json create mode 100644 test/data/validation/destinations/intercom_v2.json diff --git a/src/configurations/destinations/intercom_v2/db-config.json b/src/configurations/destinations/intercom_v2/db-config.json new file mode 100644 index 000000000..ba0d5074c --- /dev/null +++ b/src/configurations/destinations/intercom_v2/db-config.json @@ -0,0 +1,105 @@ +{ + "name": "INTERCOM_V2", + "displayName": "Intercom V2", + "config": { + "transformAtV1": "router", + "saveDestinationResponse": true, + "throttlingCost": { "eventType": { "group": 3, "identify": 3 } }, + "auth": { + "type": "OAuth", + "role": "intercom", + "rudderScopes": ["delivery"] + }, + "excludeKeys": [], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative", + "flutter", + "cordova" + ], + "supportedMessageTypes": { + "cloud": ["identify", "track", "group"] + }, + "supportedConnectionModes": { + "web": ["cloud"], + "android": ["cloud"], + "ios": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "cloud": ["cloud"] + }, + "destConfig": { + "defaultConfig": ["rudderAccountId", "apiServer", "sendAnonymousId"], + "android": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "ios": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "web": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "unity": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "amp": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cloud": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "reactnative": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "flutter": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cordova": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ] + }, + "secretKeys": [] + }, + "options": { + "isBeta": true, + "hidden": { + "featureFlagName": "AMP_intercom_v2", + "featureFlagValue": false + } + } +} diff --git a/src/configurations/destinations/intercom_v2/schema.json b/src/configurations/destinations/intercom_v2/schema.json new file mode 100644 index 000000000..c4211f658 --- /dev/null +++ b/src/configurations/destinations/intercom_v2/schema.json @@ -0,0 +1,697 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": ["apiServer"], + "type": "object", + "properties": { + "apiServer": { "type": "string", "enum": ["US", "Europe", "Australia"], "default": "US" }, + "sendAnonymousId": { "type": "boolean", "default": false }, + "oneTrustCookieCategories": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "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"] + } + } + ] + } + }, + "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"] + } + } + ] + } + } + } + }, + "ketchConsentPurposes": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "web": { + "type": "string", + "enum": ["cloud"] + }, + "android": { + "type": "string", + "enum": ["cloud"] + }, + "ios": { + "type": "string", + "enum": ["cloud"] + }, + "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"] + }, + "cloud": { + "type": "string", + "enum": ["cloud"] + } + } + } + } + } +} diff --git a/src/configurations/destinations/intercom_v2/ui-config.json b/src/configurations/destinations/intercom_v2/ui-config.json new file mode 100644 index 000000000..580c567c3 --- /dev/null +++ b/src/configurations/destinations/intercom_v2/ui-config.json @@ -0,0 +1,227 @@ +{ + "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": "singleSelect", + "label": "API Server", + "configKey": "apiServer", + "options": [ + { + "label": "US", + "value": "US" + }, + { + "label": "Europe", + "value": "Europe" + }, + { + "label": "Australia", + "value": "Australia" + } + ], + "default": "US", + "note": "Select your Intercom API Server", + "preRequisites": {} + } + ] + } + ] + }, + { + "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 Additional Config", + "fields": [ + { + "type": "checkbox", + "label": "Send AnonymousId as Secondary UserId", + "configKey": "sendAnonymousId", + "default": false + } + ] + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "tagInput", + "label": "OneTrust consent category IDs", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ + { + "oneTrustCookieCategory": "" + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "tagInput", + "label": "Ketch consent purpose IDs", + "note": "Input your Ketch consent purpose IDs by pressing 'Enter' after each entry.", + "configKey": "ketchConsentPurposes", + "tagKey": "purpose", + "placeholder": "e.g: marketing", + "default": [ + { + "purpose": "" + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] + } + } +} diff --git a/test/data/validation/destinations/intercom_v2.json b/test/data/validation/destinations/intercom_v2.json new file mode 100644 index 000000000..c6c391811 --- /dev/null +++ b/test/data/validation/destinations/intercom_v2.json @@ -0,0 +1,337 @@ +[ + { + "config": { + "apiServer": "Europe", + "connectionMode": { + "ios": "cloud" + } + }, + "result": true + }, + { + "config": { + "apiServer": "dummyServer", + "connectionMode": { + "ios": "cloud" + } + }, + "result": false, + "err": ["apiServer must be equal to one of the allowed values"] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiServer": "US", + "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": { + "apiServer": "US", + "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": { + "apiServer": "US", + "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": { + "apiServer": "US", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiServer": "US", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "config": { + "apiServer": "US", + "useNativeSDK": { + "web": false + }, + "oneTrustCookieCategories": { + "android": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "ios": [ + { + "oneTrustCookieCategory": "C0003" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "web": [ + { + "oneTrustCookieCategory": "" + } + ], + "unity": [], + "amp": [ + { + "oneTrustCookieCategory": "env.ENVIRONMENT_VARIABLE" + } + ], + "cloud": [ + { + "oneTrustCookieCategory": "{{ event.properties.prop1 || 'val' }}" + } + ], + "reactnative": [ + { + "oneTrustCookieCategory": "C0003" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "flutter": [ + { + "oneTrustCookieCategory": "" + } + ], + "cordova": [], + "shopify": [ + { + "oneTrustCookieCategory": "env.ENVIRONMENT_VARIABLE" + } + ] + }, + "ketchConsentPurposes": { + "android": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ], + "ios": [ + { + "purpose": "P3" + }, + { + "purpose": "P4" + } + ], + "web": [ + { + "purpose": "" + } + ], + "unity": [], + "amp": [ + { + "purpose": "env.ENVIRONMENT_VARIABLE" + } + ], + "cloud": [ + { + "purpose": "{{ event.properties.prop1 || 'val' }}" + } + ], + "reactnative": [ + { + "purpose": "P3" + }, + { + "purpose": "P4" + } + ], + "flutter": [ + { + "purpose": "" + } + ], + "cordova": [], + "shopify": [ + { + "purpose": "env.ENVIRONMENT_VARIABLE" + } + ] + } + }, + "result": true + }, + { + "config": { + "apiServer": "US", + "useNativeSDK": { + "web": false + }, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "ketchConsentPurposes": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ] + }, + "result": false, + "err": ["oneTrustCookieCategories must be object", "ketchConsentPurposes must be object"] + }, + { + "config": { + "apiServer": "US", + "useNativeSDK": { + "web": false + }, + "oneTrustCookieCategories": { + "android": [ + { + "oneTrustCookieCategory": "more than 100 characters string - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "ios": [ + { + "oneTrustCookieCategory": { + "not": "a string" + } + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "web": { + "not": "an array" + }, + "unity": [ + "not an object", + { + "oneTrustCookieCategory": "C0004" + } + ] + }, + "ketchConsentPurposes": { + "android": [ + { + "purpose": "more than 100 characters string - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "purpose": "P4" + } + ], + "ios": [ + { + "purpose": { + "not": "a string" + } + }, + { + "purpose": "P4" + } + ], + "web": { + "not": "an array" + }, + "unity": [ + "not an object", + { + "purpose": "P4" + } + ] + } + }, + "result": false, + "err": [ + "oneTrustCookieCategories.android.0.oneTrustCookieCategory must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", + "oneTrustCookieCategories.ios.0.oneTrustCookieCategory must be string", + "oneTrustCookieCategories.web must be array", + "oneTrustCookieCategories.unity.0 must be object", + "ketchConsentPurposes.android.0.purpose must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", + "ketchConsentPurposes.ios.0.purpose must be string", + "ketchConsentPurposes.web must be array", + "ketchConsentPurposes.unity.0 must be object" + ] + } +] From ae753c7cc7d3a3e1bef00ad3b2f700841da3ce32 Mon Sep 17 00:00:00 2001 From: Akash Chetty Date: Fri, 25 Oct 2024 15:26:21 +0530 Subject: [PATCH 11/18] feat: snowpipe streaming (#1688) --- .../snowpipe_streaming/db-config.json | 124 +++ .../snowpipe_streaming/schema.json | 884 ++++++++++++++++++ .../snowpipe_streaming/ui-config.json | 246 +++++ .../destinations/snowpipe_streaming.json | 720 ++++++++++++++ 4 files changed, 1974 insertions(+) create mode 100644 src/configurations/destinations/snowpipe_streaming/db-config.json create mode 100644 src/configurations/destinations/snowpipe_streaming/schema.json create mode 100644 src/configurations/destinations/snowpipe_streaming/ui-config.json create mode 100644 test/data/validation/destinations/snowpipe_streaming.json diff --git a/src/configurations/destinations/snowpipe_streaming/db-config.json b/src/configurations/destinations/snowpipe_streaming/db-config.json new file mode 100644 index 000000000..08ba89b9a --- /dev/null +++ b/src/configurations/destinations/snowpipe_streaming/db-config.json @@ -0,0 +1,124 @@ +{ + "name": "SNOWPIPE_STREAMING", + "displayName": "Snowpipe Streaming", + "category": "warehouse", + "config": { + "transformAtV1": "processor", + "saveDestinationResponse": true, + "excludeKeys": [], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative", + "cloudSource", + "flutter", + "cordova", + "shopify" + ], + "supportedConnectionModes": { + "android": ["cloud"], + "ios": ["cloud"], + "web": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "shopify": ["cloud"], + "cloud": ["cloud"], + "cloudSource": ["cloud"] + }, + "destConfig": { + "defaultConfig": [ + "account", + "database", + "warehouse", + "user", + "role", + "skipTracksTable", + "namespace", + "jsonPaths", + "privateKey", + "privateKeyPassphrase" + ], + "android": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "ios": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "web": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "unity": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "amp": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cloud": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cloudSource": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "reactnative": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "flutter": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cordova": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "shopify": [ + "consentManagement", + "connectionMode", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ] + }, + "secretKeys": ["privateKey", "privateKeyPassphrase"] + }, + "options": { + "isBeta": true, + "hidden": { + "featureFlagName": "AMP_snowpipe_streaming", + "featureFlagValue": false + } + } +} diff --git a/src/configurations/destinations/snowpipe_streaming/schema.json b/src/configurations/destinations/snowpipe_streaming/schema.json new file mode 100644 index 000000000..a01bcd682 --- /dev/null +++ b/src/configurations/destinations/snowpipe_streaming/schema.json @@ -0,0 +1,884 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": ["account", "database", "warehouse", "user", "privateKey", "namespace"], + "type": "object", + "properties": { + "account": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "database": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "warehouse": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "user": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "role": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "namespace": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^((?!pg_|PG_|pG_|Pg_).{1,64})$" + }, + "skipTracksTable": { + "type": "boolean", + "default": false + }, + "jsonPaths": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.*)$" + }, + "privateKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|-----BEGIN (?:ENCRYPTED )?PRIVATE KEY-----[\\s\\S]+?-----END (?:ENCRYPTED )?PRIVATE KEY-----" + }, + "privateKeyPassphrase": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "oneTrustCookieCategories": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, + "ketchConsentPurposes": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "shopify": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, + "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"] + } + } + ] + } + }, + "cloud": { + "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"] + } + } + ] + } + }, + "cloudSource": { + "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"] + } + } + ] + } + } + } + }, + "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"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] + }, + "cloud": { + "type": "string", + "enum": ["cloud"] + }, + "cloudSource": { + "type": "string", + "enum": ["cloud"] + } + } + } + }, + "additionalProperties": true + } +} diff --git a/src/configurations/destinations/snowpipe_streaming/ui-config.json b/src/configurations/destinations/snowpipe_streaming/ui-config.json new file mode 100644 index 000000000..89bd3162e --- /dev/null +++ b/src/configurations/destinations/snowpipe_streaming/ui-config.json @@ -0,0 +1,246 @@ +{ + "uiConfig": [ + { + "title": "Connection Credentials", + "fields": [ + { + "type": "textInput", + "label": "Account", + "value": "account", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Account", + "placeholder": "e.g: qya5X180.us-east-1", + "required": true + }, + { + "type": "textInput", + "label": "Database", + "value": "database", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Database", + "placeholder": "e.g: RUDDER_EVENTS", + "required": true + }, + { + "type": "textInput", + "label": "Warehouse", + "value": "warehouse", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid Database", + "placeholder": "e.g: RUDDER_WAREHOUSE", + "required": true + }, + { + "type": "textInput", + "label": "User", + "value": "user", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid User", + "placeholder": "e.g: RUDDER_USER", + "required": true + }, + { + "type": "textInput", + "label": "Role", + "value": "role", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid Role", + "placeholder": "e.g: RUDDER_ROLE", + "required": false + }, + { + "type": "textareaInput", + "required": true, + "regex": "-----BEGIN (?:ENCRYPTED )?PRIVATE KEY-----[\\s\\S]+?-----END (?:ENCRYPTED )?PRIVATE KEY-----", + "label": "Private Key", + "value": "privateKey", + "secret": true + }, + { + "type": "textInput", + "regex": "^(.{0,100})$", + "secret": true, + "label": "Private Key Passphrase", + "value": "privateKeyPassphrase", + "footerNote": "Use the password you set when encrypting the private key. Leave it blank if the private key is not encrypted.", + "required": false + }, + { + "type": "textInput", + "label": "Namespace", + "labelNote": "Schema name for the warehouse where the tables are created", + "value": "namespace", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^((?!pg_|PG_|pG_|Pg_).{1,64})$", + "regexErrorMessage": "Invalid Namespace", + "required": true, + "placeholder": "e.g: RUDDER_NAMESPACE", + "immutable": true + } + ] + }, + { + "title": "Advanced Settings", + "fields": [ + { + "type": "checkbox", + "label": "Skip Tracks Table", + "value": "skipTracksTable", + "footerNote": "Enable this feature to skip sending the event data to the “tracks” table", + "default": false + }, + { + "type": "textInput", + "label": "JSON columns (Optional)", + "labelNote": "Specify required JSON properties in dot notation separated by commas", + "value": "jsonPaths", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.*)$", + "placeholder": "e.g: testMap.nestedMap, testArray", + "required": false, + "footerURL": { + "link": "https://www.rudderstack.com/docs/destinations/warehouse-destinations/json-column-support/", + "text": "Instructions for setting up the JSON columns" + } + } + ] + }, + { + "title": "Consent Settings", + "fields": [ + { + "type": "dynamicCustomForm", + "value": "oneTrustCookieCategories", + "label": "OneTrust Consent Category IDs", + "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 + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "ketchConsentPurposes", + "label": "Ketch Consent Purpose IDs", + "customFields": [ + { + "type": "textInput", + "placeholder": "marketing", + "value": "purpose", + "label": "Purpose ID", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{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/data/validation/destinations/snowpipe_streaming.json b/test/data/validation/destinations/snowpipe_streaming.json new file mode 100644 index 000000000..ce41255d0 --- /dev/null +++ b/test/data/validation/destinations/snowpipe_streaming.json @@ -0,0 +1,720 @@ +[ + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": true + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": true + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": true + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": true + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": true + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": true + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n" + }, + "result": true + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "" + }, + "result": true + }, + { + "config": { + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": [" must have required property 'account'"] + }, + { + "config": { + "account": "", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": ["account must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] + }, + { + "config": { + "account": "test-account", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": [" must have required property 'database'"] + }, + { + "config": { + "account": "test-account", + "database": "", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": ["database must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": [" must have required property 'warehouse'"] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": [ + "warehouse must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\"" + ] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": [" must have required property 'user'"] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": ["user must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": [" must have required property 'privateKey'"] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": [ + "privateKey must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|-----BEGIN (?:ENCRYPTED )?PRIVATE KEY-----[\\s\\S]+?-----END (?:ENCRYPTED )?PRIVATE KEY-----\"" + ] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "abc", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": [" must have required property 'namespace'"] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase" + }, + "result": false, + "err": [ + "namespace must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^((?!pg_|PG_|pG_|Pg_).{1,64})$\"" + ] + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase", + "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", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase", + "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", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase", + "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", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase", + "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", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase", + "oneTrustCookieCategories": { + "android": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "ios": [ + { + "oneTrustCookieCategory": "C0003" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "web": [ + { + "oneTrustCookieCategory": "" + } + ], + "unity": [], + "amp": [ + { + "oneTrustCookieCategory": "env.ENVIRONMENT_VARIABLE" + } + ], + "cloud": [ + { + "oneTrustCookieCategory": "{{ event.properties.prop1 || 'val' }}" + } + ], + "reactnative": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "cloudSource": [ + { + "oneTrustCookieCategory": "C0003" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "flutter": [ + { + "oneTrustCookieCategory": "" + } + ], + "cordova": [], + "shopify": [ + { + "oneTrustCookieCategory": "env.ENVIRONMENT_VARIABLE" + } + ] + }, + "ketchConsentPurposes": { + "android": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ], + "ios": [ + { + "purpose": "P3" + }, + { + "purpose": "P4" + } + ], + "web": [ + { + "purpose": "" + } + ], + "unity": [], + "amp": [ + { + "purpose": "env.ENVIRONMENT_VARIABLE" + } + ], + "cloud": [ + { + "purpose": "{{ event.properties.prop1 || 'val' }}" + } + ], + "reactnative": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ], + "cloudSource": [ + { + "purpose": "P3" + }, + { + "purpose": "P4" + } + ], + "flutter": [ + { + "purpose": "" + } + ], + "cordova": [], + "shopify": [ + { + "purpose": "env.ENVIRONMENT_VARIABLE" + } + ] + } + }, + "result": true + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase", + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "ketchConsentPurposes": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ] + }, + "result": false, + "err": ["oneTrustCookieCategories must be object", "ketchConsentPurposes must be object"] + }, + { + "config": { + "account": "test-account", + "database": "test-database", + "warehouse": "test-warehouse", + "user": "test-user", + "role": "test-role", + "skipTracksTable": false, + "namespace": "test-namespace", + "jsonPaths": "testMap.nestedMap", + "privateKey": "-----BEGIN PRIVATE KEY-----\ntest\ntest\n-----END PRIVATE KEY-----\n", + "privateKeyPassphrase": "test-passphrase", + "oneTrustCookieCategories": { + "android": [ + { + "oneTrustCookieCategory": "more than 100 characters string - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "ios": [ + { + "oneTrustCookieCategory": { + "not": "a string" + } + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "web": { + "not": "an array" + }, + "unity": [ + "not an object", + { + "oneTrustCookieCategory": "C0004" + } + ] + }, + "ketchConsentPurposes": { + "android": [ + { + "purpose": "more than 100 characters string - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "purpose": "P4" + } + ], + "ios": [ + { + "purpose": { + "not": "a string" + } + }, + { + "purpose": "P4" + } + ], + "web": { + "not": "an array" + }, + "unity": [ + "not an object", + { + "purpose": "P4" + } + ] + } + }, + "result": false, + "err": [ + "oneTrustCookieCategories.android.0.oneTrustCookieCategory must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", + "oneTrustCookieCategories.ios.0.oneTrustCookieCategory must be string", + "oneTrustCookieCategories.web must be array", + "oneTrustCookieCategories.unity.0 must be object", + "ketchConsentPurposes.android.0.purpose must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", + "ketchConsentPurposes.ios.0.purpose must be string", + "ketchConsentPurposes.web must be array", + "ketchConsentPurposes.unity.0 must be object" + ] + } +] From 5d31c694648ba4ec68272c192467c7362d5df6dc Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 25 Oct 2024 10:07:06 +0000 Subject: [PATCH 12/18] chore(release): 1.97.0 --- CHANGELOG.md | 13 +++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5d0ddbb4..458f7bce3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ 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.97.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.96.0...v1.97.0) (2024-10-25) + + +### Features + +* gainsight px device mode support ([#1741](https://github.com/rudderlabs/rudder-config-schema/issues/1741)) ([fae32ff](https://github.com/rudderlabs/rudder-config-schema/commit/fae32ff1d659308effc2b2a83034006abc1d9dfd)) +* mixpanel session replay ([#1760](https://github.com/rudderlabs/rudder-config-schema/issues/1760)) ([c6c2124](https://github.com/rudderlabs/rudder-config-schema/commit/c6c21249ffe4ef158e1f727043dcc9042ab8faaf)) +* onboard mixpanel on new form builder ([#1733](https://github.com/rudderlabs/rudder-config-schema/issues/1733)) ([9e2d536](https://github.com/rudderlabs/rudder-config-schema/commit/9e2d536cba53e1d031cb5767d3867378d4489ef1)) +* onboard tune destination ([#1744](https://github.com/rudderlabs/rudder-config-schema/issues/1744)) ([2565f39](https://github.com/rudderlabs/rudder-config-schema/commit/2565f39709cb581244257f4aaa43b57f0272b7da)) +* onboarding intercom v2 destination ([#1655](https://github.com/rudderlabs/rudder-config-schema/issues/1655)) ([11494f2](https://github.com/rudderlabs/rudder-config-schema/commit/11494f2bbbe944b0e2a6263db990812440765128)) +* snowpipe streaming ([#1688](https://github.com/rudderlabs/rudder-config-schema/issues/1688)) ([ae753c7](https://github.com/rudderlabs/rudder-config-schema/commit/ae753c7cc7d3a3e1bef00ad3b2f700841da3ce32)) +* ssh config for RS and POSTGRES destinations ([#1751](https://github.com/rudderlabs/rudder-config-schema/issues/1751)) ([b7d98d2](https://github.com/rudderlabs/rudder-config-schema/commit/b7d98d2d034646fac05a6569af319bf78021f708)) + ## [1.96.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.95.1...v1.96.0) (2024-10-24) diff --git a/package-lock.json b/package-lock.json index f73368880..93b491d2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.96.0", + "version": "1.97.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.96.0", + "version": "1.97.0", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index e6dfdd862..4d6ff06b8 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.96.0", + "version": "1.97.0", "description": "", "main": "src/index.ts", "private": true, From da036f1cbc5a0a4de34282e6497c47f9182e6e4b Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Mon, 28 Oct 2024 11:09:31 +0530 Subject: [PATCH 13/18] feat(garl): move GARL destination to new form builder (#1715) --- .../db-config.json | 4 +- .../schema.json | 44 ++ .../ui-config.json | 452 ++++++++++-------- .../google_adwords_remarketing_lists.json | 77 +++ 4 files changed, 374 insertions(+), 203 deletions(-) diff --git a/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json b/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json index e35235c44..6d6e64f48 100644 --- a/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json +++ b/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json @@ -37,10 +37,10 @@ "isHashRequired", "typeOfList", "userDataConsent", - "personalizationConsent" + "personalizationConsent", + "audienceId" ], "cloud": [ - "audienceId", "connectionMode", "consentManagement", "oneTrustCookieCategories", diff --git a/src/configurations/destinations/google_adwords_remarketing_lists/schema.json b/src/configurations/destinations/google_adwords_remarketing_lists/schema.json index d38780f7a..d18d7fffd 100644 --- a/src/configurations/destinations/google_adwords_remarketing_lists/schema.json +++ b/src/configurations/destinations/google_adwords_remarketing_lists/schema.json @@ -2,7 +2,51 @@ "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", + "required": ["customerId", "subAccount"], "properties": { + "isHashRequired": { + "type": "boolean", + "default": true + }, + "audienceId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "customerId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "loginCustomerId": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "subAccount": { + "type": "boolean", + "default": false + }, + "userSchema": { + "type": "array", + "items": { + "type": "string", + "enum": ["email", "phone", "addressInfo"] + }, + "default": ["email"] + }, + "typeOfList": { + "type": "string", + "enum": ["General", "userID", "mobileDeviceID"], + "default": "General" + }, + "userDataConsent": { + "type": "string", + "enum": ["UNSPECIFIED", "UNKNOWN", "GRANTED", "DENIED"], + "default": "UNSPECIFIED" + }, + "personalizationConsent": { + "type": "string", + "enum": ["UNSPECIFIED", "UNKNOWN", "GRANTED", "DENIED"], + "default": "UNSPECIFIED" + }, "oneTrustCookieCategories": { "type": "object", "properties": { diff --git a/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json b/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json index 249c00d71..3acfda234 100644 --- a/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json +++ b/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json @@ -1,177 +1,234 @@ { - "uiConfig": [ - { - "title": "Connection Settings", - "fields": [ - { - "type": "textInput", - "label": "List ID", - "value": "audienceId", - "regex": "^(.{1,100})$", - "regexErrorMessage": "Invalid Google remarketing list ID", - "required": true, - "placeholder": "e.g: 7692X49833" - }, - { - "type": "textInput", - "label": "Customer ID", - "value": "customerId", - "regex": "^(.{1,100})$", - "regexErrorMessage": "Invalid Customer ID", - "required": true, - "placeholder": "e.g: 9693X29833" - }, - { - "type": "checkbox", - "label": "Sub Account", - "value": "subAccount", - "required": false, - "default": false - }, - { - "type": "textInput", - "label": "Login Customer ID", - "preRequisiteField": [ - { - "name": "subAccount", - "selectedValue": true - } - ], - "value": "loginCustomerId", - "regex": "^(.{0,100})$", - "required": true, - "footerNote": "If customer ID is from a sub account, then provide the customer ID of manager account" - } - ] - }, - { - "title": "Event Settings", - "fields": [ - { - "type": "singleSelect", - "label": "List Type", - "value": "typeOfList", - "mode": "single", - "options": [ - { - "name": "General", - "value": "General" - }, - { - "name": "User ID", - "value": "userID" - }, - { - "name": "Mobile Device ID", - "value": "mobileDeviceID" - } - ], - "defaultOption": { - "value": "General" + "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": "Customer ID", + "note": "Enter the Customer ID of you Google remarketing list", + "configKey": "customerId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid Customer ID", + "placeholder": "e.g: 9693X29833" + }, + { + "type": "textInput", + "label": "List Id", + "note": "Enter your Google remarketing list ID", + "configKey": "audienceId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid Google remarketing list ID", + "placeholder": "e.g: 7692X49833", + "preRequisites": { + "fields": [ + { + "configKey": "connectionMode.cloud", + "value": "cloud" + } + ] + } + }, + { + "type": "checkbox", + "label": "Sub Account", + "configKey": "subAccount", + "default": false + }, + { + "type": "textInput", + "label": "Login Customer ID", + "note": "If customer ID is from a sub account, then provide the customer ID of manager account", + "configKey": "loginCustomerId", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid Login Customer ID", + "preRequisites": { + "fields": [ + { + "configKey": "subAccount", + "value": true + } + ] + } + } + ] + } + ] + }, + { + "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": [] + } + ] } - }, - { - "type": "singleSelect", - "label": "Specify the consent for uploaded users for using their data in Google Advertising Purpose", - "value": "userDataConsent", - "options": [ - { - "name": "Unspecified", - "value": "UNSPECIFIED" - }, - { - "name": "Unknown", - "value": "UNKNOWN" - }, - { - "name": "Granted", - "value": "GRANTED" - }, - { - "name": "Denied", - "value": "DENIED" - } - ], - "default": "UNSPECIFIED" - }, - { - "type": "singleSelect", - "label": "Specify the consent for uploaded users regarding Ads Personalization", - "value": "personalizationConsent", - "options": [ - { - "name": "Unspecified", - "value": "UNSPECIFIED" - }, - { - "name": "Unknown", - "value": "UNKNOWN" - }, - { - "name": "Granted", - "value": "GRANTED" - }, - { - "name": "Denied", - "value": "DENIED" - } - ], - "default": "UNSPECIFIED" - }, - { - "type": "checkbox", - "label": "Hash Required", - "value": "isHashRequired", - "default": true - }, - { - "type": "singleSelect", - "label": "Schema Fields", - "preRequisiteField": [ - { - "name": "typeOfList", - "selectedValue": "General" - } - ], - "value": "userSchema", - "mode": "multiple", - "options": [ - { - "name": "Email", - "value": "email" - }, - { - "name": "Phone Number", - "value": "phone" - }, - { - "name": "Address Info", - "value": "addressInfo" - } - ], - "defaultOption": { - "name": "Email", - "value": ["email"] + ] + }, + { + "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": "Event Settings", + "note": "Configure event-specific settings here", + "fields": [ + { + "type": "singleSelect", + "label": "List Type", + "note": "Select the type of List", + "configKey": "typeOfList", + "options": [ + { + "label": "General", + "value": "General" + }, + { + "label": "User ID", + "value": "userID" + }, + { + "label": "Mobile Device ID", + "value": "mobileDeviceID" + } + ], + "default": "General" + }, + { + "type": "singleSelect", + "label": "Specify the consent for uploaded users for using their data in Google Advertising Purpose", + "configKey": "userDataConsent", + "options": [ + { + "label": "Unspecified", + "value": "UNSPECIFIED" + }, + { + "label": "Unknown", + "value": "UNKNOWN" + }, + { + "label": "Granted", + "value": "GRANTED" + }, + { + "label": "Denied", + "value": "DENIED" + } + ], + "default": "UNSPECIFIED" + }, + { + "type": "singleSelect", + "label": "Specify the consent for uploaded users regarding Ads Personalization", + "configKey": "personalizationConsent", + "options": [ + { + "label": "Unspecified", + "value": "UNSPECIFIED" + }, + { + "label": "Unknown", + "value": "UNKNOWN" + }, + { + "label": "Granted", + "value": "GRANTED" + }, + { + "label": "Denied", + "value": "DENIED" + } + ], + "default": "UNSPECIFIED" + }, + { + "type": "checkbox", + "label": "Hash Required", + "configKey": "isHashRequired", + "default": true + }, + { + "type": "multiSelect", + "label": "Schema Fields", + "preRequisites": [ + { + "configKey": "typeOfList", + "value": "General" + } + ], + "configKey": "userSchema", + "options": [ + { + "label": "Email", + "value": "email" + }, + { + "label": "Phone Number", + "value": "phone" + }, + { + "label": "Address Info", + "value": "addressInfo" + } + ], + "default": ["email"] + } + ] + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [] } - } - ] + ] + } + ], + "sdkTemplate": { + "title": "SDK settings", + "note": "not visible in the ui", + "fields": [] }, - { - "title": "Consent Settings", + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", "fields": [ { - "type": "dynamicCustomForm", - "value": "oneTrustCookieCategories", - "label": "OneTrust Consent Category IDs", - "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": "tagInput", + "label": "OneTrust consent category IDs", + "note": "Input your OneTrust category IDs by pressing 'Enter' after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: C0001", + "default": [ { - "type": "textInput", - "placeholder": "C0001", - "value": "oneTrustCookieCategory", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "label": "Category ID", - "required": false + "oneTrustCookieCategory": "" } ], "preRequisites": { @@ -188,17 +245,15 @@ } }, { - "type": "dynamicCustomForm", - "value": "ketchConsentPurposes", - "label": "Ketch Consent Purpose IDs", - "customFields": [ + "type": "tagInput", + "label": "Ketch consent purpose IDs", + "note": "Input your Ketch consent purpose IDs by pressing 'Enter' after each entry.", + "configKey": "ketchConsentPurposes", + "tagKey": "purpose", + "placeholder": "e.g: marketing", + "default": [ { - "type": "textInput", - "placeholder": "marketing", - "value": "purpose", - "label": "Purpose ID", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "required": false + "purpose": "" } ], "preRequisites": { @@ -216,45 +271,41 @@ }, { "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": [ + "configKey": "consentManagement", + "default": [], + "rowFields": [ { "type": "singleSelect", "label": "Consent management provider", - "value": "provider", + "configKey": "provider", "options": [ { - "name": "Custom", + "label": "Custom", "value": "custom" }, { - "name": "Ketch", + "label": "Ketch", "value": "ketch" }, { - "name": "OneTrust", + "label": "OneTrust", "value": "oneTrust" } ], - "defaultOption": { - "name": "OneTrust", - "value": "oneTrust" - }, + "default": "oneTrust", "required": true }, { "type": "singleSelect", "label": "the required consent logic", - "value": "resolutionStrategy", + "configKey": "resolutionStrategy", "options": [ { - "name": "AND", + "label": "AND", "value": "and" }, { - "name": "OR", + "label": "OR", "value": "or" } ], @@ -270,16 +321,15 @@ } }, { - "type": "dynamicCustomForm", - "value": "consents", + "type": "tagInput", "label": "Enter consent category ID’s", - "customFields": [ + "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": [ { - "type": "textInput", - "placeholder": "Marketing", - "value": "consent", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", - "required": false + "consent": "" } ] } @@ -295,5 +345,5 @@ } ] } - ] + } } diff --git a/test/data/validation/destinations/google_adwords_remarketing_lists.json b/test/data/validation/destinations/google_adwords_remarketing_lists.json index 5206e4f66..0880fbd1b 100644 --- a/test/data/validation/destinations/google_adwords_remarketing_lists.json +++ b/test/data/validation/destinations/google_adwords_remarketing_lists.json @@ -1,6 +1,8 @@ [ { "config": { + "customerId": "dfashethdetyjetyj", + "subAccount": false, "oneTrustCookieCategories": { "cloud": [ { @@ -52,6 +54,8 @@ }, { "config": { + "customerId": "dfashethdetyjetyj", + "subAccount": false, "oneTrustCookieCategories": { "cloud": [], "warehouse": [ @@ -83,6 +87,75 @@ }, { "config": { + "subAccount": false, + "oneTrustCookieCategories": { + "cloud": [], + "warehouse": [ + { + "oneTrustCookieCategory": "env.ENVIRONMENT_VARIABLE" + } + ], + "shopify": [ + { + "oneTrustCookieCategory": "{{ event.properties.prop1 || 'val' }}" + } + ] + }, + "ketchConsentPurposes": { + "cloud": [], + "warehouse": [ + { + "purpose": "env.ENVIRONMENT_VARIABLE" + } + ], + "shopify": [ + { + "purpose": "{{ event.properties.prop1 || 'val' }}" + } + ] + } + }, + "result": false, + "error": [" must have required property 'customerId'"] + }, + { + "config": { + "customerId": "dfashethdetyjetyj", + "subAccount": "fghdertgh", + "oneTrustCookieCategories": { + "cloud": [], + "warehouse": [ + { + "oneTrustCookieCategory": "env.ENVIRONMENT_VARIABLE" + } + ], + "shopify": [ + { + "oneTrustCookieCategory": "{{ event.properties.prop1 || 'val' }}" + } + ] + }, + "ketchConsentPurposes": { + "cloud": [], + "warehouse": [ + { + "purpose": "env.ENVIRONMENT_VARIABLE" + } + ], + "shopify": [ + { + "purpose": "{{ event.properties.prop1 || 'val' }}" + } + ] + } + }, + "result": false, + "error": ["subAccount must be boolean"] + }, + { + "config": { + "customerId": "dfashethdetyjetyj", + "subAccount": false, "oneTrustCookieCategories": [ { "oneTrustCookieCategory": "C0001" @@ -105,6 +178,8 @@ }, { "config": { + "customerId": "dfashethdetyjetyj", + "subAccount": false, "oneTrustCookieCategories": { "cloud": [ { @@ -164,6 +239,8 @@ }, { "config": { + "customerId": "dfashethdetyjetyj", + "subAccount": false, "oneTrustCookieCategories": { "cloud": [ "not an object", From 258bf1a0a1c2a9c36c32dcec57cca2062a5f1f88 Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:32:32 +0530 Subject: [PATCH 14/18] chore: mixpanel ui config var name change (#1770) --- src/configurations/destinations/mp/ui-config.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index e5320ab75..b2c9e3b53 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -434,10 +434,9 @@ { "type": "textInput", "label": "Percentage of SDK initializations that will qualify for replay data capture", - "value": "sessionReplayPercentage", + "configKey": "sessionReplayPercentage", "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(100|[1-9]?[0-9])$", "regexErrorMessage": "Invalid Percentage", - "required": false, "placeholder": "e.g: 1", "note": "This value, if it's not blank, will be sent as record_sessions_percent to Mixpanel for every event/page/screen call." }, From 8f6fe3f55991d71e1fa46e17b326c3f150cc3b96 Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti <110057617+aanshi07@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:33:42 +0530 Subject: [PATCH 15/18] feat: feature flag to hide tune dest (#1771) --- src/configurations/destinations/tune/db-config.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/configurations/destinations/tune/db-config.json b/src/configurations/destinations/tune/db-config.json index e018d0ac5..0efebfe4a 100644 --- a/src/configurations/destinations/tune/db-config.json +++ b/src/configurations/destinations/tune/db-config.json @@ -103,5 +103,11 @@ }, "secretKeys": [] }, - "options": { "isBeta": true } + "options": { + "isBeta": true, + "hidden": { + "featureFlagName": "AMP_tune_destination", + "featureFlagValue": false + } + } } From 15fefe9b2aeee8c8d3d3a3de250449f318f2b63f Mon Sep 17 00:00:00 2001 From: Aanshi Lahoti <110057617+aanshi07@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:39:07 +0530 Subject: [PATCH 16/18] fix: updated tune ui (#1774) --- .../destinations/tune/db-config.json | 2 +- .../destinations/tune/schema.json | 6 +- .../destinations/tune/ui-config.json | 51 ++++++++--------- test/data/validation/destinations/tune.json | 56 +++++++++++++++++-- 4 files changed, 81 insertions(+), 34 deletions(-) diff --git a/src/configurations/destinations/tune/db-config.json b/src/configurations/destinations/tune/db-config.json index 0efebfe4a..1cd727423 100644 --- a/src/configurations/destinations/tune/db-config.json +++ b/src/configurations/destinations/tune/db-config.json @@ -33,7 +33,7 @@ "warehouse": ["cloud"] }, "destConfig": { - "defaultConfig": ["tuneEvents"], + "defaultConfig": ["subdomain", "tuneEvents"], "android": [ "connectionMode", "consentManagement", diff --git a/src/configurations/destinations/tune/schema.json b/src/configurations/destinations/tune/schema.json index 1938f3053..c96219fdb 100644 --- a/src/configurations/destinations/tune/schema.json +++ b/src/configurations/destinations/tune/schema.json @@ -1,12 +1,12 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": [], + "required": ["subdomain"], "type": "object", "properties": { - "url": { + "subdomain": { "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$|^$" + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, "eventName": { "type": "string", diff --git a/src/configurations/destinations/tune/ui-config.json b/src/configurations/destinations/tune/ui-config.json index d2f7815fa..496b09809 100644 --- a/src/configurations/destinations/tune/ui-config.json +++ b/src/configurations/destinations/tune/ui-config.json @@ -11,7 +11,16 @@ "title": "Connection Settings", "note": "Update your connection settings here", "icon": "settings", - "fields": [] + "fields": [ + { + "type": "textInput", + "label": "Subdomain", + "placeholder": "examplenetwork", + "configKey": "subdomain", + "required": true, + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + ] } ] }, @@ -82,14 +91,6 @@ "label": "Map RudderStack event to Tune event", "configKey": "tuneEvents", "rowFields": [ - { - "type": "textInput", - "label": "URL", - "configKey": "url", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$|^$", - "regexErrorMessage": "Invalid URL", - "placeholder": "e.g. https://demo.go2cloud.org/aff_l?offer_id=45&aff_id=1029" - }, { "type": "textInput", "label": "Event name", @@ -102,6 +103,14 @@ "type": "mapping", "configKey": "standardMapping", "default": [ + { + "from": "transactionId", + "to": "transaction_id" + }, + { + "from": "offerId", + "to": "offer_id" + }, { "from": "affId", "to": "aff_id" @@ -126,10 +135,6 @@ "from": "goalRef", "to": "goal_ref" }, - { - "from": "offerId", - "to": "offer_id" - }, { "from": "payout", "to": "payout" @@ -145,10 +150,6 @@ { "from": "status", "to": "status" - }, - { - "from": "transactionId", - "to": "transaction_id" } ], "columns": [ @@ -164,6 +165,14 @@ "label": "Tune Field", "placeholder": "e.g: purchase", "options": [ + { + "name": "transaction_id", + "value": "transaction_id" + }, + { + "name": "offer_id", + "value": "offer_id" + }, { "name": "aff_id", "value": "aff_id" @@ -188,10 +197,6 @@ "name": "goal_ref", "value": "goal_ref" }, - { - "name": "offer_id", - "value": "offer_id" - }, { "name": "payout", "value": "payout" @@ -207,10 +212,6 @@ { "name": "status", "value": "status" - }, - { - "name": "transaction_id", - "value": "transaction_id" } ] } diff --git a/test/data/validation/destinations/tune.json b/test/data/validation/destinations/tune.json index 30695bd15..80d2f1093 100644 --- a/test/data/validation/destinations/tune.json +++ b/test/data/validation/destinations/tune.json @@ -1,5 +1,6 @@ [ { + "testTitle": "With all valid fields", "config": { "connectionMode": { "web": "cloud" @@ -7,9 +8,9 @@ "consentManagement": {}, "oneTrustCookieCategories": {}, "ketchConsentPurposes": {}, + "subdomain": "demo", "tuneEvents": [ { - "url": "https://demo.com", "eventName": "product added", "standardMapping": [ { @@ -39,6 +40,7 @@ "result": true }, { + "testTitle": "With two events and their respective mappings", "config": { "connectionMode": { "web": "cloud" @@ -46,9 +48,9 @@ "consentManagement": {}, "oneTrustCookieCategories": {}, "ketchConsentPurposes": {}, + "subdomain": "demo", "tuneEvents": [ { - "url": "https://demo.com", "eventName": "product added", "standardMapping": [ { @@ -74,7 +76,6 @@ ] }, { - "url": "https://demo11.com", "eventName": "order completed", "standardMapping": [ { @@ -100,6 +101,7 @@ "result": true }, { + "testTitle": "With invalid connectionMode value", "config": { "connectionMode": { "web": "abc" @@ -107,9 +109,9 @@ "consentManagement": {}, "oneTrustCookieCategories": {}, "ketchConsentPurposes": {}, + "subdomain": "demo", "tuneEvents": [ { - "url": "https://demo.com", "eventName": "product added", "standardMapping": [ { @@ -140,6 +142,7 @@ "err": ["connectionMode.web must be equal to one of the allowed values"] }, { + "testTitle": "Device mode is not supported", "config": { "connectionMode": { "web": "device" @@ -147,9 +150,9 @@ "consentManagement": {}, "oneTrustCookieCategories": {}, "ketchConsentPurposes": {}, + "subdomain": "demo", "tuneEvents": [ { - "url": "https://demo.com", "eventName": "product added", "standardMapping": [ { @@ -175,9 +178,50 @@ "result": false, "err": ["connectionMode.web must be equal to one of the allowed values"] }, + { + "testTitle": "Without subdomain", + "config": { + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "tuneEvents": [ + { + "eventName": "product added", + "standardMapping": [ + { + "to": "aff_id", + "from": "affId" + }, + { + "to": "transaction_id", + "from": "transactionId" + } + ], + "advSubIdMapping": [ + { + "from": "purchase event", + "to": "adv_sub2" + } + ], + "advUniqueIdMapping": [ + { + "from": "oder completed", + "to": "adv_unique3" + } + ] + } + ] + }, + "result": false, + "err": [" must have required property 'subdomain'"] + }, { "testTitle": "With consent management custom provider config and invalid resolutionStrategy value", "config": { + "subdomain": "demo", "consentManagement": { "android": [ { @@ -196,6 +240,7 @@ { "testTitle": "With consent management custom provider config and no resolutionStrategy value", "config": { + "subdomain": "demo", "consentManagement": { "android": [ { @@ -215,6 +260,7 @@ { "testTitle": "With consent management custom provider config invalid provider value", "config": { + "subdomain": "demo", "consentManagement": { "android": [ { From 10aca8ccc314fba0e5d9a39aa2571e3d34ba49ab Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Wed, 30 Oct 2024 11:13:44 +0530 Subject: [PATCH 17/18] chore: added default value for sessionReplayPercentage in MP (#1775) --- src/configurations/destinations/mp/ui-config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index b2c9e3b53..2c6316ca9 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -438,7 +438,8 @@ "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(100|[1-9]?[0-9])$", "regexErrorMessage": "Invalid Percentage", "placeholder": "e.g: 1", - "note": "This value, if it's not blank, will be sent as record_sessions_percent to Mixpanel for every event/page/screen call." + "default": "0", + "note": "This value, if it's not zero, will be sent as record_sessions_percent to Mixpanel for every event/page/screen call." }, { "type": "checkbox", From deb43c26a4d45485beddd620443ae1052165b719 Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:14:12 +0530 Subject: [PATCH 18/18] chore: adding back useNativeSDK in gainsight px (#1776) --- .../destinations/gainsight_px/db-config.json | 1 + .../destinations/gainsight_px/schema.json | 8 ++++++++ .../destinations/gainsight_px/ui-config.json | 11 +++++++++++ 3 files changed, 20 insertions(+) diff --git a/src/configurations/destinations/gainsight_px/db-config.json b/src/configurations/destinations/gainsight_px/db-config.json index bcef0081e..b0a73e15f 100644 --- a/src/configurations/destinations/gainsight_px/db-config.json +++ b/src/configurations/destinations/gainsight_px/db-config.json @@ -65,6 +65,7 @@ "ketchConsentPurposes" ], "web": [ + "useNativeSDK", "dataCenter", "connectionMode", "consentManagement", diff --git a/src/configurations/destinations/gainsight_px/schema.json b/src/configurations/destinations/gainsight_px/schema.json index 380808f3d..cf1e8ac78 100644 --- a/src/configurations/destinations/gainsight_px/schema.json +++ b/src/configurations/destinations/gainsight_px/schema.json @@ -22,6 +22,14 @@ } } }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, "userAttributeMap": { "type": "array", "items": { diff --git a/src/configurations/destinations/gainsight_px/ui-config.json b/src/configurations/destinations/gainsight_px/ui-config.json index f073f39a0..871ed70ff 100644 --- a/src/configurations/destinations/gainsight_px/ui-config.json +++ b/src/configurations/destinations/gainsight_px/ui-config.json @@ -50,6 +50,17 @@ } ] }, + { + "title": "Native SDK", + "fields": [ + { + "type": "checkbox", + "label": "Use device-mode to send events", + "value": "useNativeSDK", + "default": false + } + ] + }, { "title": "User Attribute Mapping", "fields": [