feat(api): sync Feishu catalog drift APIs#189
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5009176d06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "/open-apis/spark/v1/apps/{}/storage/upload/part", | ||
| self.app_id | ||
| ); | ||
| let req: ApiRequest<serde_json::Value> = ApiRequest::post(path).body(body); |
There was a problem hiding this comment.
Send upload chunks as file data
For the 分片上传文件 - 上传分片 endpoint, callers need to send the actual file chunk, but this builds a JSON request body. In this SDK the multipart/file path is only used when ApiRequest::file_content(...) is set, so any real chunk upload will go out as application/json without file bytes and the server cannot accept it. Expose a byte/file parameter and build the request with the SDK's file-upload path instead of .body(body).
Useful? React with 👍 / 👎.
| pub async fn execute_with_options(self, option: RequestOption) -> SDKResult<serde_json::Value> { | ||
| validate_required!(self.app_id, "app_id 不能为空"); | ||
| let path = format!("/open-apis/spark/v1/apps/{}/storage", self.app_id); | ||
| let req: ApiRequest<serde_json::Value> = ApiRequest::get(path); |
There was a problem hiding this comment.
Treat storage downloads as binary responses
When this 下载文件 endpoint returns the file content, requesting serde_json::Value selects the SDK's JSON Data response handling and then requires resp.data, so a normal binary download will fail to deserialize or be reported as empty. The core response layer already uses Vec<u8> with ResponseFormat::Binary, so this request should use a binary response type and return the bytes instead of serde_json::Value.
Useful? React with 👍 / 👎.
| /// 应用管理 v7 版本 API。 | ||
| pub mod v7; |
There was a problem hiding this comment.
Expose v7 through the Application entry point
Adding the v7 module here does not make the new application v7 APIs reachable through the SDK's public service chain: Application still only has v1(), so users starting from the normal application client cannot call the new v7 resources without bypassing the entry point and constructing request modules directly. Add an ApplicationV7 resource type and a v7() accessor mirroring v1().
Useful? React with 👍 / 👎.
Summary
Verification
Note: cargo check --workspace --all-targets still fails on the existing openlark-docs docs_readme_examples example under default features because ccm/base/baike modules are feature-gated there.
Closes #188
Closes #187
Closes #186
Closes #185
Closes #184
Closes #183
Closes #182
Closes #181