-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtypes.js
120 lines (117 loc) · 3.76 KB
/
types.js
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/* @flow */
/* ::
export type RendererType = (string, Object) => string | Promise<string>
export type OptionsType = {
juice?: false | { // CSS inliner (see https://github.com/Automattic/juice)
applyAttributesTableElements?: boolean,
applyHeightAttributes?: boolean,
applyStyleTags?: boolean,
applyWidthAttributes?: boolean,
extraCss?: string,
insertPreservedExtraCss?: boolean,
inlinePseudoElements?: boolean,
preserveFontFaces?: boolean,
preserveImportant?: boolean,
preserveMediaQueries?: boolean,
removeStyleTags?: boolean,
webResources?: Object,
xmlMode?: boolean
}
}
export type TemplateType = {
name: string,
title: string,
version: number,
channels: {
email?: {
from: string,
to: string,
subject: string,
cc?: string[],
bcc?: string[],
replyTo?: string,
text?: string,
html?: string,
attachments?: {
contentType: string,
filename: string,
content: string | Buffer
}[],
headers?: {[string]: string | number | boolean}
},
sms?: {
from: string,
to: string,
text: string,
type?: 'text' | 'unicode', // Defaults to 'text'
nature?: 'marketing' | 'transactional',
ttl?: number,
messageClass?: 0 | 1 | 2 | 3
},
push?: {
registrationToken: string,
title: string,
body: string,
custom?: Object,
priority?: 'high' | 'normal', // gcm, apn. Will be translated to 10 and 5 for apn. Defaults to 'high'
collapseKey?: string, // gcm for android, used as collapseId in apn
contentAvailable?: boolean, // gcm for android
delayWhileIdle?: boolean, // gcm for android
restrictedPackageName?: string, // gcm for android
dryRun?: boolean, // gcm for android
icon?: string, // gcm for android
tag?: string, // gcm for android
color?: string, // gcm for android
clickAction?: string, // gcm for android. In ios, category will be used if not supplied
locKey?: string, // gcm, apn
bodyLocArgs?: string, // gcm, apn
titleLocKey?: string, // gcm, apn
titleLocArgs?: string, // gcm, apn
retries?: number, // gcm, apn
encoding?: string, // apn
badge?: number, // gcm for ios, apn
sound?: string, // gcm, apn
alert?: string | Object, // apn, will take precedence over title and body
titleLocKey?: string, // apn and gcm for ios
titleLocArgs?: string, // apn and gcm for ios
launchImage?: string, // apn and gcm for ios
action?: string, // apn and gcm for ios
topic?: string, // apn and gcm for ios
category?: string, // apn and gcm for ios
contentAvailable?: string, // apn and gcm for ios
mdm?: string, // apn and gcm for ios
urlArgs?: string, // apn and gcm for ios
truncateAtWordEnd?: boolean, // apn and gcm for ios
mutableContent?: number, // apn
expiry?: number, // seconds
timeToLive?: number, // if both expiry and timeToLive are given, expiry will take precedency
headers?: {[string]: string | number | boolean}, // wns
launch?: string, // wns
duration?: string, // wns
consolidationKey?: string // ADM
},
webpush?: {
subscription: {
endpoint: string,
keys: {
auth: string,
p256dh: string
}
},
title: string, // C22 F22 S6
body: string, // C22 F22 S6
actions?: {
action: string,
title: string,
icon?: string
}[], // C53
badge?: string, // C53
dir?: 'auto' | 'rtl' | 'ltr', // C22 F22 S6
icon?: string, // C22 F22
image?: string, // C55 F22
redirects?: {[key: string]: string}, // added for local tests
requireInteraction?: boolean // C22 F52
}
}
}
*/