diff --git a/CHANGELOG.md b/CHANGELOG.md index 7818ad799..0ec887b03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ 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.100.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.99.1...v1.100.0) (2024-12-18) + + +### Features + +* onboard topsort destination ([#1842](https://github.com/rudderlabs/rudder-config-schema/issues/1842)) ([#1846](https://github.com/rudderlabs/rudder-config-schema/issues/1846)) ([0ce45b6](https://github.com/rudderlabs/rudder-config-schema/commit/0ce45b6bc44a29226353b2ad8d929f7372eac235)) + ### [1.99.1](https://github.com/rudderlabs/rudder-config-schema/compare/v1.99.0...v1.99.1) (2024-12-12) diff --git a/package-lock.json b/package-lock.json index 471aed4ef..e90a786ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.99.1", + "version": "1.100.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.99.1", + "version": "1.100.0", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 9b18ff8b6..ccff979d9 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.99.1", + "version": "1.100.0", "description": "", "main": "src/index.ts", "private": true, diff --git a/src/configurations/destinations/adobe_analytics/ui-config.json b/src/configurations/destinations/adobe_analytics/ui-config.json index 09db547ad..23c05aa56 100644 --- a/src/configurations/destinations/adobe_analytics/ui-config.json +++ b/src/configurations/destinations/adobe_analytics/ui-config.json @@ -351,13 +351,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Event", "placeholder": "e.g: Product Searched" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Adobe Custom Event", "placeholder": "e.g: conv.add_to_cart" } @@ -384,13 +384,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack field", "placeholder": "e.g: page.name" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Adobe Context Data Variable", "placeholder": "e.g: pName" } @@ -424,13 +424,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack field", "placeholder": "e.g: page.name" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Adobe mobile event", "placeholder": "e.g: pName" } @@ -457,13 +457,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack field", "placeholder": "e.g: phone" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "eVar index", "placeholder": "e.g: 2" } @@ -490,13 +490,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack field", "placeholder": "e.g: phone" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Heir index", "placeholder": "e.g: 2" } @@ -523,19 +523,19 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack field", "placeholder": "e.g: phone" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "List index", "placeholder": "e.g: 2" }, { "type": "singleSelect", - "key": "delimiter", + "configKey": "delimiter", "label": "List delimiter", "options": [ { @@ -584,19 +584,19 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack field", "placeholder": "e.g: phone" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Prop index", "placeholder": "e.g: 2" }, { "type": "singleSelect", - "key": "delimiter", + "configKey": "delimiter", "label": "List delimiter", "options": [ { @@ -645,13 +645,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack event", "placeholder": "e.g: video playback started" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Heartbeat event", "options": [ { @@ -759,13 +759,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Event", "placeholder": "e.g: Order Completed" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Adobe Event", "placeholder": "e.g: event1" } @@ -800,13 +800,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Event", "placeholder": "e.g: Order Completed" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Adobe Event", "placeholder": "e.g: event1" } @@ -834,13 +834,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack field", "placeholder": "e.g: product_id" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "eVar Index", "placeholder": "e.g: 2" } diff --git a/src/configurations/destinations/bluecore/ui-config.json b/src/configurations/destinations/bluecore/ui-config.json index 61fc5e04a..895c39637 100644 --- a/src/configurations/destinations/bluecore/ui-config.json +++ b/src/configurations/destinations/bluecore/ui-config.json @@ -89,13 +89,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Event Name", "placeholder": "e.g: Custom Purchase Event" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Bluecore Standard Ecommerce Event", "placeholder": "e.g: purchase", "options": [ diff --git a/src/configurations/destinations/facebook_conversions/ui-config.json b/src/configurations/destinations/facebook_conversions/ui-config.json index 002d53b4d..4b4b98a39 100644 --- a/src/configurations/destinations/facebook_conversions/ui-config.json +++ b/src/configurations/destinations/facebook_conversions/ui-config.json @@ -275,13 +275,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Event", "placeholder": "e.g: Product Searched" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Facebook custom event", "options": [ { diff --git a/src/configurations/destinations/facebook_pixel/ui-config.json b/src/configurations/destinations/facebook_pixel/ui-config.json index ffaab08c2..4aaad4ad1 100644 --- a/src/configurations/destinations/facebook_pixel/ui-config.json +++ b/src/configurations/destinations/facebook_pixel/ui-config.json @@ -431,13 +431,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Event", "placeholder": "e.g: Product Searched" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Facebook custom event", "options": [ { @@ -565,13 +565,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Event name", "placeholder": "e.g: Product Searched" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Pixel ID", "placeholder": "e.g: 234567654654" } diff --git a/src/configurations/destinations/ga4_v2/ui-config.json b/src/configurations/destinations/ga4_v2/ui-config.json index 1436d146f..26be8a05d 100644 --- a/src/configurations/destinations/ga4_v2/ui-config.json +++ b/src/configurations/destinations/ga4_v2/ui-config.json @@ -434,14 +434,14 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Property", "placeholder": "properties.price" }, { "type": "autoComplete", "label": "GA4 parameter", - "key": "to", + "configKey": "to", "placeholder": "value" } ] @@ -2098,7 +2098,7 @@ "label": "Map your Event Property", "columns": [ { - "key": "from", + "configKey": "from", "type": "textInput", "label": "RudderStack Property Name", "placeholder": "e.g $.properties.revenue" @@ -2106,7 +2106,7 @@ { "type": "autoComplete", "label": "GA4 parameter", - "key": "to", + "configKey": "to", "placeholder": "$.event[0].params.value" } ], diff --git a/src/configurations/destinations/ga4_v2/ui-config.jt b/src/configurations/destinations/ga4_v2/ui-config.jt index f6f175d76..880816f17 100644 --- a/src/configurations/destinations/ga4_v2/ui-config.jt +++ b/src/configurations/destinations/ga4_v2/ui-config.jt @@ -434,14 +434,14 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Property", "placeholder": "properties.price" }, { "type": "autoComplete", "label": "GA4 parameter", - "key": "to", + "configKey": "to", "placeholder": "value" } ] @@ -484,7 +484,7 @@ "label": "Map your Event Property", "columns": [ { - "key": "from", + "configKey": "from", "type": "textInput", "label": "RudderStack Property Name", "placeholder": "e.g $.properties.revenue" @@ -492,7 +492,7 @@ { "type": "autoComplete", "label": "GA4 parameter", - "key": "to", + "configKey": "to", "placeholder": "$.event[0].params.value" } ], diff --git a/src/configurations/destinations/hs/ui-config.json b/src/configurations/destinations/hs/ui-config.json index 800a6115e..c29de62a7 100644 --- a/src/configurations/destinations/hs/ui-config.json +++ b/src/configurations/destinations/hs/ui-config.json @@ -387,13 +387,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Property Name", "placeholder": "e.g firstName" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "HubSpot Property Name", "placeholder": "e.g first_name" } diff --git a/src/configurations/destinations/http/ui-config.json b/src/configurations/destinations/http/ui-config.json index 8148ce3b0..d666a8282 100644 --- a/src/configurations/destinations/http/ui-config.json +++ b/src/configurations/destinations/http/ui-config.json @@ -471,7 +471,7 @@ "columns": [ { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Key", "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$", "regexErrorMessage": "Please enter a valid JSON path", @@ -479,7 +479,7 @@ }, { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Value", "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant", @@ -501,7 +501,7 @@ "columns": [ { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Key", "regex": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "JSON path is not supported. Please enter a constant", @@ -509,7 +509,7 @@ }, { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Value", "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant", @@ -531,7 +531,7 @@ "columns": [ { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Key", "regex": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "JSON path is not supported. Please enter a constant", @@ -539,7 +539,7 @@ }, { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Value", "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant", diff --git a/src/configurations/destinations/kafka/ui-config.json b/src/configurations/destinations/kafka/ui-config.json index 00768c0ce..651554b13 100644 --- a/src/configurations/destinations/kafka/ui-config.json +++ b/src/configurations/destinations/kafka/ui-config.json @@ -237,13 +237,13 @@ "columns": [ { "type": "textInput", - "key": "schemaId", + "configKey": "schemaId", "label": "Schema Id", "placeholder": "e.g: schema-id" }, { "type": "textInput", - "key": "schema", + "configKey": "schema", "label": "Schema", "placeholder": "schema object..." } @@ -277,7 +277,7 @@ "columns": [ { "type": "singleSelect", - "key": "from", + "configKey": "from", "label": "Event Type", "options": [ { @@ -305,7 +305,7 @@ }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Topic", "placeholder": "sample topic" } @@ -325,13 +325,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Event Name", "placeholder": "Sample event Name" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Topic", "placeholder": "sample topic" } diff --git a/src/configurations/destinations/marketo/ui-config.json b/src/configurations/destinations/marketo/ui-config.json index d0c58b48c..6f3b223bc 100644 --- a/src/configurations/destinations/marketo/ui-config.json +++ b/src/configurations/destinations/marketo/ui-config.json @@ -147,19 +147,19 @@ "columns": [ { "type": "textInput", - "key": "event", + "configKey": "event", "label": "RudderStack Event Name", "placeholder": "e.g: Product Searched" }, { "type": "textInput", - "key": "marketoPrimarykey", + "configKey": "marketoPrimarykey", "label": "Marketo Primary Key", "placeholder": "e.g: name" }, { "type": "textInput", - "key": "marketoActivityId", + "configKey": "marketoActivityId", "label": "Activity ID", "placeholder": "e.g: 100001" } @@ -179,13 +179,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Traits name", "placeholder": "e.g: leadScore" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Custom field api name", "placeholder": "e.g: customLeadScore" } @@ -205,13 +205,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Event Property", "placeholder": "e.g: name" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Marketo Custom Activity field", "placeholder": "e.g: productName" } diff --git a/src/configurations/destinations/optimizely_fullstack/ui-config.json b/src/configurations/destinations/optimizely_fullstack/ui-config.json index dba68a360..4299bacb7 100644 --- a/src/configurations/destinations/optimizely_fullstack/ui-config.json +++ b/src/configurations/destinations/optimizely_fullstack/ui-config.json @@ -848,13 +848,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Event", "placeholder": "e.g: Product Searched" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Optimizely Event", "placeholder": "e.g: Searched" } @@ -874,13 +874,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Attribute", "placeholder": "e.g: firstName" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Optimizely Attribute", "placeholder": "e.g: first_name" } @@ -901,13 +901,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Page Name/Category", "placeholder": "e.g: Index" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Optimizely Event", "placeholder": "e.g: Viewed Home Page" } diff --git a/src/configurations/destinations/ortto/ui-config.json b/src/configurations/destinations/ortto/ui-config.json index 502e65e1f..53a1cec57 100644 --- a/src/configurations/destinations/ortto/ui-config.json +++ b/src/configurations/destinations/ortto/ui-config.json @@ -223,19 +223,19 @@ "columns": [ { "type": "textInput", - "key": "rudderProperty", + "configKey": "rudderProperty", "label": "RudderStack Property Name", "placeholder": "e.g firstName" }, { "type": "textInput", - "key": "orttoProperty", + "configKey": "orttoProperty", "label": "Ortto Property Name", "placeholder": "e.g first_name" }, { "type": "singleSelect", - "key": "type", + "configKey": "type", "label": "Ortto Property type", "options": [ { @@ -313,19 +313,19 @@ "columns": [ { "type": "textInput", - "key": "rudderTraits", + "configKey": "rudderTraits", "label": "RudderStack traits Name", "placeholder": "e.g firstName" }, { "type": "textInput", - "key": "orttoAttribute", + "configKey": "orttoAttribute", "label": "Ortto attribute Name", "placeholder": "e.g first_name" }, { "type": "singleSelect", - "key": "type", + "configKey": "type", "label": "Ortto attribute type", "options": [ { diff --git a/src/configurations/destinations/reddit/ui-config.json b/src/configurations/destinations/reddit/ui-config.json index d63c82a23..5679e4a8b 100644 --- a/src/configurations/destinations/reddit/ui-config.json +++ b/src/configurations/destinations/reddit/ui-config.json @@ -104,13 +104,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Event", "placeholder": "e.g: Product Viewed" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Reddit Event", "options": [ { diff --git a/src/configurations/destinations/rockerbox/ui-config.json b/src/configurations/destinations/rockerbox/ui-config.json index 8a4b97aaf..824cba7a4 100644 --- a/src/configurations/destinations/rockerbox/ui-config.json +++ b/src/configurations/destinations/rockerbox/ui-config.json @@ -229,13 +229,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Event", "placeholder": "e.g: Product Added" }, { "type": "textInput", - "key": "to", + "configKey": "to", "label": "Rockerbox Event", "placeholder": "e.g: conv.add_to_cart" } diff --git a/src/configurations/destinations/spotifyPixel/ui-config.json b/src/configurations/destinations/spotifyPixel/ui-config.json index c644f4313..58f75aa94 100644 --- a/src/configurations/destinations/spotifyPixel/ui-config.json +++ b/src/configurations/destinations/spotifyPixel/ui-config.json @@ -211,13 +211,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Event Name", "placeholder": "e.g: Order Completed" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Spotify Pixel Standard Event", "placeholder": "e.g: Checkout", "options": [ diff --git a/src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json b/src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json index 60a10ebe3..963a3cadd 100644 --- a/src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json +++ b/src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json @@ -108,13 +108,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "RudderStack Event", "placeholder": "e.g: Product Searched" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Trade Desk Event", "options": [ { @@ -158,13 +158,13 @@ "columns": [ { "type": "textInput", - "key": "rudderProperty", + "configKey": "rudderProperty", "label": "RudderStack property path", "placeholder": "e.g properties.key1" }, { "type": "singleSelect", - "key": "tradeDeskProperty", + "configKey": "tradeDeskProperty", "label": "Trade Desk custom property", "options": [ { diff --git a/src/configurations/destinations/topsort/db-config.json b/src/configurations/destinations/topsort/db-config.json new file mode 100644 index 000000000..a332d44c6 --- /dev/null +++ b/src/configurations/destinations/topsort/db-config.json @@ -0,0 +1,109 @@ +{ + "name": "TOPSORT", + "displayName": "Topsort", + "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": ["apiKey", "topsortEvents"], + "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": ["apiKey"] + }, + "options": { + "isBeta": true + } +} diff --git a/src/configurations/destinations/topsort/schema.json b/src/configurations/destinations/topsort/schema.json new file mode 100644 index 000000000..be1f7159f --- /dev/null +++ b/src/configurations/destinations/topsort/schema.json @@ -0,0 +1,876 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": ["apiKey"], + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" + }, + "topsortEvents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "enum": [ + "Product Clicked", + "Product Viewed", + "Product Added", + "Product Removed", + "Cart Viewed", + "Checkout Started", + "Checkout Step Viewed", + "Payment Info Entered", + "Order Updated", + "Order Completed", + "Order Refunded", + "Order Cancelled" + ] + }, + "to": { + "type": "string", + "enum": ["clicks", "impressions", "purchases"] + } + } + } + }, + "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/topsort/ui-config.json b/src/configurations/destinations/topsort/ui-config.json new file mode 100644 index 000000000..6a6d4573c --- /dev/null +++ b/src/configurations/destinations/topsort/ui-config.json @@ -0,0 +1,260 @@ +{ + "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": "API Key", + "configKey": "apiKey", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", + "regexErrorMessage": "Invalid API Key", + "placeholder": "e.g. 88a1b72e-a017-4803-9854-0c447045c29e" + } + ] + } + ] + }, + { + "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 Topsort events", + "hideEditIcon": true, + "sections": [ + { + "groups": [ + { + "title": "RudderStack Event to Topsort Event Mapping", + "fields": [ + { + "type": "redirect", + "redirectGroupKey": "eventsMapping", + "label": "Event and property mappings", + "note": "Map RudderStack events/properties to Topsort events/properties" + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "SDK settings", + "note": "not visible in the ui", + "fields": [] + }, + "redirectGroups": { + "eventsMapping": { + "fields": [ + { + "type": "mapping", + "label": "Map RudderStack event to Topsort event", + "configKey": "topsortEvents", + "default": [ + { + "from": "Product Clicked", + "to": "clicks" + }, + { + "from": "Product Viewed", + "to": "impressions" + }, + { + "from": "Order Completed", + "to": "purchases" + } + ], + "columns": [ + { + "type": "singleSelect", + "key": "from", + "label": "RudderStack Event", + "options": [ + { + "label": "Product Clicked", + "value": "Product Clicked" + }, + { + "label": "Product Viewed", + "value": "Product Viewed" + }, + { + "label": "Product Added", + "value": "Product Added" + }, + { + "label": "Product Removed", + "value": "Product Removed" + }, + { + "label": "Cart Viewed", + "value": "Cart Viewed" + }, + { + "label": "Checkout Started", + "value": "Checkout Started" + }, + { + "label": "Checkout Step Viewed", + "value": "Checkout Step Viewed" + }, + { + "label": "Payment Info Entered", + "value": "Payment Info Entered" + }, + { + "label": "Order Updated", + "value": "Order Updated" + }, + { + "label": "Order Completed", + "value": "Order Completed" + }, + { + "label": "Order Refunded", + "value": "Order Refunded" + }, + { + "label": "Order Cancelled", + "value": "Order Cancelled" + } + ] + }, + { + "type": "singleSelect", + "key": "to", + "label": "Topsort event", + "options": [ + { + "label": "clicks", + "value": "clicks" + }, + { + "label": "impressions", + "value": "impressions" + }, + { + "label": "purchases", + "value": "purchases" + } + ] + } + ] + } + ] + } + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category IDs", + "note": "Input your consent category IDs by pressing 'Enter' after each entry. We recommend using IDs instead of 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": "" + } + ] + } + ] + } + ] + } + } +} diff --git a/src/configurations/destinations/tune/ui-config.json b/src/configurations/destinations/tune/ui-config.json index cb3a9eb76..7139fd146 100644 --- a/src/configurations/destinations/tune/ui-config.json +++ b/src/configurations/destinations/tune/ui-config.json @@ -155,13 +155,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Rudder Payload Field", "placeholder": "e.g: Purchase Event" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Tune Field", "placeholder": "e.g: purchase", "options": [ @@ -224,13 +224,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Rudder Payload Field", "placeholder": "e.g: Purchase Event" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Tune Field", "placeholder": "e.g: purchase", "options": [ @@ -265,13 +265,13 @@ "columns": [ { "type": "textInput", - "key": "from", + "configKey": "from", "label": "Rudder Payload Field", "placeholder": "e.g: Purchase Event" }, { "type": "singleSelect", - "key": "to", + "configKey": "to", "label": "Tune Field", "placeholder": "e.g: purchase", "options": [ diff --git a/test/data/validation/destinations/topsort.json b/test/data/validation/destinations/topsort.json new file mode 100644 index 000000000..a07f0132a --- /dev/null +++ b/test/data/validation/destinations/topsort.json @@ -0,0 +1,197 @@ +[ + { + "testTitle": "With all valid events and details", + "config": { + "apiKey": "test-api", + "topsortEvents": [ + { + "to": "clicks", + "from": "Product Clicked" + }, + { + "to": "impressions", + "from": "Product Viewed" + }, + { + "to": "purchases", + "from": "Order Completed" + } + ], + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {} + }, + "result": true + }, + { + "testTitle": "With invalid connectionMode value", + "config": { + "apiKey": "test-api", + "topsortEvents": [ + { + "to": "clicks", + "from": "Product Clicked" + }, + { + "to": "impressions", + "from": "Product Viewed" + }, + { + "to": "purchases", + "from": "Order Completed" + } + ], + "connectionMode": { + "web": "abc" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {} + }, + "result": false, + "err": ["connectionMode.web must be equal to one of the allowed values"] + }, + { + "testTitle": "Device mode is not supported", + "config": { + "connectionMode": { + "web": "device" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "apiKey": "test-api", + "topsortEvents": [ + { + "to": "clicks", + "from": "Product Clicked" + }, + { + "to": "impressions", + "from": "Product Viewed" + }, + { + "to": "purchases", + "from": "Order Completed" + } + ] + }, + "result": false, + "err": ["connectionMode.web must be equal to one of the allowed values"] + }, + { + "testTitle": "without api key", + "config": { + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "topsortEvents": [ + { + "to": "clicks", + "from": "Product Clicked" + }, + { + "to": "impressions", + "from": "Product Viewed" + }, + { + "to": "purchases", + "from": "Order Completed" + } + ] + }, + "result": false, + "err": [" must have required property 'apiKey'"] + }, + { + "testTitle": "Invalid Topsort event name", + "config": { + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "apiKey": "test-api", + "topsortEvents": [ + { + "to": "test", + "from": "Product Clicked" + }, + { + "to": "impressions", + "from": "Product Viewed" + } + ] + }, + "result": false, + "err": ["topsortEvents.0.to must be equal to one of the allowed values"] + }, + { + "testTitle": "Invalid Rudderstack event name", + "config": { + "connectionMode": { + "web": "cloud" + }, + "consentManagement": {}, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {}, + "apiKey": "test-api", + "topsortEvents": [ + { + "to": "clicks", + "from": "test" + }, + { + "to": "impressions", + "from": "Product Viewed" + } + ] + }, + "result": false, + "err": ["topsortEvents.0.from must be equal to one of the allowed values"] + }, + { + "testTitle": "With consent management custom provider config and no resolutionStrategy value", + "config": { + "apiKey": "test-api", + "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": { + "apiKey": "test-api", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + }, + "oneTrustCookieCategories": {}, + "ketchConsentPurposes": {} + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + } +]