Adding changes from lemmy, mainly removing aggregate ids. (#211)

This commit is contained in:
Dessalines 2023-11-13 14:41:44 -05:00 committed by GitHub
parent 09c10493a9
commit 6f0fab6d7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 38 additions and 20 deletions

View file

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

View file

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

View file

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

View file

@ -2,7 +2,6 @@
import type { CustomEmojiId } from "./CustomEmojiId";
export interface CustomEmojiKeyword {
id: number;
custom_emoji_id: CustomEmojiId;
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.
import type { Instance } from "./Instance";
import type { InstanceWithFederationState } from "./InstanceWithFederationState";
export interface FederatedInstances {
linked: Array<Instance>;
allowed: Array<Instance>;
blocked: Array<Instance>;
linked: Array<InstanceWithFederationState>;
allowed: Array<InstanceWithFederationState>;
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.
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;

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_person" }
| { error: "person_is_blocked" }
| { error: "community_is_blocked" }
| { error: "instance_is_blocked" }
| { error: "downvotes_are_disabled" }
| { error: "instance_is_private" }
| { error: "invalid_password" }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,7 +2,6 @@
import type { PostId } from "./PostId";
export interface PostAggregates {
id: number;
post_id: PostId;
comments: /* 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;
enable_keyboard_navigation?: boolean;
enable_animated_images?: boolean;
collapse_bot_comments?: boolean;
}

View file

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