@@ -94,14 +94,14 @@ external removeAllDeliveredNotifications: unit => unit =
94
94
"removeAllDeliveredNotifications" ;
95
95
96
96
type deliveredNotification = {
97
- .
98
- "identifier" : string ,
99
- "date" : Js . Nullable . t (string ),
100
- "title" : Js . Nullable . t (string ),
101
- "body" : Js . Nullable . t (string ),
102
- "category" : Js . Nullable . t ( string ) ,
103
- "thread-id" : Js . Nullable . t (string ),
104
- " userInfo" : Js . Nullable . t (Js . Json . t ),
97
+ identifier : string ,
98
+ date : option ( string ) ,
99
+ title : option (string ),
100
+ body : option (string ),
101
+ category : option (string ),
102
+ [@bs.as "thread-id"]
103
+ threadId : option (string ),
104
+ userInfo: option (Js . Json . t ),
105
105
};
106
106
107
107
[@ bs . module "@react-native-community/push-notification-ios" ]
@@ -137,16 +137,15 @@ external cancelLocalNotificationsWithUserInfo: Js.Json.t => unit =
137
137
"cancelLocalNotifications" ;
138
138
139
139
type formattedLocalNotification = {
140
- .
141
- "fireDate": Js . Nullable . t (string ),
142
- "alertAction": Js . Nullable . t (string ),
143
- "alertTitle": Js . Nullable . t (string ),
144
- "alertBody": Js . Nullable . t (string ),
145
- "applicationIconBadgeNumber": Js . Nullable . t (int ),
146
- "category": Js . Nullable . t (string ),
147
- "repeatInterval": Js . Nullable . t (string ),
148
- "soundName": Js . Nullable . t (string ),
149
- "userInfo": Js . Nullable . t (Js . Json . t ),
140
+ fireDate: option (string ),
141
+ alertAction: option (string ),
142
+ alertTitle: option (string ),
143
+ alertBody: option (string ),
144
+ applicationIconBadgeNumber: option (int ),
145
+ category: option (string ),
146
+ repeatInterval: option (string ),
147
+ soundName: option (string ),
148
+ userInfo: option (Js . Json . t ),
150
149
};
151
150
152
151
[@ bs . module "@react-native-community/push-notification-ios" ]
@@ -156,10 +155,9 @@ external getScheduledLocalNotifications:
156
155
"getScheduledLocalNotifications" ;
157
156
158
157
type registrationError (' a ) = {
159
- .
160
- "message" : string,
161
- "code" : int,
162
- "details" : Js . t('a),
158
+ message: string,
159
+ code: int,
160
+ details: Js . t('a),
163
161
};
164
162
165
163
[@ bs . module "@react-native-community/push-notification-ios" ]
@@ -193,12 +191,11 @@ external removeEventListener:
193
191
"removeEventListener" ;
194
192
195
193
type permissions = {
196
- .
197
- "alert": bool ,
198
- "badge": bool ,
199
- "sound": bool ,
200
- "lockScreen": bool ,
201
- "notificationCenter": bool ,
194
+ alert: bool ,
195
+ badge: bool ,
196
+ sound: bool ,
197
+ lockScreen: bool ,
198
+ notificationCenter: bool ,
202
199
};
203
200
204
201
type requestPermissionsOptions ;
0 commit comments