-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.json
More file actions
356 lines (335 loc) · 9.16 KB
/
install.json
File metadata and controls
356 lines (335 loc) · 9.16 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
{
"resources": {
"body": [
{
"type": "style",
"src": "./build/app.css"
},
{
"type": "script",
"src": "./build/app.js"
}
]
},
"preview": {
"handlers": [
{
"options": ["color"],
"execute": "INSTALL_SCOPE.setColor(INSTALL_OPTIONS)"
},
{
"options": ["_default"],
"execute": "INSTALL_SCOPE.setOptions(INSTALL_OPTIONS)"
},
{
"options": ["_product"],
"execute": "INSTALL_SCOPE.setProduct(INSTALL_PRODUCT)"
}
]
},
"options": {
"properties": {
"goal": {
"order": 1,
"title": "What’s the goal you’re trying to achieve?",
"type": "string",
"format": "radios",
"enum": [
"announcement",
"cta",
"signup"
],
"enumNames": {
"signup": "Gather emails to sign visitors up for your newsletter",
"cta": "Redirect them to a special page",
"announcement": "Just show a message"
},
"products": {
"signup": ["pro"]
},
"default": "announcement"
},
"ctaTitle": {
"order": 2,
"showIf": {
"goal": "cta"
},
"title": "Message title",
"type": "string",
"default": "New products!"
},
"ctaText": {
"order": 3,
"showIf": {
"goal": "cta"
},
"title": "Message text",
"format": "textarea",
"type": "string",
"default": "We just launched an amazing new product."
},
"ctaButtonText": {
"order": 4,
"showIf": {
"goal": "cta"
},
"title": "Button text",
"type": "string",
"default": "Check it out"
},
"ctaLinkAddress": {
"order": 5,
"showIf": {
"goal": "cta"
},
"title": "URL to drive traffic to",
"type": "string",
"format": "url"
},
"signupDestination": {
"order": 6,
"default": "email",
"title": "What should we do with the emails we collect?",
"type": "string",
"format": "radios",
"showIf": {
"goal": "signup"
},
"enum": [
"email",
"service"
],
"enumNames": {
"email": "Send me an email with the collected email address.<span class=\"help-text\"><small>Powered by <a href=\"https://formspree.io\" target=\"_blank\" class=\"with-inherited-color\"><strong>Formspree</strong></a></small></span>",
"service": "Add them as contacts to the mailing list service of my choice.<span class=\"help-text\"><small>Currently, <a href=\"https://www.constantcontact.com\" target=\"_blank\" class=\"with-inherited-color\"><strong>Constant Contact</strong></a> and <a href=\"https://mailchimp.com\" target=\"_blank\" class=\"with-inherited-color\"><strong>Mailchimp</strong></a> are supported.</small></span>"
}
},
"email": {
"order": 7,
"showIf": {
"goal": "signup",
"signupDestination": "email"
},
"title": "What email address should signups be sent to?",
"required": true,
"format": "email",
"type": "string"
},
"account": {
"order": 8,
"title": "Mailing list service",
"description": "Select the mailing list service which you would like to send subscriptions to.",
"type": "object",
"format": "account",
"services": ["mailchimp", "constant-contact"],
"showIf": {
"goal": "signup",
"signupDestination": "service"
}
},
"list": {
"order": 9,
"title": "List",
"description": "Select the list in your account which email submissions should be added to.",
"type": "string",
"default": "",
"enum": [""],
"enumNames": {
"": "Loading lists..."
},
"showIf": {
"goal": "signup",
"signupDestination": "service",
"account.service": {
"op": "!=",
"value": null
}
}
},
"signupTitle": {
"order": 10,
"showIf": {
"goal": "signup"
},
"title": "Message title",
"type": "string",
"default": "Sign up for our newsletter"
},
"signupText": {
"order": 11,
"showIf": {
"goal": "signup"
},
"title": "Message text",
"format": "textarea",
"type": "string",
"default": "Join our mailing list to be the first to know what we’re up to."
},
"signupInputPlaceholder": {
"order": 12,
"showIf": {
"goal": "signup"
},
"title": "Input placeholder text",
"type": "string",
"default": "Email address"
},
"signupButtonText": {
"order": 13,
"showIf": {
"goal": "signup"
},
"title": "Button text",
"type": "string",
"default": "Sign up"
},
"signupSuccessTitle": {
"order": 14,
"showIf": {
"goal": "signup"
},
"title": "Thank you title",
"description": "This title will display after visitors enter their email.",
"type": "string",
"default": "Thanks for signing up!"
},
"signupSuccessText": {
"order": 15,
"showIf": {
"goal": "signup"
},
"title": "Thank you text",
"description": "This text will display after visitors enter their email.",
"type": "string",
"default": "You’ll be kept up to date with our newsletter."
},
"announcementTitle": {
"order": 16,
"showIf": {
"goal": "announcement"
},
"title": "Message title",
"type": "string",
"default": "Announcement"
},
"announcementText": {
"order": 17,
"showIf": {
"goal": "announcement"
},
"title": "Message text",
"format": "textarea",
"type": "string",
"default": "Sale! Everything is 75% off this entire week."
},
"announcementButtonText": {
"order": 18,
"showIf": {
"goal": "announcement"
},
"title": "Button text",
"type": "string",
"default": "Got it"
},
"color": {
"order": 19,
"title": "Accent color",
"type": "string",
"format": "color",
"default": "#0099ff"
},
"position": {
"title": "Position",
"description": "Which part of the page should the box appear?",
"type": "string",
"order": 20,
"format": "radios",
"default": "right bottom",
"enum": [
"left top",
"right top",
"left bottom",
"right bottom"
],
"enumNames": {
"left top": "Top left",
"right top": "Top right",
"left bottom": "Bottom left",
"right bottom": "Bottom right"
},
"products": {
"left top": ["pro"],
"right top": ["pro"],
"left bottom": ["pro"],
"right bottom": ["pro"]
}
},
"delay": {
"order": 21,
"title": "Delay",
"description": "When should the box appear?",
"type": "string",
"format": "radios",
"default": "0",
"enum": [
"0",
"1500",
"60000"
],
"enumNames": {
"0": "Immediately",
"1500": "After a few seconds",
"60000": "1 minute"
},
"products": {
"0": ["pro"],
"1500": ["pro"],
"60000": ["pro"]
}
},
"showStrategy": {
"order": 22,
"title": "How often should the Lead Box appear?",
"type": "string",
"format": "radios",
"enum": [
"always",
"once"
],
"enumNames": {
"always": "Until a visitor interacts with it",
"once": "Just once"
},
"default": "always"
}
}
},
"hooks": [
{
"endpoint": "https://provisioner.appstore.cfdata.org/{{install.options.account.service}}/hook",
"events": ["option-change:account", "preview"],
"block": true,
"if": "install.options.signupDestination == 'service' && install.options.account && install.options.account.service",
"authenticate": ["account"],
"failure": {
"action": "notify",
"message": "There was an error communicating with the mail service."
}
},
{
"endpoint": "https://provisioner.appstore.cfdata.org/constant-contact/hook",
"events": ["option-change:list"],
"block": true,
"if": "install.options.signupDestination == 'service' && install.options.account && install.options.account.service == 'constant-contact'",
"authenticate": ["account"],
"failure": {
"action": "notify",
"message": "There was an error communicating with Constant Contact."
}
},
{
"events": ["account-logout"],
"action": "reset-schema"
}
]
}