@@ -19,6 +19,8 @@ class MediaContentType(str, enum.Enum):
1919 IMAGE_SVG_XML = "image/svg+xml"
2020 IMAGE_TIFF = "image/tiff"
2121 IMAGE_BMP = "image/bmp"
22+ IMAGE_AVIF = "image/avif"
23+ IMAGE_HEIC = "image/heic"
2224 AUDIO_MPEG = "audio/mpeg"
2325 AUDIO_MP_3 = "audio/mp3"
2426 AUDIO_WAV = "audio/wav"
@@ -27,19 +29,46 @@ class MediaContentType(str, enum.Enum):
2729 AUDIO_AAC = "audio/aac"
2830 AUDIO_MP_4 = "audio/mp4"
2931 AUDIO_FLAC = "audio/flac"
32+ AUDIO_OPUS = "audio/opus"
33+ AUDIO_WEBM = "audio/webm"
3034 VIDEO_MP_4 = "video/mp4"
3135 VIDEO_WEBM = "video/webm"
36+ VIDEO_OGG = "video/ogg"
37+ VIDEO_MPEG = "video/mpeg"
38+ VIDEO_QUICKTIME = "video/quicktime"
39+ VIDEO_X_MSVIDEO = "video/x-msvideo"
40+ VIDEO_X_MATROSKA = "video/x-matroska"
3241 TEXT_PLAIN = "text/plain"
3342 TEXT_HTML = "text/html"
3443 TEXT_CSS = "text/css"
3544 TEXT_CSV = "text/csv"
45+ TEXT_MARKDOWN = "text/markdown"
46+ TEXT_X_PYTHON = "text/x-python"
47+ APPLICATION_JAVASCRIPT = "application/javascript"
48+ TEXT_X_TYPESCRIPT = "text/x-typescript"
49+ APPLICATION_X_YAML = "application/x-yaml"
3650 APPLICATION_PDF = "application/pdf"
3751 APPLICATION_MSWORD = "application/msword"
3852 APPLICATION_MS_EXCEL = "application/vnd.ms-excel"
53+ APPLICATION_OPENXML_SPREADSHEET = (
54+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
55+ )
3956 APPLICATION_ZIP = "application/zip"
4057 APPLICATION_JSON = "application/json"
4158 APPLICATION_XML = "application/xml"
4259 APPLICATION_OCTET_STREAM = "application/octet-stream"
60+ APPLICATION_OPENXML_WORD = (
61+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
62+ )
63+ APPLICATION_OPENXML_PRESENTATION = (
64+ "application/vnd.openxmlformats-officedocument.presentationml.presentation"
65+ )
66+ APPLICATION_RTF = "application/rtf"
67+ APPLICATION_X_NDJSON = "application/x-ndjson"
68+ APPLICATION_PARQUET = "application/vnd.apache.parquet"
69+ APPLICATION_GZIP = "application/gzip"
70+ APPLICATION_X_TAR = "application/x-tar"
71+ APPLICATION_X_7_Z_COMPRESSED = "application/x-7z-compressed"
4372
4473 def visit (
4574 self ,
@@ -51,6 +80,8 @@ def visit(
5180 image_svg_xml : typing .Callable [[], T_Result ],
5281 image_tiff : typing .Callable [[], T_Result ],
5382 image_bmp : typing .Callable [[], T_Result ],
83+ image_avif : typing .Callable [[], T_Result ],
84+ image_heic : typing .Callable [[], T_Result ],
5485 audio_mpeg : typing .Callable [[], T_Result ],
5586 audio_mp_3 : typing .Callable [[], T_Result ],
5687 audio_wav : typing .Callable [[], T_Result ],
@@ -59,19 +90,40 @@ def visit(
5990 audio_aac : typing .Callable [[], T_Result ],
6091 audio_mp_4 : typing .Callable [[], T_Result ],
6192 audio_flac : typing .Callable [[], T_Result ],
93+ audio_opus : typing .Callable [[], T_Result ],
94+ audio_webm : typing .Callable [[], T_Result ],
6295 video_mp_4 : typing .Callable [[], T_Result ],
6396 video_webm : typing .Callable [[], T_Result ],
97+ video_ogg : typing .Callable [[], T_Result ],
98+ video_mpeg : typing .Callable [[], T_Result ],
99+ video_quicktime : typing .Callable [[], T_Result ],
100+ video_x_msvideo : typing .Callable [[], T_Result ],
101+ video_x_matroska : typing .Callable [[], T_Result ],
64102 text_plain : typing .Callable [[], T_Result ],
65103 text_html : typing .Callable [[], T_Result ],
66104 text_css : typing .Callable [[], T_Result ],
67105 text_csv : typing .Callable [[], T_Result ],
106+ text_markdown : typing .Callable [[], T_Result ],
107+ text_x_python : typing .Callable [[], T_Result ],
108+ application_javascript : typing .Callable [[], T_Result ],
109+ text_x_typescript : typing .Callable [[], T_Result ],
110+ application_x_yaml : typing .Callable [[], T_Result ],
68111 application_pdf : typing .Callable [[], T_Result ],
69112 application_msword : typing .Callable [[], T_Result ],
70113 application_ms_excel : typing .Callable [[], T_Result ],
114+ application_openxml_spreadsheet : typing .Callable [[], T_Result ],
71115 application_zip : typing .Callable [[], T_Result ],
72116 application_json : typing .Callable [[], T_Result ],
73117 application_xml : typing .Callable [[], T_Result ],
74118 application_octet_stream : typing .Callable [[], T_Result ],
119+ application_openxml_word : typing .Callable [[], T_Result ],
120+ application_openxml_presentation : typing .Callable [[], T_Result ],
121+ application_rtf : typing .Callable [[], T_Result ],
122+ application_x_ndjson : typing .Callable [[], T_Result ],
123+ application_parquet : typing .Callable [[], T_Result ],
124+ application_gzip : typing .Callable [[], T_Result ],
125+ application_x_tar : typing .Callable [[], T_Result ],
126+ application_x_7_z_compressed : typing .Callable [[], T_Result ],
75127 ) -> T_Result :
76128 if self is MediaContentType .IMAGE_PNG :
77129 return image_png ()
@@ -89,6 +141,10 @@ def visit(
89141 return image_tiff ()
90142 if self is MediaContentType .IMAGE_BMP :
91143 return image_bmp ()
144+ if self is MediaContentType .IMAGE_AVIF :
145+ return image_avif ()
146+ if self is MediaContentType .IMAGE_HEIC :
147+ return image_heic ()
92148 if self is MediaContentType .AUDIO_MPEG :
93149 return audio_mpeg ()
94150 if self is MediaContentType .AUDIO_MP_3 :
@@ -105,10 +161,24 @@ def visit(
105161 return audio_mp_4 ()
106162 if self is MediaContentType .AUDIO_FLAC :
107163 return audio_flac ()
164+ if self is MediaContentType .AUDIO_OPUS :
165+ return audio_opus ()
166+ if self is MediaContentType .AUDIO_WEBM :
167+ return audio_webm ()
108168 if self is MediaContentType .VIDEO_MP_4 :
109169 return video_mp_4 ()
110170 if self is MediaContentType .VIDEO_WEBM :
111171 return video_webm ()
172+ if self is MediaContentType .VIDEO_OGG :
173+ return video_ogg ()
174+ if self is MediaContentType .VIDEO_MPEG :
175+ return video_mpeg ()
176+ if self is MediaContentType .VIDEO_QUICKTIME :
177+ return video_quicktime ()
178+ if self is MediaContentType .VIDEO_X_MSVIDEO :
179+ return video_x_msvideo ()
180+ if self is MediaContentType .VIDEO_X_MATROSKA :
181+ return video_x_matroska ()
112182 if self is MediaContentType .TEXT_PLAIN :
113183 return text_plain ()
114184 if self is MediaContentType .TEXT_HTML :
@@ -117,12 +187,24 @@ def visit(
117187 return text_css ()
118188 if self is MediaContentType .TEXT_CSV :
119189 return text_csv ()
190+ if self is MediaContentType .TEXT_MARKDOWN :
191+ return text_markdown ()
192+ if self is MediaContentType .TEXT_X_PYTHON :
193+ return text_x_python ()
194+ if self is MediaContentType .APPLICATION_JAVASCRIPT :
195+ return application_javascript ()
196+ if self is MediaContentType .TEXT_X_TYPESCRIPT :
197+ return text_x_typescript ()
198+ if self is MediaContentType .APPLICATION_X_YAML :
199+ return application_x_yaml ()
120200 if self is MediaContentType .APPLICATION_PDF :
121201 return application_pdf ()
122202 if self is MediaContentType .APPLICATION_MSWORD :
123203 return application_msword ()
124204 if self is MediaContentType .APPLICATION_MS_EXCEL :
125205 return application_ms_excel ()
206+ if self is MediaContentType .APPLICATION_OPENXML_SPREADSHEET :
207+ return application_openxml_spreadsheet ()
126208 if self is MediaContentType .APPLICATION_ZIP :
127209 return application_zip ()
128210 if self is MediaContentType .APPLICATION_JSON :
@@ -131,3 +213,19 @@ def visit(
131213 return application_xml ()
132214 if self is MediaContentType .APPLICATION_OCTET_STREAM :
133215 return application_octet_stream ()
216+ if self is MediaContentType .APPLICATION_OPENXML_WORD :
217+ return application_openxml_word ()
218+ if self is MediaContentType .APPLICATION_OPENXML_PRESENTATION :
219+ return application_openxml_presentation ()
220+ if self is MediaContentType .APPLICATION_RTF :
221+ return application_rtf ()
222+ if self is MediaContentType .APPLICATION_X_NDJSON :
223+ return application_x_ndjson ()
224+ if self is MediaContentType .APPLICATION_PARQUET :
225+ return application_parquet ()
226+ if self is MediaContentType .APPLICATION_GZIP :
227+ return application_gzip ()
228+ if self is MediaContentType .APPLICATION_X_TAR :
229+ return application_x_tar ()
230+ if self is MediaContentType .APPLICATION_X_7_Z_COMPRESSED :
231+ return application_x_7_z_compressed ()
0 commit comments