diff --git a/CHANGELOG.md b/CHANGELOG.md index b3b61e273..49c44291f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,26 @@ 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.65.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.64.2...v1.65.0) (2024-02-20) + + +### Features + +* add connectionMode for all sourceTypes in dest def for selected destinations ([#1197](https://github.com/rudderlabs/rudder-config-schema/issues/1197)) ([dde686c](https://github.com/rudderlabs/rudder-config-schema/commit/dde686cc72e0ac7423487d566e8f9715cc43d24f)) +* add GCM to FB Pixel, GA, GMT, HobSpot, Redis, S3, Slack, VWO ([#1190](https://github.com/rudderlabs/rudder-config-schema/issues/1190)) ([f40d5cd](https://github.com/rudderlabs/rudder-config-schema/commit/f40d5cda403e39e149f132dc1ffc2d1efa50a186)) +* enabled sql model support for mysql ([#1222](https://github.com/rudderlabs/rudder-config-schema/issues/1222)) ([09bbe2a](https://github.com/rudderlabs/rudder-config-schema/commit/09bbe2a5d1f81c26dec71582fbb7069550e7c7af)) +* improve schema generator output ([#1191](https://github.com/rudderlabs/rudder-config-schema/issues/1191)) ([04e05b8](https://github.com/rudderlabs/rudder-config-schema/commit/04e05b89a7333291792fbb6e111388b5ff8b985f)) +* onboard new destination commandbar ([#1196](https://github.com/rudderlabs/rudder-config-schema/issues/1196)) ([daf9fa8](https://github.com/rudderlabs/rudder-config-schema/commit/daf9fa8256eed280bad04c0c109de3787e6262e0)) +* onboard trade desk real time conversions ([#1213](https://github.com/rudderlabs/rudder-config-schema/issues/1213)) ([0d9b8d7](https://github.com/rudderlabs/rudder-config-schema/commit/0d9b8d7ee45b6ba5c914aaca6c2c11474a7575e9)) +* onboarding bluecore integration ([#1182](https://github.com/rudderlabs/rudder-config-schema/issues/1182)) ([6d5e40f](https://github.com/rudderlabs/rudder-config-schema/commit/6d5e40fdb812aa4c46ea13cbae5f7eb696d0cc0c)) +* tiktok_offline_events added support for all Standard events ([#1216](https://github.com/rudderlabs/rudder-config-schema/issues/1216)) ([61d36fa](https://github.com/rudderlabs/rudder-config-schema/commit/61d36fa5db882f00d97dd9dc88b2f26a7d49a87a)) + + +### Bug Fixes + +* add support of placing properties at root in af ([#1203](https://github.com/rudderlabs/rudder-config-schema/issues/1203)) ([1859354](https://github.com/rudderlabs/rudder-config-schema/commit/185935467899222b8766c63c63b934d70410cc9a)) +* comscore schema ([#1217](https://github.com/rudderlabs/rudder-config-schema/issues/1217)) ([7faa64a](https://github.com/rudderlabs/rudder-config-schema/commit/7faa64acfe2fca20b75789f31b541dd33e7fde8c)) + ### [1.64.2](https://github.com/rudderlabs/rudder-config-schema/compare/v1.64.1...v1.64.2) (2024-02-14) ### [1.64.1](https://github.com/rudderlabs/rudder-config-schema/compare/v1.64.0...v1.64.1) (2024-02-13) diff --git a/package-lock.json b/package-lock.json index aa3bd6dd4..7eb48b94d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.64.2", + "version": "1.65.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.64.2", + "version": "1.65.0", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index e2ad16a0d..748c3d52a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.64.2", + "version": "1.65.0", "description": "", "main": "src/index.ts", "private": true, diff --git a/src/configurations/destinations/facebook_pixel/schema.json b/src/configurations/destinations/facebook_pixel/schema.json index a9edbc8fe..86c64add6 100644 --- a/src/configurations/destinations/facebook_pixel/schema.json +++ b/src/configurations/destinations/facebook_pixel/schema.json @@ -1,17 +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": { @@ -1000,6 +996,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 689e5b99c..ba3f9f6bf 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 + } + ] + } } ] } diff --git a/test/data/validation/destinations/facebook_pixel.json b/test/data/validation/destinations/facebook_pixel.json index 6a27fb26a..28dd1db3a 100644 --- a/test/data/validation/destinations/facebook_pixel.json +++ b/test/data/validation/destinations/facebook_pixel.json @@ -393,6 +393,35 @@ "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",