-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathapi_helpdesk_agent_skill_rule_get_list.go
84 lines (73 loc) · 3.92 KB
/
api_helpdesk_agent_skill_rule_get_list.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
* Copyright 2022 chyroc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package lark
import (
"context"
)
// GetHelpdeskAgentSkillRuleList 该接口用于获取全部客服技能。仅支持自建应用。
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill_rule/list
// new doc: https://open.feishu.cn/document/server-docs/helpdesk-v1/agent-function/agent_skill_rule/list
func (r *HelpdeskService) GetHelpdeskAgentSkillRuleList(ctx context.Context, request *GetHelpdeskAgentSkillRuleListReq, options ...MethodOptionFunc) (*GetHelpdeskAgentSkillRuleListResp, *Response, error) {
if r.cli.mock.mockHelpdeskGetHelpdeskAgentSkillRuleList != nil {
r.cli.Log(ctx, LogLevelDebug, "[lark] Helpdesk#GetHelpdeskAgentSkillRuleList mock enable")
return r.cli.mock.mockHelpdeskGetHelpdeskAgentSkillRuleList(ctx, request, options...)
}
req := &RawRequestReq{
Scope: "Helpdesk",
API: "GetHelpdeskAgentSkillRuleList",
Method: "GET",
URL: r.cli.openBaseURL + "/open-apis/helpdesk/v1/agent_skill_rules",
Body: request,
MethodOption: newMethodOption(options),
NeedTenantAccessToken: true,
NeedHelpdeskAuth: true,
}
resp := new(getHelpdeskAgentSkillRuleListResp)
response, err := r.cli.RawRequest(ctx, req, resp)
return resp.Data, response, err
}
// MockHelpdeskGetHelpdeskAgentSkillRuleList mock HelpdeskGetHelpdeskAgentSkillRuleList method
func (r *Mock) MockHelpdeskGetHelpdeskAgentSkillRuleList(f func(ctx context.Context, request *GetHelpdeskAgentSkillRuleListReq, options ...MethodOptionFunc) (*GetHelpdeskAgentSkillRuleListResp, *Response, error)) {
r.mockHelpdeskGetHelpdeskAgentSkillRuleList = f
}
// UnMockHelpdeskGetHelpdeskAgentSkillRuleList un-mock HelpdeskGetHelpdeskAgentSkillRuleList method
func (r *Mock) UnMockHelpdeskGetHelpdeskAgentSkillRuleList() {
r.mockHelpdeskGetHelpdeskAgentSkillRuleList = nil
}
// GetHelpdeskAgentSkillRuleListReq ...
type GetHelpdeskAgentSkillRuleListReq struct {
}
// GetHelpdeskAgentSkillRuleListResp ...
type GetHelpdeskAgentSkillRuleListResp struct {
Rules []*GetHelpdeskAgentSkillRuleListRespRule `json:"rules,omitempty"` // rules列表
}
// GetHelpdeskAgentSkillRuleListRespRule ...
type GetHelpdeskAgentSkillRuleListRespRule struct {
ID string `json:"id,omitempty"` // rule id, 参考[获取客服技能rules](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/agent_skill_rule/list) 用于获取rules options
OperatorOptions []int64 `json:"operator_options,omitempty"` // rule操作数value, [客服技能及运算符](https://open.feishu.cn/document/ukTMukTMukTM/ucDOyYjL3gjM24yN4IjN/operator-options)
Operand string `json:"operand,omitempty"` // rule 操作数的值
Category int64 `json:"category,omitempty"` // rule 类型, 1-知识库, 2-工单信息, 3-用户飞书信息
DisplayName string `json:"display_name,omitempty"` // rule 名
}
// getHelpdeskAgentSkillRuleListResp ...
type getHelpdeskAgentSkillRuleListResp struct {
Code int64 `json:"code,omitempty"` // 错误码, 非 0 表示失败
Msg string `json:"msg,omitempty"` // 错误描述
Data *GetHelpdeskAgentSkillRuleListResp `json:"data,omitempty"`
Error *ErrorDetail `json:"error,omitempty"`
}