Skip to content

Commit

Permalink
【飞书人事】
Browse files Browse the repository at this point in the history
变更
- 批量查询员工假期余额
- 批量查询员工请假记录
  • Loading branch information
Vicente.Yu committed Jun 3, 2024
1 parent 9fb0d61 commit d3ac251
Show file tree
Hide file tree
Showing 8 changed files with 232 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public record GetCorehrV1LeavesLeaveBalancesResponseDto
/// <summary>
/// <para>员工假期余额信息列表</para>
/// <para>必填:否</para>
/// <para>示例值:0</para>
/// </summary>
[JsonPropertyName("employment_leave_balance_list")]
public EmploymentLeaveBalance[]? EmploymentLeaveBalanceLists { get; set; }
Expand Down Expand Up @@ -170,7 +171,7 @@ public record I18n
/// <summary>
/// <para>分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token</para>
/// <para>必填:否</para>
/// <para>示例值:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9</para>
/// <para>示例值:{\"eu_nc\":\"[\\\"6994333322503669260\\\"]\"}</para>
/// </summary>
[JsonPropertyName("page_token")]
public string? PageToken { get; set; }
Expand Down
147 changes: 146 additions & 1 deletion src/FeishuPeople/GetCorehrV1LeavesLeaveRequestHistoryResponseDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,151 @@ public record I18n
/// </summary>
[JsonPropertyName("notes")]
public string Notes { get; set; } = string.Empty;

/// <summary>
/// <para>审批通过日期</para>
/// <para>必填:否</para>
/// <para>示例值:2022-09-09</para>
/// </summary>
[JsonPropertyName("approval_date")]
public string? ApprovalDate { get; set; }

/// <summary>
/// <para>是否带薪</para>
/// <para>必填:否</para>
/// <para>示例值:false</para>
/// </summary>
[JsonPropertyName("is_deducted")]
public bool? IsDeducted { get; set; }

/// <summary>
/// <para>请假详情</para>
/// <para>必填:否</para>
/// </summary>
[JsonPropertyName("details")]
public LeaveRequestDetail[]? Details { get; set; }

/// <summary>
/// <para>请假详情</para>
/// </summary>
public record LeaveRequestDetail
{
/// <summary>
/// <para>请假记录id</para>
/// <para>必填:是</para>
/// <para>示例值:4718803945687580505</para>
/// </summary>
[JsonPropertyName("leave_request_id")]
public string LeaveRequestId { get; set; } = string.Empty;

/// <summary>
/// <para>假期发生日期</para>
/// <para>必填:是</para>
/// <para>示例值:2022-07-07</para>
/// </summary>
[JsonPropertyName("leave_date")]
public string LeaveDate { get; set; } = string.Empty;

/// <summary>
/// <para>假期时长</para>
/// <para>必填:是</para>
/// <para>示例值:1</para>
/// </summary>
[JsonPropertyName("leave_duration")]
public string LeaveDuration { get; set; } = string.Empty;

/// <summary>
/// <para>假期时长单位,1:天,2:小时</para>
/// <para>必填:是</para>
/// <para>示例值:1</para>
/// </summary>
[JsonPropertyName("leave_duration_unit")]
public int LeaveDurationUnit { get; set; }

/// <summary>
/// <para>是否影响算薪,1:不参与算薪计算, 非对应的日期类型或者无对应的假期计划,2:影响算薪,3:不影响算薪</para>
/// <para>必填:是</para>
/// <para>示例值:1</para>
/// </summary>
[JsonPropertyName("paid_type")]
public int PaidType { get; set; }
}

/// <summary>
/// <para>假期类型枚举</para>
/// <para>必填:否</para>
/// <para>示例值:Annual Leave</para>
/// </summary>
[JsonPropertyName("leave_type_code")]
public string? LeaveTypeCode { get; set; }

/// <summary>
/// <para>实际结束日期</para>
/// <para>必填:否</para>
/// <para>示例值:2022-08-02</para>
/// </summary>
[JsonPropertyName("actual_end_date")]
public string? ActualEndDate { get; set; }

/// <summary>
/// <para>预估结束日期</para>
/// <para>必填:否</para>
/// <para>示例值:2022-08-02</para>
/// </summary>
[JsonPropertyName("estimated_end_date")]
public string? EstimatedEndDate { get; set; }

/// <summary>
/// <para>时区</para>
/// <para>必填:否</para>
/// <para>示例值:Asia/Shanghai</para>
/// </summary>
[JsonPropertyName("time_zone")]
public string? TimeZone { get; set; }

/// <summary>
/// <para>请假记录数据来源</para>
/// <para>必填:否</para>
/// <para>示例值:1</para>
/// </summary>
[JsonPropertyName("data_source")]
public int? DataSource { get; set; }

/// <summary>
/// <para>请假申请流程ID</para>
/// <para>必填:否</para>
/// </summary>
[JsonPropertyName("leave_process_id")]
public string[]? LeaveProcessId { get; set; }

/// <summary>
/// <para>请假更正流程ID</para>
/// <para>必填:否</para>
/// </summary>
[JsonPropertyName("leave_correct_process_id")]
public string[]? LeaveCorrectProcessId { get; set; }

/// <summary>
/// <para>请假取消流程ID</para>
/// <para>必填:否</para>
/// </summary>
[JsonPropertyName("leave_cancel_process_id")]
public string[]? LeaveCancelProcessId { get; set; }

/// <summary>
/// <para>请假返岗流程ID</para>
/// <para>必填:否</para>
/// </summary>
[JsonPropertyName("leave_return_process_id")]
public string[]? LeaveReturnProcessId { get; set; }

/// <summary>
/// <para>workDay算薪类型</para>
/// <para>必填:否</para>
/// <para>示例值:1</para>
/// </summary>
[JsonPropertyName("wd_paid_type")]
public int? WdPaidType { get; set; }
}

/// <summary>
Expand All @@ -192,7 +337,7 @@ public record I18n
/// <summary>
/// <para>分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token</para>
/// <para>必填:否</para>
/// <para>示例值:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9</para>
/// <para>示例值:[1712932008000,\"7356863257632491046\"]</para>
/// </summary>
[JsonPropertyName("page_token")]
public string? PageToken { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions src/FeishuPeople/PostCorehrV1OffboardingsSubmitResponseDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public record PostCorehrV1OffboardingsSubmitResponseDto
/// <para>示例值:false</para>
/// </summary>
[JsonPropertyName("add_block_list")]
public string? AddBlockList { get; set; }
public bool? AddBlockList { get; set; }

/// <summary>
/// <para>屏蔽原因</para>
Expand All @@ -67,15 +67,15 @@ public record PostCorehrV1OffboardingsSubmitResponseDto
/// <summary>
/// <para>屏蔽原因说明</para>
/// <para>必填:否</para>
/// <para>示例值:xx年xx月xx日因xx原因红线</para>
/// <para>示例值:xx 年 xx 月 xx 日因 xx 原因红线</para>
/// </summary>
[JsonPropertyName("block_reason_explanation")]
public string? BlockReasonExplanation { get; set; }

/// <summary>
/// <para>创建时间</para>
/// <para>必填:否</para>
/// <para>示例值:2022-05-0917:50:17</para>
/// <para>示例值:2022-05-09 17:50:17</para>
/// </summary>
[JsonPropertyName("created_time")]
public string? CreatedTime { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Helpdesk/GetHelpdeskV1AgentSkillRulesResponseDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public record AgentSkillRule
public int[]? OperatorOptions { get; set; }

/// <summary>
/// <para>rule 操作数的值</para>
/// <para>rule 操作数的值。该参数类型为泛型,会指向多类型。</para>
/// <para>必填:否</para>
/// <para>示例值:{\"selected_departments\":[{\"id\":\"部门ID\",\"name\":\"IT\"}]}</para>
/// </summary>
Expand Down
74 changes: 72 additions & 2 deletions src/IFeishuTenantApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20974,13 +20974,20 @@ System.Threading.Tasks.Task<FeishuResponse> PostContactV3UsersByUserIdResurrectA
/// </list>
/// <para>默认值:people_corehr_id</para>
/// </param>
/// <param name="time_zone">
/// <para>必填:否</para>
/// <para>查询时区</para>
/// <para>示例值:Asia/Shanghai</para>
/// <para>默认值:null</para>
/// </param>
[HttpGet("/open-apis/corehr/v1/leaves/leave_balances")]
System.Threading.Tasks.Task<FeishuResponse<FeishuPeople.GetCorehrV1LeavesLeaveBalancesResponseDto>> GetCorehrV1LeavesLeaveBalancesAsync(
[PathQuery] string? page_token = null,
[PathQuery] int page_size = 10,
[PathQuery] string? as_of_date = null,
[PathQuery] string[]? employment_id_list = null,
[PathQuery] string? user_id_type = "people_corehr_id");
[PathQuery] string? user_id_type = "people_corehr_id",
[PathQuery] string? time_zone = null);

/// <summary>
/// <para>【飞书人事】获取假期类型列表</para>
Expand Down Expand Up @@ -21142,6 +21149,60 @@ System.Threading.Tasks.Task<FeishuResponse> PostContactV3UsersByUserIdResurrectA
/// <para>示例值:2022-10-24 10:00:00</para>
/// <para>默认值:null</para>
/// </param>
/// <param name="return_detail">
/// <para>必填:否</para>
/// <para>是否返回请假详情,若为true,将在每条请假记录的details字段返回请假详情</para>
/// <para>示例值:false</para>
/// <para>默认值:false</para>
/// </param>
/// <param name="leave_term_type">
/// <para>必填:否</para>
/// <para>指定过滤长/短假类型,0表示不过滤,1表示仅获取短假,2表示仅获取长假, 默认0</para>
/// <para>示例值:1</para>
/// <para>默认值:0</para>
/// </param>
/// <param name="time_zone">
/// <para>必填:否</para>
/// <para>请假记录所在时区</para>
/// <para>示例值:Asia/Shanghai</para>
/// <para>默认值:null</para>
/// </param>
/// <param name="data_source">
/// <para>必填:否</para>
/// <para>请假记录数据源,1表示中国大陆休假,2表示海外休假,不传或0表示不过滤</para>
/// <para>示例值:1</para>
/// <para>默认值:null</para>
/// </param>
/// <param name="db_update_time_min">
/// <para>必填:否</para>
/// <para>请假记录DB更新时间晚于等于的时间</para>
/// <para>示例值:2022-10-24 10:00:00</para>
/// <para>默认值:null</para>
/// </param>
/// <param name="db_update_time_max">
/// <para>必填:否</para>
/// <para>请假记录DB更新时间早于等于的时间</para>
/// <para>示例值:2022-10-24 10:00:00</para>
/// <para>默认值:null</para>
/// </param>
/// <param name="wd_need_amount_zero_records">
/// <para>必填:否</para>
/// <para>WorkDay专用 是否返回0值的请假记录,若为true,将返回0值的请假记录</para>
/// <para>示例值:false</para>
/// <para>默认值:false</para>
/// </param>
/// <param name="wd_need_denied_and_canceled_record">
/// <para>必填:否</para>
/// <para>WorkDay专用 是否拒绝和取消的请假记录,若为true,将返回拒绝和取消的请假记录</para>
/// <para>示例值:false</para>
/// <para>默认值:false</para>
/// </param>
/// <param name="wd_paid_type">
/// <para>必填:否</para>
/// <para>WorkDay专用 扣薪类型, 1不参与算薪 2影响算薪 3不影响算薪</para>
/// <para>示例值:1</para>
/// <para>默认值:null</para>
/// </param>
[HttpGet("/open-apis/corehr/v1/leaves/leave_request_history")]
System.Threading.Tasks.Task<FeishuResponse<FeishuPeople.GetCorehrV1LeavesLeaveRequestHistoryResponseDto>> GetCorehrV1LeavesLeaveRequestHistoryAsync(
[PathQuery] string? page_token = null,
Expand All @@ -21158,7 +21219,16 @@ System.Threading.Tasks.Task<FeishuResponse> PostContactV3UsersByUserIdResurrectA
[PathQuery] string? leave_submit_date_max = null,
[PathQuery] string? user_id_type = "people_corehr_id",
[PathQuery] string? leave_update_time_min = null,
[PathQuery] string? leave_update_time_max = null);
[PathQuery] string? leave_update_time_max = null,
[PathQuery] bool? return_detail = false,
[PathQuery] int? leave_term_type = 0,
[PathQuery] string? time_zone = null,
[PathQuery] int? data_source = null,
[PathQuery] string? db_update_time_min = null,
[PathQuery] string? db_update_time_max = null,
[PathQuery] bool? wd_need_amount_zero_records = false,
[PathQuery] bool? wd_need_denied_and_canceled_record = false,
[PathQuery] int? wd_paid_type = null);

/// <summary>
/// <para>【飞书人事】删除假期发放记录</para>
Expand Down
6 changes: 3 additions & 3 deletions src/Im/PostImV2AppFeedCardBodyDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ public record OpenAppFeedCardButtons
public record OpenAppFeedCardButton
{
/// <summary>
/// <para>跳转 URL</para>
/// <para>跳转 URL(仅支持 https 协议)</para>
/// <para>必填:否</para>
/// </summary>
[JsonPropertyName("multi_url")]
public OpenAppFeedCardUrl? MultiUrl { get; set; }

/// <summary>
/// <para>跳转 URL</para>
/// <para>跳转 URL(仅支持 https 协议)</para>
/// </summary>
public record OpenAppFeedCardUrl
{
Expand Down Expand Up @@ -245,7 +245,7 @@ public record OpenAppFeedCardText
public record OpenAppFeedLink
{
/// <summary>
/// <para>链接</para>
/// <para>链接(仅支持 https 协议)</para>
/// <para>必填:否</para>
/// <para>示例值:https://www.feishu.cn/</para>
/// <para>最大长度:700</para>
Expand Down
6 changes: 3 additions & 3 deletions src/Im/PutImV2AppFeedCardBatchBodyDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ public record OpenAppFeedCardButtons
public record OpenAppFeedCardButton
{
/// <summary>
/// <para>跳转 URL</para>
/// <para>跳转 URL(仅支持 https 协议)</para>
/// <para>必填:否</para>
/// </summary>
[JsonPropertyName("multi_url")]
public OpenAppFeedCardUrl? MultiUrl { get; set; }

/// <summary>
/// <para>跳转 URL</para>
/// <para>跳转 URL(仅支持 https 协议)</para>
/// </summary>
public record OpenAppFeedCardUrl
{
Expand Down Expand Up @@ -259,7 +259,7 @@ public record OpenAppFeedCardText
public record OpenAppFeedLink
{
/// <summary>
/// <para>链接</para>
/// <para>链接(仅支持 https 协议)</para>
/// <para>必填:否</para>
/// <para>示例值:https://www.feishu.cn/</para>
/// <para>最大长度:700</para>
Expand Down
4 changes: 2 additions & 2 deletions src/Im/PutImV2ChatButtonBodyDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ public record OpenAppFeedCardButtons
public record OpenAppFeedCardButton
{
/// <summary>
/// <para>跳转 URL</para>
/// <para>跳转 URL(仅支持 https 协议)</para>
/// <para>必填:否</para>
/// </summary>
[JsonPropertyName("multi_url")]
public OpenAppFeedCardUrl? MultiUrl { get; set; }

/// <summary>
/// <para>跳转 URL</para>
/// <para>跳转 URL(仅支持 https 协议)</para>
/// </summary>
public record OpenAppFeedCardUrl
{
Expand Down

0 comments on commit d3ac251

Please sign in to comment.