Documentation ¶
Index ¶
- type ActionList
- type ActionMenu
- type AddMomentTaskResponse
- type AddMsgTemplateResponse
- type AgentGetResponse
- type AgentListResponse
- type AppChatCreateRequest
- type AppChatCreateResponse
- type AppChatGetResponse
- type AppChatUpdateRequest
- type Article
- type Attachments
- type Attrs
- type Button
- type ButtonSelection
- type CardAction
- type CardImage
- type CheckBox
- type ConclusionsImage
- type ConclusionsLink
- type ConclusionsMiniProgram
- type ConclusionsText
- type ContactMe
- type ContactMeAddResponse
- type ContactMeGetResponse
- type ContactMeListResponse
- type CorpTag
- type CorpTagAddResponse
- type CorpTagGroup
- type CorpTagListResponse
- type Department
- type DepartmentCreateResponse
- type DepartmentGetResponse
- type DepartmentListResponse
- type DepartmentSimpleListResponse
- type EmphasisContent
- type ExternalAttachments
- type ExternalAttr
- type ExternalContact
- type ExternalContactBatchGetByUserResponse
- type ExternalContactCustomerStrategyCreateRequest
- type ExternalContactCustomerStrategyCreateResponse
- type ExternalContactCustomerStrategyEditRequest
- type ExternalContactCustomerStrategyGetRangeResponse
- type ExternalContactCustomerStrategyGetResponse
- type ExternalContactCustomerStrategyListResponse
- type ExternalContactGetFollowUserListResponse
- type ExternalContactGetResponse
- type ExternalContactList
- type ExternalContactListResponse
- type ExternalContactRemarkRequest
- type ExternalFile
- type ExternalImage
- type ExternalLink
- type ExternalMiniprogram
- type ExternalMsg
- type ExternalText
- type ExternalVideo
- type FileMessage
- type FollowUser
- type GetGroupMsgListV2Response
- type GetGroupMsgSendResultResponse
- type GetGroupMsgTaskResponse
- type GetJoinWayResponse
- type GetMomentListResponse
- type GetMomentTaskResponse
- type GetMomentTaskResultResponse
- type GroupChatAddJoinWayResponse
- type GroupChatJoinWayRequest
- type GroupChatListFilter
- type GroupChatListResponse
- type GroupChatRequest
- type GroupChatResponse
- type GroupChatTransferRequest
- type GroupChatTransferResponse
- type GroupMsgList
- type GroupMsgListFilter
- type GroupMsgSendResultFilter
- type GroupMsgTaskFilter
- type GroupOpengId2ChatIdResponse
- type H
- type HorizontalContentList
- type IWeCom
- type Image
- type ImageMessage
- type ImageTextArea
- type JumpList
- type Link
- type Location
- type MainTitle
- type MarkDownMessage
- type Media
- type MediaType
- type MediaUploadImgResponse
- type MediaUploadResponse
- type Message
- type MessageSendResponse
- type MessageUpdateTemplateCardResponse
- type MiniProgramMessage
- type MiniProgramNotice
- type MomentList
- type MomentListFilter
- type MomentTask
- type MomentTaskFilter
- type MpArticle
- type MpNews
- type MpNewsMessage
- type MultiMedia
- type News
- type NewsMessage
- type QuoteArea
- type SelectList
- type SenderList
- type Source
- type Strategy
- type StrategyRange
- type SubmitButton
- type Tag
- type TagAddOrDelUsersResponse
- type TagCreateResponse
- type TagListResponse
- type TagUserListResponse
- type TemplateCard
- type TemplateCardMessage
- type TemplateCardType
- type TemplateCardUpdateMessage
- type Text
- type TextCard
- type TextCardMessage
- type TextMessage
- type TransferCustomerRequest
- type TransferCustomerResponse
- type TransferResultRequest
- type TransferResultResponse
- type UnAssignedInfo
- type UnAssignedRequest
- type UnAssignedResponse
- type User
- type UserGetResponse
- type UserId2OpenIdResponse
- type UserInfoResponse
- type UserListResponse
- type UserSimpleListResponse
- type Video
- type VideoMessage
- type VisibleRange
- type VoiceMessage
- type WorkChatConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionList ¶
type ActionMenu ¶
type ActionMenu struct { Desc string `json:"desc"` ActionList []ActionList `json:"action_list" validate:"required,max=3,min=1"` }
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 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"` } }
type AppChatCreateRequest ¶
type AppChatCreateResponse ¶
type AppChatCreateResponse struct { internal.BizResponse ChatId string `json:"chatid"` }
type AppChatGetResponse ¶
type AppChatUpdateRequest ¶
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 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 CardAction ¶
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 ConclusionsImage ¶
type ConclusionsLink ¶
type ConclusionsMiniProgram ¶
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 CorpTagAddResponse ¶
type CorpTagAddResponse struct { internal.BizResponse TagGroup CorpTagGroup `json:"tag_group"` }
type CorpTagGroup ¶
type CorpTagListResponse ¶
type CorpTagListResponse struct { internal.BizResponse TagGroup []CorpTagGroup `json:"tag_group"` }
type Department ¶
type Department struct { Id int32 `json:"id"` Order int `json:"order,omitempty"` ParentId int32 `json:"parentid" validate:"required"` Name string `json:"name" validate:"required,min=1,max=32"` NameEn string `json:"name_en,omitempty" validate:"omitempty,min=1,max=32"` DepartmentLeader []string `json:"department_leader"` }
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 int `json:"order"` } }
type EmphasisContent ¶
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 ExternalContactCustomerStrategyCreateRequest ¶
type ExternalContactCustomerStrategyCreateRequest struct { Strategy Range []StrategyRange `json:"range" validate:"required"` }
type ExternalContactCustomerStrategyCreateResponse ¶
type ExternalContactCustomerStrategyCreateResponse struct { internal.BizResponse StrategyId int `json:"strategy_id"` }
type ExternalContactCustomerStrategyEditRequest ¶
type ExternalContactCustomerStrategyEditRequest struct { Strategy RangeAdd []StrategyRange `json:"range_add"` RangeDel []StrategyRange `json:"range_del"` }
type ExternalContactCustomerStrategyGetResponse ¶
type ExternalContactCustomerStrategyGetResponse struct { internal.BizResponse Strategy Strategy `json:"strategy"` }
type ExternalContactCustomerStrategyListResponse ¶
type ExternalContactCustomerStrategyListResponse struct { internal.BizResponse Strategy []struct { StrategyId int `json:"strategy_id"` } `json:"strategy"` 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 ExternalLink ¶
type ExternalMiniprogram ¶
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"` Sender string `json:"sender,omitempty" validate:"required_without=ExternalUserid"` 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"` }
type GetGroupMsgListV2Response ¶
type GetGroupMsgListV2Response struct { internal.BizResponse NextCursor string `json:"next_cursor"` GroupMsgList []GroupMsgList `json:"group_msg_list"` }
type GetGroupMsgTaskResponse ¶
type GetJoinWayResponse ¶
type GetJoinWayResponse struct { internal.BizResponse JoinWay struct { ConfigID string `json:"config_id"` Type int `json:"type"` Scene int `json:"scene"` Remark string `json:"remark"` AutoCreateRoom int `json:"auto_create_room"` RoomBaseName string `json:"room_base_name"` RoomBaseID int `json:"room_base_id"` ChatIDList []string `json:"chat_id_list"` QrCode string `json:"qr_code"` State string `json:"state"` } `json:"join_way"` }
type GetMomentListResponse ¶
type GetMomentListResponse struct { internal.BizResponse NextCursor string `json:"next_cursor"` MomentList []MomentList `json:"moment_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 GroupChatAddJoinWayResponse ¶
type GroupChatAddJoinWayResponse struct { internal.BizResponse ConfigId string `json:"config_id"` }
type GroupChatJoinWayRequest ¶
type GroupChatJoinWayRequest struct { ConfigId string `json:"config_id,omitempty"` Scene int `json:"scene" validate:"required"` Remark string `json:"remark"` AutoCreateRoom int `json:"auto_create_room"` RoomBaseName string `json:"room_base_name"` RoomBaseID int `json:"room_base_id"` ChatIDList []string `json:"chat_id_list" validate:"required,max=5"` State string `json:"state"` }
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 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"` State string `json:"state,omitempty"` 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"` } `json:"group_chat"` }
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 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 GroupMsgTaskFilter ¶
type GroupOpengId2ChatIdResponse ¶
type GroupOpengId2ChatIdResponse struct { internal.BizResponse ChatId string `json:"chat_id"` }
type HorizontalContentList ¶
type IWeCom ¶
type IWeCom interface { GetCorpId() string UserCreate(User) internal.BizResponse UserGet(string) UserGetResponse UserUpdate(User) internal.BizResponse UserDelete(string) internal.BizResponse UserBatchDelete([]string) internal.BizResponse UserSimpleList(int32, int) UserSimpleListResponse UserList(int32, int) UserListResponse UserId2OpenId(string) UserId2OpenIdResponse GetUserInfo(code string) (resp UserInfoResponse) DepartmentCreate(Department) DepartmentCreateResponse DepartmentUpdate(Department) internal.BizResponse DepartmentDelete(int32) internal.BizResponse DepartmentList(int32) DepartmentListResponse DepartmentSimpleList(id int32) (resp DepartmentSimpleListResponse) DepartmentGet(id int32) (resp DepartmentGetResponse) TagCreate(Tag) TagCreateResponse TagUpdate(Tag) internal.BizResponse TagDelete(int) internal.BizResponse TagList() TagListResponse TagUserList(int) TagUserListResponse TagAddUsers(int, []string, []int32) TagAddOrDelUsersResponse TagDelUsers(int, []string, []int32) TagAddOrDelUsersResponse ExternalAddContactWay(ContactMe) ContactMeAddResponse ExternalUpdateContactWay(ContactMe) internal.BizResponse ExternalGetContactWay(string) ContactMeGetResponse ExternalListContactWay(int64, int64, string, int) ContactMeListResponse ExternalDeleteContactWay(string) internal.BizResponse ExternalCloseTempChat(string, string) internal.BizResponse ExternalContactGetFollowUserList() ExternalContactGetFollowUserListResponse ExternalContactCustomerStrategyList(string, int) ExternalContactCustomerStrategyListResponse ExternalContactCustomerStrategyGet(int) ExternalContactCustomerStrategyGetResponse ExternalContactCustomerStrategyGetRange(int, string, int) ExternalContactCustomerStrategyGetRangeResponse ExternalContactCustomerStrategyCreate(ExternalContactCustomerStrategyCreateRequest) ExternalContactCustomerStrategyCreateResponse ExternalContactCustomerStrategyEdit(ExternalContactCustomerStrategyEditRequest) internal.BizResponse ExternalContactCustomerStrategyDelete(int) internal.BizResponse AgentGet() AgentGetResponse AgentList() (resp AgentListResponse) CorpTagList([]string, []string) CorpTagListResponse CorpTagAdd(CorpTagGroup) CorpTagAddResponse CorpTagUpdate(CorpTag) internal.BizResponse CorpTagDelete([]string, []string) internal.BizResponse TransferCustomer(TransferCustomerRequest) TransferCustomerResponse TransferResult(TransferResultRequest) TransferResultResponse GetUnassignedList(request UnAssignedRequest) (resp UnAssignedResponse) TransferCustomerResigned(request TransferCustomerRequest) (resp TransferCustomerResponse) TransferResultResigned(request TransferResultRequest) (resp TransferResultResponse) TransferGroupChat(request GroupChatTransferRequest) (resp GroupChatTransferResponse) GroupChatList(GroupChatListFilter) GroupChatListResponse GroupChat(GroupChatRequest) GroupChatResponse GroupOpengId2ChatId(string) GroupOpengId2ChatIdResponse GroupChatAddJoinWay(request GroupChatJoinWayRequest) (resp GroupChatAddJoinWayResponse) GroupChatGetJoinWay(configId string) (resp GetJoinWayResponse) GroupChatUpdateJoinWay(request GroupChatJoinWayRequest) (resp internal.BizResponse) GroupChatDeleteJoinWay(configId string) (resp internal.BizResponse) AddMomentTask(task MomentTask) (resp AddMomentTaskResponse) GetMomentTaskResult(jobId string) (resp GetMomentTaskResultResponse) GetMomentList(filter MomentListFilter) (resp GetMomentListResponse) GetMomentTask(filter MomentTaskFilter) (resp GetMomentTaskResponse) MediaUploadAttachment(Media) MediaUploadResponse MediaUpload(fileType MediaType, filePath string, fileName string) (resp MediaUploadResponse) MediaUploadImg(filePath string, fileName string) (resp MediaUploadImgResponse) AddMsgTemplate(msg ExternalMsg) (resp AddMsgTemplateResponse) GetGroupMsgListV2(filter GroupMsgListFilter) (resp GetGroupMsgListV2Response) GetGroupMsgTask(filter GroupMsgTaskFilter) (resp GetGroupMsgTaskResponse) GetGroupMsgSendResult(filter GroupMsgSendResultFilter) (resp GetGroupMsgSendResultResponse) MessageSend(msg interface{}) (resp MessageSendResponse) MessageReCall(msgId string) (resp internal.BizResponse) MessageUpdateTemplateCard(msg TemplateCardUpdateMessage) (resp MessageUpdateTemplateCardResponse) AppChatCreate(request AppChatCreateRequest) (resp AppChatCreateResponse) AppChatUpdate(request AppChatUpdateRequest) (resp internal.BizResponse) AppChatGet(chatId string) (resp AppChatGetResponse) AppChatSend(msg interface{}, chatId string) (resp internal.BizResponse) // contains filtered or unexported methods }
func NewWeComApp ¶
func NewWeComApp(c WorkChatConfig) IWeCom
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 MarkDownMessage ¶
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 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 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 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 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 MpNewsMessage ¶
type MultiMedia ¶
type MultiMedia struct {
MediaId string `json:"media_id" validate:"required"`
}
type NewsMessage ¶
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 SenderList ¶
type Strategy ¶
type Strategy struct { StrategyID int `json:"strategy_id,omitempty"` ParentID int `json:"parent_id"` StrategyName string `json:"strategy_name" validate:"required"` CreateTime int `json:"create_time,omitempty"` AdminList []string `json:"admin_list" validate:"required,max=20"` Privilege struct { ViewCustomerList bool `json:"view_customer_list"` ViewCustomerData bool `json:"view_customer_data"` ViewRoomList bool `json:"view_room_list"` ContactMe bool `json:"contact_me"` JoinRoom bool `json:"join_room"` ShareCustomer bool `json:"share_customer"` OperResignCustomer bool `json:"oper_resign_customer"` OperResignGroup bool `json:"oper_resign_group"` SendCustomerMsg bool `json:"send_customer_msg"` EditWelcomeMsg bool `json:"edit_welcome_msg"` ViewBehaviorData bool `json:"view_behavior_data"` ViewRoomData bool `json:"view_room_data"` SendGroupMsg bool `json:"send_group_msg"` RoomDeduplication bool `json:"room_deduplication"` RapidReply bool `json:"rapid_reply"` OnjobCustomerTransfer bool `json:"onjob_customer_transfer"` EditAntiSpamRule bool `json:"edit_anti_spam_rule"` ExportCustomerList bool `json:"export_customer_list"` ExportCustomerData bool `json:"export_customer_data"` ExportCustomerGroupList bool `json:"export_customer_group_list"` ManageCustomerTag bool `json:"manage_customer_tag"` } `json:"privilege"` }
type StrategyRange ¶
type SubmitButton ¶
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 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 TextCardMessage ¶
type TextMessage ¶
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 TransferResultResponse ¶
type UnAssignedInfo ¶
type UnAssignedRequest ¶
type UnAssignedResponse ¶
type UnAssignedResponse struct { internal.BizResponse Info []UnAssignedInfo `json:"info"` IsLast bool `json:"is_last"` NextCursor string `json:"next_cursor"` }
type User ¶
type User struct { OpenUserId string `json:"open_userid,omitempty"` // 仅在查询时返回 Userid string `json:"userid" validate:"required"` Name string `json:"name" validate:"required"` Alias string `json:"alias,omitempty"` Mobile string `json:"mobile" validate:"required_without=Email,omitempty"` Department []int32 `json:"department" 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" validate:"required_without=Mobile,omitempty,email"` BizEmail string `json:"biz_email"` IsLeaderInDept []int `json:"is_leader_in_dept,omitempty"` DirectLeader []string `json:"direct_leader"` Enable int `json:"enable"` AvatarMediaid string `json:"avatar_mediaid,omitempty"` Telephone string `json:"telephone,omitempty"` Address string `json:"address,omitempty"` MainDepartment int32 `json:"main_department,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"` }
User 成员定义 可以参考连接:https://open.work.weixin.qq.com/api/doc/90000/90135/90195
type UserGetResponse ¶
type UserGetResponse struct { internal.BizResponse User }
type UserId2OpenIdResponse ¶
type UserId2OpenIdResponse struct { internal.BizResponse OpenId string `json:"openid"` }
type UserInfoResponse ¶
type UserListResponse ¶
type UserListResponse struct { internal.BizResponse UserList []User `json:"userlist"` }
type UserSimpleListResponse ¶
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 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"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.