mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-22 20:31:12 +00:00
Adding a few types merged from main.
This commit is contained in:
parent
b1a473d15d
commit
5670d9d804
16 changed files with 47 additions and 8 deletions
|
@ -29,5 +29,5 @@ find src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} +
|
|||
|
||||
node putTypesInIndex.js
|
||||
|
||||
prettier -w src/types
|
||||
prettier -w src/types src/index.ts
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ export { BanPersonResponse } from "./types/BanPersonResponse";
|
|||
export { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
||||
export { BlockCommunity } from "./types/BlockCommunity";
|
||||
export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
||||
export { BlockInstance } from "./types/BlockInstance";
|
||||
export { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
||||
export { BlockPerson } from "./types/BlockPerson";
|
||||
export { BlockPersonResponse } from "./types/BlockPersonResponse";
|
||||
export { CaptchaResponse } from "./types/CaptchaResponse";
|
||||
|
@ -111,9 +113,11 @@ 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 { Language } from "./types/Language";
|
||||
export { LanguageId } from "./types/LanguageId";
|
||||
export { LemmyErrorType } from "./types/LemmyErrorType";
|
||||
export { ListCommentReports } from "./types/ListCommentReports";
|
||||
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
|
||||
export { ListCommunities } from "./types/ListCommunities";
|
||||
|
@ -163,6 +167,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
|
|||
export { ModlogActionType } from "./types/ModlogActionType";
|
||||
export { ModlogListParams } from "./types/ModlogListParams";
|
||||
export { MyUserInfo } from "./types/MyUserInfo";
|
||||
export { PaginationCursor } from "./types/PaginationCursor";
|
||||
export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
||||
export { PasswordReset } from "./types/PasswordReset";
|
||||
export { PasswordResetResponse } from "./types/PasswordResetResponse";
|
||||
|
@ -233,3 +238,4 @@ export { Tagline } from "./types/Tagline";
|
|||
export { TransferCommunity } from "./types/TransferCommunity";
|
||||
export { VerifyEmail } from "./types/VerifyEmail";
|
||||
export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
||||
export { UploadImage, UploadImageResponse, ImageFile } from "./types/others";
|
||||
|
|
8
src/types/BlockInstance.ts
Normal file
8
src/types/BlockInstance.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
// 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";
|
||||
|
||||
export interface BlockInstance {
|
||||
instance_id: InstanceId;
|
||||
block: boolean;
|
||||
auth: string;
|
||||
}
|
5
src/types/BlockInstanceResponse.ts
Normal file
5
src/types/BlockInstanceResponse.ts
Normal 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 BlockInstanceResponse {
|
||||
blocked: boolean;
|
||||
}
|
|
@ -16,8 +16,6 @@ export interface Community {
|
|||
local: boolean;
|
||||
icon?: string;
|
||||
banner?: string;
|
||||
followers_url: string;
|
||||
inbox_url: string;
|
||||
hidden: boolean;
|
||||
posting_restricted_to_mods: boolean;
|
||||
instance_id: InstanceId;
|
||||
|
|
|
@ -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 DeleteAccountResponse = null;
|
||||
export type DeleteAccountResponse = Record<string, never>;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// 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 { ListingType } from "./ListingType";
|
||||
import type { PaginationCursor } from "./PaginationCursor";
|
||||
import type { SortType } from "./SortType";
|
||||
|
||||
export interface GetPosts {
|
||||
|
@ -13,4 +14,5 @@ export interface GetPosts {
|
|||
saved_only?: boolean;
|
||||
liked_only?: boolean;
|
||||
disliked_only?: boolean;
|
||||
page_cursor?: PaginationCursor;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// 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";
|
||||
|
||||
export interface GetPostsResponse {
|
||||
posts: Array<PostView>;
|
||||
next_page?: PaginationCursor;
|
||||
}
|
||||
|
|
10
src/types/InstanceBlockView.ts
Normal file
10
src/types/InstanceBlockView.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
// 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 { Person } from "./Person";
|
||||
import type { Site } from "./Site";
|
||||
|
||||
export interface InstanceBlockView {
|
||||
person: Person;
|
||||
instance: Instance;
|
||||
site?: Site;
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
import type { CommunityBlockView } from "./CommunityBlockView";
|
||||
import type { CommunityFollowerView } from "./CommunityFollowerView";
|
||||
import type { CommunityModeratorView } from "./CommunityModeratorView";
|
||||
import type { InstanceBlockView } from "./InstanceBlockView";
|
||||
import type { LanguageId } from "./LanguageId";
|
||||
import type { LocalUserView } from "./LocalUserView";
|
||||
import type { PersonBlockView } from "./PersonBlockView";
|
||||
|
@ -11,6 +12,7 @@ export interface MyUserInfo {
|
|||
follows: Array<CommunityFollowerView>;
|
||||
moderates: Array<CommunityModeratorView>;
|
||||
community_blocks: Array<CommunityBlockView>;
|
||||
instance_blocks: Array<InstanceBlockView>;
|
||||
person_blocks: Array<PersonBlockView>;
|
||||
discussion_languages: Array<LanguageId>;
|
||||
}
|
||||
|
|
3
src/types/PaginationCursor.ts
Normal file
3
src/types/PaginationCursor.ts
Normal 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;
|
|
@ -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 PasswordResetResponse = null;
|
||||
export type PasswordResetResponse = Record<string, never>;
|
||||
|
|
|
@ -15,7 +15,6 @@ export interface Person {
|
|||
local: boolean;
|
||||
banner?: string;
|
||||
deleted: boolean;
|
||||
inbox_url: string;
|
||||
matrix_user_id?: string;
|
||||
bot_account: boolean;
|
||||
ban_expires?: string;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// 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 { InstanceId } from "./InstanceId";
|
||||
import type { PersonId } from "./PersonId";
|
||||
import type { PostId } from "./PostId";
|
||||
|
||||
|
@ -20,4 +21,6 @@ export interface PostAggregates {
|
|||
community_id: CommunityId;
|
||||
creator_id: PersonId;
|
||||
controversy_rank: number;
|
||||
instance_id: InstanceId;
|
||||
scaled_rank: number;
|
||||
}
|
||||
|
|
|
@ -18,4 +18,5 @@ export type SortType =
|
|||
| "TopThreeMonths"
|
||||
| "TopSixMonths"
|
||||
| "TopNineMonths"
|
||||
| "Controversial";
|
||||
| "Controversial"
|
||||
| "Scaled";
|
||||
|
|
|
@ -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 VerifyEmailResponse = null;
|
||||
export type VerifyEmailResponse = Record<string, never>;
|
||||
|
|
Loading…
Reference in a new issue