mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 15:47:35 +00:00
f87053cb02
feat: add browser opening to test:notification feat: add c8 and mocha for testing feat: update Docker and ci style: update editorconfig
60 lines
1.2 KiB
TypeScript
60 lines
1.2 KiB
TypeScript
declare module 'pushover-notifications' {
|
|
export type PushoverCallback =
|
|
| ((error: Error) => void)
|
|
| ((error?: null, response: any) => void);
|
|
|
|
export type Sound =
|
|
| 'pushover'
|
|
| 'bike'
|
|
| 'bugle'
|
|
| 'cashregister'
|
|
| 'classical'
|
|
| 'cosmic'
|
|
| 'falling'
|
|
| 'gamelan'
|
|
| 'incoming'
|
|
| 'intermission'
|
|
| 'magic'
|
|
| 'mechanical'
|
|
| 'pianobar'
|
|
| 'siren'
|
|
| 'spacealarm'
|
|
| 'tugboat'
|
|
| 'alien'
|
|
| 'climb'
|
|
| 'persistent'
|
|
| 'echo'
|
|
| 'updown'
|
|
| 'vibrate'
|
|
| 'none';
|
|
|
|
export interface PushoverOptions {
|
|
token: string;
|
|
user: string;
|
|
httpOptions?: {proxy: string};
|
|
onerror?: (error: Error | string) => void;
|
|
update_sounds?: boolean;
|
|
}
|
|
|
|
export interface PushoverMessage {
|
|
device?: string;
|
|
expire?: number;
|
|
file?: string | {name: string; data: string};
|
|
message: string;
|
|
priority?: number;
|
|
retry?: number;
|
|
sound?: Sound;
|
|
timestamp?: number;
|
|
title?: string;
|
|
url?: string;
|
|
url_title?: string;
|
|
}
|
|
|
|
export class Pushover {
|
|
constructor(options: PushoverOptions);
|
|
send(message: PushoverMessage, callback: PushoverCallback);
|
|
}
|
|
|
|
export default Pushover;
|
|
}
|