@tnwx/wxcp
Version:
TNWX 微信系开发脚手架之极速开发企业微信/企业号
141 lines (140 loc) • 6.14 kB
TypeScript
/**
* @author Javen
* @copyright javendev@126.com
* @description OA 相关接口
*/
export declare class QyOAApi {
private static addCalendarUrl;
/**
* 创建日历
* @param organizer 指定的组织者userid
* @param summary 日历标题。1 ~ 128 字符
* @param color 日历在终端上显示的颜色,RGB颜色编码16进制表示,例如:”#0000FF” 表示纯蓝色
* @param description 日历描述。0 ~ 512 字符
* @param shares 日历共享成员列表。最多2000人
*/
static addCalendar(organizer: string, summary: string, color: string, description?: string, shares?: Array<Attendees>): Promise<any>;
private static updateCalendarUrl;
/**
* 更新日历
* @param calId 日历ID
* @param summary 日历标题。1 ~ 128 字符
* @param color 日历在终端上显示的颜色,RGB颜色编码16进制表示,例如:”#0000FF” 表示纯蓝色
* @param description 日历描述。0 ~ 512 字符
* @param shares 日历共享成员列表。最多2000人
*/
static updateCalendar(calId: string, summary: string, color: string, description?: string, shares?: Array<Attendees>): Promise<any>;
private static getCalendarUrl;
/**
* 获取日历
* @param calIdList 日历ID列表。一次最多可获取1000条
*/
static getCalendar(calIdList: Array<string>): Promise<any>;
private static delCalendarUrl;
/**
* 删除日历
* @param calId 日历ID
*/
static delCalendar(calId: string): Promise<any>;
private static addScheduleUrl;
/**
* 创建日程
* @param organizer 组织者
* @param startTime 日程开始时间,Unix时间戳
* @param endTime 日程结束时间,Unix时间戳
* @param attendees 日程参与者列表。最多支持2000人
* @param summary 日程标题。0 ~ 128 字符。不填会默认显示为“新建事件”
* @param description 日程描述。0 ~ 512 字符
* @param reminders 提醒相关信息
* @param location 日程地址。0 ~ 128 字符
* @param calId 日程所属日历ID
*/
static addSchedule(organizer: string, startTime: number, endTime: number, attendees?: Array<Attendees>, summary?: string, description?: string, reminders?: Reminders, location?: string, calId?: string): Promise<any>;
private static updateScheduleUrl;
/**
* 更新日程
* @param organizer 组织者
* @param scheduleId 日程ID
* @param startTime 日程开始时间,Unix时间戳
* @param endTime 日程结束时间,Unix时间戳
* @param attendees 日程参与者列表。最多支持2000人
* @param summary 日程标题。0 ~ 128 字符。不填会默认显示为“新建事件”
* @param description 日程描述。0 ~ 512 字符
* @param reminders 提醒相关信息
* @param location 日程地址。0 ~ 128 字符
* @param calId 日程所属日历ID
*/
static updateSchedule(organizer: string, scheduleId: string, startTime: number, endTime: number, attendees?: Array<Attendees>, summary?: string, description?: string, reminders?: Reminders, location?: string, calId?: string): Promise<any>;
private static getScheduleUrl;
/**
* 获取日程
* @param scheduleIdList 日程ID列表。一次最多拉取1000条
*/
static getSchedule(scheduleIdList: Array<string>): Promise<any>;
private static delScheduleUrl;
/**
* 删除日程
* @param scheduleId 日程ID
*/
static delSchedule(scheduleId: string): Promise<any>;
private static getScheduleByCalendarUrl;
/**
* 获取日历下的日程列表
* @param calId 日历ID
* @param offset 分页,偏移量, 默认为0
* @param limit 分页,预期请求的数据量,默认为500,取值范围 1 ~ 1000
*/
static getScheduleByCalendar(calId: string, offset?: number, limit?: number): Promise<any>;
private static getDialRecordUrl;
/**
* 获取公费电话拨打记录
* @param startTime 查询的起始时间戳
* @param endTime 查询的结束时间戳
* @param offset 分页查询的偏移量
* @param limit 分页查询的每页大小,默认为100条,如该参数大于100则按100处理
*/
static getDialRecord(startTime: number, endTime: number, offset: number, limit: 100): Promise<any>;
private static getCheckInDataUrl;
/**
* 获取打卡数据
* @param checkInType 打卡类型。1:上下班打卡;2:外出打卡;3:全部打卡
* @param startTime 获取打卡记录的开始时间。Unix时间戳
* @param endTime 获取打卡记录的结束时间。Unix时间戳
* @param userIdList 需要获取打卡记录的用户列表
*/
static getCheckInData(checkInType: number, startTime: number, endTime: number, userIdList: Array<string>): Promise<any>;
private static getCheckInoptionUrl;
/**
* 获取打卡规则
* @param datetime 需要获取规则的日期当天0点的Unix时间戳
* @param userIdList 需要获取打卡规则的用户列表
*/
static getCheckInoption(datetime: number, userIdList: Array<string>): Promise<any>;
private static getTemplateDetailUrl;
/**
* 获取审批模板详情
* @param templateId 模板的唯一标识id
*/
static getTemplateDetail(templateId: string): Promise<any>;
}
export declare class Attendees {
private userid;
constructor(userId: string);
get userId(): string;
set userId(userId: string);
}
export declare class Reminders {
private is_remind;
private remind_before_event_secs;
private is_repeat;
private repeat_type;
constructor(isRemind: number, remindBeforeEventSecs: number, isRepeat: number, repeatType: number);
get isRemind(): number;
set isRemind(isRemind: number);
get remindBeforeEventSecs(): number;
set remindBeforeEventSecs(remindBeforeEventSecs: number);
get isRepeat(): number;
set isRepeat(isRepeat: number);
get repeatType(): number;
set repeatType(repeatType: number);
}