mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-27 14:45:52 +08:00
feat(work): 新增营销获客相关接口
This commit is contained in:
@@ -801,6 +801,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.CgibinExternalContactCustomerAcquisitionGetChatInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/externalcontact/customer_acquisition_app/get_permit 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developer.work.weixin.qq.com/document/path/101146 ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExternalContactCustomerAcquisitionAppGetPermitResponse> ExecuteCgibinExternalContactCustomerAcquisitionAppGetPermitAsync(this WechatWorkClient client, Models.CgibinExternalContactCustomerAcquisitionAppGetPermitRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateFlurlRequest(request, HttpMethod.Get, "cgi-bin", "externalcontact", "customer_acquisition_app", "get_permit")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.CgibinExternalContactCustomerAcquisitionAppGetPermitResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region CustomerStrategy
|
||||
|
||||
@@ -217,6 +217,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_exclusive")]
|
||||
public bool? IsExclusive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否标记客户添加来源为该应用创建的。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mark_source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mark_source")]
|
||||
public bool? IsMarkSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结束语信息。
|
||||
/// </summary>
|
||||
|
||||
@@ -233,6 +233,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_exclusive")]
|
||||
public bool? IsExclusive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否标记客户添加来源为该应用创建的。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mark_source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mark_source")]
|
||||
public bool? IsMarkSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结束语信息。
|
||||
/// </summary>
|
||||
|
||||
@@ -98,6 +98,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_exclusive")]
|
||||
public bool? IsExclusive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否标记客户添加来源为该应用创建的。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mark_source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mark_source")]
|
||||
public bool? IsMarkSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结束语信息。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/externalcontact/customer_acquisition_app/get_permit 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactCustomerAcquisitionAppGetPermitRequest : WechatWorkRequest
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/externalcontact/customer_acquisition_app/get_permit 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactCustomerAcquisitionAppGetPermitResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_list")]
|
||||
public string[]? UserIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
|
||||
public long[]? DepartmentIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标签 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tag_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("tag_list")]
|
||||
public long[]? TagIdList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,23 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
|
||||
public IList<long>? DepartmentId { get; set; }
|
||||
}
|
||||
|
||||
public class PriorityOption
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置优先分配类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("priority_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("priority_type")]
|
||||
public int PriorityType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("priority_userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("priority_userid_list")]
|
||||
public IList<string>? PriorityUserIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -41,11 +58,25 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("range")]
|
||||
public Types.Range? Range { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优先分配配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("priority_option")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("priority_option")]
|
||||
public Types.PriorityOption? PriorityOption { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否无需验证。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skip_verify")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skip_verify")]
|
||||
public bool? IsSkipVerify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否标记客户添加来源为该应用创建的。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mark_source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mark_source")]
|
||||
public bool? IsMarkSource { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,20 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string Url { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否无需验证。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skip_verify")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skip_verify")]
|
||||
public bool IsSkipVerify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否标记客户添加来源为该应用创建的。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mark_source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mark_source")]
|
||||
public bool IsMarkSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
@@ -54,6 +68,23 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
|
||||
public long[]? DepartmentId { get; set; }
|
||||
}
|
||||
|
||||
public class PriorityOption
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置优先分配类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("priority_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("priority_type")]
|
||||
public int PriorityType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("priority_userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("priority_userid_list")]
|
||||
public string[]? PriorityUserIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -68,13 +99,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("range")]
|
||||
public Types.Range Range { get; set; } = default!;
|
||||
public Types.Range? Range { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否无需验证。
|
||||
/// 获取或设置优先分配配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skip_verify")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skip_verify")]
|
||||
public bool IsSkipVerify { get; set; }
|
||||
[Newtonsoft.Json.JsonProperty("priority_option")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("priority_option")]
|
||||
public Types.PriorityOption? PriorityOption { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
public class Range : CgibinExternalContactCustomerAcquisitionCreateLinkRequest.Types.Range
|
||||
{
|
||||
}
|
||||
|
||||
public class PriorityOption : CgibinExternalContactCustomerAcquisitionCreateLinkRequest.Types.PriorityOption
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -35,11 +39,25 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("range")]
|
||||
public Types.Range? Range { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优先分配配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("priority_option")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("priority_option")]
|
||||
public Types.PriorityOption? PriorityOption { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否无需验证。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skip_verify")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skip_verify")]
|
||||
public bool? IsSkipVerify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否标记客户添加来源为该应用创建的。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mark_source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mark_source")]
|
||||
public bool? IsMarkSource { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
@@ -55,5 +55,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[Newtonsoft.Json.JsonProperty("state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("state")]
|
||||
public string? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否标记客户添加来源为该应用创建的。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mark_source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mark_source")]
|
||||
public bool? IsMarkSource { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/groupchat/get_join_way 接口的响应。</para>
|
||||
@@ -71,6 +71,13 @@
|
||||
[Newtonsoft.Json.JsonProperty("state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("state")]
|
||||
public string? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否标记客户添加来源为该应用创建的。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mark_source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mark_source")]
|
||||
public bool? IsMarkSource { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
@@ -62,5 +62,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[Newtonsoft.Json.JsonProperty("state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("state")]
|
||||
public string? State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否标记客户添加来源为该应用创建的。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mark_source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mark_source")]
|
||||
public bool? IsMarkSource { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"chat_expires_in": 86400,
|
||||
"unionid": "oxTWIuGaIt6gTKsQRLau2M0AAAA",
|
||||
"is_exclusive": true,
|
||||
"mark_source": true,
|
||||
"conclusions": {
|
||||
"text": {
|
||||
"content": "文本消息内容"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"contact_way": {
|
||||
@@ -9,19 +9,20 @@
|
||||
"remark": "test remark",
|
||||
"skip_verify": true,
|
||||
"state": "teststate",
|
||||
"qr_code": "http://p.qpic.cn/wwhead/duc2TvpEgSdicZ9RrdUtBkv2UiaA/0",
|
||||
"user": ["zhangsan", "lisi", "wangwu"],
|
||||
"party": [2, 3],
|
||||
"qr_code": "https://p.qpic.cn/wwhead/duc2TvpEgSdicZ9RrdUtBkv2UiaA/0",
|
||||
"user": [ "zhangsan", "lisi", "wangwu" ],
|
||||
"party": [ 2, 3 ],
|
||||
"is_temp": true,
|
||||
"expires_in": 86400,
|
||||
"chat_expires_in": 86400,
|
||||
"unionid": "oxTWIuGaIt6gTKsQRLau2M0AAAA",
|
||||
"mark_source": true,
|
||||
"conclusions": {
|
||||
"text": {
|
||||
"content": "文本消息内容"
|
||||
},
|
||||
"image": {
|
||||
"pic_url": "http://p.qpic.cn/pic_wework/XXXXX"
|
||||
"pic_url": "https://p.qpic.cn/pic_wework/XXXXX"
|
||||
},
|
||||
"link": {
|
||||
"title": "消息标题",
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
{
|
||||
{
|
||||
"config_id": "42b34949e138eb6e027c123cba77fAAA",
|
||||
"remark": "渠道客户",
|
||||
"skip_verify": true,
|
||||
"style": 1,
|
||||
"state": "teststate",
|
||||
"user": ["zhangsan", "lisi", "wangwu"],
|
||||
"party": [2, 3],
|
||||
"user": [ "zhangsan", "lisi", "wangwu" ],
|
||||
"party": [ 2, 3 ],
|
||||
"expires_in": 86400,
|
||||
"chat_expires_in": 86400,
|
||||
"unionid": "oxTWIuGaIt6gTKsQRLau2M0AAAA",
|
||||
"mark_source": true,
|
||||
"conclusions": {
|
||||
"text": {
|
||||
"content": "文本消息内容"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"user_list": [
|
||||
"jack",
|
||||
"rose"
|
||||
],
|
||||
"department_list": [
|
||||
0,
|
||||
1
|
||||
],
|
||||
"tag_list": [
|
||||
0,
|
||||
1
|
||||
]
|
||||
}
|
||||
@@ -4,5 +4,10 @@
|
||||
"user_list": [ "zhangsan", "lisi" ],
|
||||
"department_list": [ 2, 3 ]
|
||||
},
|
||||
"skip_verify": true
|
||||
"skip_verify": true,
|
||||
"priority_option": {
|
||||
"priority_type": 2,
|
||||
"priority_userid_list": [ "tom", "lisi" ]
|
||||
},
|
||||
"mark_source": true
|
||||
}
|
||||
|
||||
@@ -2,14 +2,18 @@
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"link": {
|
||||
"link_id": "LINK_ID_AAA",
|
||||
"link_name": "LINK_NAME",
|
||||
"url": "work.weixin.qq.com/ca/xxxxxx",
|
||||
"create_time": 1672502400
|
||||
"url": "https://work.weixin.qq.com/ca/xxxxxx",
|
||||
"create_time": 1672502400,
|
||||
"skip_verify": true,
|
||||
"mark_source": true
|
||||
},
|
||||
"range": {
|
||||
"user_list": [ "rocky", "sam" ],
|
||||
"department_list": [ 1 ]
|
||||
},
|
||||
"skip_verify": true
|
||||
"priority_option": {
|
||||
"priority_type": 2,
|
||||
"priority_userid_list": [ "tom", "lisi" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,5 +5,10 @@
|
||||
"user_list": [ "zhangsan", "lisi" ],
|
||||
"department_list": [ 2, 3 ]
|
||||
},
|
||||
"skip_verify": true
|
||||
"skip_verify": true,
|
||||
"priority_option": {
|
||||
"priority_type": 2,
|
||||
"priority_userid_list": [ "tom", "lisi" ]
|
||||
},
|
||||
"mark_source": true
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"scene": 2,
|
||||
"remark": "aa_remark",
|
||||
"auto_create_room": 1,
|
||||
@@ -8,5 +8,6 @@
|
||||
"wrOgQhDgAAH2Yy-CTZ6POca8mlBEdaaa",
|
||||
"wrOgQhDgAALPUthpRAKvl7mgiQRwAAA"
|
||||
],
|
||||
"state": "klsdup3kj3s1"
|
||||
"state": "klsdup3kj3s1",
|
||||
"mark_source": true
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"join_way": {
|
||||
@@ -13,6 +13,7 @@
|
||||
"wrOgQhDgAALPUthpRAKvl7mgiQRw_aaa"
|
||||
],
|
||||
"qr_code": "http://p.qpic.cn/wwhead/nMl9ssowtibVGyrmvBiaibzDtp703nXuzpibnKtbSDBRJTLwS3ic4ECrf3ibLVtIFb0N6wWwy5LVuyvMQ22/0",
|
||||
"state": "klsdup3kj3s1"
|
||||
"state": "klsdup3kj3s1",
|
||||
"mark_source": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"config_id": "9ad7fa5cdaa6511298498f979c4722de",
|
||||
"scene": 2,
|
||||
"remark": "bb_remark",
|
||||
@@ -9,5 +9,6 @@
|
||||
"wrOgQhDgAAH2Yy-CTZ6POca8mlBEdaaa",
|
||||
"wrOgQhDgAALPUthpRAKvl7mgiQRw_aaa"
|
||||
],
|
||||
"state": "klsdup3kj3s1"
|
||||
"state": "klsdup3kj3s1",
|
||||
"mark_source": true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user