2023-01-07 23:05:40 +00:00
|
|
|
// Source: lemmy/crates/api_common/src/comment.rs
|
2023-01-07 22:45:01 +00:00
|
|
|
// Code generated by go.arsenm.dev/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
|
|
|
|
|
2023-01-05 20:51:45 +00:00
|
|
|
package types
|
|
|
|
|
|
|
|
type CreateComment struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Content string `json:"content" url:"content,omitempty"`
|
|
|
|
PostID int `json:"post_id" url:"post_id,omitempty"`
|
|
|
|
ParentID Optional[int] `json:"parent_id" url:"parent_id,omitempty"`
|
|
|
|
FormID Optional[string] `json:"form_id" url:"form_id,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type GetComment struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
ID int `json:"id" url:"id,omitempty"`
|
|
|
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type EditComment struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Content string `json:"content" url:"content,omitempty"`
|
|
|
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
|
|
|
FormID Optional[string] `json:"form_id" url:"form_id,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type DeleteComment struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
|
|
|
Deleted bool `json:"deleted" url:"deleted,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type RemoveComment struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
|
|
|
Removed bool `json:"removed" url:"removed,omitempty"`
|
|
|
|
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type MarkCommentAsRead struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
|
|
|
Read bool `json:"read" url:"read,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type SaveComment struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
|
|
|
Save bool `json:"save" url:"save,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type CommentResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
CommentView CommentView `json:"comment_view" url:"comment_view,omitempty"`
|
|
|
|
RecipientIds []int `json:"recipient_ids" url:"recipient_ids,omitempty"`
|
|
|
|
FormID Optional[string] `json:"form_id" url:"form_id,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type CreateCommentLike struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
|
|
|
Score int16 `json:"score" url:"score,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type GetComments struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Type Optional[ListingType] `json:"type_" url:"type_,omitempty"`
|
|
|
|
Sort Optional[SortType] `json:"sort" url:"sort,omitempty"`
|
|
|
|
Page Optional[int64] `json:"page" url:"page,omitempty"`
|
|
|
|
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
|
|
|
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
|
|
|
CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"`
|
|
|
|
SavedOnly Optional[bool] `json:"saved_only" url:"saved_only,omitempty"`
|
|
|
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type GetCommentsResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Comments []CommentView `json:"comments" url:"comments,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type CreateCommentReport struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
CommentID int `json:"comment_id" url:"comment_id,omitempty"`
|
|
|
|
Reason string `json:"reason" url:"reason,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type CommentReportResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
CommentReportView CommentReportView `json:"comment_report_view" url:"comment_report_view,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type ResolveCommentReport struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
ReportID int `json:"report_id" url:"report_id,omitempty"`
|
|
|
|
Resolved bool `json:"resolved" url:"resolved,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type ListCommentReports struct {
|
2023-01-05 21:42:24 +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"`
|
|
|
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type ListCommentReportsResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
CommentReports []CommentReportView `json:"comment_reports" url:"comment_reports,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|