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