123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- import "../base.api"
- type (
- // ContactLabelList | Contact标签列表
- ContactLabelList {
- // label
- Label *string `json:"label,optional"`
- // value
- Value *uint64 `json:"value,optional"`
- }
- // 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"`
- // 属主微信昵称
- WxWxidNickname *string `json:"wxWxidNickname,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"`
- // Label Relationships | 标签关系
- LabelRelationships []ContactLabelList `json:"labelRelationships,optional"`
- // 组织ID
- OrganizationId *uint64 `json:"organizationId,optional"`
- // 是否在黑名单中
- IsInBlockList *bool `json:"isInBlockList,optional"`
- }
- // The response data of label information | Label信息
- LabelInfo {
- BaseIDInfo
- // Status 1: normal 2: ban | 状态 1 正常 2 禁用
- Status *uint8 `json:"status,optional"`
- // 标签类型:1好友,2群组,3公众号,4企业微信联系人
- Type *int `json:"type,optional"`
- // 标签名称
- Name *string `json:"name,optional"`
- // 标签来源:1后台创建 2个微同步
- From *int `json:"from,optional"`
- // 标签模式:1动态 2静态
- Mode *int `json:"mode,optional"`
- // 标签的触达条件
- Conditions *string `json:"conditions,optional"`
- // 组织ID
- OrganizationId *uint64 `json:"organizationId,optional"`
- // Label Relationships | 标签关系
- LabelRelationships []LabelRelationshipInfo `json:"labelRelationships,optional"`
- }
- // The response data of label relationship information | LabelRelationship信息
- LabelRelationshipInfo {
- BaseIDInfo
- // Status 1: normal 2: ban | 状态 1 正常 2 禁用
- Status *uint8 `json:"status,optional"`
- // 标签 ID
- LabelId *uint64 `json:"labelId,optional"`
- // 联系人 ID
- ContactId *uint64 `json:"contactId,optional"`
- // Contact information | 联系人信息
- Contact ContactInfo `json:"contact,optional"`
- // Label information | 标签信息
- Label LabelInfo `json:"label,optional"`
- // 组织ID
- OrganizationId *uint64 `json:"organizationId,optional"`
- }
- // The response data of label relationship information | LabelRelationship信息
- LabelRelationshipsInfo {
- BaseIDInfo
- // 更新类型:为空或“all”时表示全量更新,为 “add” 时表示仅追加
- UpdateType *string `json:"updateType,optional"`
- // 标签 ID
- LabelIds []uint64 `json:"labelIds,optional"`
- // 联系人 ID
- ContactId *uint64 `json:"contactId,optional"`
- }
- BatchLabelRelationshipsInfo {
- // 更新类型:为1 时表示增加标签,为 -1 时表示移除标签
- UpdateType int `json:"updateType,optional"`
- // 标签 ID
- LabelIds []uint64 `json:"labelIds,optional"`
- // 联系人 ID
- ContactIds []uint64 `json:"contactIds,optional"`
- }
- // The response data of label relationship list | LabelRelationship列表数据
- LabelRelationshipListResp {
- BaseDataInfo
- // LabelRelationship list data | LabelRelationship列表数据
- Data LabelRelationshipListInfo `json:"data"`
- }
- // LabelRelationship list data | LabelRelationship列表数据
- LabelRelationshipListInfo {
- BaseListInfo
- // The API list data | LabelRelationship列表数据
- Data []LabelRelationshipInfo `json:"data"`
- }
- // Get label relationship list request params | LabelRelationship列表请求参数
- LabelRelationshipListReq {
- PageInfo
- }
- // LabelRelationship information response | LabelRelationship信息返回体
- LabelRelationshipInfoResp {
- BaseDataInfo
- // LabelRelationship information | LabelRelationship数据
- Data LabelRelationshipInfo `json:"data"`
- }
- )
- @server(
- jwt: Auth
- group: label_relationship
- middleware: Authority
- )
- service Wechat {
- // Create label relationship information | 创建LabelRelationship
- @handler createLabelRelationship
- post /label_relationship/create (LabelRelationshipInfo) returns (BaseMsgResp)
- // Update label relationship information | 更新LabelRelationship
- @handler updateLabelRelationship
- post /label_relationship/update (LabelRelationshipInfo) returns (BaseMsgResp)
- // Update label relationships information | 更新联系人所有 LabelRelationship
- @handler updateLabelRelationships
- post /label_relationship/update_contact_labels (LabelRelationshipsInfo) returns (BaseMsgResp)
- // Batch Update label relationships information | 批量更新联系人所有 LabelRelationship
- @handler batchUpdateLabelRelationships
- post /label_relationship/batch_update_contact_labels (BatchLabelRelationshipsInfo) returns (BaseMsgResp)
- // Delete label relationship information | 删除LabelRelationship信息
- @handler deleteLabelRelationship
- post /label_relationship/delete (IDsReq) returns (BaseMsgResp)
- // Get label relationship list | 获取LabelRelationship列表
- @handler getLabelRelationshipList
- post /label_relationship/list (LabelRelationshipListReq) returns (LabelRelationshipListResp)
- // Get label relationship by ID | 通过ID获取LabelRelationship
- @handler getLabelRelationshipById
- post /label_relationship (IDReq) returns (LabelRelationshipInfoResp)
- }
|