@rescript/webapi 0.1.0-experimental-5bcdadd → 0.1.0-experimental-d10ffec
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/EventAPI.res +2 -2
- package/src/NotificationAPI.res +2 -2
- package/src/PushAPI/PushEvent.res +2 -2
- package/src/PushAPI/PushMessageData.res +1 -1
- package/src/PushAPI.res +9 -2
- package/src/ServiceWorkerAPI/ServiceWorkerGlobalScope.res +1 -1
- package/src/ServiceWorkerAPI.res +1 -1
- package/src/WebWorkersAPI/WorkerGlobalScope.res +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescript/webapi",
|
|
3
|
-
"version": "0.1.0-experimental-
|
|
3
|
+
"version": "0.1.0-experimental-d10ffec",
|
|
4
4
|
"description": "Experimental successor to [rescript-webapi](https://github.com/TheSpyder/rescript-webapi)",
|
|
5
5
|
"homepage": "https://rescript-lang.github.io/experimental-rescript-webapi/",
|
|
6
6
|
"bugs": "https://github.com/rescript-lang/experimental-rescript-webapi/issues",
|
package/src/EventAPI.res
CHANGED
package/src/NotificationAPI.res
CHANGED
|
@@ -73,7 +73,7 @@ type notification = {
|
|
|
73
73
|
type notificationAction = {
|
|
74
74
|
action: string,
|
|
75
75
|
title: string,
|
|
76
|
-
icon?: string
|
|
76
|
+
icon?: string,
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
type notificationOptions = {
|
|
@@ -86,7 +86,7 @@ type notificationOptions = {
|
|
|
86
86
|
mutable silent?: Null.t<bool>,
|
|
87
87
|
mutable requireInteraction?: bool,
|
|
88
88
|
mutable data?: JSON.t,
|
|
89
|
-
mutable actions?: array<notificationAction
|
|
89
|
+
mutable actions?: array<notificationAction>,
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
type getNotificationOptions = {mutable tag?: string}
|
|
@@ -12,4 +12,4 @@ The text() method of the PushMessageData interface extracts push message data as
|
|
|
12
12
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushMessageData/text)
|
|
13
13
|
*/
|
|
14
14
|
@send
|
|
15
|
-
external text: pushMessageData => string = "text"
|
|
15
|
+
external text: pushMessageData => string = "text"
|
package/src/PushAPI.res
CHANGED
|
@@ -65,10 +65,17 @@ type pushSubscriptionOptionsInit = {
|
|
|
65
65
|
mutable applicationServerKey?: applicationServerKey,
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
type pushSubscriptionJSONKeys = {
|
|
69
|
+
/** Base64URL-encoded ArrayBuffer value */
|
|
70
|
+
p256dh: string,
|
|
71
|
+
/** Base64URL-encoded ArrayBuffer value */
|
|
72
|
+
auth: string,
|
|
73
|
+
}
|
|
74
|
+
|
|
68
75
|
type pushSubscriptionJSON = {
|
|
69
76
|
mutable endpoint?: string,
|
|
70
77
|
mutable expirationTime?: Null.t<int>,
|
|
71
|
-
mutable keys?:
|
|
78
|
+
mutable keys?: pushSubscriptionJSONKeys,
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
@editor.completeFrom(PushMessageData)
|
|
@@ -81,4 +88,4 @@ type pushEvent = {
|
|
|
81
88
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushEvent/data)
|
|
82
89
|
*/
|
|
83
90
|
data?: pushMessageData,
|
|
84
|
-
}
|
|
91
|
+
}
|
package/src/ServiceWorkerAPI.res
CHANGED
|
@@ -22,7 +22,7 @@ let response = await self->WorkerGlobalScope.fetch("https://rescript-lang.org")
|
|
|
22
22
|
|
|
23
23
|
[Read more on MDN](https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/fetch)
|
|
24
24
|
*/
|
|
25
|
-
@send
|
|
25
|
+
@send
|
|
26
26
|
external fetch: (T.t, string, ~init: requestInit=?) => promise<response> = "fetch"
|
|
27
27
|
|
|
28
28
|
/**
|