Skip to content

feat: return FileItem from files.upload() (#118)#119

Merged
adubovik merged 1 commit into
epam:developmentfrom
kryachkow:118-upload-filemetadata-fileitem-migration
Jul 8, 2026
Merged

feat: return FileItem from files.upload() (#118)#119
adubovik merged 1 commit into
epam:developmentfrom
kryachkow:118-upload-filemetadata-fileitem-migration

Conversation

@kryachkow

@kryachkow kryachkow commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Applicable issues

Fixes #118

Description of changes

files.upload() was typed to return FileMetadata — the folder-listing shape carrying items/next_token that are always empty on an upload response — while the server actually returns an item-shaped object.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kryachkow
kryachkow requested a review from adubovik as a code owner July 8, 2026 12:43
@kryachkow
kryachkow force-pushed the 118-upload-filemetadata-fileitem-migration branch from 443c7a5 to 1cee098 Compare July 8, 2026 13:10
The upload response is item-shaped, not a folder listing, so upload()
now returns FileItem instead of FileMetadata. Introduce a shared
ResourceItemMetadata base (created_at, updated_at, etag, author) that
mirrors ai-dial-core's hierarchy: FileItem extends it and adds
content_length/content_type, while FileMetadata stays a separate
folder-listing branch off BaseMetadata.
@kryachkow
kryachkow force-pushed the 118-upload-filemetadata-fileitem-migration branch from 1cee098 to e9de9f2 Compare July 8, 2026 13:12
@adubovik
adubovik merged commit 5e8556e into epam:development Jul 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

files.upload() is typed to return FileMetadata, but the actual upload response is FileItem-shaped

2 participants