BREAKING: Modularize client architecture, add Bulk API support - #36
BREAKING: Modularize client architecture, add Bulk API support#36tance77 wants to merge 5 commits into
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
|
Adding Tooling API Support |
|
Hi @tance77 , I plan to add support for the metadata api, which I require for my project. Let me know what you think, maybe we can work together in getting rustforce to the next level. |
|
@wimvelzeboer feel free to take the reins my times very limited when it comes to open source projects. Ill contribute from time to time but that's about it. I'm glad to see there are some active members out there wanting to see this one through. |
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