-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.gen.go
1552 lines (1531 loc) · 93.4 KB
/
types.gen.go
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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by go.elara.ws/go-lemmy/cmd/gen (struct generator). DO NOT EDIT.
package lemmy
import "time"
type BanPerson struct {
Ban bool `json:"ban" url:"ban,omitempty"`
Expires Optional[int64] `json:"expires" url:"expires,omitempty"`
PersonID int64 `json:"person_id" url:"person_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
RemoveData Optional[bool] `json:"remove_data" url:"remove_data,omitempty"`
}
type BlockPersonResponse struct {
Blocked bool `json:"blocked" url:"blocked,omitempty"`
PersonView PersonView `json:"person_view" url:"person_view,omitempty"`
Error Optional[string] `json:"error"`
}
type CommentReportView struct {
Comment Comment `json:"comment" url:"comment,omitempty"`
CommentCreator Person `json:"comment_creator" url:"comment_creator,omitempty"`
CommentReport CommentReport `json:"comment_report" url:"comment_report,omitempty"`
Community Community `json:"community" url:"community,omitempty"`
Counts CommentAggregates `json:"counts" url:"counts,omitempty"`
Creator Person `json:"creator" url:"creator,omitempty"`
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"`
Post Post `json:"post" url:"post,omitempty"`
Resolver Optional[Person] `json:"resolver" url:"resolver,omitempty"`
}
type BannedPersonsResponse struct {
Banned []PersonView `json:"banned" url:"banned,omitempty"`
Error Optional[string] `json:"error"`
}
type ModlogActionType string
const (
ModlogActionTypeAll ModlogActionType = "All"
ModlogActionTypeModRemovePost ModlogActionType = "ModRemovePost"
ModlogActionTypeModLockPost ModlogActionType = "ModLockPost"
ModlogActionTypeModFeaturePost ModlogActionType = "ModFeaturePost"
ModlogActionTypeModRemoveComment ModlogActionType = "ModRemoveComment"
ModlogActionTypeModRemoveCommunity ModlogActionType = "ModRemoveCommunity"
ModlogActionTypeModBanFromCommunity ModlogActionType = "ModBanFromCommunity"
ModlogActionTypeModAddCommunity ModlogActionType = "ModAddCommunity"
ModlogActionTypeModTransferCommunity ModlogActionType = "ModTransferCommunity"
ModlogActionTypeModAdd ModlogActionType = "ModAdd"
ModlogActionTypeModBan ModlogActionType = "ModBan"
ModlogActionTypeModHideCommunity ModlogActionType = "ModHideCommunity"
ModlogActionTypeAdminPurgePerson ModlogActionType = "AdminPurgePerson"
ModlogActionTypeAdminPurgeCommunity ModlogActionType = "AdminPurgeCommunity"
ModlogActionTypeAdminPurgePost ModlogActionType = "AdminPurgePost"
ModlogActionTypeAdminPurgeComment ModlogActionType = "AdminPurgeComment"
)
type PersonView struct {
Counts PersonAggregates `json:"counts" url:"counts,omitempty"`
IsAdmin bool `json:"is_admin" url:"is_admin,omitempty"`
Person Person `json:"person" url:"person,omitempty"`
}
type PostFeatureType string
const (
PostFeatureTypeLocal PostFeatureType = "Local"
PostFeatureTypeCommunity PostFeatureType = "Community"
)
type ModBanView struct {
BannedPerson Person `json:"banned_person" url:"banned_person,omitempty"`
ModBan ModBan `json:"mod_ban" url:"mod_ban,omitempty"`
Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"`
}
type ModRemoveComment struct {
CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
Removed bool `json:"removed" url:"removed,omitempty"`
When time.Time `json:"when_" url:"when_,omitempty"`
}
type GetPersonDetailsResponse struct {
Comments []CommentView `json:"comments" url:"comments,omitempty"`
Moderates []CommunityModeratorView `json:"moderates" url:"moderates,omitempty"`
PersonView PersonView `json:"person_view" url:"person_view,omitempty"`
Posts []PostView `json:"posts" url:"posts,omitempty"`
Error Optional[string] `json:"error"`
}
type Language struct {
Code string `json:"code" url:"code,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
Name string `json:"name" url:"name,omitempty"`
}
type ResolvePostReport struct {
ReportID int64 `json:"report_id" url:"report_id,omitempty"`
Resolved bool `json:"resolved" url:"resolved,omitempty"`
}
type LocalSite struct {
ActorNameMaxLength int64 `json:"actor_name_max_length" url:"actor_name_max_length,omitempty"`
ApplicationEmailAdmins bool `json:"application_email_admins" url:"application_email_admins,omitempty"`
ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"`
CaptchaDifficulty string `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"`
CaptchaEnabled bool `json:"captcha_enabled" url:"captcha_enabled,omitempty"`
CommunityCreationAdminOnly bool `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"`
DefaultPostListingType ListingType `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"`
DefaultTheme string `json:"default_theme" url:"default_theme,omitempty"`
EnableDownvotes bool `json:"enable_downvotes" url:"enable_downvotes,omitempty"`
EnableNSFW bool `json:"enable_nsfw" url:"enable_nsfw,omitempty"`
FederationEnabled bool `json:"federation_enabled" url:"federation_enabled,omitempty"`
FederationSignedFetch bool `json:"federation_signed_fetch" url:"federation_signed_fetch,omitempty"`
HideModlogModNames bool `json:"hide_modlog_mod_names" url:"hide_modlog_mod_names,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"`
PrivateInstance bool `json:"private_instance" url:"private_instance,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
RegistrationMode RegistrationMode `json:"registration_mode" url:"registration_mode,omitempty"`
ReportsEmailAdmins bool `json:"reports_email_admins" url:"reports_email_admins,omitempty"`
RequireEmailVerification bool `json:"require_email_verification" url:"require_email_verification,omitempty"`
SiteID int64 `json:"site_id" url:"site_id,omitempty"`
SiteSetup bool `json:"site_setup" url:"site_setup,omitempty"`
SlurFilterRegex Optional[string] `json:"slur_filter_regex" url:"slur_filter_regex,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
}
type DeleteCommunity struct {
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
Deleted bool `json:"deleted" url:"deleted,omitempty"`
}
type GetPostResponse struct {
CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"`
CrossPosts []PostView `json:"cross_posts" url:"cross_posts,omitempty"`
Moderators []CommunityModeratorView `json:"moderators" url:"moderators,omitempty"`
PostView PostView `json:"post_view" url:"post_view,omitempty"`
Error Optional[string] `json:"error"`
}
type PurgeComment struct {
CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
}
type PurgeCommunity struct {
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
}
type DeletePrivateMessage struct {
Deleted bool `json:"deleted" url:"deleted,omitempty"`
PrivateMessageID int64 `json:"private_message_id" url:"private_message_id,omitempty"`
}
type ModBanFromCommunityView struct {
BannedPerson Person `json:"banned_person" url:"banned_person,omitempty"`
Community Community `json:"community" url:"community,omitempty"`
ModBanFromCommunity ModBanFromCommunity `json:"mod_ban_from_community" url:"mod_ban_from_community,omitempty"`
Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"`
}
type MarkPostAsRead struct {
PostID Optional[int64] `json:"post_id" url:"post_id,omitempty"`
PostIDs Optional[[]int64] `json:"post_ids" url:"post_ids,omitempty"`
Read bool `json:"read" url:"read,omitempty"`
}
type ListCommentReportsResponse struct {
CommentReports []CommentReportView `json:"comment_reports" url:"comment_reports,omitempty"`
Error Optional[string] `json:"error"`
}
type CommunityModeratorView struct {
Community Community `json:"community" url:"community,omitempty"`
Moderator Person `json:"moderator" url:"moderator,omitempty"`
}
type EditCustomEmoji struct {
AltText string `json:"alt_text" url:"alt_text,omitempty"`
Category string `json:"category" url:"category,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
ImageURL string `json:"image_url" url:"image_url,omitempty"`
Keywords []string `json:"keywords" url:"keywords,omitempty"`
}
type GetReplies struct {
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
Sort Optional[CommentSortType] `json:"sort" url:"sort,omitempty"`
UnreadOnly Optional[bool] `json:"unread_only" url:"unread_only,omitempty"`
}
type CommunityBlockView struct {
Community Community `json:"community" url:"community,omitempty"`
Person Person `json:"person" url:"person,omitempty"`
}
type ListRegistrationApplicationsResponse struct {
RegistrationApplications []RegistrationApplicationView `json:"registration_applications" url:"registration_applications,omitempty"`
Error Optional[string] `json:"error"`
}
type SearchType string
const (
SearchTypeAll SearchType = "All"
SearchTypeComments SearchType = "Comments"
SearchTypePosts SearchType = "Posts"
SearchTypeCommunities SearchType = "Communities"
SearchTypeUsers SearchType = "Users"
SearchTypeUrl SearchType = "Url"
)
type CommentAggregates struct {
ChildCount int64 `json:"child_count" url:"child_count,omitempty"`
CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
Downvotes int64 `json:"downvotes" url:"downvotes,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Score int64 `json:"score" url:"score,omitempty"`
Upvotes int64 `json:"upvotes" url:"upvotes,omitempty"`
}
type ListCommentReports struct {
CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"`
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"`
}
type AddAdmin struct {
Added bool `json:"added" url:"added,omitempty"`
PersonID int64 `json:"person_id" url:"person_id,omitempty"`
}
type AddModToCommunityResponse struct {
Moderators []CommunityModeratorView `json:"moderators" url:"moderators,omitempty"`
Error Optional[string] `json:"error"`
}
type RegistrationApplicationView struct {
Admin Optional[Person] `json:"admin" url:"admin,omitempty"`
Creator Person `json:"creator" url:"creator,omitempty"`
CreatorLocalUser LocalUser `json:"creator_local_user" url:"creator_local_user,omitempty"`
RegistrationApplication RegistrationApplication `json:"registration_application" url:"registration_application,omitempty"`
}
type GetComment struct {
ID int64 `json:"id" url:"id,omitempty"`
}
type GetPersonMentionsResponse struct {
Mentions []PersonMentionView `json:"mentions" url:"mentions,omitempty"`
Error Optional[string] `json:"error"`
}
type GetPosts struct {
CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"`
CommunityName Optional[string] `json:"community_name" url:"community_name,omitempty"`
DislikedOnly Optional[bool] `json:"disliked_only" url:"disliked_only,omitempty"`
LikedOnly Optional[bool] `json:"liked_only" url:"liked_only,omitempty"`
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
PageCursor Optional[string] `json:"page_cursor" url:"page_cursor,omitempty"`
SavedOnly Optional[bool] `json:"saved_only" url:"saved_only,omitempty"`
Sort Optional[SortType] `json:"sort" url:"sort,omitempty"`
Type Optional[ListingType] `json:"type_" url:"type_,omitempty"`
}
type PersonAggregates struct {
CommentCount int64 `json:"comment_count" url:"comment_count,omitempty"`
PersonID int64 `json:"person_id" url:"person_id,omitempty"`
PostCount int64 `json:"post_count" url:"post_count,omitempty"`
}
type PrivateMessageReportResponse struct {
PrivateMessageReportView PrivateMessageReportView `json:"private_message_report_view" url:"private_message_report_view,omitempty"`
Error Optional[string] `json:"error"`
}
type ModTransferCommunityView struct {
Community Community `json:"community" url:"community,omitempty"`
ModTransferCommunity ModTransferCommunity `json:"mod_transfer_community" url:"mod_transfer_community,omitempty"`
ModdedPerson Person `json:"modded_person" url:"modded_person,omitempty"`
Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"`
}
type ListingType string
const (
ListingTypeAll ListingType = "All"
ListingTypeLocal ListingType = "Local"
ListingTypeSubscribed ListingType = "Subscribed"
ListingTypeModeratorView ListingType = "ModeratorView"
)
type ModRemovePost struct {
ID int64 `json:"id" url:"id,omitempty"`
ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"`
PostID int64 `json:"post_id" url:"post_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
Removed bool `json:"removed" url:"removed,omitempty"`
When time.Time `json:"when_" url:"when_,omitempty"`
}
type GetCommunity struct {
ID Optional[int64] `json:"id" url:"id,omitempty"`
Name Optional[string] `json:"name" url:"name,omitempty"`
}
type GetFederatedInstancesResponse struct {
FederatedInstances Optional[FederatedInstances] `json:"federated_instances" url:"federated_instances,omitempty"`
Error Optional[string] `json:"error"`
}
type GetModlogResponse struct {
Added []ModAddView `json:"added" url:"added,omitempty"`
AddedToCommunity []ModAddCommunityView `json:"added_to_community" url:"added_to_community,omitempty"`
AdminPurgedComments []AdminPurgeCommentView `json:"admin_purged_comments" url:"admin_purged_comments,omitempty"`
AdminPurgedCommunities []AdminPurgeCommunityView `json:"admin_purged_communities" url:"admin_purged_communities,omitempty"`
AdminPurgedPersons []AdminPurgePersonView `json:"admin_purged_persons" url:"admin_purged_persons,omitempty"`
AdminPurgedPosts []AdminPurgePostView `json:"admin_purged_posts" url:"admin_purged_posts,omitempty"`
Banned []ModBanView `json:"banned" url:"banned,omitempty"`
BannedFromCommunity []ModBanFromCommunityView `json:"banned_from_community" url:"banned_from_community,omitempty"`
FeaturedPosts []ModFeaturePostView `json:"featured_posts" url:"featured_posts,omitempty"`
HiddenCommunities []ModHideCommunityView `json:"hidden_communities" url:"hidden_communities,omitempty"`
LockedPosts []ModLockPostView `json:"locked_posts" url:"locked_posts,omitempty"`
RemovedComments []ModRemoveCommentView `json:"removed_comments" url:"removed_comments,omitempty"`
RemovedCommunities []ModRemoveCommunityView `json:"removed_communities" url:"removed_communities,omitempty"`
RemovedPosts []ModRemovePostView `json:"removed_posts" url:"removed_posts,omitempty"`
TransferredToCommunity []ModTransferCommunityView `json:"transferred_to_community" url:"transferred_to_community,omitempty"`
Error Optional[string] `json:"error"`
}
type ModFeaturePostView struct {
Community Community `json:"community" url:"community,omitempty"`
ModFeaturePost ModFeaturePost `json:"mod_feature_post" url:"mod_feature_post,omitempty"`
Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"`
Post Post `json:"post" url:"post,omitempty"`
}
type ModRemovePostView struct {
Community Community `json:"community" url:"community,omitempty"`
ModRemovePost ModRemovePost `json:"mod_remove_post" url:"mod_remove_post,omitempty"`
Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"`
Post Post `json:"post" url:"post,omitempty"`
}
type ListCommunities struct {
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
ShowNSFW Optional[bool] `json:"show_nsfw" url:"show_nsfw,omitempty"`
Sort Optional[SortType] `json:"sort" url:"sort,omitempty"`
Type Optional[ListingType] `json:"type_" url:"type_,omitempty"`
}
type CommentSortType string
const (
CommentSortTypeHot CommentSortType = "Hot"
CommentSortTypeTop CommentSortType = "Top"
CommentSortTypeNew CommentSortType = "New"
CommentSortTypeOld CommentSortType = "Old"
CommentSortTypeControversial CommentSortType = "Controversial"
)
type SaveComment struct {
CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
Save bool `json:"save" url:"save,omitempty"`
}
type RegistrationApplication struct {
AdminID Optional[int64] `json:"admin_id" url:"admin_id,omitempty"`
Answer string `json:"answer" url:"answer,omitempty"`
DenyReason Optional[string] `json:"deny_reason" url:"deny_reason,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
LocalUserID int64 `json:"local_user_id" url:"local_user_id,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
}
type ChangePassword struct {
NewPassword string `json:"new_password" url:"new_password,omitempty"`
NewPasswordVerify string `json:"new_password_verify" url:"new_password_verify,omitempty"`
OldPassword string `json:"old_password" url:"old_password,omitempty"`
}
type PostView struct {
Community Community `json:"community" url:"community,omitempty"`
Counts PostAggregates `json:"counts" url:"counts,omitempty"`
Creator Person `json:"creator" url:"creator,omitempty"`
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"`
CreatorIsAdmin bool `json:"creator_is_admin" url:"creator_is_admin,omitempty"`
CreatorIsModerator bool `json:"creator_is_moderator" url:"creator_is_moderator,omitempty"`
MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"`
Post Post `json:"post" url:"post,omitempty"`
Read bool `json:"read" url:"read,omitempty"`
Saved bool `json:"saved" url:"saved,omitempty"`
Subscribed SubscribedType `json:"subscribed" url:"subscribed,omitempty"`
UnreadComments int64 `json:"unread_comments" url:"unread_comments,omitempty"`
}
type DeleteComment struct {
CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
Deleted bool `json:"deleted" url:"deleted,omitempty"`
}
type AdminPurgePostView struct {
Admin Optional[Person] `json:"admin" url:"admin,omitempty"`
AdminPurgePost AdminPurgePost `json:"admin_purge_post" url:"admin_purge_post,omitempty"`
Community Community `json:"community" url:"community,omitempty"`
}
type Register struct {
Answer Optional[string] `json:"answer" url:"answer,omitempty"`
CaptchaAnswer Optional[string] `json:"captcha_answer" url:"captcha_answer,omitempty"`
CaptchaUUID Optional[string] `json:"captcha_uuid" url:"captcha_uuid,omitempty"`
Email Optional[string] `json:"email" url:"email,omitempty"`
Honeypot Optional[string] `json:"honeypot" url:"honeypot,omitempty"`
Password string `json:"password" url:"password,omitempty"`
PasswordVerify string `json:"password_verify" url:"password_verify,omitempty"`
ShowNSFW bool `json:"show_nsfw" url:"show_nsfw,omitempty"`
Username string `json:"username" url:"username,omitempty"`
}
type Tagline struct {
Content string `json:"content" url:"content,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
LocalSiteID int64 `json:"local_site_id" url:"local_site_id,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
}
type ListPostReports struct {
CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"`
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"`
}
type PasswordReset struct {
Email string `json:"email" url:"email,omitempty"`
}
type ApproveRegistrationApplication struct {
Approve bool `json:"approve" url:"approve,omitempty"`
DenyReason Optional[string] `json:"deny_reason" url:"deny_reason,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
}
type PostResponse struct {
PostView PostView `json:"post_view" url:"post_view,omitempty"`
Error Optional[string] `json:"error"`
}
type GetReportCountResponse struct {
CommentReports int64 `json:"comment_reports" url:"comment_reports,omitempty"`
CommunityID Optional[int64] `json:"community_id" url:"community_id,omitempty"`
PostReports int64 `json:"post_reports" url:"post_reports,omitempty"`
PrivateMessageReports Optional[int64] `json:"private_message_reports" url:"private_message_reports,omitempty"`
Error Optional[string] `json:"error"`
}
type Instance struct {
Domain string `json:"domain" url:"domain,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Software Optional[string] `json:"software" url:"software,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
Version Optional[string] `json:"version" url:"version,omitempty"`
}
type CommunityAggregates struct {
Comments int64 `json:"comments" url:"comments,omitempty"`
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
Posts int64 `json:"posts" url:"posts,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Subscribers int64 `json:"subscribers" url:"subscribers,omitempty"`
UsersActiveDay int64 `json:"users_active_day" url:"users_active_day,omitempty"`
UsersActiveHalfYear int64 `json:"users_active_half_year" url:"users_active_half_year,omitempty"`
UsersActiveMonth int64 `json:"users_active_month" url:"users_active_month,omitempty"`
UsersActiveWeek int64 `json:"users_active_week" url:"users_active_week,omitempty"`
}
type PrivateMessageView struct {
Creator Person `json:"creator" url:"creator,omitempty"`
PrivateMessage PrivateMessage `json:"private_message" url:"private_message,omitempty"`
Recipient Person `json:"recipient" url:"recipient,omitempty"`
}
type GetCommunityResponse struct {
CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"`
DiscussionLanguages []int64 `json:"discussion_languages" url:"discussion_languages,omitempty"`
Moderators []CommunityModeratorView `json:"moderators" url:"moderators,omitempty"`
Site Optional[Site] `json:"site" url:"site,omitempty"`
Error Optional[string] `json:"error"`
}
type ListPrivateMessageReports struct {
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
UnresolvedOnly Optional[bool] `json:"unresolved_only" url:"unresolved_only,omitempty"`
}
type LockPost struct {
Locked bool `json:"locked" url:"locked,omitempty"`
PostID int64 `json:"post_id" url:"post_id,omitempty"`
}
type TransferCommunity struct {
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
PersonID int64 `json:"person_id" url:"person_id,omitempty"`
}
type CustomEmoji struct {
AltText string `json:"alt_text" url:"alt_text,omitempty"`
Category string `json:"category" url:"category,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
ImageURL string `json:"image_url" url:"image_url,omitempty"`
LocalSiteID int64 `json:"local_site_id" url:"local_site_id,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Shortcode string `json:"shortcode" url:"shortcode,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
}
type DeleteAccount struct {
DeleteContent bool `json:"delete_content" url:"delete_content,omitempty"`
Password string `json:"password" url:"password,omitempty"`
}
type DeleteCustomEmoji struct {
ID int64 `json:"id" url:"id,omitempty"`
}
type ListPostReportsResponse struct {
PostReports []PostReportView `json:"post_reports" url:"post_reports,omitempty"`
Error Optional[string] `json:"error"`
}
type CreatePrivateMessageReport struct {
PrivateMessageID int64 `json:"private_message_id" url:"private_message_id,omitempty"`
Reason string `json:"reason" url:"reason,omitempty"`
}
type ModAddCommunityView struct {
Community Community `json:"community" url:"community,omitempty"`
ModAddCommunity ModAddCommunity `json:"mod_add_community" url:"mod_add_community,omitempty"`
ModdedPerson Person `json:"modded_person" url:"modded_person,omitempty"`
Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"`
}
type AdminPurgePost struct {
AdminPersonID int64 `json:"admin_person_id" url:"admin_person_id,omitempty"`
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
When time.Time `json:"when_" url:"when_,omitempty"`
}
type ModBan struct {
Banned bool `json:"banned" url:"banned,omitempty"`
Expires Optional[string] `json:"expires" url:"expires,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"`
OtherPersonID int64 `json:"other_person_id" url:"other_person_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
When time.Time `json:"when_" url:"when_,omitempty"`
}
type ResolvePrivateMessageReport struct {
ReportID int64 `json:"report_id" url:"report_id,omitempty"`
Resolved bool `json:"resolved" url:"resolved,omitempty"`
}
type SavePost struct {
PostID int64 `json:"post_id" url:"post_id,omitempty"`
Save bool `json:"save" url:"save,omitempty"`
}
type ModRemoveCommunityView struct {
Community Community `json:"community" url:"community,omitempty"`
ModRemoveCommunity ModRemoveCommunity `json:"mod_remove_community" url:"mod_remove_community,omitempty"`
Moderator Optional[Person] `json:"moderator" url:"moderator,omitempty"`
}
type CommentReply struct {
CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Read bool `json:"read" url:"read,omitempty"`
RecipientID int64 `json:"recipient_id" url:"recipient_id,omitempty"`
}
type SaveUserSettings struct {
AutoExpand Optional[bool] `json:"auto_expand" url:"auto_expand,omitempty"`
Avatar Optional[string] `json:"avatar" url:"avatar,omitempty"`
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
Bio Optional[string] `json:"bio" url:"bio,omitempty"`
BlurNSFW Optional[bool] `json:"blur_nsfw" url:"blur_nsfw,omitempty"`
BotAccount Optional[bool] `json:"bot_account" url:"bot_account,omitempty"`
CollapseBotComments Optional[bool] `json:"collapse_bot_comments" url:"collapse_bot_comments,omitempty"`
DefaultListingType Optional[ListingType] `json:"default_listing_type" url:"default_listing_type,omitempty"`
DefaultSortType Optional[SortType] `json:"default_sort_type" url:"default_sort_type,omitempty"`
DiscussionLanguages Optional[[]int64] `json:"discussion_languages" url:"discussion_languages,omitempty"`
DisplayName Optional[string] `json:"display_name" url:"display_name,omitempty"`
Email Optional[string] `json:"email" url:"email,omitempty"`
EnableAnimatedImages Optional[bool] `json:"enable_animated_images" url:"enable_animated_images,omitempty"`
EnableKeyboardNavigation Optional[bool] `json:"enable_keyboard_navigation" url:"enable_keyboard_navigation,omitempty"`
InfiniteScrollEnabled Optional[bool] `json:"infinite_scroll_enabled" url:"infinite_scroll_enabled,omitempty"`
InterfaceLanguage Optional[string] `json:"interface_language" url:"interface_language,omitempty"`
MatrixUserID Optional[string] `json:"matrix_user_id" url:"matrix_user_id,omitempty"`
OpenLinksInNewTab Optional[bool] `json:"open_links_in_new_tab" url:"open_links_in_new_tab,omitempty"`
PostListingMode Optional[PostListingMode] `json:"post_listing_mode" url:"post_listing_mode,omitempty"`
SendNotificationsToEmail Optional[bool] `json:"send_notifications_to_email" url:"send_notifications_to_email,omitempty"`
ShowAvatars Optional[bool] `json:"show_avatars" url:"show_avatars,omitempty"`
ShowBotAccounts Optional[bool] `json:"show_bot_accounts" url:"show_bot_accounts,omitempty"`
ShowNSFW Optional[bool] `json:"show_nsfw" url:"show_nsfw,omitempty"`
ShowReadPosts Optional[bool] `json:"show_read_posts" url:"show_read_posts,omitempty"`
ShowScores Optional[bool] `json:"show_scores" url:"show_scores,omitempty"`
Theme Optional[string] `json:"theme" url:"theme,omitempty"`
}
type AddAdminResponse struct {
Admins []PersonView `json:"admins" url:"admins,omitempty"`
Error Optional[string] `json:"error"`
}
type CommentReport struct {
CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
OriginalCommentText string `json:"original_comment_text" url:"original_comment_text,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Reason string `json:"reason" url:"reason,omitempty"`
Resolved bool `json:"resolved" url:"resolved,omitempty"`
ResolverID Optional[int64] `json:"resolver_id" url:"resolver_id,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
}
type RemoveCommunity struct {
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
Removed bool `json:"removed" url:"removed,omitempty"`
}
type FeaturePost struct {
FeatureType PostFeatureType `json:"feature_type" url:"feature_type,omitempty"`
Featured bool `json:"featured" url:"featured,omitempty"`
PostID int64 `json:"post_id" url:"post_id,omitempty"`
}
type ReadableFederationState struct {
FailCount int64 `json:"fail_count" url:"fail_count,omitempty"`
InstanceID int64 `json:"instance_id" url:"instance_id,omitempty"`
LastRetry Optional[string] `json:"last_retry" url:"last_retry,omitempty"`
LastSuccessfulID Optional[int64] `json:"last_successful_id" url:"last_successful_id,omitempty"`
LastSuccessfulPublishedTime Optional[string] `json:"last_successful_published_time" url:"last_successful_published_time,omitempty"`
NextRetry Optional[string] `json:"next_retry" url:"next_retry,omitempty"`
}
type AdminPurgePersonView struct {
Admin Optional[Person] `json:"admin" url:"admin,omitempty"`
AdminPurgePerson AdminPurgePerson `json:"admin_purge_person" url:"admin_purge_person,omitempty"`
}
type MarkCommentReplyAsRead struct {
CommentReplyID int64 `json:"comment_reply_id" url:"comment_reply_id,omitempty"`
Read bool `json:"read" url:"read,omitempty"`
}
type EditPost struct {
Body Optional[string] `json:"body" url:"body,omitempty"`
LanguageID Optional[int64] `json:"language_id" url:"language_id,omitempty"`
Name Optional[string] `json:"name" url:"name,omitempty"`
NSFW Optional[bool] `json:"nsfw" url:"nsfw,omitempty"`
PostID int64 `json:"post_id" url:"post_id,omitempty"`
URL Optional[string] `json:"url" url:"url,omitempty"`
}
type EditPrivateMessage struct {
Content string `json:"content" url:"content,omitempty"`
PrivateMessageID int64 `json:"private_message_id" url:"private_message_id,omitempty"`
}
type RegistrationApplicationResponse struct {
RegistrationApplication RegistrationApplicationView `json:"registration_application" url:"registration_application,omitempty"`
Error Optional[string] `json:"error"`
}
type PersonMentionView struct {
Comment Comment `json:"comment" url:"comment,omitempty"`
Community Community `json:"community" url:"community,omitempty"`
Counts CommentAggregates `json:"counts" url:"counts,omitempty"`
Creator Person `json:"creator" url:"creator,omitempty"`
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"`
CreatorIsAdmin bool `json:"creator_is_admin" url:"creator_is_admin,omitempty"`
CreatorIsModerator bool `json:"creator_is_moderator" url:"creator_is_moderator,omitempty"`
MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"`
PersonMention PersonMention `json:"person_mention" url:"person_mention,omitempty"`
Post Post `json:"post" url:"post,omitempty"`
Recipient Person `json:"recipient" url:"recipient,omitempty"`
Saved bool `json:"saved" url:"saved,omitempty"`
Subscribed SubscribedType `json:"subscribed" url:"subscribed,omitempty"`
}
type PersonBlockView struct {
Person Person `json:"person" url:"person,omitempty"`
Target Person `json:"target" url:"target,omitempty"`
}
type SiteMetadata struct {
Description Optional[string] `json:"description" url:"description,omitempty"`
EmbedVideoURL Optional[string] `json:"embed_video_url" url:"embed_video_url,omitempty"`
Image Optional[string] `json:"image" url:"image,omitempty"`
Title Optional[string] `json:"title" url:"title,omitempty"`
}
type CreatePostLike struct {
PostID int64 `json:"post_id" url:"post_id,omitempty"`
Score int64 `json:"score" url:"score,omitempty"`
}
type BlockCommunityResponse struct {
Blocked bool `json:"blocked" url:"blocked,omitempty"`
CommunityView CommunityView `json:"community_view" url:"community_view,omitempty"`
Error Optional[string] `json:"error"`
}
type CreateCustomEmoji struct {
AltText string `json:"alt_text" url:"alt_text,omitempty"`
Category string `json:"category" url:"category,omitempty"`
ImageURL string `json:"image_url" url:"image_url,omitempty"`
Keywords []string `json:"keywords" url:"keywords,omitempty"`
Shortcode string `json:"shortcode" url:"shortcode,omitempty"`
}
type ModHideCommunityView struct {
Admin Optional[Person] `json:"admin" url:"admin,omitempty"`
Community Community `json:"community" url:"community,omitempty"`
ModHideCommunity ModHideCommunity `json:"mod_hide_community" url:"mod_hide_community,omitempty"`
}
type MarkPersonMentionAsRead struct {
PersonMentionID int64 `json:"person_mention_id" url:"person_mention_id,omitempty"`
Read bool `json:"read" url:"read,omitempty"`
}
type LocalSiteRateLimit struct {
Comment int64 `json:"comment" url:"comment,omitempty"`
CommentPerSecond int64 `json:"comment_per_second" url:"comment_per_second,omitempty"`
Image int64 `json:"image" url:"image,omitempty"`
ImagePerSecond int64 `json:"image_per_second" url:"image_per_second,omitempty"`
ImportUserSettings int64 `json:"import_user_settings" url:"import_user_settings,omitempty"`
ImportUserSettingsPerSecond int64 `json:"import_user_settings_per_second" url:"import_user_settings_per_second,omitempty"`
LocalSiteID int64 `json:"local_site_id" url:"local_site_id,omitempty"`
Message int64 `json:"message" url:"message,omitempty"`
MessagePerSecond int64 `json:"message_per_second" url:"message_per_second,omitempty"`
Post int64 `json:"post" url:"post,omitempty"`
PostPerSecond int64 `json:"post_per_second" url:"post_per_second,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Register int64 `json:"register" url:"register,omitempty"`
RegisterPerSecond int64 `json:"register_per_second" url:"register_per_second,omitempty"`
Search int64 `json:"search" url:"search,omitempty"`
SearchPerSecond int64 `json:"search_per_second" url:"search_per_second,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
}
type SuccessResponse struct {
Success bool `json:"success" url:"success,omitempty"`
Error Optional[string] `json:"error"`
}
type PrivateMessagesResponse struct {
PrivateMessages []PrivateMessageView `json:"private_messages" url:"private_messages,omitempty"`
Error Optional[string] `json:"error"`
}
type EditSite struct {
ActorNameMaxLength Optional[int64] `json:"actor_name_max_length" url:"actor_name_max_length,omitempty"`
AllowedInstances Optional[[]string] `json:"allowed_instances" url:"allowed_instances,omitempty"`
ApplicationEmailAdmins Optional[bool] `json:"application_email_admins" url:"application_email_admins,omitempty"`
ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"`
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
BlockedInstances Optional[[]string] `json:"blocked_instances" url:"blocked_instances,omitempty"`
CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"`
CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"`
CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"`
DefaultPostListingType Optional[ListingType] `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"`
DefaultTheme Optional[string] `json:"default_theme" url:"default_theme,omitempty"`
Description Optional[string] `json:"description" url:"description,omitempty"`
DiscussionLanguages Optional[[]int64] `json:"discussion_languages" url:"discussion_languages,omitempty"`
EnableDownvotes Optional[bool] `json:"enable_downvotes" url:"enable_downvotes,omitempty"`
EnableNSFW Optional[bool] `json:"enable_nsfw" url:"enable_nsfw,omitempty"`
FederationDebug Optional[bool] `json:"federation_debug" url:"federation_debug,omitempty"`
FederationEnabled Optional[bool] `json:"federation_enabled" url:"federation_enabled,omitempty"`
HideModlogModNames Optional[bool] `json:"hide_modlog_mod_names" url:"hide_modlog_mod_names,omitempty"`
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"`
Name Optional[string] `json:"name" url:"name,omitempty"`
PrivateInstance Optional[bool] `json:"private_instance" url:"private_instance,omitempty"`
RateLimitComment Optional[int64] `json:"rate_limit_comment" url:"rate_limit_comment,omitempty"`
RateLimitCommentPerSecond Optional[int64] `json:"rate_limit_comment_per_second" url:"rate_limit_comment_per_second,omitempty"`
RateLimitImage Optional[int64] `json:"rate_limit_image" url:"rate_limit_image,omitempty"`
RateLimitImagePerSecond Optional[int64] `json:"rate_limit_image_per_second" url:"rate_limit_image_per_second,omitempty"`
RateLimitMessage Optional[int64] `json:"rate_limit_message" url:"rate_limit_message,omitempty"`
RateLimitMessagePerSecond Optional[int64] `json:"rate_limit_message_per_second" url:"rate_limit_message_per_second,omitempty"`
RateLimitPost Optional[int64] `json:"rate_limit_post" url:"rate_limit_post,omitempty"`
RateLimitPostPerSecond Optional[int64] `json:"rate_limit_post_per_second" url:"rate_limit_post_per_second,omitempty"`
RateLimitRegister Optional[int64] `json:"rate_limit_register" url:"rate_limit_register,omitempty"`
RateLimitRegisterPerSecond Optional[int64] `json:"rate_limit_register_per_second" url:"rate_limit_register_per_second,omitempty"`
RateLimitSearch Optional[int64] `json:"rate_limit_search" url:"rate_limit_search,omitempty"`
RateLimitSearchPerSecond Optional[int64] `json:"rate_limit_search_per_second" url:"rate_limit_search_per_second,omitempty"`
RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"`
ReportsEmailAdmins Optional[bool] `json:"reports_email_admins" url:"reports_email_admins,omitempty"`
RequireEmailVerification Optional[bool] `json:"require_email_verification" url:"require_email_verification,omitempty"`
Sidebar Optional[string] `json:"sidebar" url:"sidebar,omitempty"`
SlurFilterRegex Optional[string] `json:"slur_filter_regex" url:"slur_filter_regex,omitempty"`
Taglines Optional[[]string] `json:"taglines" url:"taglines,omitempty"`
}
type ListRegistrationApplications struct {
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
UnreadOnly Optional[bool] `json:"unread_only" url:"unread_only,omitempty"`
}
type Post struct {
ApID string `json:"ap_id" url:"ap_id,omitempty"`
Body Optional[string] `json:"body" url:"body,omitempty"`
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"`
Deleted bool `json:"deleted" url:"deleted,omitempty"`
EmbedDescription Optional[string] `json:"embed_description" url:"embed_description,omitempty"`
EmbedTitle Optional[string] `json:"embed_title" url:"embed_title,omitempty"`
EmbedVideoURL Optional[string] `json:"embed_video_url" url:"embed_video_url,omitempty"`
FeaturedCommunity bool `json:"featured_community" url:"featured_community,omitempty"`
FeaturedLocal bool `json:"featured_local" url:"featured_local,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
LanguageID int64 `json:"language_id" url:"language_id,omitempty"`
Local bool `json:"local" url:"local,omitempty"`
Locked bool `json:"locked" url:"locked,omitempty"`
Name string `json:"name" url:"name,omitempty"`
NSFW bool `json:"nsfw" url:"nsfw,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Removed bool `json:"removed" url:"removed,omitempty"`
ThumbnailURL Optional[string] `json:"thumbnail_url" url:"thumbnail_url,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
URL Optional[string] `json:"url" url:"url,omitempty"`
}
type CaptchaResponse struct {
PNG string `json:"png" url:"png,omitempty"`
UUID string `json:"uuid" url:"uuid,omitempty"`
WAV string `json:"wav" url:"wav,omitempty"`
Error Optional[string] `json:"error"`
}
type VerifyEmail struct {
Token string `json:"token" url:"token,omitempty"`
}
type ModHideCommunity struct {
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
Hidden bool `json:"hidden" url:"hidden,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
When time.Time `json:"when_" url:"when_,omitempty"`
}
type BanFromCommunityResponse struct {
Banned bool `json:"banned" url:"banned,omitempty"`
PersonView PersonView `json:"person_view" url:"person_view,omitempty"`
Error Optional[string] `json:"error"`
}
type CommentView struct {
Comment Comment `json:"comment" url:"comment,omitempty"`
Community Community `json:"community" url:"community,omitempty"`
Counts CommentAggregates `json:"counts" url:"counts,omitempty"`
Creator Person `json:"creator" url:"creator,omitempty"`
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
CreatorBlocked bool `json:"creator_blocked" url:"creator_blocked,omitempty"`
CreatorIsAdmin bool `json:"creator_is_admin" url:"creator_is_admin,omitempty"`
CreatorIsModerator bool `json:"creator_is_moderator" url:"creator_is_moderator,omitempty"`
MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"`
Post Post `json:"post" url:"post,omitempty"`
Saved bool `json:"saved" url:"saved,omitempty"`
Subscribed SubscribedType `json:"subscribed" url:"subscribed,omitempty"`
}
type AdminPurgeCommunityView struct {
Admin Optional[Person] `json:"admin" url:"admin,omitempty"`
AdminPurgeCommunity AdminPurgeCommunity `json:"admin_purge_community" url:"admin_purge_community,omitempty"`
}
type PersonMentionResponse struct {
PersonMentionView PersonMentionView `json:"person_mention_view" url:"person_mention_view,omitempty"`
Error Optional[string] `json:"error"`
}
type BanFromCommunity struct {
Ban bool `json:"ban" url:"ban,omitempty"`
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
Expires Optional[int64] `json:"expires" url:"expires,omitempty"`
PersonID int64 `json:"person_id" url:"person_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
RemoveData Optional[bool] `json:"remove_data" url:"remove_data,omitempty"`
}
type AdminPurgeCommentView struct {
Admin Optional[Person] `json:"admin" url:"admin,omitempty"`
AdminPurgeComment AdminPurgeComment `json:"admin_purge_comment" url:"admin_purge_comment,omitempty"`
Post Post `json:"post" url:"post,omitempty"`
}
type LocalUser struct {
AcceptedApplication bool `json:"accepted_application" url:"accepted_application,omitempty"`
Admin bool `json:"admin" url:"admin,omitempty"`
AutoExpand bool `json:"auto_expand" url:"auto_expand,omitempty"`
BlurNSFW bool `json:"blur_nsfw" url:"blur_nsfw,omitempty"`
CollapseBotComments bool `json:"collapse_bot_comments" url:"collapse_bot_comments,omitempty"`
DefaultListingType ListingType `json:"default_listing_type" url:"default_listing_type,omitempty"`
DefaultSortType SortType `json:"default_sort_type" url:"default_sort_type,omitempty"`
Email Optional[string] `json:"email" url:"email,omitempty"`
EmailVerified bool `json:"email_verified" url:"email_verified,omitempty"`
EnableAnimatedImages bool `json:"enable_animated_images" url:"enable_animated_images,omitempty"`
EnableKeyboardNavigation bool `json:"enable_keyboard_navigation" url:"enable_keyboard_navigation,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
InfiniteScrollEnabled bool `json:"infinite_scroll_enabled" url:"infinite_scroll_enabled,omitempty"`
InterfaceLanguage string `json:"interface_language" url:"interface_language,omitempty"`
OpenLinksInNewTab bool `json:"open_links_in_new_tab" url:"open_links_in_new_tab,omitempty"`
PersonID int64 `json:"person_id" url:"person_id,omitempty"`
PostListingMode PostListingMode `json:"post_listing_mode" url:"post_listing_mode,omitempty"`
SendNotificationsToEmail bool `json:"send_notifications_to_email" url:"send_notifications_to_email,omitempty"`
ShowAvatars bool `json:"show_avatars" url:"show_avatars,omitempty"`
ShowBotAccounts bool `json:"show_bot_accounts" url:"show_bot_accounts,omitempty"`
ShowNSFW bool `json:"show_nsfw" url:"show_nsfw,omitempty"`
ShowReadPosts bool `json:"show_read_posts" url:"show_read_posts,omitempty"`
ShowScores bool `json:"show_scores" url:"show_scores,omitempty"`
Theme string `json:"theme" url:"theme,omitempty"`
TOTP2FAEnabled bool `json:"totp_2fa_enabled" url:"totp_2fa_enabled,omitempty"`
}
type BlockCommunity struct {
Block bool `json:"block" url:"block,omitempty"`
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
}
type Comment struct {
ApID string `json:"ap_id" url:"ap_id,omitempty"`
Content string `json:"content" url:"content,omitempty"`
CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"`
Deleted bool `json:"deleted" url:"deleted,omitempty"`
Distinguished bool `json:"distinguished" url:"distinguished,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
LanguageID int64 `json:"language_id" url:"language_id,omitempty"`
Local bool `json:"local" url:"local,omitempty"`
Path string `json:"path" url:"path,omitempty"`
PostID int64 `json:"post_id" url:"post_id,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Removed bool `json:"removed" url:"removed,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
}
type CreatePostReport struct {
PostID int64 `json:"post_id" url:"post_id,omitempty"`
Reason string `json:"reason" url:"reason,omitempty"`
}
type PrivateMessageReport struct {
CreatorID int64 `json:"creator_id" url:"creator_id,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
OriginalPMText string `json:"original_pm_text" url:"original_pm_text,omitempty"`
PrivateMessageID int64 `json:"private_message_id" url:"private_message_id,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Reason string `json:"reason" url:"reason,omitempty"`
Resolved bool `json:"resolved" url:"resolved,omitempty"`
ResolverID Optional[int64] `json:"resolver_id" url:"resolver_id,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
}
type DistinguishComment struct {
CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
Distinguished bool `json:"distinguished" url:"distinguished,omitempty"`
}
type GetSiteResponse struct {
Admins []PersonView `json:"admins" url:"admins,omitempty"`
AllLanguages []Language `json:"all_languages" url:"all_languages,omitempty"`
CustomEmojis []CustomEmojiView `json:"custom_emojis" url:"custom_emojis,omitempty"`
DiscussionLanguages []int64 `json:"discussion_languages" url:"discussion_languages,omitempty"`
MyUser Optional[MyUserInfo] `json:"my_user" url:"my_user,omitempty"`
SiteView SiteView `json:"site_view" url:"site_view,omitempty"`
Taglines []Tagline `json:"taglines" url:"taglines,omitempty"`
Version string `json:"version" url:"version,omitempty"`
Error Optional[string] `json:"error"`
}
type GetSiteMetadataResponse struct {
Metadata SiteMetadata `json:"metadata" url:"metadata,omitempty"`
Error Optional[string] `json:"error"`
}
type HideCommunity struct {
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
Hidden bool `json:"hidden" url:"hidden,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
}
type CreateCommentLike struct {
CommentID int64 `json:"comment_id" url:"comment_id,omitempty"`
Score int64 `json:"score" url:"score,omitempty"`
}
type Community struct {
ActorID string `json:"actor_id" url:"actor_id,omitempty"`
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
Deleted bool `json:"deleted" url:"deleted,omitempty"`
Description Optional[string] `json:"description" url:"description,omitempty"`
Hidden bool `json:"hidden" url:"hidden,omitempty"`
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
InstanceID int64 `json:"instance_id" url:"instance_id,omitempty"`
Local bool `json:"local" url:"local,omitempty"`
Name string `json:"name" url:"name,omitempty"`
NSFW bool `json:"nsfw" url:"nsfw,omitempty"`
PostingRestrictedToMods bool `json:"posting_restricted_to_mods" url:"posting_restricted_to_mods,omitempty"`
Published time.Time `json:"published" url:"published,omitempty"`
Removed bool `json:"removed" url:"removed,omitempty"`
Title string `json:"title" url:"title,omitempty"`
Updated time.Time `json:"updated" url:"updated,omitempty"`
}
type CommentReportResponse struct {
CommentReportView CommentReportView `json:"comment_report_view" url:"comment_report_view,omitempty"`
Error Optional[string] `json:"error"`
}
type ModRemoveCommunity struct {
CommunityID int64 `json:"community_id" url:"community_id,omitempty"`
ID int64 `json:"id" url:"id,omitempty"`
ModPersonID int64 `json:"mod_person_id" url:"mod_person_id,omitempty"`
Reason Optional[string] `json:"reason" url:"reason,omitempty"`
Removed bool `json:"removed" url:"removed,omitempty"`
When time.Time `json:"when_" url:"when_,omitempty"`
}
type GetPrivateMessages struct {
CreatorID Optional[int64] `json:"creator_id" url:"creator_id,omitempty"`
Limit Optional[int64] `json:"limit" url:"limit,omitempty"`
Page Optional[int64] `json:"page" url:"page,omitempty"`
UnreadOnly Optional[bool] `json:"unread_only" url:"unread_only,omitempty"`
}
type CommentReplyResponse struct {
CommentReplyView CommentReplyView `json:"comment_reply_view" url:"comment_reply_view,omitempty"`
Error Optional[string] `json:"error"`
}
type ResolveCommentReport struct {
ReportID int64 `json:"report_id" url:"report_id,omitempty"`
Resolved bool `json:"resolved" url:"resolved,omitempty"`
}
type BlockPerson struct {
Block bool `json:"block" url:"block,omitempty"`
PersonID int64 `json:"person_id" url:"person_id,omitempty"`
}
type PostReportView struct {
Community Community `json:"community" url:"community,omitempty"`
Counts PostAggregates `json:"counts" url:"counts,omitempty"`
Creator Person `json:"creator" url:"creator,omitempty"`
CreatorBannedFromCommunity bool `json:"creator_banned_from_community" url:"creator_banned_from_community,omitempty"`
MyVote Optional[int64] `json:"my_vote" url:"my_vote,omitempty"`
Post Post `json:"post" url:"post,omitempty"`
PostCreator Person `json:"post_creator" url:"post_creator,omitempty"`
PostReport PostReport `json:"post_report" url:"post_report,omitempty"`
Resolver Optional[Person] `json:"resolver" url:"resolver,omitempty"`
}
type CreateSite struct {
ActorNameMaxLength Optional[int64] `json:"actor_name_max_length" url:"actor_name_max_length,omitempty"`
AllowedInstances Optional[[]string] `json:"allowed_instances" url:"allowed_instances,omitempty"`
ApplicationEmailAdmins Optional[bool] `json:"application_email_admins" url:"application_email_admins,omitempty"`
ApplicationQuestion Optional[string] `json:"application_question" url:"application_question,omitempty"`
Banner Optional[string] `json:"banner" url:"banner,omitempty"`
BlockedInstances Optional[[]string] `json:"blocked_instances" url:"blocked_instances,omitempty"`
CaptchaDifficulty Optional[string] `json:"captcha_difficulty" url:"captcha_difficulty,omitempty"`
CaptchaEnabled Optional[bool] `json:"captcha_enabled" url:"captcha_enabled,omitempty"`
CommunityCreationAdminOnly Optional[bool] `json:"community_creation_admin_only" url:"community_creation_admin_only,omitempty"`
DefaultPostListingType Optional[ListingType] `json:"default_post_listing_type" url:"default_post_listing_type,omitempty"`
DefaultTheme Optional[string] `json:"default_theme" url:"default_theme,omitempty"`
Description Optional[string] `json:"description" url:"description,omitempty"`
DiscussionLanguages Optional[[]int64] `json:"discussion_languages" url:"discussion_languages,omitempty"`
EnableDownvotes Optional[bool] `json:"enable_downvotes" url:"enable_downvotes,omitempty"`
EnableNSFW Optional[bool] `json:"enable_nsfw" url:"enable_nsfw,omitempty"`
FederationDebug Optional[bool] `json:"federation_debug" url:"federation_debug,omitempty"`
FederationEnabled Optional[bool] `json:"federation_enabled" url:"federation_enabled,omitempty"`
HideModlogModNames Optional[bool] `json:"hide_modlog_mod_names" url:"hide_modlog_mod_names,omitempty"`
Icon Optional[string] `json:"icon" url:"icon,omitempty"`
LegalInformation Optional[string] `json:"legal_information" url:"legal_information,omitempty"`
Name string `json:"name" url:"name,omitempty"`
PrivateInstance Optional[bool] `json:"private_instance" url:"private_instance,omitempty"`
RateLimitComment Optional[int64] `json:"rate_limit_comment" url:"rate_limit_comment,omitempty"`
RateLimitCommentPerSecond Optional[int64] `json:"rate_limit_comment_per_second" url:"rate_limit_comment_per_second,omitempty"`
RateLimitImage Optional[int64] `json:"rate_limit_image" url:"rate_limit_image,omitempty"`
RateLimitImagePerSecond Optional[int64] `json:"rate_limit_image_per_second" url:"rate_limit_image_per_second,omitempty"`
RateLimitMessage Optional[int64] `json:"rate_limit_message" url:"rate_limit_message,omitempty"`
RateLimitMessagePerSecond Optional[int64] `json:"rate_limit_message_per_second" url:"rate_limit_message_per_second,omitempty"`
RateLimitPost Optional[int64] `json:"rate_limit_post" url:"rate_limit_post,omitempty"`
RateLimitPostPerSecond Optional[int64] `json:"rate_limit_post_per_second" url:"rate_limit_post_per_second,omitempty"`
RateLimitRegister Optional[int64] `json:"rate_limit_register" url:"rate_limit_register,omitempty"`
RateLimitRegisterPerSecond Optional[int64] `json:"rate_limit_register_per_second" url:"rate_limit_register_per_second,omitempty"`
RateLimitSearch Optional[int64] `json:"rate_limit_search" url:"rate_limit_search,omitempty"`
RateLimitSearchPerSecond Optional[int64] `json:"rate_limit_search_per_second" url:"rate_limit_search_per_second,omitempty"`
RegistrationMode Optional[RegistrationMode] `json:"registration_mode" url:"registration_mode,omitempty"`
RequireEmailVerification Optional[bool] `json:"require_email_verification" url:"require_email_verification,omitempty"`