mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-10-31 17:49:55 +00:00
Updating types from lemmy. (#209)
This commit is contained in:
parent
c47102bfb1
commit
991af27e42
9 changed files with 9 additions and 15 deletions
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Remove the old types
|
||||
rm -rf src/types/*
|
||||
|
||||
# Remove the old bindings
|
||||
pushd ../lemmy/crates
|
||||
rm -rf **/bindings
|
||||
|
@ -29,5 +32,5 @@ find src/types -type f -name '*.ts' -exec sed -i 's/bigint/\/* integer *\/ numbe
|
|||
|
||||
node putTypesInIndex.js
|
||||
|
||||
prettier -w src/types src/index.ts
|
||||
prettier -w src
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ import {
|
|||
UploadImage,
|
||||
UploadImageResponse,
|
||||
VERSION,
|
||||
} from "./types/others";
|
||||
} from "./other_types";
|
||||
import { HideCommunity } from "./types/HideCommunity";
|
||||
import { BlockInstance } from "./types/BlockInstance";
|
||||
import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
||||
|
|
|
@ -179,7 +179,6 @@ export { PersonMention } from "./types/PersonMention";
|
|||
export { PersonMentionId } from "./types/PersonMentionId";
|
||||
export { PersonMentionResponse } from "./types/PersonMentionResponse";
|
||||
export { PersonMentionView } from "./types/PersonMentionView";
|
||||
export { PersonSortType } from "./types/PersonSortType";
|
||||
export { PersonView } from "./types/PersonView";
|
||||
export { Post } from "./types/Post";
|
||||
export { PostAggregates } from "./types/PostAggregates";
|
||||
|
@ -243,4 +242,4 @@ export {
|
|||
UploadImageResponse,
|
||||
ImageFile,
|
||||
DeleteImage,
|
||||
} from "./types/others";
|
||||
} from "./other_types";
|
||||
|
|
|
@ -13,6 +13,7 @@ export interface CommentView {
|
|||
community: Community;
|
||||
counts: CommentAggregates;
|
||||
creator_banned_from_community: boolean;
|
||||
creator_is_moderator: boolean;
|
||||
subscribed: SubscribedType;
|
||||
saved: boolean;
|
||||
creator_blocked: boolean;
|
||||
|
|
|
@ -148,4 +148,5 @@ export type LemmyErrorType =
|
|||
| { error: "community_has_no_followers" }
|
||||
| { error: "ban_expiration_in_past" }
|
||||
| { error: "invalid_unix_time" }
|
||||
| { error: "invalid_bot_action" }
|
||||
| { error: "unknown"; message: string };
|
||||
|
|
|
@ -5,7 +5,5 @@ export interface PersonAggregates {
|
|||
id: number;
|
||||
person_id: PersonId;
|
||||
post_count: /* integer */ number;
|
||||
post_score: /* integer */ number;
|
||||
comment_count: /* integer */ number;
|
||||
comment_score: /* integer */ number;
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type PersonSortType =
|
||||
| "New"
|
||||
| "Old"
|
||||
| "MostComments"
|
||||
| "CommentScore"
|
||||
| "PostScore"
|
||||
| "PostCount";
|
|
@ -10,6 +10,7 @@ export interface PostView {
|
|||
creator: Person;
|
||||
community: Community;
|
||||
creator_banned_from_community: boolean;
|
||||
creator_is_moderator: boolean;
|
||||
counts: PostAggregates;
|
||||
subscribed: SubscribedType;
|
||||
saved: boolean;
|
||||
|
|
Loading…
Reference in a new issue