Adding changes from lemmy, mainly removing aggregate ids.

This commit is contained in:
Dessalines 2023-11-13 11:42:10 -05:00
parent 09c10493a9
commit 807a97f05c
19 changed files with 38 additions and 20 deletions

View file

@ -1,4 +1,5 @@
export * from "./http"; export * from "./http";
export { ActivityId } from "./types/ActivityId";
export { AddAdmin } from "./types/AddAdmin"; export { AddAdmin } from "./types/AddAdmin";
export { AddAdminResponse } from "./types/AddAdminResponse"; export { AddAdminResponse } from "./types/AddAdminResponse";
export { AddModToCommunity } from "./types/AddModToCommunity"; export { AddModToCommunity } from "./types/AddModToCommunity";
@ -41,7 +42,6 @@ export { CommentSortType } from "./types/CommentSortType";
export { CommentView } from "./types/CommentView"; export { CommentView } from "./types/CommentView";
export { Community } from "./types/Community"; export { Community } from "./types/Community";
export { CommunityAggregates } from "./types/CommunityAggregates"; export { CommunityAggregates } from "./types/CommunityAggregates";
export { CommunityBlockId } from "./types/CommunityBlockId";
export { CommunityBlockView } from "./types/CommunityBlockView"; export { CommunityBlockView } from "./types/CommunityBlockView";
export { CommunityFollowerView } from "./types/CommunityFollowerView"; export { CommunityFollowerView } from "./types/CommunityFollowerView";
export { CommunityId } from "./types/CommunityId"; export { CommunityId } from "./types/CommunityId";
@ -110,10 +110,10 @@ export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
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 { 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";
export { InstanceWithFederationState } from "./types/InstanceWithFederationState";
export { Language } from "./types/Language"; export { Language } from "./types/Language";
export { LanguageId } from "./types/LanguageId"; export { LanguageId } from "./types/LanguageId";
export { LemmyErrorType } from "./types/LemmyErrorType"; export { LemmyErrorType } from "./types/LemmyErrorType";
@ -204,6 +204,7 @@ export { PurgeComment } from "./types/PurgeComment";
export { PurgeCommunity } from "./types/PurgeCommunity"; export { PurgeCommunity } from "./types/PurgeCommunity";
export { PurgePerson } from "./types/PurgePerson"; export { PurgePerson } from "./types/PurgePerson";
export { PurgePost } from "./types/PurgePost"; export { PurgePost } from "./types/PurgePost";
export { ReadableFederationState } from "./types/ReadableFederationState";
export { Register } from "./types/Register"; export { Register } from "./types/Register";
export { RegistrationApplication } from "./types/RegistrationApplication"; export { RegistrationApplication } from "./types/RegistrationApplication";
export { RegistrationApplicationResponse } from "./types/RegistrationApplicationResponse"; export { RegistrationApplicationResponse } from "./types/RegistrationApplicationResponse";

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 CommunityBlockId = number; export type ActivityId = /* integer */ number;

View file

@ -2,7 +2,6 @@
import type { CommentId } from "./CommentId"; import type { CommentId } from "./CommentId";
export interface CommentAggregates { export interface CommentAggregates {
id: number;
comment_id: CommentId; comment_id: CommentId;
score: /* integer */ number; score: /* integer */ number;
upvotes: /* integer */ number; upvotes: /* integer */ number;

View file

@ -2,7 +2,6 @@
import type { CommunityId } from "./CommunityId"; import type { CommunityId } from "./CommunityId";
export interface CommunityAggregates { export interface CommunityAggregates {
id: number;
community_id: CommunityId; community_id: CommunityId;
subscribers: /* integer */ number; subscribers: /* integer */ number;
posts: /* integer */ number; posts: /* integer */ number;

View file

@ -2,7 +2,6 @@
import type { CustomEmojiId } from "./CustomEmojiId"; import type { CustomEmojiId } from "./CustomEmojiId";
export interface CustomEmojiKeyword { export interface CustomEmojiKeyword {
id: number;
custom_emoji_id: CustomEmojiId; custom_emoji_id: CustomEmojiId;
keyword: string; keyword: string;
} }

View file

@ -1,8 +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 { Instance } from "./Instance"; import type { InstanceWithFederationState } from "./InstanceWithFederationState";
export interface FederatedInstances { export interface FederatedInstances {
linked: Array<Instance>; linked: Array<InstanceWithFederationState>;
allowed: Array<Instance>; allowed: Array<InstanceWithFederationState>;
blocked: Array<Instance>; blocked: Array<InstanceWithFederationState>;
} }

View file

@ -1,9 +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.
import type { ImageUploadId } from "./ImageUploadId";
import type { LocalUserId } from "./LocalUserId"; import type { LocalUserId } from "./LocalUserId";
export interface ImageUpload { export interface ImageUpload {
id: ImageUploadId;
local_user_id: LocalUserId; local_user_id: LocalUserId;
pictrs_alias: string; pictrs_alias: string;
pictrs_delete_token: string; pictrs_delete_token: string;

View file

@ -1,3 +0,0 @@
// 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

@ -0,0 +1,13 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { InstanceId } from "./InstanceId";
import type { ReadableFederationState } from "./ReadableFederationState";
export interface InstanceWithFederationState {
id: InstanceId;
domain: string;
published: string;
updated?: string;
software?: string;
version?: string;
federation_state?: ReadableFederationState;
}

View file

@ -35,6 +35,8 @@ export type LemmyErrorType =
| { error: "couldnt_find_community" } | { error: "couldnt_find_community" }
| { error: "couldnt_find_person" } | { error: "couldnt_find_person" }
| { error: "person_is_blocked" } | { error: "person_is_blocked" }
| { error: "community_is_blocked" }
| { error: "instance_is_blocked" }
| { error: "downvotes_are_disabled" } | { error: "downvotes_are_disabled" }
| { error: "instance_is_private" } | { error: "instance_is_private" }
| { error: "invalid_password" } | { error: "invalid_password" }

View file

@ -28,4 +28,5 @@ export interface LocalSite {
updated?: string; updated?: string;
registration_mode: RegistrationMode; registration_mode: RegistrationMode;
reports_email_admins: boolean; reports_email_admins: boolean;
federation_signed_fetch: boolean;
} }

View file

@ -2,7 +2,6 @@
import type { LocalSiteId } from "./LocalSiteId"; import type { LocalSiteId } from "./LocalSiteId";
export interface LocalSiteRateLimit { export interface LocalSiteRateLimit {
id: number;
local_site_id: LocalSiteId; local_site_id: LocalSiteId;
message: number; message: number;
message_per_second: number; message_per_second: number;

View file

@ -30,4 +30,5 @@ export interface LocalUser {
totp_2fa_enabled: boolean; totp_2fa_enabled: boolean;
enable_keyboard_navigation: boolean; enable_keyboard_navigation: boolean;
enable_animated_images: boolean; enable_animated_images: boolean;
collapse_bot_comments: boolean;
} }

View file

@ -2,7 +2,6 @@
import type { LocalUserId } from "./LocalUserId"; import type { LocalUserId } from "./LocalUserId";
export interface LoginToken { export interface LoginToken {
id: number;
user_id: LocalUserId; user_id: LocalUserId;
published: string; published: string;
ip?: string; ip?: string;

View file

@ -2,7 +2,6 @@
import type { PersonId } from "./PersonId"; import type { PersonId } from "./PersonId";
export interface PersonAggregates { export interface PersonAggregates {
id: number;
person_id: PersonId; person_id: PersonId;
post_count: /* integer */ number; post_count: /* integer */ number;
comment_count: /* integer */ number; comment_count: /* integer */ number;

View file

@ -2,7 +2,6 @@
import type { PostId } from "./PostId"; import type { PostId } from "./PostId";
export interface PostAggregates { export interface PostAggregates {
id: number;
post_id: PostId; post_id: PostId;
comments: /* integer */ number; comments: /* integer */ number;
score: /* integer */ number; score: /* integer */ number;

View file

@ -0,0 +1,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ActivityId } from "./ActivityId";
import type { InstanceId } from "./InstanceId";
export interface ReadableFederationState {
instance_id: InstanceId;
last_successful_id?: ActivityId;
last_successful_published_time?: string;
fail_count: number;
last_retry?: string;
next_retry?: string;
}

View file

@ -31,4 +31,5 @@ export interface SaveUserSettings {
post_listing_mode?: PostListingMode; post_listing_mode?: PostListingMode;
enable_keyboard_navigation?: boolean; enable_keyboard_navigation?: boolean;
enable_animated_images?: boolean; enable_animated_images?: boolean;
collapse_bot_comments?: boolean;
} }

View file

@ -2,7 +2,6 @@
import type { SiteId } from "./SiteId"; import type { SiteId } from "./SiteId";
export interface SiteAggregates { export interface SiteAggregates {
id: number;
site_id: SiteId; site_id: SiteId;
users: /* integer */ number; users: /* integer */ number;
posts: /* integer */ number; posts: /* integer */ number;