-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.js
8 lines (6 loc) · 3.7 KB
/
api.js
1
2
3
4
5
6
7
8
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
SupAPI.registerPlugin('typescript', 'Notify ', {
code: "declare var Notify;",
defs: "// Type definitions for notify.js 1.2.0\r\n// Project: https://github.com/alexgibson/notify.js\r\n// Definitions by: soundTricker <https://github.com/soundTricker>\r\n// Definitions: https://github.com/borisyankov/DefinitelyTyped\r\n\r\ndeclare var Notify: {\r\n new (title : string , options? : notifyjs.INotifyOption): notifyjs.INotify;\r\n\r\n /**\r\n * Check is permission is needed for the user to receive notifications.\r\n * @return true : needs permission, false : does not need\r\n */\r\n needsPermission() : boolean;\r\n\r\n /**\r\n * Asks the user for permission to display notifications\r\n * @param onPermissionGrantedCallback A callback for permmision is granted.\r\n * @param onPermissionDeniedCallback A callback for permmision is denied.\r\n */\r\n requestPermission(onPermissionGrantedCallback?: ()=> any, onPermissionDeniedCallback? : ()=> any) : void;\r\n\r\n /**\r\n * return true if the browser supports HTML5 Notification\r\n * @param true : the browser supports HTML5 Notification, false ; the browswer does not supports HTML5 Notification.\r\n */\r\n isSupported() : boolean;\r\n}\r\n\r\ndeclare module notifyjs {\r\n \r\n /**\r\n * Interface for Web Notifications API Wrapper.\r\n */\r\n interface INotify {\r\n /**\r\n * Show the notification.\r\n */\r\n show() : void;\r\n\r\n /**\r\n * Remove all event listener.\r\n */\r\n destroy() : void;\r\n\r\n /**\r\n * Close the notification.\r\n */\r\n close() : void;\r\n onShowNotification(e : Event) : void;\r\n onCloseNotification() : void;\r\n onClickNotification() : void;\r\n onErrorNotification() : void;\r\n handleEvent(e : Event) : void;\r\n }\r\n \r\n /**\r\n * Interface for the Notify's optional parameter.\r\n */\r\n interface INotifyOption {\r\n\r\n /**\r\n * notification message body\r\n */\r\n body? : string;\r\n\r\n /**\r\n * path for icon to display in notification\r\n */\r\n icon? : string;\r\n\r\n /**\r\n * unique identifier to stop duplicate notifications\r\n */\r\n tag? : string;\r\n \r\n /**\r\n * number of seconds to close the notification automatically\r\n */\r\n timeout? : number;\r\n\r\n /**\r\n * callback when notification is shown\r\n */\r\n notifyShow? (e : Event): any;\r\n /**\r\n * callback when notification is closed\r\n */\r\n notifyClose? : Function;\r\n /**\r\n * callback when notification is clicked\r\n */\r\n notifyClick? : Function;\r\n /**\r\n * callback when notification throws an error\r\n */\r\n notifyError? : Function;\r\n /**\r\n * callback when user has granted permission\r\n */\r\n permissionGranted? : Function;\r\n /**\r\n * callback when user has denied permission\r\n */\r\n permissionDenied? : Function;\r\n }\r\n}"
});
},{}]},{},[1]);