Trait UserManager

Source
pub trait UserManager {
Show 14 methods // Required methods fn user_create<'life0, 'async_trait>( &'life0 self, params: ParamsCreateUser, ) -> Pin<Box<dyn Future<Output = Result<ResponseUserCreate>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_update<'life0, 'async_trait>( &'life0 self, params: ParamsUpdateUser, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_delete<'life0, 'life1, 'async_trait>( &'life0 self, userid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn user_get<'life0, 'life1, 'async_trait>( &'life0 self, userid: &'life1 str, language: Option<ParamLanguage>, ) -> Pin<Box<dyn Future<Output = Result<UserDetail>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn user_list_simple_by_dept<'life0, 'async_trait>( &'life0 self, params: ParamsUserList, ) -> Pin<Box<dyn Future<Output = Result<PageResult<ListUserSimpleResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_list_ids<'life0, 'async_trait>( &'life0 self, dept_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_list<'life0, 'async_trait>( &'life0 self, params: ParamsUserList, ) -> Pin<Box<dyn Future<Output = Result<PageResult<UserDetail>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_count<'life0, 'async_trait>( &'life0 self, only_active: bool, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_inactive_get<'life0, 'async_trait>( &'life0 self, params: ParamsUserInactiveGet, ) -> Pin<Box<dyn Future<Output = Result<PageResult<Vec<String>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_get_by_mobile<'life0, 'life1, 'async_trait>( &'life0 self, mobile: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn user_get_by_unionid<'life0, 'life1, 'async_trait>( &'life0 self, unionid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<UserGetByUnionIdResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn user_admin_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<AdminResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn user_admin_scope_get<'life0, 'life1, 'async_trait>( &'life0 self, userid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn emp_leave_record_list<'life0, 'async_trait>( &'life0 self, param: ParamsEmpLeaveRecordList, ) -> Pin<Box<dyn Future<Output = Result<ResponseEmpLeaveRecordList>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

用户管理

Required Methods§

Source

fn user_create<'life0, 'async_trait>( &'life0 self, params: ParamsCreateUser, ) -> Pin<Box<dyn Future<Output = Result<ResponseUserCreate>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

创建用户 https://open.dingtalk.com/document/orgapp-server/user-information-creation

Source

fn user_update<'life0, 'async_trait>( &'life0 self, params: ParamsUpdateUser, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

更新用户 https://open.dingtalk.com/document/orgapp-server/user-information-update

Source

fn user_delete<'life0, 'life1, 'async_trait>( &'life0 self, userid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

删除用户 https://open.dingtalk.com/document/orgapp-server/delete-a-user

Source

fn user_get<'life0, 'life1, 'async_trait>( &'life0 self, userid: &'life1 str, language: Option<ParamLanguage>, ) -> Pin<Box<dyn Future<Output = Result<UserDetail>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

查询用户详情 https://open.dingtalk.com/document/orgapp-server/query-user-details

Source

fn user_list_simple_by_dept<'life0, 'async_trait>( &'life0 self, params: ParamsUserList, ) -> Pin<Box<dyn Future<Output = Result<PageResult<ListUserSimpleResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取部门用户基础信息 https://open.dingtalk.com/document/orgapp-server/queries-the-simple-information-of-a-department-user

Source

fn user_list_ids<'life0, 'async_trait>( &'life0 self, dept_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取部门用户userid列表 https://open.dingtalk.com/document/orgapp-server/query-the-list-of-department-userids

Source

fn user_list<'life0, 'async_trait>( &'life0 self, params: ParamsUserList, ) -> Pin<Box<dyn Future<Output = Result<PageResult<UserDetail>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取部门用户详情 https://open.dingtalk.com/document/orgapp-server/queries-the-complete-information-of-a-department-user

Source

fn user_count<'life0, 'async_trait>( &'life0 self, only_active: bool, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取员工人数 https://open.dingtalk.com/document/orgapp-server/obtain-the-number-of-employees-v2 @params only_active: 是否包含未激活钉钉人数: false:包含未激活钉钉的人员数量 true:只包含激活钉钉的人员数量

Source

fn user_inactive_get<'life0, 'async_trait>( &'life0 self, params: ParamsUserInactiveGet, ) -> Pin<Box<dyn Future<Output = Result<PageResult<Vec<String>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取未登录钉钉的员工列表 https://open.dingtalk.com/document/orgapp-server/queries-the-inactive-users-or-active-users-under-an-enterprise

Source

fn user_get_by_mobile<'life0, 'life1, 'async_trait>( &'life0 self, mobile: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

根据手机号查询用户, 根据手机号可以查询在职员工的userId。如果员工离职,无法根据手机号获取用户的userId https://open.dingtalk.com/document/orgapp-server/query-users-by-phone-number

Source

fn user_get_by_unionid<'life0, 'life1, 'async_trait>( &'life0 self, unionid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<UserGetByUnionIdResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

根据unionid获取用户userid https://open.dingtalk.com/document/orgapp-server/query-a-user-by-the-union-id

Source

fn user_admin_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<AdminResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取管理员列表 https://open.dingtalk.com/document/orgapp-server/query-the-administrator-list

Source

fn user_admin_scope_get<'life0, 'life1, 'async_trait>( &'life0 self, userid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<i64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取管理员通讯录权限范围 https://open.dingtalk.com/document/orgapp-server/query-permissions-of-the-administrator-address-book

Source

fn emp_leave_record_list<'life0, 'async_trait>( &'life0 self, param: ParamsEmpLeaveRecordList, ) -> Pin<Box<dyn Future<Output = Result<ResponseEmpLeaveRecordList>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

查询离职记录列表 https://open.dingtalk.com/document/orgapp-server/query-the-details-of-employees-who-have-left-office

Implementors§