From 73060ab151274fadd7701ccfd30f1af9d93cc5b3 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:11:01 +0530 Subject: [PATCH 1/2] fix: iterable schema (#1332) --- .../destinations/iterable/schema.json | 230 +++++++++++++++--- .../validation/destinations/iterable.json | 21 ++ 2 files changed, 216 insertions(+), 35 deletions(-) diff --git a/src/configurations/destinations/iterable/schema.json b/src/configurations/destinations/iterable/schema.json index e13d27793..63cf6e60f 100644 --- a/src/configurations/destinations/iterable/schema.json +++ b/src/configurations/destinations/iterable/schema.json @@ -12,7 +12,14 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } }, + "useNativeSDK": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, "getInAppEventMapping": { "type": "object", "properties": { @@ -50,15 +57,61 @@ "initialisationIdentifier": { "type": "object", "properties": { - "web": { "type": "string", "enum": ["email", "userId"], "default": "email" } + "web": { + "type": "string", + "enum": ["email", "userId"], + "default": "email" + } + } + }, + "sendTrackForInapp": { + "type": "object", + "properties": { + "web": { + "type": "boolean" + } + } + }, + "animationDuration": { + "type": "object", + "properties": { + "web": { + "type": "string" + } + } + }, + "bottomOffset": { + "type": "object", + "properties": { + "web": { + "type": "string" + } + } + }, + "rightOffset": { + "type": "object", + "properties": { + "web": { + "type": "string" + } + } + }, + "topOffset": { + "type": "object", + "properties": { + "web": { + "type": "string" + } + } + }, + "displayInterval": { + "type": "object", + "properties": { + "web": { + "type": "string" + } } }, - "sendTrackForInapp": { "type": "object", "properties": { "web": { "type": "boolean" } } }, - "animationDuration": { "type": "object", "properties": { "web": { "type": "string" } } }, - "bottomOffset": { "type": "object", "properties": { "web": { "type": "string" } } }, - "rightOffset": { "type": "object", "properties": { "web": { "type": "string" } } }, - "topOffset": { "type": "object", "properties": { "web": { "type": "string" } } }, - "displayInterval": { "type": "object", "properties": { "web": { "type": "string" } } }, "handleLinks": { "type": "object", "properties": { @@ -71,36 +124,102 @@ }, "onOpenScreenReaderMessage": { "type": "object", - "properties": { "web": { "type": "string" } } + "properties": { + "web": { + "type": "string" + } + } + }, + "onOpenNodeToTakeFocus": { + "type": "object", + "properties": { + "web": { + "type": "string" + } + } + }, + "closeButtonColor": { + "type": "object", + "properties": { + "web": { + "type": "string" + } + } + }, + "closeButtonSize": { + "type": "object", + "properties": { + "web": { + "type": "string" + } + } }, - "onOpenNodeToTakeFocus": { "type": "object", "properties": { "web": { "type": "string" } } }, - "closeButtonColor": { "type": "object", "properties": { "web": { "type": "string" } } }, - "closeButtonSize": { "type": "object", "properties": { "web": { "type": "string" } } }, "closeButtonPosition": { "type": "object", "properties": { - "web": { "type": "string", "enum": ["top-right", "top-left"], "default": "top-right" } + "web": { + "type": "string", + "enum": ["top-right", "top-left"], + "default": "top-right" + } } }, "closeButtonColorTopOffset": { "type": "object", - "properties": { "web": { "type": "string" } } + "properties": { + "web": { + "type": "string" + } + } }, "closeButtonColorSideOffset": { "type": "object", - "properties": { "web": { "type": "string" } } + "properties": { + "web": { + "type": "string" + } + } + }, + "iconPath": { + "type": "object", + "properties": { + "web": { + "type": "string" + } + } }, - "iconPath": { "type": "object", "properties": { "web": { "type": "string" } } }, "isRequiredToDismissMessage": { "type": "object", - "properties": { "web": { "type": "boolean" } } + "properties": { + "web": { + "type": "boolean" + } + } + }, + "mapToSingleEvent": { + "type": "boolean", + "default": true + }, + "trackAllPages": { + "type": "boolean", + "default": false + }, + "trackCategorisedPages": { + "type": "boolean", + "default": true + }, + "trackNamedPages": { + "type": "boolean", + "default": true + }, + "preferUserId": { + "type": "boolean", + "default": true + }, + "mergeNestedObjects": { + "type": "boolean", + "default": true }, - "mapToSingleEvent": { "type": "boolean", "default": true }, - "trackAllPages": { "type": "boolean", "default": false }, - "trackCategorisedPages": { "type": "boolean", "default": true }, - "trackNamedPages": { "type": "boolean", "default": true }, - "preferUserId": { "type": "boolean", "default": true }, - "mergeNestedObjects": { "type": "boolean", "default": true }, "oneTrustCookieCategories": { "type": "array", "items": { @@ -116,17 +235,50 @@ "connectionMode": { "type": "object", "properties": { - "web": { "type": "string", "enum": ["cloud", "device"] }, - "android": { "type": "string", "enum": ["cloud"] }, - "ios": { "type": "string", "enum": ["cloud"] }, - "unity": { "type": "string", "enum": ["cloud"] }, - "amp": { "type": "string", "enum": ["cloud"] }, - "reactnative": { "type": "string", "enum": ["cloud"] }, - "flutter": { "type": "string", "enum": ["cloud"] }, - "cordova": { "type": "string", "enum": ["cloud"] }, - "shopify": { "type": "string", "enum": ["cloud"] }, - "cloud": { "type": "string", "enum": ["cloud"] }, - "warehouse": { "type": "string", "enum": ["cloud"] } + "web": { + "type": "string", + "enum": ["cloud", "device"] + }, + "android": { + "type": "string", + "enum": ["cloud"] + }, + "ios": { + "type": "string", + "enum": ["cloud"] + }, + "unity": { + "type": "string", + "enum": ["cloud"] + }, + "amp": { + "type": "string", + "enum": ["cloud"] + }, + "reactnative": { + "type": "string", + "enum": ["cloud"] + }, + "flutter": { + "type": "string", + "enum": ["cloud"] + }, + "cordova": { + "type": "string", + "enum": ["cloud"] + }, + "shopify": { + "type": "string", + "enum": ["cloud"] + }, + "cloud": { + "type": "string", + "enum": ["cloud"] + }, + "warehouse": { + "type": "string", + "enum": ["cloud"] + } } } }, @@ -134,7 +286,15 @@ { "if": { "properties": { - "connectionMode": { "type": "object", "properties": { "web": { "const": "device" } } } + "connectionMode": { + "type": "object", + "required": ["web"], + "properties": { + "web": { + "const": "device" + } + } + } }, "required": ["connectionMode"] }, diff --git a/test/data/validation/destinations/iterable.json b/test/data/validation/destinations/iterable.json index ec0e06be8..c654bfcf5 100644 --- a/test/data/validation/destinations/iterable.json +++ b/test/data/validation/destinations/iterable.json @@ -88,6 +88,27 @@ }, "result": true }, + { + "config": { + "apiKey": "73983282843839749873", + "mapToSingleEvent": true, + "trackAllPages": false, + "trackCategorisedPages": true, + "trackNamedPages": true, + "useNativeSDK": { + "web": false + }, + "connectionMode": { + "cloud": "cloud" + }, + "oneTrustCookieCategories": [ + { + "oneTrustCookieCategory": "" + } + ] + }, + "result": true + }, { "config": { "apiKey": "73983282843839749873", From 1d66672db2de988402712ded8f75d1a58e1f87ce Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 24 Apr 2024 05:40:52 +0000 Subject: [PATCH 2/2] chore(release): 1.71.2 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b95f125..5cfdd67df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ 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.71.2](https://github.com/rudderlabs/rudder-config-schema/compare/v1.71.1...v1.71.2) (2024-04-24) + + +### Bug Fixes + +* iterable schema ([#1332](https://github.com/rudderlabs/rudder-config-schema/issues/1332)) ([73060ab](https://github.com/rudderlabs/rudder-config-schema/commit/73060ab151274fadd7701ccfd30f1af9d93cc5b3)) + ### [1.71.1](https://github.com/rudderlabs/rudder-config-schema/compare/v1.71.0...v1.71.1) (2024-04-22) diff --git a/package-lock.json b/package-lock.json index 737f7cc55..2b9f118c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.71.1", + "version": "1.71.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.71.1", + "version": "1.71.2", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 4b30db7d5..5fda764be 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.71.1", + "version": "1.71.2", "description": "", "main": "src/index.ts", "private": true,