Phase 1: Fluent API with .with_detail_response() pattern #92
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
This PR implements Phase 1 of the SDK restructure plan, introducing the fluent
.with_detail_response()API pattern for accessing telemetry while maintaining full backward compatibility.RequestMetadata,DataverseResponse,FluentResult)_odata.pyand_http.pyFluentResultintoclient.pywith backward compatibilityBackward Compatibility
Existing code continues to work unchanged:
New Telemetry Access
Key Changes
New Types in
core/results.py:RequestMetadata- HTTP request/response metadata dataclassDataverseResponse[T]- Generic response with result + telemetry dictFluentResult[T]- Wrapper enabling.with_detail_response()patternUpdated Methods in
client.py:create()→FluentResult[List[str]]update()→FluentResult[None]delete()→FluentResult[Optional[str]]get()(single record) →FluentResult[Dict]Test plan
RequestMetadata,DataverseResponse,FluentResult(44 tests)test_client.pytests for new_with_metadatamethods🤖 Generated with Claude Code