Documentation
¶
Index ¶
- Constants
- type AddContactWay
- type AddCustomerServiceAccountReq
- type AddCustomerServiceAccountRsp
- type AddCustomerServiceServicerItem
- type AddCustomerServiceServicerReq
- type AddCustomerServiceServicerRsp
- type AddMsgTemplateReq
- type AddTagUsersReq
- type AgentInfo
- type AgentInfoReq
- type AgentInfoRsp
- type App
- func (c *App) AddContactWay(req AddContactWay) (configID, qrCode string, err error)
- func (c *App) AddCustomerServiceAccount(ctx context.Context, req AddCustomerServiceAccountReq) (rsp AddCustomerServiceAccountRsp, err error)
- func (c *App) AddCustomerServiceServicer(ctx context.Context, req AddCustomerServiceServicerReq) (rsp AddCustomerServiceServicerRsp, err error)
- func (c *App) AddExternalContactCorpTag(req ExternalContactCorpTagGroup) (ExternalContactCorpTagGroup, error)
- func (c *App) AddMsgTemplate(req AddMsgTemplateReq) (msgID string, failedList []string, err error)
- func (c *App) AddTagUsers(req AddTagUsersReq) (ok bool, err error)
- func (c *App) ApplyOAEvent(applyInfo OAApplyEvent) (string, error)
- func (c *App) BatchListExternalContact(userIDs []string, cursor string, limit int) (*BatchListExternalContactsResp, error)
- func (c *App) CheckMsgAuditRoomAgree(roomId string) ([]CheckMsgAuditRoomAgreeInfo, error)
- func (c *App) CheckMsgAuditSingleAgree(infos []CheckMsgAuditSingleAgreeUserInfo) ([]CheckMsgAuditSingleAgreeInfo, error)
- func (c *App) CloseTempChat(externalUserid string, userid string) (ok bool, err error)
- func (c *App) ContactSearch(ctx context.Context, req SearchContactReq) (SearchContactResp, error)
- func (c *App) CreateAppChat(chatInfo *ChatInfo) (chatid string, err error)
- func (c *App) CreateTag(req Tag) (tagID int, err error)
- func (c *App) DelContactWay(configID string) (ok bool, err error)
- func (c *App) DelCustomerAcquisition(req *DelCustomerAcquisitionReq) (err error)
- func (c *App) DelCustomerServiceAccount(ctx context.Context, req DelCustomerServiceAccountReq) (err error)
- func (c *App) DelCustomerServiceServicer(ctx context.Context, req DelCustomerServiceServicerReq) (rsp DelCustomerServiceServicerRsp, err error)
- func (c *App) DelExternalContactCorpTag(tagID, groupID []string) error
- func (c *App) DelTagUsers(req DelTagUsersReq) (ok bool, err error)
- func (c *App) DeleteTag(tagID int) (ok bool, err error)
- func (c *App) DownloadMedia(mediaId string) (*http.Response, error)
- func (c *App) EditExternalContactCorpTag(id, name string, order uint32) error
- func (c *App) FetchAllCustomerServiceAccounts(ctx context.Context) (data []CustomerServiceAccountItem, err error)
- func (c *App) FetchCustomerServiceAccountContactWay(ctx context.Context, req FetchCustomerServiceAccountContactWayReq) (rsp FetchCustomerServiceAccountContactWayRsp, err error)
- func (c *App) FetchCustomerServiceAccounts(ctx context.Context, req FetchCustomerServiceAccountsReq) (rsp FetchCustomerServiceAccountRsp, err error)
- func (c *App) FetchCustomerServiceCustomers(ctx context.Context, req FetchCustomerServiceCustomersReq) (rsp FetchCustomerServiceCustomersRsp, err error)
- func (c *App) FetchCustomerServiceServicers(ctx context.Context, req FetchCustomerServiceServicersReq) (rsp FetchCustomerServiceServicersRsp, err error)
- func (c *App) FetchCustomerServiceState(ctx context.Context, req FetchCustomerServiceStateReq) (rsp FetchCustomerServiceStateRsp, err error)
- func (c *App) FetchMediaInfo(ctx context.Context, mediaId string) (mediaInfo MediaInfoRsp, err error)
- func (c *App) GetAgentInfo(agentId int64) (info AgentInfo, err error)
- func (c *App) GetAgentPermission() (permission GetAgentPermission, err error)
- func (c *App) GetAppChat(chatID string) (*ChatInfo, error)
- func (c *App) GetAppLicenseInfo(ctx context.Context, corpId, suiteId string) (GetAppLicenseInfoResp, error)
- func (c *App) GetAppQrcode(ctx context.Context, req GetAppQrcodeReq) (GetAppQrcodeResp, error)
- func (c *App) GetAuthInfo(ctx context.Context, corpId, permanentCode string) (GetAuthInfoResp, error)
- func (c *App) GetContactWay(configID string) (contactWay ContactWay, err error)
- func (c *App) GetCorpToken(ctx context.Context, corpId, permanentCode string) (GetCorpTokenResp, error)
- func (c *App) GetCustomerAcquisitionDetail(ctx context.Context, req *ReqGetCustomerAcquisitionDetail) (data RspGetCustomerAcquisitionDetail, err error)
- func (c *App) GetCustomerAcquisitionList(ctx context.Context, req *ReqGetCustomerAcquisitionList) (data RspGetCustomerAcquisitionList, err error)
- func (c *App) GetCustomerServiceCorpStatistic(ctx context.Context, req GetCustomerServiceCorpStatisticReq) (rsp GetCustomerServiceCorpStatisticRsp, err error)
- func (c *App) GetCustomerServiceServicerStatistic(ctx context.Context, req GetCustomerServiceServicerStatisticReq) (rsp GetCustomerServiceServicerStatisticRsp, err error)
- func (c *App) GetCustomizedAuthUrl(ctx context.Context, state string, templateIds []string) (GetCustomizedAuthUrlResp, error)
- func (c *App) GetDepartment(id int64) (*DeptInfo, error)
- func (c *App) GetExternalContact(externalUserid string) (*ExternalContactInfo, error)
- func (c *App) GetGroupChat(req GetGroupChatReq) (GetGroupChatResp, error)
- func (c *App) GetGroupMsgSendResultExternalContact(req GetGroupMsgSendResultExternalContactReq) (res GetGroupMsgSendResultExternalContactResp, err error)
- func (c *App) GetGroupMsgTaskExternalContact(req ReqGetGroupmsgTaskExternalcontact) (resp GetGroupMsgTaskExternalContactResp, err error)
- func (c *App) GetGroupmsgListV2Externalcontact(req getGroupMsgListV2ExternalContactReq) (ok bool, err error)
- func (c *App) GetJSAPIAgentTicket() (string, error)
- func (c *App) GetJSAPITicket() (string, error)
- func (c *App) GetJSAPITicketAgentConfig() (string, error)
- func (c *App) GetMsgAuditGroupChat(roomID string) (*MsgAuditGroupChat, error)
- func (c *App) GetOAApprovalDetail(spNo string) (*OAApprovalDetail, error)
- func (c *App) GetOAApprovalInfo(req GetOAApprovalInfoReq) ([]string, error)
- func (c *App) GetOATemplateDetail(templateID string) (*OATemplateDetail, error)
- func (c *App) GetPermanentCode(ctx context.Context, authCode string) (GetPermanentCodeResp, error)
- func (c *App) GetTagDetail(tagID int) (tagDetail TagDetail, err error)
- func (c *App) GetToken() (token string, err error)
- func (c *App) GetTransferExternalContactResult(externalUserID, handoverUserID, takeoverUserID string) (*ExternalContactTransferResult, error)
- func (c *App) GetUser(userid string) (*UserInfo, error)
- func (c *App) GetUserBehaviorDataExternalContact(userIds []string, partyIds []int, startTime, endTime int64) ([]ExternalContactGetUserBehaviorData, error)
- func (c *App) GetUserIDByMobile(mobile string) (string, error)
- func (c *App) GetUserInfoByCode(code string) (*UserIdentityInfo, error)
- func (c *App) GetUserInfoThird(ctx context.Context, req GetUserInfoThirdReq) (GetUserInfoThirdResp, error)
- func (c *App) GroupChatAddJoinWay(req GroupChatAddJoinWayReq) (string, error)
- func (c *App) GroupChatDelJoinWay(req GroupChatDelJoinWayReq) error
- func (c *App) GroupChatGetJoinWay(req GroupChatGetJoinWayReq) (GroupChatGetJoinWay, error)
- func (c *App) GroupChatUpdateJoinWay(req GroupChatUpdateJoinWayReq) error
- func (c *App) JSCode2Session(jscode string) (*JSCodeSession, error)
- func (c *App) ListAllDepartments() ([]*DeptInfo, error)
- func (c *App) ListContactWay(req ListContactWayReq) (configIDs []string, nextCursor string, err error)
- func (c *App) ListDepartments(id int64) ([]*DeptInfo, error)
- func (c *App) ListExternalContact(userID string) ([]string, error)
- func (c *App) ListExternalContactCorpTags(tagIDs ...string) ([]ExternalContactCorpTagGroup, error)
- func (c *App) ListExternalContactCorpTagsByGroupIDs(groupIDs ...string) ([]ExternalContactCorpTagGroup, error)
- func (c *App) ListGroupChat(req ListGroupChatReq) (ListGroupChatResp, error)
- func (c *App) ListMsgAuditPermitUser(msgAuditEdition MsgAuditEdition) ([]string, error)
- func (c *App) ListTag() (tags []Tag, err error)
- func (c *App) ListUnassignedExternalContact(pageID, pageSize uint32, cursor string) (*ExternalContactUnassignedList, error)
- func (c *App) ListUsersByDeptID(deptID int64, fetchChild bool) ([]*UserInfo, error)
- func (c *App) MarkExternalContactTag(userID, externalUserID string, addTag, removeTag []string) error
- func (c *App) RangeDownloadMedia(ctx context.Context, mediaId string, writer io.Writer) error
- func (c *App) RemarkExternalContact(req *ExternalContactRemark) error
- func (c *App) SaveCustomerAcquisition(req *SaveCustomerAcquisitionReq) (link SaveCustomerAcquisitionResp, err error)
- func (c *App) SendCustomerServiceMsg(ctx context.Context, req SendCustomerServiceMsgReq) (rsp SendCustomerServiceMsgRsp, err error)
- func (c *App) SendCustomerServiceMsgOnEvent(ctx context.Context, req SendMsgOnCustomerServiceEventReq) (rsp SendMsgOnCustomerServiceEventRsp, err error)
- func (c *App) SendFileMessage(recipient *Recipient, mediaID string, isSafe bool) error
- func (c *App) SendImageMessage(recipient *Recipient, mediaID string, isSafe bool) error
- func (c *App) SendMPNewsMessage(recipient *Recipient, title string, thumbMediaID string, author string, ...) error
- func (c *App) SendMarkdownMessage(recipient *Recipient, content string, isSafe bool) error
- func (c *App) SendNewsMessage(recipient *Recipient, title string, description string, url string, ...) error
- func (c *App) SendTaskCardMessage(recipient *Recipient, title string, description string, url string, ...) error
- func (c *App) SendTextCardMessage(recipient *Recipient, title string, description string, url string, ...) error
- func (c *App) SendTextMessage(recipient *Recipient, content string, isSafe bool) error
- func (c *App) SendVideoMessage(recipient *Recipient, mediaID string, description string, title string, ...) error
- func (c *App) SendVoiceMessage(recipient *Recipient, mediaID string, isSafe bool) error
- func (c *App) SendWelcomeMsg(req SendWelcomeMsgReq) (ok bool, err error)
- func (c *App) SpawnAccessTokenRefresher()
- func (c *App) SpawnAccessTokenRefresherWithContext(ctx context.Context)
- func (c *App) SpawnJSAPITicketAgentConfigRefresher()
- func (c *App) SpawnJSAPITicketAgentConfigRefresherWithContext(ctx context.Context)
- func (c *App) SpawnJSAPITicketRefresher()
- func (c *App) SpawnJSAPITicketRefresherWithContext(ctx context.Context)
- func (c *App) StopSendMsgExternalContact(MsgID string) (err error)
- func (c *App) SyncCustomerServiceMsg(ctx context.Context, req SyncCustomerServiceMsgReq) (rsp SyncCustomerServiceMsgRsp, err error)
- func (c *App) TransCustomerServiceState(ctx context.Context, req TransCustomerServiceStateReq) (rsp TransCustomerServiceStateRsp, err error)
- func (c *App) TransferExternalContact(externalUserID, handoverUserID, takeoverUserID, transferSuccessMsg string) error
- func (c *App) TransferGroupChatExternalContact(chatIDList []string, newOwner string) ([]ExternalContactGroupChatTransferFailed, error)
- func (c *App) UpdateContactWay(req UpdateContactWay) (ok bool, err error)
- func (c *App) UpdateCustomerServiceAccount(ctx context.Context, req UpdateCustomerServiceAccountReq) (err error)
- func (c *App) UpdateTag(req Tag) (ok bool, err error)
- func (c *App) UpdateUser(req UpdateUserReq) (ok bool, err error)
- func (c *App) UploadPermanentImageMedia(media *Media) (url string, err error)
- func (c *App) UploadTempFileMedia(media *Media) (*MediaUploadResult, error)
- func (c *App) UploadTempImageMedia(media *Media) (*MediaUploadResult, error)
- func (c *App) UploadTempVideoMedia(media *Media) (*MediaUploadResult, error)
- func (c *App) UploadTempVoiceMedia(media *Media) (*MediaUploadResult, error)
- type AppOption
- type AppQrcodeResultType
- type AppQrcodeStyle
- type AppType
- type Attachments
- type Attrs
- type AuthCorpInfo
- type AuthInfoAgent
- type AuthInfoAgentPrivilege
- type AuthInfoAgentSharedFrom
- type AuthUserInfo
- type BatchListExternalContactsResp
- type CALink
- type CARange
- type CallBackHandler
- type ChangeType
- type ChatInfo
- type CheckMsgAuditRoomAgreeInfo
- type CheckMsgAuditSingleAgreeInfo
- type CheckMsgAuditSingleAgreeUserInfo
- type ClientError
- type CommonResp
- type Conclusions
- type ConclusionsReq
- type ContactWay
- type ContactWayScene
- type ContactWayType
- type CorpAuthInfo
- type CtorOption
- type CustomerAcquisitionRange
- type CustomerServiceAccountItem
- type CustomerServiceCorpStatisticItem
- type CustomerServiceServicerStatisticItem
- type DealerCorpInfo
- type DelCustomerAcquisitionReq
- type DelCustomerServiceAccountReq
- type DelCustomerServiceServicerItem
- type DelCustomerServiceServicerReq
- type DelCustomerServiceServicerRsp
- type DelTagUsersReq
- type DeptInfo
- type EventAddExternalContact
- type EventAddHalfExternalContact
- type EventChangeExternalChat
- type EventCreateParty
- type EventCreateTag
- type EventCreateUser
- type EventCustomerServiceExtras
- type EventDelExternalContact
- type EventDelFollowUser
- type EventDeleteParty
- type EventDeleteTag
- type EventDeleteUser
- type EventEditExternalContact
- type EventShuffleTag
- type EventSysApprovalChange
- type EventTransferFail
- type EventType
- type EventTypeKfAccountAuthChangeExtras
- type EventUpdateParty
- type EventUpdateTag
- type EventUpdateUser
- type Extattr
- type ExternalAttr
- type ExternalAttrMiniprogram
- type ExternalAttrText
- type ExternalAttrWeb
- type ExternalContact
- type ExternalContactBatchInfo
- type ExternalContactCorpTag
- type ExternalContactCorpTagGroup
- type ExternalContactGetUserBehaviorData
- type ExternalContactGetUserBehaviorDataRsp
- type ExternalContactGroupChatTransferFailed
- type ExternalContactInfo
- type ExternalContactMarkTag
- type ExternalContactRemark
- type ExternalContactTransferResult
- type ExternalContactTransferStatus
- type ExternalContactUnassigned
- type ExternalContactUnassignedList
- type ExternalProfile
- type ExternalUserType
- type FetchCustomerServiceAccountContactWayReq
- type FetchCustomerServiceAccountContactWayRsp
- type FetchCustomerServiceAccountRsp
- type FetchCustomerServiceAccountsReq
- type FetchCustomerServiceCustomersItem
- type FetchCustomerServiceCustomersReq
- type FetchCustomerServiceCustomersRsp
- type FetchCustomerServiceServicersItem
- type FetchCustomerServiceServicersReq
- type FetchCustomerServiceServicersRsp
- type FetchCustomerServiceStateReq
- type FetchCustomerServiceStateRsp
- type FetchMediaReq
- type File
- type FollowInfo
- type FollowUser
- type FollowUserAddWay
- type FollowUserInfo
- type FollowUserTag
- type FollowUserTagType
- type GetAgentPermission
- type GetAppLicenseInfoReq
- type GetAppLicenseInfoResp
- type GetAppQrCodeReq
- type GetAppQrCodeResp
- type GetAppQrcodeReq
- type GetAppQrcodeResp
- type GetAuthInfoReq
- type GetAuthInfoResp
- type GetCorpTokenReq
- type GetCorpTokenResp
- type GetCustomerServiceCorpStatisticReq
- type GetCustomerServiceCorpStatisticRsp
- type GetCustomerServiceServicerStatisticReq
- type GetCustomerServiceServicerStatisticRsp
- type GetCustomizedAuthUrlReq
- type GetCustomizedAuthUrlResp
- type GetDeptInfoReq
- type GetGroupChatReq
- type GetGroupChatResp
- type GetGroupMsgSendResultExternalContactReq
- type GetGroupMsgSendResultExternalContactResp
- type GetGroupMsgTaskExternalContactResp
- type GetOAApprovalInfoReq
- type GetPermanentCodeReq
- type GetPermanentCodeResp
- type GetSuiteTicket
- type GetUserInfoThirdReq
- type GetUserInfoThirdResp
- type GroupChat
- type GroupChatAddJoinWayReq
- type GroupChatAddJoinWayResp
- type GroupChatDelJoinWayReq
- type GroupChatGetJoinWay
- type GroupChatGetJoinWayReq
- type GroupChatGetJoinWayResp
- type GroupChatJoinWayAutoCreate
- type GroupChatJoinWayScene
- type GroupChatUpdateJoinWayReq
- type HTTPHandler
- type Image
- type ImageMessageExtras
- type JSCodeSession
- type Link
- type LinkMessageExtras
- type ListContactWayReq
- type ListGroupChatReq
- type ListGroupChatResp
- type LocationMessageExtras
- type LowLevelEnvelopeHandler
- type Media
- type MediaInfoRsp
- type MediaUploadResult
- type MediaUploader
- type MessageReq
- type MessageType
- type MiniProgram
- type MsgAuditAgreeStatus
- type MsgAuditEdition
- type MsgAuditGroupChat
- type MsgAuditGroupChatMember
- type OAApplyEvent
- type OAApprovalDetail
- type OAApprovalDetailApplicant
- type OAApprovalDetailComment
- type OAApprovalDetailCommentUserInfo
- type OAApprovalDetailNotifier
- type OAApprovalDetailSpRecord
- type OAApprovalDetailSpRecordDetail
- type OAApprovalDetailSpRecordDetailApprover
- type OAApprovalInfo
- type OAApprovalInfoApplicant
- type OAApprovalInfoComment
- type OAApprovalInfoCommentUserInfo
- type OAApprovalInfoFilter
- type OAApprovalInfoFilterKey
- type OAApprovalInfoNotifier
- type OAApprovalInfoSpRecord
- type OAApprovalInfoSpRecordDetail
- type OAApprovalInfoSpRecordDetailApprover
- type OAApprover
- type OAContent
- type OAContentDate
- type OAContentDateRange
- type OAContentDepartment
- type OAContentFile
- type OAContentFormula
- type OAContentLocation
- type OAContentMember
- type OAContentRelatedApproval
- type OAContentSelector
- type OAContentSelectorOption
- type OAContentTableList
- type OAContentVacation
- type OAContentVacationAttendance
- type OAContentVacationAttendanceDateRange
- type OAContentValue
- type OAContents
- type OAControl
- type OASummaryList
- type OATemplateControl
- type OATemplateControlConfig
- type OATemplateControlConfigAttendance
- type OATemplateControlConfigAttendanceDateRange
- type OATemplateControlConfigContact
- type OATemplateControlConfigDate
- type OATemplateControlConfigSelector
- type OATemplateControlConfigSelectorOption
- type OATemplateControlConfigTable
- type OATemplateControlConfigVacation
- type OATemplateControlConfigVacationItem
- type OATemplateControlProperty
- type OATemplateControls
- type OATemplateDetail
- type OAText
- type Recipient
- type RegisterCodeInfo
- type ReqGetCustomerAcquisitionDetail
- type ReqGetCustomerAcquisitionList
- type ReqGetGroupmsgTaskExternalcontact
- type RspGetCustomerAcquisitionDetail
- type RspGetCustomerAcquisitionList
- type RxMessage
- func (m *RxMessage) EventAddExternalContact() (EventAddExternalContact, bool)
- func (m *RxMessage) EventAddHalfExternalContact() (EventAddHalfExternalContact, bool)
- func (m *RxMessage) EventChangeExternalChat() (EventChangeExternalChat, bool)
- func (m *RxMessage) EventCrateParty() (EventCreateParty, bool)
- func (m *RxMessage) EventCreateTag() (EventCreateTag, bool)
- func (m *RxMessage) EventCreateUser() (EventCreateUser, bool)
- func (m *RxMessage) EventCustomerService() (EventCustomerServiceExtras, bool)
- func (m *RxMessage) EventDelExternalContact() (EventDelExternalContact, bool)
- func (m *RxMessage) EventDelFollowUser() (EventDelFollowUser, bool)
- func (m *RxMessage) EventDeleteParty() (EventDeleteParty, bool)
- func (m *RxMessage) EventDeleteTag() (EventDeleteTag, bool)
- func (m *RxMessage) EventDeleteUser() (EventDeleteUser, bool)
- func (m *RxMessage) EventEditExternalContact() (EventEditExternalContact, bool)
- func (m *RxMessage) EventSysApprovalChange() (EventSysApprovalChange, bool)
- func (m *RxMessage) EventTransferFail() (EventTransferFail, bool)
- func (m *RxMessage) EventUpdateParty() (EventUpdateParty, bool)
- func (m *RxMessage) EventUpdateTag() (EventUpdateTag, bool)
- func (m *RxMessage) EventUpdateUser() (EventUpdateUser, bool)
- func (m *RxMessage) Image() (ImageMessageExtras, bool)
- func (m *RxMessage) Link() (LinkMessageExtras, bool)
- func (m *RxMessage) Location() (LocationMessageExtras, bool)
- func (m *RxMessage) String() string
- func (m *RxMessage) Text() (TextMessageExtras, bool)
- func (m *RxMessage) Unmarshal(data interface{}) (err error)
- func (m *RxMessage) Video() (VideoMessageExtras, bool)
- func (m *RxMessage) Voice() (VoiceMessageExtras, bool)
- type RxMessageHandler
- type SaveCustomerAcquisitionReq
- type SaveCustomerAcquisitionResp
- type SearchContactQueryResult
- type SearchContactQueryResultUser
- type SearchContactReq
- type SearchContactResp
- type SendCustomerServiceMsgReq
- type SendCustomerServiceMsgRsp
- type SendMsgOnCustomerServiceEventReq
- type SendMsgOnCustomerServiceEventRsp
- type SendWelcomeMsgReq
- type StopSendMsgExternalContactReq
- type SuiteInfoType
- type SyncCustomerServiceMsgItem
- type SyncCustomerServiceMsgReq
- type SyncCustomerServiceMsgRsp
- type Tag
- type TagDetail
- type TagUser
- type TaskCardBtn
- type Text
- type TextMessageExtras
- type Texts
- type TrailInfo
- type TransCustomerServiceStateReq
- type TransCustomerServiceStateRsp
- type UpdateContactWay
- type UpdateCustomerServiceAccountReq
- type UpdateUserReq
- type UserDeptInfo
- type UserGender
- type UserIdentityInfo
- type UserInfo
- type UserStatus
- type Video
- type VideoMessageExtras
- type VoiceMessageExtras
- type Web
- type WorkWX
Constants ¶
const ( // MsgAuditAgreeStatusAgree 同意 MsgAuditAgreeStatusAgree = "Agree" // MsgAuditAgreeStatusDisagree 不同意 MsgAuditAgreeStatusDisagree = "Disagree" // MsgAuditAgreeStatusDefaultAgree 默认同意 MsgAuditAgreeStatusDefaultAgree = "Default_Agree" )
const ( AttachmentImage = "image" AttachmentLink = "link" AttachmentMiniProgram = "miniprogram" AttachmentVideo = "video" AttachmentFile = "file" )
const ChangeTypeMsgAuditApproved = "msg_audit_approved"
ChangeTypeMsgAuditApproved 添加外部联系人同意进行聊天内容存档时,回调该事件。
const DefaultQYAPIHost = "https://qyapi.weixin.qq.com"
DefaultQYAPIHost 默认企业微信 API Host
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddContactWay ¶
type AddContactWay struct { // ChatExpiresIn 临时会话有效期,以秒为单位。该参数仅在is_temp为true时有效,默认为添加好友后24小时 ChatExpiresIn int `json:"chat_expires_in,omitempty"` // Conclusions 结束语,会话结束时自动发送给客户,可参考“<a href="#15645/结束语定义">结束语定义</a>”,仅在is_temp为true时有效 Conclusions ConclusionsReq `json:"conclusions,omitempty"` // ExpiresIn 临时会话二维码有效期,以秒为单位。该参数仅在is_temp为true时有效,默认7天 ExpiresIn int `json:"expires_in,omitempty"` // IsTemp 是否临时会话模式,true表示使用临时会话模式,默认为false IsTemp bool `json:"is_temp,omitempty"` // Party 使用该联系方式的部门id列表,只在type为2时有效 Party []int `json:"party,omitempty"` // Remark 联系方式的备注信息,用于助记,不超过30个字符 Remark string `json:"remark,omitempty"` // Scene 场景,1-在小程序中联系,2-通过二维码联系,必填 Scene ContactWayScene `json:"scene"` // SkipVerify 外部客户添加时是否无需验证,默认为true SkipVerify bool `json:"skip_verify"` // State 企业自定义的state参数,用于区分不同的添加渠道,在调用“获取外部联系人详情”时会返回该参数值,不超过30个字符 State string `json:"state,omitempty"` // Style 在小程序中联系时使用的控件样式,详见附表 Style int `json:"style,omitempty"` // Type 联系方式类型,1-单人, 2-多人,必填 Type ContactWayType `json:"type"` // Unionid 可进行临时会话的客户unionid,该参数仅在is_temp为true时有效,如不指定则不进行限制 Unionid string `json:"unionid,omitempty"` // User 使用该联系方式的用户userID列表,在type为1时为必填,且只能有一个 User []string `json:"user,omitempty"` }
AddContactWay 配置客户联系「联系我」方式 文档:https://work.weixin.qq.com/api/doc/90000/90135/92572#配置客户联系「联系我」方式
type AddCustomerServiceAccountRsp ¶
type AddCustomerServiceAccountRsp struct {
OpenKfid string `json:"open_kfid"` // 新创建的客服账号ID
}
type AddCustomerServiceServicerItem ¶
type AddCustomerServiceServicerItem struct { Userid string `json:"userid,omitempty"` // 接待人员的userid,当userid为空时,表示返回的是部门 DepartmentId int `json:"department_id"` // 接待人员部门的id CommonResp }
type AddCustomerServiceServicerRsp ¶
type AddCustomerServiceServicerRsp struct {
ResultList []AddCustomerServiceServicerItem `json:"result_list"`
}
type AddMsgTemplateReq ¶
type AddMsgTemplateReq struct { ChatType string `json:"chat_type"` ExternalUserid []string `json:"external_userid"` Sender string `json:"sender"` Text Text `json:"text"` Attachments []Attachments `json:"attachments,omitempty"` }
AddMsgTemplateReq 创建企业群发 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/92135#创建企业群发
type AddTagUsersReq ¶
type AddTagUsersReq struct { // PartyList 企业部门ID列表,注意:userlist、partylist不能同时为空,单次请求个数不超过100 PartyList []int `json:"partylist,omitempty"` // TagID 标签ID,必填 TagID int `json:"tagid"` // UserList 企业成员ID列表,注意:userlist、partylist不能同时为空,单次请求个数不超过1000 UserList []string `json:"userlist,omitempty"` }
AddTagUsersReq 增加标签成员 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90214#增加标签成员
type AgentInfo ¶
type AgentInfo struct { AgentId int `json:"agentid"` // 企业应用id 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"` AllowParties struct { PartyId []int `json:"partyid"` } `json:"allow_partys"` AllowTags struct { TagId []int `json:"tagid"` } `json:"allow_tags"` Close int `json:"close"` // 企业应用是否被停用。0:未被停用;1:被停用 RedirectDomain string `json:"redirect_domain"` // 企业应用可信域名 ReportLocationFlag int `json:"report_location_flag"` // 企业应用是否打开地理位置上报 0:不上报;1:进入会话上报; IsReportEnter int `json:"isreportenter"` // 是否上报用户进入应用事件。0:不接收;1:接收 HomeUrl string `json:"home_url"` // 应用主页url CustomizedPublishStatus int `json:"customized_publish_status"` // 代开发自建应用返回该字段,表示代开发发布状态。0:待开发(企业已授权,服务商未创建应用);1:开发中(服务商已创建应用,未上线);2:已上线(服务商已上线应用且不存在未上线版本);3:存在未上线版本(服务商已上线应用但存在未上线版本) }
type AgentInfoReq ¶
type AgentInfoReq struct {
AgentId int64
}
type App ¶
type App struct { *WorkWX // CorpSecret 应用的凭证密钥,必填 CorpSecret string // AgentID 应用 ID,必填 AgentID int64 SuiteTicketGetter GetSuiteTicket // 获取 suiteTicket // contains filtered or unexported fields }
App 企业微信客户端(分应用)
func (*App) AddContactWay ¶
func (c *App) AddContactWay(req AddContactWay) (configID, qrCode string, err error)
AddContactWay 配置客户联系「联系我」方式 文档:https://work.weixin.qq.com/api/doc/90000/90135/92572#配置客户联系「联系我」方式
func (*App) AddCustomerServiceAccount ¶
func (c *App) AddCustomerServiceAccount(ctx context.Context, req AddCustomerServiceAccountReq) (rsp AddCustomerServiceAccountRsp, err error)
AddCustomerServiceAccount 添加客服账号 https://developer.work.weixin.qq.com/document/path/94662
func (*App) AddCustomerServiceServicer ¶
func (c *App) AddCustomerServiceServicer(ctx context.Context, req AddCustomerServiceServicerReq) (rsp AddCustomerServiceServicerRsp, err error)
AddCustomerServiceServicer 添加接待人员 https://developer.work.weixin.qq.com/document/path/94646
func (*App) AddExternalContactCorpTag ¶
func (c *App) AddExternalContactCorpTag(req ExternalContactCorpTagGroup) (ExternalContactCorpTagGroup, error)
AddExternalContactCorpTag 添加企业客户标签
func (*App) AddMsgTemplate ¶
func (c *App) AddMsgTemplate(req AddMsgTemplateReq) (msgID string, failedList []string, err error)
AddMsgTemplate 创建企业群发 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/92135#创建企业群发
func (*App) AddTagUsers ¶
func (c *App) AddTagUsers(req AddTagUsersReq) (ok bool, err error)
AddTagUsers 增加标签成员 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90214#增加标签成员
func (*App) ApplyOAEvent ¶
func (c *App) ApplyOAEvent(applyInfo OAApplyEvent) (string, error)
ApplyOAEvent 提交审批申请
func (*App) BatchListExternalContact ¶
func (c *App) BatchListExternalContact(userIDs []string, cursor string, limit int) (*BatchListExternalContactsResp, error)
BatchListExternalContact 批量获取客户详情
func (*App) CheckMsgAuditRoomAgree ¶
func (c *App) CheckMsgAuditRoomAgree(roomId string) ([]CheckMsgAuditRoomAgreeInfo, error)
CheckMsgAuditRoomAgree 获取会话同意情况(群聊)
func (*App) CheckMsgAuditSingleAgree ¶
func (c *App) CheckMsgAuditSingleAgree(infos []CheckMsgAuditSingleAgreeUserInfo) ([]CheckMsgAuditSingleAgreeInfo, error)
CheckMsgAuditSingleAgree 获取会话同意情况(单聊)
func (*App) CloseTempChat ¶
CloseTempChat 结束临时会话 文档:https://work.weixin.qq.com/api/doc/90000/90135/92572#结束临时会话
func (*App) ContactSearch ¶ added in v0.2.0
func (c *App) ContactSearch(ctx context.Context, req SearchContactReq) (SearchContactResp, error)
第三方服务商通讯录搜索
func (*App) CreateAppChat ¶
CreateAppChat 创建群聊会话
func (*App) CreateTag ¶
CreateTag 创建标签 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90210#创建标签
func (*App) DelContactWay ¶
DelContactWay 删除企业已配置的「联系我」方式 文档:https://work.weixin.qq.com/api/doc/90000/90135/92572#删除企业已配置的「联系我」方式
func (*App) DelCustomerAcquisition ¶
func (c *App) DelCustomerAcquisition(req *DelCustomerAcquisitionReq) (err error)
func (*App) DelCustomerServiceAccount ¶
func (c *App) DelCustomerServiceAccount(ctx context.Context, req DelCustomerServiceAccountReq) (err error)
DelCustomerServiceAccount 删除客服账号 https://developer.work.weixin.qq.com/document/path/94663
func (*App) DelCustomerServiceServicer ¶
func (c *App) DelCustomerServiceServicer(ctx context.Context, req DelCustomerServiceServicerReq) (rsp DelCustomerServiceServicerRsp, err error)
DelCustomerServiceServicer 删除接待人员 https://developer.work.weixin.qq.com/document/path/94647
func (*App) DelExternalContactCorpTag ¶
DelExternalContactCorpTag 删除企业客户标签
func (*App) DelTagUsers ¶
func (c *App) DelTagUsers(req DelTagUsersReq) (ok bool, err error)
DelTagUsers 删除标签成员 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90215#删除标签成员
func (*App) DeleteTag ¶
DeleteTag 删除标签 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90212#删除标签
func (*App) EditExternalContactCorpTag ¶
EditExternalContactCorpTag 编辑企业客户标签
func (*App) FetchAllCustomerServiceAccounts ¶
func (c *App) FetchAllCustomerServiceAccounts(ctx context.Context) (data []CustomerServiceAccountItem, err error)
FetchAllCustomerServiceAccounts 获取所有的客服账号列表
func (*App) FetchCustomerServiceAccountContactWay ¶
func (c *App) FetchCustomerServiceAccountContactWay(ctx context.Context, req FetchCustomerServiceAccountContactWayReq) (rsp FetchCustomerServiceAccountContactWayRsp, err error)
FetchCustomerServiceAccountContactWay 获取客服账号链接 https://developer.work.weixin.qq.com/document/path/94665
func (*App) FetchCustomerServiceAccounts ¶
func (c *App) FetchCustomerServiceAccounts(ctx context.Context, req FetchCustomerServiceAccountsReq) (rsp FetchCustomerServiceAccountRsp, err error)
FetchCustomerServiceAccounts 获取客服账号列表 https://developer.work.weixin.qq.com/document/path/94661
func (*App) FetchCustomerServiceCustomers ¶
func (c *App) FetchCustomerServiceCustomers(ctx context.Context, req FetchCustomerServiceCustomersReq) (rsp FetchCustomerServiceCustomersRsp, err error)
FetchCustomerServiceCustomers 获取客户基础信息 https://developer.work.weixin.qq.com/document/path/95159
func (*App) FetchCustomerServiceServicers ¶
func (c *App) FetchCustomerServiceServicers(ctx context.Context, req FetchCustomerServiceServicersReq) (rsp FetchCustomerServiceServicersRsp, err error)
FetchCustomerServiceServicers 获取接待人员列表 https://developer.work.weixin.qq.com/document/path/94645
func (*App) FetchCustomerServiceState ¶
func (c *App) FetchCustomerServiceState(ctx context.Context, req FetchCustomerServiceStateReq) (rsp FetchCustomerServiceStateRsp, err error)
FetchCustomerServiceState 获取会话状态 https://developer.work.weixin.qq.com/document/path/94669
func (*App) FetchMediaInfo ¶
func (c *App) FetchMediaInfo(ctx context.Context, mediaId string) (mediaInfo MediaInfoRsp, err error)
FetchMediaInfo 通过header获取媒体资源的信息
func (*App) GetAgentPermission ¶ added in v0.2.0
func (c *App) GetAgentPermission() (permission GetAgentPermission, err error)
func (*App) GetAppChat ¶
GetAppChat 获取群聊会话
func (*App) GetAppLicenseInfo ¶ added in v0.2.0
func (*App) GetAppQrcode ¶ added in v0.2.0
func (c *App) GetAppQrcode(ctx context.Context, req GetAppQrcodeReq) (GetAppQrcodeResp, error)
获取应用二维码,仅限第三方应用使用
func (*App) GetAuthInfo ¶ added in v0.2.0
func (*App) GetContactWay ¶
func (c *App) GetContactWay(configID string) (contactWay ContactWay, err error)
GetContactWay 获取企业已配置的「联系我」方式 文档:https://work.weixin.qq.com/api/doc/90000/90135/92572#获取企业已配置的「联系我」方式
func (*App) GetCorpToken ¶ added in v0.2.0
func (c *App) GetCorpToken(ctx context.Context, corpId, permanentCode string) (GetCorpTokenResp, error)
第三方服务商获取企业凭证
func (*App) GetCustomerAcquisitionDetail ¶
func (c *App) GetCustomerAcquisitionDetail(ctx context.Context, req *ReqGetCustomerAcquisitionDetail) (data RspGetCustomerAcquisitionDetail, err error)
func (*App) GetCustomerAcquisitionList ¶
func (c *App) GetCustomerAcquisitionList(ctx context.Context, req *ReqGetCustomerAcquisitionList) (data RspGetCustomerAcquisitionList, err error)
GetCustomerAcquisitionList 获取获客链接列表
func (*App) GetCustomerServiceCorpStatistic ¶
func (c *App) GetCustomerServiceCorpStatistic(ctx context.Context, req GetCustomerServiceCorpStatisticReq) (rsp GetCustomerServiceCorpStatisticRsp, err error)
GetCustomerServiceCorpStatistic 获取「客户数据统计」企业汇总数据 https://developer.work.weixin.qq.com/document/path/95489
func (*App) GetCustomerServiceServicerStatistic ¶
func (c *App) GetCustomerServiceServicerStatistic(ctx context.Context, req GetCustomerServiceServicerStatisticReq) (rsp GetCustomerServiceServicerStatisticRsp, err error)
GetCustomerServiceServicerStatistic 获取「客户数据统计」接待人员明细数据 https://developer.work.weixin.qq.com/document/path/95490
func (*App) GetCustomizedAuthUrl ¶ added in v0.2.0
func (c *App) GetCustomizedAuthUrl(ctx context.Context, state string, templateIds []string) (GetCustomizedAuthUrlResp, error)
GetCustomizedAuthUrl 代开发应用获取授权链接
func (*App) GetDepartment ¶ added in v0.2.0
func (*App) GetExternalContact ¶
func (c *App) GetExternalContact(externalUserid string) (*ExternalContactInfo, error)
GetExternalContact 获取客户详情
func (*App) GetGroupChat ¶
func (c *App) GetGroupChat(req GetGroupChatReq) (GetGroupChatResp, error)
GetGroupChat 获取客户群详情 文档:https://work.weixin.qq.com/api/doc/90000/90135/92122#获取客户群详情
func (*App) GetGroupMsgSendResultExternalContact ¶
func (c *App) GetGroupMsgSendResultExternalContact(req GetGroupMsgSendResultExternalContactReq) (res GetGroupMsgSendResultExternalContactResp, err error)
GetGroupMsgSendResultExternalContact 获取企业群发成员执行结果 文档:https://work.weixin.qq.com/api/doc/90000/90135/93338#获取企业群发成员执行结果
func (*App) GetGroupMsgTaskExternalContact ¶
func (c *App) GetGroupMsgTaskExternalContact(req ReqGetGroupmsgTaskExternalcontact) (resp GetGroupMsgTaskExternalContactResp, err error)
GetGroupMsgTaskExternalContact 获取群发成员发送任务列表 文档:https://work.weixin.qq.com/api/doc/90000/90135/93338#获取群发成员发送任务列表
func (*App) GetGroupmsgListV2Externalcontact ¶
func (c *App) GetGroupmsgListV2Externalcontact(req getGroupMsgListV2ExternalContactReq) (ok bool, err error)
GetGroupmsgListV2Externalcontact 获取群发记录列表 文档:https://work.weixin.qq.com/api/doc/90000/90135/93338#获取群发记录列表
func (*App) GetJSAPIAgentTicket ¶
GetJSAPIAgentTicket 获取 JSAPI_agent_ticket
func (*App) GetJSAPITicket ¶
GetJSAPITicket 获取 JSAPI_ticket
func (*App) GetJSAPITicketAgentConfig ¶
GetJSAPITicketAgentConfig 获取 JSAPI_ticket_agent_config
func (*App) GetMsgAuditGroupChat ¶
func (c *App) GetMsgAuditGroupChat(roomID string) (*MsgAuditGroupChat, error)
GetMsgAuditGroupChat 获取会话内容存档内部群信息
func (*App) GetOAApprovalDetail ¶
func (c *App) GetOAApprovalDetail(spNo string) (*OAApprovalDetail, error)
GetOAApprovalDetail 提交审批申请
func (*App) GetOAApprovalInfo ¶
func (c *App) GetOAApprovalInfo(req GetOAApprovalInfoReq) ([]string, error)
GetOAApprovalInfo 批量获取审批单号
func (*App) GetOATemplateDetail ¶
func (c *App) GetOATemplateDetail(templateID string) (*OATemplateDetail, error)
GetOATemplateDetail 获取审批模板详情
func (*App) GetPermanentCode ¶ added in v0.2.0
func (*App) GetTagDetail ¶
GetTagDetail 获取标签成员 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90213#获取标签成员
func (*App) GetTransferExternalContactResult ¶
func (c *App) GetTransferExternalContactResult(externalUserID, handoverUserID, takeoverUserID string) (*ExternalContactTransferResult, error)
GetTransferExternalContactResult 查询客户接替结果
func (*App) GetUserBehaviorDataExternalContact ¶
func (*App) GetUserIDByMobile ¶
GetUserIDByMobile 通过手机号获取 userid
func (*App) GetUserInfoByCode ¶
func (c *App) GetUserInfoByCode(code string) (*UserIdentityInfo, error)
GetUserInfoByCode 获取访问用户身份,根据code获取成员信息
func (*App) GetUserInfoThird ¶ added in v0.9.0
func (c *App) GetUserInfoThird(ctx context.Context, req GetUserInfoThirdReq) (GetUserInfoThirdResp, error)
获取访问用户身份
func (*App) GroupChatAddJoinWay ¶
func (c *App) GroupChatAddJoinWay(req GroupChatAddJoinWayReq) (string, error)
GroupChatAddJoinWay 配置客户群进群方式 文档:https://developer.work.weixin.qq.com/document/path/92229#%E9%85%8D%E7%BD%AE%E5%AE%A2%E6%88%B7%E7%BE%A4%E8%BF%9B%E7%BE%A4%E6%96%B9%E5%BC%8F
func (*App) GroupChatDelJoinWay ¶
func (c *App) GroupChatDelJoinWay(req GroupChatDelJoinWayReq) error
GroupChatDelJoinWay 删除客户群进群方式配置 文档:https://developer.work.weixin.qq.com/document/path/92229#%E5%88%A0%E9%99%A4%E5%AE%A2%E6%88%B7%E7%BE%A4%E8%BF%9B%E7%BE%A4%E6%96%B9%E5%BC%8F%E9%85%8D%E7%BD%AE
func (*App) GroupChatGetJoinWay ¶
func (c *App) GroupChatGetJoinWay(req GroupChatGetJoinWayReq) (GroupChatGetJoinWay, error)
GroupChatGetJoinWay 获取客户群进群方式 文档:https://developer.work.weixin.qq.com/document/path/92229#%E8%8E%B7%E5%8F%96%E5%AE%A2%E6%88%B7%E7%BE%A4%E8%BF%9B%E7%BE%A4%E6%96%B9%E5%BC%8F%E9%85%8D%E7%BD%AE
func (*App) GroupChatUpdateJoinWay ¶
func (c *App) GroupChatUpdateJoinWay(req GroupChatUpdateJoinWayReq) error
GroupChatUpdateJoinWay 更新客户群进群方式配置 文档:https://developer.work.weixin.qq.com/document/path/92229#%E6%9B%B4%E6%96%B0%E5%AE%A2%E6%88%B7%E7%BE%A4%E8%BF%9B%E7%BE%A4%E6%96%B9%E5%BC%8F%E9%85%8D%E7%BD%AE
func (*App) JSCode2Session ¶
func (c *App) JSCode2Session(jscode string) (*JSCodeSession, error)
JSCode2Session 临时登录凭证校验
func (*App) ListAllDepartments ¶
ListAllDepartments 获取全量组织架构。
func (*App) ListContactWay ¶
func (c *App) ListContactWay(req ListContactWayReq) (configIDs []string, nextCursor string, err error)
ListContactWay 获取企业已配置的「联系我」方式id列表
func (*App) ListDepartments ¶
ListDepartments 获取指定部门及其下的子部门。
func (*App) ListExternalContact ¶
ListExternalContact 获取客户列表
func (*App) ListExternalContactCorpTags ¶
func (c *App) ListExternalContactCorpTags(tagIDs ...string) ([]ExternalContactCorpTagGroup, error)
ListExternalContactCorpTags 获取企业标签库
func (*App) ListExternalContactCorpTagsByGroupIDs ¶
func (c *App) ListExternalContactCorpTagsByGroupIDs(groupIDs ...string) ([]ExternalContactCorpTagGroup, error)
ListExternalContactCorpTagsByGroupIDs 获取企业标签库
func (*App) ListGroupChat ¶
func (c *App) ListGroupChat(req ListGroupChatReq) (ListGroupChatResp, error)
ListGroupChat 获取客户群列表 文档:https://work.weixin.qq.com/api/doc/90000/90135/92120#获取客户群列表
func (*App) ListMsgAuditPermitUser ¶
func (c *App) ListMsgAuditPermitUser(msgAuditEdition MsgAuditEdition) ([]string, error)
ListMsgAuditPermitUser 获取会话内容存档开启成员列表
func (*App) ListTag ¶
ListTag 获取标签列表 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90216#获取标签列表
func (*App) ListUnassignedExternalContact ¶
func (c *App) ListUnassignedExternalContact(pageID, pageSize uint32, cursor string) (*ExternalContactUnassignedList, error)
ListUnassignedExternalContact 获取离职成员的客户列表
func (*App) ListUsersByDeptID ¶
ListUsersByDeptID 获取部门成员详情
func (*App) MarkExternalContactTag ¶
func (c *App) MarkExternalContactTag(userID, externalUserID string, addTag, removeTag []string) error
MarkExternalContactTag 编辑客户的企业标签
func (*App) RangeDownloadMedia ¶
func (*App) RemarkExternalContact ¶
func (c *App) RemarkExternalContact(req *ExternalContactRemark) error
RemarkExternalContact 修改客户备注信息
func (*App) SaveCustomerAcquisition ¶
func (c *App) SaveCustomerAcquisition(req *SaveCustomerAcquisitionReq) (link SaveCustomerAcquisitionResp, err error)
func (*App) SendCustomerServiceMsg ¶
func (c *App) SendCustomerServiceMsg(ctx context.Context, req SendCustomerServiceMsgReq) (rsp SendCustomerServiceMsgRsp, err error)
SendCustomerServiceMsg 发送客服消息 https://developer.work.weixin.qq.com/document/path/94677
func (*App) SendCustomerServiceMsgOnEvent ¶
func (c *App) SendCustomerServiceMsgOnEvent(ctx context.Context, req SendMsgOnCustomerServiceEventReq) (rsp SendMsgOnCustomerServiceEventRsp, err error)
SendCustomerServiceMsgOnEvent 发送事件响应消息 https://developer.work.weixin.qq.com/document/path/95122
func (*App) SendFileMessage ¶
SendFileMessage 发送文件消息
收件人参数如果仅设置了 `ChatID` 字段,则为【发送消息到群聊会话】接口调用; 否则为单纯的【发送应用消息】接口调用。
func (*App) SendImageMessage ¶
SendImageMessage 发送图片消息
收件人参数如果仅设置了 `ChatID` 字段,则为【发送消息到群聊会话】接口调用; 否则为单纯的【发送应用消息】接口调用。
func (*App) SendMPNewsMessage ¶
func (c *App) SendMPNewsMessage( recipient *Recipient, title string, thumbMediaID string, author string, sourceContentURL string, content string, digest string, isSafe bool, ) error
SendMPNewsMessage 发送 mpnews 类型的图文消息
收件人参数如果仅设置了 `ChatID` 字段,则为【发送消息到群聊会话】接口调用; 否则为单纯的【发送应用消息】接口调用。
func (*App) SendMarkdownMessage ¶
SendMarkdownMessage 发送 Markdown 消息
仅支持 Markdown 的子集,详见[官方文档](https://work.weixin.qq.com/api/doc#90002/90151/90854/%E6%94%AF%E6%8C%81%E7%9A%84markdown%E8%AF%AD%E6%B3%95)。
收件人参数如果仅设置了 `ChatID` 字段,则为【发送消息到群聊会话】接口调用; 否则为单纯的【发送应用消息】接口调用。
func (*App) SendNewsMessage ¶
func (c *App) SendNewsMessage( recipient *Recipient, title string, description string, url string, picURL string, isSafe bool, ) error
SendNewsMessage 发送图文消息
收件人参数如果仅设置了 `ChatID` 字段,则为【发送消息到群聊会话】接口调用; 否则为单纯的【发送应用消息】接口调用。
func (*App) SendTaskCardMessage ¶
func (c *App) SendTaskCardMessage( recipient *Recipient, title string, description string, url string, taskID string, btn []TaskCardBtn, isSafe bool, ) error
SendTaskCardMessage 发送 任务卡片 消息
func (*App) SendTextCardMessage ¶
func (c *App) SendTextCardMessage( recipient *Recipient, title string, description string, url string, buttonText string, isSafe bool, ) error
SendTextCardMessage 发送文本卡片消息
收件人参数如果仅设置了 `ChatID` 字段,则为【发送消息到群聊会话】接口调用; 否则为单纯的【发送应用消息】接口调用。
func (*App) SendTextMessage ¶
SendTextMessage 发送文本消息
收件人参数如果仅设置了 `ChatID` 字段,则为【发送消息到群聊会话】接口调用; 否则为单纯的【发送应用消息】接口调用。
func (*App) SendVideoMessage ¶
func (c *App) SendVideoMessage(recipient *Recipient, mediaID string, description string, title string, isSafe bool) error
SendVideoMessage 发送视频消息
收件人参数如果仅设置了 `ChatID` 字段,则为【发送消息到群聊会话】接口调用; 否则为单纯的【发送应用消息】接口调用。
func (*App) SendVoiceMessage ¶
SendVoiceMessage 发送语音消息
收件人参数如果仅设置了 `ChatID` 字段,则为【发送消息到群聊会话】接口调用; 否则为单纯的【发送应用消息】接口调用。
func (*App) SendWelcomeMsg ¶
func (c *App) SendWelcomeMsg(req SendWelcomeMsgReq) (ok bool, err error)
SendWelcomeMsg 发送新客户欢迎语 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/92137#发送新客户欢迎语
func (*App) SpawnAccessTokenRefresher ¶
func (c *App) SpawnAccessTokenRefresher()
SpawnAccessTokenRefresher 启动该 app 的 access token 刷新 goroutine
NOTE: 该 goroutine 本身没有 keep-alive 逻辑,需要自助保活
func (*App) SpawnAccessTokenRefresherWithContext ¶
SpawnAccessTokenRefresherWithContext 启动该 app 的 access token 刷新 goroutine 可以通过 context cancellation 停止此 goroutine
NOTE: 该 goroutine 本身没有 keep-alive 逻辑,需要自助保活
func (*App) SpawnJSAPITicketAgentConfigRefresher ¶
func (c *App) SpawnJSAPITicketAgentConfigRefresher()
SpawnJSAPITicketAgentConfigRefresher 启动该 app 的 JSAPI_ticket_agent_config 刷新 goroutine
NOTE: 该 goroutine 本身没有 keep-alive 逻辑,需要自助保活
func (*App) SpawnJSAPITicketAgentConfigRefresherWithContext ¶
SpawnJSAPITicketAgentConfigRefresherWithContext 启动该 app 的 JSAPI_ticket_agent_config 刷新 goroutine 可以通过 context cancellation 停止此 goroutine
NOTE: 该 goroutine 本身没有 keep-alive 逻辑,需要自助保活
func (*App) SpawnJSAPITicketRefresher ¶
func (c *App) SpawnJSAPITicketRefresher()
SpawnJSAPITicketRefresher 启动该 app 的 JSAPI_ticket 刷新 goroutine
NOTE: 该 goroutine 本身没有 keep-alive 逻辑,需要自助保活
func (*App) SpawnJSAPITicketRefresherWithContext ¶
SpawnJSAPITicketRefresherWithContext 启动该 app 的 JSAPI_ticket 刷新 goroutine 可以通过 context cancellation 停止此 goroutine
NOTE: 该 goroutine 本身没有 keep-alive 逻辑,需要自助保活
func (*App) StopSendMsgExternalContact ¶
StopSendMsgExternalContact 停止群发任务
func (*App) SyncCustomerServiceMsg ¶
func (c *App) SyncCustomerServiceMsg(ctx context.Context, req SyncCustomerServiceMsgReq) (rsp SyncCustomerServiceMsgRsp, err error)
SyncCustomerServiceMsg 接收消息和事件 https://developer.work.weixin.qq.com/document/path/94670
func (*App) TransCustomerServiceState ¶
func (c *App) TransCustomerServiceState(ctx context.Context, req TransCustomerServiceStateReq) (rsp TransCustomerServiceStateRsp, err error)
TransCustomerServiceState 变更会话状态 https://developer.work.weixin.qq.com/document/path/94669#%E5%8F%98%E6%9B%B4%E4%BC%9A%E8%AF%9D%E7%8A%B6%E6%80%81
func (*App) TransferExternalContact ¶
func (c *App) TransferExternalContact(externalUserID, handoverUserID, takeoverUserID, transferSuccessMsg string) error
TransferExternalContact 分配成员的客户
func (*App) TransferGroupChatExternalContact ¶
func (c *App) TransferGroupChatExternalContact(chatIDList []string, newOwner string) ([]ExternalContactGroupChatTransferFailed, error)
TransferGroupChatExternalContact 离职成员的群再分配
func (*App) UpdateContactWay ¶
func (c *App) UpdateContactWay(req UpdateContactWay) (ok bool, err error)
UpdateContactWay 更新企业已配置的「联系我」方式 文档:https://work.weixin.qq.com/api/doc/90000/90135/92572#更新企业已配置的「联系我」方式
func (*App) UpdateCustomerServiceAccount ¶
func (c *App) UpdateCustomerServiceAccount(ctx context.Context, req UpdateCustomerServiceAccountReq) (err error)
UpdateCustomerServiceAccount 修改客服账号 https://developer.work.weixin.qq.com/document/path/94663
func (*App) UpdateTag ¶
UpdateTag 更新标签名字 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90211#更新标签名字
func (*App) UpdateUser ¶
func (c *App) UpdateUser(req UpdateUserReq) (ok bool, err error)
UpdateUser 更新成员 文档:https://work.weixin.qq.com/api/doc/90000/90135/90197#更新成员
func (*App) UploadPermanentImageMedia ¶
UploadPermanentImageMedia 上传永久图片素材
func (*App) UploadTempFileMedia ¶
func (c *App) UploadTempFileMedia(media *Media) (*MediaUploadResult, error)
UploadTempFileMedia 上传临时文件素材
func (*App) UploadTempImageMedia ¶
func (c *App) UploadTempImageMedia(media *Media) (*MediaUploadResult, error)
UploadTempImageMedia 上传临时图片素材
func (*App) UploadTempVideoMedia ¶
func (c *App) UploadTempVideoMedia(media *Media) (*MediaUploadResult, error)
UploadTempVideoMedia 上传临时视频素材
func (*App) UploadTempVoiceMedia ¶
func (c *App) UploadTempVoiceMedia(media *Media) (*MediaUploadResult, error)
UploadTempVoiceMedia 上传临时语音素材
type AppOption ¶ added in v0.2.0
type AppOption func(*App)
func AppWithAgentID ¶ added in v0.2.0
func AppWithSuiteAgent ¶ added in v0.2.0
type AppQrcodeResultType ¶ added in v0.2.0
type AppQrcodeResultType int
const ( AppQrcodeResultTypeBuffer AppQrcodeResultType = iota + 1 // 返回二维码 buffer AppQrcodeResultTypeUrl // 返回二维码 url )
type AppQrcodeStyle ¶ added in v0.2.0
type AppQrcodeStyle int
const ( AppQrcodeStyle0 AppQrcodeStyle = iota //带说明外框的二维码,适合于实体物料 AppQrcodeStyle1 // 带说明外框的二维码,适合于屏幕类 AppQrcodeStyle2 // 不带说明外框(小尺寸) AppQrcodeStyle3 // 不带说明外框(中尺寸) AppQrcodeStyle4 // 不带说明外框(大尺寸) )
type Attachments ¶
type Attachments struct { MsgType string `json:"msgtype" binding:"oneof=image file video miniprogram link"` // 附件类型,可选image、link、miniprogram或者video,必填 Image *Image `json:"image,omitempty" binding:"required_if=MsgType image" comment:"图片"` Link *Link `json:"link,omitempty" binding:"required_if=MsgType link" comment:"网页"` MiniProgram *MiniProgram `json:"miniprogram,omitempty" binding:"required_if=MsgTpe miniprogram" comment:"小程序"` Video *Video `json:"video,omitempty" binding:"required_if=MsgType video" comment:"视频"` File *File `json:"file,omitempty" binding:"required_if=MsgType file" comment:"文件"` }
type AuthCorpInfo ¶ added in v0.2.0
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"` Location string `json:"location"` }
type AuthInfoAgent ¶ added in v0.2.0
type AuthInfoAgent 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"` AuthFromThirdapp bool `json:"auth_from_thirdapp,omitempty"` Privilege AuthInfoAgentPrivilege `json:"privilege,omitempty"` }
type AuthInfoAgentPrivilege ¶ added in v0.2.0
type AuthInfoAgentSharedFrom ¶ added in v0.2.0
type AuthInfoAgentSharedFrom struct {}
type AuthUserInfo ¶ added in v0.2.0
type BatchListExternalContactsResp ¶
type BatchListExternalContactsResp struct { Result []ExternalContactBatchInfo NextCursor string }
BatchListExternalContactsResp 外部联系人信息
type CallBackHandler ¶
type CallBackHandler struct {
// contains filtered or unexported fields
}
func NewCBHandler ¶
func NewCBHandler(token string, encodingAESKey string) (*CallBackHandler, error)
func (*CallBackHandler) EchoTestHandler ¶
func (cb *CallBackHandler) EchoTestHandler(rw http.ResponseWriter, r *http.Request)
EchoTestHandler wx后台配置服务器ip,回显
func (*CallBackHandler) GetCallBackMsg ¶
func (cb *CallBackHandler) GetCallBackMsg(r *http.Request) (*RxMessage, error)
type ChangeType ¶
type ChangeType string
ChangeType 变更类型
const ChangeTypeAddExternalContact ChangeType = "add_external_contact"
ChangeTypeAddExternalContact 添加企业客户事件
const ChangeTypeAddHalfExternalContact ChangeType = "add_half_external_contact"
ChangeTypeAddHalfExternalContact 外部联系人免验证添加成员事件
const ChangeTypeCreateChat ChangeType = "create"
ChangeTypeCreateChat 创建群聊
const ChangeTypeCreateParty ChangeType = "create_party"
ChangeTypeCreateParty 添加部门事件
const ChangeTypeCreateTag ChangeType = "create"
ChangeTypeCreateTag 添加标签事件
const ChangeTypeCreateUser ChangeType = "create_user"
ChangeTypeCreateUser 新增员工
const ChangeTypeDelExternalContact ChangeType = "del_external_contact"
ChangeTypeDelExternalContact 删除企业客户事件
const ChangeTypeDelFollowUser ChangeType = "del_follow_user"
ChangeTypeDelFollowUser 删除跟进成员事件
const ChangeTypeDelUser ChangeType = "delete_user"
ChangeTypeDelUser 删除员工事件
const ChangeTypeDeleteParty ChangeType = "delete_party"
ChangeTypeDeleteParty 删除部门事件
const ChangeTypeDeleteTag ChangeType = "delete"
ChangeTypeDeleteTag 删除标签事件
const ChangeTypeDismissChat ChangeType = "dismiss"
ChangeTypeDismissChat 客户群解散事件
const ChangeTypeEditExternalContact ChangeType = "edit_external_contact"
ChangeTypeEditExternalContact 编辑企业客户事件
const ChangeTypeShuffleTag ChangeType = "shuffle"
ChangeTypeShuffleTag 标签重排
const ChangeTypeTransferFail ChangeType = "transfer_fail"
ChangeTypeTransferFail 客户接替失败事件
const ChangeTypeUpdateChat ChangeType = "update"
ChangeTypeUpdateChat 群聊更新事件
const ChangeTypeUpdateParty ChangeType = "update_party"
ChangeTypeUpdateParty 更新部门事件
const ChangeTypeUpdateTag ChangeType = "update"
ChangeTypeUpdateTag 更新标签事件
const ChangeTypeUpdateUser ChangeType = "update_user"
ChangeTypeUpdateUser 更新员工事件
type ChatInfo ¶
type ChatInfo struct { // ChatID 群聊唯一标志 ChatID string `json:"chatid"` // Name 群聊名 Name string `json:"name"` // OwnerUserID 群主id OwnerUserID string `json:"owner"` // MemberUserIDs 群成员id列表 MemberUserIDs []string `json:"userlist"` }
ChatInfo 群聊信息
type CheckMsgAuditRoomAgreeInfo ¶
type CheckMsgAuditRoomAgreeInfo struct { // StatusChangeTime 同意状态改变的具体时间 StatusChangeTime time.Time // AgreeStatus 同意:”Agree”,不同意:”Disagree”,默认同意:”Default_Agree” AgreeStatus MsgAuditAgreeStatus // ExternalOpenID 群内外部联系人的externalopenid ExternalOpenID string }
CheckMsgAuditRoomAgreeInfo 获取会话同意情况(群聊)同意信息
type CheckMsgAuditSingleAgreeInfo ¶
type CheckMsgAuditSingleAgreeInfo struct { CheckMsgAuditSingleAgreeUserInfo // AgreeStatus 同意:”Agree”,不同意:”Disagree”,默认同意:”Default_Agree” AgreeStatus MsgAuditAgreeStatus // StatusChangeTime 同意状态改变的具体时间 StatusChangeTime time.Time }
CheckMsgAuditSingleAgreeInfo 获取会话同意情况(单聊)同意信息
type CheckMsgAuditSingleAgreeUserInfo ¶
type CheckMsgAuditSingleAgreeUserInfo struct { // UserID 内部成员的userid UserID string `json:"userid"` // ExternalOpenID 外部成员的externalopenid ExternalOpenID string `json:"exteranalopenid"` }
CheckMsgAuditSingleAgreeUserInfo 获取会话同意情况(单聊)内外成员
type ClientError ¶
type ClientError struct { // Code 错误码,0表示成功,非0表示调用失败。 // 开发者需根据errcode是否为0判断是否调用成功(errcode意义请见全局错误码)。 Code errcodes.ErrCode // Msg 错误信息,调用失败会有相关的错误信息返回。 // 仅作参考,后续可能会有变动,因此不可作为是否调用成功的判据。 Msg string }
ClientError 企业微信客户端 SDK 的响应错误
func (*ClientError) Error ¶
func (e *ClientError) Error() string
type CommonResp ¶
type CommonResp struct { ErrCode int64 `json:"errcode" header:"Error-Code"` ErrMsg string `json:"errmsg" header:"Error-Msg"` }
func (*CommonResp) IsOK ¶
func (x *CommonResp) IsOK() bool
IsOK 响应体是否为一次成功请求的响应
实现依据: https://work.weixin.qq.com/api/doc#10013
> 企业微信所有接口,返回包里都有errcode、errmsg。 > 开发者需根据errcode是否为0判断是否调用成功(errcode意义请见全局错误码)。 > 而errmsg仅作参考,后续可能会有变动,因此不可作为是否调用成功的判据。
func (*CommonResp) TryIntoErr ¶
func (x *CommonResp) TryIntoErr() *ClientError
type Conclusions ¶
type Conclusions struct { Image struct { PicURL string `json:"pic_url"` } `json:"image"` Link struct { Desc string `json:"desc"` Picurl string `json:"picurl"` Title string `json:"title"` URL string `json:"url"` } `json:"link"` Miniprogram struct { Appid string `json:"appid"` Page string `json:"page"` PicMediaID string `json:"pic_media_id"` Title string `json:"title"` } `json:"miniprogram"` Text struct { Content string `json:"content"` } `json:"text"` }
Conclusions 结束语配置,会话结束时自动发送给客户,可参考“<a href="#15645/结束语定义">结束语定义</a>”,仅在is_temp为true时有效
type ConclusionsReq ¶
type ConclusionsReq struct { Image struct { MediaID string `json:"media_id"` } `json:"image"` Link struct { Desc string `json:"desc"` Picurl string `json:"picurl"` Title string `json:"title"` URL string `json:"url"` } `json:"link"` Miniprogram struct { Appid string `json:"appid"` Page string `json:"page"` PicMediaID string `json:"pic_media_id"` Title string `json:"title"` } `json:"miniprogram"` Text struct { Content string `json:"content"` } `json:"text"` }
ConclusionsReq 请求时的结束语配置,会话结束时自动发送给客户,可参考“<a href="#15645/结束语定义">结束语定义</a>”,仅在is_temp为true时有效
type ContactWay ¶
type ContactWay struct { // ChatExpiresIn 临时会话有效期,以秒为单位 ChatExpiresIn int `json:"chat_expires_in"` // Conclusions 结束语,可参考“<a href="#15645/结束语定义">结束语定义</a>” Conclusions Conclusions `json:"conclusions"` // ConfigID 新增联系方式的配置id ConfigID string `json:"config_id"` // ExpiresIn 临时会话二维码有效期,以秒为单位 ExpiresIn int `json:"expires_in"` // IsTemp 是否临时会话模式,默认为false,true表示使用临时会话模式 IsTemp bool `json:"is_temp"` // Party 使用该联系方式的部门id列表 Party []int `json:"party"` // QrCode 联系二维码的URL,仅在scene为2时返回 QrCode string `json:"qr_code"` // Remark 联系方式的备注信息,用于助记 Remark string `json:"remark"` // Scene 场景,1-在小程序中联系,2-通过二维码联系 Scene ContactWayScene `json:"scene"` // SkipVerify 外部客户添加时是否无需验证 SkipVerify bool `json:"skip_verify"` // State 企业自定义的state参数,用于区分不同的添加渠道,在调用“<a href="#13878">获取外部联系人详情</a>”时会返回该参数值 State string `json:"state"` // Style 小程序中联系按钮的样式,仅在scene为1时返回,详见附录 Style int `json:"style"` // Type 联系方式类型,1-单人,2-多人 Type ContactWayType `json:"type"` // Unionid 可进行临时会话的客户unionid Unionid string `json:"unionid"` // User 使用该联系方式的用户userID列表 User []string `json:"user"` }
ContactWay 渠道码
type ContactWayScene ¶
type ContactWayScene int
ContactWayScene 渠道码场景 1-在小程序中联系 2-通过二维码联系
const ( // ContactWaySceneMicroApp 在小程序中联系 ContactWaySceneMicroApp ContactWayScene = 1 // ContactWaySceneQrcode 通过二维码联系 ContactWaySceneQrcode ContactWayScene = 2 )
type ContactWayType ¶
type ContactWayType int
ContactWayType 渠道码联系方式 1-单人 2-多人
const ( // ContactWayTypeSingle 单人 ContactWayTypeSingle ContactWayType = 1 // ContactWayTypeMultiple 多人 ContactWayTypeMultiple ContactWayType = 2 )
type CorpAuthInfo ¶ added in v0.2.0
type CorpAuthInfo struct { DealerCorpInfo DealerCorpInfo `json:"dealer_corp_info"` AuthCorpInfo AuthCorpInfo `json:"auth_corp_info"` AuthInfo struct { Agent []AuthInfoAgent `json:"agent"` } `json:"auth_info"` AuthUserInfo AuthUserInfo `json:"auth_user_info"` RegisterCodeInfo RegisterCodeInfo `json:"register_code_info"` }
type CtorOption ¶
type CtorOption interface {
// contains filtered or unexported methods
}
CtorOption 客户端对象构造参数
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) CtorOption
WithHTTPClient 使用给定的 http.Client 作为 HTTP 客户端
type CustomerServiceCorpStatisticItem ¶
type CustomerServiceCorpStatisticItem struct { SessionCnt int `json:"session_cnt"` // 咨询会话数。客户发过消息并分配给接待人员或智能助手的客服会话数,转接不会产生新的会话 CustomerCnt int `json:"customer_cnt"` // 咨询客户数。在会话中发送过消息的客户数量,若客户多次咨询只计算一个客户 CustomerMsgCnt int `json:"customer_msg_cnt"` // 咨询消息总数。客户在会话中发送的消息的数量 UpgradeServiceCustomerCnt int `json:"upgrade_service_customer_cnt"` // 升级服务客户数。通过「升级服务」功能成功添加专员或加入客户群的客户数,若同一个客户添加多个专员或客户群,只计算一个客户。在2022年3月10日以后才会有对应统计数据 AiSessionReplyCnt int `json:"ai_session_reply_cnt"` // 智能回复会话数。客户发过消息并分配给智能助手的咨询会话数。通过API发消息或者开启智能回复功能会将客户分配给智能助手 AiTransferRate int `json:"ai_transfer_rate"` // 转人工率。一个自然日内,客户给智能助手发消息的会话中,转人工的会话的占比。 AiKnowledgeHitRate int `json:"ai_knowledge_hit_rate"` // 知识命中率。一个自然日内,客户给智能助手发送的消息中,命中知识库的占比。只有在开启了智能回复原生功能并配置了知识库的情况下,才会产生该项统计数据。当api托管了会话分配,智能回复原生功能失效。若不返回,代表没有向配置知识库的智能接待助手发送消息,该项无法计算 MsgRejectedCustomerCnt int `json:"msg_rejected_customer_cnt"` // 被拒收消息的客户数。被接待人员设置了“不再接收消息”的客户数 }
type CustomerServiceServicerStatisticItem ¶
type CustomerServiceServicerStatisticItem 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"` MsgRejectedCustomerCnt int `json:"msg_rejected_customer_cnt"` }
type DealerCorpInfo ¶ added in v0.2.0
type DelCustomerAcquisitionReq ¶
type DelCustomerAcquisitionReq struct {
LinkID string `json:"link_id"`
}
type DelCustomerServiceAccountReq ¶
type DelCustomerServiceAccountReq struct {
OpenKfid string `json:"open_kfid"`
}
type DelCustomerServiceServicerItem ¶
type DelCustomerServiceServicerItem AddCustomerServiceServicerItem
type DelCustomerServiceServicerRsp ¶
type DelCustomerServiceServicerRsp struct {
ResultList []DelCustomerServiceServicerItem `json:"result_list"`
}
type DelTagUsersReq ¶
type DelTagUsersReq struct { // PartyList 企业部门ID列表,注意:userlist、partylist不能同时为空,单次请求个数不超过100 PartyList []int `json:"partylist,omitempty"` // TagID 标签ID,必填 TagID int `json:"tagid"` // UserList 企业成员ID列表,注意:userlist、partylist不能同时为空,单次请求个数不超过1000 UserList []string `json:"userlist,omitempty"` }
DelTagUsersReq 删除标签成员请求 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90215#删除标签成员
type DeptInfo ¶
type DeptInfo struct { // ID 部门 ID ID int64 `json:"id"` // Name 部门名称 Name string `json:"name"` // ParentID 父亲部门id。根部门为1 ParentID int64 `json:"parentid"` // Order 在父部门中的次序值。order值大的排序靠前。值范围是[0, 2^32) Order uint32 `json:"order"` }
DeptInfo 部门信息
type EventAddExternalContact ¶
type EventAddExternalContact interface { // GetUserID 企业服务人员的UserID GetUserID() string // GetExternalUserID 外部联系人的userid,注意不是企业成员的帐号 GetExternalUserID() string // GetState 添加此用户的「联系我」方式配置的state参数,可用于识别添加此用户的渠道 GetState() string // GetWelcomeCode 欢迎语code,可用于发送欢迎语 GetWelcomeCode() string // contains filtered or unexported methods }
EventAddExternalContact 添加企业客户事件的参数。
type EventAddHalfExternalContact ¶
type EventAddHalfExternalContact interface { // GetUserID 企业服务人员的UserID GetUserID() string // GetExternalUserID 外部联系人的userid,注意不是企业成员的帐号 GetExternalUserID() string // GetState 添加此用户的「联系我」方式配置的state参数,可用于识别添加此用户的渠道 GetState() string // contains filtered or unexported methods }
EventAddHalfExternalContact 外部联系人免验证添加成员事件。
type EventChangeExternalChat ¶
type EventChangeExternalChat interface { // GetChatID 群ID GetChatID() string // GetToUserName 企业微信CorpID GetToUserName() string // GetFromUserName 此事件该值固定为sys,表示该消息由系统生成 GetFromUserName() string // GetFailReason 接替失败的原因, customer_refused-客户拒绝, customer_limit_exceed-接替成员的客户数达到上限 GetFailReason() string GetUpdateDetail() string GetJoinScene() int64 GetQuitScene() int64 GetMemChangeCnt() int64 // contains filtered or unexported methods }
EventChangeExternalChat 客户群变更事件
type EventCreateParty ¶
type EventCreateParty interface { GetID() int64 GetName() string GetParentID() int64 GetOrder() int64 // contains filtered or unexported methods }
EventCreateParty 新建部门
type EventCreateTag ¶
type EventCreateTag interface { GetID() string GetTagType() string // contains filtered or unexported methods }
EventCreateTag 新建标签
type EventCreateUser ¶
type EventCreateUser interface { GetUserID() string // contains filtered or unexported methods }
EventCreateUser 新增员工
type EventCustomerServiceExtras ¶
type EventCustomerServiceExtras interface { GetToUserName() string GetCreateTime() int64 GetMsgType() string GetToken() string GetOpenKfId() string // contains filtered or unexported methods }
EventCustomerServiceExtras 微信客服的消息。
type EventDelExternalContact ¶
type EventDelExternalContact interface { // GetUserID 企业服务人员的UserID GetUserID() string // GetExternalUserID 外部联系人的userid,注意不是企业成员的帐号 GetExternalUserID() string // contains filtered or unexported methods }
EventDelExternalContact 删除企业客户事件
type EventDelFollowUser ¶
type EventDelFollowUser interface { // GetUserID 企业服务人员的UserID GetUserID() string // GetExternalUserID 外部联系人的userid,注意不是企业成员的帐号 GetExternalUserID() string // contains filtered or unexported methods }
EventDelFollowUser 删除跟进成员事件
type EventDeleteParty ¶
type EventDeleteParty interface { GetID() int64 // contains filtered or unexported methods }
EventDeleteParty 删除部门门
type EventDeleteTag ¶
type EventDeleteTag interface { GetID() string GetTagType() string // contains filtered or unexported methods }
EventDeleteTag 删除标签
type EventDeleteUser ¶
type EventDeleteUser interface { GetUserID() string // contains filtered or unexported methods }
EventDeleteUser 删除员工
type EventEditExternalContact ¶
type EventEditExternalContact interface { // GetUserID 企业服务人员的UserID GetUserID() string // GetExternalUserID 外部联系人的userid,注意不是企业成员的帐号 GetExternalUserID() string // GetState 添加此用户的「联系我」方式配置的state参数,可用于识别添加此用户的渠道 GetState() string // contains filtered or unexported methods }
EventEditExternalContact 编辑企业客户事件的参数。
type EventShuffleTag ¶
type EventShuffleTag interface { GetID() string // contains filtered or unexported methods }
EventShuffleTag 删除标签
type EventSysApprovalChange ¶
type EventSysApprovalChange interface { // GetApprovalInfo 获取审批模板详情 GetApprovalInfo() OAApprovalInfo // contains filtered or unexported methods }
EventSysApprovalChange 审批申请状态变化回调通知
type EventTransferFail ¶
type EventTransferFail interface { // GetUserID 企业服务人员的UserID GetUserID() string // GetExternalUserID 外部联系人的userid,注意不是企业成员的帐号 GetExternalUserID() string // GetFailReason 接替失败的原因, customer_refused-客户拒绝, customer_limit_exceed-接替成员的客户数达到上限 GetFailReason() string // contains filtered or unexported methods }
EventTransferFail 客户接替失败事件
type EventType ¶
type EventType string
EventType 事件类型
const EventTypeChangeAppAdmin EventType = "change_app_admin"
const EventTypeChangeContact EventType = "change_contact"
EventTypeChangeContact 通讯论变更事件
const EventTypeChangeExternalChat EventType = "change_external_chat"
EventTypeChangeExternalChat 客户群变更事件
const EventTypeChangeExternalContact EventType = "change_external_contact"
EventTypeChangeExternalContact 企业客户事件
const EventTypeChangeExternalTag EventType = "change_external_tag"
EventTypeChangeExternalTag 标签事件
const EventTypeKfAccountAuthChange EventType = "kf_account_auth_change"
EventTypeKfAccountAuthChange 客服账号授权变更事件
const EventTypeKfMsgOrEvent EventType = "kf_msg_or_event"
EventTypeKfMsgOrEvent 微信客服消息通知
const EventTypeSubscribe EventType = "subscribe"
EventTypeSubscribe 成员关注事件
const EventTypeSysApprovalChange EventType = "sys_approval_change"
EventTypeSysApprovalChange 审批申请状态变化回调通知
const EventTypeSysCustomerAcquisition EventType = "customer_acquisition"
const EventTypeUnsubscribe EventType = "unsubscribe"
EventTypeUnsubscribe 成员取消关注事件
type EventUpdateParty ¶
type EventUpdateParty interface { GetID() int64 GetName() string GetParentID() int64 // contains filtered or unexported methods }
EventUpdateParty 更新部门
type EventUpdateTag ¶
type EventUpdateTag interface { GetID() string GetTagType() string // contains filtered or unexported methods }
EventUpdateTag 更新标签
type EventUpdateUser ¶
type EventUpdateUser interface { GetUserID() string // contains filtered or unexported methods }
EventUpdateUser 更新员工
type ExternalAttr ¶
type ExternalAttr struct { // Type 属性类型: 0-文本 1-网页 2-小程序 Type int `json:"type"` // Name 属性名称: 需要先确保在管理端有创建该属性,否则会忽略 Name string `json:"name"` // Text 文本类型的属性 ,type为0时必填 Text ExternalAttrText `json:"text"` // Web 网页类型的属性,url和title字段要么同时为空表示清除该属性,要么同时不为空 ,type为1时必填 Web ExternalAttrWeb `json:"web"` // Miniprogram 小程序类型的属性,appid和title字段要么同时为空表示清除改属性,要么同时不为空 ,type为2时必填 Miniprogram ExternalAttrMiniprogram `json:"miniprogram"` }
ExternalAttr 属性列表,目前支持文本、网页、小程序三种类型
type ExternalAttrMiniprogram ¶
type ExternalAttrMiniprogram struct { // Appid 小程序appid,必须是有在本企业安装授权的小程序,否则会被忽略 Appid string `json:"appid"` // Pagepath 小程序的页面路径 Pagepath string `json:"pagepath"` // Title 企业对外简称,需从已认证的企业简称中选填。可在“我的企业”页中查看企业简称认证状态。 Title string `json:"title"` }
ExternalAttrMiniprogram 小程序类型的属性,appid和title字段要么同时为空表示清除改属性,要么同时不为空 ,type为2时必填
type ExternalAttrText ¶
type ExternalAttrText struct { // Value 文本属性内容,长度限制12个UTF8字符 Value string `json:"value"` }
ExternalAttrText 文本类型的属性
type ExternalAttrWeb ¶
type ExternalAttrWeb struct { // Url 网页的url,必须包含http或者https头 Url string `json:"url"` // Title 网页的展示标题,长度限制12个UTF8字符 Title string `json:"title"` }
ExternalAttrWeb 网页类型的属性,url和title字段要么同时为空表示清除该属性,要么同时不为空 ,type为1时必填
type ExternalContact ¶
type ExternalContact struct { // ExternalUserid 外部联系人的userid ExternalUserid string `json:"external_userid"` // Name 外部联系人的名称,如果外部联系人为微信用户,则返回外部联系人的名称为其微信昵称;如果外部联系人为企业微信用户,则会按照以下优先级顺序返回:此外部联系人或管理员设置的昵称、认证的实名和账号名称。 Name string `json:"name"` // Position 外部联系人的职位,如果外部企业或用户选择隐藏职位,则不返回,仅当联系人类型是企业微信用户时有此字段 Position string `json:"position"` // Avatar 外部联系人头像,第三方不可获取 Avatar string `json:"avatar"` // CorpName 外部联系人所在企业的简称,仅当联系人类型是企业微信用户时有此字段 CorpName string `json:"corp_name"` // Type 外部联系人的类型,1表示该外部联系人是微信用户,2表示该外部联系人是企业微信用户 Type ExternalUserType `json:"type"` // Gender 外部联系人性别 0-未知 1-男性 2-女性 Gender UserGender `json:"gender"` // Unionid 外部联系人在微信开放平台的唯一身份标识(微信unionid),通过此字段企业可将外部联系人与公众号/小程序用户关联起来。仅当联系人类型是微信用户,且企业或第三方服务商绑定了微信开发者ID有此字段。查看绑定方法 关于返回的unionid,如果是第三方应用调用该接口,则返回的unionid是该第三方服务商所关联的微信开放者帐号下的unionid。也就是说,同一个企业客户,企业自己调用,与第三方服务商调用,所返回的unionid不同;不同的服务商调用,所返回的unionid也不同。 Unionid string `json:"unionid"` // ExternalProfile 成员对外信息 ExternalProfile ExternalProfile `json:"external_profile"` }
ExternalContact 外部联系人
type ExternalContactBatchInfo ¶
type ExternalContactBatchInfo struct { ExternalContact ExternalContact `json:"external_contact"` FollowInfo FollowInfo `json:"follow_info"` }
ExternalContactBatchInfo 外部联系人信息
type ExternalContactCorpTag ¶
type ExternalContactCorpTag struct { // ID 标签id ID string `json:"id,omitempty"` // Name 标签名称 Name string `json:"name"` // CreateTime 标签创建时间 CreateTime int `json:"create_time"` // Order 标签排序的次序值,order值大的排序靠前。有效的值范围是[0, 2^32) Order uint32 `json:"order"` // Deleted 标签是否已经被删除,只在指定tag_id进行查询时返回 Deleted bool `json:"deleted"` }
ExternalContactCorpTag 企业客户标签
type ExternalContactCorpTagGroup ¶
type ExternalContactCorpTagGroup struct { // GroupID 标签组id GroupID string `json:"group_id,omitempty"` // GroupName 标签组名称 GroupName string `json:"group_name"` // CreateTime 标签组创建时间 CreateTime int `json:"create_time,omitempty"` // Order 标签组排序的次序值,order值大的排序靠前。有效的值范围是[0, 2^32) Order uint32 `json:"order"` // Deleted 标签组是否已经被删除,只在指定tag_id进行查询时返回 Deleted bool `json:"deleted,omitempty"` // Tag 标签组内的标签列表 Tag []ExternalContactCorpTag `json:"tag"` }
ExternalContactCorpTagGroup 企业客户标签
type ExternalContactGetUserBehaviorData ¶
type ExternalContactGetUserBehaviorData struct { StatTime int64 `json:"stat_time"` ChatCnt int64 `json:"chat_cnt"` MessageCnt int64 `json:"message_cnt"` ReplyPercentage float64 `json:"reply_percentage"` AvgReplyTime int64 `json:"avg_reply_time"` NegativeFeedbackCnt int64 `json:"negative_feedback_cnt"` NewApplyCnt int64 `json:"new_apply_cnt"` NewContactCnt int64 `json:"new_contact_cnt"` }
type ExternalContactGetUserBehaviorDataRsp ¶
type ExternalContactGetUserBehaviorDataRsp struct { CommonResp BehaviorData []ExternalContactGetUserBehaviorData `json:"behavior_data"` }
type ExternalContactGroupChatTransferFailed ¶
type ExternalContactGroupChatTransferFailed struct { // ChatID 没能成功继承的群ID ChatID string `json:"chat_id"` // ErrCode 没能成功继承的群,错误码 ErrCode int `json:"errcode"` // ErrMsg 没能成功继承的群,错误描述 ErrMsg string `json:"errmsg"` }
ExternalContactGroupChatTransferFailed 离职成员的群再分配失败
type ExternalContactInfo ¶
type ExternalContactInfo struct { ExternalContact ExternalContact `json:"external_contact"` FollowUser []FollowUser `json:"follow_user"` }
ExternalContactInfo 外部联系人信息
type ExternalContactMarkTag ¶
type ExternalContactMarkTag struct { // UserID 添加外部联系人的userid UserID string `json:"userid"` // ExternalUserID 外部联系人userid ExternalUserID string `json:"external_userid"` // AddTag 要标记的标签列表 AddTag []string `json:"add_tag"` // RemoveTag 要移除的标签列表 RemoveTag []string `json:"remove_tag"` }
ExternalContactMarkTag 企业标记客户标签
type ExternalContactRemark ¶
type ExternalContactRemark struct { // Userid 企业成员的userid Userid string `json:"userid"` // ExternalUserid 外部联系人userid ExternalUserid string `json:"external_userid"` // Remark 此用户对外部联系人的备注,最多20个字符,remark,description,remark_company,remark_mobiles和remark_pic_mediaid不可同时为空。 Remark string `json:"remark"` // Description 此用户对外部联系人的描述,最多150个字符 Description string `json:"description"` // RemarkCompany 此用户对外部联系人备注的所属公司名称,最多20个字符,remark_company只在此外部联系人为微信用户时有效。 RemarkCompany string `json:"remark_company"` // RemarkMobiles 此用户对外部联系人备注的手机号,如果填写了remark_mobiles,将会覆盖旧的备注手机号。如果要清除所有备注手机号,请在remark_mobiles填写一个空字符串(“”)。 RemarkMobiles []string `json:"remark_mobiles"` // RemarkPicMediaid 备注图片的mediaid,remark_pic_mediaid可以通过素材管理接口获得。 RemarkPicMediaid string `json:"remark_pic_mediaid"` }
ExternalContactRemark 客户备注信息
type ExternalContactTransferResult ¶
type ExternalContactTransferResult struct { // Status 接替状态, 1-接替完毕 2-等待接替 3-客户拒绝 4-接替成员客户达到上限 5-无接替记录 Status ExternalContactTransferStatus // TakeoverTime 接替客户的时间,如果是等待接替状态,则为未来的自动接替时间 TakeoverTime time.Time }
ExternalContactTransferResult 客户接替结果
type ExternalContactTransferStatus ¶
type ExternalContactTransferStatus uint8
ExternalContactTransferStatus 客户接替结果状态
const ( // ExternalContactTransferStatusSuccess 1-接替完毕 ExternalContactTransferStatusSuccess ExternalContactTransferStatus = 1 // ExternalContactTransferStatusWait 2-等待接替 ExternalContactTransferStatusWait ExternalContactTransferStatus = 2 // ExternalContactTransferStatusRefused 3-客户拒绝 ExternalContactTransferStatusRefused ExternalContactTransferStatus = 3 // ExternalContactTransferStatusExhausted 4-接替成员客户达到上限 ExternalContactTransferStatusExhausted ExternalContactTransferStatus = 4 // ExternalContactTransferStatusNoData 5-无接替记录 ExternalContactTransferStatusNoData ExternalContactTransferStatus = 5 )
type ExternalContactUnassigned ¶
type ExternalContactUnassigned struct { // HandoverUserID 离职成员的userid HandoverUserID string // ExternalUserID 外部联系人userid ExternalUserID string // DemissionTime 成员离职时间 DemissionTime time.Time }
ExternalContactUnassigned 离职成员的客户
type ExternalContactUnassignedList ¶
type ExternalContactUnassignedList struct { // Info 离职成员的客户 Info []ExternalContactUnassigned `json:"info"` // IsLast 是否是最后一条记录 IsLast bool `json:"is_last"` // NextCursor 分页查询游标,已经查完则返回空("") NextCursor string `json:"next_cursor"` }
ExternalContactUnassignedList 离职成员的客户列表
type ExternalProfile ¶
type ExternalProfile struct { // ExternalCorpName 企业简称 ExternalCorpName string `json:"external_corp_name"` // ExternalAttr 属性列表,目前支持文本、网页、小程序三种类型 ExternalAttr []ExternalAttr `json:"external_attr"` }
ExternalProfile 成员对外信息
type ExternalUserType ¶
type ExternalUserType int
ExternalUserType 外部联系人的类型
1表示该外部联系人是微信用户 2表示该外部联系人是企业微信用户
const ( // ExternalUserTypeWeChat 微信用户 ExternalUserTypeWeChat ExternalUserType = 1 // ExternalUserTypeWorkWeChat 企业微信用户 ExternalUserTypeWorkWeChat ExternalUserType = 2 )
type FetchCustomerServiceAccountContactWayRsp ¶
type FetchCustomerServiceAccountContactWayRsp struct {
Url string `json:"url"`
}
type FetchCustomerServiceAccountRsp ¶
type FetchCustomerServiceAccountRsp struct {
AccountList []CustomerServiceAccountItem `json:"account_list"`
}
type FetchCustomerServiceCustomersItem ¶
type FetchCustomerServiceCustomersItem struct { ExternalUserid string `json:"external_userid"` // 微信客户的external_userid Nickname string `json:"nickname"` // 微信昵称 Avatar string `json:"avatar"` // 微信头像。 Gender int `json:"gender"` // 性别。第三方不可获取,统一返回0 Unionid string `json:"unionid"` // unionid,需要绑定微信开发者账号才能获取到,查看绑定方法。第三方不可获取 EnterSessionContext struct { Scene string `json:"scene"` // 进入会话的场景值,获取客服账号链接开发者自定义的场景值 SceneParam string `json:"scene_param"` // 进入会话的自定义参数,获取客服账号链接返回的url,开发者按规范拼接的scene_param参数 WechatChannels customer_service.WechatChannel `json:"wechat_channels"` // 进入会话的视频号信息,从视频号进入会话才有值 } `json:"enter_session_context"` }
type FetchCustomerServiceCustomersRsp ¶
type FetchCustomerServiceCustomersRsp struct { CustomerList []FetchCustomerServiceCustomersItem `json:"customer_list"` InvalidExternalUserId []string `json:"invalid_external_userid"` }
type FetchCustomerServiceServicersItem ¶
type FetchCustomerServiceServicersItem struct { Userid string `json:"userid,omitempty"` // 接待人员的userid,当userid为空时,表示返回的是部门 DepartmentId int `json:"department_id"` // 接待人员部门的id Status int `json:"status"` // 接待人员的接待状态。0:接待中,1:停止接待。 StopType uint `json:"stop_type"` // 接待人员的接待状态为「停止接待」的子类型。0:停止接待,1:暂时挂起 }
type FetchCustomerServiceServicersReq ¶
type FetchCustomerServiceServicersReq struct {
OpenKfid string // 客服账号ID
}
type FetchCustomerServiceServicersRsp ¶
type FetchCustomerServiceServicersRsp struct {
ServicerList []FetchCustomerServiceServicersItem `json:"servicer_list"`
}
type File ¶
type File struct { MediaId string `json:"media_id,omitempty"` Url string `json:"url" comment:"文件链接"` Title string `json:"title"` }
File 文件附件
type FollowInfo ¶
type FollowInfo struct { // 添加了外部联系人的企业成员 FollowUserInfo // TagID 该成员添加此外部联系人所打标签 TagID []string `json:"tag_id"` }
FollowInfo 企业成员客户跟进信息,可以参考获取客户详情,但标签信息只会返回企业标签的tag_id,个人标签将不再返回
type FollowUser ¶
type FollowUser struct { // 添加了外部联系人的企业成员 FollowUserInfo // Tags 该成员添加此外部联系人所打标签 Tags []FollowUserTag `json:"tags"` }
FollowUser 添加了外部联系人的企业成员
type FollowUserAddWay ¶
type FollowUserAddWay int
FollowUserAddWay 该成员添加此客户的来源
具体含义详见[来源定义](https://work.weixin.qq.com/api/doc/90000/90135/92114#13878/%E6%9D%A5%E6%BA%90%E5%AE%9A%E4%B9%89)
const ( // 未知来源 FollowUserAddWayUnknown FollowUserAddWay = 0 // 扫描二维码 FollowUserAddWayQRCode FollowUserAddWay = 1 // 搜索手机号 FollowUserAddWayMobile FollowUserAddWay = 2 // 名片分享 FollowUserAddWayCard FollowUserAddWay = 3 // 群聊 FollowUserAddWayGroupChat FollowUserAddWay = 4 // 手机通讯录 FollowUserAddWayAddressBook FollowUserAddWay = 5 // 微信联系人 FollowUserAddWayWeChatContact FollowUserAddWay = 6 // 来自微信的添加好友申请 FollowUserAddWayWeChatFriendApply FollowUserAddWay = 7 // 安装第三方应用时自动添加的客服人员 FollowUserAddWayThirdParty FollowUserAddWay = 8 // 搜索邮箱 FollowUserAddWayEmail FollowUserAddWay = 9 FollowUserAddWayInternalShare FollowUserAddWay = 201 // 管理员/负责人分配 FollowUserAddWayAdmin FollowUserAddWay = 202 )
type FollowUserInfo ¶
type FollowUserInfo struct { // UserID 添加了此外部联系人的企业成员userid UserID string `json:"userid"` // Remark 该成员对此外部联系人的备注 Remark string `json:"remark"` // Description 该成员对此外部联系人的描述 Description string `json:"description"` // Createtime 该成员添加此外部联系人的时间 Createtime int `json:"createtime"` // RemarkCorpName 该成员对此客户备注的企业名称 RemarkCorpName string `json:"remark_corp_name"` // RemarkMobiles 该成员对此客户备注的手机号码,第三方不可获取 RemarkMobiles []string `json:"remark_mobiles"` // AddWay 该成员添加此客户的来源 AddWay FollowUserAddWay `json:"add_way"` // OperUserID 发起添加的userid,如果成员主动添加,为成员的userid;如果是客户主动添加,则为客户的外部联系人userid;如果是内部成员共享/管理员分配,则为对应的成员/管理员userid OperUserID string `json:"oper_userid"` // State 企业自定义的state参数,用于区分客户具体是通过哪个「联系我」添加,由企业通过创建「联系我」方式指定 State string `json:"state"` }
FollowUserInfo 添加了外部联系人的企业成员
type FollowUserTag ¶
type FollowUserTag struct { // GroupName 该成员添加此外部联系人所打标签的分组名称(标签功能需要企业微信升级到2.7.5及以上版本) GroupName string `json:"group_name"` // TagName 该成员添加此外部联系人所打标签名称 TagName string `json:"tag_name"` // Type 该成员添加此外部联系人所打标签类型, 1-企业设置, 2-用户自定义 Type FollowUserTagType `json:"type"` // TagID 标签id TagID string `json:"tag_id"` }
FollowUserTag 该成员添加此外部联系人所打标签
type FollowUserTagType ¶
type FollowUserTagType int
FollowUserTagType 该成员添加此外部联系人所打标签类型
1-企业设置 2-用户自定义
const ( // 企业设置 FollowUserTagTypeWork FollowUserTagType = 1 // 用户自定义 FollowUserTagTypeUser FollowUserTagType = 2 )
type GetAgentPermission ¶ added in v0.2.0
type GetAgentPermission struct {
AppPermissions []string `json:"app_permissions"`
}
type GetAppLicenseInfoReq ¶ added in v0.2.0
type GetAppLicenseInfoReq struct { CorpId string `json:"corpid"` // 企业id SuiteId string `json:"suite_id"` // 套件id }
GetAppLicenseInfoReq 获取应用的接口许可状态
type GetAppLicenseInfoResp ¶ added in v0.2.0
type GetAppQrCodeReq ¶ added in v0.2.0
type GetAppQrCodeReq struct { SuiteId string `json:"suite_id"` // 第三方应用id State string `json:"state"` // 场景值,可为空 Style AppQrcodeStyle `json:"style"` // 二维码类型,可为空,默认为不带说明外框小尺寸 ResultType AppQrcodeResultType `json:"result_type"` // 二维码返回类型,可为空,默认为 buffer }
type GetAppQrCodeResp ¶ added in v0.2.0
type GetAppQrCodeResp struct {
Qrcode string `json:"qrcode"`
}
type GetAppQrcodeReq ¶ added in v0.2.0
type GetAppQrcodeResp ¶ added in v0.2.0
type GetAppQrcodeResp struct {
Qrcode string `json:"qrcode"` // 二维码URL地址
}
type GetAuthInfoReq ¶ added in v0.2.0
type GetAuthInfoResp ¶ added in v0.2.0
type GetAuthInfoResp struct {
CorpAuthInfo
}
type GetCorpTokenReq ¶ added in v0.2.0
type GetCorpTokenResp ¶ added in v0.2.0
type GetCustomerServiceCorpStatisticRsp ¶
type GetCustomerServiceCorpStatisticRsp struct { StatisticList []struct { StartTime uint32 `json:"start_time"` Statistic CustomerServiceCorpStatisticItem `json:"statistic"` } `json:"statistic_list"` }
type GetCustomerServiceServicerStatisticReq ¶
type GetCustomerServiceServicerStatisticReq struct { OpenKfid string `json:"open_kfid"` // 客服账号ID。不传入时返回的数据为接待人员维度汇总的数据 Servicer string `json:"servicer"` // 接待人员的userid。 StartTime int `json:"start_time"` // 起始日期的时间戳,填这一天的0时0分0秒(否则系统自动处理为当天的0分0秒)。取值范围:昨天至前180天 EndTime int `json:"end_time"` // 结束日期的时间戳,填这一天的0时0分0秒(否则系统自动处理为当天的0分0秒)。取值范围:昨天至前180天 }
type GetCustomerServiceServicerStatisticRsp ¶
type GetCustomerServiceServicerStatisticRsp struct { StatisticList []struct { StartTime uint32 `json:"start_time"` Statistic CustomerServiceCorpStatisticItem `json:"statistic"` } `json:"statistic_list"` }
type GetCustomizedAuthUrlReq ¶ added in v0.2.0
type GetCustomizedAuthUrlResp ¶ added in v0.2.0
type GetDeptInfoReq ¶ added in v0.2.0
type GetDeptInfoReq struct {
DeptId int64
}
type GetGroupChatReq ¶
type GetGroupChatResp ¶
type GetGroupChatResp struct { CommonResp GroupChat `json:"group_chat"` }
GetGroupChatResp 获取客户群详情响应 文档:https://work.weixin.qq.com/api/doc/90000/90135/92122#获取客户群详情
type GetGroupMsgSendResultExternalContactReq ¶
type GetGroupMsgSendResultExternalContactReq struct { // Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填 Cursor string `json:"cursor,omitempty"` // Limit 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值 Limit int `json:"limit,omitempty"` // Msgid 群发消息的id,通过<a href="#获取群发记录列表">获取群发记录列表</a>接口返回,必填 Msgid string `json:"msgid"` Userid string `json:"userid"` }
GetGroupMsgSendResultExternalContactReq 获取企业群发成员执行结果请求 文档:https://work.weixin.qq.com/api/doc/90000/90135/93338#获取企业群发成员执行结果
type GetGroupMsgSendResultExternalContactResp ¶
type GetGroupMsgSendResultExternalContactResp struct { CommonResp NextCursor string `json:"next_cursor"` SendList []struct { ChatID string `json:"chat_id"` ExternalUserid string `json:"external_userid"` SendTime int `json:"send_time"` Status int `json:"status"` Userid string `json:"userid"` } `json:"send_list"` }
GetGroupMsgSendResultExternalContactResp 获取企业群发成员执行结果响应 文档:https://work.weixin.qq.com/api/doc/90000/90135/93338#获取企业群发成员执行结果
type GetGroupMsgTaskExternalContactResp ¶
type GetGroupMsgTaskExternalContactResp struct { CommonResp NextCursor string `json:"next_cursor"` TaskList []struct { SendTime int `json:"send_time"` Status int `json:"status"` Userid string `json:"userid"` } `json:"task_list"` }
GetGroupMsgTaskExternalContactResp 获取群发成员发送任务列表响应 文档:https://work.weixin.qq.com/api/doc/90000/90135/93338#获取群发成员发送任务列表
type GetOAApprovalInfoReq ¶
type GetOAApprovalInfoReq struct { // StartTime 审批单提交的时间范围,开始时间,UNix时间戳 StartTime time.Time // EndTime 审批单提交的时间范围,结束时间,Unix时间戳 EndTime time.Time // Cursor 分页查询游标,默认为0,后续使用返回的next_cursor进行分页拉取 Cursor int // Size 一次请求拉取审批单数量,默认值为100,上限值为100 Size uint32 // Filters 筛选条件,可对批量拉取的审批申请设置约束条件,支持设置多个条件 Filters []OAApprovalInfoFilter }
GetOAApprovalInfoReq 批量获取审批单号请求
type GetPermanentCodeReq ¶ added in v0.2.0
type GetPermanentCodeReq struct {
AuthCode string `json:"auth_code"`
}
type GetPermanentCodeResp ¶ added in v0.2.0
type GetPermanentCodeResp struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` PermanentCode string `json:"permanent_code"` State string `json:"state"` CorpAuthInfo }
type GetSuiteTicket ¶ added in v0.2.0
type GetUserInfoThirdReq ¶ added in v0.9.0
type GetUserInfoThirdReq struct {
Code string `json:"code"`
}
type GetUserInfoThirdResp ¶ added in v0.9.0
type GroupChat ¶
type GroupChat struct { AdminList []struct { Userid string `json:"userid"` } `json:"admin_list"` ChatID string `json:"chat_id"` CreateTime int `json:"create_time"` MemberList []struct { Invitor struct { Userid string `json:"userid"` } `json:"invitor"` JoinScene int `json:"join_scene"` JoinTime int `json:"join_time"` Type int `json:"type"` Unionid string `json:"unionid"` Userid string `json:"userid"` Name string `json:"name"` // 在群聊中的名称 GroupNickname string `json:"group_nickname"` State string `json:"state"` } `json:"member_list"` Name string `json:"name"` Notice string `json:"notice"` Owner string `json:"owner"` }
type GroupChatAddJoinWayReq ¶
type GroupChatAddJoinWayReq struct { Scene GroupChatJoinWayScene `json:"scene"` Remark string `json:"remark"` AutoCreateRoom GroupChatJoinWayAutoCreate `json:"auto_create_room"` RoomBaseName string `json:"room_base_name"` RoomBaseId int `json:"room_base_id"` ChatIdList []string `json:"chat_id_list"` State string `json:"state"` }
type GroupChatAddJoinWayResp ¶
type GroupChatAddJoinWayResp struct { CommonResp ConfigId string `json:"config_id"` }
type GroupChatDelJoinWayReq ¶
type GroupChatDelJoinWayReq struct {
ConfigId string `json:"config_id"`
}
type GroupChatGetJoinWay ¶
type GroupChatGetJoinWay struct { ConfigId string `json:"config_id"` Scene int `json:"scene"` Remark string `json:"remark"` AutoCreateRoom GroupChatJoinWayAutoCreate `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"` }
type GroupChatGetJoinWayReq ¶
type GroupChatGetJoinWayReq struct {
ConfigId string `json:"config_id"`
}
type GroupChatGetJoinWayResp ¶
type GroupChatGetJoinWayResp struct { CommonResp JoinWay GroupChatGetJoinWay `json:"join_way"` }
type GroupChatJoinWayAutoCreate ¶
type GroupChatJoinWayAutoCreate int
const ( GroupChatJoinWayAutoCreateFalse GroupChatJoinWayAutoCreate = 0 GroupChatJoinWayAutoCreateTrue GroupChatJoinWayAutoCreate = 1 )
type GroupChatJoinWayScene ¶
type GroupChatJoinWayScene int
GroupChatJoinWayScene 群活码场景 1-在小程序中联系 2-通过二维码联系
const ( // GroupChatJoinWaySceneMicroApp 在小程序中联系 GroupChatJoinWaySceneMicroApp GroupChatJoinWayScene = 1 // GroupChatJoinWaySceneQrcode 通过二维码联系 GroupChatJoinWaySceneQrcode GroupChatJoinWayScene = 2 )
type GroupChatUpdateJoinWayReq ¶
type GroupChatUpdateJoinWayReq struct { ConfigId string `json:"config_id"` Scene int `json:"scene"` Remark string `json:"remark"` AutoCreateRoom GroupChatJoinWayAutoCreate `json:"auto_create_room"` RoomBaseName string `json:"room_base_name"` RoomBaseId int `json:"room_base_id"` ChatIdList []string `json:"chat_id_list"` State string `json:"state"` }
type HTTPHandler ¶
type HTTPHandler struct {
// contains filtered or unexported fields
}
func (*HTTPHandler) ServeHTTP ¶
func (h *HTTPHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type ImageMessageExtras ¶
type ImageMessageExtras interface { // GetPicURL 返回图片消息的图片链接 URL。 GetPicURL() string // GetMediaID 返回图片消息的图片媒体文件 ID。 // // 可以调用【获取媒体文件】接口拉取,仅三天内有效。 GetMediaID() string // contains filtered or unexported methods }
ImageMessageExtras 图片消息的参数。
type JSCodeSession ¶
type JSCodeSession struct { CorpID string `json:"corpid"` UserID string `json:"userid"` SessionKey string `json:"session_key"` }
JSCodeSession 临时登录凭证
type LinkMessageExtras ¶
type LinkMessageExtras interface { // GetTitle 返回链接消息的标题。 GetTitle() string // GetDescription 返回链接消息的描述。 GetDescription() string // GetURL 返回链接消息的跳转 URL。 GetURL() string // GetPicURL 返回链接消息的封面缩略图 URL。 GetPicURL() string // contains filtered or unexported methods }
LinkMessageExtras 链接消息的参数。
type ListContactWayReq ¶
type ListContactWayReq struct { // 开始时间秒级时间戳 默认90天前 StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` Cursor string `json:"cursor"` // 默认100 最多1000 Limit int `json:"limit"` }
ListContactWayReq 企业已配置的「联系我」方式列表
type ListGroupChatReq ¶
type ListGroupChatReq struct { StatusFilter int `json:"status_filter"` OwnerFilter struct { UseridList []string `json:"userid_list"` } `json:"owner_filter"` Cursor string `json:"cursor"` Limit int `json:"limit"` }
ListGroupChatReq
type ListGroupChatResp ¶
type ListGroupChatResp struct { CommonResp GroupChatList []struct { ChatID string `json:"chat_id"` Status int `json:"status"` } `json:"group_chat_list"` NextCursor string `json:"next_cursor"` }
ListGroupChatResp 获取客户群列表响应 文档:https://work.weixin.qq.com/api/doc/90000/90135/92120#获取客户群列表
type LocationMessageExtras ¶
type LocationMessageExtras interface { // GetLatitude 返回位置消息的纬度(角度值;北纬为正)。 GetLatitude() float64 // GetLongitude 返回位置消息的经度(角度值;东经为正)。 GetLongitude() float64 // GetScale 返回位置消息的地图缩放大小。 GetScale() int // GetLabel 返回位置消息的地理位置信息。 GetLabel() string // contains filtered or unexported methods }
LocationMessageExtras 位置消息的参数。
type LowLevelEnvelopeHandler ¶
type LowLevelEnvelopeHandler struct {
// contains filtered or unexported fields
}
func (*LowLevelEnvelopeHandler) OnIncomingEnvelope ¶
func (h *LowLevelEnvelopeHandler) OnIncomingEnvelope(rx envelope.Envelope) error
type Media ¶
type Media struct {
// contains filtered or unexported fields
}
func NewMediaFromBuffer ¶
NewMediaFromBuffer 从内存创建一个欲上传的素材对象
func NewMediaFromFile ¶
NewMediaFromFile 从操作系统级文件创建一个欲上传的素材对象
type MediaInfoRsp ¶
type MediaUploadResult ¶
type MediaUploadResult struct { // Type 媒体文件类型,分别有图片(image)、语音(voice)、视频(video),普通文件(file) Type string // MediaID 媒体文件上传后获取的唯一标识,3天内有效 MediaID string // CreatedAt 媒体文件上传时间戳 CreatedAt time.Time }
MediaUploadResult 临时素材上传结果
type MediaUploader ¶
type MediaUploader func(media *Media) (*MediaUploadResult, error)
type MessageReq ¶
type MessageReq struct { ToUser []string ToParty []string ToTag []string ChatID string AgentID int64 MsgType string Content map[string]interface{} IsSafe bool }
MessageReq 消息发送请求
type MessageType ¶
type MessageType string
MessageType 消息类型
const MessageTypeEvent MessageType = "event"
MessageTypeEvent 事件消息
const MessageTypeImage MessageType = "image"
MessageTypeImage 图片消息
const MessageTypeLink MessageType = "link"
MessageTypeLink 链接消息
const MessageTypeLocation MessageType = "location"
MessageTypeLocation 位置消息
const MessageTypeText MessageType = "text"
MessageTypeText 文本消息
const MessageTypeVideo MessageType = "video"
MessageTypeVideo 视频消息
const MessageTypeVoice MessageType = "voice"
MessageTypeVoice 语音消息
type MiniProgram ¶
type MiniProgram struct { // Appid 小程序appid,必须是关联到企业的小程序应用,必填 Appid string `json:"appid" comment:"小程序 appid"` // Page 小程序page路径,必填 Page string `json:"page" comment:"小程序路径"` // PicMediaID 小程序消息封面的mediaid,封面图建议尺寸为520*416,必填 PicMediaID string `json:"pic_media_id" comment:"小程序封面图"` // Title 小程序消息标题,最长为64字节,必填 Title string `json:"title" comment:"小程序标题"` }
type MsgAuditEdition ¶
type MsgAuditEdition uint8
MsgAuditEdition 会话内容存档版本
const ( // MsgAuditEditionOffice 会话内容存档办公版 MsgAuditEditionOffice MsgAuditEdition = 1 // MsgAuditEditionService 会话内容存档服务版 MsgAuditEditionService MsgAuditEdition = 2 // MsgAuditEditionEnterprise 会话内容存档企业版 MsgAuditEditionEnterprise MsgAuditEdition = 3 )
type MsgAuditGroupChat ¶
type MsgAuditGroupChat struct { // Members roomid对应的群成员列表 Members []MsgAuditGroupChatMember // RoomName roomid对应的群名称 RoomName string // Creator roomid对应的群创建者,userid Creator string // RoomCreateTime roomid对应的群创建时间 RoomCreateTime time.Time // Notice roomid对应的群公告 Notice string }
MsgAuditGroupChat 获取会话内容存档内部群信息
type MsgAuditGroupChatMember ¶
type MsgAuditGroupChatMember struct { // MemberID roomid群成员的id,userid MemberID int // JoinTime roomid群成员的入群时间 JoinTime time.Time }
MsgAuditGroupChatMember 获取会话内容存档内部群成员
type OAApplyEvent ¶
type OAApplyEvent struct { // CreatorUserID 申请人userid,此审批申请将以此员工身份提交,申请人需在应用可见范围内 CreatorUserID string `json:"creator_userid"` // TemplateID 模板id。可在“获取审批申请详情”、“审批状态变化回调通知”中获得,也可在审批模板的模板编辑页面链接中获得。暂不支持通过接口提交[打卡补卡][调班]模板审批单。 TemplateID string `json:"template_id"` // UseTemplateApprover 审批人模式:0-通过接口指定审批人、抄送人(此时approver、notifyer等参数可用); 1-使用此模板在管理后台设置的审批流程,支持条件审批。默认为0 UseTemplateApprover uint8 `json:"use_template_approver"` // Approver 审批流程信息,用于指定审批申请的审批流程,支持单人审批、多人会签、多人或签,可能有多个审批节点,仅use_template_approver为0时生效。 Approver []OAApprover `json:"approver"` // Notifier 抄送人节点userid列表,仅use_template_approver为0时生效。 Notifier []string `json:"notifyer"` // NotifyType 抄送方式:1-提单时抄送(默认值); 2-单据通过后抄送;3-提单和单据通过后抄送。仅use_template_approver为0时生效。 NotifyType *uint8 `json:"notify_type"` // ApplyData 审批申请数据,可定义审批申请中各个控件的值,其中必填项必须有值,选填项可为空,数据结构同“获取审批申请详情”接口返回值中同名参数“apply_data” ApplyData OAContents `json:"apply_data"` // SummaryList 摘要信息,用于显示在审批通知卡片、审批列表的摘要信息,最多3行 SummaryList []OASummaryList `json:"summary_list"` }
OAApplyEvent 提交审批申请
type OAApprovalDetail ¶
type OAApprovalDetail struct { // SpNo 审批编号 SpNo string `json:"sp_no"` // SpName 审批申请类型名称(审批模板名称) SpName string `json:"sp_name"` // SpStatus 申请单状态:1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付 SpStatus uint8 `json:"sp_status"` // TemplateID 审批模板id。可在“获取审批申请详情”、“审批状态变化回调通知”中获得,也可在审批模板的模板编辑页面链接中获得。 TemplateID string `json:"template_id"` // ApplyTime 审批申请提交时间,Unix时间戳 ApplyTime int `json:"apply_time"` // Applicant 申请人信息 Applicant OAApprovalDetailApplicant `json:"applyer"` // SpRecord 审批流程信息,可能有多个审批节点。 SpRecord []OAApprovalDetailSpRecord `json:"sp_record"` // Notifier 抄送信息,可能有多个抄送节点 Notifier []OAApprovalDetailNotifier `json:"notifyer"` // ApplyData 审批申请数据 ApplyData OAContents `json:"apply_data"` // Comments 审批申请备注信息,可能有多个备注节点 Comments []OAApprovalDetailComment `json:"comments"` }
OAApprovalDetail 审批申请详情
type OAApprovalDetailApplicant ¶
type OAApprovalDetailApplicant struct { // UserID 申请人userid UserID string `json:"userid"` // PartyID 申请人所在部门id PartyID string `json:"partyid"` }
OAApprovalDetailApplicant 审批申请详情申请人信息
type OAApprovalDetailComment ¶
type OAApprovalDetailComment struct { // CommentUserInfo 备注人信息 CommentUserInfo OAApprovalDetailCommentUserInfo `json:"commentUserInfo"` // CommentTime 备注提交时间戳,Unix时间戳 CommentTime int `json:"commenttime"` // CommentTontent 备注文本内容 CommentTontent string `json:"commentcontent"` // CommentID 备注id CommentID string `json:"commentid"` // MediaID 备注附件id,可能有多个,media_id具体使用请参考:文档-获取临时素材 MediaID []string `json:"media_id"` }
OAApprovalDetailComment 审批申请备注信息,可能有多个备注节点
type OAApprovalDetailCommentUserInfo ¶
type OAApprovalDetailCommentUserInfo struct { // UserID 备注人userid UserID string `json:"userid"` }
OAApprovalDetailCommentUserInfo 备注人信息
type OAApprovalDetailNotifier ¶
type OAApprovalDetailNotifier struct { // UserID 节点抄送人userid UserID string `json:"userid"` }
OAApprovalDetailNotifier 抄送信息,可能有多个抄送节点
type OAApprovalDetailSpRecord ¶
type OAApprovalDetailSpRecord struct { // SpStatus 审批节点状态:1-审批中;2-已同意;3-已驳回;4-已转审 SpStatus uint8 `json:"sp_status"` // ApproverAttr 节点审批方式:1-或签;2-会签 ApproverAttr uint8 `json:"approverattr"` // Details 审批节点详情,一个审批节点有多个审批人 Details []OAApprovalDetailSpRecordDetail `json:"details"` }
OAApprovalDetailSpRecord 审批流程信息,可能有多个审批节点。
type OAApprovalDetailSpRecordDetail ¶
type OAApprovalDetailSpRecordDetail struct { // Approver 分支审批人 Approver OAApprovalDetailSpRecordDetailApprover `json:"approver"` // Speech 审批意见 Speech string `json:"speech"` // SpStatus 分支审批人审批状态:1-审批中;2-已同意;3-已驳回;4-已转审 SpStatus uint8 `json:"sp_status"` // SpTime 节点分支审批人审批操作时间戳,0表示未操作 SpTime int `json:"sptime"` // MediaID 节点分支审批人审批意见附件,media_id具体使用请参考:文档-获取临时素材 MediaID []string `json:"media_id"` }
OAApprovalDetailSpRecordDetail 审批节点详情,一个审批节点有多个审批人
type OAApprovalDetailSpRecordDetailApprover ¶
type OAApprovalDetailSpRecordDetailApprover struct { // UserID 分支审批人userid UserID string `json:"userid"` }
OAApprovalDetailSpRecordDetailApprover 分支审批人
type OAApprovalInfo ¶
type OAApprovalInfo struct { // SpNo 审批编号 SpNo string `xml:"SpNo"` // SpName 审批申请类型名称(审批模板名称) SpName string `xml:"SpName"` // SpStatus 申请单状态:1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付 SpStatus string `xml:"SpStatus"` // TemplateID 审批模板id。可在“获取审批申请详情”、“审批状态变化回调通知”中获得,也可在审批模板的模板编辑页面链接中获得。 TemplateID string `xml:"TemplateId"` // ApplyTime 审批申请提交时间,Unix时间戳 ApplyTime string `xml:"ApplyTime"` // Applicant 申请人信息 Applicant OAApprovalInfoApplicant `xml:"Applyer"` // SpRecord 审批流程信息,可能有多个审批节点。 SpRecord []OAApprovalInfoSpRecord `xml:"SpRecord"` // Notifier 抄送信息,可能有多个抄送节点 Notifier OAApprovalInfoNotifier `xml:"Notifyer"` // Comments 审批申请备注信息,可能有多个备注节点 Comments []OAApprovalInfoComment `xml:"Comments"` // StatusChangeEvent 审批申请状态变化类型:1-提单;2-同意;3-驳回;4-转审;5-催办;6-撤销;8-通过后撤销;10-添加备注 StatusChangeEvent string `xml:"StatuChangeEvent"` }
OAApprovalInfo 审批申请状态变化回调通知
type OAApprovalInfoApplicant ¶
type OAApprovalInfoApplicant struct { // UserID 申请人userid UserID string `xml:"UserId"` // Party 申请人所在部门pid Party string `xml:"Party"` }
OAApprovalInfoApplicant 申请人信息
type OAApprovalInfoComment ¶
type OAApprovalInfoComment struct { // CommentUserInfo 备注人信息 CommentUserInfo OAApprovalInfoCommentUserInfo `xml:"CommentUserInfo"` // CommentTime 备注提交时间 CommentTime string `xml:"CommentTime"` // CommentContent 备注文本内容 CommentContent string `xml:"CommentContent"` // CommentID 备注id CommentID string `xml:"CommentId"` // Attach 备注意见附件,值是附件media_id具体使用请参考:文档-获取临时素材 Attach []string `xml:"Attach"` }
OAApprovalInfoComment 审批申请备注信息,可能有多个备注节点
type OAApprovalInfoCommentUserInfo ¶
type OAApprovalInfoCommentUserInfo struct { // UserID 备注人userid UserID string `xml:"UserId"` }
OAApprovalInfoCommentUserInfo 备注人信息
type OAApprovalInfoFilter ¶
type OAApprovalInfoFilter struct { // Key 筛选类型,包括:template_id - 模板类型/模板id;creator - 申请人;department - 审批单提单者所在部门;sp_status - 审批状态。注意:仅“部门”支持同时配置多个筛选条件。不同类型的筛选条件之间为“与”的关系,同类型筛选条件之间为“或”的关系 Key OAApprovalInfoFilterKey `json:"key"` // Value 筛选值,对应为:template_id - 模板id;creator - 申请人userid;department - 所在部门id;sp_status - 审批单状态(1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付) Value string `json:"value"` }
OAApprovalInfoFilter 备注人信息
type OAApprovalInfoFilterKey ¶
type OAApprovalInfoFilterKey string
OAApprovalInfoFilterKey 拉取审批筛选类型
const OAApprovalInfoFilterKeyCreator OAApprovalInfoFilterKey = "creator"
OAApprovalInfoFilterKeyCreator 申请人
const OAApprovalInfoFilterKeyDepartment OAApprovalInfoFilterKey = "department"
OAApprovalInfoFilterKeyDepartment 审批单提单者所在部门
const OAApprovalInfoFilterKeySpStatus OAApprovalInfoFilterKey = "sp_status"
OAApprovalInfoFilterKeySpStatus 审批状态
const OAApprovalInfoFilterKeyTemplateID OAApprovalInfoFilterKey = "template_id"
OAApprovalInfoFilterKeyTemplateID 模板类型
type OAApprovalInfoNotifier ¶
type OAApprovalInfoNotifier struct { // UserID 节点抄送人userid UserID string `xml:"UserId"` }
OAApprovalInfoNotifier 抄送信息,可能有多个抄送节点
type OAApprovalInfoSpRecord ¶
type OAApprovalInfoSpRecord struct { // SpStatus 审批节点状态:1-审批中;2-已同意;3-已驳回;4-已转审 SpStatus string `xml:"SpStatus"` // ApproverAttr 节点审批方式:1-或签;2-会签 ApproverAttr string `xml:"ApproverAttr"` // Details 审批节点详情。当节点为标签或上级时,一个节点可能有多个分支 Details []OAApprovalInfoSpRecordDetail `xml:"Details"` }
OAApprovalInfoSpRecord 审批流程信息,可能有多个审批节点。
type OAApprovalInfoSpRecordDetail ¶
type OAApprovalInfoSpRecordDetail struct { // Approver 分支审批人 Approver OAApprovalInfoSpRecordDetailApprover `xml:"Approver"` // Speech 审批意见字段 Speech string `xml:"Speech"` // SpStatus 分支审批人审批状态:1-审批中;2-已同意;3-已驳回;4-已转审 SpStatus string `xml:"SpStatus"` // SpTime 节点分支审批人审批操作时间,0为尚未操作 SpTime string `xml:"SpTime"` // Attach 节点分支审批人审批意见附件,赋值为media_id具体使用请参考:文档-获取临时素材 Attach []string `xml:"Attach"` }
OAApprovalInfoSpRecordDetail 审批节点详情。当节点为标签或上级时,一个节点可能有多个分支
type OAApprovalInfoSpRecordDetailApprover ¶
type OAApprovalInfoSpRecordDetailApprover struct { // UserID 分支审批人userid UserID string `xml:"UserId"` }
OAApprovalInfoSpRecordDetailApprover 分支审批人
type OAApprover ¶
type OAApprover struct { // Attr 节点审批方式:1-或签;2-会签,仅在节点为多人审批时有效 Attr uint8 `json:"attr"` // UserID 审批节点审批人userid列表,若为多人会签、多人或签,需填写每个人的userid UserID []string `json:"userid"` }
OAApprover 审批流程信息
type OAContent ¶
type OAContent struct { // Control 控件类型:Text-文本;Textarea-多行文本;Number-数字;Money-金额;Date-日期/日期+时间;Selector-单选/多选;;Contact-成员/部门;Tips-说明文字;File-附件;Table-明细; Control OAControl `json:"control"` // ID 控件id:控件的唯一id,可通过“获取审批模板详情”接口获取 ID string `json:"id"` // Title 控件名称 ,若配置了多语言则会包含中英文的控件名称 Title []OAText `json:"title"` // Value 控件值 ,需在此为申请人在各个控件中填写内容不同控件有不同的赋值参数,具体说明详见附录。模板配置的控件属性为必填时,对应value值需要有值。 Value OAContentValue `json:"value"` }
OAContent 审批申请详情,由多个表单控件及其内容组成,其中包含需要对控件赋值的信息
type OAContentDate ¶
type OAContentDate struct { // Type 时间展示类型:day-日期;hour-日期+时间 ,和对应模板控件属性一致 Type string `json:"type"` // Timestamp 时间戳-字符串类型,在此填写日期/日期+时间控件的选择值,以此为准 Timestamp string `json:"s_timestamp"` }
OAContentDate 日期/日期+时间内容
type OAContentDateRange ¶
type OAContentDateRange struct { // NewBegin 开始时间,unix时间戳 NewBegin int `json:"new_begin"` // NewEnd 结束时间,unix时间戳 NewEnd int `json:"new_end"` // NewDuration 时长范围,单位秒 NewDuration int `json:"new_duration"` }
OAContentDateRange 时长组件
type OAContentDepartment ¶
type OAContentDepartment struct { // OpenAPIID 所选部门id OpenAPIID string `json:"openapi_id"` // Name 所选部门名 Name string `json:"name"` }
OAContentDepartment 所选部门内容,即申请人在此控件选择的部门,多选模式下可能有多个
type OAContentFile ¶
type OAContentFile struct { // FileID 文件id,该id为临时素材上传接口返回的的media_id,注:提单后将作为单据内容转换为长期文件存储;目前一个审批申请单,全局仅支持上传6个附件,否则将失败。 FileID string `json:"file_id"` }
OAContentFile 附件
type OAContentFormula ¶
type OAContentFormula struct { // Value 公式的值,提交表单时无需填写,后台自动计算 Value string `json:"value"` }
OAContentFormula 公式控件
type OAContentLocation ¶
type OAContentLocation struct { // Latitude 纬度,精确到6位小数 Latitude string `json:"latitude"` // Longitude 经度,精确到6位小数 Longitude string `json:"longitude"` // Title 地点标题 Title string `json:"title"` // Address 地点详情地址 Address string `json:"address"` // Time 选择地点的时间 Time int `json:"time"` }
OAContentLocation 位置控件
type OAContentMember ¶
type OAContentMember struct { // UserID 所选成员的userid UserID string `json:"userid"` // Name 成员名 Name string `json:"name"` }
OAContentMember 所选成员内容,即申请人在此控件选择的成员,多选模式下可以有多个
type OAContentRelatedApproval ¶
type OAContentRelatedApproval struct { // SpNo 关联审批单的审批单号 SpNo string `json:"sp_no"` }
OAContentRelatedApproval 关联审批单控件
type OAContentSelector ¶
type OAContentSelector struct { // Type 选择方式:single-单选;multi-多选 Type string `json:"type"` // Options 多选选项,多选属性的选择控件允许输入多个 Options []OAContentSelectorOption `json:"options"` }
OAContentSelector 类型标志,单选/多选控件的config中会包含此参数
type OAContentSelectorOption ¶
type OAContentSelectorOption struct { // Key 选项key,可通过“获取审批模板详情”接口获得 Key string `json:"key"` }
OAContentSelectorOption 多选选项,多选属性的选择控件允许输入多个
type OAContentTableList ¶
type OAContentTableList struct { // List 子明细列表,在此填写子明细的所有子控件的值,子控件的数据结构同一般控件 List []OAContent `json:"list"` }
OAContentTableList 子明细列表,在此填写子明细的所有子控件的值,子控件的数据结构同一般控件
type OAContentVacation ¶
type OAContentVacation struct { // Selector 请假类型,所选选项与假期管理关联,为假期管理中的假期类型 Selector OAContentSelector `json:"selector"` // Attendance 假勤组件 Attendance OAContentVacationAttendance `json:"attendance"` }
OAContentVacation 请假内容,即申请人在此组件内选择的请假信息
type OAContentVacationAttendance ¶
type OAContentVacationAttendance struct { // DateRange 假勤组件时间选择范围 DateRange OAContentVacationAttendanceDateRange `json:"date_range"` // Type 假勤组件类型:1-请假;3-出差;4-外出;5-加班 Type uint8 `json:"type"` }
OAContentVacationAttendance 假勤组件
type OAContentVacationAttendanceDateRange ¶
type OAContentVacationAttendanceDateRange struct { // Type 时间展示类型:day-日期;hour-日期+时间 Type string `json:"type"` // 时长范围 OAContentDateRange }
OAContentVacationAttendanceDateRange 假勤组件时间选择范围
type OAContentValue ¶
type OAContentValue struct { // Text 文本/多行文本控件(control参数为Text或Textarea) Text string `json:"text"` // Number 数字控件(control参数为Number) Number string `json:"new_number"` // Money 金额控件(control参数为Money) Money string `json:"new_money"` // Date 日期/日期+时间控件(control参数为Date) Date OAContentDate `json:"date"` // Selector 单选/多选控件(control参数为Selector) Selector OAContentSelector `json:"selector"` // Members 成员控件(control参数为Contact,且value参数为members) Members []OAContentMember `json:"members"` // Departments 部门控件(control参数为Contact,且value参数为departments) Departments []OAContentDepartment `json:"departments"` // Files 附件控件(control参数为File,且value参数为files) Files []OAContentFile `json:"files"` // Table 明细控件(control参数为Table) Table []OAContentTableList `json:"children"` // Vacation 假勤组件-请假组件(control参数为Vacation) Vacation OAContentVacation `json:"vacation"` // Location 位置控件(control参数为Location,且value参数为location) Location OAContentLocation `json:"location"` // RelatedApproval 关联审批单控件(control参数为RelatedApproval,且value参数为related_approval) RelatedApproval []OAContentRelatedApproval `json:"related_approval"` // Formula 公式控件(control参数为Formula,且value参数为formula) Formula OAContentFormula `json:"formula"` // DateRange 时长组件(control参数为DateRange,且value参数为date_range) DateRange OAContentDateRange `json:"date_range"` }
OAContentValue 控件值 ,需在此为申请人在各个控件中填写内容不同控件有不同的赋值参数,具体说明详见附录。模板配置的控件属性为必填时,对应value值需要有值。
type OAContents ¶
type OAContents struct { // Contents 审批申请详情,由多个表单控件及其内容组成,其中包含需要对控件赋值的信息 Contents []OAContent `json:"contents"` }
OAContents 审批申请详情,由多个表单控件及其内容组成,其中包含需要对控件赋值的信息
type OAControl ¶
type OAControl string
OAControl 控件类型
const OAControlAttendance OAControl = "Attendance"
OAControlAttendance 假勤组件-出差/外出/加班组件
const OAControlContact OAControl = "Contact"
OAControlContact 成员/部门控件
const OAControlDate OAControl = "Date"
OAControlDate 日期/日期+时间控件
const OAControlDateRange OAControl = "DateRange"
OAControlDateRange 时长控件
const OAControlFile OAControl = "File"
OAControlFile 附件控件
const OAControlFormula OAControl = "Formula"
OAControlFormula 公式控件
const OAControlLocation OAControl = "Location"
OAControlLocation 位置控件
const OAControlMoney OAControl = "Money"
OAControlMoney 金额
const OAControlNumber OAControl = "Number"
OAControlNumber 数字
const OAControlRelatedApproval OAControl = "RelatedApproval"
OAControlRelatedApproval 关联审批单控件
const OAControlSelector OAControl = "Selector"
OAControlSelector 单选/多选控件
const OAControlTable OAControl = "Table"
OAControlTable 明细控件
const OAControlText OAControl = "Text"
OAControlText 文本
const OAControlTextarea OAControl = "Textarea"
OAControlTextarea 多行文本
const OAControlTips OAControl = "Tips"
OAControlTips 说明文字控件
const OAControlVacation OAControl = "Vacation"
OAControlVacation 假勤组件-请假组件
type OASummaryList ¶
type OASummaryList struct { // SummaryInfo 摘要行信息,用于定义某一行摘要显示的内容 SummaryInfo []OAText `json:"summary_info"` }
OASummaryList 摘要行信息,用于定义某一行摘要显示的内容
type OATemplateControl ¶
type OATemplateControl struct { // Property 模板控件属性,包含了模板内控件的各种属性信息 Property OATemplateControlProperty `json:"property"` // Config 模板控件配置,包含了部分控件类型的附加类型、属性,详见附录说明。目前有配置信息的控件类型有:Date-日期/日期+时间;Selector-单选/多选;Contact-成员/部门;Table-明细;Attendance-假勤组件(请假、外出、出差、加班) Config OATemplateControlConfig `json:"config"` }
OATemplateControl 模板控件信息
type OATemplateControlConfig ¶
type OATemplateControlConfig struct { // Date Date控件(日期/日期+时间控件) Date OATemplateControlConfigDate `json:"date"` // Selector Selector控件(单选/多选控件) Selector OATemplateControlConfigSelector `json:"selector"` // Contact Contact控件(成员/部门控件) Contact OATemplateControlConfigContact `json:"contact"` // Table Table(明细控件) Table OATemplateControlConfigTable `json:"table"` // Attendance Attendance控件(假勤控件) Attendance OATemplateControlConfigAttendance `json:"attendance"` }
OATemplateControlConfig 模板控件配置
type OATemplateControlConfigAttendance ¶
type OATemplateControlConfigAttendance struct { // DateRange 假期控件属性 DateRange OATemplateControlConfigAttendanceDateRange `json:"date_range"` // Type 假勤控件类型:1-请假,3-出差,4-外出,5-加班 Type uint8 `json:"type"` }
OATemplateControlConfigAttendance 类型标志,假勤控件的config中会包含此参数
type OATemplateControlConfigAttendanceDateRange ¶
type OATemplateControlConfigAttendanceDateRange struct { // Type 时间刻度:hour-精确到分钟, halfday—上午/下午 Type string `json:"type"` }
OATemplateControlConfigAttendanceDateRange 假期控件属性
type OATemplateControlConfigContact ¶
type OATemplateControlConfigContact struct { // Type 选择类型:single-单选;multi-多选 Type string `json:"type"` // Mode 选择对象:user-成员;department-部门 Mode string `json:"mode"` }
OATemplateControlConfigContact 类型标志,单选/多选控件的config中会包含此参数
type OATemplateControlConfigDate ¶
type OATemplateControlConfigDate struct { // Type 时间展示类型:day-日期;hour-日期+时间 Type string `json:"type"` }
OATemplateControlConfigDate 类型标志,日期/日期+时间控件的config中会包含此参数
type OATemplateControlConfigSelector ¶
type OATemplateControlConfigSelector struct { // Type 选择类型:single-单选;multi-多选 Type string `json:"type"` // Options 选项,包含单选/多选控件中的所有选项,可能有多个 Options []OATemplateControlConfigSelectorOption `json:"options"` }
OATemplateControlConfigSelector 类型标志,单选/多选控件的config中会包含此参数
type OATemplateControlConfigSelectorOption ¶
type OATemplateControlConfigSelectorOption struct { // Key 选项key,选项的唯一id,可用于发起审批申请,为单选/多选控件赋值 Key string `json:"key"` // Value 选项值,若配置了多语言则会包含中英文的选项值,默认为zh_CN中文 Value []OAText `json:"value"` }
OATemplateControlConfigSelectorOption 选项,包含单选/多选控件中的所有选项,可能有多个
type OATemplateControlConfigTable ¶
type OATemplateControlConfigTable struct { // Children 明细内的子控件,内部结构同controls Children []OATemplateControl `json:"children"` }
OATemplateControlConfigTable 类型标志,明细控件的config中会包含此参数
type OATemplateControlConfigVacation ¶
type OATemplateControlConfigVacation struct { // Item 单个假期类型属性 Item []OATemplateControlConfigVacationItem `json:"item"` }
OATemplateControlConfigVacation 类型标志,假勤控件的config中会包含此参数
type OATemplateControlConfigVacationItem ¶
type OATemplateControlConfigVacationItem struct { // ID 假期类型标识id ID int `json:"id"` // Name 假期类型名称,默认zh_CN中文名称 Name []OAText `json:"name"` }
OATemplateControlConfigVacationItem 类型标志,假勤控件的config中会包含此参数
type OATemplateControlProperty ¶
type OATemplateControlProperty struct { // Control 模板控件属性,包含了模板内控件的各种属性信息 Control OAControl `json:"control"` // ID 模板控件配置,包含了部分控件类型的附加类型、属性,详见附录说明。目前有配置信息的控件类型有:Date-日期/日期+时间;Selector-单选/多选;Contact-成员/部门;Table-明细;Attendance-假勤组件(请假、外出、出差、加班) ID string `json:"id"` // Title 模板控件配置,包含了部分控件类型的附加类型、属性,详见附录说明。目前有配置信息的控件类型有:Date-日期/日期+时间;Selector-单选/多选;Contact-成员/部门;Table-明细;Attendance-假勤组件(请假、外出、出差、加班) Title []OAText `json:"title"` // Placeholder 模板控件配置,包含了部分控件类型的附加类型、属性,详见附录说明。目前有配置信息的控件类型有:Date-日期/日期+时间;Selector-单选/多选;Contact-成员/部门;Table-明细;Attendance-假勤组件(请假、外出、出差、加班) Placeholder []OAText `json:"placeholder"` // Require 是否必填:1-必填;0-非必填 Require uint8 `json:"require"` // UnPrint 是否参与打印:1-不参与打印;0-参与打印 UnPrint uint8 `json:"un_print"` }
OATemplateControlProperty 模板控件属性
type OATemplateControls ¶
type OATemplateControls struct { // Controls 模板名称,若配置了多语言则会包含中英文的模板名称,默认为zh_CN中文 Controls []OATemplateControl `json:"controls"` }
OATemplateControls 模板控件数组。模板详情由多个不同类型的控件组成,控件类型详细说明见附录。
type OATemplateDetail ¶
type OATemplateDetail struct { // TemplateNames 模板名称,若配置了多语言则会包含中英文的模板名称,默认为zh_CN中文 TemplateNames []OAText `json:"template_names"` // TemplateContent 模板控件信息 TemplateContent OATemplateControls `json:"template_content"` // Vacation Vacation控件(假勤控件) Vacation OATemplateControlConfigVacation `json:"vacation_list"` }
OATemplateDetail 审批模板详情
type Recipient ¶
type Recipient struct { // UserIDs 成员ID列表(消息接收者),最多支持1000个 UserIDs []string // PartyIDs 部门ID列表,最多支持100个。 PartyIDs []string // TagIDs 标签ID列表,最多支持100个 TagIDs []string // ChatID 应用关联群聊ID,仅用于【发送消息到群聊会话】 ChatID string }
Recipient 消息收件人定义
type RegisterCodeInfo ¶ added in v0.2.0
type ReqGetCustomerAcquisitionDetail ¶
type ReqGetCustomerAcquisitionDetail struct {
LinkId string `json:"link_id"`
}
type ReqGetGroupmsgTaskExternalcontact ¶
type ReqGetGroupmsgTaskExternalcontact struct { // Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填 Cursor string `json:"cursor,omitempty"` // Limit 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值 Limit int `json:"limit,omitempty"` // Msgid 群发消息的id,通过<a href="#获取群发记录列表">获取群发记录列表</a>接口返回,必填 Msgid string `json:"msgid"` }
ReqGetGroupmsgTaskExternalcontact 获取群发成员发送任务列表请求 文档:https://work.weixin.qq.com/api/doc/90000/90135/93338#获取群发成员发送任务列表
type RxMessage ¶
type RxMessage struct { // ToUserID 企业微信corpID ToUserID string // FromUserID 发送者的 UserID FromUserID string // SendTime 消息发送时间 SendTime time.Time // MsgType 消息类型 MsgType MessageType // MsgID 消息 ID MsgID int64 // AgentID 企业应用 ID,可在应用的设置页面查看 AgentID int64 // Event 事件类型 MsgType为event存在 Event EventType // ChangeType 变更类型 Event为change_external_contact存在 ChangeType ChangeType // contains filtered or unexported fields }
RxMessage 一条接收到的消息
func (*RxMessage) EventAddExternalContact ¶
func (m *RxMessage) EventAddExternalContact() (EventAddExternalContact, bool)
EventAddExternalContact 如果消息为添加企业客户事件,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventAddHalfExternalContact ¶
func (m *RxMessage) EventAddHalfExternalContact() (EventAddHalfExternalContact, bool)
EventAddHalfExternalContact 如果消息为外部联系人免验证添加成员事件,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventChangeExternalChat ¶
func (m *RxMessage) EventChangeExternalChat() (EventChangeExternalChat, bool)
EventChangeExternalChat 如果消息为客户群变更事件,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventCrateParty ¶
func (m *RxMessage) EventCrateParty() (EventCreateParty, bool)
EventCrateParty 如果消息为创建部门回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventCreateTag ¶
func (m *RxMessage) EventCreateTag() (EventCreateTag, bool)
EventCreateTag 如果消息为创建标签回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventCreateUser ¶
func (m *RxMessage) EventCreateUser() (EventCreateUser, bool)
EventCreateUser 如果消息为创建成员回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventCustomerService ¶
func (m *RxMessage) EventCustomerService() (EventCustomerServiceExtras, bool)
func (*RxMessage) EventDelExternalContact ¶
func (m *RxMessage) EventDelExternalContact() (EventDelExternalContact, bool)
EventDelExternalContact 如果消息为删除企业客户事件,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventDelFollowUser ¶
func (m *RxMessage) EventDelFollowUser() (EventDelFollowUser, bool)
EventDelFollowUser 如果消息为删除跟进成员事件,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventDeleteParty ¶
func (m *RxMessage) EventDeleteParty() (EventDeleteParty, bool)
EventDeleteParty 如果消息为删除部门回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventDeleteTag ¶
func (m *RxMessage) EventDeleteTag() (EventDeleteTag, bool)
EventDeleteTag 如果消息为删除标签回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventDeleteUser ¶
func (m *RxMessage) EventDeleteUser() (EventDeleteUser, bool)
EventDeleteUser 如果消息为删除成员回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventEditExternalContact ¶
func (m *RxMessage) EventEditExternalContact() (EventEditExternalContact, bool)
EventEditExternalContact 如果消息为编辑企业客户事件,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventSysApprovalChange ¶
func (m *RxMessage) EventSysApprovalChange() (EventSysApprovalChange, bool)
EventSysApprovalChange 如果消息为审批申请状态变化回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventTransferFail ¶
func (m *RxMessage) EventTransferFail() (EventTransferFail, bool)
EventTransferFail 如果消息为客户接替失败事件,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventUpdateParty ¶
func (m *RxMessage) EventUpdateParty() (EventUpdateParty, bool)
EventUpdateParty 如果消息为更新部门回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventUpdateTag ¶
func (m *RxMessage) EventUpdateTag() (EventUpdateTag, bool)
EventUpdateTag 如果消息为更新标签回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) EventUpdateUser ¶
func (m *RxMessage) EventUpdateUser() (EventUpdateUser, bool)
EventUpdateUser 如果消息为更新成员回调通知,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) Image ¶
func (m *RxMessage) Image() (ImageMessageExtras, bool)
Image 如果消息为图片类型,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) Link ¶
func (m *RxMessage) Link() (LinkMessageExtras, bool)
Link 如果消息为链接类型,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) Location ¶
func (m *RxMessage) Location() (LocationMessageExtras, bool)
Location 如果消息为位置类型,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) Text ¶
func (m *RxMessage) Text() (TextMessageExtras, bool)
Text 如果消息为文本类型,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) Video ¶
func (m *RxMessage) Video() (VideoMessageExtras, bool)
Video 如果消息为视频类型,则拿出相应的消息参数,否则返回 nil, false
func (*RxMessage) Voice ¶
func (m *RxMessage) Voice() (VoiceMessageExtras, bool)
Voice 如果消息为语音类型,则拿出相应的消息参数,否则返回 nil, false
type RxMessageHandler ¶
type RxMessageHandler interface { // OnIncomingMessage 一条消息到来时的回调。 OnIncomingMessage(msg *RxMessage) error }
RxMessageHandler 用来接收消息的接口。
type SaveCustomerAcquisitionReq ¶
type SaveCustomerAcquisitionReq struct { LinkID string `json:"link_id,omitempty"` LinkName string `json:"link_name" binding:"required"` Range CustomerAcquisitionRange `json:"range"` SkipVerify bool `json:"skip_verify"` }
type SearchContactQueryResult ¶ added in v0.2.0
type SearchContactQueryResult struct { User SearchContactQueryResultUser `json:"user"` Party struct { DepartmentId []int `json:"department_id"` } `json:"party"` DismissUser SearchContactQueryResultUser `json:"dismiss_user"` }
type SearchContactQueryResultUser ¶ added in v0.2.0
type SearchContactReq ¶ added in v0.2.0
type SearchContactReq struct { AuthCorpid string `json:"auth_corpid"` QueryWord string `json:"query_word"` QueryType int `json:"query_type"` QueryRange int `json:"query_range"` Agentid int `json:"agentid"` Limit int `json:"limit"` FullMatchField int `json:"full_match_field"` Cursor string `json:"cursor"` }
type SearchContactResp ¶ added in v0.2.0
type SearchContactResp struct { QueryResult SearchContactQueryResult `json:"query_result"` IsLast bool `json:"is_last"` NextCursor string `json:"next_cursor"` }
type SendCustomerServiceMsgReq ¶
type SendCustomerServiceMsgReq struct { Touser string `json:"touser"` OpenKfid string `json:"open_kfid"` Msgid string `json:"msgid,omitempty"` // 可不填 customer_service.MsgItem }
type SendCustomerServiceMsgRsp ¶
type SendCustomerServiceMsgRsp struct {
MsgId string `json:"msgid"` // 消息ID
}
type SendMsgOnCustomerServiceEventReq ¶
type SendMsgOnCustomerServiceEventReq struct { Code string `json:"code"` // 事件响应消息对应的code。通过事件回调下发,仅可使用一次。 Msgid string `json:"msgid,omitempty"` // 消息ID。如果请求参数指定了msgid,则原样返回,否则系统自动生成并返回。 不多于32字节 Msgtype customer_service.MessageType `json:"msgtype"` // 消息类型。对不同的msgtype,有相应的结构描述,详见消息类型 Text *customer_service.TextMessage `json:"text,omitempty"` // 文本消息 MsgMenu *customer_service.MsgMenuMessage `json:"msg_menu,omitempty"` // 菜单消息 }
type SendMsgOnCustomerServiceEventRsp ¶
type SendMsgOnCustomerServiceEventRsp struct {
Msgid string `json:"msgid"` // 消息ID。如果请求参数指定了msgid,则原样返回,否则系统自动生成并返回。 不多于32字节
}
type SendWelcomeMsgReq ¶
type SendWelcomeMsgReq struct { //附件,最多可添加9个附件 Attachments []Attachments `json:"attachments,omitempty"` Text Text `json:"text"` // WelcomeCode 通过 添加外部联系人事件 推送给企业的发送欢迎语的凭证,有效期为 20秒,必填 WelcomeCode string `json:"welcome_code"` }
type StopSendMsgExternalContactReq ¶
type StopSendMsgExternalContactReq struct {
Msgid string `json:"msgid"`
}
type SuiteInfoType ¶ added in v0.2.0
type SuiteInfoType string
const ( SuiteInfoTypeSuiteTicket SuiteInfoType = "suite_ticket" SuiteInfoTypeCreateAuth SuiteInfoType = "create_auth" SuiteInfoTypeChangeAuth SuiteInfoType = "change_auth" SuiteInfoTypeCancelAuth SuiteInfoType = "cancel_auth" SuiteInfoTypeChangeAppAdmin SuiteInfoType = "change_app_admin" SuiteInfoTypeResetPermanentCode SuiteInfoType = "reset_permanent_code" SuiteInfoTypeChangeExternalContact SuiteInfoType = "change_external_contact" )
type SyncCustomerServiceMsgItem ¶
type SyncCustomerServiceMsgItem struct { Msgid string `json:"msgid"` SendTime int `json:"send_time"` Origin int `json:"origin"` OpenKfid string `json:"open_kfid,omitempty"` ExternalUserid string `json:"external_userid,omitempty"` ServicerUserid string `json:"servicer_userid,omitempty"` customer_service.MsgItem }
type SyncCustomerServiceMsgRsp ¶
type SyncCustomerServiceMsgRsp struct { NextCursor string `json:"next_cursor"` MsgList []SyncCustomerServiceMsgItem `json:"msg_list"` HasMore int `json:"has_more"` }
type Tag ¶
type Tag struct { TagID int `json:"tagid"` // 非必填,标签id,非负整型,指定此参数时新增的标签会生成对应的标签id,不指定时则以目前最大的id自增。 TagName string `json:"tagname"` // 必填,标签名称,长度限制为32个字以内(汉字或英文字母),标签名不可与其他标签重名 }
Tag 创建标签 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90210#创建标签
type TagDetail ¶
type TagDetail struct { // PartyList 标签中包含的部门id列表 PartyList []int `json:"partylist"` // TagName 标签名 TagName string `json:"tagname"` UserList []TagUser `json:"userlist"` //标签中包含的成员列表 }
TagDetail 标签详情 文档:https://open.work.weixin.qq.com/api/doc/90000/90135/90213#获取标签成员
type TagUser ¶
type TagUser struct { // Name 成员名称,此字段从2019年12月30日起,对新创建第三方应用不再返回,2020年6月30日起,对所有历史第三方应用不再返回,后续第三方仅通讯录应用可获取,第三方页面需要通过<a href="#17172">通讯录展示组件</a>来展示名字 Name string `json:"name"` // Userid 成员帐号 Userid string `json:"userid"` }
TagUser 标签关联成员
type TaskCardBtn ¶
type TaskCardBtn struct { // Key 按钮key值,用户点击后,会产生任务卡片回调事件,回调事件会带上该key值,只能由数字、字母和“_-@”组成,最长支持128字节 Key string `json:"key"` // Name 按钮名称 Name string `json:"name"` // ReplaceName 点击按钮后显示的名称,默认为“已处理” ReplaceName string `json:"replace_name"` // Color 按钮字体颜色,可选“red”或者“blue”,默认为“blue” Color string `json:"color"` // IsBold 按钮字体是否加粗,默认false IsBold bool `json:"is_bold"` }
TaskCardBtn 任务卡片消息按钮
type Text ¶
type Text struct { // Content 消息文本内容,最长为4000字节 Content string `json:"content,omitempty"` }
type TextMessageExtras ¶
type TextMessageExtras interface { // GetContent 返回文本消息的内容。 GetContent() string // contains filtered or unexported methods }
TextMessageExtras 文本消息的参数。
type TransCustomerServiceStateRsp ¶
type TransCustomerServiceStateRsp struct {
MsgCode string `json:"msg_code"` //用于发送响应事件消息的code,将会话初次变更为service_state为2和3时,返回回复语code,service_state为4时,返回结束语code。可用该code调用发送事件响应消息接口给客户发送事件响应消息
}
type UpdateContactWay ¶
type UpdateContactWay struct { // ChatExpiresIn 临时会话有效期,以秒为单位,该参数仅在临时会话模式下有效 ChatExpiresIn int `json:"chat_expires_in,omitempty"` // Conclusions 结束语,会话结束时自动发送给客户,可参考“<a href="#15645/结束语定义">结束语定义</a>”,仅临时会话模式(is_temp为true)可设置 Conclusions ConclusionsReq `json:"conclusions,omitempty"` // ConfigID 企业联系方式的配置id,必填 ConfigID string `json:"config_id"` // ExpiresIn 临时会话二维码有效期,以秒为单位,该参数仅在临时会话模式下有效 ExpiresIn int `json:"expires_in,omitempty"` // Party 使用该联系方式的部门列表,将覆盖原有部门列表,只在配置的type为2时有效 Party []int `json:"party,omitempty"` // Remark 联系方式的备注信息,不超过30个字符,将覆盖之前的备注 Remark string `json:"remark,omitempty"` // SkipVerify 外部客户添加时是否无需验证 SkipVerify bool `json:"skip_verify"` // State 企业自定义的state参数,用于区分不同的添加渠道,在调用“<a href="#13878">获取外部联系人详情</a>”时会返回该参数值 State string `json:"state,omitempty"` // Style 样式,只针对“在小程序中联系”的配置生效 Style int `json:"style,omitempty"` // Unionid 可进行临时会话的客户unionid,该参数仅在临时会话模式有效,如不指定则不进行限制 Unionid string `json:"unionid,omitempty"` // User 使用该联系方式的用户列表,将覆盖原有用户列表 User []string `json:"user,omitempty"` }
UpdateContactWay 更新企业已配置的「联系我」方式 文档:https://work.weixin.qq.com/api/doc/90000/90135/92572#更新企业已配置的「联系我」方式
type UpdateUserReq ¶
type UpdateUserReq struct { // Address 地址。长度最大128个字符 Address string `json:"address,omitempty"` // Alias 别名。长度为1-32个utf8字符 Alias string `json:"alias,omitempty"` // AvatarMediaid 成员头像的mediaid,通过<a href="#10112">素材管理</a>接口上传图片获得的mediaid AvatarMediaid string `json:"avatar_mediaid,omitempty"` // Department 成员所属部门id列表,不超过100个 Department []int `json:"department,omitempty"` // Email 邮箱。长度不超过64个字节,且为有效的email格式。企业内必须唯一。<font color="red">若是绑定了腾讯企业邮箱的企业微信,则需要在腾讯企业邮箱中修改邮箱(此情况下该参数被忽略,但不会报错)</font> Email string `json:"email,omitempty"` // Enable 启用/禁用成员。1表示启用成员,0表示禁用成员 Enable int `json:"enable,omitempty"` Extattr struct { Attrs []struct { // Name 成员名称。长度为1~64个utf8字符 Name string `json:"name,omitempty"` Text struct { Value string `json:"value"` } `json:"text"` Type int `json:"type"` Web struct { Title string `json:"title"` URL string `json:"url"` } `json:"web"` } `json:"attrs"` } `json:"extattr,omitempty"` // 自定义字段。自定义字段需要先在WEB管理端添加,见<a href="#10016/扩展属性的添加方法">扩展属性添加方法</a>,否则忽略未知属性的赋值。与对外属性一致,不过只支持type=0的文本和type=1的网页类型,详细描述查看<a href="#13450">对外属性</a> // ExternalPosition 对外职务,如果设置了该值,则以此作为对外展示的职务,否则以position来展示。不超过12个汉字 ExternalPosition string `json:"external_position,omitempty"` ExternalProfile struct { ExternalAttr []struct { Miniprogram struct { Appid string `json:"appid"` Pagepath string `json:"pagepath"` Title string `json:"title"` } `json:"miniprogram"` // Name 成员名称。长度为1~64个utf8字符 Name string `json:"name,omitempty"` Text struct { Value string `json:"value"` } `json:"text"` Type int `json:"type"` Web struct { Title string `json:"title"` URL string `json:"url"` } `json:"web"` } `json:"external_attr"` ExternalCorpName string `json:"external_corp_name"` } `json:"external_profile,omitempty"` // 成员对外属性,字段详情见<a href="#13450">对外属性</a> // Gender 性别。1表示男性,2表示女性 Gender string `json:"gender,omitempty"` // IsLeaderInDept 上级字段,个数必须和department一致,表示在所在的部门内是否为上级。 IsLeaderInDept []int `json:"is_leader_in_dept,omitempty"` // MainDepartment 主部门 MainDepartment int `json:"main_department,omitempty"` // Mobile 手机号码。企业内必须唯一。<font color="red">若成员已激活企业微信,则需成员自行修改(此情况下该参数被忽略,但不会报错) </font> Mobile string `json:"mobile,omitempty"` // Name 成员名称。长度为1~64个utf8字符 Name string `json:"name,omitempty"` // Order 部门内的排序值,默认为0。当有传入department时有效。数量必须和department一致,数值越大排序越前面。有效的值范围是[0, 2^32) Order []int `json:"order,omitempty"` // Position 职务信息。长度为0~128个字符 Position string `json:"position,omitempty"` // Telephone 座机。由1-32位的纯数字或’-‘号组成 Telephone string `json:"telephone,omitempty"` // Userid 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节,必填 Userid string `json:"userid"` }
UpdateUserReq 更新成员请求 文档:https://work.weixin.qq.com/api/doc/90000/90135/90197#更新成员
type UserDeptInfo ¶
type UserDeptInfo struct { // DeptID 部门 ID DeptID int64 // Order 部门内的排序值,默认为0,数值越大排序越前面 Order uint32 // IsLeader 在所在的部门内是否为上级 IsLeader bool }
UserDeptInfo 用户部门信息
type UserGender ¶
type UserGender int
UserGender 用户性别
const ( // UserGenderUnspecified 性别未定义 UserGenderUnspecified UserGender = 0 // UserGenderMale 男性 UserGenderMale UserGender = 1 // UserGenderFemale 女性 UserGenderFemale UserGender = 2 )
type UserIdentityInfo ¶
type UserIdentityInfo struct { // UserID 成员UserID。若需要获得用户详情信息,可调用通讯录接口:读取成员。如果是互联企业,则返回的UserId格式如:CorpId/userid UserID string `json:"UserId"` // OpenID 非企业成员的标识,对当前企业唯一。不超过64字节 OpenID string `json:"OpenId"` // DeviceID 手机设备号(由企业微信在安装时随机生成,删除重装会改变,升级不受影响) DeviceID string `json:"DeviceId"` // ExternalUserID 外部联系人ID ExternalUserID string `json:"external_userid"` }
UserIdentityInfo 访问用户身份信息
type UserInfo ¶
type UserInfo struct { // UserID 成员UserID // // 对应管理端的账号,企业内必须唯一。不区分大小写,长度为1~64个字节 UserID string // Name 成员名称 Name string // Position 职务信息;第三方仅通讯录应用可获取 Position string // Departments 成员所属部门信息 Departments []UserDeptInfo // Mobile 手机号码;第三方仅通讯录应用可获取 Mobile string // Gender 性别 Gender UserGender // Email 邮箱;第三方仅通讯录应用可获取 Email string // AvatarURL 头像 URL;第三方仅通讯录应用可获取 // // NOTE:如果要获取小图将url最后的”/0”改成”/100”即可。 AvatarURL string // Telephone 座机;第三方仅通讯录应用可获取 Telephone string // IsEnabled 成员的启用状态 IsEnabled bool // Alias 别名;第三方仅通讯录应用可获取 Alias string // Status 成员激活状态 Status UserStatus // QRCodeURL 员工个人二维码;第三方仅通讯录应用可获取 // // 扫描可添加为外部联系人 QRCodeURL string DeptIDs []int64 `json:"department"` DeptOrder []uint32 `json:"order"` IsLeaderInDept []int `json:"is_leader_in_dept"` Address string }
UserInfo 用户信息
type UserStatus ¶
type UserStatus int
UserStatus 用户激活信息
已激活代表已激活企业微信或已关注微工作台(原企业号)。 未激活代表既未激活企业微信又未关注微工作台(原企业号)。
const ( // UserStatusActivated 已激活 UserStatusActivated UserStatus = 1 // UserStatusDeactivated 已禁用 UserStatusDeactivated UserStatus = 2 // UserStatusUnactivated 未激活 UserStatusUnactivated UserStatus = 4 // UserStatusExit 员工已离职 UserStatusExit UserStatus = 5 )
type Video ¶
type Video struct { // MediaID 视频的media_id,可以通过 素材管理 接口获得,必填 MediaId string `json:"media_id,omitempty"` Url string `json:"url" comment:"视频链接"` Title string `json:"title"` }
Video 视频附件
type VideoMessageExtras ¶
type VideoMessageExtras interface { // GetMediaID 返回视频消息的视频媒体文件 ID。 // // 可以调用【获取媒体文件】接口拉取,仅三天内有效。 GetMediaID() string // GetThumbMediaID 返回视频消息缩略图的媒体 ID。 // // 可以调用【获取媒体文件】接口拉取,仅三天内有效。 GetThumbMediaID() string // contains filtered or unexported methods }
VideoMessageExtras 视频消息的参数。
type VoiceMessageExtras ¶
type VoiceMessageExtras interface { // GetMediaID 返回语音消息的语音媒体文件 ID。 // // 可以调用【获取媒体文件】接口拉取,仅三天内有效。 GetMediaID() string // GetFormat 返回语音消息的语音格式,如 "amr"、"speex" 等。 GetFormat() string // contains filtered or unexported methods }
VoiceMessageExtras 语音消息的参数。
Source Files
¶
- agent.go
- agent_api.go
- agent_model.go
- apis.go
- app_chat.go
- app_chat_api.go
- app_chat_model.go
- callback.go
- client.go
- client_options.go
- contact_way.go
- contact_way_api.go
- contact_way_model.go
- customer_acquisition.go
- customer_service.go
- customer_service_model.go
- department_info.go
- department_info_api.go
- department_info_model.go
- errors.go
- external_contact.go
- external_contact_api.go
- external_contact_model.go
- group_chat.go
- group_chat_api.go
- group_chat_model.go
- mass_msg.go
- mass_msg_api.go
- mass_msg_model.go
- media.go
- media_api.go
- media_model.go
- message.go
- message_api.go
- message_model.go
- models.go
- msg_audit.go
- msg_audit_api.go
- msg_audit_model.go
- oa.go
- oa_api.go
- oa_model.go
- provider.go
- provider_model.go
- recipient.go
- rx.go
- rx_msg.go
- rx_msg_extras.go
- rx_msg_model.go
- suite.go
- suite_model.go
- tag.go
- tag_api.go
- tag_model.go
- token.go
- traits.go
- user_info.go
- user_info_api.go
- user_info_helper.go
- user_info_model.go
- welcome_msg.go
- welcome_msg_api.go
- welcome_msg_model.go