Skip to content

[UCCORE-1790] API v0.7 support - #4

Open
alxnik-uc wants to merge 19 commits into
masterfrom
UCCORE-1790/api_v0.7_support
Open

[UCCORE-1790] API v0.7 support#4
alxnik-uc wants to merge 19 commits into
masterfrom
UCCORE-1790/api_v0.7_support

Conversation

@alxnik-uc

Copy link
Copy Markdown

Description

https://tiugotech.atlassian.net/browse/UCCORE-1793

Checklist

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-After parsing, warning header logging, query value encoding, and Upload API schema fixes (e.g., from_url response 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.

Comment thread src/ucare/rest/auth.rs
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.

2 participants