diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index a8ff39eee..b749ef133 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -12,7 +12,7 @@ jobs: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 24e2d6ab2..ab10ef6a4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,7 +32,7 @@ jobs: fetch-depth: 1 - name: Setup Node - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version-file: '.nvmrc' cache: 'npm' @@ -41,10 +41,7 @@ jobs: env: HUSKY: 0 run: | - npm ci - - - name: Set up Python - run: scripts/setup-python.sh + npm run setup - name: Display Python Version run: | @@ -57,9 +54,6 @@ jobs: run: | npm run test:ci - - name: Install Python Dependencies - run: pip3 install -r ./scripts/requirements.txt - - name: List Working Directory Files run: | echo current directory @@ -78,7 +72,7 @@ jobs: - name: Notify Slack Channel id: slack - uses: slackapi/slack-github-action@v1.23.0 + uses: slackapi/slack-github-action@v1.25.0 continue-on-error: true if: inputs.notify == true env: diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index fc8b924d1..a943f9536 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index 46b265a01..16332f307 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -30,7 +30,7 @@ jobs: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version-file: '.nvmrc' cache: 'npm' @@ -88,7 +88,7 @@ jobs: - name: Notify Slack Channel id: slack - uses: slackapi/slack-github-action@v1.23.0 + uses: slackapi/slack-github-action@v1.25.0 continue-on-error: true env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.github/workflows/report-code-coverage.yml b/.github/workflows/report-code-coverage.yml index c65c16c76..852024956 100644 --- a/.github/workflows/report-code-coverage.yml +++ b/.github/workflows/report-code-coverage.yml @@ -19,22 +19,19 @@ jobs: fetch-depth: 1 - name: Setup Node - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version-file: '.nvmrc' cache: 'npm' - name: Install Dependencies - run: npm ci - - - name: Set up Python - run: scripts/setup-python.sh + run: npm run setup - name: Run Tests run: npm run test:ci - name: Upload Coverage Reports to Codecov - uses: codecov/codecov-action@v3.1.1 + uses: codecov/codecov-action@v4.0.1 with: directory: ./reports/coverage token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e65062640..13dfb64c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,23 +18,20 @@ jobs: fetch-depth: 1 - name: Setup Node - uses: actions/setup-node@v4.0.1 + uses: actions/setup-node@v4.0.2 with: node-version-file: '.nvmrc' cache: 'npm' - name: Install Dependencies - run: npm ci - - - name: Set up Python - run: scripts/setup-python.sh + run: npm run setup - name: Run Tests run: npm run test:ci - name: Get changed files id: changed_files - uses: tj-actions/changed-files@v41 + uses: tj-actions/changed-files@v42 with: sha: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 90ec08d77..89265b43b 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -11,12 +11,8 @@ jobs: - name: Checkout uses: actions/checkout@v4.1.1 - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Setting up python libraries - run: ./scripts/setup-python.sh + - name: Install Dependencies + run: npm run setup:python # Reference: https://black.readthedocs.io/en/stable/integrations/github_actions.html - name: Check formatting for Python files @@ -33,13 +29,13 @@ jobs: uses: actions/checkout@v4.1.1 - name: Setup Node - uses: actions/setup-node@v3.7.0 + uses: actions/setup-node@v4.0.2 with: node-version-file: .nvmrc cache: 'npm' - name: Install Dependencies - run: npm ci + run: npm run setup:npm - name: Run Lint Checks run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index e0e442400..4ff59484a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ 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.67.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.66.1...v1.67.0) (2024-03-04) + + +### Features + +* add mapping for event-event definition key in sfmc ([#1227](https://github.com/rudderlabs/rudder-config-schema/issues/1227)) ([635f5cc](https://github.com/rudderlabs/rudder-config-schema/commit/635f5cc7ff14528306b7f28de0e1555a6301bb33)) +* add support of custom page/screen event name in mixpanel ([#1228](https://github.com/rudderlabs/rudder-config-schema/issues/1228)) ([0db6823](https://github.com/rudderlabs/rudder-config-schema/commit/0db6823ce429900e22b310945c088d6a165feea5)) +* add v2 toggle for google ads for ecom spec support ([#1204](https://github.com/rudderlabs/rudder-config-schema/issues/1204)) ([af30138](https://github.com/rudderlabs/rudder-config-schema/commit/af30138e626664eb2899c0e2a050674220f3e608)) +* deprecate cdkV1 destination and onboard to cdkV2 ([#1244](https://github.com/rudderlabs/rudder-config-schema/issues/1244)) ([ef6bebf](https://github.com/rudderlabs/rudder-config-schema/commit/ef6bebf3511c0aef39fdbe0b5660a61d984b3cf2)) +* garl consent mode ([#1246](https://github.com/rudderlabs/rudder-config-schema/issues/1246)) ([7da2f81](https://github.com/rudderlabs/rudder-config-schema/commit/7da2f81c6d75a25e1ed9e51f72d3cc3429ec4384)) +* onboard new destination ninetailed ([#1211](https://github.com/rudderlabs/rudder-config-schema/issues/1211)) ([ef2045f](https://github.com/rudderlabs/rudder-config-schema/commit/ef2045fca0150640c39683cfe248205d422fe7cb)) +* remove categoryToContent mapping field for fb_pixel and fb_conversions ([#1248](https://github.com/rudderlabs/rudder-config-schema/issues/1248)) ([1cd665c](https://github.com/rudderlabs/rudder-config-schema/commit/1cd665cdae3a8bd7f292cdc18a824a1856c0f089)) + + +### Bug Fixes + +* gcm config for missed source types ([#1245](https://github.com/rudderlabs/rudder-config-schema/issues/1245)) ([1812a8c](https://github.com/rudderlabs/rudder-config-schema/commit/1812a8c7dae3b77290bba4c7af178bfa4fe9e2ed)) +* make accessToken required only for cloud mode ([#1233](https://github.com/rudderlabs/rudder-config-schema/issues/1233)) ([32e1d10](https://github.com/rudderlabs/rudder-config-schema/commit/32e1d10d059b9409f31c3d6c209a3c944b512465)) + ### [1.66.1](https://github.com/rudderlabs/rudder-config-schema/compare/v1.66.0...v1.66.1) (2024-03-04) diff --git a/README.md b/README.md index 5572ef11f..e185d3613 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ You need to install Python3. -And then, install Python dependencies: +And then, setup the project dependencies by running below command: -`pip3 install -r ./scripts/requirements.txt` +`npm run setup` Run below command to deploy integrations definitions config to database: diff --git a/package-lock.json b/package-lock.json index ba4907554..8342a68a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.66.1", + "version": "1.67.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.66.1", + "version": "1.67.0", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index a1da55ef6..995b9a7fb 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.66.1", + "version": "1.67.0", "description": "", "main": "src/index.ts", "private": true, @@ -15,7 +15,9 @@ "url": "https://github.com/rudderlabs/rudder-config-schema.git" }, "scripts": { - "setup": "npm ci", + "setup:python": "pip3 install -r ./scripts/requirements.txt", + "setup:npm": "npm ci", + "setup": "npm run setup:npm && npm run setup:python", "test": "jest --detectOpenHandles --coverage --notify --watchAll=false", "test:ci": "npm run test -- --silent --expand --maxWorkers=2", "test:silent": "npm run test -- --silent", @@ -82,7 +84,7 @@ }, "lint-staged": { "*.{json,js,ts,md}": "prettier --write", - "*.{py}": "python3 -m black" + "*.py": "python3 -m black" }, "config": { "commitizen": { diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 350586c4a..ed926251c 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -1,3 +1,4 @@ requests jsonschema jsondiff +black diff --git a/scripts/setup-python.sh b/scripts/setup-python.sh deleted file mode 100755 index e5518394d..000000000 --- a/scripts/setup-python.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -sudo apt-get update -sudo apt-get -y install python3-pip -pip3 --version -pip3 install requests -pip3 install jsonschema -pip3 install jsondiff -pip3 install black diff --git a/src/configurations/destinations/autopilot/db-config.json b/src/configurations/destinations/autopilot/db-config.json index a90df8093..dc46df67a 100644 --- a/src/configurations/destinations/autopilot/db-config.json +++ b/src/configurations/destinations/autopilot/db-config.json @@ -3,7 +3,7 @@ "displayName": "Autopilot", "config": { "transformAtV1": "processor", - "cdkEnabled": true, + "cdkV2Enabled": true, "saveDestinationResponse": true, "includeKeys": ["oneTrustCookieCategories"], "excludeKeys": [], diff --git a/src/configurations/destinations/customerio/db-config.json b/src/configurations/destinations/customerio/db-config.json index 8411d5188..b1c18266a 100644 --- a/src/configurations/destinations/customerio/db-config.json +++ b/src/configurations/destinations/customerio/db-config.json @@ -65,6 +65,7 @@ ], "unity": ["consentManagement"], "amp": ["consentManagement"], + "cloud": ["consentManagement"], "warehouse": ["consentManagement"], "reactnative": ["consentManagement"], "flutter": ["consentManagement"], diff --git a/src/configurations/destinations/customerio/schema.json b/src/configurations/destinations/customerio/schema.json index d34677d77..102847c33 100644 --- a/src/configurations/destinations/customerio/schema.json +++ b/src/configurations/destinations/customerio/schema.json @@ -107,6 +107,52 @@ "consentManagement": { "type": "object", "properties": { + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, "android": { "type": "array", "items": { diff --git a/src/configurations/destinations/dcm_floodlight/db-config.json b/src/configurations/destinations/dcm_floodlight/db-config.json index 437c88e83..5a40f3661 100644 --- a/src/configurations/destinations/dcm_floodlight/db-config.json +++ b/src/configurations/destinations/dcm_floodlight/db-config.json @@ -3,7 +3,7 @@ "displayName": "DCM Floodlight", "config": { "transformAtV1": "processor", - "cdkEnabled": true, + "cdkV2Enabled": true, "saveDestinationResponse": true, "includeKeys": [ "advertiserId", diff --git a/src/configurations/destinations/facebook_conversions/db-config.json b/src/configurations/destinations/facebook_conversions/db-config.json index 6472431f6..e91794f3c 100644 --- a/src/configurations/destinations/facebook_conversions/db-config.json +++ b/src/configurations/destinations/facebook_conversions/db-config.json @@ -34,7 +34,6 @@ "destConfig": { "defaultConfig": [ "blacklistPiiProperties", - "categoryToContent", "datasetId", "eventsToEvents", "whitelistPiiProperties", diff --git a/src/configurations/destinations/facebook_conversions/schema.json b/src/configurations/destinations/facebook_conversions/schema.json index 4bb8e52f0..885df089b 100644 --- a/src/configurations/destinations/facebook_conversions/schema.json +++ b/src/configurations/destinations/facebook_conversions/schema.json @@ -12,22 +12,6 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,500})$" }, - "categoryToContent": { - "type": "array", - "items": { - "type": "object", - "properties": { - "from": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - }, - "to": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - } - } - } - }, "eventsToEvents": { "type": "array", "items": { diff --git a/src/configurations/destinations/facebook_conversions/ui-config.json b/src/configurations/destinations/facebook_conversions/ui-config.json index ee0247449..b9f83a728 100644 --- a/src/configurations/destinations/facebook_conversions/ui-config.json +++ b/src/configurations/destinations/facebook_conversions/ui-config.json @@ -301,32 +301,6 @@ "redirectGroups": { "customEventMapping": { "tabs": [ - { - "name": "Category mapping", - "fields": [ - { - "type": "mapping", - "label": "Map your RudderStack Categories to Facebook Content Types", - "note": "Input the RudderStack category to map to Facebook's content type.", - "configKey": "categoryToContent", - "default": [], - "columns": [ - { - "type": "textInput", - "key": "from", - "label": "RudderStack Category", - "placeholder": "e.g: Product Searched" - }, - { - "type": "textInput", - "key": "to", - "label": "Facebook Content Type", - "placeholder": "e.g: Product" - } - ] - } - ] - }, { "name": "Custom event", "fields": [ diff --git a/src/configurations/destinations/facebook_pixel/db-config.json b/src/configurations/destinations/facebook_pixel/db-config.json index e033326ca..b299fcd8e 100644 --- a/src/configurations/destinations/facebook_pixel/db-config.json +++ b/src/configurations/destinations/facebook_pixel/db-config.json @@ -55,7 +55,6 @@ "destConfig": { "defaultConfig": [ "blacklistPiiProperties", - "categoryToContent", "pixelId", "eventsToEvents", "valueFieldIdentifier", diff --git a/src/configurations/destinations/facebook_pixel/schema.json b/src/configurations/destinations/facebook_pixel/schema.json index db8894d50..51ddc26ae 100644 --- a/src/configurations/destinations/facebook_pixel/schema.json +++ b/src/configurations/destinations/facebook_pixel/schema.json @@ -1,33 +1,13 @@ { "configSchema": { "$schema": "http://json-schema.org/draft-07/schema#", - "required": ["pixelId", "accessToken"], + "required": ["pixelId"], "type": "object", "properties": { "pixelId": { "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" }, - "accessToken": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,300})$" - }, - "categoryToContent": { - "type": "array", - "items": { - "type": "object", - "properties": { - "from": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - }, - "to": { - "type": "string", - "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" - } - } - } - }, "standardPageCall": { "type": "boolean", "default": false @@ -726,6 +706,35 @@ } } } - } + }, + "allOf": [ + { + "if": { + "not": { + "properties": { + "connectionMode": { + "type": "object", + "properties": { + "web": { + "type": "string", + "enum": ["device"] + } + } + } + }, + "required": ["connectionMode"] + } + }, + "then": { + "properties": { + "accessToken": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,300})$" + } + }, + "required": ["accessToken"] + } + } + ] } } diff --git a/src/configurations/destinations/facebook_pixel/ui-config.json b/src/configurations/destinations/facebook_pixel/ui-config.json index 80f81c87e..4b99f384b 100644 --- a/src/configurations/destinations/facebook_pixel/ui-config.json +++ b/src/configurations/destinations/facebook_pixel/ui-config.json @@ -26,10 +26,18 @@ "label": "Business Access Token", "note": "Your Business Access token from your Business Account. Required for cloud-mode.", "configKey": "accessToken", - "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,300})$", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,300})$", "regexErrorMessage": "Invalid Business Access Token", "placeholder": "e.g: EAALPFdyOVl4BAKEXmVR...", - "secret": true + "secret": true, + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } } ] } @@ -437,32 +445,6 @@ "redirectGroups": { "customEventMapping": { "tabs": [ - { - "name": "Category mapping", - "fields": [ - { - "type": "mapping", - "label": "Map your RudderStack Categories to Facebook Content Types", - "note": "Input the RudderStack category to map to Facebook's content type.", - "configKey": "categoryToContent", - "default": [], - "columns": [ - { - "type": "textInput", - "key": "from", - "label": "RudderStack Category", - "placeholder": "e.g: Product Searched" - }, - { - "type": "textInput", - "key": "to", - "label": "Facebook Content Type", - "placeholder": "e.g: Product" - } - ] - } - ] - }, { "name": "Custom event", "fields": [ diff --git a/src/configurations/destinations/ga4/db-config.json b/src/configurations/destinations/ga4/db-config.json index 48278279d..833c969bb 100644 --- a/src/configurations/destinations/ga4/db-config.json +++ b/src/configurations/destinations/ga4/db-config.json @@ -86,14 +86,13 @@ "ios": ["useNativeSDK", "connectionMode", "consentManagement"], "unity": ["consentManagement"], "amp": ["consentManagement"], + "cloud": ["consentManagement"], "reactnative": ["consentManagement"], "flutter": ["consentManagement"], "cordova": ["consentManagement"], - "shopify": ["consentManagement"] + "shopify": ["consentManagement"], + "warehouse": ["consentManagement"] }, "secretKeys": ["apiSecret"] - }, - "options": { - "isBeta": true } } diff --git a/src/configurations/destinations/ga4/schema.json b/src/configurations/destinations/ga4/schema.json index ee55cb8ad..1cbbbed3e 100644 --- a/src/configurations/destinations/ga4/schema.json +++ b/src/configurations/destinations/ga4/schema.json @@ -85,6 +85,98 @@ "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": { diff --git a/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json b/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json index eef9de173..9292aa002 100644 --- a/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json +++ b/src/configurations/destinations/google_adwords_remarketing_lists/db-config.json @@ -36,6 +36,8 @@ "userSchema", "isHashRequired", "typeOfList", + "userDataConsent", + "personalizationConsent", "oneTrustCookieCategories" ], "cloud": ["audienceId", "connectionMode"], diff --git a/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json b/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json index ea74932e3..a51cd1c3b 100644 --- a/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json +++ b/src/configurations/destinations/google_adwords_remarketing_lists/ui-config.json @@ -70,6 +70,54 @@ "value": "General" } }, + { + "type": "singleSelect", + "label": "Specify the consent for uploaded users for using their data in Google Advertising Purpose", + "value": "userDataConsent", + "options": [ + { + "name": "Unspecified", + "value": "UNSPECIFIED" + }, + { + "name": "Unknown", + "value": "UNKNOWN" + }, + { + "name": "Granted", + "value": "GRANTED" + }, + { + "name": "Denied", + "value": "DENIED" + } + ], + "default": "UNSPECIFIED" + }, + { + "type": "singleSelect", + "label": "Specify the consent for uploaded users regarding Ads Personalization", + "value": "personalizationConsent", + "options": [ + { + "name": "Unspecified", + "value": "UNSPECIFIED" + }, + { + "name": "Unknown", + "value": "UNKNOWN" + }, + { + "name": "Granted", + "value": "GRANTED" + }, + { + "name": "Denied", + "value": "DENIED" + } + ], + "default": "UNSPECIFIED" + }, { "type": "checkbox", "label": "Hash Required", diff --git a/src/configurations/destinations/googleads/db-config.json b/src/configurations/destinations/googleads/db-config.json index d57465495..4b2117247 100644 --- a/src/configurations/destinations/googleads/db-config.json +++ b/src/configurations/destinations/googleads/db-config.json @@ -5,6 +5,7 @@ "transformAtV1": "processor", "saveDestinationResponse": false, "includeKeys": [ + "v2", "conversionID", "eventMappingFromConfig", "pageLoadConversions", @@ -39,6 +40,7 @@ }, "destConfig": { "defaultConfig": [ + "v2", "conversionID", "eventMappingFromConfig", "pageLoadConversions", diff --git a/src/configurations/destinations/googleads/schema.json b/src/configurations/destinations/googleads/schema.json index 6b457c3a6..b1c8c9345 100644 --- a/src/configurations/destinations/googleads/schema.json +++ b/src/configurations/destinations/googleads/schema.json @@ -4,6 +4,10 @@ "required": ["conversionID"], "type": "object", "properties": { + "v2": { + "type": "boolean", + "default": true + }, "conversionID": { "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^AW-(.{0,100})$" diff --git a/src/configurations/destinations/googleads/ui-config.json b/src/configurations/destinations/googleads/ui-config.json index 2cac6390d..18cbbfe34 100644 --- a/src/configurations/destinations/googleads/ui-config.json +++ b/src/configurations/destinations/googleads/ui-config.json @@ -3,6 +3,16 @@ { "title": "Connection Settings", "fields": [ + { + "type": "checkbox", + "label": "Ecommerce event spec support for track events", + "value": "v2", + "default": true, + "footerURL": { + "link": "https://www.rudderstack.com/docs/event-spec/ecommerce-events-spec", + "text": "If enabled, track events follow the RudderStack ecommerce spec" + } + }, { "type": "textInput", "label": "Conversion ID", diff --git a/src/configurations/destinations/heap/db-config.json b/src/configurations/destinations/heap/db-config.json index de2449b24..b7cf54ed6 100644 --- a/src/configurations/destinations/heap/db-config.json +++ b/src/configurations/destinations/heap/db-config.json @@ -3,7 +3,7 @@ "displayName": "Heap.io", "config": { "transformAtV1": "processor", - "cdkEnabled": true, + "cdkV2Enabled": true, "saveDestinationResponse": true, "isAudienceSupported": true, "includeKeys": [ diff --git a/src/configurations/destinations/kochava/db-config.json b/src/configurations/destinations/kochava/db-config.json index 2e7603ff5..0bfc67262 100644 --- a/src/configurations/destinations/kochava/db-config.json +++ b/src/configurations/destinations/kochava/db-config.json @@ -3,7 +3,7 @@ "displayName": "Kochava", "config": { "transformAtV1": "processor", - "cdkEnabled": true, + "cdkV2Enabled": true, "saveDestinationResponse": true, "includeKeys": [ "apiKey", diff --git a/src/configurations/destinations/lytics/db-config.json b/src/configurations/destinations/lytics/db-config.json index 6af91176e..1f3235292 100644 --- a/src/configurations/destinations/lytics/db-config.json +++ b/src/configurations/destinations/lytics/db-config.json @@ -3,7 +3,7 @@ "displayName": "Lytics", "config": { "transformAtV1": "processor", - "cdkEnabled": true, + "cdkV2Enabled": true, "saveDestinationResponse": true, "includeKeys": [ "accountId", diff --git a/src/configurations/destinations/mp/db-config.json b/src/configurations/destinations/mp/db-config.json index e313f0a10..20fd6ff0e 100644 --- a/src/configurations/destinations/mp/db-config.json +++ b/src/configurations/destinations/mp/db-config.json @@ -32,7 +32,11 @@ "consentManagement", "eventFilteringOption", "identityMergeApi", - "ignoreDnt" + "ignoreDnt", + "useUserDefinedPageEventName", + "userDefinedPageEventTemplate", + "useUserDefinedScreenEventName", + "userDefinedScreenEventTemplate" ], "excludeKeys": [], "supportedSourceTypes": [ @@ -100,17 +104,23 @@ "userDeletionApi", "gdprApiToken", "strictMode", - "ignoreDnt" + "ignoreDnt", + "useUserDefinedPageEventName", + "userDefinedPageEventTemplate", + "useUserDefinedScreenEventName", + "userDefinedScreenEventTemplate" ], "android": ["consentManagement"], "web": ["useNativeSDK", "consentManagement"], "ios": ["consentManagement"], "unity": ["consentManagement"], "amp": ["consentManagement"], + "cloud": ["consentManagement"], "reactnative": ["consentManagement"], "flutter": ["consentManagement"], "cordova": ["consentManagement"], - "shopify": ["consentManagement"] + "shopify": ["consentManagement"], + "warehouse": ["consentManagement"] }, "secretKeys": ["token", "gdprApiToken"] } diff --git a/src/configurations/destinations/mp/schema.json b/src/configurations/destinations/mp/schema.json index 3a20b0006..e110b19ee 100644 --- a/src/configurations/destinations/mp/schema.json +++ b/src/configurations/destinations/mp/schema.json @@ -44,6 +44,14 @@ "type": "boolean", "default": false }, + "useUserDefinedPageEventName": { + "type": "boolean", + "default": false + }, + "useUserDefinedScreenEventName": { + "type": "boolean", + "default": false + }, "people": { "type": "boolean", "default": false @@ -225,6 +233,98 @@ "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": { @@ -642,7 +742,7 @@ } } }, - "anyOf": [ + "allOf": [ { "if": { "properties": { @@ -661,6 +761,44 @@ }, "required": ["gdprApiToken"] } + }, + { + "if": { + "properties": { + "useUserDefinedPageEventName": { + "const": true + } + }, + "required": ["useUserDefinedPageEventName"] + }, + "then": { + "properties": { + "userDefinedPageEventTemplate": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$" + } + }, + "required": ["userDefinedPageEventTemplate"] + } + }, + { + "if": { + "properties": { + "useUserDefinedScreenEventName": { + "const": true + } + }, + "required": ["useUserDefinedScreenEventName"] + }, + "then": { + "properties": { + "userDefinedScreenEventTemplate": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$" + } + }, + "required": ["userDefinedScreenEventTemplate"] + } } ] } diff --git a/src/configurations/destinations/mp/ui-config.json b/src/configurations/destinations/mp/ui-config.json index 9a5e9c565..ddb2f5133 100644 --- a/src/configurations/destinations/mp/ui-config.json +++ b/src/configurations/destinations/mp/ui-config.json @@ -130,6 +130,56 @@ "value": "ignoreDnt", "default": false, "footerNote": "If enabled, Mixpanel will ignore \"Do Not Track\" setting of browser" + }, + { + "type": "checkbox", + "label": "Use Custom Page Event Name", + "value": "useUserDefinedPageEventName", + "default": false, + "footerNote": "Send custom event name in page call" + }, + { + "type": "textInput", + "label": "Page Event Name Template", + "value": "userDefinedPageEventTemplate", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$", + "regexErrorMessage": "Invalid Page Event Name", + "required": true, + "default": "Viewed {{ category }} {{ name }} page", + "footerNote": "Assign a event name for your page calls. Text {{ }} will be replaced with event payload value", + "preRequisites": { + "fields": [ + { + "configKey": "useUserDefinedPageEventName", + "value": true + } + ] + } + }, + { + "type": "checkbox", + "label": "Use Custom Screen Event Name", + "value": "useUserDefinedScreenEventName", + "default": false, + "footerNote": "Send custom event name in screen call" + }, + { + "type": "textInput", + "label": "Screen Event Name Template", + "value": "userDefinedScreenEventTemplate", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,200})$", + "regexErrorMessage": "Invalid Screen Event Name", + "required": true, + "default": "Viewed {{ category }} {{ name }} screen", + "footerNote": "Assign a event name for your screen calls. Text {{ }} will be replaced with event payload value", + "preRequisites": { + "fields": [ + { + "configKey": "useUserDefinedScreenEventName", + "value": true + } + ] + } } ] }, diff --git a/src/configurations/destinations/new_relic/db-config.json b/src/configurations/destinations/new_relic/db-config.json index 1f5211e07..d534033d0 100644 --- a/src/configurations/destinations/new_relic/db-config.json +++ b/src/configurations/destinations/new_relic/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "cdkEnabled": true, + "cdkV2Enabled": true, "includeKeys": [ "accountId", "insertKey", diff --git a/src/configurations/destinations/ninetailed/db-config.json b/src/configurations/destinations/ninetailed/db-config.json new file mode 100644 index 000000000..e00d0f1a9 --- /dev/null +++ b/src/configurations/destinations/ninetailed/db-config.json @@ -0,0 +1,64 @@ +{ + "name": "NINETAILED", + "displayName": "Ninetailed", + "config": { + "cdkV2Enabled": true, + "transformAtV1": "router", + "saveDestinationResponse": true, + "includeKeys": [ + "environment", + "blacklistedEvents", + "whitelistedEvents", + "eventFilteringOption", + "oneTrustCookieCategories" + ], + "excludeKeys": [], + "supportedSourceTypes": [ + "web", + "ios", + "android", + "unity", + "amp", + "cloud", + "warehouse", + "reactnative", + "flutter", + "cordova", + "shopify" + ], + "supportedMessageTypes": { + "cloud": ["identify", "track", "page"], + "device": { + "web": ["identify", "track", "page"] + } + }, + "supportedConnectionModes": { + "web": ["cloud", "device"], + "android": ["cloud"], + "ios": ["cloud"], + "unity": ["cloud"], + "amp": ["cloud"], + "reactnative": ["cloud"], + "flutter": ["cloud"], + "cordova": ["cloud"], + "shopify": ["cloud"], + "warehouse": ["cloud"], + "cloud": ["cloud"] + }, + "destConfig": { + "defaultConfig": [ + "environment", + "organisationId", + "blacklistedEvents", + "whitelistedEvents", + "eventFilteringOption", + "oneTrustCookieCategories" + ], + "web": ["useNativeSDK", "connectionMode"] + }, + "secretKeys": ["organisationId"] + }, + "options": { + "isBeta": true + } +} diff --git a/src/configurations/destinations/ninetailed/schema.json b/src/configurations/destinations/ninetailed/schema.json new file mode 100644 index 000000000..39b02447a --- /dev/null +++ b/src/configurations/destinations/ninetailed/schema.json @@ -0,0 +1,184 @@ +{ + "configSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "required": [], + "type": "object", + "properties": { + "environment": { + "type": "string", + "enum": ["main", "dev"], + "default": "main" + }, + "eventFilteringOption": { + "type": "string", + "enum": ["disable", "whitelistedEvents", "blacklistedEvents"], + "default": "disable" + }, + "whitelistedEvents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "blacklistedEvents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "eventName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "oneTrustCookieCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "oneTrustCookieCategory": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + }, + "connectionMode": { + "type": "object", + "properties": { + "web": { + "type": "string", + "enum": ["device", "cloud"] + } + } + } + }, + "additonalProperties": false, + "allOf": [ + { + "if": { + "properties": { + "connectionMode": { + "type": "object", + "anyOf": [ + { + "required": ["web"], + "properties": { + "web": { + "const": "cloud" + } + } + }, + { + "required": ["ios"], + "properties": { + "ios": { + "const": "cloud" + } + } + }, + { + "required": ["android"], + "properties": { + "android": { + "const": "cloud" + } + } + }, + { + "required": ["unity"], + "properties": { + "unity": { + "const": "cloud" + } + } + }, + { + "required": ["amp"], + "properties": { + "amp": { + "const": "cloud" + } + } + }, + { + "required": ["reactnative"], + "properties": { + "reactnative": { + "const": "cloud" + } + } + }, + { + "required": ["flutter"], + "properties": { + "flutter": { + "const": "cloud" + } + } + }, + { + "required": ["cordova"], + "properties": { + "cordova": { + "const": "cloud" + } + } + }, + { + "required": ["shopify"], + "properties": { + "shopify": { + "const": "cloud" + } + } + }, + { + "required": ["cloud"], + "properties": { + "cloud": { + "const": "cloud" + } + } + }, + { + "required": ["warehouse"], + "properties": { + "warehouse": { + "const": "cloud" + } + } + } + ] + } + }, + "required": ["connectionMode"] + }, + "then": { + "properties": { + "organisationId": { + "type": "string", + "pattern": "^(.{1,100})$" + } + }, + "required": ["organisationId"] + } + } + ] + } +} diff --git a/src/configurations/destinations/ninetailed/ui-config.json b/src/configurations/destinations/ninetailed/ui-config.json new file mode 100644 index 000000000..471edebd3 --- /dev/null +++ b/src/configurations/destinations/ninetailed/ui-config.json @@ -0,0 +1,209 @@ +{ + "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": "Organization ID (API Key)", + "configKey": "organisationId", + "regex": "^(.{1,100})$", + "secret": true, + "regexErrorMessage": "Invalid Organization ID", + "placeholder": "e.g. 52****-*4*4-4**9-***8-5****f*9****", + "preRequisites": { + "fields": [ + { + "configKey": "connectionModes.cloud", + "value": true + } + ] + } + } + ] + } + ] + }, + { + "groups": [ + { + "title": "Connection mode", + "note": [ + "Update how you want to route events from your source to destination. ", + { + "text": "Get help deciding", + "link": "https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/" + } + ], + "icon": "sliders", + "fields": [], + "defaultConnectionModes": { + "web": "device" + } + } + ] + } + ] + }, + { + "title": "Configuration settings", + "note": "Manage the settings for your destination", + "sections": [ + { + "title": "Destination settings", + "note": "Configure advanced destination-specific settings here", + "icon": "settings", + "groups": [ + { + "title": "Optional configuration settings", + "fields": [ + { + "type": "singleSelect", + "label": "Environment slug", + "configKey": "environment", + "options": [ + { + "label": "Main", + "value": "main" + }, + { + "label": "dev", + "value": "dev" + } + ], + "default": "main" + } + ] + } + ] + }, + { + "title": "Other settings", + "note": "Configure advanced RudderStack features here", + "icon": "otherSettings", + "groups": [ + { + "title": "Client-side event filtering", + "note": "Decide what events are allowed (allowlisting) and blocked (denylisting)", + "preRequisites": { + "fields": [ + { + "configKey": "connectionMode.web", + "value": "device" + } + ] + }, + "fields": [ + { + "type": "singleSelect", + "label": "Choose if you want to turn on events filtering", + "configKey": "eventFilteringOption", + "note": "You must select either allowlist or denylist to enable events filtering", + "options": [ + { + "label": "No events filtering", + "value": "disable" + }, + { + "label": "Filter via allowlist", + "value": "whitelistedEvents" + }, + { + "label": "Filter via denylist", + "value": "blacklistedEvents" + } + ], + "default": "disable" + }, + { + "type": "tagInput", + "label": "Allowlisted events", + "note": "Input separate events by pressing ‘Enter’.\nInput the events you want to allowlist.", + "configKey": "whitelistedEvents", + "tagKey": "eventName", + "placeholder": "e.g: Anonymous page visit", + "default": [ + { + "eventName": "" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "eventFilteringOption", + "value": "whitelistedEvents" + } + ] + } + }, + { + "type": "tagInput", + "label": "Denylisted events", + "note": "Input separate events by pressing ‘Enter’.\nInput the events you want to denylist.", + "configKey": "blacklistedEvents", + "tagKey": "eventName", + "placeholder": "e.g: Anonymous page visit", + "default": [ + { + "eventName": "" + } + ], + "preRequisites": { + "fields": [ + { + "configKey": "eventFilteringOption", + "value": "blacklistedEvents" + } + ] + } + } + ] + }, + { + "title": "OneTrust cookie consent settings", + "note": [ + "Enter your OneTrust category names if you have them configured. ", + { + "text": "Learn more ", + "link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" + }, + "about RudderStack’s OneTrust Consent Manager feature." + ], + "fields": [ + { + "type": "tagInput", + "label": "Cookie category name", + "note": "Input your OneTrust category names by pressing ‘Enter’ after each entry", + "configKey": "oneTrustCookieCategories", + "tagKey": "oneTrustCookieCategory", + "placeholder": "e.g: Credit card visit", + "default": [ + { + "oneTrustCookieCategory": "" + } + ] + } + ] + } + ] + } + ] + } + ], + "sdkTemplate": { + "title": "Web SDK settings", + "note": "not visible in the ui", + "fields": [] + } + } +} diff --git a/src/configurations/destinations/sfmc/db-config.json b/src/configurations/destinations/sfmc/db-config.json index bf1378493..ba1235531 100644 --- a/src/configurations/destinations/sfmc/db-config.json +++ b/src/configurations/destinations/sfmc/db-config.json @@ -49,6 +49,7 @@ "eventToExternalKey", "eventToPrimaryKey", "eventToUUID", + "eventToDefinitionMapping", "oneTrustCookieCategories" ] }, diff --git a/src/configurations/destinations/sfmc/ui-config.json b/src/configurations/destinations/sfmc/ui-config.json index 7f6fcd1d3..9e17c318b 100644 --- a/src/configurations/destinations/sfmc/ui-config.json +++ b/src/configurations/destinations/sfmc/ui-config.json @@ -75,6 +75,18 @@ "value": "eventToPrimaryKey", "footerNote": "The target Data Extension's Primary Key. If a value is not provided, defaults to Contact Key. You can add multiple primary keys by separating them with commas. The primary key names should be same as that you have set in SFMC data extensions." }, + { + "type": "dynamicForm", + "label": "Map events to event definition key", + "labelLeft": "Event Name", + "labelRight": "Event Definition Key", + "keyLeft": "from", + "keyRight": "to", + "placeholderLeft": "e.g: Product Clicked", + "placeholderRight": "eg: AcmeBank-AccountAccessed", + "value": "eventToDefinitionMapping", + "footerNote": "Map your event names to the respective event definition keys." + }, { "type": "dynamicCustomForm", "value": "eventToUUID", diff --git a/src/configurations/destinations/snowflake/db-config.json b/src/configurations/destinations/snowflake/db-config.json index 03c4c97ed..c146040df 100644 --- a/src/configurations/destinations/snowflake/db-config.json +++ b/src/configurations/destinations/snowflake/db-config.json @@ -67,6 +67,8 @@ "web": ["useNativeSDK", "consentManagement"], "unity": ["consentManagement"], "amp": ["consentManagement"], + "cloud": ["consentManagement"], + "cloudSource": ["consentManagement"], "reactnative": ["consentManagement"], "flutter": ["consentManagement"], "cordova": ["consentManagement"], diff --git a/src/configurations/destinations/snowflake/schema.json b/src/configurations/destinations/snowflake/schema.json index 993dec98c..3fdf266d9 100644 --- a/src/configurations/destinations/snowflake/schema.json +++ b/src/configurations/destinations/snowflake/schema.json @@ -508,6 +508,98 @@ } ] } + }, + "cloud": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } + }, + "cloudSource": { + "type": "array", + "items": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": ["custom", "ketch", "oneTrust"], + "default": "oneTrust" + }, + "consents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "consent": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "provider": { + "const": "custom" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "resolutionStrategy": { + "type": "string", + "enum": ["and", "or"] + } + }, + "required": ["resolutionStrategy"] + } + } + ] + } } } } diff --git a/src/configurations/destinations/statsig/db-config.json b/src/configurations/destinations/statsig/db-config.json index bfc5d2289..b611eda31 100644 --- a/src/configurations/destinations/statsig/db-config.json +++ b/src/configurations/destinations/statsig/db-config.json @@ -3,7 +3,7 @@ "displayName": "Statsig", "config": { "transformAtV1": "router", - "cdkEnabled": true, + "cdkV2Enabled": true, "saveDestinationResponse": true, "includeKeys": ["oneTrustCookieCategories"], "excludeKeys": [], diff --git a/src/configurations/destinations/userlist/db-config.json b/src/configurations/destinations/userlist/db-config.json index a388110fb..bda483d56 100644 --- a/src/configurations/destinations/userlist/db-config.json +++ b/src/configurations/destinations/userlist/db-config.json @@ -3,7 +3,7 @@ "displayName": "Userlist", "config": { "transformAtV1": "processor", - "cdkEnabled": true, + "cdkV2Enabled": true, "saveDestinationResponse": true, "includeKeys": ["oneTrustCookieCategories"], "excludeKeys": [], diff --git a/src/configurations/destinations/variance/db-config.json b/src/configurations/destinations/variance/db-config.json index 929253462..e0cb113ce 100644 --- a/src/configurations/destinations/variance/db-config.json +++ b/src/configurations/destinations/variance/db-config.json @@ -3,7 +3,7 @@ "displayName": "Variance", "config": { "transformAtV1": "processor", - "cdkEnabled": true, + "cdkV2Enabled": true, "saveDestinationResponse": true, "includeKeys": ["oneTrustCookieCategories"], "excludeKeys": [], diff --git a/src/configurations/destinations/vitally/db-config.json b/src/configurations/destinations/vitally/db-config.json index 3281a5ea5..bd9de937e 100644 --- a/src/configurations/destinations/vitally/db-config.json +++ b/src/configurations/destinations/vitally/db-config.json @@ -3,7 +3,7 @@ "displayName": "Vitally", "config": { "transformAtV1": "processor", - "cdkEnabled": true, + "cdkV2Enabled": true, "saveDestinationResponse": true, "excludeKeys": [], "supportedSourceTypes": [ diff --git a/src/configurations/destinations/zapier/db-config.json b/src/configurations/destinations/zapier/db-config.json index bfe400df2..97b209d42 100644 --- a/src/configurations/destinations/zapier/db-config.json +++ b/src/configurations/destinations/zapier/db-config.json @@ -4,7 +4,7 @@ "config": { "transformAtV1": "processor", "saveDestinationResponse": true, - "cdkEnabled": true, + "cdkV2Enabled": true, "includeKeys": [ "zapUrl", "trackEventsToZap", diff --git a/src/schemas/destinations/db-config-schema.json b/src/schemas/destinations/db-config-schema.json index 1161f56d9..979536b04 100644 --- a/src/schemas/destinations/db-config-schema.json +++ b/src/schemas/destinations/db-config-schema.json @@ -234,7 +234,7 @@ "cdkEnabled": { "type": "boolean", "title": "CDK V1 Enabled", - "description": "Whether to use CDK V2 implementation for destination transformation.", + "description": "Whether to use CDK V1 implementation for destination transformation.", "default": false }, "destConfig": { diff --git a/test/component_tests/schemaGenerator.test.ts b/test/component_tests/schemaGenerator.test.ts index 91a2f546e..b475270c7 100644 --- a/test/component_tests/schemaGenerator.test.ts +++ b/test/component_tests/schemaGenerator.test.ts @@ -2,6 +2,21 @@ import fs from 'fs'; import path from 'path'; import { execSync } from 'child_process'; +function readFile(filePath): string | undefined { + let file; + if (!fs.existsSync(filePath)) { + return file; + } + + try { + file = fs.readFileSync(filePath, 'utf8'); + } catch (e) { + /* empty */ + } + + return file; +} + function readSchemaFile(filePath): string | undefined { let schema; if (!fs.existsSync(filePath)) { @@ -17,8 +32,8 @@ function readSchemaFile(filePath): string | undefined { return schema; } -function writeSchemaFile(filePath, schema) { - fs.writeFileSync(filePath, JSON.stringify(schema, null, 2)); +function writeFile(filePath, data) { + fs.writeFileSync(filePath, data); } describe('Schema Generator', () => { @@ -102,7 +117,7 @@ describe('Schema Generator', () => { // eslint-disable-next-line @typescript-eslint/no-unused-vars it.each(testData)('$description', ({ description, destName, expectedSchemaFile }) => { const schemaFilePath = path.resolve(`${configDir}/destinations/${destName}/schema.json`); - const curSchema = readSchemaFile(schemaFilePath); + const curSchema = readFile(schemaFilePath); const cmd = `CONFIG_DIR=${configDir} npm run update:schema:destination "${destName}"`; @@ -111,7 +126,7 @@ describe('Schema Generator', () => { const schema = readSchemaFile(schemaFilePath); // Restore schema file if (curSchema) { - writeSchemaFile(schemaFilePath, curSchema); + writeFile(schemaFilePath, curSchema); } const expectedSchemaData = readSchemaFile( diff --git a/test/data/validation/destinations/facebook_pixel.json b/test/data/validation/destinations/facebook_pixel.json index 2b5100f3d..7010deaed 100644 --- a/test/data/validation/destinations/facebook_pixel.json +++ b/test/data/validation/destinations/facebook_pixel.json @@ -392,5 +392,61 @@ }, "result": false, "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "testTitle": "When connectionMode.web is not defined(no source connected or cloud only source connected), accessToken is required", + "config": { + "pixelId": "471828257250906" + }, + "result": false, + "err": [" must have required property 'accessToken'", " must match \"then\" schema"] + }, + { + "testTitle": "When connectionMode.web is cloud mode, accessToken is required", + "config": { + "pixelId": "471828257250906", + "connectionMode": { + "web": "cloud" + } + }, + "result": false, + "err": [" must have required property 'accessToken'", " must match \"then\" schema"] + }, + { + "testTitle": "When connectionMode.web is in device mode, accessToken is not required", + "config": { + "pixelId": "471828257250906", + "connectionMode": { + "web": "device" + } + }, + "result": true + }, + { + "config": { + "pixelId": "471828257250906", + "accessToken": "ghsrtrtrsjeyry" + }, + "result": true + }, + { + "config": { + "pixelId": "471828257250906", + "accessToken": "ghsrtrtrsjeyry", + "connectionMode": { + "web": "cloud" + } + }, + "result": true + }, + { + "config": { + "pixelId": "471828257250906", + "accessToken": "ghsrtrtrsjeyry", + "connectionMode": { + "web": "device" + } + }, + "result": true } ] diff --git a/test/data/validation/destinations/mp.json b/test/data/validation/destinations/mp.json index 90d3d9ff1..351ed86ee 100644 --- a/test/data/validation/destinations/mp.json +++ b/test/data/validation/destinations/mp.json @@ -65,7 +65,9 @@ ], "userDeletionApi": "task", "gdprApiToken": "gdprApiToken123", - "strictMode": true + "strictMode": true, + "useUserDefinedPageEventName": true, + "userDefinedPageEventTemplate": "Viewed {{ name }} page" }, "result": true }, @@ -312,5 +314,32 @@ }, "result": false, "err": ["consentManagement.android.0.provider must be equal to one of the allowed values"] + }, + { + "config": { + "token": "2de18c6hf6v45201ab43d2344b0c128x", + "dataResidency": "us", + "people": false, + "setAllTraitsByDefault": false, + "consolidatedPageCalls": false, + "trackCategorizedPages": false, + "trackNamedPages": true, + "crossSubdomainCookie": false, + "persistence": "none", + "persistenceType": "cookie", + "persistenceName": "cookie", + "secureCookie": false, + "eventFilteringOption": "disable", + "ignoreDnt": true, + "useNativeSDK": { + "web": false + }, + "useUserDefinedPageEventName": true + }, + "result": false, + "err": [ + " must have required property 'userDefinedPageEventTemplate'", + " must match \"then\" schema" + ] } ] diff --git a/test/data/validation/destinations/ninetailed.json b/test/data/validation/destinations/ninetailed.json new file mode 100644 index 000000000..2e054657f --- /dev/null +++ b/test/data/validation/destinations/ninetailed.json @@ -0,0 +1,206 @@ +[ + { + "config": { + "organisationId": "testorgid", + "environment": "main", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + } + }, + "result": true + }, + { + "config": { + "environment": "main", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device" + } + }, + "result": true + }, + { + "config": { + "environment": "main", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "cloud", + "flutter": "cloud" + } + }, + "result": false, + "err": [" must have required property 'organisationId'", " must match \"then\" schema"] + }, + { + "config": { + "organisationId": "testorgid", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "useNativeSDK": { + "web": true + }, + "connectionMode": { + "web": "device", + "flutter": "cloud" + } + }, + "result": true + }, + { + "config": { + "organisationId": "testorgid", + "environment": "unsupported_env", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "connectionMode": { + "web": "cloud", + "flutter": "cloud" + } + }, + "result": false, + "err": ["environment must be equal to one of the allowed values"] + }, + { + "config": { + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "connectionMode": { + "web": "cloud", + "flutter": "cloud" + } + }, + "result": false, + "err": [" must have required property 'organisationId'", " must match \"then\" schema"] + }, + { + "config": { + "organisationId": "", + "environment": "main", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "connectionMode": { + "flutter": "cloud" + } + }, + "result": false, + "err": ["organisationId must match pattern \"^(.{1,100})$\"", " must match \"then\" schema"] + }, + { + "config": { + "environment": "main", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "connectionMode": { + "shopify": "cloud" + } + }, + "result": false, + "err": [" must have required property 'organisationId'", " must match \"then\" schema"] + }, + { + "config": { + "organisationId": "1234", + "environment": "main", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "connectionMode": { + "web": "cloud" + } + }, + "result": true + } +]