BREAKING: Modularize client architecture, add Bulk API support#36
Open
tance77 wants to merge 5 commits intotzmfreedom:mainfrom
Open
BREAKING: Modularize client architecture, add Bulk API support#36tance77 wants to merge 5 commits intotzmfreedom:mainfrom
tance77 wants to merge 5 commits intotzmfreedom:mainfrom
Conversation
Split monolithic client.rs into organized submodules (client, rest_api). Split response.rs into dedicated response types (token, error). Add access_token module for token management. Modernize error handling, update dependencies, and remove outdated tests.
Add bulk_api module for Salesforce Bulk API v1 (XML-based). Add bulk_api_v2 module for Bulk API v2 (CSV/JSON-based). Add XML utility module for serialization/deserialization.
Rewrite examples to use generic JSON responses (serde_json::Value). Update README with current API usage and module structure.
46c78d8 to
1730ffd
Compare
feat: adding support for tooling api
Author
|
Adding Tooling API Support |
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.
This is a major refactor that restructures the crate's internals and changes the public API. It is not backwards compatible with the current release.
What breaks
QueryResponse,SearchResponse,DescribeResponse, etc.) have been removed. Methods now returnserde_json::Value, giving consumers full flexibility to deserialize as needed.src/client.rsandsrc/response.rshave been split into submodules. Anyone importing internals directly will need to update paths.Clientconstructor changed: Now takesclient_idandclient_secretdirectly, with setters for login URL, version, etc.describe_globalexample (method still exists)What's new
client,rest_api,bulk_api,bulk_api_v2submodulesbulk_apimodule)bulk_api_v2module)token_response,token_error_response,error_responseaccess_tokenmodule for token managementerrors.rsWhy
The original monolithic
client.rswas difficult to extend. Typed response structs broke when Salesforce changed their API payloads. Returning generic JSON is more resilient and lets consumers define their own types if needed.Test plan