From c329c0a19f398623d5035d1ff9e60375fc368f23 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 19:41:24 +0000 Subject: [PATCH 1/2] fix: add SVG support to synapse attachments --- .stats.yml | 4 +- src/linq/resources/attachments.py | 60 +++++++++++++------ src/linq/types/attachment_create_params.py | 30 +++++++--- .../types/attachment_retrieve_response.py | 30 +++++++--- src/linq/types/supported_content_type.py | 24 ++++---- 5 files changed, 97 insertions(+), 51 deletions(-) diff --git a/.stats.yml b/.stats.yml index b5c1565..e9512d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq%2Flinq-api-v3-f8792c6b363e576dac7e828e06a800eb52eaf45c1ea653ae6db16289e64b575d.yml -openapi_spec_hash: 2f0f5e232bdf9c4e2021773575354fdb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/linq%2Flinq-api-v3-c5bcd9ca6063e60608524c34230d29b3d85e3d44b43edb686540e3400692fda7.yml +openapi_spec_hash: 887410236b624086a0e22a9fa8d468be config_hash: be5410c6c4d8f36a7cd93c8950bc90d6 diff --git a/src/linq/resources/attachments.py b/src/linq/resources/attachments.py index b271b0c..61f83ce 100644 --- a/src/linq/resources/attachments.py +++ b/src/linq/resources/attachments.py @@ -199,25 +199,37 @@ def create( content_type: Supported MIME types for file attachments and media URLs. **Images:** image/jpeg, image/png, image/gif, image/heic, image/heif, - image/tiff, image/bmp + image/tiff, image/bmp, image/svg+xml, image/webp, image/x-icon - **Videos:** video/mp4, video/quicktime, video/mpeg, video/3gpp + **Videos:** video/mp4, video/quicktime, video/mpeg, video/mpeg2, + video/x-msvideo, video/3gpp - **Audio:** audio/mpeg, audio/mp4, audio/x-m4a, audio/x-caf, audio/wav, - audio/aiff, audio/aac, audio/amr + **Audio:** audio/mpeg, audio/x-m4a, audio/x-caf, audio/x-wav, audio/x-aiff, + audio/aac, audio/midi, audio/amr **Documents:** application/pdf, text/plain, text/markdown, text/vcard, text/rtf, - text/csv, text/html, text/calendar, application/msword, + text/csv, text/html, text/calendar, text/xml, application/json, + application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, - application/vnd.apple.pages, application/vnd.apple.numbers, - application/vnd.apple.keynote, application/epub+zip, application/zip + application/x-iwork-pages-sffpages, application/x-iwork-numbers-sffnumbers, + application/x-iwork-keynote-sffkey, application/epub+zip, application/zip, + application/x-gzip - **Unsupported:** WebP, SVG, FLAC, OGG, and executable files are explicitly - rejected. + **Deprecated (accepted but transcoded):** + + - `audio/mp3` — Deprecated. Use `audio/mpeg` instead. Files sent as audio/mp3 + will be delivered as audio/mpeg. + - `audio/mp4` — Deprecated. Use `audio/x-m4a` instead. Files sent as audio/mp4 + will be delivered as audio/x-m4a. + - `audio/aiff` — Deprecated. Use `audio/x-aiff` instead. Files sent as + audio/aiff will be delivered as audio/x-aiff. + - `image/tiff` — Accepted, but TIFF images are transcoded to JPEG for delivery. + + **Unsupported:** FLAC, OGG, and executable files are explicitly rejected. filename: Name of the file to upload @@ -458,25 +470,37 @@ async def create( content_type: Supported MIME types for file attachments and media URLs. **Images:** image/jpeg, image/png, image/gif, image/heic, image/heif, - image/tiff, image/bmp + image/tiff, image/bmp, image/svg+xml, image/webp, image/x-icon - **Videos:** video/mp4, video/quicktime, video/mpeg, video/3gpp + **Videos:** video/mp4, video/quicktime, video/mpeg, video/mpeg2, + video/x-msvideo, video/3gpp - **Audio:** audio/mpeg, audio/mp4, audio/x-m4a, audio/x-caf, audio/wav, - audio/aiff, audio/aac, audio/amr + **Audio:** audio/mpeg, audio/x-m4a, audio/x-caf, audio/x-wav, audio/x-aiff, + audio/aac, audio/midi, audio/amr **Documents:** application/pdf, text/plain, text/markdown, text/vcard, text/rtf, - text/csv, text/html, text/calendar, application/msword, + text/csv, text/html, text/calendar, text/xml, application/json, + application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, - application/vnd.apple.pages, application/vnd.apple.numbers, - application/vnd.apple.keynote, application/epub+zip, application/zip + application/x-iwork-pages-sffpages, application/x-iwork-numbers-sffnumbers, + application/x-iwork-keynote-sffkey, application/epub+zip, application/zip, + application/x-gzip + + **Deprecated (accepted but transcoded):** + + - `audio/mp3` — Deprecated. Use `audio/mpeg` instead. Files sent as audio/mp3 + will be delivered as audio/mpeg. + - `audio/mp4` — Deprecated. Use `audio/x-m4a` instead. Files sent as audio/mp4 + will be delivered as audio/x-m4a. + - `audio/aiff` — Deprecated. Use `audio/x-aiff` instead. Files sent as + audio/aiff will be delivered as audio/x-aiff. + - `image/tiff` — Accepted, but TIFF images are transcoded to JPEG for delivery. - **Unsupported:** WebP, SVG, FLAC, OGG, and executable files are explicitly - rejected. + **Unsupported:** FLAC, OGG, and executable files are explicitly rejected. filename: Name of the file to upload diff --git a/src/linq/types/attachment_create_params.py b/src/linq/types/attachment_create_params.py index 2500185..5c43cba 100644 --- a/src/linq/types/attachment_create_params.py +++ b/src/linq/types/attachment_create_params.py @@ -14,25 +14,37 @@ class AttachmentCreateParams(TypedDict, total=False): """Supported MIME types for file attachments and media URLs. **Images:** image/jpeg, image/png, image/gif, image/heic, image/heif, - image/tiff, image/bmp + image/tiff, image/bmp, image/svg+xml, image/webp, image/x-icon - **Videos:** video/mp4, video/quicktime, video/mpeg, video/3gpp + **Videos:** video/mp4, video/quicktime, video/mpeg, video/mpeg2, + video/x-msvideo, video/3gpp - **Audio:** audio/mpeg, audio/mp4, audio/x-m4a, audio/x-caf, audio/wav, - audio/aiff, audio/aac, audio/amr + **Audio:** audio/mpeg, audio/x-m4a, audio/x-caf, audio/x-wav, audio/x-aiff, + audio/aac, audio/midi, audio/amr **Documents:** application/pdf, text/plain, text/markdown, text/vcard, text/rtf, - text/csv, text/html, text/calendar, application/msword, + text/csv, text/html, text/calendar, text/xml, application/json, + application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, - application/vnd.apple.pages, application/vnd.apple.numbers, - application/vnd.apple.keynote, application/epub+zip, application/zip + application/x-iwork-pages-sffpages, application/x-iwork-numbers-sffnumbers, + application/x-iwork-keynote-sffkey, application/epub+zip, application/zip, + application/x-gzip - **Unsupported:** WebP, SVG, FLAC, OGG, and executable files are explicitly - rejected. + **Deprecated (accepted but transcoded):** + + - `audio/mp3` — Deprecated. Use `audio/mpeg` instead. Files sent as audio/mp3 + will be delivered as audio/mpeg. + - `audio/mp4` — Deprecated. Use `audio/x-m4a` instead. Files sent as audio/mp4 + will be delivered as audio/x-m4a. + - `audio/aiff` — Deprecated. Use `audio/x-aiff` instead. Files sent as + audio/aiff will be delivered as audio/x-aiff. + - `image/tiff` — Accepted, but TIFF images are transcoded to JPEG for delivery. + + **Unsupported:** FLAC, OGG, and executable files are explicitly rejected. """ filename: Required[str] diff --git a/src/linq/types/attachment_retrieve_response.py b/src/linq/types/attachment_retrieve_response.py index e515d4e..89bef5f 100644 --- a/src/linq/types/attachment_retrieve_response.py +++ b/src/linq/types/attachment_retrieve_response.py @@ -18,25 +18,37 @@ class AttachmentRetrieveResponse(BaseModel): """Supported MIME types for file attachments and media URLs. **Images:** image/jpeg, image/png, image/gif, image/heic, image/heif, - image/tiff, image/bmp + image/tiff, image/bmp, image/svg+xml, image/webp, image/x-icon - **Videos:** video/mp4, video/quicktime, video/mpeg, video/3gpp + **Videos:** video/mp4, video/quicktime, video/mpeg, video/mpeg2, + video/x-msvideo, video/3gpp - **Audio:** audio/mpeg, audio/mp4, audio/x-m4a, audio/x-caf, audio/wav, - audio/aiff, audio/aac, audio/amr + **Audio:** audio/mpeg, audio/x-m4a, audio/x-caf, audio/x-wav, audio/x-aiff, + audio/aac, audio/midi, audio/amr **Documents:** application/pdf, text/plain, text/markdown, text/vcard, text/rtf, - text/csv, text/html, text/calendar, application/msword, + text/csv, text/html, text/calendar, text/xml, application/json, + application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, - application/vnd.apple.pages, application/vnd.apple.numbers, - application/vnd.apple.keynote, application/epub+zip, application/zip + application/x-iwork-pages-sffpages, application/x-iwork-numbers-sffnumbers, + application/x-iwork-keynote-sffkey, application/epub+zip, application/zip, + application/x-gzip - **Unsupported:** WebP, SVG, FLAC, OGG, and executable files are explicitly - rejected. + **Deprecated (accepted but transcoded):** + + - `audio/mp3` — Deprecated. Use `audio/mpeg` instead. Files sent as audio/mp3 + will be delivered as audio/mpeg. + - `audio/mp4` — Deprecated. Use `audio/x-m4a` instead. Files sent as audio/mp4 + will be delivered as audio/x-m4a. + - `audio/aiff` — Deprecated. Use `audio/x-aiff` instead. Files sent as + audio/aiff will be delivered as audio/x-aiff. + - `image/tiff` — Accepted, but TIFF images are transcoded to JPEG for delivery. + + **Unsupported:** FLAC, OGG, and executable files are explicitly rejected. """ created_at: datetime diff --git a/src/linq/types/supported_content_type.py b/src/linq/types/supported_content_type.py index 38830a9..09f7ea4 100644 --- a/src/linq/types/supported_content_type.py +++ b/src/linq/types/supported_content_type.py @@ -6,39 +6,38 @@ SupportedContentType: TypeAlias = Literal[ "image/jpeg", - "image/jpg", "image/png", "image/gif", "image/heic", "image/heif", "image/tiff", "image/bmp", - "image/x-ms-bmp", + "image/svg+xml", + "image/webp", + "image/x-icon", "video/mp4", "video/quicktime", "video/mpeg", + "video/mpeg2", "video/x-m4v", + "video/x-msvideo", "video/3gpp", "audio/mpeg", "audio/mp3", - "audio/mp4", "audio/x-m4a", - "audio/m4a", + "audio/mp4", "audio/x-caf", - "audio/wav", "audio/x-wav", - "audio/aiff", "audio/x-aiff", + "audio/aiff", "audio/aac", - "audio/x-aac", + "audio/midi", "audio/amr", "application/pdf", "text/plain", "text/markdown", "text/vcard", - "text/x-vcard", "text/rtf", - "application/rtf", "text/csv", "text/html", "text/calendar", @@ -48,13 +47,12 @@ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", - "application/vnd.apple.pages", "application/x-iwork-pages-sffpages", - "application/vnd.apple.numbers", "application/x-iwork-numbers-sffnumbers", - "application/vnd.apple.keynote", "application/x-iwork-keynote-sffkey", "application/epub+zip", + "text/xml", + "application/json", "application/zip", - "application/x-zip-compressed", + "application/x-gzip", ] From bdf0589b2a343d0ba28ff8f9c4bd2b457cfc00f6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 19:41:37 +0000 Subject: [PATCH 2/2] release: 0.2.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/linq/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 10f3091..b06ba91 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.2.0" + ".": "0.2.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 116d379..7be7920 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.2.1 (2026-04-07) + +Full Changelog: [v0.2.0...v0.2.1](https://github.com/linq-team/linq-python/compare/v0.2.0...v0.2.1) + +### Bug Fixes + +* add SVG support to synapse attachments ([c329c0a](https://github.com/linq-team/linq-python/commit/c329c0a19f398623d5035d1ff9e60375fc368f23)) + ## 0.2.0 (2026-04-04) Full Changelog: [v0.1.0...v0.2.0](https://github.com/linq-team/linq-python/compare/v0.1.0...v0.2.0) diff --git a/pyproject.toml b/pyproject.toml index 76b5b1a..fce7073 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "linq-python" -version = "0.2.0" +version = "0.2.1" description = "The official Python library for the linq-api-v3 API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/linq/_version.py b/src/linq/_version.py index a893922..f0b4e27 100644 --- a/src/linq/_version.py +++ b/src/linq/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "linq" -__version__ = "0.2.0" # x-release-please-version +__version__ = "0.2.1" # x-release-please-version