mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-24 20:00:16 +08:00
feat(push): add Browser Push notification support (#1848)
* Browser Push interface with options to use push notification with browsers , as a proxy to phonegap-plush-plugin * making both properties optional
This commit is contained in:
parent
57bbcdebfb
commit
aa4c3b3787
@ -188,10 +188,25 @@ export interface AndroidPushOptions {
|
|||||||
topics?: string[];
|
topics?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface BrowserPushOptions {
|
||||||
|
/**
|
||||||
|
* Optional. Your GCM API key if you are using VAPID keys.
|
||||||
|
*/
|
||||||
|
applicationServerKey?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the push server you want to use.
|
||||||
|
* Default: http://push.api.phonegap.com/v1/push Optional.
|
||||||
|
*/
|
||||||
|
pushServiceURL?: string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
export interface PushOptions {
|
export interface PushOptions {
|
||||||
ios?: IOSPushOptions;
|
ios?: IOSPushOptions;
|
||||||
android?: AndroidPushOptions;
|
android?: AndroidPushOptions;
|
||||||
windows?: any;
|
windows?: any;
|
||||||
|
browser?: BrowserPushOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PushEvent = 'registration' | 'error' | 'notification';
|
export type PushEvent = 'registration' | 'error' | 'notification';
|
||||||
@ -237,7 +252,10 @@ export type PushEvent = 'registration' | 'error' | 'notification';
|
|||||||
* badge: true,
|
* badge: true,
|
||||||
* sound: 'false'
|
* sound: 'false'
|
||||||
* },
|
* },
|
||||||
* windows: {}
|
* windows: {},
|
||||||
|
* browser: {
|
||||||
|
* pushServiceURL: 'http://push.api.phonegap.com/v1/push'
|
||||||
|
* }
|
||||||
* };
|
* };
|
||||||
*
|
*
|
||||||
* const pushObject: PushObject = this.push.init(options);
|
* const pushObject: PushObject = this.push.init(options);
|
||||||
@ -257,6 +275,7 @@ export type PushEvent = 'registration' | 'error' | 'notification';
|
|||||||
* NotificationEventAdditionalData
|
* NotificationEventAdditionalData
|
||||||
* IOSPushOptions
|
* IOSPushOptions
|
||||||
* AndroidPushOptions
|
* AndroidPushOptions
|
||||||
|
* BrowserPushOptions
|
||||||
* PushOptions
|
* PushOptions
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user