1 |
|
2 |
|
3 | import NotificationCenter = require("./notifiers/notificationcenter");
|
4 | import NotifySend = require("./notifiers/notifysend");
|
5 | import WindowsToaster = require("./notifiers/toaster");
|
6 | import WindowsBalloon = require("./notifiers/balloon");
|
7 | import Growl = require("./notifiers/growl");
|
8 |
|
9 | declare namespace nodeNotifier {
|
10 | interface NodeNotifier extends NodeJS.EventEmitter {
|
11 | notify(notification?: NotificationCenter.Notification, callback?: NotificationCallback): NotificationCenter;
|
12 | notify(notification?: WindowsToaster.Notification, callback?: NotificationCallback): WindowsToaster;
|
13 | notify(notification?: WindowsBalloon.Notification, callback?: NotificationCallback): WindowsBalloon;
|
14 | notify(notification?: NotifySend.Notification, callback?: NotificationCallback): NotifySend;
|
15 | notify(notification?: Growl.Notification, callback?: NotificationCallback): Growl;
|
16 | notify(notification?: Notification | string, callback?: NotificationCallback): NodeNotifier;
|
17 | NotificationCenter: typeof NotificationCenter;
|
18 | NotifySend: typeof NotifySend;
|
19 | WindowsToaster: typeof WindowsToaster;
|
20 | WindowsBalloon: typeof WindowsBalloon;
|
21 | Growl: typeof Growl;
|
22 | }
|
23 |
|
24 | interface Notification {
|
25 | title?: string | undefined;
|
26 | message?: string | undefined;
|
27 |
|
28 | icon?: string | undefined;
|
29 |
|
30 | wait?: boolean | undefined;
|
31 | }
|
32 |
|
33 | interface NotificationMetadata {
|
34 | activationType?: string | undefined;
|
35 | activationAt?: string | undefined;
|
36 | deliveredAt?: string | undefined;
|
37 | activationValue?: string | undefined;
|
38 | activationValueIndex?: string | undefined;
|
39 | }
|
40 |
|
41 | interface NotificationCallback {
|
42 | (err: Error | null, response: string, metadata?: NotificationMetadata): void;
|
43 | }
|
44 |
|
45 | interface Option {
|
46 | withFallback?: boolean | undefined;
|
47 | customPath?: string | undefined;
|
48 | }
|
49 | }
|
50 |
|
51 | declare var nodeNotifier: nodeNotifier.NodeNotifier;
|
52 |
|
53 | export = nodeNotifier;
|