Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

The SDK's ApplyEventRequest_ApplyData_Contents_Value only had a text property, making it impossible to construct Table (明细) controls with child values when submitting approval applications via ApplyEvent API.

Changes

  • ApplyEventRequest.cs: Extended ApplyEventRequest_ApplyData_Contents_Value with all control type properties per official API:

    • children for Table control rows
    • date, selector, members, departments, files, location, related_approval, date_range, formula, vacation, attendance
    • Added supporting types: ApplyEventRequest_TableChildren, ApplyEventRequest_Date, ApplyEventRequest_Selector, etc.
  • GetApprovalDetailResult.cs: Parallel enhancement for parsing API responses with the same control types

Usage

var tableContent = new ApplyEventRequest_ApplyData_Contents
{
    control = "Table",
    id = "Table-xxxxx",
    value = new ApplyEventRequest_ApplyData_Contents_Value
    {
        children = new List<ApplyEventRequest_TableChildren>
        {
            new ApplyEventRequest_TableChildren
            {
                list = new List<ApplyEventRequest_ApplyData_Contents>
                {
                    new ApplyEventRequest_ApplyData_Contents
                    {
                        control = "Text",
                        id = "Text-xxxxx",
                        value = new ApplyEventRequest_ApplyData_Contents_Value { text = "Row 1" }
                    },
                    new ApplyEventRequest_ApplyData_Contents
                    {
                        control = "Number", 
                        id = "Number-xxxxx",
                        value = new ApplyEventRequest_ApplyData_Contents_Value { new_number = "100" }
                    }
                }
            }
        }
    }
};
Original prompt

This section details on the original issue you should resolve

<issue_title>企业微信审批表单如何构建明细控件的子控件</issue_title>
<issue_description>我很疑惑的是企业微信审批表单应该如何去构建明细控件的值,其中的子控件的值应该如何去传递。</issue_description>

<agent_instructions>查找微信官方文档并结合 Senparc.Weixin SDK 回答</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@JeffreySu @Nice-Ljn 先看一下官方的文档。如果看完还不明白,可以把 URL 发在里,帮您解答。

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix child control value transmission in WeChat approval forms Add Table (明细) control support for WeChat Work approval forms Dec 2, 2025
Copilot AI requested a review from JeffreySu December 2, 2025 04:13
Copilot finished work on behalf of JeffreySu December 2, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants