@cloudcannon/configuration-types 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1292 @@
1
+ import type { Documentation } from './documentation';
2
+ import type { BlockEditable } from './editables';
3
+ import type { Icon } from './icon';
4
+ import type { ImageResizeable } from './image-resizeable';
5
+ import type { WithPaths } from './paths';
6
+ import type { WithPickerPreview, WithPreview } from './preview';
7
+ import type { SelectValues } from './select-values';
8
+ import type { SourceEditor } from './source-editor';
9
+ import type { Structure } from './structures';
10
+ import type { Timezone } from './timezone';
11
+
12
+ export type InstanceValue = 'UUID' | 'NOW';
13
+
14
+ export type InputType =
15
+ | 'text'
16
+ | 'textarea'
17
+ | 'email'
18
+ | 'disabled'
19
+ | 'pinterest'
20
+ | 'facebook'
21
+ | 'twitter'
22
+ | 'github'
23
+ | 'instagram'
24
+ | 'code'
25
+ | 'checkbox'
26
+ | 'switch'
27
+ | 'color'
28
+ | 'number'
29
+ | 'range'
30
+ | 'url'
31
+ | 'html'
32
+ | 'markdown'
33
+ | 'date'
34
+ | 'datetime'
35
+ | 'time'
36
+ | 'file'
37
+ | 'image'
38
+ | 'document'
39
+ | 'select'
40
+ | 'multiselect'
41
+ | 'choice'
42
+ | 'multichoice'
43
+ | 'object'
44
+ | 'array'
45
+ | 'auto';
46
+
47
+ interface WithEmptyTypeText {
48
+ /**
49
+ * Set how an ‘empty’ value will be saved. Does not apply to existing empty values.
50
+ */
51
+ empty_type?: 'null' | 'string';
52
+ }
53
+
54
+ interface WithEmptyTypeNumber {
55
+ /**
56
+ * Set how an ‘empty’ value will be saved. Does not apply to existing empty values.
57
+ */
58
+ empty_type?: 'null' | 'number';
59
+ }
60
+
61
+ interface WithEmptyTypeObject {
62
+ /**
63
+ * Set how an ‘empty’ value will be saved. Does not apply to existing empty values.
64
+ */
65
+ empty_type?: 'null' | 'object';
66
+ }
67
+
68
+ interface WithEmptyTypeArray {
69
+ /**
70
+ * Set how an ‘empty’ value will be saved. Does not apply to existing empty values.
71
+ */
72
+ empty_type?: 'null' | 'array';
73
+ }
74
+
75
+ export interface BaseInput {
76
+ /**
77
+ * Changes the subtext below the _Label_. Has no default. Supports a limited set of Markdown:
78
+ * links, bold, italic, subscript, superscript, and inline code elements are allowed.
79
+ */
80
+ comment?: string;
81
+ /**
82
+ * Adds an expandable section of rich text below the input.
83
+ */
84
+ context?: {
85
+ /**
86
+ * The rich text content shown when opened. Supports a limited set of Markdown.
87
+ */
88
+ content?: string;
89
+ /**
90
+ * Makes the content visible initially.
91
+ */
92
+ open?: boolean;
93
+ /**
94
+ * The text shown when not open. Defaults to "Context" if unset.
95
+ */
96
+ title?: string;
97
+ /**
98
+ * The icon shown when not open.
99
+ */
100
+ icon?: Icon;
101
+ };
102
+ /**
103
+ * Provides a custom link for documentation for editors shown above input.
104
+ */
105
+ documentation?: Documentation;
106
+ /**
107
+ * Optionally changes the text above this input.
108
+ */
109
+ label?: string;
110
+ /**
111
+ * Toggles the visibility of this input.
112
+ *
113
+ * @default false
114
+ */
115
+ hidden?: boolean | string;
116
+ /**
117
+ * Toggles if this input can be edited.
118
+ *
119
+ * @default false
120
+ */
121
+ disabled?: boolean | string;
122
+ /**
123
+ * Controls if and how the value of this input is instantiated when created. This occurs when
124
+ * creating files, or adding array items containing the configured input.
125
+ */
126
+ instance_value?: InstanceValue;
127
+ /**
128
+ * Prevents the default where inputs configured with an `instance_value` are rehydrated with a new
129
+ * value when duplicated in the CMS.
130
+ *
131
+ * @default false
132
+ */
133
+ disable_instance_value_rehydration?: boolean;
134
+ /**
135
+ * Specifies whether or not this input configuration should be merged with any matching, less
136
+ * specific configuration.
137
+ */
138
+ cascade?: boolean;
139
+ }
140
+
141
+ export interface TextInputOptions extends WithEmptyTypeText {
142
+ /**
143
+ * Text shown when this input has no value.
144
+ */
145
+ placeholder?: string;
146
+ /**
147
+ * Icon shown beside the input.
148
+ */
149
+ icon?: Icon;
150
+ }
151
+
152
+ export interface TextInput extends BaseInput {
153
+ /**
154
+ * Sets an input type, which controls how this input appears and behaves.
155
+ */
156
+ type:
157
+ | 'text'
158
+ | 'email'
159
+ | 'disabled'
160
+ | 'pinterest'
161
+ | 'facebook'
162
+ | 'twitter'
163
+ | 'github'
164
+ | 'instagram';
165
+
166
+ /**
167
+ * Options that are specific to this `type` of input.
168
+ */
169
+ options?: TextInputOptions;
170
+ }
171
+
172
+ export interface TextareaInputOptions extends TextInputOptions {
173
+ /**
174
+ * Shows a character counter below the input if enabled.
175
+ *
176
+ * @default false
177
+ */
178
+ show_count?: boolean;
179
+ }
180
+
181
+ export interface TextareaInput extends BaseInput {
182
+ /**
183
+ * Sets an input type, which controls how this input appears and behaves.
184
+ */
185
+ type: 'textarea';
186
+ /**
187
+ * Options that are specific to this `type` of input.
188
+ */
189
+ options?: TextareaInputOptions;
190
+ }
191
+
192
+ export interface CodeInputOptions extends WithEmptyTypeText, SourceEditor {
193
+ /**
194
+ * Sets the maximum number of visible lines for this input, effectively controlling maximum
195
+ * height. When the containing text exceeds this number, the input becomes a scroll area.
196
+ *
197
+ * @default 30
198
+ */
199
+ max_visible_lines?: number;
200
+ /**
201
+ * Sets the minimum number of visible lines for this input, effectively controlling initial
202
+ * height. When the containing text exceeds this number, the input grows line by line to the lines
203
+ * defined by `max_visible_lines`.
204
+ *
205
+ * @default 10
206
+ */
207
+ min_visible_lines?: number;
208
+ /**
209
+ * Changes how the editor parses your content for syntax highlighting. Should be set to the
210
+ * language of the code going into the input.
211
+ */
212
+ syntax?: Syntax;
213
+ }
214
+
215
+ export interface CodeInput extends BaseInput {
216
+ /**
217
+ * Sets an input type, which controls how this input appears and behaves.
218
+ */
219
+ type: 'code';
220
+ /**
221
+ * Options that are specific to this `type` of input.
222
+ */
223
+ options?: CodeInputOptions;
224
+ }
225
+
226
+ export interface ColorInputOptions extends WithEmptyTypeText {
227
+ /**
228
+ * Sets what format the color value is saved as. Defaults to the naming convention, or HEX if that
229
+ * is unset.
230
+ */
231
+ format?: 'rgb' | 'hex' | 'hsl' | 'hsv';
232
+ /**
233
+ * Toggles showing a control for adjusting the transparency of the selected color. Defaults to
234
+ * using the naming convention, enabled if the input key ends with "a".
235
+ */
236
+ alpha?: boolean;
237
+ }
238
+
239
+ export interface ColorInput extends BaseInput {
240
+ /**
241
+ * Sets an input type, which controls how this input appears and behaves.
242
+ */
243
+ type: 'color';
244
+ /**
245
+ * Options that are specific to this `type` of input.
246
+ */
247
+ options?: ColorInputOptions;
248
+ }
249
+
250
+ export interface BooleanInput extends Omit<BaseInput, 'options'> {
251
+ /**
252
+ * Sets an input type, which controls how this input appears and behaves.
253
+ */
254
+ type: 'checkbox' | 'switch';
255
+ }
256
+
257
+ export interface NumberInputOptions extends WithEmptyTypeNumber {
258
+ /**
259
+ * The lowest value in the range of permitted values.
260
+ */
261
+ min?: number;
262
+ /**
263
+ * The greatest value in the range of permitted values.
264
+ */
265
+ max?: number;
266
+ /**
267
+ * A number that specifies the granularity that the value must adhere to, or the special value
268
+ * any, which allows any decimal value between `max` and `min`.
269
+ */
270
+ step?: number;
271
+ }
272
+
273
+ export interface NumberInput extends BaseInput {
274
+ /**
275
+ * Sets an input type, which controls how this input appears and behaves.
276
+ */
277
+ type: 'number';
278
+ /**
279
+ * Options that are specific to this `type` of input.
280
+ */
281
+ options?: NumberInputOptions;
282
+ }
283
+
284
+ export interface RangeInputOptions extends NumberInputOptions {
285
+ /**
286
+ * The lowest value in the range of permitted values.
287
+ *
288
+ * @default 0
289
+ */
290
+ min?: number;
291
+ /**
292
+ * The greatest value in the range of permitted values.
293
+ *
294
+ * @default 10
295
+ */
296
+ max?: number;
297
+ /**
298
+ * A number that specifies the granularity that the value must adhere to, or the special value
299
+ * any, which allows any decimal value between `max` and `min`.
300
+ *
301
+ * @default 1
302
+ */
303
+ step?: number;
304
+ }
305
+
306
+ export interface RangeInput extends BaseInput {
307
+ /**
308
+ * Sets an input type, which controls how this input appears and behaves.
309
+ */
310
+ type: 'range';
311
+ /**
312
+ * Options that are specific to this `type` of input.
313
+ */
314
+ options?: RangeInputOptions;
315
+ }
316
+
317
+ export interface UrlInputOptions extends WithEmptyTypeText, WithPaths {
318
+ /**
319
+ * Hides the option to link to a file. This does not prevent typing a file path in the input.
320
+ *
321
+ * @default false
322
+ */
323
+ hide_link_to_file?: boolean;
324
+ /**
325
+ * Hides the option to link to a page. This does not prevent typing a file's output URL in the
326
+ * input.
327
+ *
328
+ * @default false
329
+ */
330
+ hide_link_to_page?: boolean;
331
+ /**
332
+ * Hides the option to link to an email address. This does not prevent typing a `mailto:` link in
333
+ * the input.
334
+ *
335
+ * @default false
336
+ */
337
+ hide_link_to_email_address?: boolean;
338
+ }
339
+
340
+ export interface UrlInput extends BaseInput {
341
+ /**
342
+ * Sets an input type, which controls how this input appears and behaves.
343
+ */
344
+ type: 'url';
345
+ /**
346
+ * Options that are specific to this `type` of input.
347
+ */
348
+ options?: UrlInputOptions;
349
+ }
350
+
351
+ export interface RichTextInputOptions extends WithEmptyTypeText, ImageResizeable, BlockEditable {
352
+ /**
353
+ * Shows or hides the resize handler to vertically resize the input.
354
+ *
355
+ * @default false
356
+ */
357
+ allow_resize?: boolean;
358
+ /**
359
+ * Defines the initial height of this input in pixels (px).
360
+ *
361
+ * @default 320
362
+ */
363
+ initial_height?: number;
364
+ }
365
+
366
+ export interface RichTextInput extends BaseInput {
367
+ /**
368
+ * Sets an input type, which controls how this input appears and behaves.
369
+ */
370
+ type: 'html' | 'markdown';
371
+ /**
372
+ * Options that are specific to this `type` of input.
373
+ */
374
+ options?: RichTextInputOptions;
375
+ }
376
+
377
+ export interface DateInputOptions extends WithEmptyTypeText {
378
+ /**
379
+ * Specifies the time zone that dates are displayed and edited in. Also changes the suffix the
380
+ * date is persisted to the file with. Defaults to the global `timezone`.
381
+ *
382
+ * @default Etc/UTC
383
+ */
384
+ timezone?: Timezone;
385
+ }
386
+
387
+ export interface DateInput extends BaseInput {
388
+ /**
389
+ * Sets an input type, which controls how this input appears and behaves.
390
+ */
391
+ type: 'date' | 'datetime';
392
+ /**
393
+ * Options that are specific to Date inputs.
394
+ */
395
+ options?: DateInputOptions;
396
+ }
397
+
398
+ export interface TimeInput extends BaseInput {
399
+ /**
400
+ * Sets an input type, which controls how this input appears and behaves.
401
+ */
402
+ type: 'time';
403
+ /**
404
+ * Options that are specific to Time inputs.
405
+ */
406
+ options?: WithEmptyTypeText;
407
+ }
408
+
409
+ export interface FileInputOptions extends WithEmptyTypeText, WithPaths {
410
+ /**
411
+ * Restricts which file types are available to select or upload to this input. Accepted format is
412
+ * an array or comma-separated string of MIME types. The special value '*' means any type is
413
+ * accepted.
414
+ */
415
+ accepts_mime_types?: MimeType[] | string;
416
+ /**
417
+ * If you have one or more DAMs connected to your site, you can use this key to list which asset
418
+ * sources can be uploaded to and selected from.
419
+ */
420
+ allowed_sources?: string[];
421
+ }
422
+
423
+ export interface FileInput extends BaseInput {
424
+ /**
425
+ * Sets an input type, which controls how this input appears and behaves.
426
+ */
427
+ type: 'file' | 'document';
428
+ /**
429
+ * Options that are specific to File inputs.
430
+ */
431
+ options?: FileInputOptions;
432
+ }
433
+
434
+ export type ImageInputOptions = FileInputOptions & ImageResizeable;
435
+
436
+ export interface ImageInput extends BaseInput {
437
+ /**
438
+ * Sets an input type, which controls how this input appears and behaves.
439
+ */
440
+ type: 'image';
441
+ /**
442
+ * Options that are specific to Image inputs.
443
+ */
444
+ options?: ImageInputOptions;
445
+ }
446
+
447
+ export interface SelectInputOptions extends WithPreview, WithPickerPreview {
448
+ /**
449
+ * Allows new text values to be created at edit time.
450
+ *
451
+ * @default false
452
+ */
453
+ allow_create?: boolean;
454
+ /**
455
+ * Provides an empty option alongside the options provided by values.
456
+ *
457
+ * @default true
458
+ */
459
+ allow_empty?: boolean;
460
+ /**
461
+ * Defines the values available to choose from. Optional, defaults to fetching values from the
462
+ * naming convention (e.g. colors or my_colors for data set colors).
463
+ */
464
+ values?: string | SelectValues;
465
+ /**
466
+ * Defines the key used for mapping between saved values and objects in values. This changes how
467
+ * the input saves selected values to match. Defaults to checking for "id", "uuid", "path",
468
+ * "title", then "name". Has no effect unless values is an array of objects, the key is used
469
+ * instead for objects, and the value itself is used for primitive types.
470
+ */
471
+ value_key?: string;
472
+ /**
473
+ * Controls how selected items are rendered.
474
+ */
475
+ view?: 'card' | 'text' | 'gallery' | 'gallery-left';
476
+ /**
477
+ * Controls how selectable options are rendered.
478
+ */
479
+ picker_view?: 'card' | 'text' | 'gallery' | 'gallery-left';
480
+ }
481
+
482
+ export interface SelectInput extends BaseInput {
483
+ /**
484
+ * Sets an input type, which controls how this input appears and behaves.
485
+ */
486
+ type: 'select';
487
+ /**
488
+ * Options that are specific to this `type` of input.
489
+ */
490
+ options?: SelectInputOptions & WithEmptyTypeText;
491
+ }
492
+
493
+ export interface MultiselectInput extends BaseInput {
494
+ /**
495
+ * Sets an input type, which controls how this input appears and behaves.
496
+ */
497
+ type: 'multiselect';
498
+ /**
499
+ * Options that are specific to this `type` of input.
500
+ */
501
+ options?: SelectInputOptions & WithEmptyTypeArray;
502
+ }
503
+
504
+ export interface ChoiceInputOptions extends Omit<SelectInputOptions, 'allow_create'> {}
505
+
506
+ export interface ChoiceInput extends BaseInput {
507
+ /**
508
+ * Sets an input type, which controls how this input appears and behaves.
509
+ */
510
+ type: 'choice';
511
+ /**
512
+ * Options that are specific to this `type` of input.
513
+ */
514
+ options?: ChoiceInputOptions & WithEmptyTypeText;
515
+ }
516
+
517
+ export interface MultichoiceInput extends BaseInput {
518
+ /**
519
+ * Sets an input type, which controls how this input appears and behaves.
520
+ */
521
+ type: 'multichoice';
522
+ /**
523
+ * Options that are specific to this `type` of input.
524
+ */
525
+ options?: ChoiceInputOptions & WithEmptyTypeArray;
526
+ }
527
+
528
+ export interface ObjectInputGroup {
529
+ /**
530
+ * The main text for the group shown when collapsed or expanded.
531
+ */
532
+ heading?: string;
533
+ /**
534
+ * Changes the subtext below the `heading`. Has no default. Supports a limited set of Markdown:
535
+ * links, bold, italic, subscript, superscript, and inline code elements are allowed.
536
+ */
537
+ comment?: string;
538
+ /**
539
+ * Controls if this group is collapsed or expanded when first viewed.
540
+ *
541
+ * @default false
542
+ */
543
+ collapsed?: boolean;
544
+ /**
545
+ * The keys of each input in this group.
546
+ */
547
+ inputs?: string[];
548
+ /**
549
+ * Provides a custom link for documentation for editors shown above the collection file list.
550
+ */
551
+ documentation?: Documentation;
552
+ }
553
+
554
+ export interface ObjectInputOptions extends WithEmptyTypeObject, WithPreview {
555
+ /**
556
+ * Changes the appearance and behavior of the input.
557
+ *
558
+ * @default object
559
+ */
560
+ subtype?: 'object' | 'mutable' | 'tabbed';
561
+ /**
562
+ * Contains options for the "mutable" subtype.
563
+ */
564
+ entries?: {
565
+ /**
566
+ * Defines a limited set of keys that can exist on the data within an object input. This set is
567
+ * used when entries are added and renamed with `allow_create` enabled. Has no effect if
568
+ * `allow_create` is not enabled.
569
+ */
570
+ allowed_keys?: string[];
571
+ /**
572
+ * Limits available structures to specified keys.
573
+ */
574
+ assigned_structures?: Record<string, string[]>;
575
+ /**
576
+ * Provides data formats when adding entries to the data within this object input. When adding
577
+ * an entry, team members are prompted to choose from a number of values you have defined. Has
578
+ * no effect if `allow_create` is false. `entries.structures` applies to the entries within the
579
+ * object.
580
+ */
581
+ structures?: string | Structure;
582
+ };
583
+ /**
584
+ * Provides data formats for value of this object. When choosing an item, team members are
585
+ * prompted to choose from a number of values you have defined. `structures` applies to the object
586
+ * itself.
587
+ */
588
+ structures?: string | Structure;
589
+ /**
590
+ * Allows you to group the inputs inside this object together without changing the data structure.
591
+ */
592
+ groups?: ObjectInputGroup[];
593
+ /**
594
+ * Controls which order input groups and ungrouped inputs appear in.
595
+ *
596
+ * @default false
597
+ */
598
+ place_groups_below?: boolean;
599
+ /**
600
+ * Controls whether or not labels on mutable object entries are formatted.
601
+ *
602
+ * @default false
603
+ */
604
+ allow_label_formatting?: boolean;
605
+ /**
606
+ * Controls how object previews are rendered.
607
+ */
608
+ view?: 'card' | 'gallery' | 'gallery-left';
609
+ }
610
+
611
+ export interface ObjectInput extends BaseInput {
612
+ /**
613
+ * Sets an input type, which controls how this input appears and behaves.
614
+ */
615
+ type: 'object';
616
+ /**
617
+ * Options that are specific to this `type` of input.
618
+ */
619
+ options?: ObjectInputOptions;
620
+ }
621
+
622
+ export interface ArrayInputOptions extends WithEmptyTypeArray {
623
+ /**
624
+ * Provides data formats for value of this object. When choosing an item, team members are
625
+ * prompted to choose from a number of values you have defined.
626
+ */
627
+ structures?: string | Structure;
628
+ }
629
+
630
+ export interface ArrayInput extends BaseInput {
631
+ /**
632
+ * Sets an input type, which controls how this input appears and behaves.
633
+ */
634
+ type: 'array';
635
+ /**
636
+ * Options that are specific to this `type` of input.
637
+ */
638
+ options?: ArrayInputOptions;
639
+ }
640
+
641
+ export interface AutoInput extends BaseInput {
642
+ /**
643
+ * Sets an input type, which controls how this input appears and behaves.
644
+ */
645
+ type: 'auto';
646
+ /**
647
+ * Options that are specific to this `type` of input.
648
+ */
649
+ options?: unknown;
650
+ }
651
+
652
+ export interface UnknownInput extends BaseInput {
653
+ /**
654
+ * Options that are specific to this `type` of input.
655
+ */
656
+ options?: unknown;
657
+ }
658
+
659
+ /**
660
+ * @discriminator type
661
+ */
662
+ export type KnownInput =
663
+ | TextInput
664
+ | TextareaInput
665
+ | CodeInput
666
+ | ColorInput
667
+ | BooleanInput
668
+ | NumberInput
669
+ | RangeInput
670
+ | UrlInput
671
+ | RichTextInput
672
+ | DateInput
673
+ | TimeInput
674
+ | FileInput
675
+ | ImageInput
676
+ | SelectInput
677
+ | MultiselectInput
678
+ | ChoiceInput
679
+ | MultichoiceInput
680
+ | ObjectInput
681
+ | ArrayInput
682
+ | AutoInput;
683
+
684
+ export type Input = KnownInput | UnknownInput;
685
+
686
+ export type Syntax =
687
+ | 'abap'
688
+ | 'abc'
689
+ | 'actionscript'
690
+ | 'ada'
691
+ | 'alda'
692
+ | 'apache_conf'
693
+ | 'apex'
694
+ | 'applescript'
695
+ | 'aql'
696
+ | 'asciidoc'
697
+ | 'asl'
698
+ | 'assembly_x86'
699
+ | 'autohotkey'
700
+ | 'batchfile'
701
+ | 'c9search'
702
+ | 'c_cpp'
703
+ | 'cirru'
704
+ | 'clojure'
705
+ | 'cobol'
706
+ | 'coffee'
707
+ | 'coldfusion'
708
+ | 'crystal'
709
+ | 'csharp'
710
+ | 'csound_document'
711
+ | 'csound_orchestra'
712
+ | 'csound_score'
713
+ | 'csp'
714
+ | 'css'
715
+ | 'curly'
716
+ | 'd'
717
+ | 'dart'
718
+ | 'diff'
719
+ | 'django'
720
+ | 'dockerfile'
721
+ | 'dot'
722
+ | 'drools'
723
+ | 'edifact'
724
+ | 'eiffel'
725
+ | 'ejs'
726
+ | 'elixir'
727
+ | 'elm'
728
+ | 'erlang'
729
+ | 'forth'
730
+ | 'fortran'
731
+ | 'fsharp'
732
+ | 'fsl'
733
+ | 'ftl'
734
+ | 'gcode'
735
+ | 'gherkin'
736
+ | 'gitignore'
737
+ | 'glsl'
738
+ | 'gobstones'
739
+ | 'golang'
740
+ | 'graphqlschema'
741
+ | 'groovy'
742
+ | 'haml'
743
+ | 'handlebars'
744
+ | 'haskell'
745
+ | 'haskell_cabal'
746
+ | 'haxe'
747
+ | 'hjson'
748
+ | 'html'
749
+ | 'html_elixir'
750
+ | 'html_ruby'
751
+ | 'ini'
752
+ | 'io'
753
+ | 'jack'
754
+ | 'jade'
755
+ | 'java'
756
+ | 'javascript'
757
+ | 'json5'
758
+ | 'json'
759
+ | 'jsoniq'
760
+ | 'jsp'
761
+ | 'jssm'
762
+ | 'jsx'
763
+ | 'julia'
764
+ | 'kotlin'
765
+ | 'latex'
766
+ | 'less'
767
+ | 'liquid'
768
+ | 'lisp'
769
+ | 'livescript'
770
+ | 'logiql'
771
+ | 'logtalk'
772
+ | 'lsl'
773
+ | 'lua'
774
+ | 'luapage'
775
+ | 'lucene'
776
+ | 'makefile'
777
+ | 'markdown'
778
+ | 'mask'
779
+ | 'matlab'
780
+ | 'maze'
781
+ | 'mediawiki'
782
+ | 'mel'
783
+ | 'mixal'
784
+ | 'mushcode'
785
+ | 'mysql'
786
+ | 'nginx'
787
+ | 'nim'
788
+ | 'nix'
789
+ | 'nsis'
790
+ | 'nunjucks'
791
+ | 'objectivec'
792
+ | 'ocaml'
793
+ | 'pascal'
794
+ | 'perl6'
795
+ | 'perl'
796
+ | 'pgsql'
797
+ | 'php'
798
+ | 'php_laravel_blade'
799
+ | 'pig'
800
+ | 'plain_text'
801
+ | 'powershell'
802
+ | 'praat'
803
+ | 'prisma'
804
+ | 'prolog'
805
+ | 'properties'
806
+ | 'protobuf'
807
+ | 'puppet'
808
+ | 'python'
809
+ | 'qml'
810
+ | 'r'
811
+ | 'razor'
812
+ | 'rdoc'
813
+ | 'red'
814
+ | 'redshift'
815
+ | 'rhtml'
816
+ | 'rst'
817
+ | 'ruby'
818
+ | 'rust'
819
+ | 'sass'
820
+ | 'scad'
821
+ | 'scala'
822
+ | 'scheme'
823
+ | 'scss'
824
+ | 'sh'
825
+ | 'sjs'
826
+ | 'slim'
827
+ | 'smarty'
828
+ | 'snippets'
829
+ | 'soy_template'
830
+ | 'space'
831
+ | 'sparql'
832
+ | 'sql'
833
+ | 'sqlserver'
834
+ | 'stylus'
835
+ | 'svg'
836
+ | 'swift'
837
+ | 'tcl'
838
+ | 'terraform'
839
+ | 'tex'
840
+ | 'text'
841
+ | 'textile'
842
+ | 'toml'
843
+ | 'tsx'
844
+ | 'turtle'
845
+ | 'twig'
846
+ | 'export typescript'
847
+ | 'vala'
848
+ | 'vbscript'
849
+ | 'velocity'
850
+ | 'verilog'
851
+ | 'vhdl'
852
+ | 'visualforce'
853
+ | 'wollok'
854
+ | 'xml'
855
+ | 'xquery'
856
+ | 'yaml'
857
+ | 'zeek';
858
+
859
+ export type MimeType =
860
+ | 'x-world/x-3dmf'
861
+ | 'application/x-authorware-bin'
862
+ | 'application/x-authorware-map'
863
+ | 'application/x-authorware-seg'
864
+ | 'text/vnd.abc'
865
+ | 'video/animaflex'
866
+ | 'application/postscript'
867
+ | 'audio/aiff'
868
+ | 'audio/x-aiff'
869
+ | 'application/x-aim'
870
+ | 'text/x-audiosoft-intra'
871
+ | 'application/x-navi-animation'
872
+ | 'application/x-nokia-9000-communicator-add-on-software'
873
+ | 'application/mime'
874
+ | 'application/arj'
875
+ | 'image/x-jg'
876
+ | 'video/x-ms-asf'
877
+ | 'text/x-asm'
878
+ | 'text/asp'
879
+ | 'application/x-mplayer2'
880
+ | 'video/x-ms-asf-plugin'
881
+ | 'audio/basic'
882
+ | 'audio/x-au'
883
+ | 'application/x-troff-msvideo'
884
+ | 'video/avi'
885
+ | 'video/msvideo'
886
+ | 'video/x-msvideo'
887
+ | 'video/avs-video'
888
+ | 'application/x-bcpio'
889
+ | 'application/mac-binary'
890
+ | 'application/macbinary'
891
+ | 'application/x-binary'
892
+ | 'application/x-macbinary'
893
+ | 'image/bmp'
894
+ | 'image/x-windows-bmp'
895
+ | 'application/book'
896
+ | 'application/x-bsh'
897
+ | 'application/x-bzip'
898
+ | 'application/x-bzip2'
899
+ | 'text/plain'
900
+ | 'text/x-c'
901
+ | 'application/vnd.ms-pki.seccat'
902
+ | 'application/clariscad'
903
+ | 'application/x-cocoa'
904
+ | 'application/cdf'
905
+ | 'application/x-cdf'
906
+ | 'application/x-netcdf'
907
+ | 'application/pkix-cert'
908
+ | 'application/x-x509-ca-cert'
909
+ | 'application/x-chat'
910
+ | 'application/java'
911
+ | 'application/java-byte-code'
912
+ | 'application/x-java-class'
913
+ | 'application/x-cpio'
914
+ | 'application/mac-compactpro'
915
+ | 'application/x-compactpro'
916
+ | 'application/x-cpt'
917
+ | 'application/pkcs-crl'
918
+ | 'application/pkix-crl'
919
+ | 'application/x-x509-user-cert'
920
+ | 'application/x-csh'
921
+ | 'text/x-script.csh'
922
+ | 'application/x-pointplus'
923
+ | 'text/css'
924
+ | 'text/csv'
925
+ | 'application/x-director'
926
+ | 'application/x-deepv'
927
+ | 'video/x-dv'
928
+ | 'video/dl'
929
+ | 'video/x-dl'
930
+ | 'application/msword'
931
+ | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
932
+ | 'application/commonground'
933
+ | 'application/drafting'
934
+ | 'application/x-dvi'
935
+ | 'drawing/x-dwf (old)'
936
+ | 'model/vnd.dwf'
937
+ | 'application/acad'
938
+ | 'image/vnd.dwg'
939
+ | 'image/x-dwg'
940
+ | 'application/dxf'
941
+ | 'text/x-script.elisp'
942
+ | 'application/x-bytecode.elisp (compiled elisp)'
943
+ | 'application/x-elc'
944
+ | 'application/x-envoy'
945
+ | 'application/x-esrehber'
946
+ | 'text/x-setext'
947
+ | 'application/envoy'
948
+ | 'text/x-fortran'
949
+ | 'application/vnd.fdf'
950
+ | 'application/fractals'
951
+ | 'image/fif'
952
+ | 'video/fli'
953
+ | 'video/x-fli'
954
+ | 'image/florian'
955
+ | 'text/vnd.fmi.flexstor'
956
+ | 'video/x-atomic3d-feature'
957
+ | 'image/vnd.fpx'
958
+ | 'image/vnd.net-fpx'
959
+ | 'application/freeloader'
960
+ | 'audio/make'
961
+ | 'image/g3fax'
962
+ | 'image/gif'
963
+ | 'video/gl'
964
+ | 'video/x-gl'
965
+ | 'audio/x-gsm'
966
+ | 'application/x-gsp'
967
+ | 'application/x-gss'
968
+ | 'application/x-gtar'
969
+ | 'application/x-compressed'
970
+ | 'application/x-gzip'
971
+ | 'multipart/x-gzip'
972
+ | 'text/x-h'
973
+ | 'application/x-hdf'
974
+ | 'application/x-helpfile'
975
+ | 'application/vnd.hp-hpgl'
976
+ | 'text/x-script'
977
+ | 'application/hlp'
978
+ | 'application/x-winhelp'
979
+ | 'application/binhex'
980
+ | 'application/binhex4'
981
+ | 'application/mac-binhex'
982
+ | 'application/mac-binhex40'
983
+ | 'application/x-binhex40'
984
+ | 'application/x-mac-binhex40'
985
+ | 'application/hta'
986
+ | 'text/x-component'
987
+ | 'text/html'
988
+ | 'text/webviewhtml'
989
+ | 'x-conference/x-cooltalk'
990
+ | 'image/x-icon'
991
+ | 'image/ief'
992
+ | 'application/iges'
993
+ | 'model/iges'
994
+ | 'application/x-ima'
995
+ | 'application/x-httpd-imap'
996
+ | 'application/inf'
997
+ | 'application/x-internett-signup'
998
+ | 'application/x-ip2'
999
+ | 'video/x-isvideo'
1000
+ | 'audio/it'
1001
+ | 'application/x-inventor'
1002
+ | 'i-world/i-vrml'
1003
+ | 'application/x-livescreen'
1004
+ | 'audio/x-jam'
1005
+ | 'text/x-java-source'
1006
+ | 'application/x-java-commerce'
1007
+ | 'image/jpeg'
1008
+ | 'image/pjpeg'
1009
+ | 'image/x-jps'
1010
+ | 'application/x-javascript'
1011
+ | 'application/javascript'
1012
+ | 'application/ecmascript'
1013
+ | 'text/javascript'
1014
+ | 'text/ecmascript'
1015
+ | 'application/json'
1016
+ | 'image/jutvision'
1017
+ | 'music/x-karaoke'
1018
+ | 'application/x-ksh'
1019
+ | 'text/x-script.ksh'
1020
+ | 'audio/nspaudio'
1021
+ | 'audio/x-nspaudio'
1022
+ | 'audio/x-liveaudio'
1023
+ | 'application/x-latex'
1024
+ | 'application/lha'
1025
+ | 'application/x-lha'
1026
+ | 'application/x-lisp'
1027
+ | 'text/x-script.lisp'
1028
+ | 'text/x-la-asf'
1029
+ | 'application/x-lzh'
1030
+ | 'application/lzx'
1031
+ | 'application/x-lzx'
1032
+ | 'text/x-m'
1033
+ | 'audio/mpeg'
1034
+ | 'audio/x-mpequrl'
1035
+ | 'audio/m4a'
1036
+ | 'audio/x-m4a'
1037
+ | 'application/x-troff-man'
1038
+ | 'application/x-navimap'
1039
+ | 'application/mbedlet'
1040
+ | 'application/x-magic-cap-package-1.0'
1041
+ | 'application/mcad'
1042
+ | 'application/x-mathcad'
1043
+ | 'image/vasa'
1044
+ | 'text/mcf'
1045
+ | 'application/netmc'
1046
+ | 'text/markdown'
1047
+ | 'application/x-troff-me'
1048
+ | 'message/rfc822'
1049
+ | 'application/x-midi'
1050
+ | 'audio/midi'
1051
+ | 'audio/x-mid'
1052
+ | 'audio/x-midi'
1053
+ | 'music/crescendo'
1054
+ | 'x-music/x-midi'
1055
+ | 'application/x-frame'
1056
+ | 'application/x-mif'
1057
+ | 'www/mime'
1058
+ | 'audio/x-vnd.audioexplosion.mjuicemediafile'
1059
+ | 'video/x-motion-jpeg'
1060
+ | 'application/base64'
1061
+ | 'application/x-meme'
1062
+ | 'audio/mod'
1063
+ | 'audio/x-mod'
1064
+ | 'video/quicktime'
1065
+ | 'video/x-sgi-movie'
1066
+ | 'audio/x-mpeg'
1067
+ | 'video/x-mpeg'
1068
+ | 'video/x-mpeq2a'
1069
+ | 'audio/mpeg3'
1070
+ | 'audio/x-mpeg-3'
1071
+ | 'video/mp4'
1072
+ | 'application/x-project'
1073
+ | 'video/mpeg'
1074
+ | 'application/vnd.ms-project'
1075
+ | 'application/marc'
1076
+ | 'application/x-troff-ms'
1077
+ | 'application/x-vnd.audioexplosion.mzz'
1078
+ | 'image/naplps'
1079
+ | 'application/vnd.nokia.configuration-message'
1080
+ | 'image/x-niff'
1081
+ | 'application/x-mix-transfer'
1082
+ | 'application/x-conference'
1083
+ | 'application/x-navidoc'
1084
+ | 'application/octet-stream'
1085
+ | 'application/oda'
1086
+ | 'audio/ogg'
1087
+ | 'application/ogg'
1088
+ | 'video/ogg'
1089
+ | 'application/x-omc'
1090
+ | 'application/x-omcdatamaker'
1091
+ | 'application/x-omcregerator'
1092
+ | 'text/x-pascal'
1093
+ | 'application/pkcs10'
1094
+ | 'application/x-pkcs10'
1095
+ | 'application/pkcs-12'
1096
+ | 'application/x-pkcs12'
1097
+ | 'application/x-pkcs7-signature'
1098
+ | 'application/pkcs7-mime'
1099
+ | 'application/x-pkcs7-mime'
1100
+ | 'application/x-pkcs7-certreqresp'
1101
+ | 'application/pkcs7-signature'
1102
+ | 'application/pro_eng'
1103
+ | 'text/pascal'
1104
+ | 'image/x-portable-bitmap'
1105
+ | 'application/vnd.hp-pcl'
1106
+ | 'application/x-pcl'
1107
+ | 'image/x-pict'
1108
+ | 'image/x-pcx'
1109
+ | 'chemical/x-pdb'
1110
+ | 'application/pdf'
1111
+ | 'audio/make.my.funk'
1112
+ | 'image/x-portable-graymap'
1113
+ | 'image/x-portable-greymap'
1114
+ | 'image/pict'
1115
+ | 'application/x-newton-compatible-pkg'
1116
+ | 'application/vnd.ms-pki.pko'
1117
+ | 'text/x-script.perl'
1118
+ | 'application/x-pixclscript'
1119
+ | 'image/x-xpixmap'
1120
+ | 'text/x-script.perl-module'
1121
+ | 'application/x-pagemaker'
1122
+ | 'image/png'
1123
+ | 'application/x-portable-anymap'
1124
+ | 'image/x-portable-anymap'
1125
+ | 'model/x-pov'
1126
+ | 'image/x-portable-pixmap'
1127
+ | 'application/mspowerpoint'
1128
+ | 'application/powerpoint'
1129
+ | 'application/vnd.ms-powerpoint'
1130
+ | 'application/x-mspowerpoint'
1131
+ | 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
1132
+ | 'application/x-freelance'
1133
+ | 'paleovu/x-pv'
1134
+ | 'text/x-script.phyton'
1135
+ | 'application/x-bytecode.python'
1136
+ | 'audio/vnd.qcelp'
1137
+ | 'image/x-quicktime'
1138
+ | 'video/x-qtc'
1139
+ | 'audio/x-pn-realaudio'
1140
+ | 'audio/x-pn-realaudio-plugin'
1141
+ | 'audio/x-realaudio'
1142
+ | 'application/x-cmu-raster'
1143
+ | 'image/cmu-raster'
1144
+ | 'image/x-cmu-raster'
1145
+ | 'text/x-script.rexx'
1146
+ | 'image/vnd.rn-realflash'
1147
+ | 'image/x-rgb'
1148
+ | 'application/vnd.rn-realmedia'
1149
+ | 'audio/mid'
1150
+ | 'application/ringing-tones'
1151
+ | 'application/vnd.nokia.ringing-tone'
1152
+ | 'application/vnd.rn-realplayer'
1153
+ | 'application/x-troff'
1154
+ | 'image/vnd.rn-realpix'
1155
+ | 'application/x-rtf'
1156
+ | 'text/richtext'
1157
+ | 'application/rtf'
1158
+ | 'video/vnd.rn-realvideo'
1159
+ | 'audio/s3m'
1160
+ | 'application/x-tbook'
1161
+ | 'application/x-lotusscreencam'
1162
+ | 'text/x-script.guile'
1163
+ | 'text/x-script.scheme'
1164
+ | 'video/x-scm'
1165
+ | 'application/sdp'
1166
+ | 'application/x-sdp'
1167
+ | 'application/sounder'
1168
+ | 'application/sea'
1169
+ | 'application/x-sea'
1170
+ | 'application/set'
1171
+ | 'text/sgml'
1172
+ | 'text/x-sgml'
1173
+ | 'application/x-sh'
1174
+ | 'application/x-shar'
1175
+ | 'text/x-script.sh'
1176
+ | 'text/x-server-parsed-html'
1177
+ | 'audio/x-psid'
1178
+ | 'application/x-sit'
1179
+ | 'application/x-stuffit'
1180
+ | 'application/x-koan'
1181
+ | 'application/x-seelogo'
1182
+ | 'application/smil'
1183
+ | 'audio/x-adpcm'
1184
+ | 'application/solids'
1185
+ | 'application/x-pkcs7-certificates'
1186
+ | 'text/x-speech'
1187
+ | 'application/futuresplash'
1188
+ | 'application/x-sprite'
1189
+ | 'application/x-wais-source'
1190
+ | 'application/streamingmedia'
1191
+ | 'application/vnd.ms-pki.certstore'
1192
+ | 'application/step'
1193
+ | 'application/sla'
1194
+ | 'application/vnd.ms-pki.stl'
1195
+ | 'application/x-navistyle'
1196
+ | 'application/x-sv4cpio'
1197
+ | 'application/x-sv4crc'
1198
+ | 'image/svg+xml'
1199
+ | 'application/x-world'
1200
+ | 'x-world/x-svr'
1201
+ | 'application/x-shockwave-flash'
1202
+ | 'application/x-tar'
1203
+ | 'application/toolbook'
1204
+ | 'application/x-tcl'
1205
+ | 'text/x-script.tcl'
1206
+ | 'text/x-script.tcsh'
1207
+ | 'application/x-tex'
1208
+ | 'application/x-texinfo'
1209
+ | 'application/plain'
1210
+ | 'application/gnutar'
1211
+ | 'image/tiff'
1212
+ | 'image/x-tiff'
1213
+ | 'application/toml'
1214
+ | 'audio/tsp-audio'
1215
+ | 'application/dsptype'
1216
+ | 'audio/tsplayer'
1217
+ | 'text/tab-separated-values'
1218
+ | 'application/i-deas'
1219
+ | 'text/uri-list'
1220
+ | 'application/x-ustar'
1221
+ | 'multipart/x-ustar'
1222
+ | 'text/x-uuencode'
1223
+ | 'application/x-cdlink'
1224
+ | 'text/x-vcalendar'
1225
+ | 'application/vda'
1226
+ | 'video/vdo'
1227
+ | 'application/groupwise'
1228
+ | 'video/vivo'
1229
+ | 'video/vnd.vivo'
1230
+ | 'application/vocaltec-media-desc'
1231
+ | 'application/vocaltec-media-file'
1232
+ | 'audio/voc'
1233
+ | 'audio/x-voc'
1234
+ | 'video/vosaic'
1235
+ | 'audio/voxware'
1236
+ | 'audio/x-twinvq-plugin'
1237
+ | 'audio/x-twinvq'
1238
+ | 'application/x-vrml'
1239
+ | 'model/vrml'
1240
+ | 'x-world/x-vrml'
1241
+ | 'x-world/x-vrt'
1242
+ | 'application/x-visio'
1243
+ | 'application/wordperfect6.0'
1244
+ | 'application/wordperfect6.1'
1245
+ | 'audio/wav'
1246
+ | 'audio/x-wav'
1247
+ | 'application/x-qpro'
1248
+ | 'image/vnd.wap.wbmp'
1249
+ | 'application/vnd.xara'
1250
+ | 'video/webm'
1251
+ | 'audio/webm'
1252
+ | 'image/webp'
1253
+ | 'application/x-123'
1254
+ | 'windows/metafile'
1255
+ | 'text/vnd.wap.wml'
1256
+ | 'application/vnd.wap.wmlc'
1257
+ | 'text/vnd.wap.wmlscript'
1258
+ | 'application/vnd.wap.wmlscriptc'
1259
+ | 'video/x-ms-wmv'
1260
+ | 'application/wordperfect'
1261
+ | 'application/x-wpwin'
1262
+ | 'application/x-lotus'
1263
+ | 'application/mswrite'
1264
+ | 'application/x-wri'
1265
+ | 'text/scriplet'
1266
+ | 'application/x-wintalk'
1267
+ | 'image/x-xbitmap'
1268
+ | 'image/x-xbm'
1269
+ | 'image/xbm'
1270
+ | 'video/x-amt-demorun'
1271
+ | 'xgl/drawing'
1272
+ | 'image/vnd.xiff'
1273
+ | 'application/excel'
1274
+ | 'application/vnd.ms-excel'
1275
+ | 'application/x-excel'
1276
+ | 'application/x-msexcel'
1277
+ | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
1278
+ | 'audio/xm'
1279
+ | 'application/xml'
1280
+ | 'text/xml'
1281
+ | 'xgl/movie'
1282
+ | 'application/x-vnd.ls-xpix'
1283
+ | 'image/xpm'
1284
+ | 'video/x-amt-showrun'
1285
+ | 'image/x-xwd'
1286
+ | 'image/x-xwindowdump'
1287
+ | 'text/vnd.yaml'
1288
+ | 'application/x-compress'
1289
+ | 'application/x-zip-compressed'
1290
+ | 'application/zip'
1291
+ | 'multipart/x-zip'
1292
+ | 'text/x-script.zsh';