@cloudcannon/configuration-types 0.0.23 → 0.0.24

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