* Fixes #12414

* Make applicationServerKey optional
This commit is contained in:
Samuel Campos
2016-12-08 20:05:32 +00:00
committed by Andy
parent 09a4a1fd33
commit 37247316a7

View File

@@ -579,6 +579,26 @@ interface PushSubscription {
subscriptionId: any;
}
/**
* Object containing optional subscribe parameters.
*/
interface PushSubscriptionOptions {
/**
* A boolean indicating that the returned push subscription will only be used for
* messages whose effect is made visible to the user.
* @readonly
*/
userVisibleOnly: boolean;
/**
* A public key your push server will use to send messages to client apps via a push server.
* This value is part of a signing key pair generated by your application server and usable
* with elliptic curve digital signature (ECDSA) over the P-256 curve.
* @readonly
*/
applicationServerKey?: Uint8Array;
}
/**
* The PushManager interface provides a way to receive notifications from
* third-party servers as well as request URLs for push notifications.
@@ -590,7 +610,7 @@ interface PushManager {
* Returns a promise that resolves to a PushSubscription with details of a
* new push subscription.
*/
subscribe(): Promise<PushSubscription>;
subscribe(options?: PushSubscriptionOptions): Promise<PushSubscription>;
/**
* Returns a promise that resolves to a PushSubscription details of