forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appsscript.json
466 lines (466 loc) · 17.6 KB
/
appsscript.json
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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/appsscript.json",
"definitions": {
"homepageTrigger": {
"title": "homepage trigger",
"type": "object",
"description": "The Google Workspace add-on manifest configuration for homepage triggers.",
"properties": {
"enabled": {
"description": "Whether or not homepage (non-contextual) cards are enabled in Calendar. Defaults to true.",
"type": "boolean"
},
"runFunction": {
"description": "The name of the function to run when this trigger fires. You must implement this function in your add-on project. This function must build and return an array of Card objects.",
"type": "string"
}
}
}
},
"properties": {
"runtimeVersion": {
"description": "Version of the server to use when executing this project.",
"type": "string",
"enum": ["STABLE", "V8", "DEPRECATED_ES5"],
"default": "STABLE"
},
"timeZone": {
"description": "The script time zone in one of the available ZoneId values such as \"America/Denver\".",
"type": "string",
"default": "America/New_York"
},
"dependencies": {
"title": "dependencies",
"description": "A list of advanced services and libraries.",
"type": "object",
"properties": {
"enabledAdvancedServices": {
"description": "The list of advanced services enabled for use by the script project.",
"type": "array",
"items": {
"title": "advanced service",
"description": "A single advanced service.",
"type": "object",
"required": ["userSymbol", "serviceId", "version"],
"properties": {
"userSymbol": {
"description": "The identifier used to refer to this service in the code of the Apps Script project.",
"type": "string",
"default": "Sheets"
},
"serviceId": {
"description": "The identifier of the service that is shown in the API discovery document (e.g., drive).",
"type": "string",
"default": "sheets"
},
"version": {
"description": "The enabled version of the service (e.g., \"v1\").",
"type": "string",
"default": "v4"
}
}
}
},
"libraries": {
"description": "The list of libraries used by the script project.",
"type": "array",
"items": {
"title": "library",
"description": "A single library.",
"type": "object",
"required": ["userSymbol", "libraryId", "version"],
"properties": {
"userSymbol": {
"description": "The label that is used in the script project code to refer to this library.",
"type": "string",
"default": "OAuth2"
},
"libraryId": {
"description": "The script ID of the library's script project. You can find a script ID in the library script's URL or in the script editor by selecting **File > Project properties**.",
"type": "string",
"default": "1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF",
"maxLength": 57,
"minLength": 57
},
"version": {
"description": "The version of the library that is used by the script. This is either a version number or stable, meaning the last version created.",
"type": "string",
"default": "41"
},
"developmentMode": {
"description": "If true, version is ignored and the script uses the current library project saved code, even if that code has not been saved to a new version.",
"type": "boolean",
"default": true
}
}
}
}
}
},
"webapp": {
"title": "script",
"description": "The script project's web app configuration. Only used if the project is deployed as a web app.",
"type": "object",
"properties": {
"access": {
"description": "The levels of permission for running the web app.",
"type": "string",
"enum": ["MYSELF", "DOMAIN", "ANYONE", "ANYONE_ANONYMOUS"],
"default": "MYSELF"
},
"executeAs": {
"description": "The identity under which the web app executes.",
"type": "string",
"enum": ["USER_ACCESSING", "USER_DEPLOYING"],
"default": "USER_DEPLOYING"
}
}
},
"exceptionLogging": {
"description": "The location where exceptions are logged.",
"type": "string",
"enum": ["NONE", "STACKDRIVER"]
},
"oauthScopes": {
"description": "The definition of authorization scopes used by the script project.",
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"urlFetchWhitelist": {
"description": "A list of HTTPS URL prefixes. If present, any URL endpoint fetched must match one of the prefixes in this list. This can help to protect user data.",
"type": "array",
"items": {
"type": "string",
"format": "hostname"
}
},
"executionApi": {
"title": "api options",
"description": "The script project's API executable configuration. Only used if the project is deployed for API execution.",
"type": "object",
"properties": {
"access": {
"description": "Determines who has permission to run the script from the API.",
"type": "string",
"enum": ["MYSELF", "DOMAIN", "ANYONE", "ANYONE_ANONYMOUS"]
}
}
},
"sheets": {
"title": "sheet manifest",
"description": "Defines manifest values specific to Sheets.",
"type": "object",
"properties": {
"macros": {
"description": "A list of defined macros and their associated properties.",
"type": "array",
"items": {
"title": "macros",
"description": "A defined macros and it's associated properties.",
"type": "object",
"properties": {
"menuName": {
"description": "The name of the macro as it appears in the Google Sheets UI.",
"type": "string",
"default": "My Macro"
},
"functionName": {
"description": "The name of the Apps Script function that executes the macro. By default this matches the menuName for functions automatically created, but this is not a requirement.",
"type": "string",
"default": "myFunction"
},
"defaultShortcut": {
"description": "Defines the keyboard shortcut that executes the macro. This must be of the form Ctrl+Alt+Shift+Number, where Number is a single-digit. Macros without shortcuts can only be executed from the Tools > Macros menu.",
"type": "string",
"default": "Ctrl+Alt+Shift+1"
}
},
"required": ["menuName", "functionName", "defaultShortcut"]
}
}
}
},
"dataStudio": {
"title": "add-on manifest",
"description": "Data Studio add-on manifest.",
"type": "object",
"properties": {
"name": {
"description": "Display name for add-on.",
"type": "string"
},
"logoUrl": {
"description": "URL for logo image of add-on.",
"type": "string",
"format": "hostname"
},
"company": {
"description": "Company name for the add-on.",
"type": "string"
},
"addonUrl": {
"type": "string",
"format": "hostname"
},
"companyUrl": {
"type": "string",
"format": "hostname"
},
"supportUrl": {
"description": "URL for support information of the add-on.",
"type": "string",
"format": "hostname"
},
"description": {
"description": "Short description about the add-on.",
"type": "string"
},
"sources": {
"description": "List of sources or services that can be accessed with this add-on.",
"type": "array",
"items": {
"description": "A single source type.",
"type": "string"
}
},
"templates": {
"title": "templates",
"description": "Map of template name to report ID.",
"type": "object"
},
"shortDescription": {
"description": "Even shorter description used in gallery cards. Only a maximum of 114 characters will be shown on the card.",
"type": "string"
},
"authType": {
"description": "List of AuthTypes supported.",
"type": "array",
"items": {
"description": "Types of Authorization supported by the add-on.",
"type": "string",
"enum": ["NONE", "KEY", "USER_PASS", "OAUTH2"]
}
},
"privacyPolicyUrl": {
"description": "Url for privacy policy information about the add-on.",
"type": "string",
"format": "hostname"
},
"termsOfServiceUrl": {
"description": "Url for terms of service information about the add-on.",
"type": "string",
"format": "hostname"
}
},
"required": ["name", "logoUrl", "company", "supportUrl", "description"]
},
"addOns": {
"title": "add-ons",
"description": "G Suite Add-ons",
"type": "object",
"properties": {
"common": {
"title": "common options",
"description": "Common properties between all G Suite add-on types.",
"type": "object",
"properties": {
"name": {
"description": "The add-on name.",
"type": "string"
},
"logoUrl": {
"description": "The logo URL.",
"type": "string",
"format": "uri"
},
"layoutProperties": {
"title": "layout options",
"description": "Layout properties.",
"type": "object",
"properties": {
"primaryColor": {
"description": "The color of toolbar. Defaults to grey (#424242).",
"type": "string"
},
"secondaryColor": {
"description": "The default color of buttons. Defaults to the primary color (if it is set); otherwise defaults to blue (#2196F3).",
"type": "string"
}
}
},
"homepageTrigger": {
"title": "homepage trigger",
"description": "Homepage trigger data",
"type": "object",
"properties": {
"enabled": {
"description": "Whether or not homepage (non-contextual) cards are enabled. Defaults to true.",
"type": "boolean"
},
"runFunctions": {
"description": "The name of the function to run",
"type": "string"
}
}
},
"universalActions": {
"description": "Universal add-on actions",
"type": "array",
"items": {
"title": "actions",
"description": "Actions",
"type": "object",
"properties": {
"label": {
"description": "The action label.",
"type": "string"
},
"openLink": {
"description": "The link's URL",
"type": "string",
"format": "hostname"
},
"runFunction": {
"description": "Required for each defined universal action if openLink is not present. If provided, the name of the Apps Script function that executes when the user selects this action.",
"type": "string"
}
}
}
},
"openLinkUrlPrefixes": {
"description": "Link prefixes.",
"type": "array",
"items": {
"description": "A link prefix.",
"type": "string"
}
},
"useLocaleFromApp": {
"description": "Use the locale from the host application?",
"type": "boolean"
}
},
"required": ["logoUrl", "name"]
},
"gmail": {
"title": "add-on metadata",
"description": "Gmail add-on metadata.",
"type": "object",
"properties": {
"contextualTriggers": {
"description": "Contextual triggers.",
"type": "array",
"items": {
"title": "contextual trigger",
"description": "A contextual trigger.",
"type": "object",
"properties": {
"onTriggerFunction": {
"description": "The name of the Apps Script function that executes when this contextual trigger fires (that is, when a message is opened in Gmail). The function specified here must build and return an array of Card objects.",
"type": "string"
},
"unconditional": {
"title": "unconditional",
"description": "Used to specify that the contextual trigger is fired for all Gmail messages. This is currently the only option, so this should always be an empty object.",
"type": "object"
}
}
}
},
"homepageTrigger": {
"title": "homepage trigger",
"description": "The trigger function specification for creating the add-on homepage in the Gmail host.",
"type": "object",
"properties": {
"enabled": {
"description": "Whether or not homepage (non-contextual) cards are enabled in Gmail. Defaults to true.",
"type": "boolean"
},
"runFunction": {
"description": "The name of the function to run when this trigger fires. You must implement this function in your add-on project. This function must build and return an array of Card objects.",
"type": "string"
}
}
}
}
},
"calendar": {
"title": "calendar metadata",
"description": "Calendar add-on metadata.",
"type": "object",
"properties": {
"homepageTrigger": {
"title": "homepage trigger",
"description": "The trigger function specification for creating the add-on homepage in the Calendar host.",
"type": "object",
"properties": {
"enabled": {
"description": "Whether or not homepage (non-contextual) cards are enabled in Calendar. Defaults to true.",
"type": "boolean"
},
"runFunction": {
"description": "The name of the function to run when this trigger fires. You must implement this function in your add-on project. This function must build and return an array of Card objects.",
"type": "string"
}
}
},
"eventOpenTrigger": {
"title": "event",
"description": "When a Calendar event is opened",
"type": "object",
"properties": {
"runFunction": {
"description": "Event handler function",
"type": "string"
}
}
},
"eventUpdateTrigger": {
"title": "event",
"description": "When a Calendar event is updated",
"type": "object",
"properties": {
"runFunction": {
"description": "Event handler function",
"type": "string"
}
}
},
"eventAccess": {
"description": "Handler access to Calendar event",
"type": "string",
"enum": ["METADATA", "READ", "WRITE", "READ_WRITE"]
}
}
},
"sheets": {
"title": "add-on options",
"description": "Configurations for the Google Workspace Add-on's appearance and behavior within the Sheets host application.",
"type": "object",
"properties": {
"homepageTrigger": {
"$ref": "#/definitions/homepageTrigger"
},
"onFileScopeGrantedTrigger": {
"title": "contextual trigger",
"type": "object",
"description": "A configuration for a contextual trigger that fires when the add-on presents the request file scope dialog.",
"properties": {
"runFunction": {
"type": "string"
}
}
}
},
"additionalProperties": false
}
}
}
},
"title": "JSON schema for Google Apps Script manifest files",
"type": "object"
}