type changes

This commit is contained in:
maarten.vercruysse 2023-09-23 01:13:26 +02:00
parent 6d73de3616
commit 8f9fe6e435
101 changed files with 117 additions and 149 deletions

0
.husky/pre-commit Executable file → Normal file
View file

2
copy_generated_types_from_lemmy.sh Executable file → Normal file
View file

@ -2,7 +2,7 @@
# First re-generate the types by running cargo test on lemmy # First re-generate the types by running cargo test on lemmy
pushd ../lemmy/scripts pushd ../lemmy/scripts
./test.sh #./test.sh
cd ../crates cd ../crates

0
deploy.sh Executable file → Normal file
View file

View file

@ -84,6 +84,7 @@ export { EditSite } from "./types/EditSite";
export { FeaturePost } from "./types/FeaturePost"; export { FeaturePost } from "./types/FeaturePost";
export { FederatedInstances } from "./types/FederatedInstances"; export { FederatedInstances } from "./types/FederatedInstances";
export { FollowCommunity } from "./types/FollowCommunity"; export { FollowCommunity } from "./types/FollowCommunity";
export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
export { GetBannedPersons } from "./types/GetBannedPersons"; export { GetBannedPersons } from "./types/GetBannedPersons";
export { GetCaptcha } from "./types/GetCaptcha"; export { GetCaptcha } from "./types/GetCaptcha";
export { GetCaptchaResponse } from "./types/GetCaptchaResponse"; export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
@ -118,6 +119,8 @@ export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
export { GetUnreadRegistrationApplicationCount } from "./types/GetUnreadRegistrationApplicationCount"; export { GetUnreadRegistrationApplicationCount } from "./types/GetUnreadRegistrationApplicationCount";
export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse"; export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
export { HideCommunity } from "./types/HideCommunity"; export { HideCommunity } from "./types/HideCommunity";
export { ImageUpload } from "./types/ImageUpload";
export { ImageUploadId } from "./types/ImageUploadId";
export { Instance } from "./types/Instance"; export { Instance } from "./types/Instance";
export { InstanceBlockView } from "./types/InstanceBlockView"; export { InstanceBlockView } from "./types/InstanceBlockView";
export { InstanceId } from "./types/InstanceId"; export { InstanceId } from "./types/InstanceId";
@ -177,6 +180,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
export { ModlogActionType } from "./types/ModlogActionType"; export { ModlogActionType } from "./types/ModlogActionType";
export { ModlogListParams } from "./types/ModlogListParams"; export { ModlogListParams } from "./types/ModlogListParams";
export { MyUserInfo } from "./types/MyUserInfo"; export { MyUserInfo } from "./types/MyUserInfo";
export { PaginationCursor } from "./types/PaginationCursor";
export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset"; export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
export { PasswordReset } from "./types/PasswordReset"; export { PasswordReset } from "./types/PasswordReset";
export { PasswordResetResponse } from "./types/PasswordResetResponse"; export { PasswordResetResponse } from "./types/PasswordResetResponse";
@ -248,8 +252,10 @@ export { SortType } from "./types/SortType";
export { SubscribedType } from "./types/SubscribedType"; export { SubscribedType } from "./types/SubscribedType";
export { Tagline } from "./types/Tagline"; export { Tagline } from "./types/Tagline";
export { TransferCommunity } from "./types/TransferCommunity"; export { TransferCommunity } from "./types/TransferCommunity";
export { UpdateTotp } from "./types/UpdateTotp";
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
export { UserJoin } from "./types/UserJoin"; export { UserJoin } from "./types/UserJoin";
export { UserJoinResponse } from "./types/UserJoinResponse"; export { UserJoinResponse } from "./types/UserJoinResponse";
export { VerifyEmail } from "./types/VerifyEmail"; export { VerifyEmail } from "./types/VerifyEmail";
export { VerifyEmailResponse } from "./types/VerifyEmailResponse"; export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
export { UploadImage, UploadImageResponse, ImageFile } from "./types/others"; export { ImageFile, UploadImage, UploadImageResponse } from "./types/others";

View file

@ -4,5 +4,4 @@ import type { PersonId } from "./PersonId";
export interface AddAdmin { export interface AddAdmin {
person_id: PersonId; person_id: PersonId;
added: boolean; added: boolean;
auth: string;
} }

View file

@ -6,5 +6,4 @@ export interface AddModToCommunity {
community_id: CommunityId; community_id: CommunityId;
person_id: PersonId; person_id: PersonId;
added: boolean; added: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ export interface ApproveRegistrationApplication {
id: number; id: number;
approve: boolean; approve: boolean;
deny_reason?: string; deny_reason?: string;
auth: string;
} }

View file

@ -8,6 +8,5 @@ export interface BanFromCommunity {
ban: boolean; ban: boolean;
remove_data?: boolean; remove_data?: boolean;
reason?: string; reason?: string;
expires?: number; expires?: /* integer */ number;
auth: string;
} }

View file

@ -6,6 +6,5 @@ export interface BanPerson {
ban: boolean; ban: boolean;
remove_data?: boolean; remove_data?: boolean;
reason?: string; reason?: string;
expires?: number; expires?: /* integer */ number;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface BlockCommunity { export interface BlockCommunity {
community_id: CommunityId; community_id: CommunityId;
block: boolean; block: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { InstanceId } from "./InstanceId";
export interface BlockInstance { export interface BlockInstance {
instance_id: InstanceId; instance_id: InstanceId;
block: boolean; block: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PersonId } from "./PersonId";
export interface BlockPerson { export interface BlockPerson {
person_id: PersonId; person_id: PersonId;
block: boolean; block: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ export interface ChangePassword {
new_password: string; new_password: string;
new_password_verify: string; new_password_verify: string;
old_password: string; old_password: string;
auth: string;
} }

View file

@ -4,9 +4,9 @@ import type { CommentId } from "./CommentId";
export interface CommentAggregates { export interface CommentAggregates {
id: number; id: number;
comment_id: CommentId; comment_id: CommentId;
score: number; score: /* integer */ number;
upvotes: number; upvotes: /* integer */ number;
downvotes: number; downvotes: /* integer */ number;
published: string; published: string;
child_count: number; child_count: number;
hot_rank: number; hot_rank: number;

View file

@ -16,8 +16,6 @@ export interface Community {
local: boolean; local: boolean;
icon?: string; icon?: string;
banner?: string; banner?: string;
followers_url: string;
inbox_url: string;
hidden: boolean; hidden: boolean;
posting_restricted_to_mods: boolean; posting_restricted_to_mods: boolean;
instance_id: InstanceId; instance_id: InstanceId;

View file

@ -4,13 +4,13 @@ import type { CommunityId } from "./CommunityId";
export interface CommunityAggregates { export interface CommunityAggregates {
id: number; id: number;
community_id: CommunityId; community_id: CommunityId;
subscribers: number; subscribers: /* integer */ number;
posts: number; posts: /* integer */ number;
comments: number; comments: /* integer */ number;
published: string; published: string;
users_active_day: number; users_active_day: /* integer */ number;
users_active_week: number; users_active_week: /* integer */ number;
users_active_month: number; users_active_month: /* integer */ number;
users_active_half_year: number; users_active_half_year: /* integer */ number;
hot_rank: number; hot_rank: number;
} }

View file

@ -8,5 +8,4 @@ export interface CreateComment {
post_id: PostId; post_id: PostId;
parent_id?: CommentId; parent_id?: CommentId;
language_id?: LanguageId; language_id?: LanguageId;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface CreateCommentLike { export interface CreateCommentLike {
comment_id: CommentId; comment_id: CommentId;
score: number; score: number;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface CreateCommentReport { export interface CreateCommentReport {
comment_id: CommentId; comment_id: CommentId;
reason: string; reason: string;
auth: string;
} }

View file

@ -10,5 +10,4 @@ export interface CreateCommunity {
nsfw?: boolean; nsfw?: boolean;
posting_restricted_to_mods?: boolean; posting_restricted_to_mods?: boolean;
discussion_languages?: Array<LanguageId>; discussion_languages?: Array<LanguageId>;
auth: string;
} }

View file

@ -6,5 +6,4 @@ export interface CreateCustomEmoji {
image_url: string; image_url: string;
alt_text: string; alt_text: string;
keywords: Array<string>; keywords: Array<string>;
auth: string;
} }

View file

@ -10,5 +10,4 @@ export interface CreatePost {
honeypot?: string; honeypot?: string;
nsfw?: boolean; nsfw?: boolean;
language_id?: LanguageId; language_id?: LanguageId;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface CreatePostLike { export interface CreatePostLike {
post_id: PostId; post_id: PostId;
score: number; score: number;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface CreatePostReport { export interface CreatePostReport {
post_id: PostId; post_id: PostId;
reason: string; reason: string;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PersonId } from "./PersonId";
export interface CreatePrivateMessage { export interface CreatePrivateMessage {
content: string; content: string;
recipient_id: PersonId; recipient_id: PersonId;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
export interface CreatePrivateMessageReport { export interface CreatePrivateMessageReport {
private_message_id: PrivateMessageId; private_message_id: PrivateMessageId;
reason: string; reason: string;
auth: string;
} }

View file

@ -43,5 +43,4 @@ export interface CreateSite {
blocked_instances?: Array<string>; blocked_instances?: Array<string>;
taglines?: Array<string>; taglines?: Array<string>;
registration_mode?: RegistrationMode; registration_mode?: RegistrationMode;
auth: string;
} }

View file

@ -3,5 +3,4 @@
export interface DeleteAccount { export interface DeleteAccount {
password: string; password: string;
delete_content: boolean; delete_content: boolean;
auth: string;
} }

View file

@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type DeleteAccountResponse = null; export type DeleteAccountResponse = Record<string, never>;

View file

@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface DeleteComment { export interface DeleteComment {
comment_id: CommentId; comment_id: CommentId;
deleted: boolean; deleted: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface DeleteCommunity { export interface DeleteCommunity {
community_id: CommunityId; community_id: CommunityId;
deleted: boolean; deleted: boolean;
auth: string;
} }

View file

@ -3,5 +3,4 @@ import type { CustomEmojiId } from "./CustomEmojiId";
export interface DeleteCustomEmoji { export interface DeleteCustomEmoji {
id: CustomEmojiId; id: CustomEmojiId;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface DeletePost { export interface DeletePost {
post_id: PostId; post_id: PostId;
deleted: boolean; deleted: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
export interface DeletePrivateMessage { export interface DeletePrivateMessage {
private_message_id: PrivateMessageId; private_message_id: PrivateMessageId;
deleted: boolean; deleted: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface DistinguishComment { export interface DistinguishComment {
comment_id: CommentId; comment_id: CommentId;
distinguished: boolean; distinguished: boolean;
auth: string;
} }

View file

@ -6,5 +6,4 @@ export interface EditComment {
comment_id: CommentId; comment_id: CommentId;
content?: string; content?: string;
language_id?: LanguageId; language_id?: LanguageId;
auth: string;
} }

View file

@ -11,5 +11,4 @@ export interface EditCommunity {
nsfw?: boolean; nsfw?: boolean;
posting_restricted_to_mods?: boolean; posting_restricted_to_mods?: boolean;
discussion_languages?: Array<LanguageId>; discussion_languages?: Array<LanguageId>;
auth: string;
} }

View file

@ -7,5 +7,4 @@ export interface EditCustomEmoji {
image_url: string; image_url: string;
alt_text: string; alt_text: string;
keywords: Array<string>; keywords: Array<string>;
auth: string;
} }

View file

@ -9,5 +9,4 @@ export interface EditPost {
body?: string; body?: string;
nsfw?: boolean; nsfw?: boolean;
language_id?: LanguageId; language_id?: LanguageId;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
export interface EditPrivateMessage { export interface EditPrivateMessage {
private_message_id: PrivateMessageId; private_message_id: PrivateMessageId;
content: string; content: string;
auth: string;
} }

View file

@ -44,5 +44,4 @@ export interface EditSite {
taglines?: Array<string>; taglines?: Array<string>;
registration_mode?: RegistrationMode; registration_mode?: RegistrationMode;
reports_email_admins?: boolean; reports_email_admins?: boolean;
auth: string;
} }

View file

@ -6,5 +6,4 @@ export interface FeaturePost {
post_id: PostId; post_id: PostId;
featured: boolean; featured: boolean;
feature_type: PostFeatureType; feature_type: PostFeatureType;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface FollowCommunity { export interface FollowCommunity {
community_id: CommunityId; community_id: CommunityId;
follow: boolean; follow: boolean;
auth: string;
} }

View file

@ -0,0 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface GenerateTotpSecretResponse {
totp_secret_url: string;
}

View file

@ -3,5 +3,4 @@ import type { CommentId } from "./CommentId";
export interface GetComment { export interface GetComment {
id: CommentId; id: CommentId;
auth?: string;
} }

View file

@ -9,8 +9,8 @@ export interface GetComments {
type_?: ListingType; type_?: ListingType;
sort?: CommentSortType; sort?: CommentSortType;
max_depth?: number; max_depth?: number;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
community_id?: CommunityId; community_id?: CommunityId;
community_name?: string; community_name?: string;
post_id?: PostId; post_id?: PostId;
@ -18,5 +18,4 @@ export interface GetComments {
saved_only?: boolean; saved_only?: boolean;
liked_only?: boolean; liked_only?: boolean;
disliked_only?: boolean; disliked_only?: boolean;
auth?: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface GetCommunity { export interface GetCommunity {
id?: CommunityId; id?: CommunityId;
name?: string; name?: string;
auth?: string;
} }

View file

@ -6,9 +6,8 @@ import type { PersonId } from "./PersonId";
export interface GetModlog { export interface GetModlog {
mod_person_id?: PersonId; mod_person_id?: PersonId;
community_id?: CommunityId; community_id?: CommunityId;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
type_?: ModlogActionType; type_?: ModlogActionType;
other_person_id?: PersonId; other_person_id?: PersonId;
auth?: string;
} }

View file

@ -7,9 +7,8 @@ export interface GetPersonDetails {
person_id?: PersonId; person_id?: PersonId;
username?: string; username?: string;
sort?: SortType; sort?: SortType;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
community_id?: CommunityId; community_id?: CommunityId;
saved_only?: boolean; saved_only?: boolean;
auth?: string;
} }

View file

@ -3,8 +3,7 @@ import type { CommentSortType } from "./CommentSortType";
export interface GetPersonMentions { export interface GetPersonMentions {
sort?: CommentSortType; sort?: CommentSortType;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
unread_only?: boolean; unread_only?: boolean;
auth: string;
} }

View file

@ -5,5 +5,4 @@ import type { PostId } from "./PostId";
export interface GetPost { export interface GetPost {
id?: PostId; id?: PostId;
comment_id?: CommentId; comment_id?: CommentId;
auth?: string;
} }

View file

@ -1,17 +1,18 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CommunityId } from "./CommunityId"; import type { CommunityId } from "./CommunityId";
import type { ListingType } from "./ListingType"; import type { ListingType } from "./ListingType";
import type { PaginationCursor } from "./PaginationCursor";
import type { SortType } from "./SortType"; import type { SortType } from "./SortType";
export interface GetPosts { export interface GetPosts {
type_?: ListingType; type_?: ListingType;
sort?: SortType; sort?: SortType;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
community_id?: CommunityId; community_id?: CommunityId;
community_name?: string; community_name?: string;
saved_only?: boolean; saved_only?: boolean;
liked_only?: boolean; liked_only?: boolean;
disliked_only?: boolean; disliked_only?: boolean;
auth?: string; page_cursor?: PaginationCursor;
} }

View file

@ -1,6 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PaginationCursor } from "./PaginationCursor";
import type { PostView } from "./PostView"; import type { PostView } from "./PostView";
export interface GetPostsResponse { export interface GetPostsResponse {
posts: Array<PostView>; posts: Array<PostView>;
next_page?: PaginationCursor;
} }

View file

@ -3,8 +3,7 @@ import type { PersonId } from "./PersonId";
export interface GetPrivateMessages { export interface GetPrivateMessages {
unread_only?: boolean; unread_only?: boolean;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
creator_id?: PersonId; creator_id?: PersonId;
auth: string;
} }

View file

@ -3,8 +3,7 @@ import type { CommentSortType } from "./CommentSortType";
export interface GetReplies { export interface GetReplies {
sort?: CommentSortType; sort?: CommentSortType;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
unread_only?: boolean; unread_only?: boolean;
auth: string;
} }

View file

@ -3,5 +3,4 @@ import type { CommunityId } from "./CommunityId";
export interface GetReportCount { export interface GetReportCount {
community_id?: CommunityId; community_id?: CommunityId;
auth: string;
} }

View file

@ -3,7 +3,7 @@ import type { CommunityId } from "./CommunityId";
export interface GetReportCountResponse { export interface GetReportCountResponse {
community_id?: CommunityId; community_id?: CommunityId;
comment_reports: number; comment_reports: /* integer */ number;
post_reports: number; post_reports: /* integer */ number;
private_message_reports?: number; private_message_reports?: /* integer */ number;
} }

View file

@ -1,7 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface GetUnreadCountResponse { export interface GetUnreadCountResponse {
replies: number; replies: /* integer */ number;
mentions: number; mentions: /* integer */ number;
private_messages: number; private_messages: /* integer */ number;
} }

View file

@ -1,5 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface GetUnreadRegistrationApplicationCountResponse { export interface GetUnreadRegistrationApplicationCountResponse {
registration_applications: number; registration_applications: /* integer */ number;
} }

View file

@ -5,5 +5,4 @@ export interface HideCommunity {
community_id: CommunityId; community_id: CommunityId;
hidden: boolean; hidden: boolean;
reason?: string; reason?: string;
auth: string;
} }

11
src/types/ImageUpload.ts Normal file
View file

@ -0,0 +1,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ImageUploadId } from "./ImageUploadId";
import type { LocalUserId } from "./LocalUserId";
export interface ImageUpload {
id: ImageUploadId;
local_user_id: LocalUserId;
pictrs_alias: string;
pictrs_delete_token: string;
published: string;
}

View file

@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type ImageUploadId = number;

View file

@ -2,9 +2,8 @@
import type { CommunityId } from "./CommunityId"; import type { CommunityId } from "./CommunityId";
export interface ListCommentReports { export interface ListCommentReports {
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
unresolved_only?: boolean; unresolved_only?: boolean;
community_id?: CommunityId; community_id?: CommunityId;
auth: string;
} }

View file

@ -6,7 +6,6 @@ export interface ListCommunities {
type_?: ListingType; type_?: ListingType;
sort?: SortType; sort?: SortType;
show_nsfw?: boolean; show_nsfw?: boolean;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
auth?: string;
} }

View file

@ -2,9 +2,8 @@
import type { CommunityId } from "./CommunityId"; import type { CommunityId } from "./CommunityId";
export interface ListPostReports { export interface ListPostReports {
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
unresolved_only?: boolean; unresolved_only?: boolean;
community_id?: CommunityId; community_id?: CommunityId;
auth: string;
} }

View file

@ -1,8 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface ListPrivateMessageReports { export interface ListPrivateMessageReports {
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
unresolved_only?: boolean; unresolved_only?: boolean;
auth: string;
} }

View file

@ -2,7 +2,6 @@
export interface ListRegistrationApplications { export interface ListRegistrationApplications {
unread_only?: boolean; unread_only?: boolean;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
auth: string;
} }

View file

@ -23,11 +23,11 @@ export interface LocalUser {
show_new_post_notifs: boolean; show_new_post_notifs: boolean;
email_verified: boolean; email_verified: boolean;
accepted_application: boolean; accepted_application: boolean;
totp_2fa_url?: string;
open_links_in_new_tab: boolean; open_links_in_new_tab: boolean;
blur_nsfw: boolean; blur_nsfw: boolean;
auto_expand: boolean; auto_expand: boolean;
infinite_scroll_enabled: boolean; infinite_scroll_enabled: boolean;
admin: boolean; admin: boolean;
post_listing_mode: PostListingMode; post_listing_mode: PostListingMode;
totp_2fa_enabled: boolean;
} }

View file

@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface LockPost { export interface LockPost {
post_id: PostId; post_id: PostId;
locked: boolean; locked: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommentReplyId } from "./CommentReplyId";
export interface MarkCommentReplyAsRead { export interface MarkCommentReplyAsRead {
comment_reply_id: CommentReplyId; comment_reply_id: CommentReplyId;
read: boolean; read: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PersonMentionId } from "./PersonMentionId";
export interface MarkPersonMentionAsRead { export interface MarkPersonMentionAsRead {
person_mention_id: PersonMentionId; person_mention_id: PersonMentionId;
read: boolean; read: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface MarkPostAsRead { export interface MarkPostAsRead {
post_id: PostId; post_id: PostId;
read: boolean; read: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
export interface MarkPrivateMessageAsRead { export interface MarkPrivateMessageAsRead {
private_message_id: PrivateMessageId; private_message_id: PrivateMessageId;
read: boolean; read: boolean;
auth: string;
} }

View file

@ -6,7 +6,7 @@ export interface ModlogListParams {
community_id?: CommunityId; community_id?: CommunityId;
mod_person_id?: PersonId; mod_person_id?: PersonId;
other_person_id?: PersonId; other_person_id?: PersonId;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
hide_modlog_names: boolean; hide_modlog_names: boolean;
} }

View file

@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type PaginationCursor = string;

View file

@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type PasswordResetResponse = null; export type PasswordResetResponse = Record<string, never>;

View file

@ -15,7 +15,6 @@ export interface Person {
local: boolean; local: boolean;
banner?: string; banner?: string;
deleted: boolean; deleted: boolean;
inbox_url: string;
matrix_user_id?: string; matrix_user_id?: string;
bot_account: boolean; bot_account: boolean;
ban_expires?: string; ban_expires?: string;

View file

@ -4,8 +4,8 @@ import type { PersonId } from "./PersonId";
export interface PersonAggregates { export interface PersonAggregates {
id: number; id: number;
person_id: PersonId; person_id: PersonId;
post_count: number; post_count: /* integer */ number;
post_score: number; post_score: /* integer */ number;
comment_count: number; comment_count: /* integer */ number;
comment_score: number; comment_score: /* integer */ number;
} }

View file

@ -7,10 +7,10 @@ import type { PostId } from "./PostId";
export interface PostAggregates { export interface PostAggregates {
id: number; id: number;
post_id: PostId; post_id: PostId;
comments: number; comments: /* integer */ number;
score: number; score: /* integer */ number;
upvotes: number; upvotes: /* integer */ number;
downvotes: number; downvotes: /* integer */ number;
published: string; published: string;
newest_comment_time_necro: string; newest_comment_time_necro: string;
newest_comment_time: string; newest_comment_time: string;
@ -22,4 +22,5 @@ export interface PostAggregates {
creator_id: PersonId; creator_id: PersonId;
controversy_rank: number; controversy_rank: number;
instance_id: InstanceId; instance_id: InstanceId;
scaled_rank: number;
} }

View file

@ -16,5 +16,5 @@ export interface PostView {
read: boolean; read: boolean;
creator_blocked: boolean; creator_blocked: boolean;
my_vote?: number; my_vote?: number;
unread_comments: number; unread_comments: /* integer */ number;
} }

View file

@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface PurgeComment { export interface PurgeComment {
comment_id: CommentId; comment_id: CommentId;
reason?: string; reason?: string;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommunityId } from "./CommunityId";
export interface PurgeCommunity { export interface PurgeCommunity {
community_id: CommunityId; community_id: CommunityId;
reason?: string; reason?: string;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PersonId } from "./PersonId";
export interface PurgePerson { export interface PurgePerson {
person_id: PersonId; person_id: PersonId;
reason?: string; reason?: string;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface PurgePost { export interface PurgePost {
post_id: PostId; post_id: PostId;
reason?: string; reason?: string;
auth: string;
} }

View file

@ -5,5 +5,4 @@ export interface RemoveComment {
comment_id: CommentId; comment_id: CommentId;
removed: boolean; removed: boolean;
reason?: string; reason?: string;
auth: string;
} }

View file

@ -5,6 +5,5 @@ export interface RemoveCommunity {
community_id: CommunityId; community_id: CommunityId;
removed: boolean; removed: boolean;
reason?: string; reason?: string;
expires?: number; expires?: /* integer */ number;
auth: string;
} }

View file

@ -5,5 +5,4 @@ export interface RemovePost {
post_id: PostId; post_id: PostId;
removed: boolean; removed: boolean;
reason?: string; reason?: string;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommentReportId } from "./CommentReportId";
export interface ResolveCommentReport { export interface ResolveCommentReport {
report_id: CommentReportId; report_id: CommentReportId;
resolved: boolean; resolved: boolean;
auth: string;
} }

View file

@ -2,5 +2,4 @@
export interface ResolveObject { export interface ResolveObject {
q: string; q: string;
auth: string | null;
} }

View file

@ -4,5 +4,4 @@ import type { PostReportId } from "./PostReportId";
export interface ResolvePostReport { export interface ResolvePostReport {
report_id: PostReportId; report_id: PostReportId;
resolved: boolean; resolved: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PrivateMessageReportId } from "./PrivateMessageReportId";
export interface ResolvePrivateMessageReport { export interface ResolvePrivateMessageReport {
report_id: PrivateMessageReportId; report_id: PrivateMessageReportId;
resolved: boolean; resolved: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { CommentId } from "./CommentId";
export interface SaveComment { export interface SaveComment {
comment_id: CommentId; comment_id: CommentId;
save: boolean; save: boolean;
auth: string;
} }

View file

@ -4,5 +4,4 @@ import type { PostId } from "./PostId";
export interface SavePost { export interface SavePost {
post_id: PostId; post_id: PostId;
save: boolean; save: boolean;
auth: string;
} }

View file

@ -25,8 +25,6 @@ export interface SaveUserSettings {
show_read_posts?: boolean; show_read_posts?: boolean;
show_new_post_notifs?: boolean; show_new_post_notifs?: boolean;
discussion_languages?: Array<LanguageId>; discussion_languages?: Array<LanguageId>;
generate_totp_2fa?: boolean;
auth: string;
open_links_in_new_tab?: boolean; open_links_in_new_tab?: boolean;
infinite_scroll_enabled?: boolean; infinite_scroll_enabled?: boolean;
} }

View file

@ -13,7 +13,6 @@ export interface Search {
type_?: SearchType; type_?: SearchType;
sort?: SortType; sort?: SortType;
listing_type?: ListingType; listing_type?: ListingType;
page?: number; page?: /* integer */ number;
limit?: number; limit?: /* integer */ number;
auth?: string;
} }

View file

@ -4,12 +4,12 @@ import type { SiteId } from "./SiteId";
export interface SiteAggregates { export interface SiteAggregates {
id: number; id: number;
site_id: SiteId; site_id: SiteId;
users: number; users: /* integer */ number;
posts: number; posts: /* integer */ number;
comments: number; comments: /* integer */ number;
communities: number; communities: /* integer */ number;
users_active_day: number; users_active_day: /* integer */ number;
users_active_week: number; users_active_week: /* integer */ number;
users_active_month: number; users_active_month: /* integer */ number;
users_active_half_year: number; users_active_half_year: /* integer */ number;
} }

View file

@ -18,4 +18,5 @@ export type SortType =
| "TopThreeMonths" | "TopThreeMonths"
| "TopSixMonths" | "TopSixMonths"
| "TopNineMonths" | "TopNineMonths"
| "Controversial"; | "Controversial"
| "Scaled";

View file

@ -5,5 +5,4 @@ import type { PersonId } from "./PersonId";
export interface TransferCommunity { export interface TransferCommunity {
community_id: CommunityId; community_id: CommunityId;
person_id: PersonId; person_id: PersonId;
auth: string;
} }

6
src/types/UpdateTotp.ts Normal file
View file

@ -0,0 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface UpdateTotp {
totp_token: string;
enabled: boolean;
}

View file

@ -0,0 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface UpdateTotpResponse {
enabled: boolean;
}

Some files were not shown because too many files have changed in this diff Show more