import "../base.api" type ( // The response data of contact information | Contact信息 ContactInfo { BaseIDInfo // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status *uint8 `json:"status,optional"` // 属主微信id WxWxid *string `json:"wxWxid,optional"` // 联系人类型:1好友,2群组,3公众号,4企业微信联系人 Type *int `json:"type,optional"` // 微信id 公众号微信ID Wxid *string `json:"wxid,optional"` // 微信账号 Account *string `json:"account,optional"` // 微信昵称 群备注名称 Nickname *string `json:"nickname,optional"` // 备注名 Markname *string `json:"markname,optional"` // 头像 Headimg *string `json:"headimg,optional"` // 性别 0未知 1男 2女 Sex *int `json:"sex,optional"` // 星标 65/67=星标 1/3=未星标 Starrole *string `json:"starrole,optional"` // 不让他看我的朋友圈 0可以看 1不让看 Dontseeit *int `json:"dontseeit,optional"` // 不看他的朋友圈 0可以看 1不看 1=开启了不看他 128/129=仅聊天 Dontseeme *int `json:"dontseeme,optional"` // 所属标签id清单,多开会用逗号隔开 Lag *string `json:"lag,optional"` // 群组id Gid *string `json:"gid,optional"` // 群组名称 Gname *string `json:"gname,optional"` // v3数据 V3 *string `json:"v3,optional"` } // The response data of contact list | Contact列表数据 ContactListResp { BaseDataInfo // Contact list data | Contact列表数据 Data ContactListInfo `json:"data"` } // Contact list data | Contact列表数据 ContactListInfo { BaseListInfo // The API list data | Contact列表数据 Data []ContactInfo `json:"data"` } // Get contact list request params | Contact列表请求参数 ContactListReq { PageInfo // 属主微信id WxWxid *string `json:"wxWxid,optional"` // 微信id 公众号微信ID Wxid *string `json:"wxid,optional"` // 微信账号 Account *string `json:"account,optional"` } // Contact information response | Contact信息返回体 ContactInfoResp { BaseDataInfo // Contact information | Contact数据 Data ContactInfo `json:"data"` } ) @server( jwt: Auth group: Contact middleware: Authority ) service Wechat { // Create contact information | 创建Contact @handler createContact post /contact/create (ContactInfo) returns (BaseMsgResp) // Update contact information | 更新Contact @handler updateContact post /contact/update (ContactInfo) returns (BaseMsgResp) // Delete contact information | 删除Contact信息 @handler deleteContact post /contact/delete (IDsReq) returns (BaseMsgResp) // Get contact list | 获取Contact列表 @handler getContactList post /contact/list (ContactListReq) returns (ContactListResp) // Get contact by ID | 通过ID获取Contact @handler getContactById post /contact (IDReq) returns (ContactInfoResp) }