-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathscriptable.json
More file actions
6408 lines (6408 loc) · 322 KB
/
scriptable.json
File metadata and controls
6408 lines (6408 loc) · 322 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
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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"!name": "scriptable",
"Alert": {
"!doc": "Presents an alert.",
"!url": "https://docs.scriptable.app/alert/#-new-alert",
"!type": "fn() -> +Alert"
},
"args": {
"!doc": "Arguments passed to the script.",
"!url": "https://docs.scriptable.app/args"
},
"Calendar": {
"!doc": "Holds reminders and events.",
"!url": "https://docs.scriptable.app/calendar",
"forReminders": {
"!type": "fn() -> +Promise[:t=[Calendar]]",
"!url": "https://docs.scriptable.app/calendar/#forreminders",
"!doc": "Fetches calendars for reminders.",
"!scriptable.description": "A calendar can only hold either reminders or events. Call this function to fetch all calendars that can hold reminders."
},
"forEvents": {
"!type": "fn() -> +Promise[:t=[Calendar]]",
"!url": "https://docs.scriptable.app/calendar/#forevents",
"!doc": "Fetches calendars for events.",
"!scriptable.description": "A calendar can only hold either reminders or events. Call this function to fetch all calendars that can hold events."
},
"forRemindersByTitle": {
"!type": "fn(title: string) -> +Promise[:t=Calendar]",
"!url": "https://docs.scriptable.app/calendar/#forremindersbytitle",
"!doc": "Fetches a calendar that holds reminders.",
"!scriptable.parameters": [
{
"!scriptable.name": "title",
"!scriptable.description": "Title of calendar."
}
]
},
"forEventsByTitle": {
"!type": "fn(title: string) -> +Promise[:t=Calendar]",
"!url": "https://docs.scriptable.app/calendar/#foreventsbytitle",
"!doc": "Fetches a calendar that holds events.",
"!scriptable.parameters": [
{
"!scriptable.name": "title",
"!scriptable.description": "Title of calendar."
}
]
},
"createForReminders": {
"!type": "fn(title: string) -> +Promise[:t=Calendar]",
"!url": "https://docs.scriptable.app/calendar/#createforreminders",
"!doc": "Create a new calendar that holds reminders.",
"!scriptable.description": "This will create a new list for reminders in the Reminders app. The list is automatically saved so there is no need to call <code>save()</code> after creating the list."
},
"findOrCreateForReminders": {
"!type": "fn(title: string) -> +Promise[:t=Calendar]",
"!url": "https://docs.scriptable.app/calendar/#findorcreateforreminders",
"!doc": "Find or create a new calendar that holds reminders.",
"!scriptable.description": "This will attempt to find a calendar for reminders with the specified name. If no calendar is found, a new calendar is created and the calendar will appear as a reminder list in the Reminders app. If multiple calendars are found for the specified name, the first one will be returned. The list is automatically saved so there is no need to call <code>save()</code> in the case the list was created."
},
"defaultForReminders": {
"!type": "fn() -> +Promise[:t=Calendar]",
"!url": "https://docs.scriptable.app/calendar/#defaultforreminders",
"!doc": "Default calendar for reminders.",
"!scriptable.description": "A calendar can only hold either reminders or events. Call this function to get the default calendar that can hold reminders."
},
"defaultForEvents": {
"!type": "fn() -> +Promise[:t=Calendar]",
"!url": "https://docs.scriptable.app/calendar/#defaultforevents",
"!doc": "Default calendar for events.",
"!scriptable.description": "A calendar can only hold either reminders or events. Call this function to get the default calendar that can hold events."
},
"presentPicker": {
"!type": "fn(allowMultiple: bool) -> +Promise[:t=[Calendar]]",
"!url": "https://docs.scriptable.app/calendar/#presentpicker",
"!doc": "Presents a view for picking calendars.",
"!scriptable.parameters": [
{
"!scriptable.name": "allowMultiple",
"!scriptable.description": "Whether to allow picking multiple calenders. Defaults to false."
}
]
}
},
"CalendarEvent": {
"!doc": "Manages events in calendars.",
"!url": "https://docs.scriptable.app/calendarevent/#-new-calendarevent",
"!type": "fn() -> +CalendarEvent",
"!scriptable.description": "In order to add the event to your calendar, you must call the save() function.",
"presentCreate": {
"!type": "fn() -> +Promise[:t=CalendarEvent]",
"!url": "https://docs.scriptable.app/calendarevent/#presentcreate",
"!doc": "Presents a view for creating a calendar event.",
"!scriptable.description": "The presented view supports editing various attributes of the event,\nincluding title, location, dates, recurrence and alerts."
},
"today": {
"!type": "fn(calendars: [Calendar]) -> +Promise[:t=[CalendarEvent]]",
"!url": "https://docs.scriptable.app/calendarevent/#today",
"!doc": "Events occurring today.",
"!scriptable.parameters": [
{
"!scriptable.name": "calendars",
"!scriptable.description": "Calendars to fetch events for. Defaults to all calendars."
}
]
},
"tomorrow": {
"!type": "fn(calendars: [Calendar]) -> +Promise[:t=[CalendarEvent]]",
"!url": "https://docs.scriptable.app/calendarevent/#tomorrow",
"!doc": "Events occurring tomorrow.",
"!scriptable.parameters": [
{
"!scriptable.name": "calendars",
"!scriptable.description": "Calendars to fetch events for. Defaults to all calendars."
}
]
},
"yesterday": {
"!type": "fn(calendars: [Calendar]) -> +Promise[:t=[CalendarEvent]]",
"!url": "https://docs.scriptable.app/calendarevent/#yesterday",
"!doc": "Events that occurred yesterday.",
"!scriptable.parameters": [
{
"!scriptable.name": "calendars",
"!scriptable.description": "Calendars to fetch events for. Defaults to all calendars."
}
]
},
"thisWeek": {
"!type": "fn(calendars: [Calendar]) -> +Promise[:t=[CalendarEvent]]",
"!url": "https://docs.scriptable.app/calendarevent/#thisweek",
"!doc": "Events that occur this week.",
"!scriptable.parameters": [
{
"!scriptable.name": "calendars",
"!scriptable.description": "Calendars to fetch events for. Defaults to all calendars."
}
]
},
"nextWeek": {
"!type": "fn(calendars: [Calendar]) -> +Promise[:t=[CalendarEvent]]",
"!url": "https://docs.scriptable.app/calendarevent/#nextweek",
"!doc": "Events that occur next week.",
"!scriptable.parameters": [
{
"!scriptable.name": "calendars",
"!scriptable.description": "Calendars to fetch events for. Defaults to all calendars."
}
]
},
"lastWeek": {
"!type": "fn(calendars: [Calendar]) -> +Promise[:t=[CalendarEvent]]",
"!url": "https://docs.scriptable.app/calendarevent/#lastweek",
"!doc": "Events that occurred last week.",
"!scriptable.parameters": [
{
"!scriptable.name": "calendars",
"!scriptable.description": "Calendars to fetch events for. Defaults to all calendars."
}
]
},
"between": {
"!type": "fn(startDate: Date, endDate: Date, calendars: [Calendar]) -> +Promise[:t=[CalendarEvent]]",
"!url": "https://docs.scriptable.app/calendarevent/#between",
"!doc": "Events that occurs between two dates.",
"!scriptable.parameters": [
{
"!scriptable.name": "startDate",
"!scriptable.description": "Start date to fetch events for."
},
{
"!scriptable.name": "endDate",
"!scriptable.description": "End date to fetch events for."
},
{
"!scriptable.name": "calendars",
"!scriptable.description": "Calendars to fetch events for. Defaults to all calendars."
}
]
}
},
"CallbackURL": {
"!doc": "Open x-callback-url requests.",
"!url": "https://docs.scriptable.app/callbackurl/#-new-callbackurl",
"!type": "fn(baseURL: string) -> +CallbackURL",
"!scriptable.description": "Constructs an object that opens x-callback-url requests and waits for a response from the target app.",
"!scriptable.parameters": [
{
"!scriptable.name": "baseURL",
"!scriptable.description": "Base URL of the request. This is usally something like my-app://x-callback-url/action"
}
]
},
"Color": {
"!doc": "Stores color data including opacity.",
"!url": "https://docs.scriptable.app/color/#-new-color",
"black": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#black",
"!doc": "Constructs a black color."
},
"darkGray": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#darkgray",
"!doc": "Constructs a dark gray color."
},
"lightGray": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#lightgray",
"!doc": "Constructs a light gray color."
},
"white": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#white",
"!doc": "Constructs a white color."
},
"gray": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#gray",
"!doc": "Constructs a gray color."
},
"red": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#red",
"!doc": "Constructs a red color."
},
"green": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#green",
"!doc": "Constructs a green color."
},
"blue": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#blue",
"!doc": "Constructs a blue color."
},
"cyan": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#cyan",
"!doc": "Constructs a cyan color."
},
"yellow": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#yellow",
"!doc": "Constructs a yellow color."
},
"magenta": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#magenta",
"!doc": "Constructs a magenta color."
},
"orange": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#orange",
"!doc": "Constructs a orange color."
},
"purple": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#purple",
"!doc": "Constructs a purple color."
},
"brown": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#brown",
"!doc": "Constructs a brown color."
},
"clear": {
"!type": "fn() -> +Color",
"!url": "https://docs.scriptable.app/color/#clear",
"!doc": "Constructs a transparent color."
},
"!type": "fn(hex: string, alpha: number) -> +Color",
"!scriptable.description": "Constructs a new color with a hex value and optionally an alpha value. The hex value may specify the alpha value but this will be ignored if the alpha value parameter is provided. Examples of valid hex values: #ff0000, #00ff0080 \n#00f and #ff. The hashtag is optional.",
"!scriptable.parameters": [
{ "!scriptable.name": "hex", "!scriptable.description": "Hex value." },
{ "!scriptable.name": "alpha", "!scriptable.description": "Alpha value." }
],
"dynamic": {
"!type": "fn(lightColor: Color, darkColor: Color) -> +Color",
"!url": "https://docs.scriptable.app/color/#dynamic",
"!doc": "Creates a dynamic color.",
"!scriptable.description": "The dynamic color will use either its light or dark variant depending the appearance of the system.\n\nDynamic colors are not supported when used with <code>DrawContext</code>.",
"!scriptable.parameters": [
{
"!scriptable.name": "lightColor",
"!scriptable.description": "Color used in light appearance."
},
{
"!scriptable.name": "darkColor",
"!scriptable.description": "Color used in dark appearance."
}
]
}
},
"config": {
"!doc": "Configuration the script runs with.",
"!url": "https://docs.scriptable.app/config"
},
"console": {
"!doc": "Adds messages to the log.",
"!url": "https://docs.scriptable.app/console",
"log": {
"!type": "fn(message: any)",
"!url": "https://docs.scriptable.app/console/#log",
"!doc": "Logs a message to the console.",
"!scriptable.description": "The message will have a default appearance. Refer to <code>console.error(message)</code> to log errors.\n\nYou can also use the global function <code>log(message)</code> which is a shorthand for <code>console.log</code>.",
"!scriptable.parameters": [
{
"!scriptable.name": "message",
"!scriptable.description": "Message to log to the console."
}
]
},
"warn": {
"!type": "fn(message: any)",
"!url": "https://docs.scriptable.app/console/#warn",
"!doc": "Logs a warning message to the console.",
"!scriptable.description": "The message will have a distinctive appearance. Refer to <code>console.log(message)</code> to log informative messages and <code>console.error(message)</code> to log errors.\n\nYou can also use the global function <code>logWarning(message)</code> which is a shorthand for <code>console.warn</code>.",
"!scriptable.parameters": [
{
"!scriptable.name": "message",
"!scriptable.description": "Message to log to the console."
}
]
},
"error": {
"!type": "fn(message: any)",
"!url": "https://docs.scriptable.app/console/#error",
"!doc": "Logs an error message to the console.",
"!scriptable.description": "The message will have a distinctive appearance. Refer to <code>console.log(message)</code> to log informative message and <code>console.warn(message)</code> to log warnings.\n\nYou can also use the global function <code>logError(message)</code> which is a shorthand for <code>console.error</code>.",
"!scriptable.parameters": [
{
"!scriptable.name": "message",
"!scriptable.description": "Message to log to the console."
}
]
}
},
"Contact": {
"!doc": "Contact in the address book.",
"!url": "https://docs.scriptable.app/contact/#-new-contact",
"!type": "fn() -> +Contact",
"!scriptable.description": "In order to add the contact to your address book, you must queue it for insertion using <code>Contact.add()</code>. When you're done making changes to the address book you should call <code>Contact.persistChanges()</code> to persist the changes.",
"all": {
"!type": "fn(containers: [ContactsContainer]) -> +Promise[:t=[Contact]]",
"!url": "https://docs.scriptable.app/contact/#all",
"!doc": "Fetches contacts.",
"!scriptable.description": "Fetches the contacts in the specified containers. A contact can be in only one container.",
"!scriptable.parameters": [
{
"!scriptable.name": "containers",
"!scriptable.description": "Containers to fetch contacts from."
}
]
},
"inGroups": {
"!type": "fn(groups: [ContactsGroup]) -> +Promise[:t=[Contact]]",
"!url": "https://docs.scriptable.app/contact/#ingroups",
"!doc": "Fetches contacts in groups.",
"!scriptable.description": "Fetches the contacts in the specified contacts groups. A contact may belong to many groups.",
"!scriptable.parameters": [
{
"!scriptable.name": "groups",
"!scriptable.description": "Groups to fetch contacts from."
}
]
},
"add": {
"!type": "fn(contact: Contact, containerIdentifier: string)",
"!url": "https://docs.scriptable.app/contact/#add",
"!doc": "Queues a contact to be added.",
"!scriptable.description": "After you have created a contact, you must queue the contact to be added to the address book and invoke <code>Contact.persistChanges()</code> to persist the changes to the address book.\n\nFor performance reasons, it is best to batch changes to the address book. Therefore you should queue all updates, insertions and removals of contacts and contacts groups to as large batches as possible and then call <code>Contact.persistChanges()</code> when you want to persist the changes to the address book.",
"!scriptable.parameters": [
{
"!scriptable.name": "contact",
"!scriptable.description": "Contact to queue to be added."
},
{
"!scriptable.name": "containerIdentifier",
"!scriptable.description": "Optional. Identifier of container to add the contact to. If null is specified, the contact will be added to the default container."
}
]
},
"update": {
"!type": "fn(contact: Contact)",
"!url": "https://docs.scriptable.app/contact/#update",
"!doc": "Queues an update to a contact.",
"!scriptable.description": "After you have updated one or more properties on a contact, you must queue the contact to be updated and invoke <code>Contact.persistChanges()</code> to persist the changes to the address book.\n\nFor performance reasons, it is best to batch changes to the address book. Therefore you should queue all updates, insertions and removals of contacts and contacts groups to as large batches as possible and then call <code>Contact.persistChanges()</code> when you want to persist the changes to the address book.",
"!scriptable.parameters": [
{
"!scriptable.name": "contact",
"!scriptable.description": "Contact to queue to be updated."
}
]
},
"delete": {
"!type": "fn(contact: Contact)",
"!url": "https://docs.scriptable.app/contact/#delete",
"!doc": "Queues a contact to be deleted.",
"!scriptable.description": "To delete a contact, you must queue the contact for deletion and invoke <code>Contact.persistChanges()</code> to persist the changes to the address book.\n\nFor performance reasons, it is best to batch changes to the address book. Therefore you should queue all updates, insertions and removals of contacts and contacts groups to as large batches as possible and then call <code>Contact.persistChanges()</code> when you want to persist the changes to the address book.",
"!scriptable.parameters": [
{
"!scriptable.name": "contact",
"!scriptable.description": "Contact to queue to be deleted."
}
]
},
"persistChanges": {
"!type": "fn() -> +Promise",
"!url": "https://docs.scriptable.app/contact/#persistchanges",
"!doc": "Persist queued changes to the address book.",
"!scriptable.description": "Call this function to persist changes queued with <code>Contact.add()</code>, <code>Contact.update()</code> and <code>Contact.delete()</code>.\n\nFor performance reasons, it is best to batch changes to the address book. Therefore you should queue all updates, insertions and removals of contacts and contacts groups to as large batches as possible and then call <code>Contact.persistChanges()</code> when you want to persist the changes to the address book."
}
},
"ContactsContainer": {
"!doc": "Collection of contacts.",
"!url": "https://docs.scriptable.app/contactscontainer",
"default": {
"!type": "fn() -> +Promise[:t=ContactsContainer]",
"!url": "https://docs.scriptable.app/contactscontainer/#default",
"!doc": "Fetches default contacts container."
},
"all": {
"!type": "fn() -> +Promise[:t=[ContactsContainer]]",
"!url": "https://docs.scriptable.app/contactscontainer/#all",
"!doc": "Fetches all contacts containers."
},
"withIdentifier": {
"!type": "fn(identifier: string) -> +Promise[:t=ContactsContainer]",
"!url": "https://docs.scriptable.app/contactscontainer/#withidentifier",
"!doc": "Fetches a contacts container.",
"!scriptable.parameters": [
{
"!scriptable.name": "identifier",
"!scriptable.description": "Identifier of the contacts container to fetch."
}
]
}
},
"ContactsGroup": {
"!doc": "Group of contacts.",
"!url": "https://docs.scriptable.app/contactsgroup/#-new-contactsgroup",
"!type": "fn() -> +ContactsGroup",
"!scriptable.description": "In order to add the group to your address book, you must queue it for insertion using <code>ContactsGroup.add()</code>. When you're done making changes to the address book you should call <code>Contact.persistChanges()</code> to persist the changes.",
"all": {
"!type": "fn(containers: [ContactsContainer]) -> +Promise[:t=[ContactsGroup]]",
"!url": "https://docs.scriptable.app/contactsgroup/#all",
"!doc": "Fetches contacts groups.",
"!scriptable.description": "Fetches the contacts groups in the specified containers. A group can be in only one container.",
"!scriptable.parameters": [
{
"!scriptable.name": "containers",
"!scriptable.description": "Container to fetch contacts groups from."
}
]
},
"add": {
"!type": "fn(group: ContactsGroup, containerIdentifier: string)",
"!url": "https://docs.scriptable.app/contactsgroup/#add",
"!doc": "Queues a contacts group to be added.",
"!scriptable.description": "After you have created a group, you must queue the group to be added to the address book and invoke <code>Contact.persistChanges()</code> to persist the changes to the address book.\n\nFor performance reasons, it is best to batch changes to the address book. Therefore you should queue all updates, insertions and removals of contacts and contacts groups to as large batches as possible and then call <code>Contact.persistChanges()</code> when you want to persist the changes to the address book.",
"!scriptable.parameters": [
{
"!scriptable.name": "group",
"!scriptable.description": "Contacts group to queue to be added."
},
{
"!scriptable.name": "containerIdentifier",
"!scriptable.description": "Optional. Identifier of container to add the contacts group to. If null is specified, the group will be added to the default container."
}
]
},
"update": {
"!type": "fn(group: ContactsGroup)",
"!url": "https://docs.scriptable.app/contactsgroup/#update",
"!doc": "Queues an update to a contacts group.",
"!scriptable.description": "After you have updated one or more properties on a contacts group, you must queue the group to be updated and invoke <code>Contact.persistChanges()</code> to persist the changes to the address book.\n\nFor performance reasons, it is best to batch changes to the address book. Therefore you should queue all updates, insertions and removals of contacts and contacts groups to as large batches as possible and then call <code>Contact.persistChanges()</code> when you want to persist the changes to the address book.",
"!scriptable.parameters": [
{
"!scriptable.name": "group",
"!scriptable.description": "Contacts group to queue to be updated."
}
]
},
"delete": {
"!type": "fn(group: ContactsGroup)",
"!url": "https://docs.scriptable.app/contactsgroup/#delete",
"!doc": "Queues a contacts group to be deleted.",
"!scriptable.description": "To delete a contacts group, you must queue the group for deletion and invoke <code>Contact.persistChanges()</code> to persist the changes to the address book.\n\nFor performance reasons, it is best to batch changes to the address book. Therefore you should queue all updates, insertions and removals of contacts and contacts groups to as large batches as possible and then call <code>Contact.persistChanges()</code> when you want to persist the changes to the address book.",
"!scriptable.parameters": [
{
"!scriptable.name": "group",
"!scriptable.description": "Contacts group to queue to be deleted."
}
]
}
},
"Data": {
"!doc": "Raw data representation.",
"!url": "https://docs.scriptable.app/data",
"fromString": {
"!type": "fn(string: string) -> +Data",
"!url": "https://docs.scriptable.app/data/#fromstring",
"!doc": "Creates data from string.",
"!scriptable.description": "The provided string is assumed to be UTF8 encoded. If the string is not UTF8 encoded, the function will return null.",
"!scriptable.parameters": [
{
"!scriptable.name": "string",
"!scriptable.description": "String to create data from."
}
]
},
"fromFile": {
"!type": "fn(filePath: string) -> +Data",
"!url": "https://docs.scriptable.app/data/#fromfile",
"!doc": "Reads data from file path.",
"!scriptable.description": "Reads the raw data of the file at the specified file path.",
"!scriptable.parameters": [
{
"!scriptable.name": "filePath",
"!scriptable.description": "Path of file to read data from."
}
]
},
"fromBase64String": {
"!type": "fn(base64String: string) -> +Data",
"!url": "https://docs.scriptable.app/data/#frombase64string",
"!doc": "Creates data from base64 encoded string.",
"!scriptable.description": "The supplied string must be base64 encoded otherwise the function will return null.",
"!scriptable.parameters": [
{
"!scriptable.name": "base64String",
"!scriptable.description": "Base64 encoded string to create data from."
}
]
},
"fromJPEG": {
"!type": "fn(image: Image) -> +Data",
"!url": "https://docs.scriptable.app/data/#fromjpeg",
"!doc": "Creates data from JPEG image.",
"!scriptable.parameters": [
{
"!scriptable.name": "image",
"!scriptable.description": "JPEG image to convert to data."
}
]
},
"fromPNG": {
"!type": "fn(image: Image) -> +Data",
"!url": "https://docs.scriptable.app/data/#frompng",
"!doc": "Creates data from PNG image.",
"!scriptable.parameters": [
{
"!scriptable.name": "image",
"!scriptable.description": "PNG image to convert to data."
}
]
}
},
"DateFormatter": {
"!doc": "Converts between dates and strings.",
"!url": "https://docs.scriptable.app/dateformatter/#-new-dateformatter",
"!type": "fn() -> +DateFormatter",
"!scriptable.description": "To convert between dates and their textual representation, use the <code>string()</code> and <code>date()</code> functions."
},
"DatePicker": {
"!doc": "Presents a date picker.",
"!url": "https://docs.scriptable.app/datepicker/#-new-datepicker",
"!type": "fn() -> +DatePicker",
"!scriptable.description": "Use the date picker to present a view for selecting a date.\n\nThe date picker can be configured towards picking a date with or\nwithout time, just a time or picking hours and minutes for a timer."
},
"Device": {
"!doc": "Provides information about the device.",
"!url": "https://docs.scriptable.app/device",
"name": {
"!type": "fn() -> string",
"!url": "https://docs.scriptable.app/device/#name",
"!doc": "Name identifying the device.",
"!scriptable.description": "You can find and edit the name of your device in the system settings."
},
"systemName": {
"!type": "fn() -> string",
"!url": "https://docs.scriptable.app/device/#systemname",
"!doc": "Name of the operating system:"
},
"systemVersion": {
"!type": "fn() -> string",
"!url": "https://docs.scriptable.app/device/#systemversion",
"!doc": "Version of the operating system."
},
"model": {
"!type": "fn() -> string",
"!url": "https://docs.scriptable.app/device/#model",
"!doc": "Model of the device, e.g. \"iPhone\"."
},
"isPhone": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isphone",
"!doc": "Whether the device is a phone.",
"!scriptable.description": "You can use this property to choose behavior of a script depending on\nwhether its running on a phone or a pad."
},
"isPad": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#ispad",
"!doc": "Whether the device is a pad.",
"!scriptable.description": "You can use this property to choose behavior of a script depending on\nwhether its running on a phone or a pad."
},
"screenSize": {
"!type": "fn() -> Size",
"!url": "https://docs.scriptable.app/device/#screensize",
"!doc": "Size of the screen.",
"!scriptable.description": "The value is measured in points. For an explanation of the relationship between\npoints and pixels, see the documentation of the <code>screenScale()</code> method.\nThe value takes the device rotation into account, so the value will vary between portrait and landscape."
},
"screenResolution": {
"!type": "fn() -> Size",
"!url": "https://docs.scriptable.app/device/#screenresolution",
"!doc": "Resolution of the screen.",
"!scriptable.description": "The value is measured in pixels. The value does not take the rotation of the deviec into account."
},
"screenScale": {
"!type": "fn() -> number",
"!url": "https://docs.scriptable.app/device/#screenscale",
"!doc": "Scale of the screen.",
"!scriptable.description": "Standard resolution displays have a scale of 1.0 where one point on the screen equals one pixel. Retina displays will have a scale factor of 2.0 or 3.0 where one point on the screen is four or nine pixels, respectively."
},
"screenBrightness": {
"!type": "fn() -> number",
"!url": "https://docs.scriptable.app/device/#screenbrightness",
"!doc": "Brightness of the screen in percentage.",
"!scriptable.description": "The value range from 0 to 1. To set the screen brightness, refer to the <code>setScreenBrightness()</code> function."
},
"isInPortrait": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isinportrait",
"!doc": "Whether the device is in portrait with the home button or home indicator at the bottom."
},
"isInPortraitUpsideDown": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isinportraitupsidedown",
"!doc": "Whether the device is in portrait but upside down with the home button or home indicator at the top."
},
"isInLandscapeLeft": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isinlandscapeleft",
"!doc": "Whether the device is in landscape with the home button or home indicator on the right side."
},
"isInLandscapeRight": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isinlandscaperight",
"!doc": "Whether the device is in landscape with the home button or home indicator on the left side."
},
"isFaceUp": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isfaceup",
"!doc": "Whether the device is lying parallel to the ground with the screen facing upwards."
},
"isFaceDown": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isfacedown",
"!doc": "Whether the device is lying parallel to the ground with the screen facing downwards."
},
"batteryLevel": {
"!type": "fn() -> number",
"!url": "https://docs.scriptable.app/device/#batterylevel",
"!doc": "Current battery level.",
"!scriptable.description": "The value is in percentage ranging between 0 and 1."
},
"isDischarging": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isdischarging",
"!doc": "Whether the device is being not plugged into power and thus discharging."
},
"isCharging": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#ischarging",
"!doc": "Whether the device is being charged."
},
"isFullyCharged": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isfullycharged",
"!doc": "Whether the device is fully charged."
},
"preferredLanguages": {
"!type": "fn() -> [string]",
"!url": "https://docs.scriptable.app/device/#preferredlanguages",
"!doc": "The preferred langauges.",
"!scriptable.description": "The list is ordered according to the language preferences specified in the system settings."
},
"locale": {
"!type": "fn() -> string",
"!url": "https://docs.scriptable.app/device/#locale",
"!doc": "Identifier for the device locale."
},
"language": {
"!type": "fn() -> string",
"!url": "https://docs.scriptable.app/device/#language",
"!doc": "Identifier for the device language."
},
"isUsingDarkAppearance": {
"!type": "fn() -> bool",
"!url": "https://docs.scriptable.app/device/#isusingdarkappearance",
"!doc": "Whether the device is using dark appearance.",
"!scriptable.description": "This API is not supported in widgets."
},
"volume": {
"!type": "fn() -> number",
"!url": "https://docs.scriptable.app/device/#volume",
"!doc": "The device volume.",
"!scriptable.description": "The value range from 0 to 1."
},
"setScreenBrightness": {
"!type": "fn(percentage: number)",
"!url": "https://docs.scriptable.app/device/#setscreenbrightness",
"!doc": "Sets the brightness of the screen.",
"!scriptable.description": "The value range from 0 to 1. To get the screen brightness, refer to the <code>screenBrightness()</code> function.",
"!scriptable.parameters": [
{
"!scriptable.name": "percentage",
"!scriptable.description": "Percentage to set the screen brightness to. Value between 0 and 1."
}
]
}
},
"Dictation": {
"!doc": "Presents an interface for dictation.",
"!url": "https://docs.scriptable.app/dictation",
"start": {
"!type": "fn(locale: string) -> +Promise[:t=string]",
"!url": "https://docs.scriptable.app/dictation/#start",
"!doc": "Starts dictation.",
"!scriptable.description": "Presents an interface that shows the dictated string. Press \"Done\"\nwhen you are done dictating the text.",
"!scriptable.parameters": [
{
"!scriptable.name": "locale",
"!scriptable.description": "Optional string identifier that specifies the language to dictate in. E.g. \"en\" for English, \"it\" for Italian and \"da\" for Danish. Defaults to the locale of the device."
}
]
}
},
"DocumentPicker": {
"!doc": "Presents a document picker.",
"!url": "https://docs.scriptable.app/documentpicker",
"open": {
"!type": "fn(types: [string]) -> +Promise[:t=[string]]",
"!url": "https://docs.scriptable.app/documentpicker/#open",
"!doc": "Opens a document.",
"!scriptable.description": "Presents a document picker for opening a document from the Files app. It is up to the user to specify which types of files can be opened. Types are specified as UTIs, e.g. \"public.plain-text\" or \"public.image\". If you want to open a file of any file type, see the <code>openFile</code> function and if you want to open a folder, see the <code>openFolder</code> function.\n\nWhen fulfilled the returned promise will provide the paths for the selected documents. Use an instance of FileManager to read the contents of the files.",
"!scriptable.parameters": [
{
"!scriptable.name": "types",
"!scriptable.description": "Types of files to select. Specified using UTIs. Defaults to all files."
}
]
},
"openFile": {
"!type": "fn() -> +Promise[:t=string]",
"!url": "https://docs.scriptable.app/documentpicker/#openfile",
"!doc": "Opens a file of any file type.",
"!scriptable.description": "Presents a document picker for opening a file from the Files app. The document picker will allow the selection of any file.\n\nWhen fulfilled the returned promise will provide the paths for the selected files."
},
"openFolder": {
"!type": "fn() -> +Promise[:t=string]",
"!url": "https://docs.scriptable.app/documentpicker/#openfolder",
"!doc": "Opens a folder.",
"!scriptable.description": "Presents a document picker for opening a folder from the Files app.\n\nWhen fulfilled the returned promise will provide the paths for the selected files."
},
"export": {
"!type": "fn(path: string) -> +Promise[:t=[string]]",
"!url": "https://docs.scriptable.app/documentpicker/#export",
"!doc": "Exports a file to a document.",
"!scriptable.description": "Exports the file to a document with. A picker prompting for a destination to export the document to is presented.",
"!scriptable.parameters": [
{
"!scriptable.name": "path",
"!scriptable.description": "Path of the file to export."
}
]
},
"exportString": {
"!type": "fn(content: string, name: string) -> +Promise[:t=[string]]",
"!url": "https://docs.scriptable.app/documentpicker/#exportstring",
"!doc": "Exports a string to a document.",
"!scriptable.description": "Exports a string to a new file. The name of the file can optionally be specified. A picker prompting for a destination to export the document to is presented.",
"!scriptable.parameters": [
{
"!scriptable.name": "content",
"!scriptable.description": "Content of the document to export."
},
{
"!scriptable.name": "name",
"!scriptable.description": "Optional name of the document to export."
}
]
},
"exportImage": {
"!type": "fn(image: Image, name: string) -> +Promise[:t=[string]]",
"!url": "https://docs.scriptable.app/documentpicker/#exportimage",
"!doc": "Exports an image.",
"!scriptable.description": "Exports an image to a new file. The name of the file can optionally be specified. A picker prompting for a destination to export the document to is presented.",
"!scriptable.parameters": [
{
"!scriptable.name": "image",
"!scriptable.description": "Image to export."
},
{
"!scriptable.name": "name",
"!scriptable.description": "Optional name of the image to export."
}
]
},
"exportData": {
"!type": "fn(data: Data, name: string) -> +Promise[:t=[string]]",
"!url": "https://docs.scriptable.app/documentpicker/#exportdata",
"!doc": "Exports data.",
"!scriptable.description": "Exports data to a new file. The name of the file can optionally be specified. A picker prompting for a destination to export the document to is presented.",
"!scriptable.parameters": [
{
"!scriptable.name": "data",
"!scriptable.description": "Data to export."
},
{
"!scriptable.name": "name",
"!scriptable.description": "Optional name of the image to export."
}
]
}
},
"DrawContext": {
"!doc": "Context for drawing images.",
"!url": "https://docs.scriptable.app/drawcontext/#-new-drawcontext",
"!type": "fn() -> +DrawContext",
"!scriptable.description": "Constructs a new canvas to draw images, shapes and texts on."
},
"FileManager": {
"!doc": "Read and write files on disk.",
"!url": "https://docs.scriptable.app/filemanager",
"local": {
"!type": "fn() -> +FileManager",
"!url": "https://docs.scriptable.app/filemanager/#local",
"!doc": "Creates a local FileManager.",
"!scriptable.description": "Creates a file manager for operating with files stored locally."
},
"iCloud": {
"!type": "fn() -> +FileManager",
"!url": "https://docs.scriptable.app/filemanager/#icloud",
"!doc": "Creates an iCloud FileManager.",
"!scriptable.description": "Creates a file manager for operating with files stored in iCloud. iCloud must be enabled on the device in order to use this."
}
},
"Font": {
"!doc": "Represents a font and text size.",
"!url": "https://docs.scriptable.app/font/#-new-font",
"!type": "fn(name: string, size: number) -> +Font",
"!scriptable.description": "Refer to <a href=\"http://iosfonts.com\">iosfonts.com</a> for a list of the fonts that are available in iOS and iPadOS.",
"!scriptable.parameters": [
{
"!scriptable.name": "name",
"!scriptable.description": "Name of the font."
},
{
"!scriptable.name": "size",
"!scriptable.description": "Size of the font."
}
],
"largeTitle": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#largetitle",
"!doc": "Preferred font for large titles."
},
"title1": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#title1",
"!doc": "Preferred font for first level hierarchical headings."
},
"title2": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#title2",
"!doc": "Preferred font for second level hierarchical headings."
},
"title3": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#title3",
"!doc": "Preferred font for third level hierarchical headings."
},
"headline": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#headline",
"!doc": "Preferred font for headings."
},
"subheadline": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#subheadline",
"!doc": "Preferred font for subheadings."
},
"body": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#body",
"!doc": "Preferred font for body texts."
},
"callout": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#callout",
"!doc": "Preferred font for callouts."
},
"footnote": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#footnote",
"!doc": "Preferred font for footnotes."
},
"caption1": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#caption1",
"!doc": "Preferred font for standard captions."
},
"caption2": {
"!type": "fn() -> +Font",
"!url": "https://docs.scriptable.app/font/#caption2",
"!doc": "Preferred font for alternate captions."
},
"systemFont": {
"!type": "fn(size: number) -> +Font",
"!url": "https://docs.scriptable.app/font/#systemfont",
"!doc": "Creates a system font.",
"!scriptable.parameters": [
{
"!scriptable.name": "size",
"!scriptable.description": "Size of the text."
}
]
},
"ultraLightSystemFont": {
"!type": "fn(size: number) -> +Font",
"!url": "https://docs.scriptable.app/font/#ultralightsystemfont",
"!doc": "Creates an ultra light system font.",
"!scriptable.parameters": [
{
"!scriptable.name": "size",
"!scriptable.description": "Size of the text."
}
]
},
"thinSystemFont": {
"!type": "fn(size: number) -> +Font",
"!url": "https://docs.scriptable.app/font/#thinsystemfont",
"!doc": "Creates a thin system font.",
"!scriptable.parameters": [
{
"!scriptable.name": "size",
"!scriptable.description": "Size of the text."
}
]
},
"lightSystemFont": {
"!type": "fn(size: number) -> +Font",
"!url": "https://docs.scriptable.app/font/#lightsystemfont",
"!doc": "Creates a light system font.",
"!scriptable.parameters": [
{
"!scriptable.name": "size",
"!scriptable.description": "Size of the text."
}
]
},
"regularSystemFont": {
"!type": "fn(size: number) -> +Font",
"!url": "https://docs.scriptable.app/font/#regularsystemfont",
"!doc": "Creates a regular system font.",
"!scriptable.parameters": [
{
"!scriptable.name": "size",
"!scriptable.description": "Size of the text."
}
]
},
"mediumSystemFont": {
"!type": "fn(size: number) -> +Font",
"!url": "https://docs.scriptable.app/font/#mediumsystemfont",
"!doc": "Creates a medium system font.",
"!scriptable.parameters": [
{
"!scriptable.name": "size",
"!scriptable.description": "Size of the text."
}
]
},
"semiboldSystemFont": {
"!type": "fn(size: number) -> +Font",
"!url": "https://docs.scriptable.app/font/#semiboldsystemfont",
"!doc": "Creates a semibold system font.",
"!scriptable.parameters": [
{
"!scriptable.name": "size",
"!scriptable.description": "Size of the text."
}
]
},
"boldSystemFont": {
"!type": "fn(size: number) -> +Font",
"!url": "https://docs.scriptable.app/font/#boldsystemfont",
"!doc": "Creates a bold system font.",