-
Notifications
You must be signed in to change notification settings - Fork 90
add puppet schemas and add user_link #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
.idea/ | ||
go.sum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
module github.com/wechaty/go-wechaty | ||
|
||
require github.com/otiai10/opengraph v1.1.1 | ||
|
||
go 1.14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package schemas | ||
|
||
type ContactGender uint8 | ||
|
||
const ( | ||
ContactGenderUnknown ContactGender = 0 | ||
ContactGenderMale ContactGender = 1 | ||
ContactGenderFemale ContactGender = 2 | ||
) | ||
|
||
type ContactType uint8 | ||
|
||
const ( | ||
ContactTypeUnknown ContactType = 0 | ||
ContactTypePersonal ContactType = 1 | ||
ContactTypeOfficial ContactType = 2 | ||
) | ||
|
||
type ContactQueryFilter struct { | ||
Alias string | ||
Id string | ||
Name string | ||
WeiXin string | ||
} | ||
|
||
type ContactPayload struct { | ||
Id string | ||
Gender ContactGender | ||
Type ContactType | ||
Name string | ||
Avatar string | ||
Address string | ||
Alias string | ||
City string | ||
Friend bool | ||
Province string | ||
Signature string | ||
Start bool | ||
WeiXin string | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package schemas | ||
|
||
type ScanStatus uint8 | ||
|
||
const ( | ||
ScanStatusUnknown ScanStatus = 0 | ||
ScanStatusCancel ScanStatus = 1 | ||
ScanStatusWaiting ScanStatus = 2 | ||
ScanStatusScanned ScanStatus = 3 | ||
ScanStatusConfirmed ScanStatus = 4 | ||
ScanStatusTimeout ScanStatus = 5 | ||
) | ||
|
||
type EventFriendshipPayload struct { | ||
FriendshipId string | ||
} | ||
|
||
type EventLoginPayload struct { | ||
ContactId string | ||
} | ||
|
||
type EventLogoutPayload struct { | ||
ContactId string | ||
Data string | ||
} | ||
|
||
type EventMessagePayload struct { | ||
MessageId string | ||
} | ||
|
||
type EventRoomInvitePayload struct { | ||
RoomInvitationId string | ||
} | ||
|
||
type EventRoomJoinPayload struct { | ||
InviteeIdList []string | ||
InviterId string | ||
RoomId string | ||
Timestamp int64 | ||
} | ||
|
||
type EventRoomLeavePayload struct { | ||
RemoveIdList []string | ||
RemoverId string | ||
RoomId string | ||
Timestamp int64 | ||
} | ||
|
||
type EventRoomTopicPayload struct { | ||
ChangerId string | ||
NewTopic string | ||
OldTopic string | ||
RoomId string | ||
Timestamp int64 | ||
} | ||
|
||
type EventScanPayload struct { | ||
BaseEventPayload | ||
Status ScanStatus | ||
QrCode string | ||
} | ||
|
||
type BaseEventPayload struct { | ||
Data string | ||
} | ||
|
||
type EventDongPayload = BaseEventPayload | ||
|
||
type EventErrorPayload = BaseEventPayload | ||
|
||
type EventReadyPayload = BaseEventPayload | ||
|
||
type EventResetPayload = BaseEventPayload | ||
|
||
type EventHeartbeatPayload = BaseEventPayload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package schemas | ||
|
||
type FriendshipType uint8 | ||
|
||
const ( | ||
FriendshipTypeUnknown FriendshipType = 0 | ||
FriendshipTypeConfirm FriendshipType = 1 | ||
FriendshipTypeReceive FriendshipType = 2 | ||
FriendshipTypeVerify FriendshipType = 3 | ||
) | ||
|
||
type FriendshipSceneType uint8 | ||
|
||
const ( | ||
FriendshipSceneTypeUnknown FriendshipSceneType = 0 | ||
FriendshipSceneTypeQQ FriendshipSceneType = 1 | ||
FriendshipSceneTypeEmail FriendshipSceneType = 2 | ||
FriendshipSceneTypeWeiXin FriendshipSceneType = 3 | ||
FriendshipSceneTypeQQTBD FriendshipSceneType = 12 // QQ号搜索 | ||
FriendshipSceneTypeRoom FriendshipSceneType = 14 | ||
FriendshipSceneTypePhone FriendshipSceneType = 15 | ||
FriendshipSceneTypeCard FriendshipSceneType = 17 // 名片分享 | ||
FriendshipSceneTypeLocation FriendshipSceneType = 18 | ||
FriendshipSceneTypeBottle FriendshipSceneType = 25 | ||
FriendshipSceneTypeShaking FriendshipSceneType = 29 | ||
FriendshipSceneTypeQRCode FriendshipSceneType = 30 | ||
) | ||
|
||
type FriendshipPayloadBase struct { | ||
Id string | ||
ContactId string | ||
Hello string | ||
Timestamp int64 | ||
} | ||
|
||
type FriendshipPayloadConfirm struct { | ||
FriendshipPayloadBase | ||
Type FriendshipType // FriendshipTypeConfirm | ||
} | ||
|
||
type FriendshipPayloadReceive struct { | ||
FriendshipPayloadBase | ||
Type FriendshipType // FriendshipTypeReceive | ||
Scene FriendshipSceneType | ||
Stranger string | ||
Ticket string | ||
} | ||
|
||
type FriendshipPayloadVerify struct { | ||
FriendshipPayloadBase | ||
Type FriendshipType // FriendshipTypeVerify | ||
} | ||
|
||
type FriendshipSearchCondition struct { | ||
Phone string | ||
WeiXin string | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package schemas | ||
|
||
type MessageType uint8 | ||
|
||
const ( | ||
MessageTypeUnknown MessageType = 0 | ||
MessageTypeAttachment MessageType = 1 | ||
MessageTypeAudio MessageType = 2 | ||
MessageTypeContact MessageType = 3 | ||
MessageTypeChatHistory MessageType = 4 | ||
MessageTypeEmoticon MessageType = 5 | ||
MessageTypeImage MessageType = 6 | ||
MessageTypeText MessageType = 7 | ||
MessageTypeLocation MessageType = 8 | ||
MessageTypeMiniProgram MessageType = 9 | ||
MessageTypeTransfer MessageType = 10 | ||
MessageTypeRedEnvelope MessageType = 11 | ||
MessageTypeRecalled MessageType = 12 | ||
MessageTypeUrl MessageType = 13 | ||
MessageTypeVideo MessageType = 14 | ||
) | ||
|
||
type WeChatAppMessageType int | ||
|
||
const ( | ||
WeChatAppMessageTypeText WeChatAppMessageType = 1 | ||
WeChatAppMessageTypeImg WeChatAppMessageType = 2 | ||
WeChatAppMessageTypeAudio WeChatAppMessageType = 3 | ||
WeChatAppMessageTypeVideo WeChatAppMessageType = 4 | ||
WeChatAppMessageTypeUrl WeChatAppMessageType = 5 | ||
WeChatAppMessageTypeAttach WeChatAppMessageType = 6 | ||
WeChatAppMessageTypeOpen WeChatAppMessageType = 7 | ||
WeChatAppMessageTypeEmoji WeChatAppMessageType = 8 | ||
WeChatAppMessageTypeVoiceRemind WeChatAppMessageType = 9 | ||
WeChatAppMessageTypeScanGood WeChatAppMessageType = 10 | ||
WeChatAppMessageTypeGood WeChatAppMessageType = 13 | ||
WeChatAppMessageTypeEmotion WeChatAppMessageType = 15 | ||
WeChatAppMessageTypeCardTicket WeChatAppMessageType = 16 | ||
WeChatAppMessageTypeRealtimeShareLocation WeChatAppMessageType = 17 | ||
WeChatAppMessageTypeChatHistory WeChatAppMessageType = 19 | ||
WeChatAppMessageTypeMiniProgram WeChatAppMessageType = 33 | ||
WeChatAppMessageTypeTransfers WeChatAppMessageType = 2000 | ||
WeChatAppMessageTypeRedEnvelopes WeChatAppMessageType = 2001 | ||
WeChatAppMessageTypeReaderType WeChatAppMessageType = 100001 | ||
) | ||
|
||
type WeChatMessageType int | ||
|
||
const ( | ||
WeChatMessageTypeText WeChatMessageType = 1 | ||
WeChatMessageTypeImage WeChatMessageType = 3 | ||
WeChatMessageTypeVoice WeChatMessageType = 34 | ||
WeChatMessageTypeVerifyMsg WeChatMessageType = 37 | ||
WeChatMessageTypePossibleFriendMsg WeChatMessageType = 40 | ||
WeChatMessageTypeShareCard WeChatMessageType = 42 | ||
WeChatMessageTypeVideo WeChatMessageType = 43 | ||
WeChatMessageTypeEmoticon WeChatMessageType = 47 | ||
WeChatMessageTypeLocation WeChatMessageType = 48 | ||
WeChatMessageTypeApp WeChatMessageType = 49 | ||
WeChatMessageTypeVOIPMsg WeChatMessageType = 50 | ||
WeChatMessageTypeStatusNotify WeChatMessageType = 51 | ||
WeChatMessageTypeVOIPNotify WeChatMessageType = 52 | ||
WeChatMessageTypeVOIPInvite WeChatMessageType = 53 | ||
WeChatMessageTypeMicroVideo WeChatMessageType = 62 | ||
WeChatMessageTypeTransfer WeChatMessageType = 2000 // 转账 | ||
WeChatMessageTypeRedEnvelope WeChatMessageType = 2001 // 红包 | ||
WeChatMessageTypeMiniProgram WeChatMessageType = 2002 // 小程序 | ||
WeChatMessageTypeGroupInvite WeChatMessageType = 2003 // 群邀请 | ||
WeChatMessageTypeFile WeChatMessageType = 2004 // 文件消息 | ||
WeChatMessageTypeSysNotice WeChatMessageType = 9999 | ||
WeChatMessageTypeSys WeChatMessageType = 10000 | ||
WeChatMessageTypeRecalled WeChatMessageType = 10002 | ||
) | ||
|
||
type MessagePayloadBase struct { | ||
Id string | ||
MentionIdList []string | ||
Filename string | ||
Text string | ||
Timestamp string | ||
Type MessageType | ||
} | ||
|
||
type MessagePayloadRoom struct { | ||
FromId string | ||
RoomId string | ||
ToId string | ||
} | ||
|
||
type MessagePayloadTo = MessagePayloadRoom | ||
|
||
type MessagePayload struct { | ||
MessagePayloadBase | ||
MessagePayloadRoom | ||
} | ||
|
||
type MessageQueryFilter struct { | ||
FromId string | ||
Id string | ||
RoomId string | ||
Text string | ||
ToId string | ||
Type MessageType | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package schemas | ||
|
||
type MiniProgramPayload struct { | ||
AppId string | ||
Description string | ||
PagePath string | ||
ThumbUrl string | ||
Title string | ||
Username string | ||
ThumbKey string | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package schemas | ||
|
||
type PuppetOptions struct { | ||
endpoint string | ||
timeout int64 | ||
token string | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package schemas | ||
|
||
type RoomMemberQueryFilter struct { | ||
Name string | ||
RoomAlias string | ||
ContactAlias string | ||
} | ||
|
||
type RoomQueryFilter struct { | ||
Id string | ||
Topic string | ||
} | ||
|
||
type RoomPayload struct { | ||
Id string | ||
Topic string | ||
Avatar string | ||
MemberIdList []string | ||
OwnerId string | ||
AdminIdList []string | ||
} | ||
|
||
type RoomMemberPayload struct { | ||
Id string | ||
RoomAlias string | ||
InviterId string | ||
Avatar string | ||
Name string | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package schemas | ||
|
||
type RoomInvitationPayload struct { | ||
Id string | ||
InviterId string | ||
Topic string | ||
Avatar string | ||
Invitation string | ||
MemberCount int | ||
MemberIdList []string | ||
Timestamp int64 | ||
ReceiverId string | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package schemas | ||
|
||
type UrlLinkPayload struct { | ||
Description string | ||
ThumbnailUrl string | ||
Title string | ||
Url string | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package user | ||
|
||
import "github.com/wechaty/go-wechaty/src/wechaty" | ||
|
||
type Contact struct { | ||
wechaty.Accessory | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.