[UCCORE-1790] API v0.7 support - #4
Open
alxnik-uc wants to merge 19 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the crate to support Uploadcare REST API v0.7 (and associated new/changed endpoints) while also aligning Upload API request/response handling with documented behavior. It introduces new functionality (file search, tags/metadata endpoints, Add-Ons support) and hardens HTTP/error handling (better parsing of non-JSON/empty bodies, safer Retry-After parsing, warning header logging, and percent-encoding for user-supplied query values).
Changes:
- Move REST client to v0.7-only semantics (API version enum update, request/response shape updates across file/group/webhook/project/conversion).
- Add new REST capabilities: Add-Ons module, file search, file tags and metadata endpoints.
- Improve robustness: error body handling (incl. empty/non-JSON),
Retry-Afterparsing, warning header logging, query value encoding, and Upload API schema fixes (e.g.,from_urlresponse tagging, u64 counters, nullable fields).
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/upload.rs | Updates upload integration tests for metadata/tags and v0.7-compatible Upload API params/returns. |
| tests/testenv/mod.rs | Minor cleanup around crate import usage. |
| tests/rest.rs | Switches REST tests to v0.7 and adds coverage for metadata/tags/search/addons/webhook behavior changes. |
| src/webhook.rs | Webhook API v0.7 adjustments: subscription versioning, safer partial updates, masked secret in Debug, new get. |
| src/upload.rs | Upload API improvements: metadata/tags params, omit store default, u64 counters, tagged from_url responses, schema fixes. |
| src/ucare/upload/mod.rs | Upload client error/response handling improvements (Retry-After parsing, empty success bodies, 5xx mapping). |
| src/ucare/rest/mod.rs | REST client v0.7-only, improved error parsing/truncation, warning header logging, safer Retry-After parsing. |
| src/ucare/rest/auth.rs | Auth header/date format adjustments and test updates. |
| src/ucare/mod.rs | Adds query value percent-encoding helper and shared deserializer helper; improves query building behavior. |
| src/ucare/error.rs | Adds new error variants (405/409/5xx) and display formatting updates. |
| src/types.rs | Introduces shared REST/Upload types (ContentInfo, streams, ImageInfo, etc.). |
| src/project.rs | Updates project service and exposes autostore_enabled. |
| src/lib.rs | Updates docs/examples for v0.7 and exports new modules/types. |
| src/group.rs | Group v0.7 updates: delete endpoint, query encoding, info payload shape updates. |
| src/file.rs | Major v0.7 file API update: filters/orderings, content_info/types, tags/metadata/search/appdata inclusion. |
| src/conversion.rs | Conversion v0.7 updates: document_info, corrected video endpoints, status/result schema fixes. |
| src/addons.rs | New Add-Ons client module (execute/status + polling helper with timeout). |
| README.md | Updates REST API version in example snippet. |
| CHANGELOG.md | Adds detailed “Unreleased” notes documenting v0.7 breaking changes and new features. |
| .github/workflows/test.yml | Adjusts CI test invocation to run all library tests without filtering by crate name. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
https://tiugotech.atlassian.net/browse/UCCORE-1793
Checklist