onesignal-vue 1.0.0-beta3 → 1.0.2

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 CHANGED
@@ -1,62 +1,31 @@
1
1
  {
2
2
  "name": "onesignal-vue",
3
- "version": "1.0.0-beta3",
3
+ "version": "1.0.2",
4
4
  "description": "Vue OneSignal Plugin: Make it easy to integrate OneSignal with your Vue App!",
5
5
  "author": "rgomezp",
6
- "contributors": [{ "name": "Rodrigo Gomez-Palacio" }],
6
+ "contributors": [
7
+ {
8
+ "name": "Rodrigo Gomez-Palacio"
9
+ }
10
+ ],
7
11
  "license": "MIT",
8
12
  "repository": "OneSignal/onesignal-vue",
9
13
  "main": "dist/index.js",
10
- "module": "dist/index.es.js",
11
- "jsnext:main": "dist/index.es.js",
12
- "engines": {
13
- "node": ">=8",
14
- "npm": ">=5"
15
- },
14
+ "types": "dist/index.d.ts",
16
15
  "scripts": {
17
- "lint": "./node_modules/.bin/eslint ./src --ext .js,.ts,.tsx",
18
- "build": "rollup -c",
16
+ "lint": "./node_modules/.bin/eslint . --ext .ts",
17
+ "build": "yarn run lint && tsc",
19
18
  "prepare": "yarn run build"
20
19
  },
21
- "devDependencies": {
22
- "@babel/core": "^7.0.0",
23
- "@babel/plugin-external-helpers": "^7.0.0",
24
- "@babel/plugin-proposal-class-properties": "^7.0.0",
25
- "@babel/plugin-proposal-decorators": "^7.0.0",
26
- "@babel/plugin-proposal-do-expressions": "^7.0.0",
27
- "@babel/plugin-proposal-export-default-from": "^7.0.0",
28
- "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
29
- "@babel/plugin-proposal-function-bind": "^7.0.0",
30
- "@babel/plugin-proposal-function-sent": "^7.0.0",
31
- "@babel/plugin-proposal-json-strings": "^7.0.0",
32
- "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
33
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
34
- "@babel/plugin-proposal-numeric-separator": "^7.0.0",
35
- "@babel/plugin-proposal-optional-chaining": "^7.0.0",
36
- "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
37
- "@babel/plugin-proposal-throw-expressions": "^7.0.0",
38
- "@babel/plugin-syntax-dynamic-import": "^7.0.0",
39
- "@babel/plugin-syntax-import-meta": "^7.0.0",
40
- "@babel/preset-env": "^7.0.0",
41
- "@types/lodash.isequal": "^4.5.5",
42
- "@typescript-eslint/eslint-plugin": "^2.19.0",
43
- "@typescript-eslint/parser": "^2.19.0",
44
- "babel-eslint": "^10.0.1",
45
- "cross-env": "^5.2.0",
46
- "eslint": "^6.8.0",
47
- "eslint-config-airbnb": "^18.0.1",
48
- "eslint-plugin-import": "^2.20.1",
49
- "eslint-plugin-jsx-a11y": "^6.2.3",
50
- "rollup": "^1.1.2",
51
- "rollup-plugin-babel": "^4.3.2",
52
- "rollup-plugin-commonjs": "^9.2.0",
53
- "rollup-plugin-node-resolve": "^4.0.0",
54
- "rollup-plugin-peer-deps-external": "^2.2.0",
55
- "rollup-plugin-typescript2": "^0.17.0",
56
- "rollup-plugin-url": "^2.1.0",
57
- "typescript": "^3.7.5",
20
+ "dependencies": {
58
21
  "vue": "^2.6.14"
59
22
  },
23
+ "devDependencies": {
24
+ "@typescript-eslint/eslint-plugin": "^5.20.0",
25
+ "@typescript-eslint/parser": "^5.20.0",
26
+ "eslint": "^8.13.0",
27
+ "typescript": "^4.6.3"
28
+ },
60
29
  "keywords": [
61
30
  "onesignal",
62
31
  "push",
package/tsconfig.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "outDir": "build",
3
+ "outDir": "dist",
4
4
  "module": "esnext",
5
- "target": "es5",
5
+ "target": "es6",
6
6
  "lib": ["es6", "dom", "es2016", "es2017"],
7
7
  "sourceMap": true,
8
8
  "allowJs": true,
package/.babelrc DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "presets": [
3
- ["@babel/preset-env", {
4
- "modules": false
5
- }]
6
- ],
7
- "plugins": ["@babel/plugin-proposal-class-properties"]
8
- }
package/index.d.ts DELETED
@@ -1,53 +0,0 @@
1
- declare module 'vue-onesignal' {
2
- interface Action<T>{ (item: T): void; }
3
- interface AutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; slidedownPromptOptions?: IOneSignalAutoPromptOptions; }
4
- interface RegisterOptions { modalPrompt?: boolean; httpPermissionRequest?: boolean; slidedown?: boolean; autoAccept?: boolean }
5
- interface SetSMSOptions { identifierAuthHash?: string; }
6
- interface SetEmailOptions { identifierAuthHash?: string; emailAuthHash?: string; }
7
- interface TagsObject<T> { [key: string]: T; }
8
- interface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }
9
- interface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }
10
- export interface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }
11
-
12
- interface IOneSignal {
13
- init(options?: any): Promise<void>
14
- on(event: string, listener: Function): void
15
- off(event: string, listener: Function): void
16
- once(event: string, listener: Function): void
17
- isPushNotificationsEnabled(callback?: Action<boolean>): Promise<boolean>
18
- showHttpPrompt(options?: AutoPromptOptions): Promise<void>
19
- registerForPushNotifications(options?: RegisterOptions): Promise<void>
20
- setDefaultNotificationUrl(url: string): Promise<void>
21
- setDefaultTitle(title: string): Promise<void>
22
- getTags(callback?: Action<any>): Promise<void>
23
- sendTag(key: string, value: any, callback?: Action<Object>): Promise<Object | null>
24
- sendTags(tags: TagsObject<any>, callback?: Action<Object>): Promise<Object | null>
25
- deleteTag(tag: string): Promise<Array<string>>
26
- deleteTags(tags: Array<string>, callback?: Action<Array<string>>): Promise<Array<string>>
27
- addListenerForNotificationOpened(callback?: Action<Notification>): Promise<void>
28
- setSubscription(newSubscription: boolean): Promise<void>
29
- showHttpPermissionRequest(options?: AutoPromptOptions): Promise<any>
30
- showNativePrompt(): Promise<void>
31
- showSlidedownPrompt(options?: AutoPromptOptions): Promise<void>
32
- showCategorySlidedown(options?: AutoPromptOptions): Promise<void>
33
- showSmsSlidedown(options?: AutoPromptOptions): Promise<void>
34
- showEmailSlidedown(options?: AutoPromptOptions): Promise<void>
35
- showSmsAndEmailSlidedown(options?: AutoPromptOptions): Promise<void>
36
- getNotificationPermission(onComplete?: Function): Promise<NotificationPermission>
37
- getUserId(callback?: Action<string | undefined | null>): Promise<string | undefined | null>
38
- getSubscription(callback?: Action<boolean>): Promise<boolean>
39
- setEmail(email: string, options?: SetEmailOptions): Promise<string|null>
40
- setSMSNumber(smsNumber: string, options?: SetSMSOptions): Promise<string | null>
41
- logoutEmail(): Promise<void>
42
- logoutSMS(): Promise<void>
43
- setExternalUserId(externalUserId: string | undefined | null, authHash?: string): Promise<void>
44
- removeExternalUserId(): Promise<void>
45
- getExternalUserId(): Promise<string | undefined | null>
46
- provideUserConsent(consent: boolean): Promise<void>
47
- getEmailId(callback?: Action<string | undefined>): Promise<string | null | undefined>
48
- getSMSId(callback?: Action<string | undefined>): Promise<string | null | undefined>
49
- sendOutcome(outcomeName: string, outcomeWeight?: number | undefined): Promise<void>
50
- }
51
- const OneSignalVue: IOneSignal;
52
- export default OneSignalVue;
53
- }