mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-01 01:59:55 +00:00
Update types from main branch
This commit is contained in:
parent
139a07ef6c
commit
3c2230266e
16 changed files with 44 additions and 78 deletions
17
src/index.ts
17
src/index.ts
|
@ -61,6 +61,7 @@ export { CreatePostReport } from "./types/CreatePostReport";
|
|||
export { CreatePrivateMessage } from "./types/CreatePrivateMessage";
|
||||
export { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
|
||||
export { CreateSite } from "./types/CreateSite";
|
||||
export { CreateTagline } from "./types/CreateTagline";
|
||||
export { CustomEmoji } from "./types/CustomEmoji";
|
||||
export { CustomEmojiId } from "./types/CustomEmojiId";
|
||||
export { CustomEmojiKeyword } from "./types/CustomEmojiKeyword";
|
||||
|
@ -73,6 +74,7 @@ export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
|||
export { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
|
||||
export { DeletePost } from "./types/DeletePost";
|
||||
export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
||||
export { DeleteTagline } from "./types/DeleteTagline";
|
||||
export { DistinguishComment } from "./types/DistinguishComment";
|
||||
export { EditComment } from "./types/EditComment";
|
||||
export { EditCommunity } from "./types/EditCommunity";
|
||||
|
@ -129,6 +131,8 @@ export { ListCommentReports } from "./types/ListCommentReports";
|
|||
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
|
||||
export { ListCommunities } from "./types/ListCommunities";
|
||||
export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
|
||||
export { ListCustomEmojis } from "./types/ListCustomEmojis";
|
||||
export { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
|
||||
export { ListLoginsResponse } from "./types/ListLoginsResponse";
|
||||
export { ListMedia } from "./types/ListMedia";
|
||||
export { ListMediaResponse } from "./types/ListMediaResponse";
|
||||
|
@ -140,6 +144,8 @@ export { ListPrivateMessageReports } from "./types/ListPrivateMessageReports";
|
|||
export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageReportsResponse";
|
||||
export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
||||
export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
|
||||
export { ListTaglines } from "./types/ListTaglines";
|
||||
export { ListTaglinesResponse } from "./types/ListTaglinesResponse";
|
||||
export { ListingType } from "./types/ListingType";
|
||||
export { LocalImage } from "./types/LocalImage";
|
||||
export { LocalImageView } from "./types/LocalImageView";
|
||||
|
@ -211,6 +217,7 @@ export { PostReportId } from "./types/PostReportId";
|
|||
export { PostReportResponse } from "./types/PostReportResponse";
|
||||
export { PostReportView } from "./types/PostReportView";
|
||||
export { PostResponse } from "./types/PostResponse";
|
||||
export { PostSortType } from "./types/PostSortType";
|
||||
export { PostView } from "./types/PostView";
|
||||
export { PrivateMessage } from "./types/PrivateMessage";
|
||||
export { PrivateMessageId } from "./types/PrivateMessageId";
|
||||
|
@ -252,18 +259,14 @@ export { SiteAggregates } from "./types/SiteAggregates";
|
|||
export { SiteId } from "./types/SiteId";
|
||||
export { SiteResponse } from "./types/SiteResponse";
|
||||
export { SiteView } from "./types/SiteView";
|
||||
export { SortType } from "./types/SortType";
|
||||
export { SubscribedType } from "./types/SubscribedType";
|
||||
export { SuccessResponse } from "./types/SuccessResponse";
|
||||
export { Tagline } from "./types/Tagline";
|
||||
export { TaglineId } from "./types/TaglineId";
|
||||
export { TaglineResponse } from "./types/TaglineResponse";
|
||||
export { TransferCommunity } from "./types/TransferCommunity";
|
||||
export { UpdateTagline } from "./types/UpdateTagline";
|
||||
export { UpdateTotp } from "./types/UpdateTotp";
|
||||
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
||||
export { VerifyEmail } from "./types/VerifyEmail";
|
||||
export { VoteView } from "./types/VoteView";
|
||||
export {
|
||||
UploadImage,
|
||||
UploadImageResponse,
|
||||
ImageFile,
|
||||
DeleteImage,
|
||||
} from "./other_types";
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CommentSortType } from "./CommentSortType";
|
||||
import type { LanguageId } from "./LanguageId";
|
||||
import type { ListingType } from "./ListingType";
|
||||
import type { PostListingMode } from "./PostListingMode";
|
||||
import type { PostSortType } from "./PostSortType";
|
||||
import type { RegistrationMode } from "./RegistrationMode";
|
||||
import type { SortType } from "./SortType";
|
||||
|
||||
export interface CreateSite {
|
||||
name: string;
|
||||
|
@ -19,7 +20,9 @@ export interface CreateSite {
|
|||
private_instance?: boolean;
|
||||
default_theme?: string;
|
||||
default_post_listing_type?: ListingType;
|
||||
default_sort_type?: SortType;
|
||||
default_post_listing_mode?: PostListingMode;
|
||||
default_post_sort_type?: PostSortType;
|
||||
default_comment_sort_type?: CommentSortType;
|
||||
legal_information?: string;
|
||||
application_email_admins?: boolean;
|
||||
hide_modlog_mod_names?: boolean;
|
||||
|
@ -44,9 +47,7 @@ export interface CreateSite {
|
|||
captcha_difficulty?: string;
|
||||
allowed_instances?: Array<string>;
|
||||
blocked_instances?: Array<string>;
|
||||
taglines?: Array<string>;
|
||||
registration_mode?: RegistrationMode;
|
||||
oauth_registration?: boolean;
|
||||
content_warning?: string;
|
||||
default_post_listing_mode?: PostListingMode;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CustomEmojiId } from "./CustomEmojiId";
|
||||
import type { LocalSiteId } from "./LocalSiteId";
|
||||
|
||||
export interface CustomEmoji {
|
||||
id: CustomEmojiId;
|
||||
local_site_id: LocalSiteId;
|
||||
shortcode: string;
|
||||
image_url: string;
|
||||
alt_text: string;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CommentSortType } from "./CommentSortType";
|
||||
import type { LanguageId } from "./LanguageId";
|
||||
import type { ListingType } from "./ListingType";
|
||||
import type { PostListingMode } from "./PostListingMode";
|
||||
import type { PostSortType } from "./PostSortType";
|
||||
import type { RegistrationMode } from "./RegistrationMode";
|
||||
import type { SortType } from "./SortType";
|
||||
|
||||
export interface EditSite {
|
||||
name?: string;
|
||||
|
@ -19,7 +20,9 @@ export interface EditSite {
|
|||
private_instance?: boolean;
|
||||
default_theme?: string;
|
||||
default_post_listing_type?: ListingType;
|
||||
default_sort_type?: SortType;
|
||||
default_post_listing_mode?: PostListingMode;
|
||||
default_post_sort_type?: PostSortType;
|
||||
default_comment_sort_type?: CommentSortType;
|
||||
legal_information?: string;
|
||||
application_email_admins?: boolean;
|
||||
hide_modlog_mod_names?: boolean;
|
||||
|
@ -45,10 +48,8 @@ export interface EditSite {
|
|||
allowed_instances?: Array<string>;
|
||||
blocked_instances?: Array<string>;
|
||||
blocked_urls?: Array<string>;
|
||||
taglines?: Array<string>;
|
||||
registration_mode?: RegistrationMode;
|
||||
oauth_registration?: boolean;
|
||||
reports_email_admins?: boolean;
|
||||
content_warning?: string;
|
||||
default_post_listing_mode?: PostListingMode;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// 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 { PersonId } from "./PersonId";
|
||||
import type { SortType } from "./SortType";
|
||||
import type { PostSortType } from "./PostSortType";
|
||||
|
||||
export interface GetPersonDetails {
|
||||
person_id?: PersonId;
|
||||
username?: string;
|
||||
sort?: SortType;
|
||||
sort?: PostSortType;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
community_id?: CommunityId;
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
import type { CommunityId } from "./CommunityId";
|
||||
import type { ListingType } from "./ListingType";
|
||||
import type { PaginationCursor } from "./PaginationCursor";
|
||||
import type { SortType } from "./SortType";
|
||||
import type { PostSortType } from "./PostSortType";
|
||||
|
||||
export interface GetPosts {
|
||||
type_?: ListingType;
|
||||
sort?: SortType;
|
||||
sort?: PostSortType;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
community_id?: CommunityId;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CustomEmojiView } from "./CustomEmojiView";
|
||||
import type { Language } from "./Language";
|
||||
import type { LanguageId } from "./LanguageId";
|
||||
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
|
||||
|
@ -17,8 +16,7 @@ export interface GetSiteResponse {
|
|||
my_user?: MyUserInfo;
|
||||
all_languages: Array<Language>;
|
||||
discussion_languages: Array<LanguageId>;
|
||||
taglines: Array<Tagline>;
|
||||
custom_emojis: Array<CustomEmojiView>;
|
||||
tagline?: Tagline;
|
||||
oauth_providers?: Array<PublicOAuthProvider>;
|
||||
admin_oauth_providers?: Array<OAuthProvider>;
|
||||
blocked_urls: Array<LocalSiteUrlBlocklist>;
|
||||
|
|
|
@ -34,19 +34,6 @@ export type LemmyErrorType =
|
|||
| { error: "site_ban" }
|
||||
| { error: "deleted" }
|
||||
| { error: "banned_from_community" }
|
||||
| { error: "couldnt_find_community" }
|
||||
| { error: "couldnt_find_person" }
|
||||
| { error: "couldnt_find_comment" }
|
||||
| { error: "couldnt_find_comment_report" }
|
||||
| { error: "couldnt_find_post_report" }
|
||||
| { error: "couldnt_find_private_message_report" }
|
||||
| { error: "couldnt_find_local_user" }
|
||||
| { error: "couldnt_find_person_mention" }
|
||||
| { error: "couldnt_find_registration_application" }
|
||||
| { error: "couldnt_find_comment_reply" }
|
||||
| { error: "couldnt_find_private_message" }
|
||||
| { error: "couldnt_find_activity" }
|
||||
| { error: "couldnt_find_oauth_provider" }
|
||||
| { error: "person_is_blocked" }
|
||||
| { error: "community_is_blocked" }
|
||||
| { error: "instance_is_blocked" }
|
||||
|
@ -67,7 +54,6 @@ export type LemmyErrorType =
|
|||
| { error: "only_mods_can_post_in_community" }
|
||||
| { error: "couldnt_update_post" }
|
||||
| { error: "no_post_edit_allowed" }
|
||||
| { error: "couldnt_find_post" }
|
||||
| { error: "edit_private_message_not_allowed" }
|
||||
| { error: "site_already_exists" }
|
||||
| { error: "application_question_required" }
|
||||
|
@ -123,7 +109,6 @@ export type LemmyErrorType =
|
|||
| { error: "couldnt_update_community_hidden_status" }
|
||||
| { error: "person_block_already_exists" }
|
||||
| { error: "user_already_exists" }
|
||||
| { error: "token_not_found" }
|
||||
| { error: "couldnt_like_post" }
|
||||
| { error: "couldnt_save_post" }
|
||||
| { error: "couldnt_mark_post_as_read" }
|
||||
|
@ -145,7 +130,6 @@ export type LemmyErrorType =
|
|||
| { error: "invalid_url" }
|
||||
| { error: "email_send_failed" }
|
||||
| { error: "slurs" }
|
||||
| { error: "couldnt_find_object" }
|
||||
| { error: "registration_denied"; message: string | null }
|
||||
| { error: "federation_disabled" }
|
||||
| { error: "domain_blocked"; message: string }
|
||||
|
@ -175,4 +159,5 @@ export type LemmyErrorType =
|
|||
| { error: "couldnt_delete_oauth_provider" }
|
||||
| { error: "unknown"; message: string }
|
||||
| { error: "cant_delete_site" }
|
||||
| { error: "url_length_overflow" };
|
||||
| { error: "url_length_overflow" }
|
||||
| { error: "not_found" };
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ListingType } from "./ListingType";
|
||||
import type { SortType } from "./SortType";
|
||||
import type { PostSortType } from "./PostSortType";
|
||||
|
||||
export interface ListCommunities {
|
||||
type_?: ListingType;
|
||||
sort?: SortType;
|
||||
sort?: PostSortType;
|
||||
show_nsfw?: boolean;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CommentSortType } from "./CommentSortType";
|
||||
import type { ListingType } from "./ListingType";
|
||||
import type { LocalSiteId } from "./LocalSiteId";
|
||||
import type { PostListingMode } from "./PostListingMode";
|
||||
import type { PostSortType } from "./PostSortType";
|
||||
import type { RegistrationMode } from "./RegistrationMode";
|
||||
import type { SiteId } from "./SiteId";
|
||||
import type { SortType } from "./SortType";
|
||||
|
||||
export interface LocalSite {
|
||||
id: LocalSiteId;
|
||||
|
@ -31,6 +32,7 @@ export interface LocalSite {
|
|||
reports_email_admins: boolean;
|
||||
federation_signed_fetch: boolean;
|
||||
default_post_listing_mode: PostListingMode;
|
||||
default_sort_type: SortType;
|
||||
default_post_sort_type: PostSortType;
|
||||
default_comment_sort_type: CommentSortType;
|
||||
oauth_registration: boolean;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CommentSortType } from "./CommentSortType";
|
||||
import type { ListingType } from "./ListingType";
|
||||
import type { LocalUserId } from "./LocalUserId";
|
||||
import type { PersonId } from "./PersonId";
|
||||
import type { PostListingMode } from "./PostListingMode";
|
||||
import type { SortType } from "./SortType";
|
||||
import type { PostSortType } from "./PostSortType";
|
||||
|
||||
export interface LocalUser {
|
||||
id: LocalUserId;
|
||||
|
@ -11,7 +12,7 @@ export interface LocalUser {
|
|||
email?: string;
|
||||
show_nsfw: boolean;
|
||||
theme: string;
|
||||
default_sort_type: SortType;
|
||||
default_post_sort_type: PostSortType;
|
||||
default_listing_type: ListingType;
|
||||
interface_language: string;
|
||||
show_avatars: boolean;
|
||||
|
@ -30,4 +31,5 @@ export interface LocalUser {
|
|||
enable_keyboard_navigation: boolean;
|
||||
enable_animated_images: boolean;
|
||||
collapse_bot_comments: boolean;
|
||||
default_comment_sort_type: CommentSortType;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CommentSortType } from "./CommentSortType";
|
||||
import type { LanguageId } from "./LanguageId";
|
||||
import type { ListingType } from "./ListingType";
|
||||
import type { PostListingMode } from "./PostListingMode";
|
||||
import type { SortType } from "./SortType";
|
||||
import type { PostSortType } from "./PostSortType";
|
||||
|
||||
export interface SaveUserSettings {
|
||||
show_nsfw?: boolean;
|
||||
blur_nsfw?: boolean;
|
||||
auto_expand?: boolean;
|
||||
theme?: string;
|
||||
default_sort_type?: SortType;
|
||||
default_listing_type?: ListingType;
|
||||
post_listing_mode?: PostListingMode;
|
||||
default_post_sort_type?: PostSortType;
|
||||
default_comment_sort_type?: CommentSortType;
|
||||
interface_language?: string;
|
||||
avatar?: string;
|
||||
banner?: string;
|
||||
|
@ -26,7 +29,6 @@ export interface SaveUserSettings {
|
|||
discussion_languages?: Array<LanguageId>;
|
||||
open_links_in_new_tab?: boolean;
|
||||
infinite_scroll_enabled?: boolean;
|
||||
post_listing_mode?: PostListingMode;
|
||||
enable_keyboard_navigation?: boolean;
|
||||
enable_animated_images?: boolean;
|
||||
collapse_bot_comments?: boolean;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
import type { CommunityId } from "./CommunityId";
|
||||
import type { ListingType } from "./ListingType";
|
||||
import type { PersonId } from "./PersonId";
|
||||
import type { PostSortType } from "./PostSortType";
|
||||
import type { SearchType } from "./SearchType";
|
||||
import type { SortType } from "./SortType";
|
||||
|
||||
export interface Search {
|
||||
q: string;
|
||||
|
@ -11,7 +11,7 @@ export interface Search {
|
|||
community_name?: string;
|
||||
creator_id?: PersonId;
|
||||
type_?: SearchType;
|
||||
sort?: SortType;
|
||||
sort?: PostSortType;
|
||||
listing_type?: ListingType;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { SiteView } from "./SiteView";
|
||||
import type { Tagline } from "./Tagline";
|
||||
|
||||
export interface SiteResponse {
|
||||
site_view: SiteView;
|
||||
taglines: Array<Tagline>;
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type SortType =
|
||||
| "Active"
|
||||
| "Hot"
|
||||
| "New"
|
||||
| "Old"
|
||||
| "TopDay"
|
||||
| "TopWeek"
|
||||
| "TopMonth"
|
||||
| "TopYear"
|
||||
| "TopAll"
|
||||
| "MostComments"
|
||||
| "NewComments"
|
||||
| "TopHour"
|
||||
| "TopSixHour"
|
||||
| "TopTwelveHour"
|
||||
| "TopThreeMonths"
|
||||
| "TopSixMonths"
|
||||
| "TopNineMonths"
|
||||
| "Controversial"
|
||||
| "Scaled";
|
|
@ -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 { LocalSiteId } from "./LocalSiteId";
|
||||
|
||||
export interface Tagline {
|
||||
id: number;
|
||||
local_site_id: LocalSiteId;
|
||||
content: string;
|
||||
published: string;
|
||||
updated?: string;
|
||||
|
|
Loading…
Reference in a new issue