Documentation
¶
Index ¶
- Constants
- Variables
- func New(sc session.MutableContext) (*api, error)
- type AcceptFriendRequestFn
- type AcceptFriendRequestResponse
- type AddGroupBlockedMemberFn
- type AddGroupBlockedMemberResponse
- type AddGroupDeputyFn
- type AddGroupDeputyResponse
- type AddPollOptionsFn
- type AddPollOptionsOption
- type AddPollOptionsRequest
- type AddPollOptionsResponse
- type AddQuickMessageFn
- type AddQuickMessageRequest
- type AddQuickMessageResponse
- type AddReactionData
- type AddReactionDestination
- type AddReactionFn
- type AddReactionResponse
- type AddUnreadMarkData
- type AddUnreadMarkFn
- type AddUnreadMarkResponse
- type AddUserToGroupFn
- type AddUserToGroupResponse
- type AutoDeleteConversation
- type BlockUserFn
- type BlockUserResponse
- type BoardItem
- type ChangeGroupOwnerFn
- type ChangeGroupOwnerResponse
- type ChatTTL
- type CollapseConfig
- type CreateAutoReplyFn
- type CreateAutoReplyRequest
- type CreateAutoReplyResponse
- type CreateCatalogFn
- type CreateCatalogResponse
- type CreateGroupFn
- type CreateGroupOptions
- type CreateGroupResponse
- type CreateNoteFn
- type CreateNoteOptions
- type CreateNoteResponse
- type CreatePollFn
- type CreatePollOptions
- type CreatePollResponse
- type CreateReminderFn
- type CreateReminderGroup
- type CreateReminderOptions
- type CreateReminderResponse
- type CreateReminderUser
- type DeleteAutoReplyFn
- type DeleteAutoReplyResponse
- type DeleteAvatarFn
- type DeleteAvatarResponse
- type DeleteCatalogFn
- type DeleteCatalogResponse
- type DeleteChatFn
- type DeleteChatLastMessage
- type DeleteChatResponse
- type DeleteGroupFn
- type DeleteGroupResponse
- type DeleteMessageData
- type DeleteMessageDestination
- type DeleteMessageFn
- type DeleteMessageResponse
- type DisableGroupLinkFn
- type DisableGroupLinkResponse
- type EnableGroupLinkFn
- type EnableGroupLinkResponse
- type FindUserFn
- type FindUserResponse
- type ForwardMessageFail
- type ForwardMessageFn
- type ForwardMessagePayload
- type ForwardMessageReference
- type ForwardMessageResponse
- type ForwardMessageSuccess
- type FriendRecType
- type FriendRecommendation
- type FriendRequestInfo
- type GIFContent
- type GetAccountInfoFn
- type GetAccountInfoResponse
- type GetAliasListFn
- type GetAliasListItem
- type GetAliasListResponse
- type GetAllFriendsFn
- type GetAllFriendsResponse
- type GetAllGroupsFn
- type GetAllGroupsResponse
- type GetAutoDeleteChatFn
- type GetAutoDeleteChatResponse
- type GetAvatarListFn
- type GetAvatarListResponse
- type GetFriendBoardListFn
- type GetFriendBoardListResponse
- type GetFriendOnlineStatusFn
- type GetFriendOnlineStatusResponse
- type GetFriendRecommendationsFn
- type GetFriendRecommendationsResponse
- type GetFriendRequestStatusFn
- type GetFriendRequestStatusResponse
- type GetGroupBlockedMemberFn
- type GetGroupBlockedMemberResponse
- type GetGroupBoardListFn
- type GetGroupBoardListResponse
- type GetGroupInfoFn
- type GetGroupInfoResponse
- type GetGroupInviteBoxInfoFn
- type GetGroupInviteBoxInfoResponse
- type GetGroupInviteBoxListFn
- type GetGroupInviteBoxListOptions
- type GetGroupInviteBoxListResponse
- type GetGroupLinkDetailFn
- type GetGroupLinkDetailResponse
- type GetGroupLinkInfoFn
- type GetGroupLinkInfoResponse
- type GetGroupPendingJoinRequestsFn
- type GetGroupPendingJoinRequestsResponse
- type GetHiddenChatFn
- type GetHiddenChatResponse
- type GetLabelsFn
- type GetLabelsResponse
- type GetMuteFn
- type GetMuteResponse
- type GetPinnedChatFn
- type GetPinnedChatResponse
- type GetPollDetailFn
- type GetPollDetailResponse
- type GetQRFn
- type GetQRResponse
- type GetQuickMessageListFn
- type GetQuickMessageListResponse
- type GetReminderFn
- type GetReminderListFn
- type GetReminderListResponse
- type GetReminderResponse
- type GetReminderResponseFn
- type GetReminderResponseResponse
- type GetSentFriendRequestFn
- type GetSentFriendRequestResponse
- type GetSettingFn
- type GetSettingResponse
- type GetStickerDetailFn
- type GetStickerDetailResponse
- type GetStickersFn
- type GetStickersResponse
- type GetUnreadMarkData
- type GetUnreadMarkFn
- type GetUnreadMarkResponse
- type GetUserInfoFn
- type GetUserInfoResponse
- type GetUserSummaryInfoFn
- type GetUserSummaryInfoResponse
- type GroupIDVerMap
- type GroupInfo
- type GroupInfoPendingApprove
- type GroupInviteBoxInfo
- type GroupInviteBoxInfoTopic
- type HiddenThread
- type Invitation
- type InviteUserToGroupsFn
- type InviteUserToGroupsMessage
- type InviteUserToGroupsResponse
- type JoinGroupInviteBoxFn
- type JoinGroupInviteBoxResponse
- type JoinGroupLinkFn
- type JoinGroupLinkResponse
- type Language
- type LastOnlineFn
- type LastOnlineResponse
- type LastOnlineSettings
- type LeaveGroupFn
- type LeaveGroupResponse
- type LockPollFn
- type LockPollResponse
- type MessageContent
- type MessageStyle
- type MuteAction
- type MuteEntriesInfo
- type OnlineStatus
- type ParseLinkData
- type ParseLinkFn
- type ParseLinkMedia
- type ParseLinkResponse
- type Photo
- type RecommendationItem
- type RecommendationMeta
- type RejectFriendRequestFn
- type RejectFriendRequestResponse
- type ReminderListGroup
- type ReminderListUser
- type RemoveAliasFn
- type RemoveAliasResponse
- type RemoveFriendFn
- type RemoveFriendResponse
- type RemoveGroupBlockedMemberFn
- type RemoveGroupBlockedMemberResponse
- type RemoveGroupDeputyFn
- type RemoveGroupDeputyResponse
- type RemoveGroupInviteBoxFn
- type RemoveGroupInviteBoxResponse
- type RemoveQuickMessageFn
- type RemoveQuickMessageResponse
- type RemoveReminderFn
- type RemoveReminderResponse
- type RemoveUnreadMarkData
- type RemoveUnreadMarkFn
- type RemoveUnreadMarkResponse
- type RemoveUserFromGroupFn
- type RemoveUserFromGroupResponse
- type ReportReason
- type RequestUserInfo
- type ResetHiddenChatPINFn
- type ResetHiddenChatPINResponse
- type ReuseAvatarFn
- type ReuseAvatarResponse
- type ReviewPendingMemberData
- type ReviewPendingMemberRequestFn
- type ReviewPendingMemberRequestResponse
- type ReviewPendingMemberRequestStatus
- type SendBankCardData
- type SendBankCardFn
- type SendBankCardResponse
- type SendCardFn
- type SendCardOptions
- type SendCardResponse
- type SendDeliveredEventFn
- type SendDeliveredEventResponse
- type SendFriendRequestFn
- type SendFriendRequestResponse
- type SendGIFFn
- type SendGIFResponse
- type SendLinkFn
- type SendLinkOptions
- type SendLinkResponse
- type SendMessageFn
- type SendMessageQuote
- type SendMessageResponse
- type SendMessageResult
- type SendReportFn
- type SendReportOptions
- type SendReportResponse
- type SendSeenEventFn
- type SendSeenEventResponse
- type SendStickerFn
- type SendStickerPayload
- type SendStickerResponse
- type SendTypingEventFn
- type SendTypingEventResponse
- type SendVideoFn
- type SendVideoOptions
- type SendVideoResponse
- type SendVoiceFn
- type SendVoiceOptions
- type SendVoiceResponse
- type SentFriendRequestInfo
- type SetHiddenChatFn
- type SetHiddenChatResponse
- type SetMuteFn
- type SetMuteOptions
- type SetMuteResponse
- type SetPinChatFn
- type SetPinChatResponse
- type SetViewFeedBlockFn
- type SetViewFeedBlockResponse
- type SharePollFn
- type SharePollResponse
- type TextStyle
- type UnblockUserFn
- type UnblockUserResponse
- type UndoFriendRequestFn
- type UndoFriendRequestResponse
- type UndoMessageData
- type UndoMessageFn
- type UndoMessageResponse
- type UnreadMark
- type UpdateAccountAvatarFn
- type UpdateAccountAvatarResponse
- type UpdateActiveStatusFn
- type UpdateActiveStatusResponse
- type UpdateAliasFn
- type UpdateAliasResponse
- type UpdateAutoDeleteChatFn
- type UpdateAutoDeleteChatResponse
- type UpdateGroupAvatarFn
- type UpdateGroupAvatarResponse
- type UpdateGroupNameFn
- type UpdateGroupNameResponse
- type UpdateGroupSettingFn
- type UpdateGroupSettingOptions
- type UpdateGroupSettingResponse
- type UpdateHiddenChatPINFn
- type UpdateHiddenChatPINResponse
- type UpdateLabelsData
- type UpdateLabelsFn
- type UpdateLabelsResponse
- type UpdateLanguageFn
- type UpdateLanguageResponse
- type UpdateNoteFn
- type UpdateNoteOptions
- type UpdateNoteResponse
- type UpdateProfileBiz
- type UpdateProfileData
- type UpdateProfileFn
- type UpdateProfileProfile
- type UpdateProfileResponse
- type UpdateQuickMessageData
- type UpdateQuickMessageFn
- type UpdateQuickMessageResponse
- type UpdateReminderFn
- type UpdateReminderGroup
- type UpdateReminderOptions
- type UpdateReminderResponse
- type UpdateReminderUser
- type UpdateSettingFn
- type UpdateSettingResponse
- type UpdateSettingType
- type UploadAttachment
- type UploadAttachmentFn
- type UploadAttachmentResponse
- type UploadFileInfo
- type UploadImageInfo
- type UploadPhotoFn
- type UploadPhotoResponse
- type UploadThumbnailFn
- type UploadThumbnailResponse
- type UserProfile
- type VotePollFn
- type VotePollResponse
Constants ¶
View Source
const ( MuteActionMute MuteAction = 1 MuteActionUnmute MuteAction = 3 MuteDuration1Hour int = 3600 MuteDuration4Hour int = 14400 MuteDurationForever int = -1 MuteDurationUntil8AM int = 0 )
Variables ¶
View Source
var ( ErrSenderRecall = errs.NewZCA( "to delete a message you sent from others' view, call UndoMessage instead", "api.DeleteMessage", ) ErrDMRecipientsDeleteUnsupported = errs.NewZCA( "delete for everyone is not supported in direct messages", "api.DeleteMessage", ) )
View Source
var ( ErrMessageEmpty = errs.NewZCA("message content cannot be empty", "api.ForwardMessage") ErrThreadIDEmpty = errs.NewZCA("threadID cannot be empty", "api.ForwardMessage") )
View Source
var ( ErrMessageContentEmpty = errs.NewZCA("message content cannot be empty", "api.SendMessage") ErrInvalidMention = errs.NewZCA("Invalid mentions: total mention characters exceed message length", "api.SendMessage") ErrInvalidWebchatQuote = errs.NewZCA("invalid quote: content must be string for msgType 'webchat'", "api.SendMessage") ErrUnsupportedQuotedGroupPoll = errs.NewZCA("quoted message type 'group.poll' is not supported", "api.SendMessage") )
View Source
var ErrInvalidPIN = errs.NewZCA("invalid pin format", "api.UpdateHiddenChatPIN")
View Source
var ErrInvalidReaction = errs.NewZCA("invalid reaction data", "api.AddReaction")
View Source
var ErrPhoneNumberEmpty = errs.NewZCA("phone number cannot be empty", "api.FindUser")
Functions ¶
func New ¶
func New(sc session.MutableContext) (*api, error)
Types ¶
type AcceptFriendRequestFn ¶
type AcceptFriendRequestFn = func(ctx context.Context, friendID string) (AcceptFriendRequestResponse, error)
type AcceptFriendRequestResponse ¶
type AcceptFriendRequestResponse = string
type AddGroupBlockedMemberFn ¶
type AddGroupBlockedMemberResponse ¶
type AddGroupBlockedMemberResponse = string
type AddGroupDeputyFn ¶
type AddGroupDeputyResponse ¶
type AddGroupDeputyResponse = string
type AddPollOptionsFn ¶
type AddPollOptionsFn = func(ctx context.Context, options AddPollOptionsRequest) (*AddPollOptionsResponse, error)
type AddPollOptionsOption ¶
type AddPollOptionsRequest ¶
type AddPollOptionsRequest struct {
PollId int
Options []AddPollOptionsOption
VotedOptionIds []int
}
type AddPollOptionsResponse ¶
type AddPollOptionsResponse struct {
Options []model.PollOption
}
type AddQuickMessageFn ¶
type AddQuickMessageFn = func(ctx context.Context, message AddQuickMessageRequest) (*AddQuickMessageResponse, error)
type AddQuickMessageRequest ¶
type AddQuickMessageRequest struct {
Keyword string
Title string
Media *model.AttachmentSource
}
type AddQuickMessageResponse ¶
type AddQuickMessageResponse struct {
Item model.QuickMessage `json:"item"`
Version int `json:"version"`
}
type AddReactionData ¶
type AddReactionDestination ¶
type AddReactionDestination struct {
ThreadID string
Type model.ThreadType
Data AddReactionData
}
type AddReactionFn ¶
type AddReactionFn = func(ctx context.Context, dest AddReactionDestination, reaction model.ReactionData) (*AddReactionResponse, error)
type AddReactionResponse ¶
type AddReactionResponse struct {
MsgIDs []int `json:"msgIds"`
}
func (*AddReactionResponse) UnmarshalJSON ¶
func (r *AddReactionResponse) UnmarshalJSON(data []byte) error
type AddUnreadMarkData ¶
type AddUnreadMarkData struct {
UpdateID int `json:"updateId"`
}
type AddUnreadMarkFn ¶
type AddUnreadMarkFn = func(ctx context.Context, threadID string, threadType model.ThreadType) (*AddUnreadMarkResponse, error)
type AddUnreadMarkResponse ¶
type AddUnreadMarkResponse struct {
Data AddUnreadMarkData `json:"data"`
Status int `json:"status"`
}
func (*AddUnreadMarkResponse) UnmarshalJSON ¶
func (r *AddUnreadMarkResponse) UnmarshalJSON(data []byte) error
type AddUserToGroupFn ¶
type AddUserToGroupResponse ¶
type AutoDeleteConversation ¶
type BlockUserFn ¶
type BlockUserFn = func(ctx context.Context, userID string) (BlockUserResponse, error)
type BlockUserResponse ¶
type BlockUserResponse = string
type BoardItem ¶
type BoardItem struct {
BoardType model.BoardType `json:"boardType"`
Data model.BoardData `json:"data"` // model.PollDetail | model.NoteDetail | model.PinnedMessageDetail
}
func (*BoardItem) UnmarshalJSON ¶
type ChangeGroupOwnerFn ¶
type ChangeGroupOwnerResponse ¶
type ChangeGroupOwnerResponse struct {
Time int64 `json:"time"`
}
type CollapseConfig ¶
type CreateAutoReplyFn ¶
type CreateAutoReplyFn = func(ctx context.Context, message CreateAutoReplyRequest) (*CreateAutoReplyResponse, error)
type CreateAutoReplyRequest ¶
type CreateAutoReplyResponse ¶
type CreateAutoReplyResponse struct {
Item model.AutoReplyItem `json:"item"`
Version int `json:"version"`
}
type CreateCatalogFn ¶
type CreateCatalogFn = func(ctx context.Context, name string) (*CreateCatalogResponse, error)
type CreateCatalogResponse ¶
type CreateCatalogResponse struct {
Item model.CatalogItem `json:"item"`
VersionLSCatalog int `json:"version_ls_catalog"`
VersionCatalog int `json:"version_catalog"`
}
type CreateGroupFn ¶
type CreateGroupFn = func(ctx context.Context, options CreateGroupOptions) (*CreateGroupResponse, error)
type CreateGroupOptions ¶
type CreateGroupResponse ¶
type CreateNoteFn ¶
type CreateNoteFn = func(ctx context.Context, groupID string, options CreateNoteOptions) (*CreateNoteResponse, error)
type CreateNoteOptions ¶
type CreateNoteResponse ¶
type CreateNoteResponse = model.NoteDetail
type CreatePollFn ¶
type CreatePollFn = func(ctx context.Context, groupID string, options CreatePollOptions) (*CreatePollResponse, error)
type CreatePollOptions ¶
type CreatePollResponse ¶
type CreatePollResponse = model.PollDetail
type CreateReminderFn ¶
type CreateReminderFn = func(ctx context.Context, threadID string, threadType model.ThreadType, options CreateReminderOptions) (*CreateReminderResponse, error)
type CreateReminderGroup ¶
type CreateReminderGroup struct {
model.ReminderGroup
GroupID *string `json:"groupId,omitempty"`
EventType *int `json:"eventType,omitempty"`
RepeatData *[]any `json:"repeatData,omitempty"`
ResponseMem *model.ResponseMembers `json:"responseMem,omitempty"`
}
type CreateReminderOptions ¶
type CreateReminderOptions struct {
Title string
Emoji string
StartTime int64
Repeat model.ReminderRepeatMode
}
type CreateReminderResponse ¶
type CreateReminderResponse = model.ReminderResponse[CreateReminderUser, CreateReminderGroup]
type CreateReminderUser ¶
type CreateReminderUser = model.ReminderUser
type DeleteAutoReplyFn ¶
type DeleteAutoReplyFn = func(ctx context.Context, id int) (*DeleteAutoReplyResponse, error)
type DeleteAutoReplyResponse ¶
type DeleteAvatarFn ¶
type DeleteAvatarFn = func(ctx context.Context, photoID ...string) (*DeleteAvatarResponse, error)
type DeleteAvatarResponse ¶
type DeleteCatalogFn ¶
type DeleteCatalogFn = func(ctx context.Context, catalogID string) (DeleteCatalogResponse, error)
type DeleteCatalogResponse ¶
type DeleteCatalogResponse = string
type DeleteChatFn ¶
type DeleteChatFn = func(ctx context.Context, threadID string, threadType model.ThreadType, lastMsg DeleteChatLastMessage) (*DeleteChatResponse, error)
type DeleteChatLastMessage ¶
type DeleteChatResponse ¶
type DeleteChatResponse struct {
Status int `json:"status"`
}
type DeleteGroupFn ¶
type DeleteGroupFn = func(ctx context.Context, groupID string) (DeleteGroupResponse, error)
type DeleteGroupResponse ¶
type DeleteGroupResponse = string
type DeleteMessageData ¶
type DeleteMessageDestination ¶
type DeleteMessageDestination struct {
ThreadID string
Type model.ThreadType
Data DeleteMessageData
}
type DeleteMessageFn ¶
type DeleteMessageFn = func(ctx context.Context, dest DeleteMessageDestination, onlyMe bool) (*DeleteMessageResponse, error)
type DeleteMessageResponse ¶
type DeleteMessageResponse struct {
Status int `json:"status"`
}
type DisableGroupLinkFn ¶
type DisableGroupLinkFn = func(ctx context.Context, groupID string) (DisableGroupLinkResponse, error)
type DisableGroupLinkResponse ¶
type DisableGroupLinkResponse = string
type EnableGroupLinkFn ¶
type EnableGroupLinkFn = func(ctx context.Context, groupID string) (*EnableGroupLinkResponse, error)
type EnableGroupLinkResponse ¶
type FindUserFn ¶
type FindUserFn = func(ctx context.Context, phoneNumber ...string) (*FindUserResponse, error)
type FindUserResponse ¶
type FindUserResponse map[string]struct { Avatar string `json:"avatar"` Cover string `json:"cover"` Status string `json:"status"` Gender model.Gender `json:"gender"` DOB int64 `json:"dob"` Sdob string `json:"sdob"` GlobalID string `json:"globalId"` BizPkg model.ZBusinessPackage `json:"bizPkg"` UID string `json:"uid"` ZaloName string `json:"zalo_name"` DisplayName string `json:"display_name"` }
type ForwardMessageFail ¶
type ForwardMessageFn ¶
type ForwardMessageFn = func(ctx context.Context, threadIDs []string, threadType model.ThreadType, message ForwardMessagePayload) (*ForwardMessageResponse, error)
type ForwardMessagePayload ¶
type ForwardMessagePayload struct {
Message string
TTL int
Reference *ForwardMessageReference
}
type ForwardMessageReference ¶
type ForwardMessageResponse ¶
type ForwardMessageResponse struct {
Success []ForwardMessageSuccess `json:"success"`
Fail []ForwardMessageFail `json:"fail"`
}
type ForwardMessageSuccess ¶
type FriendRecType ¶
type FriendRecType int
const ( FriendRecRecommended FriendRecType = iota + 1 FriendRecRequest // received friend request )
type FriendRecommendation ¶
type FriendRecommendation struct {
UserID string `json:"userId"`
ZaloName string `json:"zaloName"`
DisplayName string `json:"displayName"`
Avatar string `json:"avatar"`
PhoneNumber string `json:"phoneNumber"`
Status string `json:"status"`
Gender model.Gender `json:"gender"`
Dob int64 `json:"dob"`
Type int `json:"type"`
RecommType FriendRecType `json:"recommType"`
RecommSrc int `json:"recommSrc"`
RecommTime int64 `json:"recommTime"`
RecommInfo RecommendationMeta `json:"recommInfo"`
BizPkg model.ZBusinessPackage `json:"bizPkg"`
IsSeenFriendReq bool `json:"isSeenFriendReq"`
}
type FriendRequestInfo ¶
type GIFContent ¶
type GIFContent struct {
Attachment model.AttachmentSource
Thumb *model.AttachmentSource
TTL int // Time to live in milliseconds
}
type GetAccountInfoFn ¶
type GetAccountInfoFn = func(ctx context.Context) (*GetAccountInfoResponse, error)
type GetAccountInfoResponse ¶
type GetAliasListFn ¶
type GetAliasListFn = func(ctx context.Context, options model.OffsetPaginationOptions) (*GetAliasListResponse, error)
type GetAliasListItem ¶
type GetAliasListResponse ¶
type GetAliasListResponse struct {
Items []GetAliasListItem `json:"items"`
UpdateTime string `json:"updateTime"`
}
type GetAllFriendsFn ¶
type GetAllFriendsFn = func(ctx context.Context, options model.OffsetPaginationOptions) (*GetAllFriendsResponse, error)
type GetAllFriendsResponse ¶
type GetAllGroupsFn ¶
type GetAllGroupsFn = func(ctx context.Context) (*GetAllGroupsResponse, error)
type GetAllGroupsResponse ¶
type GetAllGroupsResponse struct {
Version string `json:"version"`
GridVerMap GroupIDVerMap `json:"gridVerMap"`
}
type GetAutoDeleteChatFn ¶
type GetAutoDeleteChatFn = func(ctx context.Context) (*GetAutoDeleteChatResponse, error)
type GetAutoDeleteChatResponse ¶
type GetAutoDeleteChatResponse struct {
Converts []AutoDeleteConversation `json:"converts"`
}
type GetAvatarListFn ¶
type GetAvatarListFn = func(ctx context.Context, options model.OffsetPaginationOptions) (*GetAvatarListResponse, error)
type GetAvatarListResponse ¶
type GetFriendBoardListFn ¶
type GetFriendBoardListFn = func(ctx context.Context, friendID string) (*GetFriendBoardListResponse, error)
type GetFriendBoardListResponse ¶
type GetFriendBoardListResponse struct {
Data []model.PinnedMessageDetail `json:"data"`
Version int `json:"version"`
}
type GetFriendOnlineStatusFn ¶
type GetFriendOnlineStatusFn = func(ctx context.Context) (*GetFriendOnlineStatusResponse, error)
type GetFriendOnlineStatusResponse ¶
type GetFriendOnlineStatusResponse struct {
Predefine []string `json:"predefine"`
OwnerStatus string `json:"ownerStatus"`
Onlines []OnlineStatus `json:"onlines"`
}
type GetFriendRecommendationsFn ¶
type GetFriendRecommendationsFn = func(ctx context.Context) (*GetFriendRecommendationsResponse, error)
type GetFriendRecommendationsResponse ¶
type GetFriendRecommendationsResponse struct {
ExpiredDuration int64 `json:"expiredDuration"`
CollapseMsgListConfig CollapseConfig `json:"collapseMsgListConfig"`
RecommItems []RecommendationItem `json:"recommItems"`
}
type GetFriendRequestStatusFn ¶
type GetFriendRequestStatusFn = func(ctx context.Context, friendID string) (*GetFriendRequestStatusResponse, error)
type GetGroupBlockedMemberFn ¶
type GetGroupBlockedMemberFn = func(ctx context.Context, groupID string, options model.OffsetPaginationOptions) (*GetGroupBlockedMemberResponse, error)
type GetGroupBlockedMemberResponse ¶
type GetGroupBlockedMemberResponse struct {
BlockedMembers []model.UserSummary `json:"blocked_members"`
HasMore int `json:"has_more"`
}
type GetGroupBoardListFn ¶
type GetGroupBoardListFn = func(ctx context.Context, groupID string, options model.OffsetPaginationOptions) (*GetGroupBoardListResponse, error)
type GetGroupInfoFn ¶
type GetGroupInfoFn = func(ctx context.Context, groupID ...string) (*GetGroupInfoResponse, error)
type GetGroupInfoResponse ¶
type GetGroupInviteBoxInfoFn ¶
type GetGroupInviteBoxInfoFn = func(ctx context.Context, groupID string, options model.OffsetPaginationOptions) (*GetGroupInviteBoxInfoResponse, error)
type GetGroupInviteBoxInfoResponse ¶
type GetGroupInviteBoxInfoResponse struct {
GroupInfo GroupInviteBoxInfo `json:"groupInfo"`
InviterInfo model.UserSummary `json:"inviterInfo"`
GroupCreatorInfo model.UserSummary `json:"grCreatorInfo"`
ExpiredTS string `json:"expiredTs"`
Type int `json:"type"`
}
func (*GetGroupInviteBoxInfoResponse) UnmarshalJSON ¶
func (r *GetGroupInviteBoxInfoResponse) UnmarshalJSON(data []byte) error
type GetGroupInviteBoxListFn ¶
type GetGroupInviteBoxListFn = func(ctx context.Context, options GetGroupInviteBoxListOptions) (*GetGroupInviteBoxListResponse, error)
type GetGroupInviteBoxListResponse ¶
type GetGroupInviteBoxListResponse struct {
Invitations []Invitation `json:"invitations"`
Total int `json:"total"`
HasMore bool `json:"hasMore"`
}
type GetGroupLinkDetailFn ¶
type GetGroupLinkDetailFn = func(ctx context.Context, groupID string) (*GetGroupLinkDetailResponse, error)
type GetGroupLinkInfoFn ¶
type GetGroupLinkInfoResponse ¶
type GetGroupLinkInfoResponse struct {
GroupID string `json:"groupId"`
Name string `json:"name"`
Desc string `json:"desc"`
Type int `json:"type"`
CreatorID string `json:"creatorId"`
Avt string `json:"avt"`
FullAvt string `json:"fullAvt"`
AdminIDs []string `json:"adminIds"`
CurrentMems []model.UserSummary `json:"currentMems"`
Admins []any `json:"admins"`
HasMoreMember int `json:"hasMoreMember"`
SubType int `json:"subType"`
TotalMember int `json:"totalMember"`
Setting model.GroupSetting `json:"setting"`
GlobalID string `json:"globalId"`
}
type GetGroupPendingJoinRequestsFn ¶
type GetGroupPendingJoinRequestsFn = func(ctx context.Context, groupID string) (*GetGroupPendingJoinRequestsResponse, error)
type GetGroupPendingJoinRequestsResponse ¶
type GetGroupPendingJoinRequestsResponse struct {
Users []RequestUserInfo `json:"users"`
Time int64 `json:"time"`
}
type GetHiddenChatFn ¶
type GetHiddenChatFn = func(ctx context.Context) (*GetHiddenChatResponse, error)
type GetHiddenChatResponse ¶
type GetHiddenChatResponse struct {
PIN string `json:"pin"`
Threads []HiddenThread `json:"threads"`
}
type GetLabelsFn ¶
type GetLabelsFn = func(ctx context.Context) (*GetLabelsResponse, error)
type GetLabelsResponse ¶
type GetLabelsResponse struct {
LabelData []model.LabelData `json:"labelData"`
Version int `json:"version"`
LastUpdateTime int64 `json:"lastUpdateTime"`
}
func (*GetLabelsResponse) UnmarshalJSON ¶
func (r *GetLabelsResponse) UnmarshalJSON(data []byte) error
type GetMuteResponse ¶
type GetMuteResponse struct {
ChatEntries []MuteEntriesInfo `json:"chatEntries"`
GroupChatEntries []MuteEntriesInfo `json:"groupChatEntries"`
}
type GetPinnedChatFn ¶
type GetPinnedChatFn = func(ctx context.Context) (*GetPinnedChatResponse, error)
type GetPinnedChatResponse ¶
type GetPollDetailFn ¶
type GetPollDetailFn = func(ctx context.Context, pollID int) (*GetPollDetailResponse, error)
type GetPollDetailResponse ¶
type GetPollDetailResponse = model.PollDetail
type GetQRResponse ¶
type GetQuickMessageListFn ¶
type GetQuickMessageListFn = func(ctx context.Context) (*GetQuickMessageListResponse, error)
type GetQuickMessageListResponse ¶
type GetQuickMessageListResponse struct {
Cursor int `json:"cursor"`
Version int `json:"version"`
Items []model.QuickMessage `json:"items"`
}
type GetReminderFn ¶
type GetReminderFn = func(ctx context.Context, reminderID string) (*GetReminderResponse, error)
type GetReminderListFn ¶
type GetReminderListFn = func(ctx context.Context, threadID string, threadType model.ThreadType, options model.OffsetPaginationOptions) (*GetReminderListResponse, error)
type GetReminderListResponse ¶
type GetReminderListResponse = model.ReminderResponse[[]ReminderListUser, []ReminderListGroup]
type GetReminderResponse ¶
type GetReminderResponse = model.ReminderGroup
type GetReminderResponseFn ¶
type GetReminderResponseFn = func(ctx context.Context, reminderID string) (*GetReminderResponseResponse, error)
type GetSentFriendRequestFn ¶
type GetSentFriendRequestFn = func(ctx context.Context) (*GetSentFriendRequestResponse, error)
type GetSentFriendRequestResponse ¶
type GetSentFriendRequestResponse map[string]SentFriendRequestInfo
type GetSettingFn ¶
type GetSettingFn = func(ctx context.Context) (*GetSettingResponse, error)
type GetSettingResponse ¶
type GetSettingResponse = model.UserSetting
type GetStickerDetailFn ¶
type GetStickerDetailFn = func(ctx context.Context, stickerID int) (*GetStickerDetailResponse, error)
type GetStickerDetailResponse ¶
type GetStickerDetailResponse = model.StickerDetail
type GetStickersFn ¶
type GetStickersFn = func(ctx context.Context, keyword string) (*GetStickersResponse, error)
type GetStickersResponse ¶
type GetStickersResponse = model.StickerSuggestions
type GetUnreadMarkData ¶
type GetUnreadMarkData struct {
ConvsGroup []UnreadMark `json:"convsGroup"`
ConvsUser []UnreadMark `json:"convsUser"`
}
type GetUnreadMarkFn ¶
type GetUnreadMarkFn = func(ctx context.Context) (*GetUnreadMarkResponse, error)
type GetUnreadMarkResponse ¶
type GetUnreadMarkResponse struct {
Data GetUnreadMarkData `json:"data"`
Status int `json:"status"`
}
func (*GetUnreadMarkResponse) UnmarshalJSON ¶
func (r *GetUnreadMarkResponse) UnmarshalJSON(data []byte) error
type GetUserInfoFn ¶
type GetUserInfoFn = func(ctx context.Context, userId ...string) (*GetUserInfoResponse, error)
type GetUserInfoResponse ¶
type GetUserSummaryInfoFn ¶
type GetUserSummaryInfoFn = func(ctx context.Context, userID ...string) (*GetUserSummaryInfoResponse, error)
type GetUserSummaryInfoResponse ¶
type GetUserSummaryInfoResponse struct {
Profiles map[string]UserProfile `json:"profiles"`
UnchangedsProfile []any `json:"unchangeds_profile"`
}
type GroupIDVerMap ¶
type GroupInfo ¶
type GroupInfo struct {
model.GroupInfo
MemVerList []string `json:"memVerList"`
PendingApprove GroupInfoPendingApprove `json:"pendingApprove"`
}
type GroupInfoPendingApprove ¶
type GroupInviteBoxInfo ¶
type GroupInviteBoxInfo struct {
model.GroupInfo
Topic *GroupInviteBoxInfoTopic `json:"topic,omitempty"`
}
type GroupInviteBoxInfoTopic ¶
type GroupInviteBoxInfoTopic struct {
model.GroupTopic
Action *int `json:"action,omitempty"`
}
type HiddenThread ¶
type Invitation ¶
type Invitation struct {
GroupInfo model.GroupInfo `json:"groupInfo"`
InviterInfo model.UserSummary `json:"inviterInfo"`
GroupCreatorInfo model.UserSummary `json:"grCreatorInfo"`
ExpiredTS string `json:"expiredTs"` // Expired timestamp max 7 days
Type int `json:"type"`
}
type InviteUserToGroupsFn ¶
type InviteUserToGroupsResponse ¶
type InviteUserToGroupsResponse struct {
GridMessageMap map[string]InviteUserToGroupsMessage `json:"grid_message_map"`
}
type JoinGroupInviteBoxFn ¶
type JoinGroupInviteBoxFn = func(ctx context.Context, groupID string) (JoinGroupInviteBoxResponse, error)
type JoinGroupInviteBoxResponse ¶
type JoinGroupInviteBoxResponse = string
type JoinGroupLinkFn ¶
type JoinGroupLinkFn = func(ctx context.Context, link string) (JoinGroupLinkResponse, error)
type JoinGroupLinkResponse ¶
type JoinGroupLinkResponse = string
type LastOnlineFn ¶
type LastOnlineFn = func(ctx context.Context, userID string) (*LastOnlineResponse, error)
type LastOnlineResponse ¶
type LastOnlineResponse struct {
Settings LastOnlineSettings `json:"settings"`
LastOnline int64 `json:"lastOnline"`
}
type LastOnlineSettings ¶
type LastOnlineSettings struct {
ShowOnlineStatus bool `json:"show_online_status"`
}
type LeaveGroupFn ¶
type LeaveGroupResponse ¶
type LeaveGroupResponse struct {
MemberError []any `json:"memberError"`
}
type LockPollFn ¶
type LockPollFn = func(ctx context.Context, pollID int) (LockPollResponse, error)
type LockPollResponse ¶
type LockPollResponse = string
type MessageContent ¶
type MessageContent struct {
Msg string
Style []MessageStyle
Urgency model.Urgency
Quote *SendMessageQuote
Mentions []model.TMention
Attachments []model.AttachmentSource
TTL int // Time to live in milliseconds
}
func (*MessageContent) IsPhotoDescription ¶
func (c *MessageContent) IsPhotoDescription() bool
type MessageStyle ¶
type MuteAction ¶
type MuteAction int
type MuteEntriesInfo ¶
type OnlineStatus ¶
type ParseLinkData ¶
type ParseLinkFn ¶
type ParseLinkFn = func(ctx context.Context, link string) (*ParseLinkResponse, error)
type ParseLinkMedia ¶
type ParseLinkResponse ¶
type ParseLinkResponse struct {
Data ParseLinkData `json:"data"`
ErrorMap map[string]int `json:"error_maps"`
}
type RecommendationItem ¶
type RecommendationItem struct {
RecommItemType int `json:"recommItemType"`
DataInfo FriendRecommendation `json:"dataInfo"`
}
type RecommendationMeta ¶
type RejectFriendRequestFn ¶
type RejectFriendRequestFn = func(ctx context.Context, friendID string) (RejectFriendRequestResponse, error)
type RejectFriendRequestResponse ¶
type RejectFriendRequestResponse = string
type ReminderListGroup ¶
type ReminderListGroup = model.ReminderGroup
type ReminderListUser ¶
type ReminderListUser = model.ReminderUser
type RemoveAliasFn ¶
type RemoveAliasFn = func(ctx context.Context, userID string) (RemoveAliasResponse, error)
type RemoveAliasResponse ¶
type RemoveAliasResponse = string
type RemoveFriendFn ¶
type RemoveFriendFn = func(ctx context.Context, friendID string) (RemoveFriendResponse, error)
type RemoveFriendResponse ¶
type RemoveFriendResponse = string
type RemoveGroupBlockedMemberResponse ¶
type RemoveGroupBlockedMemberResponse = string
type RemoveGroupDeputyFn ¶
type RemoveGroupDeputyResponse ¶
type RemoveGroupDeputyResponse = string
type RemoveGroupInviteBoxFn ¶
type RemoveQuickMessageFn ¶
type RemoveQuickMessageFn = func(ctx context.Context, messageID ...int) (*RemoveQuickMessageResponse, error)
type RemoveReminderFn ¶
type RemoveReminderFn = func(ctx context.Context, threadID string, threadType model.ThreadType, reminderID string) (RemoveReminderResponse, error)
type RemoveReminderResponse ¶
type RemoveReminderResponse = string
type RemoveUnreadMarkData ¶
type RemoveUnreadMarkData struct {
UpdateID int `json:"updateId"`
}
type RemoveUnreadMarkFn ¶
type RemoveUnreadMarkFn = func(ctx context.Context, threadID string, threadType model.ThreadType) (*RemoveUnreadMarkResponse, error)
type RemoveUnreadMarkResponse ¶
type RemoveUnreadMarkResponse struct {
Data RemoveUnreadMarkData `json:"data"`
Status int `json:"status"`
}
func (*RemoveUnreadMarkResponse) UnmarshalJSON ¶
func (r *RemoveUnreadMarkResponse) UnmarshalJSON(data []byte) error
type RemoveUserFromGroupFn ¶
type RemoveUserFromGroupResponse ¶
type RemoveUserFromGroupResponse struct {
ErrorMembers []string `json:"errorMembers"`
}
type ReportReason ¶
type ReportReason int
const ( ReportReasonOther ReportReason = iota ReportReasonSensitive ReportReasonAnnoying ReportReasonFraud )
type RequestUserInfo ¶
type ResetHiddenChatPINFn ¶
type ResetHiddenChatPINFn = func(ctx context.Context) (ResetHiddenChatPINResponse, error)
type ResetHiddenChatPINResponse ¶
type ResetHiddenChatPINResponse = string
type ReuseAvatarFn ¶
type ReuseAvatarFn = func(ctx context.Context, photoID string) (*ReuseAvatarResponse, error)
type ReuseAvatarResponse ¶
type ReuseAvatarResponse = struct{} // Always null
type ReviewPendingMemberData ¶
type ReviewPendingMemberRequestFn ¶
type ReviewPendingMemberRequestFn = func(ctx context.Context, groupID string, data ReviewPendingMemberData) (*ReviewPendingMemberRequestResponse, error)
type ReviewPendingMemberRequestResponse ¶
type ReviewPendingMemberRequestResponse map[string]ReviewPendingMemberRequestStatus
type ReviewPendingMemberRequestStatus ¶
type ReviewPendingMemberRequestStatus int
const ( ReviewStatusSuccess ReviewPendingMemberRequestStatus = 0 ReviewStatusNotInPendingList ReviewPendingMemberRequestStatus = 170 ReviewStatusAlreadyInGroup ReviewPendingMemberRequestStatus = 178 ReviewStatusInsufficientPermission ReviewPendingMemberRequestStatus = 166 )
type SendBankCardData ¶
type SendBankCardData struct {
BinBank model.BinBankCard
NumAccBank string
NameAccBank string
}
type SendBankCardFn ¶
type SendBankCardFn = func(ctx context.Context, threadID string, threadType model.ThreadType, data SendBankCardData) (SendBankCardResponse, error)
type SendBankCardResponse ¶
type SendBankCardResponse = string
type SendCardFn ¶
type SendCardFn = func(ctx context.Context, threadID string, threadType model.ThreadType, options SendCardOptions) (*SendCardResponse, error)
type SendCardOptions ¶
type SendCardResponse ¶
type SendCardResponse struct {
MsgID int `json:"msgId"`
}
type SendDeliveredEventFn ¶
type SendDeliveredEventFn = func(ctx context.Context, messages []model.OutboundMessage, threadType model.ThreadType, isSeen bool) (SendDeliveredEventResponse, error)
type SendDeliveredEventResponse ¶
type SendDeliveredEventResponse = string // string | { status: int }
type SendFriendRequestFn ¶
type SendFriendRequestResponse ¶
type SendFriendRequestResponse = string
type SendGIFFn ¶
type SendGIFFn = func(ctx context.Context, threadID string, threadType model.ThreadType, gif GIFContent) (*SendGIFResponse, error)
type SendGIFResponse ¶
type SendLinkFn ¶
type SendLinkFn = func(ctx context.Context, threadID string, threadType model.ThreadType, options SendLinkOptions) (*SendLinkResponse, error)
type SendLinkOptions ¶
type SendLinkResponse ¶
type SendLinkResponse struct {
MsgID string `json:"msgId"`
}
type SendMessageFn ¶
type SendMessageFn = func(ctx context.Context, threadID string, threadType model.ThreadType, message MessageContent) (*SendMessageResponse, error)
type SendMessageQuote ¶
type SendMessageQuote struct {
MsgID string `json:"msgId"`
CliMsgID string `json:"cliMsgId"`
MsgType string `json:"msgType"`
UIDFrom string `json:"uidFrom"`
Content model.Content `json:"content"`
PropertyExt *model.PropertyExt `json:"propertyExt,omitempty"`
TS string `json:"ts"`
TTL int `json:"ttl"`
}
func (*SendMessageQuote) BuildAttachmentMessagePayload ¶
func (q *SendMessageQuote) BuildAttachmentMessagePayload() any
func (*SendMessageQuote) BuildMessagePayload ¶
func (q *SendMessageQuote) BuildMessagePayload() any
func (*SendMessageQuote) GetMessageType ¶
func (q *SendMessageQuote) GetMessageType() int
type SendMessageResponse ¶
type SendMessageResponse struct {
Message *SendMessageResult `json:"message"`
Attachment []SendMessageResult `json:"attachment"`
}
type SendMessageResult ¶
type SendMessageResult struct {
MsgID string `json:"msgId"`
}
type SendReportFn ¶
type SendReportFn = func(ctx context.Context, threadID string, threadType model.ThreadType, options SendReportOptions) (*SendReportResponse, error)
type SendReportOptions ¶
type SendReportOptions struct {
Content string // Only used when Reason is ReportReasonOther
Reason ReportReason
}
type SendReportResponse ¶
type SendReportResponse struct {
ReportID string `json:"reportId"`
}
type SendSeenEventFn ¶
type SendSeenEventFn = func(ctx context.Context, messages []model.OutboundMessage, threadType model.ThreadType) (*SendSeenEventResponse, error)
type SendSeenEventResponse ¶
type SendSeenEventResponse struct {
Status int `json:"status"`
}
type SendStickerFn ¶
type SendStickerFn = func(ctx context.Context, threadID string, threadType model.ThreadType, sticker SendStickerPayload) (*SendStickerResponse, error)
type SendStickerPayload ¶
type SendStickerResponse ¶
type SendStickerResponse struct {
MsgID string `json:"msgId"`
}
type SendTypingEventFn ¶
type SendTypingEventFn = func(ctx context.Context, threadID string, threadType model.ThreadType, destType model.DestType) (*SendTypingEventResponse, error)
type SendTypingEventResponse ¶
type SendTypingEventResponse struct {
Status int `json:"status"`
}
func (*SendTypingEventResponse) UnmarshalJSON ¶
func (r *SendTypingEventResponse) UnmarshalJSON(data []byte) error
type SendVideoFn ¶
type SendVideoFn = func(ctx context.Context, threadID string, threadType model.ThreadType, options SendVideoOptions) (*SendVideoResponse, error)
type SendVideoOptions ¶
type SendVideoOptions struct {
Msg string // Optional message to send along with the video
VideoURL string // URL of the video
ThumbnailURL string // URL of the thumbnail
Duration int // Video duration in milliseconds
Width int // Width of the video
Height int // Height of the video
TTL int // Time to live in milliseconds
}
type SendVideoResponse ¶
type SendVideoResponse struct {
MsgID int `json:"msgId"`
}
type SendVoiceFn ¶
type SendVoiceFn = func(ctx context.Context, threadID string, threadType model.ThreadType, options SendVoiceOptions) (*SendVoiceResponse, error)
type SendVoiceOptions ¶
type SendVoiceResponse ¶
type SendVoiceResponse struct {
MsgID int `json:"msgId"`
}
type SentFriendRequestInfo ¶
type SentFriendRequestInfo struct {
UserID string `json:"userId"`
ZaloName string `json:"zaloName"`
DisplayName string `json:"displayName"`
Avatar string `json:"avatar"`
GlobalID string `json:"globalId"`
BizPkg model.ZBusinessPackage `json:"bizPkg"`
FReqInfo FriendRequestInfo `json:"fReqInfo"`
}
type SetHiddenChatFn ¶
type SetHiddenChatFn = func(ctx context.Context, threadID []string, threadType model.ThreadType, isHidden bool) (SetHiddenChatResponse, error)
type SetHiddenChatResponse ¶
type SetHiddenChatResponse = string
type SetMuteFn ¶
type SetMuteFn = func(ctx context.Context, threadID string, threadType model.ThreadType, options SetMuteOptions) (SetMuteResponse, error)
type SetMuteOptions ¶
type SetMuteOptions struct {
Duration int // Mute duration in seconds.
Action MuteAction
}
type SetMuteResponse ¶
type SetMuteResponse = string
type SetPinChatFn ¶
type SetPinChatFn = func(ctx context.Context, threadID []string, threadType model.ThreadType, isPinned bool) (SetPinChatResponse, error)
type SetPinChatResponse ¶
type SetPinChatResponse = string
type SetViewFeedBlockFn ¶
type SetViewFeedBlockResponse ¶
type SetViewFeedBlockResponse = string
type SharePollFn ¶
type SharePollFn = func(ctx context.Context, pollID int) (SharePollResponse, error)
type SharePollResponse ¶
type SharePollResponse = string
type TextStyle ¶
type TextStyle string
const ( TextStyleBold TextStyle = "b" TextStyleItalic TextStyle = "i" TextStyleUnderline TextStyle = "u" TextStyleStrikeThrough TextStyle = "s" TextStyleRed TextStyle = "c_db342e" TextStyleOrange TextStyle = "c_f27806" TextStyleYellow TextStyle = "c_f7b503" TextStyleGreen TextStyle = "c_15a85f" TextStyleSmall TextStyle = "f_13" TextStyleBig TextStyle = "f_18" TextStyleOrderedList TextStyle = "lst_2" TextStyleUnorderedList TextStyle = "lst_1" TextStyleIndent TextStyle = "ind_$" )
type UnblockUserFn ¶
type UnblockUserFn = func(ctx context.Context, userID string) (UnblockUserResponse, error)
type UnblockUserResponse ¶
type UnblockUserResponse = string
type UndoFriendRequestFn ¶
type UndoFriendRequestFn = func(ctx context.Context, userID string) (UndoFriendRequestResponse, error)
type UndoFriendRequestResponse ¶
type UndoFriendRequestResponse = string
type UndoMessageData ¶
type UndoMessageFn ¶
type UndoMessageFn = func(ctx context.Context, threadID string, threadType model.ThreadType, data UndoMessageData) (*UndoMessageResponse, error)
type UndoMessageResponse ¶
type UndoMessageResponse struct {
Status int `json:"status"`
}
type UnreadMark ¶
type UpdateAccountAvatarFn ¶
type UpdateAccountAvatarFn = func(ctx context.Context, source model.AttachmentSource) (UpdateAccountAvatarResponse, error)
type UpdateAccountAvatarResponse ¶
type UpdateAccountAvatarResponse = string
type UpdateActiveStatusFn ¶
type UpdateActiveStatusFn = func(ctx context.Context, isActive bool) (*UpdateActiveStatusResponse, error)
type UpdateActiveStatusResponse ¶
type UpdateActiveStatusResponse struct {
Status bool `json:"status"`
}
type UpdateAliasFn ¶
type UpdateAliasResponse ¶
type UpdateAliasResponse = string
type UpdateAutoDeleteChatFn ¶
type UpdateAutoDeleteChatFn = func(ctx context.Context, threadID string, threadType model.ThreadType, ttl ChatTTL) (UpdateAutoDeleteChatResponse, error)
type UpdateAutoDeleteChatResponse ¶
type UpdateAutoDeleteChatResponse = string
type UpdateGroupAvatarFn ¶
type UpdateGroupAvatarFn = func(ctx context.Context, groupID string, source model.AttachmentSource) (UpdateGroupAvatarResponse, error)
type UpdateGroupAvatarResponse ¶
type UpdateGroupAvatarResponse = string
type UpdateGroupNameFn ¶
type UpdateGroupNameResponse ¶
type UpdateGroupNameResponse struct {
Status int `json:"status"`
}
type UpdateGroupSettingFn ¶
type UpdateGroupSettingFn = func(ctx context.Context, groupID string, options UpdateGroupSettingOptions) (UpdateGroupSettingResponse, error)
type UpdateGroupSettingOptions ¶
type UpdateGroupSettingOptions struct {
BlockName bool // Disallow group members to change the group name and avatar
SignAdminMsg bool // Highlight messages from owner/admins
SetTopicOnly bool // Don't pin messages, notes, and polls to the top of a conversation
EnableMsgHistory bool // Allow new members to read most recent messages
JoinApproval bool // Require approval for new members to join the group
LockCreatePost bool // Disallow group members to create notes & reminders
LockCreatePoll bool // Disallow group members to create polls
LockSendMsg bool // Disallow group members to send messages
LockViewMember bool // Disallow group members to view full member list (community only)
}
type UpdateGroupSettingResponse ¶
type UpdateGroupSettingResponse = string
type UpdateHiddenChatPINFn ¶
type UpdateHiddenChatPINFn = func(ctx context.Context, pin string) (UpdateHiddenChatPINResponse, error)
type UpdateHiddenChatPINResponse ¶
type UpdateHiddenChatPINResponse = string
type UpdateLabelsData ¶
type UpdateLabelsFn ¶
type UpdateLabelsFn = func(ctx context.Context, labels UpdateLabelsData) (*UpdateLabelsResponse, error)
type UpdateLabelsResponse ¶
func (*UpdateLabelsResponse) UnmarshalJSON ¶
func (r *UpdateLabelsResponse) UnmarshalJSON(data []byte) error
type UpdateLanguageFn ¶
type UpdateLanguageFn = func(ctx context.Context, lang Language) (UpdateLanguageResponse, error)
type UpdateLanguageResponse ¶
type UpdateLanguageResponse = string
type UpdateNoteFn ¶
type UpdateNoteFn = func(ctx context.Context, groupID string, options UpdateNoteOptions) (*UpdateNoteResponse, error)
type UpdateNoteOptions ¶
type UpdateNoteResponse ¶
type UpdateNoteResponse = model.NoteDetail
type UpdateProfileBiz ¶
type UpdateProfileData ¶
type UpdateProfileData struct {
Profile UpdateProfileProfile
Biz UpdateProfileBiz
}
type UpdateProfileFn ¶
type UpdateProfileFn = func(ctx context.Context, data UpdateProfileData) (UpdateProfileResponse, error)
type UpdateProfileProfile ¶
type UpdateProfileResponse ¶
type UpdateProfileResponse = string
type UpdateQuickMessageData ¶
type UpdateQuickMessageData struct {
Keyword string
Title string
Media *model.AttachmentSource
}
type UpdateQuickMessageFn ¶
type UpdateQuickMessageFn = func(ctx context.Context, itemID string, data UpdateQuickMessageData) (*UpdateQuickMessageResponse, error)
type UpdateQuickMessageResponse ¶
type UpdateQuickMessageResponse struct {
Item model.QuickMessage `json:"item"`
Version int `json:"version"`
}
type UpdateReminderFn ¶
type UpdateReminderFn = func(ctx context.Context, threadID string, threadType model.ThreadType, options UpdateReminderOptions) (*UpdateReminderResponse, error)
type UpdateReminderGroup ¶
type UpdateReminderGroup struct {
model.ReminderGroup
ResponseMem *model.ResponseMembers `json:"responseMem,omitempty"`
}
type UpdateReminderOptions ¶
type UpdateReminderResponse ¶
type UpdateReminderResponse = model.ReminderResponse[UpdateReminderUser, UpdateReminderGroup]
type UpdateReminderUser ¶
type UpdateReminderUser = model.ReminderUser
type UpdateSettingFn ¶
type UpdateSettingFn = func(ctx context.Context, sType UpdateSettingType, value int) (UpdateSettingResponse, error)
type UpdateSettingResponse ¶
type UpdateSettingResponse = string
type UpdateSettingType ¶
type UpdateSettingType string
const ( // 0 = hide, 1 = show full (day/month/year), 2 = show day/month. UpdateViewBirthday UpdateSettingType = "view_birthday" // 0 = hide, 1 = show. UpdateShowOnlineStatus UpdateSettingType = "show_online_status" // 0 = hide, 1 = show. UpdateDisplaySeenStatus UpdateSettingType = "display_seen_status" // 1 = everyone, 2 = only friends. UpdateReceiveMessage UpdateSettingType = "receive_message" // 2 = only friends, 3 = everyone, 4 = friends and recent contacts. UpdateAcceptCall UpdateSettingType = "accept_stranger_call" // 0 = disable, 1 = enable. UpdateAddFriendViaPhone UpdateSettingType = "add_friend_via_phone" // 0 = disable, 1 = enable. UpdateAddFriendViaQR UpdateSettingType = "add_friend_via_qr" // 0 = disable, 1 = enable. UpdateAddFriendViaGroup UpdateSettingType = "add_friend_via_group" // 0 = disable, 1 = enable. UpdateAddFriendViaContact UpdateSettingType = "add_friend_via_contact" // 0 = disable, 1 = enable. UpdateDisplayOnRecommendFriend UpdateSettingType = "display_on_recommend_friend" // 0 = disable, 1 = enable. UpdateArchivedChat UpdateSettingType = "archivedChatStatus" // 0 = disable, 1 = enable. UpdateQuickMessage UpdateSettingType = "quickMessageStatus" )
type UploadAttachment ¶
type UploadAttachment struct {
Finished bool `json:"finished"`
ClientFileID int `json:"clientFileId"`
ChunkID int `json:"chunkId"`
FileType model.FileType `json:"fileType"` // "image" | "video" | "others"
TotalSize int64 `json:"totalSize"`
Image *UploadImageInfo `json:"-"`
File *UploadFileInfo `json:"-"`
}
type UploadAttachmentFn ¶
type UploadAttachmentFn = func(ctx context.Context, threadID string, threadType model.ThreadType, sources ...model.AttachmentSource) (UploadAttachmentResponse, error)
type UploadAttachmentResponse ¶
type UploadAttachmentResponse = []UploadAttachment
type UploadFileInfo ¶
type UploadImageInfo ¶
type UploadPhotoFn ¶
type UploadPhotoFn = func(ctx context.Context, source model.AttachmentSource) (*UploadPhotoResponse, error)
type UploadPhotoResponse ¶
type UploadThumbnailFn ¶
type UploadThumbnailFn = func(ctx context.Context, source model.AttachmentSource) (*UploadThumbnailResponse, error)
type UploadThumbnailResponse ¶
type UserProfile ¶
type VotePollFn ¶
type VotePollResponse ¶
type VotePollResponse struct {
Options []model.PollOption `json:"options"`
}
Source Files
¶
- accept_friend_request.go
- add_group_blocked_member.go
- add_group_deputy.go
- add_poll_options.go
- add_quick_message.go
- add_reaction.go
- add_unread_mark.go
- add_user_to_group.go
- api.go
- block_user.go
- change_group_owner.go
- create_auto_reply.go
- create_catalog.go
- create_group.go
- create_note.go
- create_poll.go
- create_reminder.go
- delete_auto_reply.go
- delete_avatar.go
- delete_catalog.go
- delete_chat.go
- delete_group.go
- delete_message.go
- disable_group_link.go
- enable_group_link.go
- find_user.go
- forward_message.go
- get_account_info.go
- get_alias_list.go
- get_all_friends.go
- get_all_groups.go
- get_auto_delete_chat.go
- get_avatar_list.go
- get_context.go
- get_friend_board_list.go
- get_friend_online_status.go
- get_friend_recommendations.go
- get_friend_request_status.go
- get_group_blocked_member.go
- get_group_board_list.go
- get_group_info.go
- get_group_invite_box_info.go
- get_group_invite_box_list.go
- get_group_link_detail.go
- get_group_link_info.go
- get_group_pending_join_requests.go
- get_hidden_chat.go
- get_labels.go
- get_mute.go
- get_own_id.go
- get_pinned_chat.go
- get_poll_detail.go
- get_qr.go
- get_quick_message_list.go
- get_reminder.go
- get_reminder_list.go
- get_reminder_response.go
- get_sent_friend_request.go
- get_setting.go
- get_sticker_detail.go
- get_stickers.go
- get_unread_mark.go
- get_user_info.go
- get_user_summary_info.go
- invite_user_to_groups.go
- join_group_invite_box.go
- join_group_link.go
- last_online.go
- leave_group.go
- listener.go
- lock_poll.go
- parse_link.go
- reject_friend_request.go
- remove_alias.go
- remove_friend.go
- remove_group_blocked_member.go
- remove_group_deputy.go
- remove_group_invite_box.go
- remove_quick_message.go
- remove_reminder.go
- remove_unread_mark.go
- remove_user_from_group.go
- reset_hidden_chat_pin.go
- reuse_avatar.go
- review_pending_member_request.go
- send_bank_card.go
- send_card.go
- send_delivered_event.go
- send_friend_request.go
- send_gif.go
- send_link.go
- send_message.go
- send_report.go
- send_seen_event.go
- send_sticker.go
- send_typing_event.go
- send_video.go
- send_voice.go
- set_hidden_chat.go
- set_mute.go
- set_pin_chat.go
- set_view_feed_block.go
- share_poll.go
- unblock_user.go
- undo_friend_request.go
- undo_message.go
- update_account_avatar.go
- update_active_status.go
- update_alias.go
- update_auto_delete_chat.go
- update_group_avatar.go
- update_group_name.go
- update_group_setting.go
- update_hidden_chat_pin.go
- update_labels.go
- update_language.go
- update_note.go
- update_profile.go
- update_quick_message.go
- update_reminder.go
- update_setting.go
- upload_attachment.go
- upload_photo.go
- upload_thumbnail.go
- vote_poll.go
Click to show internal directories.
Click to hide internal directories.