Skip to content

Commit

Permalink
Merge pull request #8 from OneSignal/1.0.0-beta3
Browse files Browse the repository at this point in the history
1.0.0-beta3 Release
  • Loading branch information
rgomezp authored Dec 14, 2021
2 parents af1b2f8 + 24eff31 commit 30a2bdb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ build
.env.development.local
.env.test.local
.env.production.local
.babelrc;

npm-debug.log*
yarn-debug.log*
Expand Down
29 changes: 25 additions & 4 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,32 @@ interface SetEmailOptions { identifierAuthHash?: string; emailAuthHash?: string;
interface TagsObject<T> { [key: string]: T; }
interface IOneSignalAutoPromptOptions { force?: boolean; forceSlidedownOverNative?: boolean; isInUpdateMode?: boolean; categoryOptions?: IOneSignalCategories; }
interface IOneSignalCategories { positiveUpdateButton: string; negativeUpdateButton: string; savingButtonText: string; errorButtonText: string; updateMessage: string; tags: IOneSignalTagCategory[]; }
export interface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }

interface IOneSignalTagCategory { tag: string; label: string; checked?: boolean; }


interface IInitObject {
appId: string;
subdomainName?: string;
requiresUserPrivacyConsent?: boolean;
promptOptions?: Object;
welcomeNotification?: Object;
notifyButton?: Object;
persistNotification?: boolean;
webhooks?: Object;
autoResubscribe?: boolean;
autoRegister?: boolean;
notificationClickHandlerMatch?: string;
notificationClickHandlerAction?: string;
serviceWorkerParam?: { scope: string };
serviceWorkerPath?: string;
serviceWorkerUpdaterPath?: string;
path?: string;
allowLocalhostAsSecureOrigin?: boolean;
[key: string]: any;
}

interface IOneSignal {
init(options?: any): Promise<void>
init(options: IInitObject): Promise<void>
on(event: string, listener: Function): void
off(event: string, listener: Function): void
once(event: string, listener: Function): void
Expand Down Expand Up @@ -121,7 +142,7 @@ interface IOneSignal {

/* O N E S I G N A L A P I */

function init(options: Object = {}) {
function init(options: IInitObject) {
return new Promise<void>(resolve => {
if (isOneSignalInitialized) {
return;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onesignal-vue",
"version": "1.0.0-beta2",
"version": "1.0.0-beta3",
"description": "Vue OneSignal Plugin: Make it easy to integrate OneSignal with your Vue App!",
"author": "rgomezp",
"contributors": [{ "name": "Rodrigo Gomez-Palacio" }],
Expand Down
1 change: 0 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ export default {
commonjs(),
],
};

0 comments on commit 30a2bdb

Please sign in to comment.