diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ca48716c..ad4401851 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ 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.77.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.76.0...v1.77.0) (2024-06-14) + + +### Features + +* added device-mode support for customer.io ([#1430](https://github.com/rudderlabs/rudder-config-schema/issues/1430)) ([1e7545a](https://github.com/rudderlabs/rudder-config-schema/commit/1e7545a86c85314997dda0c5852a0df08755a603)) +* added GCM support for Amplitude ([#1455](https://github.com/rudderlabs/rudder-config-schema/issues/1455)) ([8bd8915](https://github.com/rudderlabs/rudder-config-schema/commit/8bd891512d59151c3a10b45252cc6dc93a2bf0b7)) + ## [1.76.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.75.2...v1.76.0) (2024-06-10) diff --git a/README.md b/README.md index e185d3613..4a6d276e1 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,43 @@ And then, setup the project dependencies by running below command: `npm run setup` -Run below command to deploy integrations definitions config to database: +The below command deploys integration definitions to the specified control-plane database: ``` -python3 ./scripts/deployToDB.py +python3 ./scripts/deployToDB.py --help -Ex: -python3 ./scripts/deployToDB.py http://localhost:5050 myusername mypassword +usage: deployToDB.py [-h] [control_plane_url] [username] [password] + +Script to deploy config files to DB. + +positional arguments: + control_plane_url Control plane URL + username Control plane admin username + password Control plane admin password + +options: + -h, --help show this help message and exit +``` + +#### Positional argument environment variable fallback table + +| Positional Argument | Fallback Environment Variable | Description | +| ------------------- | ----------------------------- | --------------------- | +| ARG1 | CONTROL_PLANE_URL | The control plane URL | +| ARG2 | API_USER | The cp admin | +| ARG3 | API_PASSWORD | The cp admin password | + +### Usage examples + +``` +# Just command line args +python3 ./scripts/deployToDB.py http://localhost:5050 foo bar + +# Some command line some envs +API_USER=foo API_PASSWORD=bar python3 ./scripts/deployToDB.py http://localhost:5050 + +# Just envs +CONTROL_PLANE_URL=http://foo.bar API_USER=foo API_PASSWORD=bar python3 ./scripts/deployToDB.py ``` ## Contribute diff --git a/package-lock.json b/package-lock.json index d5f72f962..92b29af98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.76.0", + "version": "1.77.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.76.0", + "version": "1.77.0", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 08106e0ee..f065fe436 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.76.0", + "version": "1.77.0", "description": "", "main": "src/index.ts", "private": true, diff --git a/scripts/deployToDB.py b/scripts/deployToDB.py index 97b4b3d00..d1f8e74e3 100644 --- a/scripts/deployToDB.py +++ b/scripts/deployToDB.py @@ -4,27 +4,46 @@ import os import sys import jsondiff +import argparse from constants import CONFIG_DIR -######################### -# ENV VARIABLES FOT TESTING -# CONTROL_PLANE_URL="https://api.rudderstack.com" -# print(CONTROL_PLANE_URL) -# USERNAME="cbadmin" -# print(USERNAME) -# PASSWORD="testpassword" -# print(PASSWORD) -######################### -######################### -# ENV VARIABLES -CONTROL_PLANE_URL = sys.argv[1] -print(CONTROL_PLANE_URL) -USERNAME = os.environ["API_USER"] # sys.argv[2] -print(USERNAME) -PASSWORD = os.environ["API_PASSWORD"] # sys.argv[3] -# print(PASSWORD) -######################### +def get_command_line_arguments(): + parser = argparse.ArgumentParser(description="Script to deploy config files to DB.") + parser.add_argument("control_plane_url", nargs="?", help="Control plane URL") + parser.add_argument("username", nargs="?", help="Control plane admin username") + parser.add_argument("password", nargs="?", help="Control plane admin password") + + args = parser.parse_args() + + control_plane_url = args.control_plane_url or os.getenv("CONTROL_PLANE_URL") + username = args.username or os.getenv("API_USER") + password = args.password or os.getenv("API_PASSWORD") + + missing_args = [] + + if control_plane_url is None: + missing_args.append( + "1st positional argument or CONTROL_PLANE_URL environment variable" + ) + if username is None: + missing_args.append("2nd positional argument or API_USER environment variable") + if password is None: + missing_args.append( + "3rd positional argument or API_PASSWORD environment variable" + ) + + if missing_args: + print("Error: Missing the following arguments or environment variables:") + for arg in missing_args: + print(arg) + sys.exit(1) + + return control_plane_url, username, password + + +CONTROL_PLANE_URL, USERNAME, PASSWORD = get_command_line_arguments() + # CONSTANTS HEADER = {"Content-Type": "application/json"} AUTH = (USERNAME, PASSWORD) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index ed926251c..889f327a2 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -2,3 +2,4 @@ requests jsonschema jsondiff black +argparse diff --git a/src/configurations/destinations/am/db-config.json b/src/configurations/destinations/am/db-config.json index 05bb3d8b6..cef9d240e 100644 --- a/src/configurations/destinations/am/db-config.json +++ b/src/configurations/destinations/am/db-config.json @@ -39,7 +39,8 @@ "trackNewCampaigns", "userProvidedScreenEventString", "useUserDefinedScreenEventName", - "proxyServerUrl" + "proxyServerUrl", + "consentManagement" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -114,7 +115,8 @@ "eventUploadThreshold", "eventUploadPeriodMillis", "trackNewCampaigns", - "proxyServerUrl" + "proxyServerUrl", + "consentManagement" ], "android": [ "eventUploadPeriodMillis", @@ -123,7 +125,8 @@ "connectionMode", "enableLocationListening", "trackSessionEvents", - "useAdvertisingIdForDeviceId" + "useAdvertisingIdForDeviceId", + "consentManagement" ], "ios": [ "eventUploadPeriodMillis", @@ -131,7 +134,8 @@ "useNativeSDK", "connectionMode", "trackSessionEvents", - "useIdfaAsDeviceId" + "useIdfaAsDeviceId", + "consentManagement" ], "reactnative": [ "eventUploadPeriodMillis", @@ -141,7 +145,8 @@ "enableLocationListening", "trackSessionEvents", "useAdvertisingIdForDeviceId", - "useIdfaAsDeviceId" + "useIdfaAsDeviceId", + "consentManagement" ], "flutter": [ "eventUploadPeriodMillis", @@ -151,14 +156,15 @@ "enableLocationListening", "trackSessionEvents", "useAdvertisingIdForDeviceId", - "useIdfaAsDeviceId" + "useIdfaAsDeviceId", + "consentManagement" ], - "unity": ["connectionMode"], - "amp": ["connectionMode"], - "cloud": ["connectionMode"], - "warehouse": ["connectionMode"], - "cordova": ["connectionMode"], - "shopify": ["connectionMode"] + "unity": ["connectionMode", "consentManagement"], + "amp": ["connectionMode", "consentManagement"], + "cloud": ["connectionMode", "consentManagement"], + "warehouse": ["connectionMode", "consentManagement"], + "cordova": ["connectionMode", "consentManagement"], + "shopify": ["connectionMode", "consentManagement"] }, "secretKeys": ["apiKey", "apiSecret"] } diff --git a/src/configurations/destinations/am/schema.json b/src/configurations/destinations/am/schema.json index 76b857301..261d8d290 100644 --- a/src/configurations/destinations/am/schema.json +++ b/src/configurations/destinations/am/schema.json @@ -241,6 +241,517 @@ "flutter": { "type": "boolean" } } }, + "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"] + } + } + ] + } + } + } + }, "connectionMode": { "type": "object", "properties": { diff --git a/src/configurations/destinations/am/ui-config.json b/src/configurations/destinations/am/ui-config.json index 3f7ad1659..18491be9f 100644 --- a/src/configurations/destinations/am/ui-config.json +++ b/src/configurations/destinations/am/ui-config.json @@ -523,7 +523,15 @@ } } ] - }, + } + ] + }, + { + "id": "consentSettings", + "title": "Consent settings", + "note": "Configure consent settings for each provider here", + "icon": "settings", + "groups": [ { "title": "OneTrust consent settings", "note": [ @@ -548,7 +556,19 @@ } ] } - ] + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } } ] } @@ -644,6 +664,86 @@ "placeholder": "e.g: 30" } ] + }, + "consentSettingsTemplate": { + "title": "Consent settings", + "note": "not visible in the ui", + "fields": [ + { + "type": "dynamicCustomForm", + "configKey": "consentManagement", + "default": [], + "rowFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "configKey": "provider", + "options": [ + { + "label": "Custom", + "value": "custom" + }, + { + "label": "Ketch", + "value": "ketch" + }, + { + "label": "OneTrust", + "value": "oneTrust" + } + ], + "default": "oneTrust", + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "configKey": "resolutionStrategy", + "options": [ + { + "label": "AND", + "value": "and" + }, + { + "label": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "tagInput", + "label": "Enter consent category ID’s", + "note": "Input your consent category IDs by pressing ‘Enter’ after each entry. The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "configKey": "consents", + "tagKey": "consent", + "placeholder": "e.g: Marketing", + "default": [ + { + "consent": "" + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] } } } diff --git a/src/configurations/destinations/customerio/db-config.json b/src/configurations/destinations/customerio/db-config.json index 67f0355ed..063ca4663 100644 --- a/src/configurations/destinations/customerio/db-config.json +++ b/src/configurations/destinations/customerio/db-config.json @@ -10,6 +10,9 @@ "apiKey", "siteID", "datacenter", + "autoTrackDeviceAttributes", + "backgroundQueueMinNumberOfTasks", + "backgroundQueueSecondsDelay", "blacklistedEvents", "whitelistedEvents", "oneTrustCookieCategories", @@ -39,8 +42,8 @@ }, "supportedConnectionModes": { "web": ["cloud", "device"], - "android": ["cloud"], - "ios": ["cloud"], + "android": ["cloud", "device"], + "ios": ["cloud", "device"], "unity": ["cloud"], "amp": ["cloud"], "cloud": ["cloud"], @@ -62,8 +65,15 @@ "oneTrustCookieCategories", "ketchConsentPurposes" ], - "android": ["consentManagement", "connectionMode"], - "ios": ["consentManagement", "connectionMode"], + "android": [ + "useNativeSDK", + "autoTrackDeviceAttributes", + "backgroundQueueMinNumberOfTasks", + "backgroundQueueSecondsDelay", + "consentManagement", + "connectionMode" + ], + "ios": ["useNativeSDK", "autoTrackDeviceAttributes", "consentManagement", "connectionMode"], "web": [ "connectionMode", "dataUseInApp", diff --git a/src/configurations/destinations/customerio/schema.json b/src/configurations/destinations/customerio/schema.json index e1ba039bc..7cc6a5ad7 100644 --- a/src/configurations/destinations/customerio/schema.json +++ b/src/configurations/destinations/customerio/schema.json @@ -17,15 +17,52 @@ "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, "datacenter": { "type": "string", "enum": ["US", "EU"], "default": "US" }, - "sendPageNameInSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, - "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "sendPageNameInSDK": { + "type": "object", + "properties": { + "web": { "type": "boolean" } + } + }, + "backgroundQueueMinNumberOfTasks": { + "type": "object", + "properties": { + "android": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + }, + "backgroundQueueSecondsDelay": { + "type": "object", + "properties": { + "android": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + }, + "autoTrackDeviceAttributes": { + "type": "object", + "properties": { + "android": { "type": "boolean" }, + "ios": { "type": "boolean" } + } + }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { "type": "boolean" }, + "android": { "type": "boolean" }, + "ios": { "type": "boolean" } + } + }, "dataUseInApp": { "type": "object", "properties": { "web": { "type": "boolean" } } }, "connectionMode": { "type": "object", "properties": { "web": { "type": "string", "enum": ["cloud", "device"] }, - "android": { "type": "string", "enum": ["cloud"] }, - "ios": { "type": "string", "enum": ["cloud"] }, + "android": { "type": "string", "enum": ["cloud", "device"] }, + "ios": { "type": "string", "enum": ["cloud", "device"] }, "unity": { "type": "string", "enum": ["cloud"] }, "amp": { "type": "string", "enum": ["cloud"] }, "cloud": { "type": "string", "enum": ["cloud"] }, @@ -523,6 +560,7 @@ } } } - } + }, + "additionalProperties": false } } diff --git a/src/configurations/destinations/customerio/ui-config.json b/src/configurations/destinations/customerio/ui-config.json index 445c6edb3..6a92fbcbc 100644 --- a/src/configurations/destinations/customerio/ui-config.json +++ b/src/configurations/destinations/customerio/ui-config.json @@ -286,6 +286,35 @@ "note": "Turn it ON if you want to send in-app messages to your website.", "configKey": "dataUseInApp", "default": false + }, + { + "type": "checkbox", + "label": "Automatically track device attributes in SDK mode", + "note": "Turn it OFF if you don't want Customer.io to track device attributes automatically.", + "configKey": "autoTrackDeviceAttributes", + "default": true + }, + { + "type": "textInput", + "label": "Minimum number of tasks in Background Queue", + "configKey": "backgroundQueueMinNumberOfTasks", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid value. Must be neumeric", + "secret": false, + "default": 10, + "note": ["The number of tasks kept in Background Queue"], + "placeholder": "e.g: 10" + }, + { + "type": "textInput", + "label": "Delay in seconds for Background Queue", + "configKey": "backgroundQueueSecondsDelay", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid value. Must be neumeric", + "secret": false, + "default": 30, + "note": ["Amount of delay for events to keep in Background Queue"], + "placeholder": "e.g: 30" } ] }, diff --git a/test/data/validation/destinations/am.json b/test/data/validation/destinations/am.json index db34a36fe..bced52491 100644 --- a/test/data/validation/destinations/am.json +++ b/test/data/validation/destinations/am.json @@ -800,5 +800,108 @@ ] }, "result": false + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "apiKey": "8559811e41334c6dXXXXX4b5f6s7gb70", + "apiSecret": "a41d5bc768831f083eXXXXwecfgf7398", + "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": { + "apiKey": "8559811e41334c6dXXXXX4b5f6s7gb70", + "apiSecret": "a41d5bc768831f083eXXXXwecfgf7398", + "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": { + "apiKey": "8559811e41334c6dXXXXX4b5f6s7gb70", + "apiSecret": "a41d5bc768831f083eXXXXwecfgf7398", + "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": { + "apiKey": "8559811e41334c6dXXXXX4b5f6s7gb70", + "apiSecret": "a41d5bc768831f083eXXXXwecfgf7398", + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "apiKey": "8559811e41334c6dXXXXX4b5f6s7gb70", + "apiSecret": "a41d5bc768831f083eXXXXwecfgf7398", + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] } ]