From b2c8e58eb7301778e7739388d4cb7bef1fbaa894 Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Mon, 24 Jun 2024 20:52:29 +0530 Subject: [PATCH 1/2] fix: enhancement: onboard user API for onesignal (#1460) --- .../destinations/one_signal/db-config.json | 1 + .../destinations/one_signal/schema.json | 1 + .../destinations/one_signal/ui-config.json | 24 +++++++++++++++++-- .../validation/destinations/one_signal.json | 15 ++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/configurations/destinations/one_signal/db-config.json b/src/configurations/destinations/one_signal/db-config.json index ee24f831f..5ddb5cd9e 100644 --- a/src/configurations/destinations/one_signal/db-config.json +++ b/src/configurations/destinations/one_signal/db-config.json @@ -38,6 +38,7 @@ "destConfig": { "defaultConfig": [ "appId", + "version", "emailDeviceType", "smsDeviceType", "eventAsTags", diff --git a/src/configurations/destinations/one_signal/schema.json b/src/configurations/destinations/one_signal/schema.json index 26fbc30b2..0a83e9005 100644 --- a/src/configurations/destinations/one_signal/schema.json +++ b/src/configurations/destinations/one_signal/schema.json @@ -8,6 +8,7 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" }, + "version": { "type": "string", "enum": ["V1", "V2"], "default": "V1" }, "emailDeviceType": { "type": "boolean", "default": false diff --git a/src/configurations/destinations/one_signal/ui-config.json b/src/configurations/destinations/one_signal/ui-config.json index 914380bc4..d077075ad 100644 --- a/src/configurations/destinations/one_signal/ui-config.json +++ b/src/configurations/destinations/one_signal/ui-config.json @@ -13,6 +13,26 @@ "placeholder": "e.g. 7acc2c99-XXXX-XXXX-XXXX-6cd8a994da65", "secret": true, "footerNote": "Your OneSignal App Id" + }, + { + "type": "singleSelect", + "label": "Event Version to use", + "value": "version", + "options": [ + { + "name": "Device Model (Deprecated)", + "value": "V1" + }, + { + "name": "User Model", + "value": "V2" + } + ], + "defaultOption": { + "name": "Device Model (Deprecated)", + "value": "V1" + }, + "footerNote": "Please Select the API version to use. User Model is recommended." } ] }, @@ -21,13 +41,13 @@ "fields": [ { "type": "checkbox", - "label": "Toggle on to add a device using email", + "label": "Toggle on to add a device/subscription using email", "value": "emailDeviceType", "default": false }, { "type": "checkbox", - "label": "Toggle on to add a device using phone number", + "label": "Toggle on to add a device/subscription using phone number", "value": "smsDeviceType", "default": false } diff --git a/test/data/validation/destinations/one_signal.json b/test/data/validation/destinations/one_signal.json index 2a2398e13..39624cb64 100644 --- a/test/data/validation/destinations/one_signal.json +++ b/test/data/validation/destinations/one_signal.json @@ -14,6 +14,21 @@ "result": false, "err": ["appId must match pattern \"(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$\""] }, + { + "config": { + "appId": "7acc2c99-XXXX-XXXX-XXXX-6cd8a994da65", + "version": "V2", + "emailDeviceType": false, + "smsDeviceType": false, + "eventAsTags": false, + "allowedProperties": [ + { + "propertyName": "" + } + ] + }, + "result": true + }, { "config": { "appId": "7acc2c99-XXXX-XXXX-XXXX-6cd8a994da65", From 832f1b796b82256b3b317a095b932b68bc67a9f8 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 25 Jun 2024 07:32:12 +0000 Subject: [PATCH 2/2] chore(release): 1.77.5 --- 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 0cf7b5308..36af25307 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.77.5](https://github.com/rudderlabs/rudder-config-schema/compare/v1.77.4...v1.77.5) (2024-06-25) + + +### Bug Fixes + +* enhancement: onboard user API for onesignal ([#1460](https://github.com/rudderlabs/rudder-config-schema/issues/1460)) ([b2c8e58](https://github.com/rudderlabs/rudder-config-schema/commit/b2c8e58eb7301778e7739388d4cb7bef1fbaa894)) + ### [1.77.4](https://github.com/rudderlabs/rudder-config-schema/compare/v1.77.3...v1.77.4) (2024-06-20) diff --git a/package-lock.json b/package-lock.json index aaa5567c6..de4145241 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-config-schema", - "version": "1.77.4", + "version": "1.77.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-config-schema", - "version": "1.77.4", + "version": "1.77.5", "license": "MIT", "dependencies": { "ajv": "^8.12.0", diff --git a/package.json b/package.json index 1821a0d8f..3f1eb72b2 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-config-schema", - "version": "1.77.4", + "version": "1.77.5", "description": "", "main": "src/index.ts", "private": true,