impexp.rs 1016 B

123456789101112131415161718
  1. use serde_json::{json, Value};
  2. use super::PlatformClient;
  3. use bos_core::BosError;
  4. impl PlatformClient {
  5. /// 建导入/导出任务(通道侧真端点=`task/create@v1`)。
  6. ///
  7. /// ⚠️ 2026-11-08 网关日志实读更正:该服务只注册 `task/create`/`get`/`get_list`/
  8. /// `pickup`/`report`/`cancel`/`purge_expired`/`upload_ticket`,**⛔ `task/submit@v1`**
  9. /// ——旧写法每打一次必吃 `50000 未找到匹配路由`。
  10. /// 出参 `source_file_name`(≤255,平台 D6 已交付)由调用方原样放进 `data`,通道只回显不解释。
  11. pub async fn import_export_create(&self, data: Value) -> Result<Value, BosError> {
  12. self.post_json("/api/system/seoh-import-export/task/create@v1", json!({ "data": data })).await
  13. }
  14. pub async fn import_export_get(&self, task_id: &str) -> Result<Value, BosError> {
  15. self.post_json("/api/system/seoh-import-export/task/get@v1", json!({ "data": { "task_id": task_id } })).await
  16. }
  17. }