Skip to content

Commit

Permalink
新增22个接口
Browse files Browse the repository at this point in the history
Signed-off-by: Vicente.Yu <^@^>
  • Loading branch information
Vicente.Yu committed Oct 25, 2023
1 parent ac79054 commit 5c4b03c
Show file tree
Hide file tree
Showing 31 changed files with 2,160 additions and 143 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

飞书开放平台网址:[https://open.feishu.cn/](https://open.feishu.cn/)

接口清单详见:[TenantAccessToken适用接口清单-947个](https://github.com/vicenteyu/FeishuNetSdk/blob/main/TenantAccessList.md)
接口清单详见:[TenantAccessToken适用接口清单-969个](https://github.com/vicenteyu/FeishuNetSdk/blob/main/TenantAccessList.md)

## 自建应用用法

Expand Down
294 changes: 158 additions & 136 deletions TenantAccessList.md

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions src/Baike/PostLingoV1EntitiesBatchHighlightBodyDto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Newtonsoft.Json;
namespace FeishuNetSdk.Baike;
/// <summary>
/// 批量高亮 请求体
/// <para>通过这个接口,可以传入一段文本,获取这段文本中所有词条的 ID</para>
/// <para>接口ID:7293809202833342492</para>
/// <para>文档地址:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/batch_highlight</para>
/// <para>JSON地址:https://open.feishu.cn/document_portal/v1/document/get_detail?fullPath=%2fuAjLw4CM%2fukTMukTMukTM%2flingo-v1%2fentity%2fbatch_highlight</para>
/// </summary>
public record PostLingoV1EntitiesBatchHighlightBodyDto
{
/// <summary>
/// <para>一批需要被识别词条的文本(一批不要超过20段文本,每段文本不要超过1000字)</para>
/// <para>必填:是</para>
/// <para>最大长度:20</para>
/// <para>最小长度:1</para>
/// </summary>
[JsonProperty("texts")]
public string[] Texts { get; set; } = Array.Empty<string>();
}
36 changes: 36 additions & 0 deletions src/Baike/PostLingoV1EntitiesBatchHighlightResponseDto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Newtonsoft.Json;
namespace FeishuNetSdk.Baike;
/// <summary>
/// 批量高亮 响应体
/// <para>通过这个接口,可以传入一段文本,获取这段文本中所有词条的 ID</para>
/// <para>接口ID:7293809202833342492</para>
/// <para>文档地址:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/batch_highlight</para>
/// <para>JSON地址:https://open.feishu.cn/document_portal/v1/document/get_detail?fullPath=%2fuAjLw4CM%2fukTMukTMukTM%2flingo-v1%2fentity%2fbatch_highlight</para>
/// </summary>
public record PostLingoV1EntitiesBatchHighlightResponseDto
{
/// <summary>
/// <para>和输入texts对应长度的段落实体词信息</para>
/// <para>必填:否</para>
/// </summary>
[JsonProperty("phrases")]
public Phrase[][]? Phrases { get; set; }

public record Phrase
{
[JsonProperty("name")]
public string Name { get; set; } = string.Empty;

[JsonProperty("entity_ids")]
public string[] EntityIds { get; set; } = Array.Empty<string>();

public record SpanSuffix
{
[JsonProperty("start")]
public int Start { get; set; }

[JsonProperty("end")]
public int End { get; set; }
}
}
}
7 changes: 2 additions & 5 deletions src/FeishuNetSdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>FeishuNetSdk</Title>
<Authors>Vicente Yu</Authors>
<PackageProjectUrl>https://github.com/vicenteyu/FeishuNetSdk</PackageProjectUrl>
Expand All @@ -15,15 +15,14 @@
<Copyright>MIT</Copyright>
<Description>适用于飞书开放平台的.Net开发包</Description>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Version>1.0.3</Version>
<Version>1.0.4</Version>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Acs\**" />
<Compile Remove="Ai\**" />
<Compile Remove="Auth\**" />
<Compile Remove="Ehr\**" />
<Compile Remove="Event\**" />
<Compile Remove="Human_Authentication\**" />
<Compile Remove="Meeting_Room\**" />
<Compile Remove="Passport\**" />
Expand All @@ -33,7 +32,6 @@
<EmbeddedResource Remove="Ai\**" />
<EmbeddedResource Remove="Auth\**" />
<EmbeddedResource Remove="Ehr\**" />
<EmbeddedResource Remove="Event\**" />
<EmbeddedResource Remove="Human_Authentication\**" />
<EmbeddedResource Remove="Meeting_Room\**" />
<EmbeddedResource Remove="Passport\**" />
Expand All @@ -43,7 +41,6 @@
<None Remove="Ai\**" />
<None Remove="Auth\**" />
<None Remove="Ehr\**" />
<None Remove="Event\**" />
<None Remove="Human_Authentication\**" />
<None Remove="Meeting_Room\**" />
<None Remove="Passport\**" />
Expand Down
88 changes: 88 additions & 0 deletions src/Hire/PatchHireV1EcoAccountCustomFieldsBatchUpdateBodyDto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
using Newtonsoft.Json;
namespace FeishuNetSdk.Hire;
/// <summary>
/// 更新账号自定义字段 请求体
/// <para>更新用户在服务商处的身份标示字段(如用户在服务商处的租户 ID),此方法只会更新同一 scope 内 key 一致的自定义字段。</para>
/// <para>接口ID:7195815979079434241</para>
/// <para>文档地址:https://open.feishu.cn/document/server-docs/hire-v1/ecological-docking/eco_account_custom_field/batch_update</para>
/// <para>JSON地址:https://open.feishu.cn/document_portal/v1/document/get_detail?fullPath=%2fukTMukTMukTM%2fuMzM1YjLzMTN24yMzUjN%2fhire-v1%2feco_account_custom_field%2fbatch_update</para>
/// </summary>
public record PatchHireV1EcoAccountCustomFieldsBatchUpdateBodyDto
{
/// <summary>
/// <para>适用范围</para>
/// <para>必填:是</para>
/// <para>示例值:1</para>
/// <para>可选值:<list type="bullet">
/// <item>1:背调</item>
/// <item>2:笔试</item>
/// </list></para>
/// </summary>
[JsonProperty("scope")]
public int Scope { get; set; }

/// <summary>
/// <para>自定义字段列表</para>
/// <para>必填:是</para>
/// </summary>
[JsonProperty("custom_field_list")]
public EcoAccountCustomFieldData[] CustomFieldLists { get; set; } = Array.Empty<EcoAccountCustomFieldData>();

/// <summary>
/// <para>自定义字段列表</para>
/// </summary>
public record EcoAccountCustomFieldData
{
/// <summary>
/// <para>自定义字段的标识,同一 scope 内须唯一</para>
/// <para>必填:是</para>
/// <para>示例值:org_id</para>
/// </summary>
[JsonProperty("key")]
public string Key { get; set; } = string.Empty;

/// <summary>
/// <para>自定义字段的名称,用户在添加账号表单看到的控件标题</para>
/// <para>必填:是</para>
/// </summary>
[JsonProperty("name")]
public I18n Name { get; set; } = new();

/// <summary>
/// <para>自定义字段的名称,用户在添加账号表单看到的控件标题</para>
/// </summary>
public record I18n
{
/// <summary>
/// <para>中文</para>
/// <para>必填:否</para>
/// <para>示例值:测试</para>
/// </summary>
[JsonProperty("zh_cn")]
public string? ZhCn { get; set; }

/// <summary>
/// <para>英文</para>
/// <para>必填:否</para>
/// <para>示例值:test</para>
/// </summary>
[JsonProperty("en_us")]
public string? EnUs { get; set; }
}

/// <summary>
/// <para>是否必填</para>
/// <para>必填:是</para>
/// <para>示例值:true</para>
/// </summary>
[JsonProperty("is_required")]
public bool IsRequired { get; set; }

/// <summary>
/// <para>自定义字段的描述,用户在添加账号表单看到的 place holder</para>
/// <para>必填:否</para>
/// </summary>
[JsonProperty("description")]
public I18n? Description { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
using Newtonsoft.Json;
namespace FeishuNetSdk.Hire;
/// <summary>
/// 更新背调自定义字段 请求体
/// <para>更新用户在发起背调时的自定义字段。更新操作不支持更新自定义字段类型,只允许更新字段名称,且将影响已发起的背调表单展示。</para>
/// <para>接口ID:7195815976042594306</para>
/// <para>文档地址:https://open.feishu.cn/document/server-docs/hire-v1/ecological-docking/eco_background_check_custom_field/batch_update</para>
/// <para>JSON地址:https://open.feishu.cn/document_portal/v1/document/get_detail?fullPath=%2fukTMukTMukTM%2fuMzM1YjLzMTN24yMzUjN%2fhire-v1%2feco_background_check_custom_field%2fbatch_update</para>
/// </summary>
public record PatchHireV1EcoBackgroundCheckCustomFieldsBatchUpdateBodyDto
{
/// <summary>
/// <para>背调账号 ID,可在「账号绑定」事件中获取</para>
/// <para>必填:是</para>
/// <para>示例值:6995842370159937061</para>
/// </summary>
[JsonProperty("account_id")]
public string AccountId { get; set; } = string.Empty;

/// <summary>
/// <para>自定义字段列表</para>
/// <para>必填:是</para>
/// </summary>
[JsonProperty("custom_field_list")]
public EcoBackgroundCheckCustomFieldData[] CustomFieldLists { get; set; } = Array.Empty<EcoBackgroundCheckCustomFieldData>();

/// <summary>
/// <para>自定义字段列表</para>
/// </summary>
public record EcoBackgroundCheckCustomFieldData
{
/// <summary>
/// <para>自定义字段类型</para>
/// <para>必填:是</para>
/// <para>示例值:text</para>
/// <para>可选值:<list type="bullet">
/// <item>text:单行文本,最多100个汉字</item>
/// <item>textarea:多行文本,最多200个汉字</item>
/// <item>number:数字</item>
/// <item>boolean:布尔</item>
/// <item>select:单选</item>
/// <item>multiselect:多选</item>
/// <item>date:日期</item>
/// <item>file:附件</item>
/// <item>resume:候选人简历</item>
/// </list></para>
/// </summary>
[JsonProperty("type")]
public string Type { get; set; } = string.Empty;

/// <summary>
/// <para>自定义字段的标识,在同一账号内唯一</para>
/// <para>必填:是</para>
/// <para>示例值:candidate_resume</para>
/// </summary>
[JsonProperty("key")]
public string Key { get; set; } = string.Empty;

/// <summary>
/// <para>自定义字段的名称,用户在安排背调表单看到的控件标题</para>
/// <para>必填:是</para>
/// </summary>
[JsonProperty("name")]
public I18n Name { get; set; } = new();

/// <summary>
/// <para>自定义字段的名称,用户在安排背调表单看到的控件标题</para>
/// </summary>
public record I18n
{
/// <summary>
/// <para>中文</para>
/// <para>必填:否</para>
/// <para>示例值:测试</para>
/// </summary>
[JsonProperty("zh_cn")]
public string? ZhCn { get; set; }

/// <summary>
/// <para>英文</para>
/// <para>必填:否</para>
/// <para>示例值:test</para>
/// </summary>
[JsonProperty("en_us")]
public string? EnUs { get; set; }
}

/// <summary>
/// <para>是否必填</para>
/// <para>必填:是</para>
/// <para>示例值:true</para>
/// </summary>
[JsonProperty("is_required")]
public bool IsRequired { get; set; }

/// <summary>
/// <para>自定义字段的描述,如果是输入控件,为用户在安排背调表单看到的 placeholder 或 提示文字</para>
/// <para>必填:否</para>
/// </summary>
[JsonProperty("description")]
public I18n? Description { get; set; }

/// <summary>
/// <para>type 为 select 或 multiselect 时必填,单选或多选的选项</para>
/// <para>必填:否</para>
/// </summary>
[JsonProperty("options")]
public EcoBackgroundCheckCustomFieldDataOption[]? Options { get; set; }

/// <summary>
/// <para>type 为 select 或 multiselect 时必填,单选或多选的选项</para>
/// </summary>
public record EcoBackgroundCheckCustomFieldDataOption
{
/// <summary>
/// <para>选项的 key</para>
/// <para>必填:是</para>
/// <para>示例值:A</para>
/// </summary>
[JsonProperty("key")]
public string Key { get; set; } = string.Empty;

/// <summary>
/// <para>选项的名称</para>
/// <para>必填:是</para>
/// </summary>
[JsonProperty("name")]
public I18n Name { get; set; } = new();

/// <summary>
/// <para>选项的名称</para>
/// </summary>
public record I18n
{
/// <summary>
/// <para>中文</para>
/// <para>必填:否</para>
/// <para>示例值:测试</para>
/// </summary>
[JsonProperty("zh_cn")]
public string? ZhCn { get; set; }

/// <summary>
/// <para>英文</para>
/// <para>必填:否</para>
/// <para>示例值:test</para>
/// </summary>
[JsonProperty("en_us")]
public string? EnUs { get; set; }
}
}
}
}
Loading

0 comments on commit 5c4b03c

Please sign in to comment.