feat(work): 新增服务商会话内容存档相关接口

This commit is contained in:
Fu Diwei
2024-03-14 21:41:24 +08:00
parent 9a6712606e
commit 4676061e11
123 changed files with 4422 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
<xml>
<SuiteId><![CDATA[xxxx]]></SuiteId>
<AuthCorpId><![CDATA[yyyy]]></AuthCorpId>
<InfoType><![CDATA[chat_archive_audit_approved_single]]></InfoType>
<TimeStamp>1403610513</TimeStamp>
<OpenUserID><![CDATA[xxxx]]></OpenUserID>
<ExternalUserID><![CDATA[xxxx]]></ExternalUserID>
<ChatId><![CDATA[xxxx]]></ChatId>
</xml>

View File

@@ -0,0 +1,7 @@
<xml>
<SuiteId><![CDATA[xxxx]]></SuiteId>
<AuthCorpId><![CDATA[yyyy]]></AuthCorpId>
<InfoType><![CDATA[chat_archive_export_finished]]></InfoType>
<JobId><![CDATA[zzzzzzz]]></JobId>
<TimeStamp>1403610513</TimeStamp>
</xml>

View File

@@ -0,0 +1,7 @@
<xml>
<SuiteId><![CDATA[xxxx]]></SuiteId>
<AuthCorpId><![CDATA[yyyy]]></AuthCorpId>
<InfoType><![CDATA[conversation_new_message]]></InfoType>
<Token><![CDATA[zzzzzzzzzzz]]></Token>
<TimeStamp>1403610513</TimeStamp>
</xml>

View File

@@ -0,0 +1,7 @@
<xml>
<SuiteId><![CDATA[xxxx]]></SuiteId>
<AuthCorpId><![CDATA[yyyy]]></AuthCorpId>
<InfoType><![CDATA[hit_keyword]]></InfoType>
<Token><![CDATA[zzzzzzz]]></Token>
<TimeStamp>1403610513</TimeStamp>
</xml>

View File

@@ -6,6 +6,8 @@ using Xunit;
namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
{
using SKIT.FlurlHttpClient.Wechat.Work.ExtendedSDK.SpecialApi;
public class CodeAnalyzeTests
{
[Fact(DisplayName = "代码质量分析")]
@@ -24,6 +26,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.Work.Models",
SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.Work",
SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.Work.Events",
IgnoreExecutingExtensionTypes = static type => type.Namespace!.Contains(".ExtendedSDK."),
ThrowOnNotFoundRequestModelTypes = true,
ThrowOnNotFoundResponseModelTypes = true,
ThrowOnNotFoundExecutingExtensionTypes = true,
@@ -55,6 +58,21 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
};
new SourceFileAnalyzer(options).AssertNoIssues();
}));
Assert.Null(Record.Exception(() =>
{
var options = new TypeDeclarationAnalyzerOptions()
{
SdkAssembly = Assembly.GetAssembly(typeof(WechatWorkSpecialApiClient))!,
SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.Work.ExtendedSDK.SpecialApi.Models",
SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.Work.ExtendedSDK.SpecialApi.Models",
SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.Wechat.Work.ExtendedSDK.SpecialApi",
ThrowOnNotFoundRequestModelTypes = true,
ThrowOnNotFoundResponseModelTypes = true,
ThrowOnNotFoundExecutingExtensionTypes = true
};
new TypeDeclarationAnalyzer(options).AssertNoIssues();
}));
}
}
}

View File

@@ -0,0 +1,3 @@
{
"chatid": "wrjc7bDwAASxc8tZvBErFE02BtPWyAAA"
}

View File

@@ -0,0 +1,21 @@
{
"errcode": 0,
"errmsg": "ok",
"agreeinfo": [
{
"status_change_time": 1562766651,
"external_userid": "wmeDKaCQAAGdtHdiQWxVadfwV2HxNAAA",
"agree_status": "Agree"
},
{
"status_change_time": 1562766651,
"external_userid": "wmeDKaCQAAIQ_p9ACyiopLBBJSGocAAA",
"agree_status": "Disagree"
},
{
"status_change_time": 1562766651,
"external_userid": "wmeDKaCQAAIQ_p9ACnxacyBBJSGocAAA",
"agree_status": "Agree"
}
]
}

View File

@@ -0,0 +1,16 @@
{
"item": [
{
"open_userid": "XuJinSheng",
"external_userid": "wmeDKaCQAAGd9oGiQWxVsAKwV2HxNAAA"
},
{
"open_userid": "XuJinSheng",
"external_userid": "wmeDKaCQAAIQ_p7ACn_jpLVBJSGocAAA"
},
{
"open_userid": "XuJinSheng",
"external_userid": "wmeDKaCQAAPE_p7ABnxkpLBBJSGocAAA"
}
]
}

View File

@@ -0,0 +1,24 @@
{
"errcode": 0,
"errmsg": "ok",
"agreeinfo": [
{
"status_change_time": 1562766651,
"open_userid": "XuJinSheng",
"external_userid": "wmeDKaCPAAGdvxciQWxVsAKwV2HxNAAA",
"agree_status": "Agree"
},
{
"status_change_time": 1562766651,
"open_userid": "XuJinSheng",
"external_userid": "wmeDKaCQAAIQ_p7ACnxksfeBJSGocAAA",
"agree_status": "Disagree"
},
{
"status_change_time": 1562766651,
"open_userid": "XuJinSheng",
"external_userid": "wmeDKaCwAAIQ_p7ACnxckLBBJSGocAAA",
"agree_status": "Agree"
}
]
}

View File

@@ -0,0 +1,18 @@
{
"analyze_task": 1,
"jobid": "JOBID",
"msg_list": [
{
"msgid": "MSGID1",
"encrypt_info": {
"secret_key": "SECRETKEY1"
}
},
{
"msgid": "MSGID2",
"encrypt_info": {
"secret_key": "SECRETKEY2"
}
}
]
}

View File

@@ -0,0 +1,12 @@
{
"errcode": 0,
"errmsg": "ok",
"jobid": "JOBID",
"fail_list": [
{
"errcode": 710601,
"errmsg": "xxx",
"msgid": "MSGID2"
}
]
}

View File

@@ -0,0 +1,26 @@
{
"errcode": 0,
"errmsg": "ok",
"status": 1,
"analyze_result": {
"result_id": "RESULTID1",
"service_encrypt_info": {
"encrypted_secret_key": "KEYAAAAAAABBBBBB",
"public_key_ver": 1
}
},
"analyze_result_list": [
{
"errcode": 0,
"errmsg": "ok",
"msgid": "MSGID1",
"sentiment_result": 2,
"spam_result": 1
},
{
"errcode": 710601,
"errmsg": "xxx",
"msgid": "MSGID4"
}
]
}

View File

@@ -0,0 +1,4 @@
{
"cursor": "JMgigeong",
"limit": 2
}

View File

@@ -0,0 +1,16 @@
{
"errcode": 0,
"errmsg": "ok",
"auth_user_list": [
{
"open_userid": "woxxxjigegen",
"edition_list": [ 1 ]
},
{
"open_userid": "woaaaaaaaaaa",
"edition_list": [ 1, 2, 3 ]
}
],
"next_cursor": "xjigeojgeigwj",
"has_more": true
}

View File

@@ -0,0 +1,3 @@
{
"chatid": "wrNplhCgAAIVZohLe57zKnvIV7xBKrig"
}

View File

@@ -0,0 +1,18 @@
{
"errcode": 0,
"errmsg": "ok",
"creator": "woAAAAAAA",
"room_create_time": 1592361604,
"members": [
{
"memberid": "woAAAAAAAA",
"jointime": 1592361605,
"type": 1
},
{
"memberid": "woBBBBBBBB",
"jointime": 1592377076,
"type": 2
}
]
}

View File

@@ -0,0 +1,4 @@
{
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt2JoW+P8uWG3ijm0fa4S\nVnnQ7fjcffaAoin3KEI6WykAz6+oNxFf+hSWX1cndPg8pMXZJGYhWMCXXgFLQXGv\naXSYEYxdCgbCDL2j0HmvzHEnLLgnY4jPYxoi7S9hQbJVB+nnci9U8wUD//s5YSiY\nAjDLMwwLlE29VPNp6GCw3oVRseKl3kKnlrifxUgJv3BVgCcgpDT5LMwrsAV2gYR1\nolyINpA9LgWesSjSQPydBtaI5CmHTB1Fm1Xcr3OEFmSCoi6hdqFJXclDCRyTJqHQ\n4U1RuCVK8ahfzqoapc53H3kWkOzplhcBxEV/S1voaxScKbX5TuYm4A97fS6ok+sr\nUQIDAQAB\n-----END PUBLIC KEY-----\n",
"public_key_ver": 1
}

View File

@@ -0,0 +1,5 @@
{
"cursor": "RMTJID",
"token": "NGEJKGOEGJKOEGNEOAGOEGOKEGHOEEEEE",
"limit": 200
}

View File

@@ -0,0 +1,32 @@
{
"errcode": 0,
"errmsg": "ok",
"has_more": true,
"next_cursor": "JGNLGEHJGIE",
"msg_list": [
{
"msgid": "xxxmsgid",
"sender": {
"type": 1,
"id": "woxxxxxmmgjiegjie"
},
"receiver_list": [
{
"type": 1,
"id": "woAAAAAAAAAAA"
},
{
"type": 2,
"id": "wmXXXXXXXXXXXXX"
}
],
"chatid": "wrXXXXXXXXXX",
"send_time": 166666666,
"msgtype": 2,
"service_encrypt_info": {
"encrypted_secret_key": "KEYAAAAAAABBBBBB",
"public_key_ver": 1
}
}
]
}

View File

@@ -0,0 +1,4 @@
{
"code": "xxxxx",
"media_id": "xxxxx"
}

View File

@@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"jobid": "xxxxx"
}

View File

@@ -0,0 +1,8 @@
{
"errcode": 0,
"errmsg": "ok",
"status": 3,
"result_id": "xxxx",
"result_errcode": 0,
"result_errmsg": "ok"
}

View File

@@ -0,0 +1,9 @@
{
"errcode": 0,
"errmsg": "ok",
"config": {
"hide_mobile": false,
"hide_idcard": true,
"hide_bankno": true
}
}

View File

@@ -0,0 +1,8 @@
{
"open_userid": "xxxxx",
"config": {
"hide_mobile": false,
"hide_idcard": true,
"hide_bankno": true
}
}

View File

@@ -0,0 +1,41 @@
{
"name": "已回复",
"keyword": {
"word_list": [ "收到", "好的" ]
},
"semantics": {
"semantics_list": [ 1, 2 ]
},
"applicable_range": {
"target_type": {
"type_list": [ 1, 2 ]
},
"department": {
"id_list": [ 1, 2, 4 ]
},
"user": {
"id_list": [ "woaaaaaaaaa", "wobbbbbbbb" ]
},
"external_contact": {
"id_list": [ "wossssssssss", "woxxxxxxxxxxx" ]
},
"chat_type": {
"type_list": [ 1, 2 ]
},
"chat": {
"id_list": [ "wrAAAAA", "wrBBBBB" ]
},
"exclude_mobile": {
"mobile_list": [ "+8612345679876" ]
},
"exclude_email": {
"email_list": [ "zhangsan@qq.com" ]
},
"exclude_bank_card": {
"bank_card_list": [ "6234567891222" ]
},
"session_type": {
"session_type_list": [ 1, 2 ]
}
}
}

View File

@@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"rule_id": "vvvvvvvvvvvvvvvvvxxxx"
}

View File

@@ -0,0 +1,5 @@
{
"cursor": "RMTJID",
"token": "NGEJKGOEGJKOEGNEOAGOEGOKEGHOEEEEE",
"limit": 200
}

View File

@@ -0,0 +1,18 @@
{
"errcode": 0,
"errmsg": "ok",
"has_more": 1,
"next_cursor": "JGNLGEHJGIE",
"msg_list": [
{
"msgid": "xxxmsgid",
"hit_rule_list": [
{
"rule_id": "vvvvvvvvvvvvvvvvvxxxx",
"has_hit_keyword": false,
"semantics_list": [ 1, 2 ]
}
]
}
]
}

View File

@@ -0,0 +1,43 @@
{
"errcode": 0,
"errmsg": "ok",
"name": "已回复",
"keyword": {
"word_list": [ "收到", "好的" ]
},
"semantics": {
"semantics_list": [ 1, 2 ]
},
"applicable_range": {
"target_type": {
"type_list": [ 1, 2 ]
},
"department": {
"id_list": [ 1, 2, 4 ]
},
"user": {
"id_list": [ "woAAAAAAAAAAA", "woBBBBBBBB" ]
},
"external_contact": {
"id_list": [ "wossssssssss", "woxxxxxxxxxxx" ]
},
"chat_type": {
"type_list": [ 1, 2 ]
},
"chat": {
"id_list": [ "wrAAAAAAAAA", "wrBBBBBBBBB" ]
},
"exclude_mobile": {
"mobile_list": [ "+8612345679876" ]
},
"exclude_email": {
"email_list": [ "zhangsan@qq.com" ]
},
"exclude_bank_card": {
"bank_card_list": [ "6234567891222" ]
},
"session_type": {
"session_type_list": [ 1, 2 ]
}
}
}

View File

@@ -0,0 +1,13 @@
{
"errcode": 0,
"errmsg": "ok",
"rule_list": [
{
"rule_id": "xxxxxxxxx",
"name": "已回复",
"create_time": 16666666666
}
],
"has_more": false,
"next_cursor": "JIUENGMG"
}

View File

@@ -0,0 +1,36 @@
{
"rule_id": "wwwwwwwwwwwwwwwwwww",
"name": "已回复",
"keyword": {
"word_list": [ "收到", "好的" ]
},
"semantics": {
"semantics_list": [ 1, 2 ]
},
"applicable_range": {
"target_type": {
"type_list": [ 1, 2 ]
},
"department": {
"id_list": [ 1, 2, 4 ]
},
"user": {
"id_list": [ "woAAAAAAAAAA", "woBBBBBBBBBBBB" ]
},
"external_contact": {
"id_list": [ "wossssssssss", "woxxxxxxxxxxx" ]
},
"chat_type": {
"type_list": [ 1, 2 ]
},
"chat": {
"id_list": [ "wrAAAAAAAAAAAA", "wrBBBBBBBBBBB" ]
},
"exclude_mobile": {
"mobile_list": [ "+8612345679876" ]
},
"exclude_email": {
"email_list": [ "zhangsan@qq.com" ]
}
}
}

View File

@@ -0,0 +1,5 @@
{
"query_word": "VIP",
"limit": 50,
"cursor": "CURSOR"
}

View File

@@ -0,0 +1,14 @@
{
"errcode": 0,
"errmsg": "ok",
"has_more": 1,
"next_cursor": "CURSOR",
"chat_list": [
{
"chatid": "CHATID1"
},
{
"chatid": "CHATID2"
}
]
}

View File

@@ -0,0 +1,18 @@
{
"query_word": "欢迎",
"chat_info": {
"chat_type": 1,
"id_list": [
{
"open_userid": "OPEN_USERID"
},
{
"external_userid": "EXTERNALID1"
}
]
},
"start_time": 1668355200,
"end_time": 1668528000,
"limit": 50,
"cursor": "CURSOR"
}

View File

@@ -0,0 +1,14 @@
{
"errcode": 0,
"errmsg": "ok",
"has_more": 1,
"next_cursor": "CURSOR",
"msg_list": [
{
"msgid": "xxxmsgid"
},
{
"msgid": "yyymsgid"
}
]
}

View File

@@ -0,0 +1,20 @@
{
"msg_filter": {
"msg_list": [
{
"msgid": "xxxmsgid",
"encrypt_info": {
"secret_key": "xxx"
}
},
{
"msgid": "yyymsgid",
"encrypt_info": {
"secret_key": "xxx"
}
}
]
},
"custom_id": "xxx",
"custom_data": "xxxx"
}

View File

@@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"jobid": "xxxx"
}

View File

@@ -0,0 +1,11 @@
{
"errcode": 0,
"errmsg": "ok",
"status": 0,
"dispatch_time": 1666666666,
"progress": 100,
"result": {
"job_type": "xxxx",
"data": "aaaaaaaaaaaa"
}
}