Skip to content

Commit

Permalink
fix: enhancement: onboard user API for onesignal (#1460)
Browse files Browse the repository at this point in the history
  • Loading branch information
anantjain45823 authored Jun 24, 2024
1 parent 442f9fa commit b2c8e58
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/configurations/destinations/one_signal/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"destConfig": {
"defaultConfig": [
"appId",
"version",
"emailDeviceType",
"smsDeviceType",
"eventAsTags",
Expand Down
1 change: 1 addition & 0 deletions src/configurations/destinations/one_signal/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$"
},
"version": { "type": "string", "enum": ["V1", "V2"], "default": "V1" },
"emailDeviceType": {
"type": "boolean",
"default": false
Expand Down
24 changes: 22 additions & 2 deletions src/configurations/destinations/one_signal/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
]
},
Expand All @@ -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
}
Expand Down
15 changes: 15 additions & 0 deletions test/data/validation/destinations/one_signal.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b2c8e58

Please sign in to comment.