Skip to content

Commit 31e662a

Browse files
author
Mario Reyes
committed
New BasicNotification schema to fix send_after issue
1 parent 216189a commit 31e662a

1 file changed

Lines changed: 27 additions & 9 deletions

File tree

api.json

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@
347347
}
348348
]
349349
},
350-
"Notification": {
350+
"BasicNotification": {
351351
"allOf": [
352352
{
353353
"$ref": "#/components/schemas/NotificationTarget"
@@ -362,6 +362,12 @@
362362
"type": "integer",
363363
"readOnly": true
364364
},
365+
"name": {
366+
"type": "string",
367+
"description": "Required for SMS Messages.\nAn identifier for tracking message within the OneSignal dashboard or export analytics.\nNot shown to end user.",
368+
"writeOnly": true,
369+
"nullable": true
370+
},
365371
"aggregation": {
366372
"type": "string",
367373
"enum": [
@@ -784,13 +790,6 @@
784790
"writeOnly": true,
785791
"nullable": true
786792
},
787-
"send_after": {
788-
"type": "string",
789-
"format": "date-time",
790-
"description": "Channel: All\nSchedule notification for future delivery. API defaults to UTC -1100\nExamples: All examples are the exact same date & time.\n\"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\"\n\"September 24th 2015, 2:00:00 pm UTC-07:00\"\n\"2015-09-24 14:00:00 GMT-0700\"\n\"Sept 24 2015 14:00:00 GMT-0700\"\n\"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\"\nNote: SMS currently only supports send_after parameter.\n",
791-
"writeOnly": true,
792-
"nullable": true
793-
},
794793
"delayed_option": {
795794
"type": "string",
796795
"description": "Channel: All\nPossible values are:\ntimezone (Deliver at a specific time-of-day in each users own timezone)\nlast-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app).\nIf send_after is used, this takes effect after the send_after time has elapsed.\n",
@@ -913,10 +912,29 @@
913912
}
914913
]
915914
},
915+
"Notification": {
916+
"allOf": [
917+
{
918+
"$ref": "#/components/schemas/BasicNotification"
919+
},
920+
{
921+
"type": "object",
922+
"properties": {
923+
"send_after": {
924+
"type": "string",
925+
"format": "date-time",
926+
"description": "Channel: All\nSchedule notification for future delivery. API defaults to UTC -1100\nExamples: All examples are the exact same date & time.\n\"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\"\n\"September 24th 2015, 2:00:00 pm UTC-07:00\"\n\"2015-09-24 14:00:00 GMT-0700\"\n\"Sept 24 2015 14:00:00 GMT-0700\"\n\"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\"\nNote: SMS currently only supports send_after parameter.\n",
927+
"writeOnly": true,
928+
"nullable": true
929+
}
930+
}
931+
}
932+
]
933+
},
916934
"NotificationWithMeta": {
917935
"allOf": [
918936
{
919-
"$ref": "#/components/schemas/Notification"
937+
"$ref": "#/components/schemas/BasicNotification"
920938
},
921939
{
922940
"$ref": "#/components/schemas/DeliveryData"

0 commit comments

Comments
 (0)