wework

package module
v2.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

README

版本变更日志参见 CHANGELOG.md

JetBrains Logo (Main) logo

更多相关文章将会在公众号分享,欢迎关注!

Geek进阶

文档

使用wecom-go-sdk快速开发企业微信自建应用

V2版本升级

http请求改用go-resty可方便指定重试、错误处理hooks(当前未处理)

使用

go get github.com/go-laoji/wecom-go-sdk/v2
  • 增加SetProxy(proxyUrl string) 对绕过IP限制有用,可参考OpenResty(nginx)配置正向代理绕过企微自建IP限制

  • 增加SetDebug(debug bool) 可以监控http请求,看如下的输出

    GET  /cgi-bin/gettoken?corpid=wp0k1qEQAAiwQMWYzF8JOr99RJRX1_1A&corpsecret=Y2YbFpt95RcGTs9CvriQ2uj23Wl8B3IxtbRM9nKfjVU  HTTP/1.1
    HOST   : qyapi.weixin.qq.com
    HEADERS:
        Accept: application/json;charset=UTF-8
        Content-Type: application/json;charset=UTF-8
        User-Agent: wecom-go-sdk-v2
    BODY   :
    ***** NO CONTENT *****
    ------------------------------------------------------------------------------
    ~~~ RESPONSE ~~~
    STATUS       : 200 OK
    PROTO        : HTTP/2.0
    RECEIVED AT  : 2023-06-10T21:03:57.834584+08:00
    TIME DURATION: 181.642531ms
    HEADERS      :
        Content-Length: 176
        Content-Type: application/json; charset=UTF-8
        Date: Sat, 10 Jun 2023 13:03:58 GMT
        Error-Code: 40001
        Error-Msg: invalid credential, hint: [1686402237354962763423746], from ip: 123.116.182.237, more info at https://open.work.weixin.qq.com/devtool/query?e=40001
        Server: nginx
    BODY         :
    {
       "errcode": 40001,
       "errmsg": "invalid credential, hint: [1686402237354962763423746], from ip: 123.116.182.237, more info at https://open.work.weixin.qq.com/devtool/query?e=40001"
    }
    ==============================================================================
    
    
    

配置文件格式

CorpId: wwxxx
ProviderSecret: xxxxxxx
SuiteId: xxxxx
SuiteSecret: xxxxx-Gl8VA
SuiteToken: xxxxx
SuiteEncodingAesKey: xxxx
Dsn: user:pass@tcp(127.0.0.1:3306)/suite?charset=utf8mb4&parseTime=True&loc=Local
Port: 8080

 目录结构

├── config  解析yaml配置文件
├── example 样例程序
├── internal 内部函数,包含error和http请求
└── pkg 附加包
    └── svr 服务端接口部分
        ├── callback 指令及数据回调
        ├── install 应用安装连接生成、应用安装后的跳转
        ├── logic 各事件通知处理逻辑
        ├── middleware gin的中间件方便handler里引入sdk
        └── models  应用安装时常用到的表定义,基于gorm

第三方包

API列表

  • ID转换接口
    • corpid的转换
    • userid的转换
    • external_userid的转换
    • 客户标签ID的转换
    • 微信客服ID的转换
  • 身份验证
    • 网页授权登录
      • 获取访问用户身份
      • 获取访问用户敏感信息
    • 扫码授权登录
      • 获取登录用户信息
  • 应用授权
    • 调用第三方应用凭证
    • 获取预授权码
    • 设置授权配置
    • 获取企业永久授权码
    • 获取企业授权信息
    • 获取企业凭证 getCorpToken(存入数据库以主键代替)
    • 获取应用的管理员列表
    • 获取应用二维码
    • 回调接口pkg下svr使用gin框架的web接口
      • 推送suite_ticket
      • 授权通知事件 此部分与业务逻辑相关,仅做样例
        • 授权成功通知
        • 变更授权通知
        • 取消授权通知
      • 成员通知事件
      • 部门通知事件
      • 标签通知事件
      • 共享应用事件回调
      • 应用管理员变更回调
  • 通讯录管理
    • 成员管理
      • 创建成员
      • 读取成员
      • 更新成员
      • 删除成员
      • 获取部门成员
      • 获取部门成员详情
      • userid与openid互换
      • 二次验证
      • 邀请成员
      • 手机号获取userid
      • 获取成员授权列表
      • 查询成员用户是否已授权
      • 获取选人ticket对应的用户
      • 自建应用获取用户隐私信息
      • 获取成员ID列表
    • 部门管理
      • 创建部门
      • 更新部门
      • 删除部门
      • 获取部门列表
      • 获取子部门ID列表
      • 获取单个部门详情
    • 标签管理
      • 创建标签
      • 更新标签名字
      • 删除标签
      • 获取标签成员
      • 增加标签成员
      • 删除标签成员
      • 获取标签列表
    • 异步批量接口
    • 通讯录回调通知
    • 通讯录搜索
    • 通讯录ID转译
    • 通讯录userid排序
    • 异步导出接口
    • 推广二维码
  • 客户联系
    • 获取配置了客户联系功能的成员列表
    • 客户联系「联系我」管理
      • 配置客户联系「联系我」方式
      • 获取企业已配置的「联系我」方式
      • 获取企业已配置的「联系我」列表
      • 更新企业已配置的「联系我」方式
      • 删除企业已配置的「联系我」方式
      • 结束临时会话
    • 客户管理
      • 获取客户列表
      • 获取客户详情
      • 批量获取客户详情
      • 修改客户备注信息
      • 外部联系人unionid转换
      • 代开发应用external_userid转换
    • 客户标签管理
      • 管理企业标签
        • 获取企业标签库
        • 添加企业客户标签
        • 编辑企业客户标签
        • 删除企业客户标签
      • 编辑客户企业标签
    • 在职继承
      • 分配在职成员的客户
      • 查询客户接替状态
    • 离职继承
      • 获取待分配的离职成员列表
      • 分配离职成员的客户
      • 查询客户接替状态
      • 分配离职成员的客户群
    • 客户群管理
      • 获取客户群列表
      • 获取客户群详情
      • 客户群opengid转换
    • 客户朋友圈
      • 企业发表内容到客户的朋友圈
        • 创建发表任务
        • 获取任务创建结果
      • 获取客户朋友圈全部的发表记录
        • 获取企业全部的发表列表
        • 获取客户朋友圈企业发表的列表
        • 获取客户朋友圈发表时选择的可见范围
        • 获取客户朋友圈发表后的可见客户列表
        • 获取客户朋友圈的互动数据
    • 消息推送
      • 创建企业群发
      • 获取企业的全部群发记录
        • 获取群发记录列表
        • 获取群发成员发送任务列表
        • 获取企业群发成员执行结果
      • 发送新客户欢迎语
      • 入群欢迎语素材管理
    • 统计管理
      • 获取「联系客户统计」数据
      • 获取「群聊数据统计」数据
        • 按群主聚合的方式
        • 按自然日聚合的方式
    • 变更回调
      • 添加企业客户事件
      • 编辑企业客户事件
      • 外部联系人免验证添加成员事件
      • 删除企业客户事件
      • 删除跟进成员事件
      • 客户接替失败事件
      • 客户群创建事件
      • 客户群变更事件
      • 客户群解散事件
      • 企业客户标签创建事件
      • 企业客户标签变更事件
      • 企业客户标签删除事件
      • 企业客户标签重排事件
    • 管理商品图册
      • 创建商品图册
      • 获取商品图册
      • 获取商品图册列表
      • 编辑商品图册
      • 删除商品图册
    • 管理聊天敏感词
      • 新建敏感词规则
      • 获取敏感词规则列表
      • 获取敏感词规则详情
      • 修改敏感词规则
      • 删除敏感词规则
    • 上传附件资源
  • 微信客服
    • 客服帐号管理
      • 添加客服帐号
      • 删除客服帐号
      • 修改客服帐号
      • 获取客服帐号列表
      • 获取客服帐号连接
    • 接待人员管理
      • 添加接待人员
      • 删除接待人员
      • 获取接待人员列表
    • 会话分配与消息收发
      • 分配客服会话
      • 接收消息和事件
        • 读取消息
      • 发送消息
      • 发送欢迎语等事件响应消息
    • [升级服务]配置
    • 其它基础信息获取
      • 获取客户基础信息
      • 获取企业状态信息
    • 统计管理
      • 获取「客户数据统计」企业汇总数据
      • 获取「客户数据统计」接待人员明细数据
    • 机器人管理
      • 知识库分组管理
        • 添加分组
        • 删除分组
        • 修改分组
        • 获取分组列表
  • 接口调用许可
    • 订单管理
      • 下单购买帐号
      • 下单续期帐号
      • 获取订单列表
      • 获取订单详情
      • 获取订单中的帐号列表
    • 帐号管理
      • 激活帐号
      • 获取激活码详情
      • 获取企业的帐号列表
      • 获取成员的激活详情
      • 帐号继承
    • 自动激活设置
      • 设置企业的许可自动激活状态
      • 查询企业的许可自动激活状态
  • 应用管理
    • 获取应用
      • 获取指定的应用详情
      • 获取access_token对应的应用列表
    • 设置工作台自定义展示
  • 消息推送
    • 发送应用消息
    • 发送应用模板消息
    • 更新应用模板消息
    • 接收消息与事件
    • 撤回应用消息
  • 素材管理
    • 上传临时素材
    • 上传图片
    • 获取临时素材
    • 获取高清语音素材
  • 会话内容存档
    • 获取会话内容存档开启成员列表
    • 获取会话同意情况
    • 获取会话内容存档内部群信息
  • 电子发票
    • 查询电子发票
    • 更新发票状态
    • 批量更新发票状态
    • 批量查询电子发票
  • 学校沟通
    • 基础接口
      • 获取「学校通知」二维码
      • 管理「学校通知」的关注模式
        • 设置关注「学校通知」的模式
        • 获取关注「学校通知」的模式
      • 发送「学校通知」
      • 手机号转外部联系人ID
      • 管理「老师可查看班级」模式
        • 设置「老师可查看班级」的模式
        • 获取「老师可查看班级」的模式
      • 获取可使用的家长范围
    • 学生与家长管理
      • 创建学生
      • 删除学生
      • 更新学生
      • 批量创建学生
      • 批量删除学生
      • 批量更新学生
      • 创建家长
      • 删除家长
      • 更新家长
      • 批量创建家长
      • 批量删除家长
      • 批量更新家长
      • 读取学生或家长
      • 获取部门成员详情
      • 设置家校通讯录自动同步模式
      • 获取部门家长详情
    • 部门管理
      • 创建部门
      • 更新部门
      • 删除部门
      • 获取部门列表
      • 修改自动升年级的配置
  • 学校应用
    • 上课直播
      • 获取老师直播ID列表
      • 获取直播详情
      • 获取观看直播统计
      • 获取未观看直播统计
      • 删除直播回放
    • 班级收款
      • 获取学生付款结果
      • 获取订单详情

Documentation

Index

Constants

View Source
const (
	ReimburseStatusInit    = "INVOICE_REIMBURSE_INIT"
	ReimburseStatusLock    = "INVOICE_REIMBURSE_LOCK"
	ReimburseStatusClosure = "INVOICE_REIMBURSE_CLOSURE"
)
View Source
const (
	UserAgent   = "wecom-go-sdk-v2"
	ContentType = "application/json;charset=UTF-8"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionList

type ActionList struct {
	Text string `json:"text" validate:"required"`
	Key  string `json:"key" validate:"required"`
}

type ActionMenu

type ActionMenu struct {
	Desc       string       `json:"desc"`
	ActionList []ActionList `json:"action_list" validate:"required,max=3,min=1"`
}

type ActiveAccountRequest

type ActiveAccountRequest struct {
	ActiveCode string `json:"active_code" validate:"required"`
	CorpId     string `json:"corpid" validate:"required"`
	Userid     string `json:"userid" validate:"required"`
}

type ActiveInfo

type ActiveInfo struct {
	ActiveCode string `json:"active_code"`
	Type       int    `json:"type"`
	Status     int    `json:"status"`
	Userid     string `json:"userid"`
	CreateTime int    `json:"create_time"`
	ActiveTime int    `json:"active_time "`
	ExpireTime int    `json:"expire_time"`
}

type AddInterceptRuleResponse

type AddInterceptRuleResponse struct {
	internal.BizResponse
	RuleId string `json:"rule_id"`
}

type AddMomentTaskResponse

type AddMomentTaskResponse struct {
	internal.BizResponse
	JobId string `json:"jobid"`
}

type AddMsgTemplateResponse

type AddMsgTemplateResponse struct {
	internal.BizResponse
	FailList []string `json:"fail_list"`
	MsgId    string   `json:"msgid"`
}

type AddProductAlbumResponse

type AddProductAlbumResponse struct {
	internal.BizResponse
	ProductId string `json:"product_id"`
}

type Agent

type Agent struct {
	AgentId         int    `json:"agentid"`
	Name            string `json:"name"`
	RoundLogoURL    string `json:"round_logo_url"`
	SquareLogoURL   string `json:"square_logo_url"`
	Appid           int    `json:"appid"`
	AuthMode        int    `json:"auth_mode,omitempty"`
	IsCustomizedApp bool   `json:"is_customized_app,omitempty"`
	Privilege       struct {
		Level      int      `json:"level"`
		AllowParty []int    `json:"allow_party"`
		AllowUser  []string `json:"allow_user"`
		AllowTag   []int    `json:"allow_tag"`
		ExtraParty []int    `json:"extra_party"`
		ExtraUser  []string `json:"extra_user"`
		ExtraTag   []int    `json:"extra_tag"`
	} `json:"privilege,omitempty"`
	SharedFrom struct {
		Corpid string `json:"corpid"`
	} `json:"shared_from"`
}

type AgentGetResponse

type AgentGetResponse struct {
	internal.BizResponse
	AgentId        int    `json:"agentid"`
	Name           string `json:"name"`
	SquareLogoURL  string `json:"square_logo_url"`
	Description    string `json:"description"`
	AllowUserInfos struct {
		User []struct {
			Userid string `json:"userid"`
		} `json:"user"`
	} `json:"allow_userinfos"`
	AllowPartys struct {
		PartyId []int `json:"partyid"`
	} `json:"allow_partys"`
	AllowTags struct {
		TagId []int `json:"tagid"`
	} `json:"allow_tags"`
	Close              int    `json:"close"`
	RedirectDomain     string `json:"redirect_domain"`
	ReportLocationFlag int    `json:"report_location_flag"`
	IsReportEnter      int    `json:"isreportenter"`
	HomeURL            string `json:"home_url"`
}

type AgentListResponse

type AgentListResponse struct {
	internal.BizResponse
	AgentList []struct {
		AgentId       int    `json:"agentid"`
		Name          string `json:"name"`
		SquareLogoURL string `json:"square_logo_url"`
	} `json:"agentlist"`
}

type Article

type Article struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	Url         string `json:"url"`
	PicUrl      string `json:"picurl"`
	AppId       string `json:"appid" validate:"required_without=Url,required_with=PagePath"`
	PagePath    string `json:"pagepath" validate:"required_with=AppId"`
}

type Attachments

type Attachments struct {
	Msgtype string `json:"msgtype" validate:"required,oneof=image link video"`
	Image   *Image `json:"image,omitempty" validate:"required_without_all=Video Link"`
	Video   *Video `json:"video,omitempty" validate:"required_without_all=Image Link"`
	Link    *Link  `json:"link,omitempty" validate:"required_without_all=Video Image"`
}

type Attrs

type Attrs struct {
	Type int    `json:"type" validate:"required,oneof= 0 1 2"`
	Name string `json:"name" validate:"required"`
	Text struct {
		Value string `json:"value"`
	} `json:"text,omitempty"`
	Web struct {
		URL   string `json:"url" validate:"required"`
		Title string `json:"title" validate:"required"`
	} `json:"web,omitempty"`
}

type AuthCorpInfo

type AuthCorpInfo struct {
	CorpId            string `json:"corpid"`
	CorpName          string `json:"corp_name"`
	CorpType          string `json:"corp_type"`
	CorpSquareLogoURL string `json:"corp_square_logo_url"`
	CorpUserMax       int    `json:"corp_user_max"`
	CorpAgentMax      int    `json:"corp_agent_max"`
	CorpFullName      string `json:"corp_full_name"`
	VerifiedEndTime   int    `json:"verified_end_time"`
	SubjectType       int    `json:"subject_type"`
	CorpWxqrcode      string `json:"corp_wxqrcode"`
	CorpScale         string `json:"corp_scale"`
	CorpIndustry      string `json:"corp_industry"`
	CorpSubIndustry   string `json:"corp_sub_industry"`
}

type AuthUserInfo

type AuthUserInfo struct {
	UserId     string `json:"userid"`
	OpenUserId string `json:"open_userid"`
	Name       string `json:"name"`
	Avatar     string `json:"avatar"`
}

type BatchActiveAccountRequest

type BatchActiveAccountRequest struct {
	CorpId     string `json:"corpid"`
	ActiveList []struct {
		ActiveCode string `json:"active_code"`
		Userid     string `json:"userid"`
	} `json:"active_list"`
}

type BatchActiveAccountResponse

type BatchActiveAccountResponse struct {
	internal.BizResponse
	ActiveResult []struct {
		ActiveCode string `json:"active_code"`
		Userid     string `json:"userid"`
		ErrCode    int    `json:"errcode"`
	} `json:"active_result"`
}

type BatchGetActiveInfoByCodeRequest

type BatchGetActiveInfoByCodeRequest struct {
	CorpId         string   `json:"corpid" validate:"required"`
	ActiveCodeList []string `json:"active_code_list" validate:"required,max=1000"`
}

type BatchGetActiveInfoByCodeResponse

type BatchGetActiveInfoByCodeResponse struct {
	internal.BizResponse
	ActiveInfoList        []ActiveInfo `json:"active_info_list"`
	InvalidActiveCodeList []string     `json:"invalid_active_code_list"`
}

type BatchParentResponse

type BatchParentResponse struct {
	internal.BizResponse
	ResultList []struct {
		ParentUserId string `json:"parent_userid"`
		internal.BizResponse
	} `json:"result_list"`
}

type BatchStudentResponse

type BatchStudentResponse struct {
	internal.BizResponse
	ResultList []struct {
		internal.BizResponse
		StudentUserId string `json:"student_userid"`
	} `json:"result_list"`
}

type BatchToExternalUserIdResponse

type BatchToExternalUserIdResponse struct {
	internal.BizResponse
	SuccessList []struct {
		Mobile         string `json:"mobile"`
		ExternalUserid string `json:"external_userid"`
		ForeignKey     string `json:"foreign_key"`
	} `json:"success_list"`
	FailList []struct {
		internal.BizResponse
		Mobile string `json:"mobile"`
	} `json:"fail_list"`
}

type BatchTransferLicenseRequest

type BatchTransferLicenseRequest struct {
	CorpId       string `json:"corpid" validate:"required"`
	TransferList []struct {
		HandoverUserid string `json:"handover_userid" validate:"required"`
		TakeoverUserid string `json:"takeover_userid" validate:"required"`
	} `json:"transfer_list" validate:"required"`
}

type BatchTransferLicenseResponse

type BatchTransferLicenseResponse struct {
	internal.BizResponse
	TransferResult []struct {
		HandoverUserid string `json:"handover_userid"`
		TakeoverUserid string `json:"takeover_userid"`
		ErrCode        int    `json:"errcode"`
	} `json:"transfer_result"`
}

type Button

type Button struct {
	Type  int    `json:"type,omitempty"` //按钮点击事件类型,0 或不填代表回调点击事件,1 代表跳转url
	Text  string `json:"text" validate:"required"`
	Style int    `json:"style,omitempty"` //按钮样式,目前可填1~4,不填或错填默认1
	Key   string `json:"key,omitempty"`   // 按钮key值,用户点击后,会产生回调事件将本参数作为EventKey返回,回调事件会带上该key值,最长支持1024字节,不可重复,button_list.type是0时必填
	Url   string `json:"url,omitempty"`   //跳转事件的url,button_list.type是1时必填
}

type ButtonSelection

type ButtonSelection struct {
	QuestionKey string `json:"question_key" validate:"required"`
	Title       string `json:"title"`
	OptionList  []struct {
		ID   string `json:"id" validate:"required"`
		Text string `json:"text" validate:"required"`
	} `json:"option_list" validate:"required"`
	SelectedID string `json:"selected_id"`
}

ButtonSelection 按钮交互型

type CancelUpgradeServiceRequest

type CancelUpgradeServiceRequest struct {
	OpenKfId       string `json:"open_kfid" validate:"required"`
	ExternalUserId string `json:"external_userid" validate::"required"`
}

type CardAction

type CardAction struct {
	Type     int    `json:"type"`
	URL      string `json:"url"`
	Appid    string `json:"appid"`
	Pagepath string `json:"pagepath"`
}

type CardImage

type CardImage struct {
	Url         string  `json:"url" validate:"required"`
	AspectRatio float32 `json:"aspect_ratio" validate:"max=2.25,min=1.3"`
}

type CheckBox

type CheckBox struct {
	QuestionKey string `json:"question_key" validate:"required"`
	OptionList  []struct {
		ID        string `json:"id" validate:"required"`
		Text      string `json:"text" validate:"required"`
		IsChecked bool   `json:"is_checked" validate:"required"`
	} `json:"option_list" validate:"required,min=1,max=20"`
	Mode int `json:"mode" validate:"omitempty,oneof=0 1"`
}

CheckBox 投票选择型

type CheckMemberAuthResponse

type CheckMemberAuthResponse struct {
	internal.BizResponse
	IsMemberAuth bool `json:"is_member_auth"`
}

type CheckSingleAgreeRequest

type CheckSingleAgreeRequest struct {
	Info []struct {
		Userid          string `json:"userid" validate:"required"`
		Exteranalopenid string `json:"exteranalopenid" validate:"required"`
	} `json:"info" validate:"required"`
}

type CheckSingleAgreeResponse

type CheckSingleAgreeResponse struct {
	internal.BizResponse
	Agreeinfo []struct {
		StatusChangeTime int    `json:"status_change_time"`
		Userid           string `json:"userid"`
		Exteranalopenid  string `json:"exteranalopenid"`
		AgreeStatus      string `json:"agree_status"`
	} `json:"agreeinfo"`
}

type ConclusionsImage

type ConclusionsImage struct {
	MediaId string `json:"media_id"`
	PicUrl  string `json:"pic_url"`
}
type ConclusionsLink struct {
	Title  string `json:"title"`
	PicUrl string `json:"pic_url"`
	Desc   string `json:"desc"`
	Url    string `json:"url"`
}

type ConclusionsMiniProgram

type ConclusionsMiniProgram struct {
	Title      string `json:"title"`
	PicMediaId string `json:"pic_media_id"`
	AppId      string `json:"appid"`
	Page       string `json:"page"`
}

type ConclusionsText

type ConclusionsText struct {
	Content string `json:"content"`
}

type ContactMe

type ContactMe struct {
	ConfigId      string   `json:"config_id,omitempty"`
	Type          int      `json:"type" validate:"required,oneof=1 2"`
	Scene         int      `json:"scene" validate:"required,oneof=1 2"`
	Style         int      `json:"style"`
	Remark        string   `json:"remark"`
	SkipVerify    bool     `json:"skip_verify"`
	State         string   `json:"state"`
	User          []string `json:"user"`
	Party         []int32  `json:"party"`
	IsTemp        bool     `json:"is_temp"`
	ExpiresIn     int32    `json:"expires_in"`
	ChatExpiresIn int32    `json:"chat_expires_in"`
	UnionId       string   `json:"unionid"`
	Conclusions   struct {
		*ConclusionsText        `json:"text,omitempty"`
		*ConclusionsImage       `json:"image,omitempty"`
		*ConclusionsLink        `json:"link,omitempty"`
		*ConclusionsMiniProgram `json:"miniprogram,omitempty"`
	} `json:"conclusions"`
}

type ContactMeAddResponse

type ContactMeAddResponse struct {
	internal.BizResponse
	ConfigId string `json:"config_id"`
	QrCode   string `json:"qr_code"`
}

type ContactMeGetResponse

type ContactMeGetResponse struct {
	internal.BizResponse
	ContactWay struct {
		ConfigId string `json:"config_id"`
		ContactMe
	} `json:"contact_way"`
}

type ContactMeListResponse

type ContactMeListResponse struct {
	internal.BizResponse
	ContactWay []struct {
		ConfigId string `json:"config_id"`
	} `json:"contact_way"`
	NextCursor string `json:"next_cursor"`
}

type CorpIdToOpenCorpIdResponse

type CorpIdToOpenCorpIdResponse struct {
	internal.BizResponse
	OpenCorpid string `json:"open_corpid"`
}

type CorpTag

type CorpTag struct {
	Id         string `json:"id,omitempty"`
	Name       string `json:"name" validate:"required,max=30"`
	Order      int32  `json:"order"`
	CreateTime uint64 `json:"create_time,omitempty"`
	Deleted    bool   `json:"deleted,omitempty"`
}

type CorpTagAddResponse

type CorpTagAddResponse struct {
	internal.BizResponse
	TagGroup CorpTagGroup `json:"tag_group"`
}

type CorpTagGroup

type CorpTagGroup struct {
	GroupId    string    `json:"group_id"`
	GroupName  string    `json:"group_name"`
	CreateTime uint64    `json:"create_time,omitempty"`
	Order      int       `json:"order,omitempty"`
	Deleted    bool      `json:"deleted,omitempty"`
	Tag        []CorpTag `json:"tag"`
}

type CorpTagListResponse

type CorpTagListResponse struct {
	internal.BizResponse
	TagGroup []CorpTagGroup `json:"tag_group"`
}

type CreateOrderRequest

type CreateOrderRequest struct {
	CorpId       string `json:"corpid" validate:"required"`
	BuyerUserid  string `json:"buyer_userid" validate:"required"`
	AccountCount struct {
		BaseCount            int `json:"base_count" validate:"required_without=ExternalContactCount,max=1000000"`
		ExternalContactCount int `json:"external_contact_count" validate:"required_without=BaseCount,max=1000000"`
	} `json:"account_count" validate:"required"`
	AccountDuration struct {
		Months int `json:"months"`
	} `json:"account_duration"`
}

type CreateReNewOrderJobRequest

type CreateReNewOrderJobRequest struct {
	CorpId      string `json:"corpid" validate:"required"`
	AccountList []struct {
		Userid string `json:"userid" validate:"required"`
		Type   int    `json:"type" validate:"required,oneof=1 2"`
	} `json:"account_list" validate:"required"`
	JobId string `json:"jobid"`
}

type CreateReNewOrderJobResponse

type CreateReNewOrderJobResponse struct {
	internal.BizResponse
	Jobid              string `json:"jobid"`
	InvalidAccountList []struct {
		internal.BizResponse
		Userid string `json:"userid"`
		Type   int    `json:"type"`
	} `json:"invalid_account_list"`
}

type DealerCorpInfo

type DealerCorpInfo struct {
	Corpid   string `json:"corpid"`
	CorpName string `json:"corp_name"`
}

type Department

type Department struct {
	Id               int32    `json:"id"`
	Order            int32    `json:"order,omitempty"`
	ParentId         int32    `json:"parentid,omitempty" validate:"required"`
	Name             string   `json:"name,omitempty" validate:"required,min=1,max=64"`
	NameEn           string   `json:"name_en,omitempty" validate:"omitempty,min=1,max=64"`
	DepartmentLeader []string `json:"department_leader,omitempty"`
}

type DepartmentCreateResponse

type DepartmentCreateResponse struct {
	internal.BizResponse
	Id int32 `json:"id"`
}

type DepartmentGetResponse

type DepartmentGetResponse struct {
	internal.BizResponse
	Department Department `json:"department"`
}

type DepartmentListResponse

type DepartmentListResponse struct {
	internal.BizResponse
	Department []Department `json:"department"`
}

type DepartmentSimpleListResponse

type DepartmentSimpleListResponse struct {
	internal.BizResponse
	DepartmentId []struct {
		Id       int32 `json:"id"`
		ParentId int32 `json:"parentid"`
		Order    int32 `json:"order"`
	} `json:"department_id"`
}

type EmphasisContent

type EmphasisContent struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

EmphasisContent 文本通知型

type ExternalAttachments

type ExternalAttachments struct {
	Msgtype     string              `json:"msgtype" validate:"required"`
	Image       ExternalImage       `json:"image,omitempty"`
	Link        ExternalLink        `json:"link,omitempty"`
	Miniprogram ExternalMiniprogram `json:"miniprogram,omitempty"`
	Video       ExternalVideo       `json:"video,omitempty"`
	File        ExternalFile        `json:"file,omitempty"`
}

type ExternalAttr

type ExternalAttr struct {
	Type int    `json:"type"`
	Name string `json:"name"`
	Text struct {
		Value string `json:"value"`
	} `json:"text,omitempty"`
	Web struct {
		URL   string `json:"url"`
		Title string `json:"title"`
	} `json:"web,omitempty"`
	Miniprogram struct {
		Appid    string `json:"appid"`
		Pagepath string `json:"pagepath"`
		Title    string `json:"title"`
	} `json:"miniprogram,omitempty"`
}

type ExternalContact

type ExternalContact struct {
	ExternalUserId  string `json:"external_userid"`
	Name            string `json:"name"`
	Position        string `json:"position"`
	Avatar          string `json:"avatar"`
	CorpName        string `json:"corp_name"`
	CorpFullName    string `json:"corp_full_name"`
	Type            int    `json:"type"`
	Gender          int    `json:"gender"`
	UnionId         string `json:"unionid"`
	ExternalProfile struct {
		ExternalAttr []struct {
			Type int    `json:"type"`
			Name string `json:"name"`
			Text struct {
				Value string `json:"value"`
			} `json:"text,omitempty"`
			Web struct {
				Url   string `json:"url"`
				Title string `json:"title"`
			} `json:"web,omitempty"`
			MiniProgram struct {
				AppId    string `json:"appid"`
				PagePath string `json:"pagepath"`
				Title    string `json:"title"`
			} `json:"miniprogram,omitempty"`
		}
	} `json:"external_profile"`
}

type ExternalContactBatchGetByUserResponse

type ExternalContactBatchGetByUserResponse struct {
	internal.BizResponse
	ExternalContactList []struct {
		ExternalContact ExternalContact `json:"external_contact"`
		FollowInfo      FollowUser      `json:"follow_info"`
	} `json:"external_contact_list"`
	NextCursor string `json:"next_cursor"`
}

type ExternalContactGetFollowUserListResponse

type ExternalContactGetFollowUserListResponse struct {
	internal.BizResponse
	FollowUser []string `json:"follow_user"`
}

type ExternalContactGetResponse

type ExternalContactGetResponse struct {
	internal.BizResponse
	ExternalContact ExternalContact `json:"external_contact"`
	FollowUser      []FollowUser    `json:"follow_user"`
	NextCursor      string          `json:"next_cursor"`
}

type ExternalContactList

type ExternalContactList struct {
	TagList []string `json:"tag_list"`
}

type ExternalContactListResponse

type ExternalContactListResponse struct {
	internal.BizResponse
	ExternalUserId []string `json:"external_userid"`
}

type ExternalContactRemarkRequest

type ExternalContactRemarkRequest struct {
	UserId           string   `json:"user_id" validate:"required"`
	ExternalUserid   string   `json:"external_userid" validate:"required"`
	Remark           string   `json:"remark"`
	Description      string   `json:"description"`
	RemarkCompany    string   `json:"remark_company"`
	RemarkMobiles    []string `json:"remark_mobiles"`
	RemarkPicMediaId string   `json:"remark_pic_mediaid"`
}

type ExternalFile

type ExternalFile struct {
	MediaID string `json:"media_id" validate:"required"`
}

type ExternalImage

type ExternalImage struct {
	MediaID string `json:"media_id" validate:"required_without=PicURL"`
	PicURL  string `json:"pic_url" validate:"required_without=MediaID"`
}
type ExternalLink struct {
	Title  string `json:"title" validate:"required"`
	Picurl string `json:"picurl,omitempty"`
	Desc   string `json:"desc,omitempty"`
	URL    string `json:"url"  validate:"required"`
}

type ExternalMiniprogram

type ExternalMiniprogram struct {
	Title      string `json:"title"  validate:"required"`
	PicMediaID string `json:"pic_media_id"  validate:"required"`
	Appid      string `json:"appid"  validate:"required"`
	Page       string `json:"page"  validate:"required"`
}

type ExternalMsg

type ExternalMsg struct {
	ChatType       string   `json:"chat_type,omitempty" validate:"omitempty,oneof=single group"`
	ExternalUserid []string `json:"external_userid,omitempty" validate:"required_without=Sender"`
	ChatIdList     []string `json:"chat_id_list,omitempty"`
	TagFilter      struct {
		GroupList []GroupList `json:"group_list"`
	} `json:"tag_filter"`
	Sender      string                `json:"sender,omitempty" validate:"required_without=ExternalUserid"`
	AllowSelect bool                  `json:"allow_select,omitempty"`
	Text        ExternalText          `json:"text,omitempty" validate:"required_without=Attachments"`
	Attachments []ExternalAttachments `json:"attachments,omitempty" validate:"required_without=Text"`
}

type ExternalText

type ExternalText struct {
	Content string `json:"content"`
}

type ExternalVideo

type ExternalVideo struct {
	MediaID string `json:"media_id" validate:"required"`
}

type FileMessage

type FileMessage struct {
	Message
	Safe int        `json:"safe,omitempty"`
	File MultiMedia `json:"file" validate:"required"`
}

type FollowUser

type FollowUser struct {
	UserId      string `json:"userid"`
	Remark      string `json:"remark,omitempty"`
	Description string `json:"description,omitempty"`
	CreateTime  int64  `json:"createtime"`
	Tags        []struct {
		GroupName string `json:"group_name"`
		TagName   string `json:"tag_name"`
		TagId     string `json:"tag_id"`
		Type      int    `json:"type"`
	} `json:"tags,omitempty"`
	RemarkCorpName string   `json:"remark_corp_name,omitempty"`
	RemarkMobiles  []string `json:"remark_mobiles,omitempty"`
	State          string   `json:"state,omitempty"`
	OperUserId     string   `json:"oper_userid,omitempty"`
	AddWay         int      `json:"add_way,omitempty"`
	WechatChannels struct {
		Nickname string `json:"nickname"`
		Source   int    `json:"source"`
	} `json:"wechat_channels,omitempty"`
}

type GetActiveInfoByCodeRequest

type GetActiveInfoByCodeRequest struct {
	CorpId     string `json:"corpid" validate:"required"`
	ActiveCode string `json:"active_code" validate:"required"`
}

type GetActiveInfoByCodeResponse

type GetActiveInfoByCodeResponse struct {
	internal.BizResponse
	ActiveInfo ActiveInfo `json:"active_info"`
}

type GetActiveInfoByUserRequest

type GetActiveInfoByUserRequest struct {
	CorpId string `json:"corpid" validate:"required"`
	UserId string `json:"userid" validate:"required"`
}

type GetActiveInfoByUserResponse

type GetActiveInfoByUserResponse struct {
	internal.BizResponse
	ActiveStatus   int `json:"active_status"`
	ActiveInfoList []struct {
		ActiveCode string `json:"active_code"`
		Type       int    `json:"type"`
		Userid     string `json:"userid"`
		ActiveTime int    `json:"active_time"`
		ExpireTime int    `json:"expire_time"`
	} `json:"active_info_list"`
}

type GetAdminListRequest

type GetAdminListRequest struct {
	AuthCorpId string `json:"auth_corpid" validate:"required"`
	AgentId    uint   `json:"agentid" validate:"required"`
}

type GetAdminListResponse

type GetAdminListResponse struct {
	internal.BizResponse
	Admin []struct {
		Userid     string `json:"userid"`
		OpenUserid string `json:"open_userid"`
		AuthType   int    `json:"auth_type"`
	} `json:"admin"`
}

type GetAllowScopeResponse

type GetAllowScopeResponse struct {
	internal.BizResponse
	AllowScope struct {
		Students []struct {
			Userid string `json:"userid"`
		} `json:"students"`
		Departments []int `json:"departments"`
	} `json:"allow_scope"`
}

type GetAppQrCodeRequest

type GetAppQrCodeRequest struct {
	SuiteID    string `json:"suite_id"`
	Appid      int    `json:"appid,omitempty"`
	State      string `json:"state,omitempty"`
	Style      int    `json:"style,omitempty" validate:"omitempty,oneof=0 1 2 3 4"`
	ResultType int    `json:"result_type" validate:"required,oneof=2"`
}

type GetAppQrCodeResponse

type GetAppQrCodeResponse struct {
	internal.BizResponse
	QrCode string `json:"qrcode"`
}

type GetAuditGroupChatResponse

type GetAuditGroupChatResponse struct {
	internal.BizResponse
	Roomname       string `json:"roomname"`
	Creator        string `json:"creator"`
	RoomCreateTime int    `json:"room_create_time"`
	Notice         string `json:"notice"`
	Members        []struct {
		Memberid string `json:"memberid"`
		Jointime int    `json:"jointime"`
	} `json:"members"`
}

type GetAuthInfoResponse

type GetAuthInfoResponse struct {
	internal.BizResponse
	DealerCorpInfo DealerCorpInfo `json:"dealer_corp_info"`
	AuthCorpInfo   AuthCorpInfo   `json:"auth_corp_info"`
	AuthInfo       struct {
		Agent []Agent `json:"agent"`
	} `json:"auth_info"`
}

type GetAutoActiveStatusResponse

type GetAutoActiveStatusResponse struct {
	internal.BizResponse
	AutoActiveStatus uint `json:"auto_active_status"`
}

type GetBillListRequest added in v2.0.2

type GetBillListRequest struct {
	BeginTime   int64  `json:"begin_time" validate:"required"` // 单位/unit: s
	EndTime     int64  `json:"end_time" validate:"required"`   // 单位/unit: s
	PayeeUserId string `json:"payee_userid,omitempty"`
	Cursor      string `json:"cursor,omitempty"`
	Limit       int    `json:"limit,omitempty"`
}

type GetBillListResponse added in v2.0.2

type GetBillListResponse struct {
	internal.BizResponse
	NextCursor string `json:"next_cursor"`
	BillList   []struct {
		TransactionId  string `json:"transaction_id"`
		BillType       int    `json:"bill_type"`
		TradeState     int    `json:"trade_state"`
		PayTime        int64  `json:"pay_time"`
		OutTradeNo     string `json:"out_trade_no"`
		OutRefundNo    string `json:"out_refund_no"`
		ExternalUserId string `json:"external_userid"`
		TotalFee       int    `json:"total_fee"` // 单位/unit: cent
		PayeeUserId    string `json:"payee_userid"`
		PaymentType    int    `json:"payment_type"`
		MchId          string `json:"mch_id"`
		Remark         string `json:"remark"`
		CommodityList  []struct {
			Description string `json:"description"`
			Amount      int    `json:"amount"`
		} `json:"commodity_list"`
		TotalRefundFee int `json:"total_refund_fee"`
		RefundList     []struct {
			OutRefundNo   string `json:"out_refund_no"`
			RefundUserId  string `json:"refund_userid"`
			RefundComment string `json:"refund_comment"`
			RefundReqTime int64  `json:"refund_reqtime"`
			RefundStatus  int    `json:"refund_status"`
			RefundFee     int    `json:"refund_fee"`
		} `json:"refund_list"`
		ContactInfo struct {
			Name    string `json:"name"`
			Phone   string `json:"phone"`
			Address string `json:"address"`
		} `json:"contact_info"`
		MiniProgramInfo struct {
			AppId string `json:"appid"`
			Name  string `json:"name"`
		} `json:"miniprogram_info"`
	} `json:"bill_list"`
}

type GetGroupMsgListV2Response

type GetGroupMsgListV2Response struct {
	internal.BizResponse
	NextCursor   string         `json:"next_cursor"`
	GroupMsgList []GroupMsgList `json:"group_msg_list"`
}

type GetGroupMsgSendResultResponse

type GetGroupMsgSendResultResponse struct {
	internal.BizResponse
	SendList []struct {
		ExternalUserId string `json:"external_userid"`
		ChatId         string `json:"chat_id"`
		UserId         string `json:"userid"`
		Status         int    `json:"status"`
		SendTime       int64  `json:"send_time"`
	} `json:"send_list"`
}

type GetGroupMsgTaskResponse

type GetGroupMsgTaskResponse struct {
	internal.BizResponse
	NextCursor string `json:"next_cursor"`
	TaskList   []struct {
		UserId   string `json:"userid"`
		Status   int    `json:"status"`
		SendTime int64  `json:"send_time"`
	} `json:"task_list"`
}

type GetInterceptRuleListResponse

type GetInterceptRuleListResponse struct {
	internal.BizResponse
	RuleList []struct {
		RuleID     string `json:"rule_id"`
		RuleName   string `json:"rule_name"`
		CreateTime int    `json:"create_time"`
	} `json:"rule_list"`
}

type GetInterceptRuleResponse

type GetInterceptRuleResponse struct {
	internal.BizResponse
	Rule struct {
		RuleId string
		InterceptRule
	}
}

type GetInvoiceInfoBatchResponse

type GetInvoiceInfoBatchResponse struct {
	internal.BizResponse
	ItemList []GetInvoiceInfoResponse `json:"item_list"`
}

type GetInvoiceInfoResponse

type GetInvoiceInfoResponse struct {
	internal.BizResponse
	CardID    string `json:"card_id"`
	BeginTime int    `json:"begin_time"`
	EndTime   int    `json:"end_time"`
	Openid    string `json:"openid"`
	Type      string `json:"type"`
	Payee     string `json:"payee"`
	Detail    string `json:"detail"`
	UserInfo  struct {
		Fee         int    `json:"fee"`
		Title       string `json:"title"`
		BillingTime int    `json:"billing_time"`
		BillingNo   string `json:"billing_no"`
		BillingCode string `json:"billing_code"`
		Info        []struct {
			Name  string `json:"name"`
			Num   int    `json:"num"`
			Unit  string `json:"unit"`
			Fee   int    `json:"fee"`
			Price int    `json:"price"`
		} `json:"info"`
		FeeWithoutTax   int    `json:"fee_without_tax"`
		Tax             int    `json:"tax"`
		Detail          string `json:"detail"`
		PdfURL          string `json:"pdf_url"`
		ReimburseStatus string `json:"reimburse_status"`
		CheckCode       string `json:"check_code"`
	} `json:"user_info"`
}

type GetLivingInfoResponse

type GetLivingInfoResponse struct {
	internal.BizResponse
	LivingInfo struct {
		Theme          string `json:"theme"`
		LivingStart    int    `json:"living_start"`
		LivingDuration int    `json:"living_duration"`
		AnchorUserId   string `json:"anchor_userid"`
		LivingRange    struct {
			PartyIds   []int    `json:"partyids"`
			GroupNames []string `json:"group_names"`
		} `json:"living_range"`
		ViewerNum     int    `json:"viewer_num"`
		CommentNum    int    `json:"comment_num"`
		OpenReplay    int    `json:"open_replay"`
		PushStreamURL string `json:"push_stream_url"`
	} `json:"living_info"`
}

type GetLoginInfoResponse

type GetLoginInfoResponse struct {
	internal.BizResponse
	UserType int `json:"usertype"`
	UserInfo struct {
	} `json:"user_info"`
	CorpInfo struct {
		CorpId string `json:"corpid"`
	} `json:"corp_info"`
	Agent []struct {
		AgentId  int `json:"agentid"`
		AuthType int `json:"auth_type"`
	} `json:"agent"`
	AuthInfo []struct {
		Department []struct {
			Id       int  `json:"id"`
			Writable bool `json:"writable"`
		} `json:"department"`
	} `json:"auth_info"`
}

type GetMomentCommentsResponse

type GetMomentCommentsResponse struct {
	internal.BizResponse
	CommentList []struct {
		ExternalUserId string `json:"external_userid"`
		CreateTime     int    `json:"create_time"`
	} `json:"comment_list"`
	LikeList []struct {
		ExternalUserId string `json:"external_userid"`
		CreateTime     int    `json:"create_time"`
	} `json:"like_list"`
}

type GetMomentCustomerListResponse

type GetMomentCustomerListResponse struct {
	internal.BizResponse
	NextCursor   string `json:"next_cursor"`
	CustomerList []struct {
		UserId         string `json:"userid"`
		ExternalUserId string `json:"external_userid"`
	} `json:"customer_list"`
}

type GetMomentListResponse

type GetMomentListResponse struct {
	internal.BizResponse
	NextCursor string       `json:"next_cursor"`
	MomentList []MomentList `json:"moment_list"`
}

type GetMomentSendResultResponse

type GetMomentSendResultResponse struct {
	internal.BizResponse
	NextCursor   string `json:"next_cursor"`
	CustomerList []struct {
		ExternalUserId string `json:"external_userid"`
	} `json:"customer_list"`
}

type GetMomentTaskResponse

type GetMomentTaskResponse struct {
	internal.BizResponse
	NextCursor string `json:"next_cursor"`
	TaskList   []struct {
		UserId        string `json:"userid"`
		PublishStatus int    `json:"publish_status"`
	} `json:"task_list"`
}

type GetMomentTaskResultResponse

type GetMomentTaskResultResponse struct {
	internal.BizResponse
	Status int    `json:"status"`
	Type   string `json:"type"`
	Result struct {
		internal.BizResponse
		MomentId          string `json:"moment_id"`
		InvalidSenderList struct {
			UserList       []string `json:"user_list"`
			DepartmentList []int32  `json:"department_list"`
		} `json:"invalid_sender_list"`
		InvalidExternalContactList struct {
			TagList []string `json:"tag_list"`
		} `json:"invalid_external_contact_list"`
	}
}

type GetNewExternalUserIdResponse

type GetNewExternalUserIdResponse struct {
	internal.BizResponse
	Items []struct {
		ExternalUserid    string `json:"external_userid"`
		NewExternalUserid string `json:"new_external_userid"`
	} `json:"items"`
}

type GetOrderRequest

type GetOrderRequest struct {
	OrderId string `json:"order_id" validate:"required"`
}

type GetOrderResponse

type GetOrderResponse struct {
	internal.BizResponse
	Order struct {
		OrderID      string `json:"order_id"`
		OrderType    int    `json:"order_type"`
		OrderStatus  int    `json:"order_status"`
		Corpid       string `json:"corpid"`
		Price        int    `json:"price"`
		AccountCount struct {
			BaseCount            int `json:"base_count"`
			ExternalContactCount int `json:"external_contact_count"`
		} `json:"account_count"`
		AccountDuration struct {
			Months int `json:"months"`
		} `json:"account_duration"`
		CreateTime int `json:"create_time"`
		PayTime    int `json:"pay_time"`
	} `json:"order"`
}

type GetPaymentResultResponse

type GetPaymentResultResponse struct {
	internal.BizResponse
	ProjectName   string `json:"project_name"`
	Amount        int    `json:"amount"`
	PaymentResult []struct {
		StudentUserid     string `json:"student_userid"`
		TradeState        int    `json:"trade_state"`
		TradeNo           string `json:"trade_no"`
		PayerParentUserid string `json:"payer_parent_userid"`
	} `json:"payment_result"`
}

type GetPermanentCodeResponse

type GetPermanentCodeResponse struct {
	internal.BizResponse
	AccessToken    string         `json:"access_token"`
	ExpiresIn      int            `json:"expires_in"`
	PermanentCode  string         `json:"permanent_code"`
	DealerCorpInfo DealerCorpInfo `json:"dealer_corp_info"`
	AuthCorpInfo   AuthCorpInfo   `json:"auth_corp_info"`
	AuthInfo       struct {
		Agent []Agent `json:"agent"`
	} `json:"auth_info"`
	AuthUserInfo     AuthUserInfo     `json:"auth_user_info"`
	RegisterCodeInfo RegisterCodeInfo `json:"register_code_info"`
	State            string           `json:"state"`
}

type GetPermitUserListResponse

type GetPermitUserListResponse struct {
	internal.BizResponse
	Ids []string `json:"ids"`
}

type GetPreAuthCodeResponse

type GetPreAuthCodeResponse struct {
	internal.BizResponse
	PreAuthCode string `json:"pre_auth_code"`
	ExpiresIn   int    `json:"expires_in"`
}

type GetProductAlbumListResponse

type GetProductAlbumListResponse struct {
	internal.BizResponse
	NextCursor  string `json:"next_cursor"`
	ProductList []struct {
		ProductId string `json:"product_id"`
		Product
	} `json:"product_list"`
}

type GetProductAlbumResponse

type GetProductAlbumResponse struct {
	internal.BizResponse
	Product struct {
		Product
		ProductId  string `json:"product_id"`
		CreateTime int    `json:"create_time"`
	} `json:"product"`
}

type GetSubScribeModeResponse

type GetSubScribeModeResponse struct {
	internal.BizResponse
	SubscribeMode int `json:"subscribe_mode"`
}

type GetSubScribeQrCodeResponse

type GetSubScribeQrCodeResponse struct {
	internal.BizResponse
	QrCodeBig    string `json:"qrcode_big"`
	QrCodeMiddle string `json:"qrcode_middle"`
	QrCodeThumb  string `json:"qrcode_thumb"`
}

type GetTeacherViewModeResponse

type GetTeacherViewModeResponse struct {
	internal.BizResponse
	ViewMode int `json:"view_mode"`
}

type GetTradeRequest

type GetTradeRequest struct {
	PaymentId string `json:"payment_id" validate:"required"`
	TradeNo   string `json:"trade_no" validate:"required"`
}

type GetTradeResponse

type GetTradeResponse struct {
	internal.BizResponse
	TransactionId string `json:"transaction_id"`
	PayTime       int    `json:"pay_time"`
}

type GetUnWatchStatResponse

type GetUnWatchStatResponse struct {
	internal.BizResponse
	Ending   int    `json:"ending"`
	NextKey  string `json:"next_key"`
	StatInfo struct {
		Students []struct {
			StudentUserid string `json:"student_userid"`
			ParentUserid  string `json:"parent_userid"`
			Partyids      []int  `json:"partyids"`
		} `json:"students"`
	} `json:"stat_info"`
}

type GetUserAllLivingIdRequest

type GetUserAllLivingIdRequest struct {
	UserId string `json:"userid" validate:"required"`
	Cursor string `json:"cursor,omitempty"`
	Limit  int    `json:"limit"`
}

type GetUserAllLivingIdResponse

type GetUserAllLivingIdResponse struct {
	internal.BizResponse
	NextCursor   string   `json:"next_cursor"`
	LivingIdList []string `json:"livingid_list"`
}

type GetUserBehaviorDataResponse

type GetUserBehaviorDataResponse struct {
	internal.BizResponse
}

type GetUserBehaviorFilter

type GetUserBehaviorFilter struct {
	UserId    []string `json:"userid" validate:"required_without=PartyId,max=100"`
	PartyId   []uint32 `json:"partyid" validate:"required_without=UserId,max=100"`
	StartTime int      `json:"start_time"`
	EndTime   int      `json:"end_time"`
}

type GetUserDetailResponse

type GetUserDetailResponse struct {
	internal.BizResponse
	Userid  string `json:"userid"`
	Gender  string `json:"gender"`
	Avatar  string `json:"avatar"`
	QrCode  string `json:"qr_code"`
	Mobile  string `json:"mobile"`
	Email   string `json:"email"`
	BizMail string `json:"biz_mail"`
	Address string `json:"address"`
}

type GetUserIdResponse

type GetUserIdResponse struct {
	internal.BizResponse
	UserId string `json:"userid"`
}

type GetUserInfo3rdResponse

type GetUserInfo3rdResponse struct {
	internal.BizResponse
	CorpId     string `json:"CorpId"`
	UserId     string `json:"UserId"`
	DeviceId   string `json:"DeviceId"`
	UserTicket string `json:"user_ticket"`
	ExpiresIn  int    `json:"expires_in"`
	OpenUserId string `json:"open_userid"`
}

type GetUserInfoDetail3rdResponse

type GetUserInfoDetail3rdResponse struct {
	internal.BizResponse
	CorpId string `json:"corpid"`
	UserId string `json:"userid"`
	Name   string `json:"name"`
	Gender string `json:"gender"`
	Avatar string `json:"avatar"`
	QrCode string `json:"qr_code"`
}

type GetUserInfoResponse

type GetUserInfoResponse struct {
	internal.BizResponse
	UserId         string `json:"UserId,omitempty"`
	DeviceId       string `json:"DeviceId,omitempty"`
	UserTicket     string `json:"user_ticket,omitempty"`
	OpenId         string `json:"OpenId,omitempty"`
	ExternalUserId string `json:"external_userid,omitempty"`
}

type GetWatchStatRequest

type GetWatchStatRequest struct {
	LivingId string `json:"livingid" validate:"required"`
	NextKey  string `json:"next_key"`
}

type GetWatchStatResponse

type GetWatchStatResponse struct {
	internal.BizResponse
	Ending     int    `json:"ending"`
	NextKey    string `json:"next_key"`
	StatInfoes struct {
		Students []struct {
			StudentUserid string `json:"student_userid"`
			ParentUserid  string `json:"parent_userid"`
			Partyids      []int  `json:"partyids"`
			WatchTime     int    `json:"watch_time"`
			EnterTime     int    `json:"enter_time"`
			LeaveTime     int    `json:"leave_time"`
			IsComment     int    `json:"is_comment"`
		} `json:"students"`
		Visitors []struct {
			Nickname  string `json:"nickname"`
			WatchTime int    `json:"watch_time"`
			EnterTime int    `json:"enter_time"`
			LeaveTime int    `json:"leave_time"`
			IsComment int    `json:"is_comment"`
		} `json:"visitors"`
	} `json:"stat_infoes"`
}

type GroupChatGetNewExternalUserIdRequest

type GroupChatGetNewExternalUserIdRequest struct {
	ChatID             string   `json:"chat_id" validate:"required"`
	ExternalUseridList []string `json:"external_userid_list" validate:"required,max=1000"`
}

type GroupChatListFilter

type GroupChatListFilter struct {
	StatusFilter int `json:"status_filter,omitempty" validate:"omitempty,oneof=0 1 2 3"`
	OwnerFilter  struct {
		UserIdList []string `json:"userid_list"`
	} `json:"owner_filter,omitempty"`
	Cursor string `json:"cursor,omitempty"`
	Limit  int    `json:"limit" validate:"required,min=1,max=1000"`
}

type GroupChatListResponse

type GroupChatListResponse struct {
	internal.BizResponse
	GroupChatList []struct {
		ChatId string `json:"chat_id"`
		Status int    `json:"status"`
	} `json:"group_chat_list"`
	NextCursor string `json:"next_cursor"`
}

type GroupChatRequest

type GroupChatRequest struct {
	ChatId   string `json:"chat_id" validate:"required"`
	NeedName int    `json:"need_name" validate:"omitempty,oneof=0 1"`
}

type GroupChatResponse

type GroupChatResponse struct {
	internal.BizResponse
	GroupChat struct {
		ChatID     string `json:"chat_id"`
		Name       string `json:"name"`
		Owner      string `json:"owner"`
		CreateTime int    `json:"create_time"`
		Notice     string `json:"notice"`
		MemberList []struct {
			Userid    string `json:"userid"`
			Type      int    `json:"type"`
			JoinTime  int    `json:"join_time"`
			JoinScene int    `json:"join_scene"`
			Invitor   struct {
				Userid string `json:"userid"`
			} `json:"invitor,omitempty"`
			GroupNickname string `json:"group_nickname"`
			Name          string `json:"name"`
			Unionid       string `json:"unionid,omitempty"`
		} `json:"member_list"`
		AdminList []struct {
			Userid string `json:"userid"`
		} `json:"admin_list"`
		MemberVersion string `json:"member_version"`
	} `json:"group_chat"`
}

type GroupChatStatisticFilter

type GroupChatStatisticFilter struct {
	DayBeginTime int `json:"day_begin_time" validate:"required"`
	DayEndTime   int `json:"day_end_time"`
	OwnerFilter  struct {
		UseridList []string `json:"userid_list" validate:"required,max=100"`
	} `json:"owner_filter" validate:"required"`
	OrderBy  int `json:"order_by"`
	OrderAsc int `json:"order_asc"`
	Offset   int `json:"offset"`
	Limit    int `json:"limit"`
}

type GroupChatStatisticGroupByDayFilter

type GroupChatStatisticGroupByDayFilter struct {
	DayBeginTime int `json:"day_begin_time" validate:"required"`
	DayEndTime   int `json:"day_end_time"`
	OwnerFilter  struct {
		UseridList []string `json:"userid_list" validate:"required,max=100"`
	} `json:"owner_filter" validate:"required"`
}

type GroupChatStatisticResponse

type GroupChatStatisticResponse struct {
	internal.BizResponse
	Total      int `json:"total"`
	NextOffset int `json:"next_offset"`
	Items      []struct {
		Owner string `json:"owner"`
		Data  struct {
			NewChatCnt            int `json:"new_chat_cnt"`
			ChatTotal             int `json:"chat_total"`
			ChatHasMsg            int `json:"chat_has_msg"`
			NewMemberCnt          int `json:"new_member_cnt"`
			MemberTotal           int `json:"member_total"`
			MemberHasMsg          int `json:"member_has_msg"`
			MsgTotal              int `json:"msg_total"`
			MigrateTraineeChatCnt int `json:"migrate_trainee_chat_cnt"`
		} `json:"data"`
	} `json:"items"`
}

type GroupChatTransferRequest

type GroupChatTransferRequest struct {
	ChatIdList []string `json:"chat_id_list"`
	NewOwner   string   `json:"new_owner"`
}

type GroupChatTransferResponse

type GroupChatTransferResponse struct {
	internal.BizResponse
	FailedChatList []struct {
		ChatId  string `json:"chat_id"`
		ErrCode int    `json:"errcode"`
		ErrMsg  string `json:"errmsg"`
	} `json:"failed_chat_list"`
}

type GroupList added in v2.0.3

type GroupList struct {
	TagList []string `json:"tag_list"`
}

type GroupMsgList

type GroupMsgList struct {
	Msgid       string                `json:"msgid"`
	Creator     string                `json:"creator"`
	CreateTime  string                `json:"create_time"`
	CreateType  int                   `json:"create_type"`
	Text        ExternalText          `json:"text"`
	Attachments []ExternalAttachments `json:"attachments"`
}

type GroupMsgListFilter

type GroupMsgListFilter struct {
	ChatType   string `json:"chat_type" validate:"required,oneof=single group"`
	StartTime  int64  `json:"start_time" validate:"required"`
	EndTime    int64  `json:"end_time" validate:"required"`
	Creator    string `json:"creator,omitempty"`
	FilterType int    `json:"filter_type,omitempty" validate:"omitempty,oneof=0 1 2"`
	Limit      int    `json:"limit" validate:"max=100"`
	Cursor     string `json:"cursor"`
}

type GroupMsgSendResultFilter

type GroupMsgSendResultFilter struct {
	MsgId  string `json:"msgid" validate:"required"`
	UserId string `json:"userid" validate:"required"`
	Limit  int    `json:"limit"`
	Cursor string `json:"cursor"`
}

type GroupMsgTaskFilter

type GroupMsgTaskFilter struct {
	MsgId  string `json:"msgid" validate:"required"`
	Limit  int    `json:"limit"`
	Cursor string `json:"cursor"`
}

type GroupOpengId2ChatIdResponse

type GroupOpengId2ChatIdResponse struct {
	internal.BizResponse
	ChatId string `json:"chat_id"`
}

type H

type H map[string]interface{}

type HorizontalContentList

type HorizontalContentList struct {
	KeyName string `json:"keyname"`
	Value   string `json:"value"`
	Type    int    `json:"type,omitempty"`
	URL     string `json:"url,omitempty"`
	MediaID string `json:"media_id,omitempty"`
	Userid  string `json:"userid,omitempty"`
}

type IWeWork

type IWeWork interface {
	GetCorpId() string
	GetSuiteId() string
	GetSuiteToken() string
	GetSuiteEncodingAesKey() string
	Logger() *zap.Logger
	SetAppSecretFunc(f func(corpId uint) (corpid string, secret string, customizedApp bool))
	SetAgentIdFunc(f func(corpId uint) (agentId int))

	GetLoginInfo(authCode string) (resp GetLoginInfoResponse)
	GetUserInfo3rd(code string) (resp GetUserInfo3rdResponse)
	GetUserInfoDetail3rd(userTicket string) (resp GetUserInfoDetail3rdResponse)
	GetUserInfo(corpId uint, code string) (resp GetUserInfoResponse)
	GetUserDetail(corpId uint, userTicket string) (resp GetUserDetailResponse)

	AgentGet(corpId uint, agentId int) (resp AgentGetResponse)
	AgentList(corpId uint) (resp AgentListResponse)

	UpdateSuiteTicket(ticket string)

	GetPreAuthCode() (resp GetPreAuthCodeResponse)
	GetPermanentCode(authCode string) (resp GetPermanentCodeResponse)
	GetAuthInfo(authCorpId, permanentCode string) (resp GetAuthInfoResponse)
	GetAppQrCode(request GetAppQrCodeRequest) (resp GetAppQrCodeResponse)

	UserCreate(corpId uint, user User) (resp internal.BizResponse)
	UserUpdate(corpId uint, user User) (resp internal.BizResponse)
	UserDelete(corpId uint, userId string) (resp internal.BizResponse)
	UserGet(corpId uint, userId string) (resp UserGetResponse)
	UserSimpleList(corpId uint, departId int32, fetchChild int) (resp UserSimpleListResponse)
	UserList(corpId uint, departId int32, fetchChild int) (resp UserListResponse)
	UserId2OpenId(corpId uint, userId string) (resp UserId2OpenIdResponse)
	OpenId2UserId(corpId uint, openId string) (resp OpenId2UserIdResponse)
	ListMemberAuth(corpId uint, cursor string, limit int) (resp ListMemberAuthResponse)
	CheckMemberAuth(corpId uint, openUserId string) (resp CheckMemberAuthResponse)
	GetUserId(corpId uint, mobile string) (resp GetUserIdResponse)
	ListSelectedTicketUser(corpId uint, ticket string) (resp ListSelectedTicketUserResponse)
	UserListId(corpId uint, cursor string, limit int) (resp UserListIdResponse)

	CorpTagList(corpId uint, tagIds, groupIds []string) (resp CorpTagListResponse)
	CorpTagAdd(corpId uint, tagGroup CorpTagGroup) (resp CorpTagAddResponse)
	CorpTagUpdate(corpId uint, tag CorpTag) (resp internal.BizResponse)
	CorpTagDelete(corpId uint, tagIds, groupIds []string) (resp internal.BizResponse)
	MarkTag(corpId uint, userId string, externalUserId string, addTag []int, removeTag []int) (resp internal.BizResponse)

	DepartmentCreate(corpId uint, department Department) (resp DepartmentCreateResponse)
	DepartmentUpdate(corpId uint, department Department) (resp internal.BizResponse)
	DepartmentDelete(corpId uint, id int32) (resp internal.BizResponse)
	DepartmentList(corpId uint, id uint) (resp DepartmentListResponse)
	DepartmentSimpleList(corpId uint, id int32) (resp DepartmentSimpleListResponse)
	DepartmentGet(corpId uint, id int32) (resp DepartmentGetResponse)

	ExternalContactGetFollowUserList(corpId uint) (resp ExternalContactGetFollowUserListResponse)
	ExternalContactList(corpId uint, userId string) (resp ExternalContactListResponse)
	ExternalContactGet(corpId uint, externalUserId, cursor string) (resp ExternalContactGetResponse)
	ExternalContactBatchGetByUser(corpId uint, userIds []string, cursor string, limit int) (resp ExternalContactBatchGetByUserResponse)
	ExternalContactRemark(corpId uint, remark ExternalContactRemarkRequest) (resp internal.BizResponse)
	UnionId2ExternalUserId(corpId uint, unionid, openid string) (resp UnionId2ExternalUserIdResponse)
	ToServiceExternalUserid(corpId uint, externalUserId string) (resp ToServiceExternalUseridResponse)

	ExternalAddContactWay(corpId uint, me ContactMe) (resp ContactMeAddResponse)
	ExternalUpdateContactWay(corpId uint, me ContactMe) (resp internal.BizResponse)
	ExternalGetContactWay(corpId uint, configId string) (resp ContactMeGetResponse)
	ExternalListContactWay(corpId uint, startTime, endTime int64, cursor string, limit int) (resp ContactMeListResponse)
	ExternalDeleteContactWay(corpId uint, configId string) (resp internal.BizResponse)
	ExternalCloseTempChat(corpId uint, userId, externalUserId string) (resp internal.BizResponse)

	AddMsgTemplate(corpId uint, msg ExternalMsg) (resp AddMsgTemplateResponse)
	GetGroupMsgListV2(corpId uint, filter GroupMsgListFilter) (resp GetGroupMsgListV2Response)
	GetGroupMsgTask(corpId uint, filter GroupMsgTaskFilter) (resp GetGroupMsgTaskResponse)
	GetGroupMsgSendResult(corpId uint, filter GroupMsgSendResultFilter) (resp GetGroupMsgSendResultResponse)
	SendWelcomeMsg(corpId uint, msg ExternalMsg) (resp internal.BizResponse)

	GetUserBehaviorData(corpId uint, filter GetUserBehaviorFilter) (resp GetUserBehaviorDataResponse)
	GroupChatStatistic(corpId uint, filter GroupChatStatisticFilter) (resp GroupChatStatisticResponse)
	GroupChatStatisticGroupByDay(corpId uint, filter GroupChatStatisticGroupByDayFilter) (resp GroupChatStatisticResponse)

	AddProductAlbum(corpId uint, product Product) (resp AddProductAlbumResponse)
	GetProductAlbum(corpId uint, productId string) (resp GetProductAlbumResponse)
	GetProductAlbumList(corpId uint, limit int, cursor string) (resp GetProductAlbumListResponse)
	UpdateProductAlbum(corpId uint, request ProductUpdateRequest) (resp internal.BizResponse)
	DeleteProductAlbum(corpId uint, productId string) (resp internal.BizResponse)

	AddInterceptRule(corpId uint, interceptRule InterceptRule) (resp AddInterceptRuleResponse)
	GetInterceptRuleList(corpId uint) (resp GetInterceptRuleListResponse)
	GetInterceptRule(corpId uint, ruleId string) (resp GetInterceptRuleResponse)
	UpdateInterceptRule(corpId uint, request UpdateInterceptRuleRequest) (resp internal.BizResponse)
	DeleteInterceptRule(corpId uint, ruleId string) (resp internal.BizResponse)

	GroupChatList(corpId uint, filter GroupChatListFilter) (resp GroupChatListResponse)
	GroupChat(corpId uint, request GroupChatRequest) (resp GroupChatResponse)
	GroupOpengId2ChatId(corpId uint, opengid string) (resp GroupOpengId2ChatIdResponse)

	MediaUploadAttachment(corpId uint, attrs Media) (resp MediaUploadResponse)
	MediaUpload(corpId uint, fileType MediaType, filePath string) (resp MediaUploadResponse)
	MediaUploadImg(corpId uint, filePath string) (resp MediaUploadImgResponse)
	MediaGet(corpId uint, mediaId string) (resp MediaGetResponse)

	GetBillList(corpId uint, req GetBillListRequest) (resp GetBillListResponse)

	MessageSend(corpId uint, msg interface{}) (resp MessageSendResponse)
	MessageReCall(corpId uint, msgId string) (resp internal.BizResponse)

	MessageUpdateTemplateCard(corpId uint, msg TemplateCardUpdateMessage) (resp MessageUpdateTemplateCardResponse)

	AddMomentTask(corpId uint, task MomentTask) (resp AddMomentTaskResponse)
	GetMomentTaskResult(corpId uint, jobId string) (resp GetMomentTaskResultResponse)
	GetMomentList(corpId uint, filter MomentListFilter) (resp GetMomentListResponse)
	GetMomentTask(corpId uint, filter MomentTaskFilter) (resp GetMomentTaskResponse)
	GetMomentCustomerList(corpId uint, filter MomentCustomerFilter) (resp GetMomentCustomerListResponse)
	GetMomentSendResult(corpId uint, filter MomentCustomerFilter) (resp GetMomentSendResultResponse)
	GetMomentComments(corpId uint, momentId string, userId string) (resp GetMomentCommentsResponse)

	TagCreate(corpId uint, tag Tag) (resp TagCreateResponse)
	TagUpdate(corpId uint, tag Tag) (resp internal.BizResponse)
	TagDelete(corpId uint, id int) (resp internal.BizResponse)
	TagList(corpId uint) (resp TagListResponse)
	TagUserList(corpId uint, id int) (resp TagUserListResponse)
	TagAddUsers(corpId uint, tagId int, userIds []string, partyIds []int32) (resp TagAddOrDelUsersResponse)
	TagDelUsers(corpId uint, tagId int, userIds []string, partyIds []int32) (resp TagAddOrDelUsersResponse)

	TransferCustomer(corpId uint, request TransferCustomerRequest) (resp TransferCustomerResponse)
	TransferResult(corpId uint, request TransferResultRequest) (resp TransferResultResponse)
	GetUnassignedList(corpId uint, request UnAssignedRequest) (resp UnAssignedResponse)
	TransferCustomerResigned(corpId uint, request TransferCustomerRequest) (resp TransferCustomerResponse)
	TransferResultResigned(corpId uint, request TransferResultRequest) (resp TransferResultResponse)
	TransferGroupChat(corpId uint, request GroupChatTransferRequest) (resp GroupChatTransferResponse)

	GetInvoiceInfo(corpId uint, query InvoiceInfoQuery) (resp GetInvoiceInfoResponse)
	GetInvoiceInfoBatch(corpId uint, query InvoiceInfoQueryBatch) (resp GetInvoiceInfoBatchResponse)
	UpdateInvoiceStatus(corpId uint, request UpdateInvoiceStatusRequest) (resp internal.BizResponse)
	UpdateInvoiceStatusBatch(corpId uint, request UpdateInvoiceStatusBatchRequest) (resp internal.BizResponse)

	CreateStudent(corpId uint, student Student) (resp internal.BizResponse)
	BatchCreateStudent(corpId uint, students []Student) (resp BatchStudentResponse)
	DeleteStudent(corpId uint, userId string) (resp internal.BizResponse)
	BatchDeleteStudent(corpId uint, userIdList []string) (resp BatchStudentResponse)
	UpdateStudent(corpId uint, student Student) (resp internal.BizResponse)
	BatchUpdateStudent(corpId uint, students []Student) (resp BatchStudentResponse)

	CreateParent(corpId uint, parent Parent) (resp internal.BizResponse)
	BatchCreateParent(corpId uint, parents []Parent) (resp BatchParentResponse)
	DeleteParent(corpId uint, userId string) (resp internal.BizResponse)
	BatchDeleteParent(corpId uint, userIdList []string) (resp BatchParentResponse)
	UpdateParent(corpId uint, parent Parent) (resp internal.BizResponse)
	BatchUpdateParent(corpId uint, parents []Parent) (resp BatchParentResponse)
	ListParentWithDepartmentId(corpId uint, departmentId int32) (resp ListParentWithDepartmentIdResponse)

	SchoolUserGet(corpId uint, userId string) (resp SchoolUserGetResponse)
	SchoolUserList(corpId uint, departmentId uint32, fetchChild int) (resp SchoolUserListResponse)
	SetArchSyncMode(corpId uint, mode int) (resp internal.BizResponse)
	GetSubScribeQrCode(corpId uint) (resp GetSubScribeQrCodeResponse)
	SetSubScribeMode(corpId uint, mode int) (resp internal.BizResponse)
	GetSubScribeMode(corpId uint) (resp GetSubScribeModeResponse)
	BatchToExternalUserId(corpId uint, mobiles []string) (resp BatchToExternalUserIdResponse)
	SetTeacherViewMode(corpId uint, mode int) (resp internal.BizResponse)
	GetTeacherViewMode(corpId uint) (resp GetTeacherViewModeResponse)
	GetAllowScope(corpId uint, agentId int) (resp GetAllowScopeResponse)
	SetUpgradeInfo(corpId uint, request UpgradeRequest) (resp UpgradeInfoResponse)

	SchoolDepartmentCreate(corpId uint, department SchoolDepartment) (resp SchoolDepartmentCreateResponse)
	SchoolDepartmentUpdate(corpId uint, department SchoolDepartment) (resp internal.BizResponse)
	SchoolDepartmentDelete(corpId uint, departmentId int32) (resp internal.BizResponse)
	SchoolDepartmentList(corpId uint, departmentId int32) (resp SchoolDepartmentListResponse)

	GetUserAllLivingId(corpId uint, request GetUserAllLivingIdRequest) (resp GetUserAllLivingIdResponse)
	GetLivingInfo(corpId uint, liveId string) (resp GetLivingInfoResponse)
	GetWatchStat(corpId uint, request GetWatchStatRequest) (resp GetWatchStatResponse)
	GetUnWatchStat(corpId uint, request GetWatchStatRequest) (resp GetUnWatchStatResponse)
	DeleteReplayData(corpId uint, livingId string) (resp internal.BizResponse)

	GetPaymentResult(corpId uint, paymentId string) (resp GetPaymentResultResponse)
	GetTrade(corpId uint, request GetTradeRequest) (resp GetTradeResponse)

	GetJsApiTicket(corpId uint) (resp TicketResponse)
	GetConfigSignature(corpId uint, referer string) (resp JsTicketSignatureResponse)
	GetJsApiAgentTicket(corpId uint, agentId int) (resp TicketResponse)
	GetAgentConfigSignature(corpId uint, agentId int, referer string) (resp JsTicketSignatureResponse)

	KfAccountAdd(corpId uint, account KfAccount) (resp KfAccountAddResponse)
	KfAccountDel(corpId uint, kfId string) (resp internal.BizResponse)
	KfAccountUpdate(corpId uint, account KfAccount) (resp internal.BizResponse)
	KfAccountList(corpId uint, request KfAccountListRequest) (resp KfAccountListResponse)
	KfAddContactWay(corpId uint, kfId string, scene string) (resp KfAccContactWayResponse)
	KfServicerAdd(corpId uint, request KfServicerRequest) (resp KfServicerResponse)
	KfServicerDel(corpId uint, request KfServicerRequest) (resp KfServicerResponse)
	KfServicerList(corpId uint, kfId string) (resp KfServicerListResponse)
	KfServiceStateGet(corpId uint, request KfServiceStateGetRequest) (resp KfServiceStateGetResponse)
	KfServiceStateTrans(corpId uint, request KfServiceStateTransRequest) (resp KfServiceStateTransResponse)
	KfSyncMsg(corpId uint, request KfSyncMsgRequest) (resp KfSyncMsgResponse)
	KfSendMsg(corpId uint, request SendMsgRequest) (resp SendMsgResponse)
	KfSendMsgOnEvent(corpId uint, request SendMsgOnEventRequest) (resp SendMsgResponse)
	KfCustomerBatchGet(corpId uint, userList []string, needEnterSessionContext int) (resp KfCustomerBatchGetResponse)
	// KfGetCorpQualification 仅支持第三方应用,且需具有“微信客服->获取基础信息”权限
	KfGetCorpQualification(corpId uint) (resp KfGetCorpQualificationResponse)
	KfGetUpgradeServiceConfig(corpId uint) (resp KfGetUpgradeServiceConfigResponse)
	KfUpgradeService(corpId uint, request UpgradeServiceRequest) (resp internal.BizResponse)
	KfCancelUpgradeService(corpId uint, request CancelUpgradeServiceRequest) (resp internal.BizResponse)
	// KfGetCorpStatistic
	// 查询时间区间[start_time, end_time]为闭区间,最大查询跨度为31天,用户最多可获取最近180天内的数据。
	// 当天的数据需要等到第二天才能获取,建议在第二天早上六点以后再调用此接口获取前一天的数据
	KfGetCorpStatistic(corpId uint, filter KfGetCorpStatisticFilter) (resp KfGetCorpStatisticResponse)
	// KfGetServicerStatistic
	// 查询时间区间[start_time, end_time]为闭区间,最大查询跨度为31天,用户最多可获取最近180天内的数据。
	// 当天的数据需要等到第二天才能获取,建议在第二天早上六点以后再调用此接口获取前一天的数据
	KfGetServicerStatistic(corpId uint, filter KfGetServicerStatisticFilter) (resp KfGetServicerStatisticResponse)
	KfKnowLedgeAddGroup(corpId uint, name string) (resp KfKnowLedgeAddGroupResponse)
	KfKnowLedgeDelGroup(corpId uint, groupId string) (resp internal.BizResponse)
	KfKnowLedgeModGroup(corpId uint, name string, groupId string) (resp internal.BizResponse)
	KfKnowLedgeListGroup(corpId uint, filter KfKnowLedgeListGroupFilter) (resp KfKnowLedgeListGroupResponse)

	CreateNewOrder(request CreateOrderRequest) (resp OrderResponse)
	CreateReNewOrderJob(request CreateReNewOrderJobRequest) (resp CreateReNewOrderJobResponse)
	SubmitOrderJob(request SubmitOrderJobRequest) (resp OrderResponse)
	ListOrder(request ListOrderRequest) (resp ListOrderResponse)
	GetOrder(request GetOrderRequest) (resp GetOrderResponse)
	ListOrderAccount(request ListOrderAccountRequest) (resp ListOrderAccountResponse)
	ActiveAccount(request ActiveAccountRequest) (resp internal.BizResponse)
	BatchActiveAccount(request BatchActiveAccountRequest) (resp BatchActiveAccountResponse)
	GetActiveInfoByCode(request GetActiveInfoByCodeRequest) (resp GetActiveInfoByCodeResponse)
	BatchGetActiveInfoByCode(request BatchGetActiveInfoByCodeRequest) (resp BatchGetActiveInfoByCodeResponse)
	ListActivedAccount(request ListActivedAccountRequest) (resp ListActivedAccountResponse)
	GetActiveInfoByUser(request GetActiveInfoByUserRequest) (resp GetActiveInfoByUserResponse)
	BatchTransferLicense(request BatchTransferLicenseRequest) (resp BatchTransferLicenseResponse)
	GetAdminList(request GetAdminListRequest) (resp GetAdminListResponse)
	SetAutoActiveStatus(request SetAutoActiveStatusRequest) (resp internal.BizResponse)
	GetAutoActiveStatus(corpid string) (resp GetAutoActiveStatusResponse)

	GetPermitUserList(corpId uint, T int) (resp GetPermitUserListResponse, err error)
	CheckSingleAgree(corpId uint, request CheckSingleAgreeRequest) (resp CheckSingleAgreeResponse, err error)
	GetAuditGroupChat(corpId uint, roomId string) (resp GetAuditGroupChatResponse, err error)
	// ExecuteCorpApi 用于执行未实现的接口,返回 []byte,error
	ExecuteCorpApi(corpId uint, apiUrl string, query url.Values, data H) (body []byte, err error)

	IdConvertExternalTagId(corpId uint, tagIdList []string) (resp IdConvertExternalTagIdResponse)
	CorpIdToOpenCorpId(corpId string) (resp CorpIdToOpenCorpIdResponse)
	UserIdToOpenUserId(corpId uint, userIdList []string) (resp UserIdToOpenUserIdResponse)
	GetNewExternalUserId(corpId uint, userIdList []string) (resp GetNewExternalUserIdResponse)
	GroupChatGetNewExternalUserId(corpId uint, request GroupChatGetNewExternalUserIdRequest) (resp GetNewExternalUserIdResponse)

	RemindGroupMsgSend(corpId uint, msgid string) (resp internal.BizResponse)
	CancelMomentTask(corpId uint, momentId string) (resp internal.BizResponse)

	SetProxy(proxyUrl string)
	SetDebug(debug bool)
	// contains filtered or unexported methods
}

func NewWeWork

func NewWeWork(c WeWorkConfig) IWeWork

type IdConvertExternalTagIdResponse

type IdConvertExternalTagIdResponse struct {
	internal.BizResponse
	Items []struct {
		ExternalTagid     string `json:"external_tagid"`
		OpenExternalTagid string `json:"open_external_tagid"`
	} `json:"items"`
	InvalidExternalTagidList []string `json:"invalid_external_tagid_list"`
}

type IdConvertOpenKfIdResponse

type IdConvertOpenKfIdResponse struct {
	internal.BizResponse
	Items []struct {
		OpenKfId    string `json:"open_kfid"`
		NewOpenKfId string `json:"new_open_kfid"`
	} `json:"items"`
	InvalidOpenKfIdList []string `json:"invalid_open_kfid_list"`
}

type Image

type Image struct {
	MediaID string `json:"media_id" validate:"required"`
}

type ImageMessage

type ImageMessage struct {
	Message
	Safe  int        `json:"safe,omitempty" validate:"omitempty,oneof=0 1"`
	Image MultiMedia `json:"image" validate:"required"`
}

type ImageTextArea

type ImageTextArea struct {
	Type     int    `json:"type" validate:"omitempty,oneof=0 1 2"`
	URL      string `json:"url"`
	AppId    string `json:"appid,omitempty"`
	PagePath string `json:"pagepath,omitempty"`
	Title    string `json:"title"`
	Desc     string `json:"desc"`
	ImageURL string `json:"image_url" validate:"required"`
}

ImageTextArea 图文展示型

type InterceptRule

type InterceptRule struct {
	RuleName        string   `json:"rule_name" validate:"required,max=20"`
	WordList        []string `json:"word_list" validate:"required,max=300"`
	SemanticsList   []int    `json:"semantics_list"`
	InterceptType   int      `json:"intercept_type" validate:"required,oneof=1 2"`
	ApplicableRange struct {
		UserList       []string `json:"user_list" validate:"required_without=DepartmentList,max=1000"`
		DepartmentList []uint   `json:"department_list" validate:"required_without=UserList,max=1000"`
	} `json:"applicable_range"validate:"required"`
}

type InvoiceInfoQuery

type InvoiceInfoQuery struct {
	CardId      string `json:"card_id" validate:"required"`
	EncryptCode string `json:"encrypt_code" validate:"required"`
}

type InvoiceInfoQueryBatch

type InvoiceInfoQueryBatch struct {
	ItemList []InvoiceInfoQuery `json:"item_list" validate:"required"`
}

type JsTicketSignatureResponse

type JsTicketSignatureResponse struct {
	NonceStr string `json:"noncestr"`
	//JsapiTicket string `json:"jsapi_ticket,omitempty"`
	Timestamp int64  `json:"timestamp"`
	Signature string `json:"signature"`
}

type JumpList

type JumpList struct {
	Type     int    `json:"type"`
	Title    string `json:"title"`
	URL      string `json:"url,omitempty"`
	Appid    string `json:"appid,omitempty"`
	PagePath string `json:"pagepath,omitempty"`
}

type KfAccContactWayResponse

type KfAccContactWayResponse struct {
	internal.BizResponse
	Url string `json:"url"`
}

type KfAccount

type KfAccount struct {
	OpenKfId string `json:"open_kfid,omitempty"`
	Name     string `json:"name" validate:"required"`
	MediaId  string `json:"media_id" validate:"required"`
}

type KfAccountAddResponse

type KfAccountAddResponse struct {
	internal.BizResponse
	OpenKfId string `json:"open_kfid"`
}

type KfAccountListRequest

type KfAccountListRequest struct {
	Offset uint32 `json:"offset,omitempty"`
	Limit  uint32 `json:"limit,omitempty" validate:"max=100,min=1"`
}

type KfAccountListResponse

type KfAccountListResponse struct {
	internal.BizResponse
	AccountList []struct {
		OpenKfId        string `json:"open_kfid"`
		Name            string `json:"name"`
		Avatar          string `json:"avatar"`
		ManagePrivilege bool   `json:"manage_privilege"`
	} `json:"account_list"`
}

type KfCustomerBatchGetResponse

type KfCustomerBatchGetResponse struct {
	internal.BizResponse
	CustomerList []struct {
		ExternalUserid      string `json:"external_userid"`
		Nickname            string `json:"nickname"`
		Avatar              string `json:"avatar"`
		Gender              int    `json:"gender"`
		Unionid             string `json:"unionid"`
		EnterSessionContext struct {
			Scene          string `json:"scene"`
			SceneParam     string `json:"scene_param"`
			WechatChannels struct {
				Nickname     string `json:"nickname"`
				ShopNickName string `json:"shop_nickname"`
				Scene        uint32 `json:"scene"`
			} `json:"wechat_channels"`
		} `json:"enter_session_context"`
	} `json:"customer_list"`
	InvalidExternalUserid []string `json:"invalid_external_userid"`
}

type KfGetCorpQualificationResponse

type KfGetCorpQualificationResponse struct {
	internal.BizResponse
	WeChatChannelsBinding bool `json:"wechat_channels_binding"`
}

type KfGetCorpStatisticFilter

type KfGetCorpStatisticFilter struct {
	OpenKfId  string `json:"open_kfid,omitempty"`
	StartTime uint32 `json:"start_time" validate:"required"`
	EndTime   uint32 `json:"end_time" validate:"required"`
}

type KfGetCorpStatisticResponse

type KfGetCorpStatisticResponse struct {
	internal.BizResponse
	StatisticList []struct {
		StatTime  int `json:"stat_time"`
		Statistic struct {
			SessionCnt                int `json:"session_cnt"`
			CustomerCnt               int `json:"customer_cnt"`
			CustomerMsgCnt            int `json:"customer_msg_cnt"`
			UpgradeServiceCustomerCnt int `json:"upgrade_service_customer_cnt"`
			AiSessionReplyCnt         int `json:"ai_session_reply_cnt"`
			AiTransferRate            int `json:"ai_transfer_rate"`
			AiKnowledgeHitRate        int `json:"ai_knowledge_hit_rate"`
		} `json:"statistic"`
	} `json:"statistic_list"`
}

type KfGetServicerStatisticFilter

type KfGetServicerStatisticFilter struct {
	OpenKfId       string `json:"open_kfid,omitempty"`
	ServicerUserId string `json:"servicer_userid,omitempty"`
	StartTime      uint32 `json:"start_time" validate:"required"`
	EndTime        uint32 `json:"end_time" validate:"required"`
}

type KfGetServicerStatisticResponse

type KfGetServicerStatisticResponse struct {
	internal.BizResponse
	StatisticList []struct {
		StatTime  int `json:"stat_time"`
		Statistic struct {
			SessionCnt                         int `json:"session_cnt"`
			CustomerCnt                        int `json:"customer_cnt"`
			CustomerMsgCnt                     int `json:"customer_msg_cnt"`
			ReplyRate                          int `json:"reply_rate"`
			FirstReplyAverageSec               int `json:"first_reply_average_sec"`
			SatisfactionInvestgateCnt          int `json:"satisfaction_investgate_cnt"`
			SatisfactionParticipationRate      int `json:"satisfaction_participation_rate"`
			SatisfiedRate                      int `json:"satisfied_rate"`
			MiddlingRate                       int `json:"middling_rate"`
			DissatisfiedRate                   int `json:"dissatisfied_rate"`
			UpgradeServiceCustomerCnt          int `json:"upgrade_service_customer_cnt"`
			UpgradeServiceMemberInviteCnt      int `json:"upgrade_service_member_invite_cnt"`
			UpgradeServiceMemberCustomerCnt    int `json:"upgrade_service_member_customer_cnt"`
			UpgradeServiceGroupchatInviteCnt   int `json:"upgrade_service_groupchat_invite_cnt"`
			UpgradeServiceGroupchatCustomerCnt int `json:"upgrade_service_groupchat_customer_cnt"`
		} `json:"statistic"`
	} `json:"statistic_list"`
}

type KfGetUpgradeServiceConfigResponse

type KfGetUpgradeServiceConfigResponse struct {
	internal.BizResponse
	MemberRange struct {
		UseridList       []string `json:"userid_list"`
		DepartmentIDList []int    `json:"department_id_list"`
	} `json:"member_range"`
	GroupchatRange struct {
		ChatIDList []string `json:"chat_id_list"`
	} `json:"groupchat_range"`
}

type KfKnowLedgeAddGroupResponse

type KfKnowLedgeAddGroupResponse struct {
	internal.BizResponse
	GroupId string `json:"group_id"`
}

type KfKnowLedgeListGroupFilter

type KfKnowLedgeListGroupFilter struct {
	Cursor  string `json:"cursor,omitempty"`
	Limit   uint32 `json:"limit,omitempty" validate:"omitempty,max=1000"`
	GroupId string `json:"group_id,omitempty"`
}

type KfKnowLedgeListGroupResponse

type KfKnowLedgeListGroupResponse struct {
	internal.BizResponse
	NextCursor string `json:"next_cursor"`
	HasMore    int    `json:"has_more"`
	GroupList  []struct {
		GroupID   string `json:"group_id"`
		Name      string `json:"name"`
		IsDefault int    `json:"is_default"`
	} `json:"group_list"`
}

type KfMessage added in v2.0.2

type KfMessage struct {
	MsgId               string                 `json:"msgid"`
	OpenKfId            string                 `json:"open_kfid"`
	ExternalUserId      string                 `json:"external_userid"`
	SendTime            int                    `json:"send_time"`
	Origin              int                    `json:"origin"`
	ServicerUserId      string                 `json:"servicer_userid"`
	MsgType             string                 `json:"msgtype"`
	Text                MsgText                `json:"text,omitempty"`
	Image               MsgImage               `json:"image,omitempty"`
	Voice               MsgVoice               `json:"voice,omitempty"`
	Video               MsgVideo               `json:"video,omitempty"`
	File                MsgFile                `json:"file,omitempty"`
	Location            MsgLocation            `json:"location,omitempty"`
	Link                MsgLink                `json:"link,omitempty"`
	BusinessCard        MsgBusinessCard        `json:"business_card,omitempty"`
	MiniProgram         MsgMiniProgram         `json:"miniprogram,omitempty"`
	MsgMenu             MsgMenu                `json:"msgmenu,omitempty"`
	ChannelsShopProduct MsgChannelsShopProduct `json:"channels_shop_product,omitempty"`
	ChannelsShopOrder   MsgChannelsShopOrder   `json:"channels_shop_order,omitempty"`
	Event               MsgEvent               `json:"event,omitempty"`
}

type KfServiceStateGetRequest

type KfServiceStateGetRequest struct {
	OpenKfId       string `json:"open_kfid" validate:"required"`
	ExternalUserId string `json:"external_userid" validate:"required"`
}

type KfServiceStateGetResponse

type KfServiceStateGetResponse struct {
	internal.BizResponse
	ServiceState   int    `json:"service_state"`
	ServicerUserId string `json:"servicer_userid"`
}

type KfServiceStateTransRequest

type KfServiceStateTransRequest struct {
	OpenKfId       string `json:"open_kfid" validate:"required"`
	ExternalUserId string `json:"external_userid" validate:"required"`
	ServiceState   int    `json:"service_state" validate:"required,oneof=0 1 2 3 4"`
	ServicerUserId string `json:"servicer_userid"`
}

type KfServiceStateTransResponse

type KfServiceStateTransResponse struct {
	internal.BizResponse
	MsgCode string `json:"msg_code"`
}

type KfServicerListResponse

type KfServicerListResponse struct {
	internal.BizResponse
	ServicerList []struct {
		UserId       string `json:"userid,omitempty"`
		Status       uint   `json:"status,omitempty"`
		DepartmentId uint32 `json:"department_id,omitempty"`
	} `json:"servicer_list"`
}

type KfServicerRequest

type KfServicerRequest struct {
	OpenKfId         string   `json:"open_kfid" validate:"required"`
	UserIdList       []string `json:"userid_list" validate:"required_without=DepartmentIdList,max=100"`
	DepartmentIdList []uint32 `json:"department_id_list" validate:"required_without=UserIdList,max=100"`
}

type KfServicerResponse

type KfServicerResponse struct {
	internal.BizResponse
	ResultList []struct {
		UserId       string `json:"userid,omitempty"`
		DepartmentId uint32 `json:"department_id,omitempty"`
		internal.BizResponse
	} `json:"result_list"`
}

type KfSyncMsgRequest

type KfSyncMsgRequest struct {
	Cursor      string `json:"cursor"`
	Token       string `json:"token"`
	Limit       int    `json:"limit"`
	VoiceFormat int    `json:"voice_format"`
	OpenKfId    string `json:"open_kfid"`
}

type KfSyncMsgResponse

type KfSyncMsgResponse struct {
	internal.BizResponse
	NextCursor string      `json:"next_cursor"`
	HasMore    int         `json:"has_more"`
	MsgList    []KfMessage `json:"msg_list"`
}
type Link struct {
	Title   string `json:"title"`
	URL     string `json:"url" validate:"required"`
	MediaID string `json:"media_id" validate:"required"`
}

type ListActivedAccountRequest

type ListActivedAccountRequest struct {
	CorpId string `json:"corpid" validate:"required"`
	Limit  int    `json:"limit,omitempty" validate:"omitempty,max=1000"`
	Cursor string `json:"cursor,omitempty"`
}

type ListActivedAccountResponse

type ListActivedAccountResponse struct {
	internal.BizResponse
	NextCursor  string       `json:"next_cursor"`
	HasMore     int          `json:"has_more"`
	AccountList []ActiveInfo `json:"account_list"`
}

type ListMemberAuthResponse

type ListMemberAuthResponse struct {
	internal.BizResponse
	NextCursor     string `json:"next_cursor"`
	MemberAuthList []struct {
		OpenUserId string `json:"open_userid"`
	} `json:"member_auth_list"`
}

type ListOrderAccountRequest

type ListOrderAccountRequest struct {
	OrderID string `json:"order_id" validate:"required"`
	Limit   int    `json:"limit,omitempty" validate:"max=1000"`
	Cursor  string `json:"cursor,omitempty"`
}

type ListOrderAccountResponse

type ListOrderAccountResponse struct {
	internal.BizResponse
	NextCursor  string `json:"next_cursor"`
	HasMore     int    `json:"has_more"`
	AccountList []struct {
		ActiveCode string `json:"active_code"`
		Userid     string `json:"userid"`
		Type       int    `json:"type"`
	} `json:"account_list"`
}

type ListOrderRequest

type ListOrderRequest struct {
	Corpid    string `json:"corpid"`
	StartTime int    `json:"start_time" validate:"required_with=EndTime"`
	EndTime   int    `json:"end_time" validate:"required_with=StartTime"`
	Cursor    string `json:"cursor"`
	Limit     int    `json:"limit" validate:"max=1000"`
}

type ListOrderResponse

type ListOrderResponse struct {
	internal.BizResponse
	NextCursor string `json:"next_cursor"`
	HasMore    int    `json:"has_more"`
	OrderList  []struct {
		OrderID   string `json:"order_id"`
		OrderType int    `json:"order_type"`
	} `json:"order_list"`
}

type ListParentWithDepartmentIdResponse

type ListParentWithDepartmentIdResponse struct {
	internal.BizResponse
	Parents []struct {
		ParentUserid   string `json:"parent_userid"`
		Mobile         string `json:"mobile"`
		IsSubscribe    int    `json:"is_subscribe"`
		ExternalUserid string `json:"external_userid,omitempty"`
		Children       []struct {
			StudentUserid string `json:"student_userid"`
			Relation      string `json:"relation"`
			Name          string `json:"name"`
		} `json:"children"`
	} `json:"parents"`
}

type ListSelectedTicketUserResponse

type ListSelectedTicketUserResponse struct {
	internal.BizResponse
	OperatorOpenUserId   string   `json:"operator_open_userid"`
	OpenUserIdList       []string `json:"open_userid_list"`
	UnAuthOpenUserIdList []string `json:"unauth_open_userid_list"`
	Total                int      `json:"total"`
}

type Location

type Location struct {
	Latitude  string `json:"latitude"`
	Longitude string `json:"longitude"`
	Name      string `json:"name"`
}

type MainTitle

type MainTitle struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

type MarkDownMessage

type MarkDownMessage struct {
	Message
	MarkDown Text `json:"markdown" validate:"required"`
}

type Media

type Media struct {
	Type           MediaType `json:"type" validate:"required,oneof=image voice video file"`
	AttachmentType int       `json:"attachment_type" validate:"required,oneof=1 2"`
	FilePath       string    `json:"file_path" validate:"required"`
	FileName       string    `json:"file_name"`
}

type MediaGetResponse added in v2.0.1

type MediaGetResponse struct {
	internal.BizResponse
	File        []byte
	ContentType string
}

type MediaType

type MediaType string
const (
	MediaImage MediaType = "image"
	MediaVoice MediaType = "voice"
	MediaVideo MediaType = "video"
	MediaFile  MediaType = "file"
)

type MediaUploadImgResponse

type MediaUploadImgResponse struct {
	internal.BizResponse
	Url string `json:"url"`
}

type MediaUploadResponse

type MediaUploadResponse struct {
	internal.BizResponse
	Type     string `json:"type"`
	MediaId  string `json:"media_id"`
	CreateAt uint64 `json:"create_at"`
}
type MenuItem struct {
	Type        string               `json:"type"`
	Click       *MenuItemClick       `json:"click,omitempty"`
	View        *MenuItemView        `json:"view,omitempty"`
	MiniProgram *MenuItemMiniProgram `json:"miniprogram,omitempty"`
	Text        *MenuItemText        `json:"text,omitempty"`
}
type MenuItemClick struct {
	ID      string `json:"id"`
	Content string `json:"content"`
}
type MenuItemMiniProgram struct {
	Appid    string `json:"appid"`
	PagePath string `json:"pagepath"`
	Content  string `json:"content"`
}
type MenuItemText struct {
	Content     string  `json:"content"`
	NoNewLine   int     `json:"no_newline,omitempty"`
	TailContent *string `json:"tail_content,omitempty"`
}
type MenuItemView struct {
	URL     string `json:"url"`
	Content string `json:"content"`
}

type Message

type Message struct {
	ToUser                 string `json:"touser,omitempty" validate:"omitempty,required_without=ToParty ToTag"`
	ToParty                string `json:"toparty,omitempty" validate:"omitempty,required_without=ToUser ToTag"`
	ToTag                  string `json:"totag,omitempty" validate:"omitempty,required_without=ToParty ToUser"`
	EnableIDTrans          int    `json:"enable_id_trans,omitempty"`
	EnableDuplicateCheck   int    `json:"enable_duplicate_check,omitempty"`
	DuplicateCheckInterval int    `json:"duplicate_check_interval,omitempty"`
}

type MessageSendResponse

type MessageSendResponse struct {
	internal.BizResponse
	InvalidUser  string `json:"invaliduser"`
	InvalidParty string `json:"invalidparty"`
	InvalidTag   string `json:"invalidtag"`
	MsgId        string `json:"msgid"`
	ResponseCode string `json:"response_code"`
}

type MessageUpdateTemplateCardResponse

type MessageUpdateTemplateCardResponse struct {
	internal.BizResponse
	InvalidUser []string `json:"invalid_user"`
}

type MiniProgramMessage

type MiniProgramMessage struct {
	Message
	MiniProgramNotice MiniProgramNotice `json:"miniprogram_notice"`
}

type MiniProgramNotice

type MiniProgramNotice struct {
	Appid             string `json:"appid" validate:"required"`
	Page              string `json:"page"`
	Title             string `json:"title" validate:"required"`
	Description       string `json:"description"`
	EmphasisFirstItem bool   `json:"emphasis_first_item"`
	ContentItem       []struct {
		Key   string `json:"key" validate:"required"`
		Value string `json:"value" validate:"required"`
	} `json:"content_item"`
}

type MomentCustomerFilter

type MomentCustomerFilter struct {
	MomentId string `json:"moment_id" validate:"required"`
	UserId   string `json:"userid" validate:"required"`
	Cursor   string `json:"cursor,omitempty"`
	Limit    int    `json:"limit,omitempty" validate:"omitempty,max=1000"`
}

type MomentList

type MomentList struct {
	MomentID    string   `json:"moment_id"`
	Creator     string   `json:"creator"`
	CreateTime  string   `json:"create_time"`
	CreateType  int      `json:"create_type"`
	VisibleType int      `json:"visible_type"`
	Text        Text     `json:"text"`
	Image       []Image  `json:"image"`
	Video       Video    `json:"video"`
	Link        Link     `json:"link"`
	Location    Location `json:"location"`
}

type MomentListFilter

type MomentListFilter struct {
	StartTime  int64  `json:"start_time" validate:"required"`
	EndTime    int64  `json:"end_time" validate:"required"`
	Creator    string `json:"creator,omitempty"`
	FilterType int    `json:"filter_type,omitempty" validate:"omitempty,oneof=0 1 2"`
	Cursor     string `json:"cursor"`
	Limit      int    `json:"limit"`
}

type MomentTask

type MomentTask struct {
	Text         Text          `json:"text,omitempty"`
	Attachments  []Attachments `json:"attachments" validate:"required_without=Text.Content"`
	VisibleRange VisibleRange  `json:"visible_range,omitempty"`
}

type MomentTaskFilter

type MomentTaskFilter struct {
	MomentId string `json:"moment_id" validate:"required"`
	Cursor   string `json:"cursor"`
	Limit    int    `json:"limit"`
}

type MpArticle

type MpArticle struct {
	Title            string `json:"title" validate:"required"`
	ThumbMediaId     string `json:"thumb_media_id" validate:"required"`
	Author           string `json:"author,omitempty"`
	ContentSourceUrl string `json:"content_source_url,omitempty"`
	Content          string `json:"content" validate:"required"`
	Digest           string `json:"digest,omitempty"`
}

type MpNews

type MpNews struct {
	Articles []MpArticle `json:"articles" validate:"required"`
}

type MpNewsMessage

type MpNewsMessage struct {
	Message
	Safe   int    `json:"safe,omitempty" validate:"omitempty,oneof=0 1 2"`
	MpNews MpNews `json:"mpnews" validate:"required"`
}

type MsgBusinessCard

type MsgBusinessCard struct {
	UserId string `json:"userid"`
}
type MsgCaLink struct {
	LinkUrl string `json:"link_url"`
}

type MsgChannelsShopOrder

type MsgChannelsShopOrder struct {
	OrderID       string `json:"order_id"`
	ProductTitles string `json:"product_titles"`
	PriceWording  string `json:"price_wording"`
	State         string `json:"state"`
	ImageURL      string `json:"image_url"`
	ShopNickname  string `json:"shop_nickname"`
}

type MsgChannelsShopProduct

type MsgChannelsShopProduct struct {
	ProductID    string `json:"product_id"`
	HeadImg      string `json:"head_img"`
	Title        string `json:"title"`
	SalesPrice   string `json:"sales_price"`
	ShopNickname string `json:"shop_nickname"`
	ShopHeadImg  string `json:"shop_head_img"`
}

type MsgEvent

type MsgEvent struct {
	EventType      string `json:"event_type"`
	OpenKfid       string `json:"open_kfid"`
	ExternalUserid string `json:"external_userid"`
	Scene          string `json:"scene"`
	SceneParam     string `json:"scene_param"`
	WelcomeCode    string `json:"welcome_code"`
	WechatChannels struct {
		Nickname     string `json:"nickname"`
		ShopNickName string `json:"shop_nickname"`
		Scene        uint32 `json:"scene"`
	} `json:"wechat_channels"`
}

type MsgFile

type MsgFile struct {
	MediaId string `json:"media_id"`
}

type MsgImage

type MsgImage struct {
	MediaId string `json:"media_id"`
}
type MsgLink struct {
	Title        string `json:"title"`
	Desc         string `json:"desc"`
	Url          string `json:"url"`
	ThumbMediaId string `json:"thumb_media_id"`
}

type MsgLocation

type MsgLocation struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Name      string  `json:"name"`
	Address   string  `json:"address"`
}

type MsgMenu

type MsgMenu struct {
	HeadContent string     `json:"head_content"`
	List        []MenuItem `json:"list"`
	TailContent string     `json:"tail_content"`
}

type MsgMiniProgram

type MsgMiniProgram struct {
	Title        string `json:"title"`
	AppId        string `json:"appid"`
	PagePath     string `json:"pagepath"`
	ThumbMediaId string `json:"thumb_media_id"`
}

type MsgText

type MsgText struct {
	Content string `json:"content"`
	MenuId  string `json:"menu_id"`
}

type MsgVideo

type MsgVideo struct {
	MediaId string `json:"media_id"`
}

type MsgVoice

type MsgVoice struct {
	MediaId string `json:"media_id"`
}

type MultiMedia

type MultiMedia struct {
	MediaId string `json:"media_id" validate:"required"`
}

type News

type News struct {
	Articles []Article `json:"articles" validate:"required,max=8"`
}

type NewsMessage

type NewsMessage struct {
	Message
	News News `json:"news" validate:"required"`
}

type OpenId2UserIdResponse

type OpenId2UserIdResponse struct {
	internal.BizResponse
	UserId string `json:"userid"`
}

type OrderResponse

type OrderResponse struct {
	internal.BizResponse
	OrderId string `json:"order_id"`
}

type Parent

type Parent struct {
	ParentUserId    string `json:"parent_userid" validate:"required"`
	NewParentUserId string `json:"new_parent_userid,omitempty"`
	Mobile          string `json:"mobile,omitempty" validate:"required"`
	ToInvite        bool   `json:"to_invite,omitempty"`
	Children        []struct {
		StudentUserId string `json:"student_userid"`
		Relation      string `json:"relation"`
	} `json:"children,omitempty" validate:"required,max=10"`
}

type Product

type Product struct {
	Description string `json:"description" validate:"required,max=300"`
	Price       int    `json:"price" validate:"required,max=5000000"`
	ProductSn   string `json:"product_sn" validate:"omitempty,max=128,"`
	Attachments []struct {
		Type  string `json:"type"`
		Image struct {
			MediaID string `json:"media_id"`
		} `json:"image"`
	} `json:"attachments" validate:"required"`
}

type ProductUpdateRequest

type ProductUpdateRequest struct {
	ProductId   string `json:"product_id" validate:"required"`
	Description string `json:"description,omitempty" validate:"omitempty,max=300"`
	Price       int    `json:"price,omitempty" validate:"omitempty,max=5000000"`
	ProductSn   string `json:"product_sn,omitempty" validate:"omitempty,max=128,"`
	Attachments []struct {
		Type  string `json:"type"`
		Image struct {
			MediaID string `json:"media_id"`
		} `json:"image"`
	} `json:"attachments,omitempty" validate:"required"`
}

type QuoteArea

type QuoteArea struct {
	Type      int    `json:"type"`
	URL       string `json:"url"`
	Title     string `json:"title"`
	QuoteText string `json:"quote_text"`
}

type RegisterCodeInfo

type RegisterCodeInfo struct {
	RegisterCode string `json:"register_code"`
	TemplateID   string `json:"template_id"`
	State        string `json:"state"`
}

type SchoolDepartment

type SchoolDepartment struct {
	Name             string `json:"name,omitempty"`
	ParentId         int32  `json:"parentid,omitempty" validate:"required"`
	Id               int32  `json:"id"`
	NewId            int32  `json:"new_id,omitempty"`
	Type             int32  `json:"type,omitempty" validate:"required,oneof=1 2 3 4"`
	RegisterYear     int    `json:"register_year,omitempty" validate:"omitempty,min=1970,max=2100"`
	StandardGrade    int    `json:"standard_grade,omitempty"`
	Order            int    `json:"order,omitempty"`
	DepartmentAdmins []struct {
		Userid  string `json:"userid"`
		Type    int    `json:"type" validate:"oneof=1 2 3 4 5"`
		Subject string `json:"subject"`
	} `json:"department_admins,omitempty"`
}

type SchoolDepartmentCreateResponse

type SchoolDepartmentCreateResponse struct {
	internal.BizResponse
	Id int32 `json:"id"`
}

type SchoolDepartmentListResponse

type SchoolDepartmentListResponse struct {
	internal.BizResponse
	Departments []struct {
		Name             string `json:"name"`
		ParentId         int    `json:"parentid"`
		ID               int    `json:"id"`
		Type             int    `json:"type"`
		RegisterYear     int    `json:"register_year,omitempty"`
		StandardGrade    int    `json:"standard_grade,omitempty"`
		Order            int    `json:"order,omitempty"`
		DepartmentAdmins []struct {
			Userid string `json:"userid"`
			Type   int    `json:"type"`
		} `json:"department_admins"`
		IsGraduated   int    `json:"is_graduated,omitempty"`
		OpenGroupChat int    `json:"open_group_chat,omitempty"`
		GroupChatID   string `json:"group_chat_id,omitempty"`
	} `json:"departments"`
}

type SchoolUserGetResponse

type SchoolUserGetResponse struct {
	internal.BizResponse
	UserType int `json:"user_type"`
	Student  struct {
		StudentUserId string `json:"student_userid"`
		Name          string `json:"name"`
		Department    []int  `json:"department"`
		Parents       []struct {
			ParentUserId   string `json:"parent_userid"`
			Relation       string `json:"relation"`
			Mobile         string `json:"mobile"`
			IsSubscribe    int    `json:"is_subscribe"`
			ExternalUserId string `json:"external_userid,omitempty"`
		} `json:"parents"`
	} `json:"student,omitempty"`
	Parent struct {
		ParentUserId   string `json:"parent_userid"`
		Mobile         string `json:"mobile"`
		IsSubscribe    int    `json:"is_subscribe"`
		ExternalUserId string `json:"external_userid"`
		Children       []struct {
			StudentUserId string `json:"student_userid"`
			Relation      string `json:"relation"`
		} `json:"children"`
	} `json:"parent,omitempty"`
}

type SchoolUserListResponse

type SchoolUserListResponse struct {
	internal.BizResponse
	Students []struct {
		StudentUserid string `json:"student_userid"`
		Name          string `json:"name"`
		Department    []int  `json:"department"`
		Parents       []struct {
			ParentUserid   string `json:"parent_userid"`
			Relation       string `json:"relation"`
			Mobile         string `json:"mobile"`
			IsSubscribe    int    `json:"is_subscribe"`
			ExternalUserid string `json:"external_userid,omitempty"`
		} `json:"parents"`
	} `json:"students"`
}

type SelectList

type SelectList struct {
	QuestionKey string `json:"question_key" validate:"required"`
	Title       string `json:"title,omitempty"`
	SelectedID  string `json:"selected_id,omitempty"`
	OptionList  []struct {
		ID   string `json:"id" validate:"required"`
		Text string `json:"text" validate:"required"`
	} `json:"option_list" validate:"required"`
}

SelectList 多项选择型

type SendMsgOnEventRequest

type SendMsgOnEventRequest struct {
	Code    string   `json:"code" validate:"required"`
	MsgId   string   `json:"msgid,omitempty"`
	MsgType string   `json:"msgtype" validate:"required,oneof=text msgmenu"`
	Text    *MsgText `json:"text,omitempty"`
	MsgMenu *MsgMenu `json:"msgmenu,omitempty"`
}

type SendMsgRequest

type SendMsgRequest struct {
	ToUser      string          `json:"touser" validate:"required"`
	OpenKfId    string          `json:"open_kfid" validate:"required"`
	MsgId       string          `json:"msgid,omitempty"`
	MsgType     string          `json:"msgtype" validate:"required"`
	Text        *MsgText        `json:"text,omitempty"`
	Image       *MsgImage       `json:"image,omitempty"`
	Voice       *MsgVoice       `json:"voice,omitempty"`
	Video       *MsgVideo       `json:"video,omitempty"`
	File        *MsgFile        `json:"file,omitempty"`
	Location    *MsgLocation    `json:"location,omitempty"`
	Link        *MsgLink        `json:"link,omitempty"`
	MiniProgram *MsgMiniProgram `json:"miniprogram,omitempty"`
	MsgMenu     *MsgMenu        `json:"msgmenu,omitempty"`
	CaLink      *MsgCaLink      `json:"ca_link,omitempty"`
}

type SendMsgResponse

type SendMsgResponse struct {
	internal.BizResponse
	MsgId string `json:"msgid"`
}

type SenderList

type SenderList struct {
	UserList       []string `json:"user_list"`
	DepartmentList []int    `json:"department_list"`
}

type SetAutoActiveStatusRequest

type SetAutoActiveStatusRequest struct {
	CorpId           string `json:"corpid" validate:"required"`
	AutoActiveStatus uint   `json:"auto_active_status" validate:"required,oneof=0 1"`
}

type Source

type Source struct {
	IconURL   string `json:"icon_url"`
	Desc      string `json:"desc"`
	DescColor int    `json:"desc_color"`
}

type Student

type Student struct {
	StudentUserId    string `json:"student_userid" validate:"required"`
	Name             string `json:"name,omitempty" validate:"required"`
	Department       []uint `json:"department,omitempty" validate:"required,max=20"`
	ToInvite         bool   `json:"to_invite,omitempty"`
	Mobile           string `json:"mobile,omitempty"`
	NewStudentUserId string `json:"new_student_userid,omitempty"`
}

type SubmitButton

type SubmitButton struct {
	Text string `json:"text" validate:"required"`
	Key  string `json:"key" validate:"required"`
}

type SubmitOrderJobRequest

type SubmitOrderJobRequest struct {
	Jobid           string `json:"jobid" validate:"required"`
	BuyerUserid     string `json:"buyer_userid" validate:"required"`
	AccountDuration struct {
		Months int `json:"months" validate:"required"`
	} `json:"account_duration" validate:"required"`
}

type Tag

type Tag struct {
	TagId   int    `json:"tagid"`
	TagName string `json:"tagname" validate:"required,max=32"`
}

type TagAddOrDelUsersResponse

type TagAddOrDelUsersResponse struct {
	internal.BizResponse
	InvalidList  string  `json:"invalidlist,omitempty"`
	InvalidParty []int32 `json:"invalidparty,omitempty"`
}

type TagCreateResponse

type TagCreateResponse struct {
	internal.BizResponse
	TagId int `json:"tagid"`
}

type TagListResponse

type TagListResponse struct {
	internal.BizResponse
	TagList []Tag `json:"taglist"`
}

type TagUserListResponse

type TagUserListResponse struct {
	internal.BizResponse
	TagName  string `json:"tagname"`
	UserList []struct {
		UserId string `json:"userid"`
		Name   string `json:"name"`
	} `json:"userlist"`
	PartyList []int32 `json:"partylist"`
}

type TemplateCard

type TemplateCard struct {
	CardType   TemplateCardType `json:"card_type"`
	Source     Source           `json:"source"`
	ActionMenu *ActionMenu      `json:"action_menu,omitempty" validate:"required_with=TaskID"`
	TaskID     string           `json:"task_id,omitempty" validate:"required_with=ActionMenu"`
	MainTitle  MainTitle        `json:"main_title"`
	QuoteArea  QuoteArea        `json:"quote_area"`
	// 文本通知型
	EmphasisContent *EmphasisContent `json:"emphasis_content,omitempty"`
	SubTitleText    string           `json:"sub_title_text,omitempty"`
	// 图文展示型
	ImageTextArea         *ImageTextArea          `json:"image_text_area,omitempty"`
	CardImage             *CardImage              `json:"card_image,omitempty"`
	HorizontalContentList []HorizontalContentList `json:"horizontal_content_list"`
	JumpList              []JumpList              `json:"jump_list"`
	CardAction            CardAction              `json:"card_action,omitempty"`
	// 按钮交互型
	ButtonSelection *ButtonSelection `json:"button_selection,omitempty"`
	ButtonList      []Button         `json:"button_list,omitempty" validate:"omitempty,max=6"`
	// 投票选择型
	CheckBox     *CheckBox     `json:"checkbox,omitempty"`
	SelectList   []SelectList  `json:"select_list,omitempty" validate:"max=3"`
	SubmitButton *SubmitButton `json:"submit_button,omitempty"`
}

TODO: CardAction 必填(text_notice,news_notice)判断

type TemplateCardMessage

type TemplateCardMessage struct {
	Message
	TemplateCard TemplateCard `json:"template_card"`
}

TemplateCardMessage 测试发送模板卡片消息必需配置应用回调地址

type TemplateCardType

type TemplateCardType string
const (
	CardTypeTextNotice          TemplateCardType = "text_notice"
	CardTypeNewsNotice          TemplateCardType = "news_notice"
	CardTypeButtonInteraction   TemplateCardType = "button_interaction"
	CardTypeVoteInteraction     TemplateCardType = "vote_interaction"
	CardTypeMultipleInteraction TemplateCardType = "multiple_interaction"
)

type TemplateCardUpdateMessage

type TemplateCardUpdateMessage struct {
	UserIds      []string `json:"userids" validate:"omitempty,max=100"`
	PartyIds     []int64  `json:"partyids" validate:"omitempty,max=100"`
	TagIds       []int32  `json:"tagids" validate:"omitempty,max=100"`
	AtAll        int      `json:"atall,omitempty"`
	ResponseCode string   `json:"response_code" validate:"required"`
	Button       struct {
		ReplaceName string `json:"replace_name" validate:"required"`
	} `json:"button" validate:"required_without=TemplateCard"`
	TemplateCard TemplateCard `json:"template_card" validate:"required_without=Button"`
	ReplaceText  string       `json:"replace_text,omitempty"`
}

type Text

type Text struct {
	Content string `json:"content"`
}

type TextCard

type TextCard struct {
	Title       string `json:"title" validate:"required"`
	Description string `json:"description" validate:"required"`
	Url         string `json:"url" validate:"required"`
	BtnTxt      string `json:"btntxt"`
}

type TextCardMessage

type TextCardMessage struct {
	Message
	TextCard TextCard `json:"textcard" validate:"required"`
}

type TextMessage

type TextMessage struct {
	Message
	Safe int  `json:"safe,omitempty" validate:"omitempty,oneof=0 1"`
	Text Text `json:"text" validate:"required"`
}

type TicketResponse

type TicketResponse struct {
	internal.BizResponse
	Ticket    string `json:"ticket"`
	ExpiresIn int    `json:"expires_in"`
}

type ToServiceExternalUseridResponse

type ToServiceExternalUseridResponse struct {
	internal.BizResponse
}

type TransferCustomerRequest

type TransferCustomerRequest struct {
	HandoverUserId     string   `json:"handover_userid" validate:"required"`
	TakeoverUserId     string   `json:"takeover_userid" validate:"required"`
	ExternalUserId     []string `json:"external_userid" validate:"required"`
	TransferSuccessMsg string   `json:"transfer_success_msg,omitempty" validate:"omitempty,max=200"`
}

type TransferCustomerResponse

type TransferCustomerResponse struct {
	internal.BizResponse
	Customer []struct {
		ExternalUserId string `json:"external_userid"`
		ErrCode        int    `json:"errcode"`
	}
}

type TransferResultRequest

type TransferResultRequest struct {
	HandoverUserId string `json:"handover_userid" validate:"required"`
	TakeoverUserId string `json:"takeover_userid" validate:"required"`
	Cursor         string `json:"cursor"`
}

type TransferResultResponse

type TransferResultResponse struct {
	internal.BizResponse
	Customer []struct {
		ExternalUserId string `json:"external_userid"`
		Status         int    `json:"status"`
		TakeoverTime   uint64 `json:"takeover_time"`
	} `json:"customer"`
	NextCursor string `json:"next_cursor"`
}

type UnAssignedInfo

type UnAssignedInfo struct {
	HandoverUserId string `json:"handover_userid"`
	ExternalUserId string `json:"external_userid"`
	DimissionTime  uint64 `json:"dimission_time"`
}

type UnAssignedRequest

type UnAssignedRequest struct {
	PageId   int    `json:"page_id" validate:"required_without=Cursor,omitempty"`
	PageSize int    `json:"page_size" validate:"max=1000"`
	Cursor   string `json:"cursor" validate:"required_without=PageId,omitempty"`
}

type UnAssignedResponse

type UnAssignedResponse struct {
	internal.BizResponse
	Info       []UnAssignedInfo `json:"info"`
	IsLast     bool             `json:"is_last"`
	NextCursor string           `json:"next_cursor"`
}

type UnionId2ExternalUserIdResponse

type UnionId2ExternalUserIdResponse struct {
	internal.BizResponse
	ExternalUserId string `json:"external_userid"`
}

type UpdateInterceptRuleRequest

type UpdateInterceptRuleRequest struct {
	RuleId    string   `json:"rule_id" validate:"required"`
	RuleName  string   `json:"rule_name,omitempty"`
	WordList  []string `json:"word_list,omitempty"`
	ExtraRule struct {
		SemanticsList []int `json:"semantics_list"`
	} `json:"extra_rule,omitempty"`
	InterceptType      int `json:"intercept_type,omitempty" validate:"omitempty,oneof=1 2"`
	AddApplicableRange struct {
		UserList       []string `json:"user_list" validate:"required_without=DepartmentList,max=1000"`
		DepartmentList []uint   `json:"department_list" validate:"required_without=UserList,max=1000"`
	} `json:"add_applicable_range,omitempty"`
	RemoveApplicableRange struct {
		UserList       []string `json:"user_list" validate:"required_without=DepartmentList,max=1000"`
		DepartmentList []uint   `json:"department_list" validate:"required_without=UserList,max=1000"`
	} `json:"remove_applicable_range,omitempty"`
}

type UpdateInvoiceStatusBatchRequest

type UpdateInvoiceStatusBatchRequest struct {
	OpenId          string             `json:"openid" validate:"required"`
	ReimburseStatus string             `json:"reimburse_status" validate:"required,oneof=INVOICE_REIMBURSE_INIT INVOICE_REIMBURSE_LOCK INVOICE_REIMBURSE_CLOSURE"`
	InvoiceList     []InvoiceInfoQuery `json:"invoice_list" validate:"required"`
}

type UpdateInvoiceStatusRequest

type UpdateInvoiceStatusRequest struct {
	CardId          string `json:"card_id" validate:"required"`
	EncryptCode     string `json:"encrypt_code" validate:"required"`
	ReimburseStatus string `json:"reimburse_status" validate:"required,oneof=INVOICE_REIMBURSE_INIT INVOICE_REIMBURSE_LOCK INVOICE_REIMBURSE_CLOSURE"`
}

type UpgradeInfoResponse

type UpgradeInfoResponse struct {
	internal.BizResponse
	NextUpgradeTime int `json:"next_upgrade_time"`
}

type UpgradeRequest

type UpgradeRequest struct {
	UpgradeTime   int `json:"upgrade_time,omitempty"`
	UpgradeSwitch int `json:"upgrade_switch,omitempty" validate:"omitempty,oneof=0 1"`
}

type UpgradeServiceGroupChat

type UpgradeServiceGroupChat struct {
	ChatId  string `json:"chat_id" validate:"required"`
	Wording string `json:"wording"`
}

type UpgradeServiceMember

type UpgradeServiceMember struct {
	UserId  string `json:"userid" validate:"required"`
	Wording string `json:"wording"`
}

type UpgradeServiceRequest

type UpgradeServiceRequest struct {
	OpenKfId       string                   `json:"open_kfid" validate:"required"`
	ExternalUserId string                   `json:"external_userid" validate:"required"`
	Type           int                      `json:"type" validate:"required,oneof=1 2"`
	Member         *UpgradeServiceMember    `json:"member,omitempty"`
	GroupChat      *UpgradeServiceGroupChat `json:"groupchat,omitempty"`
}

type User

type User struct {
	OpenUserId     string      `json:"open_userid,omitempty"` // 仅在查询时返回
	Userid         string      `json:"userid" validate:"required"`
	Name           string      `json:"name,omitempty" validate:"required"`
	Alias          string      `json:"alias,omitempty"`
	Mobile         string      `json:"mobile,omitempty"  validate:"required_without=Email,omitempty"`
	Department     []int32     `json:"department,omitempty" validate:"required,max=100"`
	Order          []int32     `json:"order,omitempty"`
	Position       string      `json:"position,omitempty"`
	Gender         string      `json:"gender,omitempty" validate:"omitempty,oneof=1 2"`
	Email          string      `json:"email,omitempty"  validate:"required_without=Mobile,omitempty,email"`
	BizEmail       string      `json:"biz_email,omitempty"`
	IsLeaderInDept []int       `json:"is_leader_in_dept,omitempty"`
	DirectLeader   []string    `json:"direct_leader,omitempty"`
	Enable         json.Number `json:"enable,omitempty"`
	Avatar         string      `json:"avatar,omitempty"`
	ThumbAvatar    string      `json:"thumb_avatar,omitempty"`
	Telephone      string      `json:"telephone,omitempty"`
	Address        string      `json:"address,omitempty"`
	MainDepartment int32       `json:"main_department,omitempty"`
	Status         int         `json:"status,omitempty"`
	QrCode         string      `json:"qr_code,omitempty"`
	Extattr        *struct {
		Attrs []Attrs `json:"attrs,omitempty"`
	} `json:"extattr,omitempty"`
	ToInvite         bool   `json:"to_invite,omitempty"`
	ExternalPosition string `json:"external_position,omitempty"`
	ExternalProfile  *struct {
		ExternalCorpName string `json:"external_corp_name,omitempty"`
		WechatChannels   struct {
			Nickname string `json:"nickname,omitempty"`
		} `json:"wechat_channels,omitempty"`
		ExternalAttr []ExternalAttr `json:"external_attr,omitempty"`
	} `json:"external_profile,omitempty"`
}

type UserGetResponse

type UserGetResponse struct {
	internal.BizResponse
	User
}

type UserId2OpenIdResponse

type UserId2OpenIdResponse struct {
	internal.BizResponse
	OpenId string `json:"openid"`
}

type UserIdToOpenUserIdResponse

type UserIdToOpenUserIdResponse struct {
	internal.BizResponse
	OpenUserIdList []struct {
		UserId     string `json:"userid"`
		OpenUserId string `json:"open_userid"`
	} `json:"open_userid_list"`
	InvalidUserIdList []string `json:"invalid_userid_list"`
}

type UserListIdResponse

type UserListIdResponse struct {
	internal.BizResponse
	NextCursor string `json:"next_cursor"`
	DeptUser   []struct {
		UserId     string `json:"userid"`
		OpenUserId string `json:"open_userid"`
		Department int    `json:"department"`
	} `json:"dept_user"`
}

type UserListResponse

type UserListResponse struct {
	internal.BizResponse
	UserList []User `json:"userlist"`
}

type UserSimpleListResponse

type UserSimpleListResponse struct {
	internal.Error
	UserList []struct {
		UserId     string `json:"userid"`
		Name       string `json:"name"`
		Department []int  `json:"department"`
		OpenUserId string `json:"open_userid"`
	} `json:"userlist"`
}

type Video

type Video struct {
	MediaID     string `json:"media_id" validate:"required"`
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
}

Video 应用消息发关时title和description为可选项 朋友圈发送时只设置 media_id即可

type VideoMessage

type VideoMessage struct {
	Message
	Safe  int   `json:"safe,omitempty" validate:"omitempty,oneof=0 1"`
	Video Video `json:"video" validate:"required"`
}

type VisibleRange

type VisibleRange struct {
	SenderList          SenderList          `json:"sender_list,omitempty"`
	ExternalContactList ExternalContactList `json:"external_contact_list,omitempty"`
}

type VoiceMessage

type VoiceMessage struct {
	Message
	Safe  int        `json:"safe,omitempty"`
	Voice MultiMedia `json:"voice" validate:"required"`
}

type WeWorkConfig

type WeWorkConfig struct {
	CorpId              string
	ProviderSecret      string
	SuiteId             string
	SuiteSecret         string
	SuiteToken          string
	SuiteEncodingAesKey string
	Dsn                 string
}

Directories

Path Synopsis
pkg
svr

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL