go-lemmy/types/privateMessage.go

72 lines
2.9 KiB
Go
Raw Normal View History

2022-12-10 17:17:16 +00:00
package types
type CreatePrivateMessage struct {
2022-12-10 23:33:08 +00:00
Content string `json:"content" url:"content,omitempty"`
RecipientID int `json:"recipient_id" url:"recipient_id,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
2022-12-10 17:17:16 +00:00
}
type EditPrivateMessage struct {
2022-12-10 23:33:08 +00:00
PrivateMessageID int `json:"private_message_id" url:"private_message_id,omitempty"`
Content string `json:"content" url:"content,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
2022-12-10 17:17:16 +00:00
}
type DeletePrivateMessage struct {
2022-12-10 23:33:08 +00:00
PrivateMessageID int `json:"private_message_id" url:"private_message_id,omitempty"`
Deleted bool `json:"deleted" url:"deleted,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
2022-12-10 17:17:16 +00:00
}
type MarkPrivateMessageAsRead struct {
2022-12-10 23:33:08 +00:00
PrivateMessageID int `json:"private_message_id" url:"private_message_id,omitempty"`
Read bool `json:"read" url:"read,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
2022-12-10 17:17:16 +00:00
}
type GetPrivateMessages struct {
2022-12-10 23:33:08 +00:00
UnreadOnly Optional[bool] `json:"unread_only" url:"unread_only,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
2022-12-10 17:17:16 +00:00
}
type PrivateMessagesResponse struct {
2022-12-10 23:33:08 +00:00
PrivateMessages []PrivateMessageView `json:"private_messages" url:"private_messages,omitempty"`
2022-12-10 17:17:16 +00:00
LemmyResponse
}
type PrivateMessageResponse struct {
2022-12-10 23:33:08 +00:00
PrivateMessageView PrivateMessageView `json:"private_message_view" url:"private_message_view,omitempty"`
2022-12-10 17:17:16 +00:00
LemmyResponse
}
type CreatePrivateMessageReport struct {
2022-12-10 23:33:08 +00:00
PrivateMessageID int `json:"private_message_id" url:"private_message_id,omitempty"`
Reason string `json:"reason" url:"reason,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
2022-12-10 17:17:16 +00:00
}
type PrivateMessageReportResponse struct {
2022-12-10 23:33:08 +00:00
PrivateMessageReportView PrivateMessageReportView `json:"private_message_report_view" url:"private_message_report_view,omitempty"`
2022-12-10 17:17:16 +00:00
LemmyResponse
}
type ResolvePrivateMessageReport struct {
2022-12-10 23:33:08 +00:00
ReportID int `json:"report_id" url:"report_id,omitempty"`
Resolved bool `json:"resolved" url:"resolved,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
2022-12-10 17:17:16 +00:00
}
type ListPrivateMessageReports struct {
2022-12-10 23:33:08 +00:00
Page Optional[int64] `json:"page" url:"page,omitempty"`
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"`
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
2022-12-10 17:17:16 +00:00
}
type ListPrivateMessageReportsResponse struct {
2022-12-10 23:33:08 +00:00
PrivateMessageReports []PrivateMessageReportView `json:"private_message_reports" url:"private_message_reports,omitempty"`
2022-12-10 17:17:16 +00:00
LemmyResponse
}