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 Search struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Q string `json:"q" url:"q,omitempty"`
|
|
|
|
CommunityID Optional[int] `json:"community_id" url:"community_id,omitempty"`
|
|
|
|
CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"`
|
|
|
|
CreatorID Optional[int] `json:"creator_id" url:"creator_id,omitempty"`
|
|
|
|
Type Optional[SearchType] `json:"type_" url:"type_,omitempty"`
|
|
|
|
Sort Optional[SortType] `json:"sort" url:"sort,omitempty"`
|
|
|
|
ListingType Optional[ListingType] `json:"listing_type" url:"listing_type,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"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type SearchResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Type string `json:"type_" url:"type_,omitempty"`
|
|
|
|
Comments []CommentView `json:"comments" url:"comments,omitempty"`
|
|
|
|
Posts []PostView `json:"posts" url:"posts,omitempty"`
|
|
|
|
Communities []CommunityView `json:"communities" url:"communities,omitempty"`
|
|
|
|
Users []PersonViewSafe `json:"users" url:"users,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type ResolveObject struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Q string `json:"q" url:"q,omitempty"`
|
|
|
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type ResolveObjectResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Comment Optional[CommentView] `json:"comment" url:"comment,omitempty"`
|
|
|
|
Post Optional[PostView] `json:"post" url:"post,omitempty"`
|
|
|
|
Community Optional[CommunityView] `json:"community" url:"community,omitempty"`
|
|
|
|
Person Optional[PersonViewSafe] `json:"person" url:"person,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type GetModlog struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
ModPersonID Optional[int] `json:"mod_person_id" url:"mod_person_id,omitempty"`
|
|
|
|
CommunityID Optional[int] `json:"community_id" url:"community_id,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"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type GetModlogResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
RemovedPosts []ModRemovePostView `json:"removed_posts" url:"removed_posts,omitempty"`
|
|
|
|
LockedPosts []ModLockPostView `json:"locked_posts" url:"locked_posts,omitempty"`
|
|
|
|
StickiedPosts []ModStickyPostView `json:"stickied_posts" url:"stickied_posts,omitempty"`
|
|
|
|
RemovedComments []ModRemoveCommentView `json:"removed_comments" url:"removed_comments,omitempty"`
|
|
|
|
RemovedCommunities []ModRemoveCommunityView `json:"removed_communities" url:"removed_communities,omitempty"`
|
|
|
|
BannedFromCommunity []ModBanFromCommunityView `json:"banned_from_community" url:"banned_from_community,omitempty"`
|
|
|
|
Banned []ModBanView `json:"banned" url:"banned,omitempty"`
|
|
|
|
AddedToCommunity []ModAddCommunityView `json:"added_to_community" url:"added_to_community,omitempty"`
|
|
|
|
TransferredToCommunity []ModTransferCommunityView `json:"transferred_to_community" url:"transferred_to_community,omitempty"`
|
|
|
|
Added []ModAddView `json:"added" url:"added,omitempty"`
|
|
|
|
HiddenCommunities []ModHideCommunityView `json:"hidden_communities" url:"hidden_communities,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type CreateSite struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Name string `json:"name" url:"name,omitempty"`
|
|
|
|
Sidebar Optional[string] `json:"sidebar" url:"sidebar,omitempty"`
|
|
|
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
|
|
|
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
|
|
|
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
|
|
|
EnableDownvotes Optional[bool] `json:"enable_downvotes" url:"enable_downvotes,omitempty"`
|
|
|
|
OpenRegistration Optional[bool] `json:"open_registration" url:"open_registration,omitempty"`
|
|
|
|
EnableNSFW Optional[bool] `json:"enable_nsfw" url:"enable_nsfw,omitempty"`
|
|
|
|
CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"`
|
|
|
|
RequireEmailVerification Optional[bool] `json:"require_email_verification" url:"require_email_verification,omitempty"`
|
|
|
|
RequireApplication Optional[bool] `json:"require_application" url:"require_application,omitempty"`
|
|
|
|
ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"`
|
|
|
|
PrivateInstance Optional[bool] `json:"private_instance" url:"private_instance,omitempty"`
|
|
|
|
DefaultTheme Optional[string] `json:"default_theme" url:"default_theme,omitempty"`
|
|
|
|
DefaultPostListingType Optional[string] `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type EditSite struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Name Optional[string] `json:"name" url:"name,omitempty"`
|
|
|
|
Sidebar Optional[string] `json:"sidebar" url:"sidebar,omitempty"`
|
|
|
|
Description Optional[string] `json:"description" url:"description,omitempty"`
|
|
|
|
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
|
|
|
|
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
|
|
|
|
EnableDownvotes Optional[bool] `json:"enable_downvotes" url:"enable_downvotes,omitempty"`
|
|
|
|
OpenRegistration Optional[bool] `json:"open_registration" url:"open_registration,omitempty"`
|
|
|
|
EnableNSFW Optional[bool] `json:"enable_nsfw" url:"enable_nsfw,omitempty"`
|
|
|
|
CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"`
|
|
|
|
RequireEmailVerification Optional[bool] `json:"require_email_verification" url:"require_email_verification,omitempty"`
|
|
|
|
RequireApplication Optional[bool] `json:"require_application" url:"require_application,omitempty"`
|
|
|
|
ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"`
|
|
|
|
PrivateInstance Optional[bool] `json:"private_instance" url:"private_instance,omitempty"`
|
|
|
|
DefaultTheme Optional[string] `json:"default_theme" url:"default_theme,omitempty"`
|
|
|
|
DefaultPostListingType Optional[string] `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"`
|
|
|
|
LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type GetSite struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Auth Optional[string] `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type SiteResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
SiteView SiteView `json:"site_view" url:"site_view,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type GetSiteResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
SiteView Optional[SiteView] `json:"site_view" url:"site_view,omitempty"`
|
|
|
|
Admins []PersonViewSafe `json:"admins" url:"admins,omitempty"`
|
|
|
|
Online uint `json:"online" url:"online,omitempty"`
|
|
|
|
Version string `json:"version" url:"version,omitempty"`
|
|
|
|
MyUser Optional[MyUserInfo] `json:"my_user" url:"my_user,omitempty"`
|
|
|
|
FederatedInstances Optional[FederatedInstances] `json:"federated_instances" url:"federated_instances,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type MyUserInfo struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
LocalUserView LocalUserSettingsView `json:"local_user_view" url:"local_user_view,omitempty"`
|
|
|
|
Follows []CommunityFollowerView `json:"follows" url:"follows,omitempty"`
|
|
|
|
Moderates []CommunityModeratorView `json:"moderates" url:"moderates,omitempty"`
|
|
|
|
CommunityBlocks []CommunityBlockView `json:"community_blocks" url:"community_blocks,omitempty"`
|
|
|
|
PersonBlocks []PersonBlockView `json:"person_blocks" url:"person_blocks,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type LeaveAdmin struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type GetSiteConfig struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type GetSiteConfigResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
ConfigHjson string `json:"config_hjson" url:"config_hjson,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type SaveSiteConfig struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
ConfigHjson string `json:"config_hjson" url:"config_hjson,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type FederatedInstances struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Linked []string `json:"linked" url:"linked,omitempty"`
|
|
|
|
Allowed Optional[[]string] `json:"allowed" url:"allowed,omitempty"`
|
|
|
|
Blocked Optional[[]string] `json:"blocked" url:"blocked,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type ListRegistrationApplications struct {
|
2023-01-05 21:42:24 +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 string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type ListRegistrationApplicationsResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
RegistrationApplications []RegistrationApplicationView `json:"registration_applications" url:"registration_applications,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type ApproveRegistrationApplication struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
ID int32 `json:"id" url:"id,omitempty"`
|
|
|
|
Approve bool `json:"approve" url:"approve,omitempty"`
|
|
|
|
DenyReason Optional[string] `json:"deny_reason" url:"deny_reason,omitempty"`
|
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type RegistrationApplicationResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
RegistrationApplication RegistrationApplicationView `json:"registration_application" url:"registration_application,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|
|
|
|
type GetUnreadRegistrationApplicationCount struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
Auth string `json:"auth" url:"auth,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
}
|
|
|
|
type GetUnreadRegistrationApplicationCountResponse struct {
|
2023-01-05 21:42:24 +00:00
|
|
|
RegistrationApplications int64 `json:"registration_applications" url:"registration_applications,omitempty"`
|
2023-01-05 20:51:45 +00:00
|
|
|
LemmyResponse
|
|
|
|
}
|