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