mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-01 01:59:55 +00:00
Adding changes from lemmy, mainly removing aggregate ids. (#211)
This commit is contained in:
parent
09c10493a9
commit
6f0fab6d7d
19 changed files with 38 additions and 20 deletions
|
@ -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";
|
||||
|
|
|
@ -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;
|
|
@ -2,7 +2,6 @@
|
|||
import type { CommentId } from "./CommentId";
|
||||
|
||||
export interface CommentAggregates {
|
||||
id: number;
|
||||
comment_id: CommentId;
|
||||
score: /* integer */ number;
|
||||
upvotes: /* integer */ number;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import type { CommunityId } from "./CommunityId";
|
||||
|
||||
export interface CommunityAggregates {
|
||||
id: number;
|
||||
community_id: CommunityId;
|
||||
subscribers: /* integer */ number;
|
||||
posts: /* integer */ number;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import type { CustomEmojiId } from "./CustomEmojiId";
|
||||
|
||||
export interface CustomEmojiKeyword {
|
||||
id: number;
|
||||
custom_emoji_id: CustomEmojiId;
|
||||
keyword: string;
|
||||
}
|
||||
|
|
|
@ -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>;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
13
src/types/InstanceWithFederationState.ts
Normal file
13
src/types/InstanceWithFederationState.ts
Normal 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;
|
||||
}
|
|
@ -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" }
|
||||
|
|
|
@ -28,4 +28,5 @@ export interface LocalSite {
|
|||
updated?: string;
|
||||
registration_mode: RegistrationMode;
|
||||
reports_email_admins: boolean;
|
||||
federation_signed_fetch: boolean;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import type { LocalSiteId } from "./LocalSiteId";
|
||||
|
||||
export interface LocalSiteRateLimit {
|
||||
id: number;
|
||||
local_site_id: LocalSiteId;
|
||||
message: number;
|
||||
message_per_second: number;
|
||||
|
|
|
@ -30,4 +30,5 @@ export interface LocalUser {
|
|||
totp_2fa_enabled: boolean;
|
||||
enable_keyboard_navigation: boolean;
|
||||
enable_animated_images: boolean;
|
||||
collapse_bot_comments: boolean;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import type { LocalUserId } from "./LocalUserId";
|
||||
|
||||
export interface LoginToken {
|
||||
id: number;
|
||||
user_id: LocalUserId;
|
||||
published: string;
|
||||
ip?: string;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import type { PostId } from "./PostId";
|
||||
|
||||
export interface PostAggregates {
|
||||
id: number;
|
||||
post_id: PostId;
|
||||
comments: /* integer */ number;
|
||||
score: /* integer */ number;
|
||||
|
|
12
src/types/ReadableFederationState.ts
Normal file
12
src/types/ReadableFederationState.ts
Normal 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;
|
||||
}
|
|
@ -31,4 +31,5 @@ export interface SaveUserSettings {
|
|||
post_listing_mode?: PostListingMode;
|
||||
enable_keyboard_navigation?: boolean;
|
||||
enable_animated_images?: boolean;
|
||||
collapse_bot_comments?: boolean;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import type { SiteId } from "./SiteId";
|
||||
|
||||
export interface SiteAggregates {
|
||||
id: number;
|
||||
site_id: SiteId;
|
||||
users: /* integer */ number;
|
||||
posts: /* integer */ number;
|
||||
|
|
Loading…
Reference in a new issue