summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/SevereCloud/vksdk/v2/events/objects.go
blob: 8ee261ac49ce37239d7727d64c939cc779d51f34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
package events // import "github.com/SevereCloud/vksdk/v2/events"

import (
	"encoding/json"

	"github.com/SevereCloud/vksdk/v2/object"
)

// MessageNewObject struct.
type MessageNewObject struct {
	Message    object.MessagesMessage `json:"message"`
	ClientInfo object.ClientInfo      `json:"client_info"`
}

// MessageReplyObject struct.
type MessageReplyObject object.MessagesMessage

// MessageEditObject struct.
type MessageEditObject object.MessagesMessage

// MessageAllowObject struct.
type MessageAllowObject struct {
	UserID int    `json:"user_id"`
	Key    string `json:"key"`
}

// MessageDenyObject struct.
type MessageDenyObject struct {
	UserID int `json:"user_id"`
}

// MessageTypingStateObject struct.
type MessageTypingStateObject struct {
	State  string `json:"state"`
	FromID int    `json:"from_id"`
	ToID   int    `json:"to_id"`
}

// MessageEventObject struct.
type MessageEventObject struct {
	UserID                int             `json:"user_id"`
	PeerID                int             `json:"peer_id"`
	EventID               string          `json:"event_id"`
	Payload               json.RawMessage `json:"payload"`
	ConversationMessageID int             `json:"conversation_message_id"`
}

// PhotoNewObject struct.
type PhotoNewObject object.PhotosPhoto

// PhotoCommentNewObject struct.
type PhotoCommentNewObject object.WallWallComment

// PhotoCommentEditObject struct.
type PhotoCommentEditObject object.WallWallComment

// PhotoCommentRestoreObject struct.
type PhotoCommentRestoreObject object.WallWallComment

// PhotoCommentDeleteObject struct.
type PhotoCommentDeleteObject struct {
	OwnerID   int `json:"owner_id"`
	ID        int `json:"id"`
	UserID    int `json:"user_id"`
	DeleterID int `json:"deleter_id"`
	PhotoID   int `json:"photo_id"`
}

// AudioNewObject struct.
type AudioNewObject object.AudioAudio

// VideoNewObject struct.
type VideoNewObject object.VideoVideo

// VideoCommentNewObject struct.
type VideoCommentNewObject object.WallWallComment

// VideoCommentEditObject struct.
type VideoCommentEditObject object.WallWallComment

// VideoCommentRestoreObject struct.
type VideoCommentRestoreObject object.WallWallComment

// VideoCommentDeleteObject struct.
type VideoCommentDeleteObject struct {
	OwnerID   int `json:"owner_id"`
	ID        int `json:"id"`
	UserID    int `json:"user_id"`
	DeleterID int `json:"deleter_id"`
	VideoID   int `json:"video_id"`
}

// WallPostNewObject struct.
type WallPostNewObject object.WallWallpost

// WallRepostObject struct.
type WallRepostObject object.WallWallpost

// WallReplyNewObject struct.
type WallReplyNewObject object.WallWallComment

// WallReplyEditObject struct.
type WallReplyEditObject object.WallWallComment

// WallReplyRestoreObject struct.
type WallReplyRestoreObject object.WallWallComment

// WallReplyDeleteObject struct.
type WallReplyDeleteObject struct {
	OwnerID   int `json:"owner_id"`
	ID        int `json:"id"`
	DeleterID int `json:"deleter_id"`
	PostID    int `json:"post_id"`
}

// BoardPostNewObject struct.
type BoardPostNewObject object.BoardTopicComment

// BoardPostEditObject struct.
type BoardPostEditObject object.BoardTopicComment

// BoardPostRestoreObject struct.
type BoardPostRestoreObject object.BoardTopicComment

// BoardPostDeleteObject struct.
type BoardPostDeleteObject struct {
	TopicOwnerID int `json:"topic_owner_id"`
	TopicID      int `json:"topic_id"`
	ID           int `json:"id"`
}

// MarketCommentNewObject struct.
type MarketCommentNewObject object.WallWallComment

// MarketCommentEditObject struct.
type MarketCommentEditObject object.WallWallComment

// MarketCommentRestoreObject struct.
type MarketCommentRestoreObject object.WallWallComment

// MarketCommentDeleteObject struct.
type MarketCommentDeleteObject struct {
	OwnerID   int `json:"owner_id"`
	ID        int `json:"id"`
	UserID    int `json:"user_id"`
	DeleterID int `json:"deleter_id"`
	ItemID    int `json:"item_id"`
}

// MarketOrderNewObject struct.
type MarketOrderNewObject object.MarketOrder

// MarketOrderEditObject struct.
type MarketOrderEditObject object.MarketOrder

// GroupLeaveObject struct.
type GroupLeaveObject struct {
	UserID int                `json:"user_id"`
	Self   object.BaseBoolInt `json:"self"`
}

// GroupJoinObject struct.
type GroupJoinObject struct {
	UserID   int    `json:"user_id"`
	JoinType string `json:"join_type"`
}

// UserBlockObject struct.
type UserBlockObject struct {
	AdminID     int    `json:"admin_id"`
	UserID      int    `json:"user_id"`
	UnblockDate int    `json:"unblock_date"`
	Reason      int    `json:"reason"`
	Comment     string `json:"comment"`
}

// UserUnblockObject struct.
type UserUnblockObject struct {
	AdminID   int `json:"admin_id"`
	UserID    int `json:"user_id"`
	ByEndDate int `json:"by_end_date"`
}

// PollVoteNewObject struct.
//
// BUG(VK): при голосовании за несколько вариантов, возвращается только один.
type PollVoteNewObject struct {
	OwnerID  int `json:"owner_id"`
	PollID   int `json:"poll_id"`
	OptionID int `json:"option_id"`
	UserID   int `json:"user_id"`
}

// GroupOfficersEditObject struct.
type GroupOfficersEditObject struct {
	AdminID  int `json:"admin_id"`
	UserID   int `json:"user_id"`
	LevelOld int `json:"level_old"`
	LevelNew int `json:"level_new"`
}

// Changes struct.
type Changes struct {
	OldValue string `json:"old_value"`
	NewValue string `json:"new_value"`
}

// ChangesInt struct.
type ChangesInt struct {
	OldValue int `json:"old_value"`
	NewValue int `json:"new_value"`
}

// GroupChangeSettingsObject struct.
//
// BUG(VK): Phone https://vk.com/bugtracker?act=show&id=64240
//
// BUG(VK): Email https://vk.com/bugtracker?act=show&id=86650
type GroupChangeSettingsObject struct {
	UserID  int `json:"user_id"`
	Changes struct {
		Title                 Changes    `json:"title"`
		Description           Changes    `json:"description"`
		Access                ChangesInt `json:"access"`
		ScreenName            Changes    `json:"screen_name"`
		PublicCategory        ChangesInt `json:"public_category"`
		PublicSubcategory     ChangesInt `json:"public_subcategory"`
		AgeLimits             ChangesInt `json:"age_limits"`
		Website               Changes    `json:"website"`
		StatusDefault         Changes    `json:"status_default"`
		Wall                  ChangesInt `json:"wall"`                    // на основе ответа
		Replies               ChangesInt `json:"replies"`                 // на основе ответа
		Topics                ChangesInt `json:"topics"`                  // на основе ответа
		Audio                 ChangesInt `json:"audio"`                   // на основе ответа
		Photos                ChangesInt `json:"photos"`                  // на основе ответа
		Video                 ChangesInt `json:"video"`                   // на основе ответа
		Market                ChangesInt `json:"market"`                  // на основе ответа
		Docs                  ChangesInt `json:"docs"`                    // на основе ответа
		Messages              ChangesInt `json:"messages"`                // на основе ответа
		EventGroupID          ChangesInt `json:"event_group_id"`          // на основе ответа
		Links                 Changes    `json:"links"`                   // на основе ответа
		Email                 Changes    `json:"email"`                   // на основе ответа
		EventStartDate        ChangesInt `json:"event_start_date::"`      // на основе ответа
		EventFinishDate       ChangesInt `json:"event_finish_date:"`      // на основе ответа
		Subject               Changes    `json:"subject"`                 // на основе ответа
		MarketWiki            Changes    `json:"market_wiki"`             // на основе ответа
		DisableMarketComments ChangesInt `json:"disable_market_comments"` // на основе ответа
		Phone                 ChangesInt `json:"phone"`                   // на основе ответа
		CountryID             ChangesInt `json:"country_id"`              // на основе ответа
		CityID                ChangesInt `json:"city_id"`                 // на основе ответа
	} `json:"Changes"`
}

// GroupChangePhotoObject struct.
type GroupChangePhotoObject struct {
	UserID int                `json:"user_id"`
	Photo  object.PhotosPhoto `json:"photo"`
}

// VkpayTransactionObject struct.
type VkpayTransactionObject struct {
	FromID      int    `json:"from_id"`
	Amount      int    `json:"amount"`
	Description string `json:"description"`
	Date        int    `json:"date"`
}

// LeadFormsNewObject struct.
type LeadFormsNewObject struct {
	LeadID   int    `json:"lead_id"`
	GroupID  int    `json:"group_id"`
	UserID   int    `json:"user_id"`
	FormID   int    `json:"form_id"`
	FormName string `json:"form_name"`
	AdID     int    `json:"ad_id"`
	Answers  []struct {
		Key      string `json:"key"`
		Question string `json:"question"`
		Answer   string `json:"answer"`
	} `json:"answers"`
}

// AppPayloadObject struct.
type AppPayloadObject struct {
	UserID  int    `json:"user_id"`
	AppID   int    `json:"app_id"`
	Payload string `json:"payload"`
}

// MessageReadObject struct.
type MessageReadObject struct {
	FromID        int `json:"from_id"`
	PeerID        int `json:"peer_id"`
	ReadMessageID int `json:"read_message_id"`
}

// LikeAddObject struct.
type LikeAddObject struct {
	LikerID       int    `json:"liker_id"`
	ObjectType    string `json:"object_type"`
	ObjectOwnerID int    `json:"object_owner_id"`
	ObjectID      int    `json:"object_id"`
	ThreadReplyID int    `json:"thread_reply_id"`
	PostID        int    `json:"post_id"` // for comment
}

// LikeRemoveObject struct.
type LikeRemoveObject struct {
	LikerID       int    `json:"liker_id"`
	ObjectType    string `json:"object_type"`
	ObjectOwnerID int    `json:"object_owner_id"`
	ObjectID      int    `json:"object_id"`
	ThreadReplyID int    `json:"thread_reply_id"`
	PostID        int    `json:"post_id"` // for comment
}

// DonutSubscriptionCreateObject struct.
type DonutSubscriptionCreateObject struct {
	Amount           float64 `json:"amount"`
	AmountWithoutFee float64 `json:"amount_without_fee"`
	UserID           float64 `json:"user_id"`
}

// DonutSubscriptionProlongedObject struct.
type DonutSubscriptionProlongedObject struct {
	Amount           float64 `json:"amount"`
	AmountWithoutFee float64 `json:"amount_without_fee"`
	UserID           float64 `json:"user_id"`
}

// DonutSubscriptionExpiredObject struct.
type DonutSubscriptionExpiredObject struct {
	UserID float64 `json:"user_id"`
}

// DonutSubscriptionCancelledObject struct.
type DonutSubscriptionCancelledObject struct {
	UserID float64 `json:"user_id"`
}

// DonutSubscriptionPriceChangedObject struct.
type DonutSubscriptionPriceChangedObject struct {
	AmountOld            float64 `json:"amount_old"`
	AmountNew            float64 `json:"amount_new"`
	AmountDiff           float64 `json:"amount_diff"`
	AmountDiffWithoutFee float64 `json:"amount_diff_without_fee"`
	UserID               float64 `json:"user_id"`
}

// DonutMoneyWithdrawObject struct.
type DonutMoneyWithdrawObject struct {
	Amount           float64 `json:"amount"`
	AmountWithoutFee float64 `json:"amount_without_fee"`
}

// DonutMoneyWithdrawErrorObject struct.
type DonutMoneyWithdrawErrorObject struct {
	Reason string `json:"reason"`
}