-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.ts
61 lines (49 loc) · 1.46 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import type {
ntfyMessagePrioritiesDefault,
ntfyMessagePrioritiesHigh,
ntfyMessagePrioritiesLow,
ntfyMessagePrioritiesMax,
ntfyMessagePrioritiesMin
} from './priorities.js'
export type NtfyMessagePriority =
| (typeof ntfyMessagePrioritiesMax)[number]
| (typeof ntfyMessagePrioritiesHigh)[number]
| (typeof ntfyMessagePrioritiesDefault)[number]
| (typeof ntfyMessagePrioritiesLow)[number]
| (typeof ntfyMessagePrioritiesMin)[number]
export interface NtfyMessageOptions {
/** The ntfy server to publish to */
server?: string
/** The notification topic */
topic: string
/** The notification priority */
priority?: NtfyMessagePriority
/** The notification title */
title?: string
/** The notification message body */
message?: string
/**
* The notification tags
* - If the tag matches a supported emoji short code, the emoji will be prepended to the title or message.
* - If the tag does not match, the tag will be listed below the notification.
*/
tags?: string[]
/** Whether to cache the notification. */
cache?: boolean
/** The URL to open when the notification is clicked. */
clickURL?: string
/** The URL to the icon to appear next to the notification. */
iconURL?: string
fileAttachmentURL?: string
fileName?: string
}
export interface FetchHeaders {
Title?: string
Priority?: NtfyMessagePriority
Tags?: string
Click?: string
Icon?: string
Attach?: string
Filename?: string
Cache?: 'no'
}