pub trait DepartmentManager {
// Required methods
fn department_create<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentCreate,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn department_update<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentUpdate,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn department_delete<'life0, 'async_trait>(
&'life0 self,
dept_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn department_detail<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentList,
) -> Pin<Box<dyn Future<Output = Result<DeptDetailResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn department_list<'life0, 'async_trait>(
&'life0 self,
params: Option<ParamsDepartmentList>,
) -> Pin<Box<dyn Future<Output = Result<Vec<DeptBaseResponse>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn department_list_sub_ids<'life0, 'async_trait>(
&'life0 self,
id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn department_list_parent_ids_by_dept_id<'life0, 'async_trait>(
&'life0 self,
dept_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn department_list_parent_ids_by_userid<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ParentDeptIdList>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Methods§
Sourcefn department_create<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentCreate,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn department_create<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentCreate,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
创建部门 https://open.dingtalk.com/document/orgapp-server/create-a-department-v2
Sourcefn department_update<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentUpdate,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn department_update<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentUpdate,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
更新部门 https://open.dingtalk.com/document/orgapp-server/update-a-department-v2
Sourcefn department_delete<'life0, 'async_trait>(
&'life0 self,
dept_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn department_delete<'life0, 'async_trait>(
&'life0 self,
dept_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
删除部门 https://open.dingtalk.com/document/orgapp-server/delete-a-department-v2
Sourcefn department_detail<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentList,
) -> Pin<Box<dyn Future<Output = Result<DeptDetailResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn department_detail<'life0, 'async_trait>(
&'life0 self,
params: ParamsDepartmentList,
) -> Pin<Box<dyn Future<Output = Result<DeptDetailResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取部门详情 https://open.dingtalk.com/document/orgapp-server/query-department-details0-v2
Sourcefn department_list<'life0, 'async_trait>(
&'life0 self,
params: Option<ParamsDepartmentList>,
) -> Pin<Box<dyn Future<Output = Result<Vec<DeptBaseResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn department_list<'life0, 'async_trait>(
&'life0 self,
params: Option<ParamsDepartmentList>,
) -> Pin<Box<dyn Future<Output = Result<Vec<DeptBaseResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取部门列表 https://open.dingtalk.com/document/orgapp-server/obtain-the-department-list-v2
Sourcefn department_list_sub_ids<'life0, 'async_trait>(
&'life0 self,
id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn department_list_sub_ids<'life0, 'async_trait>(
&'life0 self,
id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取子部门ID列表 https://open.dingtalk.com/document/orgapp-server/obtain-a-sub-department-id-list-v2
Sourcefn department_list_parent_ids_by_dept_id<'life0, 'async_trait>(
&'life0 self,
dept_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn department_list_parent_ids_by_dept_id<'life0, 'async_trait>(
&'life0 self,
dept_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取指定部门的所有父部门列表 https://open.dingtalk.com/document/orgapp-server/query-the-list-of-all-parent-departments-of-a-department
Sourcefn department_list_parent_ids_by_userid<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ParentDeptIdList>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn department_list_parent_ids_by_userid<'life0, 'life1, 'async_trait>(
&'life0 self,
userid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ParentDeptIdList>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
获取指定用户的所有父部门列表 https://open.dingtalk.com/document/orgapp-server/queries-the-list-of-all-parent-departments-of-a-user