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 ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "presets": [
3
+ ["@babel/preset-env", {
4
+ "modules": false
5
+ }]
6
+ ],
7
+ "plugins": ["@babel/plugin-proposal-class-properties"]
8
+ }
package/.eslintrc.js ADDED
@@ -0,0 +1,43 @@
1
+ module.exports = {
2
+ env: {
3
+ browser: true,
4
+ es6: true,
5
+ node: true,
6
+ },
7
+ settings: {
8
+ "import/resolver": {
9
+ node: {
10
+ paths: ["src"],
11
+ extensions: [
12
+ ".js",
13
+ ".ts",
14
+ ".tsx",
15
+ ],
16
+ },
17
+ },
18
+ },
19
+ extends: [
20
+ 'airbnb',
21
+ ],
22
+ globals: {
23
+ Atomics: 'readonly',
24
+ SharedArrayBuffer: 'readonly',
25
+ },
26
+ parser: '@typescript-eslint/parser',
27
+ parserOptions: {
28
+ ecmaVersion: 2018,
29
+ sourceType: 'module',
30
+ },
31
+ plugins: [
32
+ '@typescript-eslint',
33
+ ],
34
+ rules: {
35
+ "prefer-destructuring": 0,
36
+ "no-param-reassign": 0,
37
+ "import/extensions": 0,
38
+ "dot-notation": 0,
39
+ "no-continue": 0,
40
+ "no-unused-vars": "off",
41
+ "@typescript-eslint/no-unused-vars": ["error"]
42
+ },
43
+ };
package/dist/index.d.ts CHANGED
@@ -47,13 +47,35 @@ interface IOneSignalCategories {
47
47
  updateMessage: string;
48
48
  tags: IOneSignalTagCategory[];
49
49
  }
50
- export interface IOneSignalTagCategory {
50
+ interface IOneSignalTagCategory {
51
51
  tag: string;
52
52
  label: string;
53
53
  checked?: boolean;
54
54
  }
55
+ interface IInitObject {
56
+ appId: string;
57
+ subdomainName?: string;
58
+ requiresUserPrivacyConsent?: boolean;
59
+ promptOptions?: Object;
60
+ welcomeNotification?: Object;
61
+ notifyButton?: Object;
62
+ persistNotification?: boolean;
63
+ webhooks?: Object;
64
+ autoResubscribe?: boolean;
65
+ autoRegister?: boolean;
66
+ notificationClickHandlerMatch?: string;
67
+ notificationClickHandlerAction?: string;
68
+ serviceWorkerParam?: {
69
+ scope: string;
70
+ };
71
+ serviceWorkerPath?: string;
72
+ serviceWorkerUpdaterPath?: string;
73
+ path?: string;
74
+ allowLocalhostAsSecureOrigin?: boolean;
75
+ [key: string]: any;
76
+ }
55
77
  interface IOneSignal {
56
- init(options?: any): Promise<void>;
78
+ init(options: IInitObject): Promise<void>;
57
79
  on(event: string, listener: Function): void;
58
80
  off(event: string, listener: Function): void;
59
81
  once(event: string, listener: Function): void;
package/dist/index.es.js CHANGED
@@ -8569,7 +8569,6 @@ var setupOneSignalIfMissing = function () {
8569
8569
  };
8570
8570
  /* O N E S I G N A L A P I */
8571
8571
  function init(options) {
8572
- if (options === void 0) { options = {}; }
8573
8572
  return new Promise(function (resolve) {
8574
8573
  if (isOneSignalInitialized) {
8575
8574
  return;