Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/msrv/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 22 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Breaking

- **#350 P9 接口形状撒谎修正(workflow + analytics;platform/user 已先行)**:
- **workflow**:`approve_task`/`reject_task`/`resubmit_task` 原丢弃真实响应并恒返回
`ApprovalTaskActionResult { success: true }`(`success: false` 永不达)。改为
`SDKResult<()>`——成功/失败只由 `Result` 表达;删除 `ApprovalTaskActionResult`。
飞书 approval v4 同意/拒绝/重提响应 data 为空,与 `()` 一致。**迁移**:
`let r = service.approve_task(...).await?; r.success` → `service.approve_task(...).await?`。
- **analytics**:
1. 删除 `search/v2/query.rs` 与 `search/v2/user.rs` 恒 `Err` runtime stub
(`QueryApi`/`UserSearchApi`/`SearchRequest`/`SuggestRequest`/`SearchUserRequest`)。
无已验证飞书端点(与 #2fab71234 / #108 约束一致:不发明未验证端点);setter 死值 +
`execute()` 恒失败是接口撒谎。与 #308 删除 `Search`/`SearchV2` 门面死链同向收口。
**迁移**:这些 stub 从未接线,不是其它 leaf 的别名——请改用已实现的 search leaf
(`doc_wiki`/`schema`/`app`/`message`/`data_source`)。**用户搜索仍无 surface**。
2. `AnalyticsService::new` 误导签名 `SDKResult<Self>` 但函数体永远 `Ok(...)` → 改为 `Self`
(同 platform #373 / user #360)。**迁移**:`AnalyticsService::new(config)?` / client
facade 去 `?`。
- **platform / user(已合入)**:`PlatformService::new`(#373)、`UserService::new`(#360)
误导 `SDKResult<Self>` → `Self`,不在本变更重复。

- **meeting_room 17 叶 `execute()` 返回类型 `Value` → typed Response**(#349):
`meeting_room/{building,room,country,district,freebusy,instance,summary}` 全部
`execute()` / `execute_with_options()` 从 `SDKResult<serde_json::Value>` 改为 typed
Expand Down Expand Up @@ -190,9 +209,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- **analytics Search / SearchV2 / search() 标 `#[deprecated]`**(#308):三层 `Arc<Config>`
导航死胡同(Search → SearchV2 无真实 API 落地)标记 deprecated,note 指明替代路径
(v2 子模块的 `XxxRequest::new`,如 `query::SearchRequest` / `user::SearchUserRequest`)。
配合 v0.18 deprecated 清理节奏,下个 breaking 窗口删除。**非 breaking**:仅 deprecation
warning,旧调用仍可编译。
(v2 已实现 leaf:`doc_wiki` / `schema` / `app` / `message` / `data_source` 的 `XxxRequest::new`)。
配合 v0.18 deprecated 清理节奏,下个 breaking 窗口删除(#350 已删恒 `Err` 的 `query`/`user`
stub)。**非 breaking**:仅 deprecation warning,旧调用仍可编译。

### Breaking Changes

Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/openlark-analytics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//! .app_secret("app_secret")
//! .build();
//!
//! let _analytics_service = AnalyticsService::new(config)?;
//! let _analytics_service = AnalyticsService::new(config);
//!
//! # Ok(())
//! # }
Expand Down
2 changes: 0 additions & 2 deletions crates/openlark-analytics/src/search/search/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ pub mod app;
pub mod data_source;
pub mod doc_wiki;
pub mod message;
pub mod query;
pub mod schema;
pub mod user;
149 changes: 0 additions & 149 deletions crates/openlark-analytics/src/search/search/v2/query.rs

This file was deleted.

95 changes: 0 additions & 95 deletions crates/openlark-analytics/src/search/search/v2/user.rs

This file was deleted.

20 changes: 7 additions & 13 deletions crates/openlark-analytics/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! 提供数据分析相关的服务入口

use crate::AnalyticsConfig;
use openlark_core::SDKResult;
use std::sync::Arc;

/// 数据分析服务
Expand All @@ -16,19 +15,14 @@ pub struct AnalyticsService {
}

impl AnalyticsService {
/// 创建新的数据分析服务实例
/// 创建新的数据分析服务实例
///
/// # 参数
///
/// * `config` - 数据分析服务配置
///
/// # 返回
///
/// 返回数据分析服务实例或错误
pub fn new(config: AnalyticsConfig) -> SDKResult<Self> {
Ok(Self {
/// 构造不会失败,故返回 `Self`(非 `SDKResult`)——#350 P9 接口形状撒谎修正,
/// 与 `PlatformService::new` / `UserService::new` 一致。
pub fn new(config: AnalyticsConfig) -> Self {
Self {
config: Arc::new(config),
})
}
}

/// 获取客户端配置
Expand All @@ -50,6 +44,6 @@ mod tests {
.build();

let service = AnalyticsService::new(config);
assert!(service.is_ok());
assert_eq!(service.config().app_id(), "test_app_id");
}
}
2 changes: 1 addition & 1 deletion crates/openlark-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ declare_client! {
ty: crate::AnalyticsClient,
doc: "Analytics meta 调用链入口:client.analytics.report... ...",
init: |_core_config, _base_core_config| {
crate::AnalyticsClient::new(_core_config.clone())?
crate::AnalyticsClient::new(_core_config.clone())
},
},
{
Expand Down
1 change: 1 addition & 0 deletions crates/openlark-workflow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ tracing = { workspace = true }
[dev-dependencies]
tokio = { workspace = true, features = ["full"] }
insta = { workspace = true }
wiremock = { workspace = true }

[features]
default = ["v1", "v2", "async", "board"]
Expand Down
Loading
Loading