mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-01 01:59: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
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Remove the old types
|
||||||
|
rm -rf src/types/*
|
||||||
|
|
||||||
# Remove the old bindings
|
# Remove the old bindings
|
||||||
pushd ../lemmy/crates
|
pushd ../lemmy/crates
|
||||||
rm -rf **/bindings
|
rm -rf **/bindings
|
||||||
|
@ -29,5 +32,5 @@ find src/types -type f -name '*.ts' -exec sed -i 's/bigint/\/* integer *\/ numbe
|
||||||
|
|
||||||
node putTypesInIndex.js
|
node putTypesInIndex.js
|
||||||
|
|
||||||
prettier -w src/types src/index.ts
|
prettier -w src
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ import {
|
||||||
UploadImage,
|
UploadImage,
|
||||||
UploadImageResponse,
|
UploadImageResponse,
|
||||||
VERSION,
|
VERSION,
|
||||||
} from "./types/others";
|
} from "./other_types";
|
||||||
import { HideCommunity } from "./types/HideCommunity";
|
import { HideCommunity } from "./types/HideCommunity";
|
||||||
import { BlockInstance } from "./types/BlockInstance";
|
import { BlockInstance } from "./types/BlockInstance";
|
||||||
import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
||||||
|
|
|
@ -179,7 +179,6 @@ export { PersonMention } from "./types/PersonMention";
|
||||||
export { PersonMentionId } from "./types/PersonMentionId";
|
export { PersonMentionId } from "./types/PersonMentionId";
|
||||||
export { PersonMentionResponse } from "./types/PersonMentionResponse";
|
export { PersonMentionResponse } from "./types/PersonMentionResponse";
|
||||||
export { PersonMentionView } from "./types/PersonMentionView";
|
export { PersonMentionView } from "./types/PersonMentionView";
|
||||||
export { PersonSortType } from "./types/PersonSortType";
|
|
||||||
export { PersonView } from "./types/PersonView";
|
export { PersonView } from "./types/PersonView";
|
||||||
export { Post } from "./types/Post";
|
export { Post } from "./types/Post";
|
||||||
export { PostAggregates } from "./types/PostAggregates";
|
export { PostAggregates } from "./types/PostAggregates";
|
||||||
|
@ -243,4 +242,4 @@ export {
|
||||||
UploadImageResponse,
|
UploadImageResponse,
|
||||||
ImageFile,
|
ImageFile,
|
||||||
DeleteImage,
|
DeleteImage,
|
||||||
} from "./types/others";
|
} from "./other_types";
|
||||||
|
|
|
@ -13,6 +13,7 @@ export interface CommentView {
|
||||||
community: Community;
|
community: Community;
|
||||||
counts: CommentAggregates;
|
counts: CommentAggregates;
|
||||||
creator_banned_from_community: boolean;
|
creator_banned_from_community: boolean;
|
||||||
|
creator_is_moderator: boolean;
|
||||||
subscribed: SubscribedType;
|
subscribed: SubscribedType;
|
||||||
saved: boolean;
|
saved: boolean;
|
||||||
creator_blocked: boolean;
|
creator_blocked: boolean;
|
||||||
|
|
|
@ -148,4 +148,5 @@ export type LemmyErrorType =
|
||||||
| { error: "community_has_no_followers" }
|
| { error: "community_has_no_followers" }
|
||||||
| { error: "ban_expiration_in_past" }
|
| { error: "ban_expiration_in_past" }
|
||||||
| { error: "invalid_unix_time" }
|
| { error: "invalid_unix_time" }
|
||||||
|
| { error: "invalid_bot_action" }
|
||||||
| { error: "unknown"; message: string };
|
| { error: "unknown"; message: string };
|
||||||
|
|
|
@ -5,7 +5,5 @@ export interface PersonAggregates {
|
||||||
id: number;
|
id: number;
|
||||||
person_id: PersonId;
|
person_id: PersonId;
|
||||||
post_count: /* integer */ number;
|
post_count: /* integer */ number;
|
||||||
post_score: /* integer */ number;
|
|
||||||
comment_count: /* 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;
|
creator: Person;
|
||||||
community: Community;
|
community: Community;
|
||||||
creator_banned_from_community: boolean;
|
creator_banned_from_community: boolean;
|
||||||
|
creator_is_moderator: boolean;
|
||||||
counts: PostAggregates;
|
counts: PostAggregates;
|
||||||
subscribed: SubscribedType;
|
subscribed: SubscribedType;
|
||||||
saved: boolean;
|
saved: boolean;
|
||||||
|
|
Loading…
Reference in a new issue