From 331d5ae56e641a8e8378e0c56a1b2403f7b2f0a5 Mon Sep 17 00:00:00 2001 From: shrouti1507 Date: Thu, 3 Oct 2024 14:06:01 +0530 Subject: [PATCH 1/3] chore: adding salesforce oauth sandbox support for closed testing --- .../salesforce_oauth_sandbox/db-config.json | 113 +++ .../salesforce_oauth_sandbox/schema.json | 778 ++++++++++++++++++ .../salesforce_oauth_sandbox/ui-config.json | 161 ++++ .../salesforce_oauth_sandbox.json | 344 ++++++++ 4 files changed, 1396 insertions(+) create mode 100644 src/configurations/destinations/salesforce_oauth_sandbox/db-config.json create mode 100644 src/configurations/destinations/salesforce_oauth_sandbox/schema.json create mode 100644 src/configurations/destinations/salesforce_oauth_sandbox/ui-config.json create mode 100644 test/data/validation/destinations/salesforce_oauth_sandbox.json diff --git a/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json b/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json new file mode 100644 index 000000000..dcc5641d8 --- /dev/null +++ b/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json @@ -0,0 +1,113 @@ +{ + "name": "SALESFORCE_OAUTH_SANDBOX", + "displayName": "Salesforce Sandbox V2 ", + "config": { + "isAudienceSupported": true, + "supportsVisualMapper": true, + "auth": { + "type": "OAuth", + "role": "salesforce_sandbox", + "rudderScopes": ["delivery"] + }, + "transformAtV1": "router", + "saveDestinationResponse": true, + "includeKeys": ["oneTrustCookieCategories", "consentManagement"], + "excludeKeys": [], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "warehouse", + "reactnative", + "flutter", + "cordova" + ], + "supportedMessageTypes": ["identify"], + "destConfig": { + "defaultConfig": ["rudderAccountId", "mapProperties", "useContactId"], + "android": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "ios": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "web": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "unity": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "amp": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cloud": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "warehouse": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "reactnative": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "flutter": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ], + "cordova": [ + "connectionMode", + "consentManagement", + "oneTrustCookieCategories", + "ketchConsentPurposes" + ] + }, + "secretKeys": [], + "supportedConnectionModes": { + "android": ["cloud"], + "ios": ["cloud"], + "web": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "cloud": ["cloud"], + "warehouse": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"] + } + }, + "options": { + "hidden": { + "featureFlagName": "AMP_salesforce_sandbox_acorns", + "featureFlagValue": false + }, + "beta": true + } +} diff --git a/src/configurations/destinations/salesforce_oauth_sandbox/schema.json b/src/configurations/destinations/salesforce_oauth_sandbox/schema.json new file mode 100644 index 000000000..fb911910e --- /dev/null +++ b/src/configurations/destinations/salesforce_oauth_sandbox/schema.json @@ -0,0 +1,778 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": [], + "type": "object", + "properties": { + "mapProperties": { + "type": "boolean", + "default": true + }, + "useContactId": { + "type": "boolean", + "default": false + }, + "oneTrustCookieCategories": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "warehouse": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "reactnative": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "flutter": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cordova": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + } + }, + "consentManagement": { + "type": "object", + "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "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"] + } + } + ] + } + } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "android": { + "type": "string", + "enum": ["cloud"] + }, + "ios": { + "type": "string", + "enum": ["cloud"] + }, + "web": { + "type": "string", + "enum": ["cloud"] + }, + "unity": { + "type": "string", + "enum": ["cloud"] + }, + "amp": { + "type": "string", + "enum": ["cloud"] + }, + "cloud": { + "type": "string", + "enum": ["cloud"] + }, + "warehouse": { + "type": "string", + "enum": ["cloud"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + } + } + }, + "ketchConsentPurposes": { + "type": "object", + "properties": { + "android": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "ios": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "web": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "unity": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "amp": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "warehouse": { + "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})$" + } + } + } + } + } + } + } + }, + "additionalProperties": true +} diff --git a/src/configurations/destinations/salesforce_oauth_sandbox/ui-config.json b/src/configurations/destinations/salesforce_oauth_sandbox/ui-config.json new file mode 100644 index 000000000..60e469af2 --- /dev/null +++ b/src/configurations/destinations/salesforce_oauth_sandbox/ui-config.json @@ -0,0 +1,161 @@ +{ + "uiConfig": [ + { + "title": "Other Settings", + "fields": [ + { + "type": "checkbox", + "label": "Map Rudder Properties to Salesforce Properties", + "value": "mapProperties", + "default": true + }, + { + "type": "checkbox", + "label": "Use contactId for converted leads", + "value": "useContactId", + "default": false, + "footerNote": "It is suggested to enable this option when both lead and contact field mappings are same." + } + ] + }, + { + "title": "Consent Settings", + "fields": [ + { + "type": "dynamicCustomForm", + "value": "oneTrustCookieCategories", + "label": "OneTrust Consent Category IDs", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "textInput", + "placeholder": "C0001", + "value": "oneTrustCookieCategory", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "label": "Category ID", + "required": false + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "ketchConsentPurposes", + "label": "Ketch Consent Purpose IDs", + "customFields": [ + { + "type": "textInput", + "placeholder": "marketing", + "value": "purpose", + "label": "Purpose ID", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": false + }, + { + "configKey": "AMP_enable-gcm" + } + ], + "featureFlagsCondition": "or" + } + }, + { + "type": "dynamicCustomForm", + "value": "consentManagement", + "label": "Consent management settings", + "footerNote": "The support for category names is deprecated. We recommend using the category IDs instead of the names as IDs are unique and less likely to change over time, making them a more reliable choice.", + "customFields": [ + { + "type": "singleSelect", + "label": "Consent management provider", + "value": "provider", + "options": [ + { + "name": "Custom", + "value": "custom" + }, + { + "name": "Ketch", + "value": "ketch" + }, + { + "name": "OneTrust", + "value": "oneTrust" + } + ], + "defaultOption": { + "name": "OneTrust", + "value": "oneTrust" + }, + "required": true + }, + { + "type": "singleSelect", + "label": "the required consent logic", + "value": "resolutionStrategy", + "options": [ + { + "name": "AND", + "value": "and" + }, + { + "name": "OR", + "value": "or" + } + ], + "required": true, + "variant": "badge", + "preRequisites": { + "fields": [ + { + "configKey": "provider", + "value": "custom" + } + ] + } + }, + { + "type": "dynamicCustomForm", + "value": "consents", + "label": "Enter consent category ID’s", + "customFields": [ + { + "type": "textInput", + "placeholder": "Marketing", + "value": "consent", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "required": false + } + ] + } + ], + "preRequisites": { + "featureFlags": [ + { + "configKey": "AMP_enable-gcm", + "value": true + } + ] + } + } + ] + } + ] +} diff --git a/test/data/validation/destinations/salesforce_oauth_sandbox.json b/test/data/validation/destinations/salesforce_oauth_sandbox.json new file mode 100644 index 000000000..3b74a77b8 --- /dev/null +++ b/test/data/validation/destinations/salesforce_oauth_sandbox.json @@ -0,0 +1,344 @@ +[ + { + "config": { + "mapProperties": true, + "useContactId": true + }, + "result": true + }, + { + "config": { + "mapProperties": true, + "useContactId": true + }, + "result": true + }, + { + "config": { + "mapProperties": true, + "useContactId": true + }, + "result": true + }, + { + "testTitle": "With valid multiple consent management providers config", + "config": { + "mapProperties": true, + "useContactId": true, + "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": { + "mapProperties": true, + "useContactId": true, + "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": { + "mapProperties": true, + "useContactId": true, + "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": { + "mapProperties": true, + "useContactId": true, + "consentManagement": { + "android": [ + { + "provider": "oneTrust" + } + ] + } + }, + "result": true + }, + { + "testTitle": "With consent management custom provider config invalid provider value", + "config": { + "mapProperties": true, + "useContactId": true, + "consentManagement": { + "android": [ + { + "provider": "dummyProvider" + } + ] + } + }, + "result": false, + "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "config": { + "mapProperties": true, + "useContactId": true, + "oneTrustCookieCategories": { + "android": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "ios": [ + { + "oneTrustCookieCategory": "C0003" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "web": [ + { + "oneTrustCookieCategory": "" + } + ], + "unity": [], + "amp": [ + { + "oneTrustCookieCategory": "env.ENVIRONMENT_VARIABLE" + } + ], + "cloud": [ + { + "oneTrustCookieCategory": "{{ event.properties.prop1 || 'val' }}" + } + ], + "warehouse": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "reactnative": [ + { + "oneTrustCookieCategory": "C0003" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "flutter": [ + { + "oneTrustCookieCategory": "" + } + ], + "cordova": [] + }, + "ketchConsentPurposes": { + "android": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ], + "ios": [ + { + "purpose": "P3" + }, + { + "purpose": "P4" + } + ], + "web": [ + { + "purpose": "" + } + ], + "unity": [], + "amp": [ + { + "purpose": "env.ENVIRONMENT_VARIABLE" + } + ], + "cloud": [ + { + "purpose": "{{ event.properties.prop1 || 'val' }}" + } + ], + "warehouse": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ], + "reactnative": [ + { + "purpose": "P3" + }, + { + "purpose": "P4" + } + ], + "flutter": [ + { + "purpose": "" + } + ], + "cordova": [] + } + }, + "result": true + }, + { + "config": { + "mapProperties": true, + "useContactId": true, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "C0001" + }, + { + "oneTrustCookieCategory": "C0002" + } + ], + "ketchConsentPurposes": [ + { + "purpose": "P1" + }, + { + "purpose": "P2" + } + ] + }, + "result": false, + "err": ["oneTrustCookieCategories must be object", "ketchConsentPurposes must be object"] + }, + { + "config": { + "mapProperties": true, + "useContactId": true, + "oneTrustCookieCategories": { + "android": [ + { + "oneTrustCookieCategory": "more than 100 characters string - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "ios": [ + { + "oneTrustCookieCategory": { + "not": "a string" + } + }, + { + "oneTrustCookieCategory": "C0004" + } + ], + "web": { + "not": "an array" + }, + "unity": [ + "not an object", + { + "oneTrustCookieCategory": "C0004" + } + ] + }, + "ketchConsentPurposes": { + "android": [ + { + "purpose": "more than 100 characters string - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "purpose": "P4" + } + ], + "ios": [ + { + "purpose": { + "not": "a string" + } + }, + { + "purpose": "P4" + } + ], + "web": { + "not": "an array" + }, + "unity": [ + "not an object", + { + "purpose": "P4" + } + ] + } + }, + "result": false, + "err": [ + "oneTrustCookieCategories.android.0.oneTrustCookieCategory must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", + "oneTrustCookieCategories.ios.0.oneTrustCookieCategory must be string", + "oneTrustCookieCategories.web must be array", + "oneTrustCookieCategories.unity.0 must be object", + "ketchConsentPurposes.android.0.purpose must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$\"", + "ketchConsentPurposes.ios.0.purpose must be string", + "ketchConsentPurposes.web must be array", + "ketchConsentPurposes.unity.0 must be object" + ] + } +] From 0dee98a0bb5211406d8c2c48dda1c347ef729df3 Mon Sep 17 00:00:00 2001 From: shrouti1507 Date: Tue, 8 Oct 2024 17:49:25 +0530 Subject: [PATCH 2/3] fix: remove additional property flag --- .../destinations/salesforce_oauth_sandbox/db-config.json | 2 +- .../destinations/salesforce_oauth_sandbox/schema.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json b/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json index dcc5641d8..8e7317e4b 100644 --- a/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json +++ b/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json @@ -105,7 +105,7 @@ }, "options": { "hidden": { - "featureFlagName": "AMP_salesforce_sandbox_acorns", + "featureFlagName": "AMP_salesforce_sandbox", "featureFlagValue": false }, "beta": true diff --git a/src/configurations/destinations/salesforce_oauth_sandbox/schema.json b/src/configurations/destinations/salesforce_oauth_sandbox/schema.json index fb911910e..3d52493b6 100644 --- a/src/configurations/destinations/salesforce_oauth_sandbox/schema.json +++ b/src/configurations/destinations/salesforce_oauth_sandbox/schema.json @@ -773,6 +773,5 @@ } } } - }, - "additionalProperties": true + } } From d6dec93c0bee205869e7ad295ff4a93daaa54574 Mon Sep 17 00:00:00 2001 From: shrouti1507 Date: Tue, 8 Oct 2024 18:09:27 +0530 Subject: [PATCH 3/3] fix: fixing options beta tag --- .../destinations/salesforce_oauth_sandbox/db-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json b/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json index 8e7317e4b..bcbb2d1ef 100644 --- a/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json +++ b/src/configurations/destinations/salesforce_oauth_sandbox/db-config.json @@ -108,6 +108,6 @@ "featureFlagName": "AMP_salesforce_sandbox", "featureFlagValue": false }, - "beta": true + "isBeta": true } }