diff --git a/.github/workflows/raise-pr-for-constants.yml b/.github/workflows/raise-pr-for-constants.yml index 47691c630..b559d8d8c 100644 --- a/.github/workflows/raise-pr-for-constants.yml +++ b/.github/workflows/raise-pr-for-constants.yml @@ -33,10 +33,10 @@ jobs: id: compare_files run: | if cmp -s "${{ env.SRC_FILE }}" "dest-repo/${{ env.DEST_PATH }}"; then - echo "No changes detected." > "result.txt" + echo "No changes detected." echo "pr_required=false" >> $GITHUB_OUTPUT else - echo "Changes detected." > "result.txt" + echo "Changes detected." echo "pr_required=true" >> $GITHUB_OUTPUT fi @@ -58,20 +58,21 @@ jobs: GH_TOKEN: ${{ secrets.PAT }} run: | cd dest-repo - EXISTING_PR=$(gh pr list --head ${{ env.BRANCH_NAME }} --json number --jq ".[0].number") + EXISTING_PR=$(gh pr list --head "$BRANCH_NAME" --json number --jq ".[0].number") if [ -z "$EXISTING_PR" ]; then - gh pr create \ - --title "fix: update destination constants" \ - --body "$(cat < { + try { + const destinationsFilePath = path.join(destinationsDir, destination, 'db-config.json'); + if (!fs.existsSync(destinationsFilePath)) { + console.warn(`Skipping ${destination}: Missing configuration file`); + return null; + } + const destinationsContent = fs.readFileSync(destinationsFilePath, 'utf8'); + const destinationDefinition = JSON.parse(destinationsContent); + if (!destinationDefinition.name) { + console.warn(`Skipping ${destination}: Missing name`); + return null; + } + return { + name: destinationDefinition.name, + config: destinationDefinition.config, + }; + } catch (err) { + console.error(`Error processing ${destination}:`, err.message); + return null; + } + }) + .filter(Boolean) + .filter( + (destination) => + !destination.config?.disableJsonMapper && !destination.config?.supportsVisualMapper, + ) + .map((destination) => destination.name); + } catch (err) { + console.error('Failed to process destinations:', err.message); + return []; + } +} + +console.log(findJsonMapperDestinations().join('\n')); diff --git a/src/configurations/destinations/bingads_offline_conversions/db-config.json b/src/configurations/destinations/bingads_offline_conversions/db-config.json index 084f502a1..432dbde4d 100644 --- a/src/configurations/destinations/bingads_offline_conversions/db-config.json +++ b/src/configurations/destinations/bingads_offline_conversions/db-config.json @@ -20,13 +20,13 @@ "warehouse": ["cloud"] }, "destConfig": { - "defaultConfig": ["rudderAccountId", "customerAccountId", "customerId"], "warehouse": [ "connectionMode", "oneTrustCookieCategories", "ketchConsentPurposes", "consentManagement" - ] + ], + "defaultConfig": ["rudderAccountId", "customerAccountId", "customerId", "isHashRequired"] } }, "options": { diff --git a/src/configurations/destinations/bingads_offline_conversions/schema.json b/src/configurations/destinations/bingads_offline_conversions/schema.json index 7b8b42c51..005b32a91 100644 --- a/src/configurations/destinations/bingads_offline_conversions/schema.json +++ b/src/configurations/destinations/bingads_offline_conversions/schema.json @@ -12,6 +12,10 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^[0-9]+$" }, + "isHashRequired": { + "type": "boolean", + "default": false + }, "oneTrustCookieCategories": { "type": "object", "properties": { diff --git a/src/configurations/destinations/bingads_offline_conversions/ui-config.json b/src/configurations/destinations/bingads_offline_conversions/ui-config.json index 96da2f9ff..5f8d32d71 100644 --- a/src/configurations/destinations/bingads_offline_conversions/ui-config.json +++ b/src/configurations/destinations/bingads_offline_conversions/ui-config.json @@ -58,6 +58,38 @@ "title": "Configuration settings", "note": "Manage the settings for your destination", "sections": [ + { + "id": "hash", + "title": "Destination settings", + "note": "Configure advanced destination-specific settings here", + "icon": "settings", + "groups": [ + { + "title": "Bing ads offline conversion additional settings", + "fields": [ + { + "type": "checkbox", + "label": "Enable it, if you are not sending hashed data.", + "note": [ + "After enabling this we will send", + { + "text": "hashed email", + "link": "https://learn.microsoft.com/en-us/advertising/bulk-service/offline-conversion?view=bingads-13#hashedemailaddress" + }, + "and", + { + "text": "hashed phone numbers", + "link": "https://learn.microsoft.com/en-us/advertising/bulk-service/offline-conversion?view=bingads-13#hashedphonenumber" + }, + "to Bingads Offline Conversion." + ], + "configKey": "isHashRequired", + "default": false + } + ] + } + ] + }, { "id": "consentSettings", "title": "Consent settings", diff --git a/src/configurations/destinations/http/db-config.json b/src/configurations/destinations/http/db-config.json index 843920caa..aeed36063 100644 --- a/src/configurations/destinations/http/db-config.json +++ b/src/configurations/destinations/http/db-config.json @@ -45,6 +45,7 @@ "propertiesMapping", "queryParams", "headers", + "pathParams", "isBatchingEnabled", "maxBatchSize", "blacklistedEvents", diff --git a/src/configurations/destinations/http/schema.json b/src/configurations/destinations/http/schema.json index 706b28362..c1b9a4f4b 100644 --- a/src/configurations/destinations/http/schema.json +++ b/src/configurations/destinations/http/schema.json @@ -38,7 +38,19 @@ }, "from": { "type": "string", - "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + } + } + } + }, + "pathParams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" } } } @@ -50,11 +62,11 @@ "properties": { "to": { "type": "string", - "pattern": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" }, "from": { "type": "string", - "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" } } } @@ -66,11 +78,11 @@ "properties": { "to": { "type": "string", - "pattern": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" }, "from": { "type": "string", - "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" } } } diff --git a/src/configurations/destinations/http/ui-config.json b/src/configurations/destinations/http/ui-config.json index d666a8282..b20d980a1 100644 --- a/src/configurations/destinations/http/ui-config.json +++ b/src/configurations/destinations/http/ui-config.json @@ -481,7 +481,7 @@ "type": "textInput", "configKey": "from", "label": "Value", - "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant", "placeholder": "e.g: $.properties.key1" } @@ -490,8 +490,24 @@ ] }, { - "name": "Query Parameters", + "name": "Request URL", "fields": [ + { + "type": "mapping", + "label": "Enter your path parameters in sequence", + "columns": [ + { + "key": "path", + "type": "textInput", + "label": "Path", + "placeholder": "$.userId or users", + "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regexErrorMessage": "Please enter a valid JSON path or a constant" + } + ], + "default": [], + "configKey": "pathParams" + }, { "type": "mapping", "label": "Map your query parameters", @@ -503,7 +519,7 @@ "type": "textInput", "configKey": "to", "label": "Key", - "regex": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "JSON path is not supported. Please enter a constant", "placeholder": "e.g: customerId" }, @@ -511,7 +527,7 @@ "type": "textInput", "configKey": "from", "label": "Value", - "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant", "placeholder": "e.g: $.userId or userId" } @@ -533,7 +549,7 @@ "type": "textInput", "configKey": "to", "label": "Key", - "regex": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "JSON path is not supported. Please enter a constant", "placeholder": "e.g. content-type" }, @@ -541,7 +557,7 @@ "type": "textInput", "configKey": "from", "label": "Value", - "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant", "placeholder": "e.g. application/json" } diff --git a/src/configurations/sources/amp/db-config.json b/src/configurations/sources/amp/db-config.json index f27a7d0cf..d98b0b85c 100644 --- a/src/configurations/sources/amp/db-config.json +++ b/src/configurations/sources/amp/db-config.json @@ -1,5 +1,8 @@ { "name": "AMP", "displayName": "AMP", - "type": "amp" + "type": "amp", + "options": { + "sdkExecutionEnvironment": "client" + } } diff --git a/src/configurations/sources/android/db-config.json b/src/configurations/sources/android/db-config.json index 95473faed..d9e1b8c21 100644 --- a/src/configurations/sources/android/db-config.json +++ b/src/configurations/sources/android/db-config.json @@ -1,5 +1,8 @@ { "name": "Android", "displayName": "Android", - "type": "android" + "type": "android", + "options": { + "sdkExecutionEnvironment": "client" + } } diff --git a/src/configurations/sources/cordova/db-config.json b/src/configurations/sources/cordova/db-config.json index 5ee84ca76..6cc47e2d2 100644 --- a/src/configurations/sources/cordova/db-config.json +++ b/src/configurations/sources/cordova/db-config.json @@ -1,5 +1,8 @@ { "name": "Cordova", "displayName": "Cordova", - "type": "cordova" + "type": "cordova", + "options": { + "sdkExecutionEnvironment": "client" + } } diff --git a/src/configurations/sources/dotnet/db-config.json b/src/configurations/sources/dotnet/db-config.json index dd5204182..f737ad33c 100644 --- a/src/configurations/sources/dotnet/db-config.json +++ b/src/configurations/sources/dotnet/db-config.json @@ -1,5 +1,8 @@ { "name": "DotNet", "displayName": ".Net", - "type": "cloud" + "type": "cloud", + "options": { + "sdkExecutionEnvironment": "server" + } } diff --git a/src/configurations/sources/flutter/db-config.json b/src/configurations/sources/flutter/db-config.json index d2b602e62..26856f086 100644 --- a/src/configurations/sources/flutter/db-config.json +++ b/src/configurations/sources/flutter/db-config.json @@ -1,5 +1,8 @@ { "name": "Flutter", "displayName": "Flutter", - "type": "flutter" + "type": "flutter", + "options": { + "sdkExecutionEnvironment": "client" + } } diff --git a/src/configurations/sources/go/db-config.json b/src/configurations/sources/go/db-config.json index ca4b23f3c..76e630e2d 100644 --- a/src/configurations/sources/go/db-config.json +++ b/src/configurations/sources/go/db-config.json @@ -1,5 +1,8 @@ { "name": "Go", "displayName": "Go", - "type": "cloud" + "type": "cloud", + "options": { + "sdkExecutionEnvironment": "server" + } } diff --git a/src/configurations/sources/ios/db-config.json b/src/configurations/sources/ios/db-config.json index a55f4d793..4d65dc374 100644 --- a/src/configurations/sources/ios/db-config.json +++ b/src/configurations/sources/ios/db-config.json @@ -1,5 +1,8 @@ { "name": "iOS", "displayName": "iOS", - "type": "ios" + "type": "ios", + "options": { + "sdkExecutionEnvironment": "client" + } } diff --git a/src/configurations/sources/java/db-config.json b/src/configurations/sources/java/db-config.json index 58f6b8686..506d5dc28 100644 --- a/src/configurations/sources/java/db-config.json +++ b/src/configurations/sources/java/db-config.json @@ -1,5 +1,8 @@ { "name": "Java", "displayName": "Java", - "type": "cloud" + "type": "cloud", + "options": { + "sdkExecutionEnvironment": "server" + } } diff --git a/src/configurations/sources/javascript/db-config.json b/src/configurations/sources/javascript/db-config.json index e823e2183..5103b01df 100644 --- a/src/configurations/sources/javascript/db-config.json +++ b/src/configurations/sources/javascript/db-config.json @@ -1,5 +1,8 @@ { "name": "Javascript", - "displayName": "Javascript", - "type": "web" + "displayName": "JavaScript", + "type": "web", + "options": { + "sdkExecutionEnvironment": "client" + } } diff --git a/src/configurations/sources/node/db-config.json b/src/configurations/sources/node/db-config.json index c7ab6a7ff..8d897bee4 100644 --- a/src/configurations/sources/node/db-config.json +++ b/src/configurations/sources/node/db-config.json @@ -1,5 +1,8 @@ { "name": "Node", "displayName": "Node", - "type": "cloud" + "type": "cloud", + "options": { + "sdkExecutionEnvironment": "server" + } } diff --git a/src/configurations/sources/php/db-config.json b/src/configurations/sources/php/db-config.json index c34a3cdd5..149c70949 100644 --- a/src/configurations/sources/php/db-config.json +++ b/src/configurations/sources/php/db-config.json @@ -1,5 +1,8 @@ { "name": "PHP", "displayName": "PHP", - "type": "cloud" + "type": "cloud", + "options": { + "sdkExecutionEnvironment": "server" + } } diff --git a/src/configurations/sources/python/db-config.json b/src/configurations/sources/python/db-config.json index 76415d16d..e8ee2c15c 100644 --- a/src/configurations/sources/python/db-config.json +++ b/src/configurations/sources/python/db-config.json @@ -1,5 +1,8 @@ { "name": "Python", "displayName": "Python", - "type": "cloud" + "type": "cloud", + "options": { + "sdkExecutionEnvironment": "server" + } } diff --git a/src/configurations/sources/react_native/db-config.json b/src/configurations/sources/react_native/db-config.json index 37a80466e..f49efcbfa 100644 --- a/src/configurations/sources/react_native/db-config.json +++ b/src/configurations/sources/react_native/db-config.json @@ -1,5 +1,8 @@ { "name": "ReactNative", "displayName": "React Native", - "type": "reactnative" + "type": "reactnative", + "options": { + "sdkExecutionEnvironment": "client" + } } diff --git a/src/configurations/sources/ruby/db-config.json b/src/configurations/sources/ruby/db-config.json index 8b0e872f2..6da7a202d 100644 --- a/src/configurations/sources/ruby/db-config.json +++ b/src/configurations/sources/ruby/db-config.json @@ -1,5 +1,8 @@ { "name": "Ruby", "displayName": "Ruby", - "type": "cloud" + "type": "cloud", + "options": { + "sdkExecutionEnvironment": "server" + } } diff --git a/src/configurations/sources/rust/db-config.json b/src/configurations/sources/rust/db-config.json index 12e377523..aa4322a1f 100644 --- a/src/configurations/sources/rust/db-config.json +++ b/src/configurations/sources/rust/db-config.json @@ -1,5 +1,8 @@ { "name": "Rust", "displayName": "Rust", - "type": "cloud" + "type": "cloud", + "options": { + "sdkExecutionEnvironment": "server" + } } diff --git a/src/configurations/sources/unity/db-config.json b/src/configurations/sources/unity/db-config.json index ab4bf8d8e..1783a5160 100644 --- a/src/configurations/sources/unity/db-config.json +++ b/src/configurations/sources/unity/db-config.json @@ -1,5 +1,8 @@ { "name": "Unity", "displayName": "Unity", - "type": "unity" + "type": "unity", + "options": { + "sdkExecutionEnvironment": "client" + } } diff --git a/src/configurations/wht-lib-projects/libres360_base_features/db-config.json b/src/configurations/wht-lib-projects/libres360_base_features/db-config.json deleted file mode 100644 index f59fc5b47..000000000 --- a/src/configurations/wht-lib-projects/libres360_base_features/db-config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "base_features", - "githubRepoURL": "https://github.com/rudderlabs/profiles-multieventstream-features", - "description": "base features", - "config": { - "sourcesSupported": [ - { - "name": ".*", - "category": "webhook|null" - } - ], - "destinationsSupported": [ - { - "name": "rs", - "accountRole": "redshift" - }, - { - "name": "snowflake", - "accountRole": "snowflake" - }, - { - "name": "deltalake", - "accountRole": "databricks" - } - ] - } -} diff --git a/src/configurations/wht-lib-projects/libres360_ecommerce_features/db-config.json b/src/configurations/wht-lib-projects/libres360_ecommerce_features/db-config.json deleted file mode 100644 index eedcfebde..000000000 --- a/src/configurations/wht-lib-projects/libres360_ecommerce_features/db-config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "ecommerce_features", - "githubRepoURL": "git@github.com:rudderlabs/profiles-ecommerce-features.git", - "description": "ecommerce features", - "config": { - "sourcesSupported": [ - { - "name": ".*", - "category": "webhook|null" - } - ], - "destinationsSupported": [ - { - "name": "rs", - "accountRole": "redshift" - }, - { - "name": "snowflake", - "accountRole": "snowflake" - } - ] - } -} diff --git a/src/configurations/wht-lib-projects/libres360_shopify_features/db-config.json b/src/configurations/wht-lib-projects/libres360_shopify_features/db-config.json deleted file mode 100644 index be8210872..000000000 --- a/src/configurations/wht-lib-projects/libres360_shopify_features/db-config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "shopify_features", - "githubRepoURL": "git@github.com:rudderlabs/profiles-shopify-features.git", - "description": "shopify features", - "config": { - "sourcesSupported": [ - { - "name": "shopify", - "category": "webhook" - } - ], - "destinationsSupported": [ - { - "name": "rs", - "accountRole": "redshift" - }, - { - "name": "snowflake", - "accountRole": "snowflake" - } - ] - } -} diff --git a/src/configurations/wht-lib-projects/libres360_stripe_features/db-config.json b/src/configurations/wht-lib-projects/libres360_stripe_features/db-config.json deleted file mode 100644 index 347c5c40b..000000000 --- a/src/configurations/wht-lib-projects/libres360_stripe_features/db-config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "stripe_features", - "githubRepoURL": "git@github.com:rudderlabs/profiles-stripe-features.git", - "description": "stripe features", - "config": { - "sourcesSupported": [ - { - "name": "singer-stripe", - "category": "singer-protocol" - } - ], - "destinationsSupported": [ - { - "name": "rs", - "accountRole": "redshift" - }, - { - "name": "snowflake", - "accountRole": "snowflake" - } - ] - } -} diff --git a/src/schemas/sources/db-config-schema.json b/src/schemas/sources/db-config-schema.json index dc1cfa381..1761b63d6 100644 --- a/src/schemas/sources/db-config-schema.json +++ b/src/schemas/sources/db-config-schema.json @@ -146,6 +146,12 @@ "type": "boolean", "title": "Supports Destination Sync Mode", "description": "TBD" + }, + "sdkExecutionEnvironment": { + "type": "string", + "title": "SDK Execution Environment", + "description": "It denotes the environment in which the SDK is executed. The presence of this field also indicates that the source is an SDK source.", + "enum": ["server", "client"] } } } diff --git a/test/data/validation/destinations/bingads_offline_conversions.json b/test/data/validation/destinations/bingads_offline_conversions.json index d157e6bde..f677f48df 100644 --- a/test/data/validation/destinations/bingads_offline_conversions.json +++ b/test/data/validation/destinations/bingads_offline_conversions.json @@ -182,6 +182,7 @@ "config": { "customerAccountId": "434342324", "customerId": "447477473", + "isHashRequired": "true", "oneTrustCookieCategories": { "warehouse": [ { @@ -205,6 +206,7 @@ }, "result": false, "err": [ + "isHashRequired must be boolean", "oneTrustCookieCategories.warehouse.0.oneTrustCookieCategory must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", "ketchConsentPurposes.warehouse.0.purpose must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"" ] @@ -213,6 +215,7 @@ "config": { "customerAccountId": "434342324", "customerId": "447477473", + "isHashRequired": true, "oneTrustCookieCategories": { "warehouse": [ { diff --git a/test/data/validation/destinations/http.json b/test/data/validation/destinations/http.json index 0c299d1d0..5d933acd2 100644 --- a/test/data/validation/destinations/http.json +++ b/test/data/validation/destinations/http.json @@ -577,5 +577,123 @@ "ketchConsentPurposes.web must be array", "ketchConsentPurposes.unity.0 must be object" ] + }, + { + "testTitle": "With pathParams", + "config": { + "apiUrl": "http://sample.com/api/hooks/{{$.traits.userId}}/url/{{$.properties.event}}", + "auth": "basicAuth", + "username": "test-user", + "password": "", + "method": "POST", + "format": "JSON", + "http-connectionMode": "cloud", + "connectionMode": { + "cloud": "cloud" + }, + "consentManagement": {}, + "isBatchingEnabled": true, + "maxBatchSize": "10", + "headers": [ + { + "from": "$.h1", + "to": "'val1'" + }, + { + "from": "$.h2", + "to": "2" + }, + { + "to": "testProp", + "from": "$.properties.testProp" + } + ], + "queryParams": [ + { + "from": "$.q1", + "to": "'val1'" + } + ], + "propertiesMapping": [ + { + "from": "$.properties.key1", + "to": "$.events.key2" + } + ], + "pathParams": [ + { + "path": "$.properties.key1" + } + ], + "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" + ] } ]