onesignal-vue 1.0.0-beta2 → 1.0.0-beta3
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/.babelrc +8 -0
- package/.eslintrc.js +43 -0
- package/dist/index.d.ts +24 -2
- package/dist/index.es.js +0 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/index.ts +25 -4
- package/package.json +1 -1
- package/rollup.config.js +0 -1
package/index.ts
CHANGED
|
@@ -74,11 +74,32 @@ interface SetEmailOptions { identifierAuthHash?: string; emailAuthHash?: string;
|
|
|
74
74
|
interface TagsObject<T> { [key: string]: T; }
|
|
75
75
|
interface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }
|
|
76
76
|
interface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
interface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
interface IInitObject {
|
|
81
|
+
appId: string;
|
|
82
|
+
subdomainName?: string;
|
|
83
|
+
requiresUserPrivacyConsent?: boolean;
|
|
84
|
+
promptOptions?: Object;
|
|
85
|
+
welcomeNotification?: Object;
|
|
86
|
+
notifyButton?: Object;
|
|
87
|
+
persistNotification?: boolean;
|
|
88
|
+
webhooks?: Object;
|
|
89
|
+
autoResubscribe?: boolean;
|
|
90
|
+
autoRegister?: boolean;
|
|
91
|
+
notificationClickHandlerMatch?: string;
|
|
92
|
+
notificationClickHandlerAction?: string;
|
|
93
|
+
serviceWorkerParam?: { scope: string };
|
|
94
|
+
serviceWorkerPath?: string;
|
|
95
|
+
serviceWorkerUpdaterPath?: string;
|
|
96
|
+
path?: string;
|
|
97
|
+
allowLocalhostAsSecureOrigin?: boolean;
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
}
|
|
79
100
|
|
|
80
101
|
interface IOneSignal {
|
|
81
|
-
init(options
|
|
102
|
+
init(options: IInitObject): Promise<void>
|
|
82
103
|
on(event: string, listener: Function): void
|
|
83
104
|
off(event: string, listener: Function): void
|
|
84
105
|
once(event: string, listener: Function): void
|
|
@@ -121,7 +142,7 @@ interface IOneSignal {
|
|
|
121
142
|
|
|
122
143
|
/* O N E S I G N A L A P I */
|
|
123
144
|
|
|
124
|
-
function init(options:
|
|
145
|
+
function init(options: IInitObject) {
|
|
125
146
|
return new Promise<void>(resolve => {
|
|
126
147
|
if (isOneSignalInitialized) {
|
|
127
148
|
return;
|
package/package.json
CHANGED
package/rollup.config.js
CHANGED