Repository navigation
feat(documents): move the documents service to DU Framework v2 - #1929
Open
alexandrujircan wants to merge 2 commits into
Open
alexandrujircan wants to merge 2 commits into
alexandrujircan wants to merge 2 commits into
Conversation
- send api-version=2.0 and use the v2 tags/{tag} routes
- read PascalCase responses, which v2 returns for orgs with
du-enable-v2-pascal-case-responses on
- percent-encode URL path segments, so a tag cannot change the route
- send allowChangeOfDocumentType inside the validation configuration
- add the FieldGroup and MonetaryQuantity field types returned by IXP v2
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The downstream packages/uipath/uv.lock remains pinned to 0.2.34 and can break its propagated locked CI job.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Migrates DocumentsService to DU Framework v2 while preserving existing APIs.
Changes:
- Updates v2 routes, response casing normalization, and URL encoding.
- Adds v2 field types and validation configuration.
- Expands tests and bumps the package version.
| File | Description |
|---|---|
packages/uipath-platform/src/uipath/platform/documents/_documents_service.py |
Implements Framework v2 requests and normalization. |
packages/uipath-platform/src/uipath/platform/documents/documents.py |
Adds v2 field types and documentation. |
packages/uipath-platform/tests/services/test_documents_service.py |
Updates and expands v2 coverage. |
packages/uipath-platform/tests/services/tests_data/documents_service/ixp_extraction_response_v2.json |
Adds an IXP v2 response fixture. |
packages/uipath-platform/pyproject.toml |
Bumps the package version. |
packages/uipath-platform/uv.lock |
Updates the local locked package version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… async - pick versioned or tagged routes in one helper per route family instead of repeating the branch in every sync and async method - share the operation status check between the sync and async retrieve - regenerate the uipath lockfile for uipath-platform 0.2.35 - document that field IDs are prefixed by document type and field group Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
This branch has not been deployed
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.





Summary
DocumentsServicenow calls DU Framework withapi-version=2.0, and the tag-based routes use the v2 shapeprojects/{id}/tags/{tag}/...du-enable-v2-pascal-case-responseson. Document Processing payloads (ExtractionResult,ClassificationResult) are passed through unchangedallowChangeOfDocumentTypeis now sent inside the validationconfiguration, which is where v2 expects itFieldTypegainsFieldGroupandMonetaryQuantity. IXP v2 returns both, and without them parsingdata_projectionfailsuipath-platform0.2.34 → 0.2.35Method signatures and return types are unchanged.
What SDK users will notice
These come from the Framework v2 contract:
Invoices.name,Default.Invoice.InvoiceNumber. Code that looks fields up byFieldIdhas to switch toFieldName, which is unchangedFieldGroupinstead ofTable→Header/Bodydata_projectionhas one entry per field group instead of one per table rowFramework issues found (not fixed here)
data_projectiondrops rows of multi-value groups. On alpha, a bank statement with 19 transactions has 1 indata_projection, while v1.1 returns all 19.CreateFromExtractionResultV2takes only the first value. All rows are still inextraction_result.results_document.data_projectionis likely empty for IXP v2.ValidationService.csstill builds it with the v1 builder, which only looks forTablefields.Testing
FieldGroup/MonetaryQuantityresults, and tag percent-encodinguipath-platform: 1782 passed, ruff clean, mypy clean🤖 Generated with Claude Code