mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-22 04:11:11 +00:00
Update types from main branch (#356)
* Update types from main branch * 0.20.0-alpha.9 * add missing files * 0.20.0-alpha.10 * add block back --------- Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
This commit is contained in:
parent
56eb0c6ecf
commit
df67ca2220
26 changed files with 99 additions and 52 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "lemmy-js-client",
|
"name": "lemmy-js-client",
|
||||||
"description": "A javascript / typescript client for Lemmy",
|
"description": "A javascript / typescript client for Lemmy",
|
||||||
"version": "0.20.0-alpha.8",
|
"version": "0.20.0-alpha.10",
|
||||||
"author": "Dessalines <tyhou13@gmx.com>",
|
"author": "Dessalines <tyhou13@gmx.com>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
|
|
11
src/index.ts
11
src/index.ts
|
@ -61,6 +61,7 @@ export { CreatePostReport } from "./types/CreatePostReport";
|
||||||
export { CreatePrivateMessage } from "./types/CreatePrivateMessage";
|
export { CreatePrivateMessage } from "./types/CreatePrivateMessage";
|
||||||
export { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
|
export { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
|
||||||
export { CreateSite } from "./types/CreateSite";
|
export { CreateSite } from "./types/CreateSite";
|
||||||
|
export { CreateTagline } from "./types/CreateTagline";
|
||||||
export { CustomEmoji } from "./types/CustomEmoji";
|
export { CustomEmoji } from "./types/CustomEmoji";
|
||||||
export { CustomEmojiId } from "./types/CustomEmojiId";
|
export { CustomEmojiId } from "./types/CustomEmojiId";
|
||||||
export { CustomEmojiKeyword } from "./types/CustomEmojiKeyword";
|
export { CustomEmojiKeyword } from "./types/CustomEmojiKeyword";
|
||||||
|
@ -73,6 +74,7 @@ export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
||||||
export { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
|
export { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
|
||||||
export { DeletePost } from "./types/DeletePost";
|
export { DeletePost } from "./types/DeletePost";
|
||||||
export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
||||||
|
export { DeleteTagline } from "./types/DeleteTagline";
|
||||||
export { DistinguishComment } from "./types/DistinguishComment";
|
export { DistinguishComment } from "./types/DistinguishComment";
|
||||||
export { EditComment } from "./types/EditComment";
|
export { EditComment } from "./types/EditComment";
|
||||||
export { EditCommunity } from "./types/EditCommunity";
|
export { EditCommunity } from "./types/EditCommunity";
|
||||||
|
@ -129,6 +131,8 @@ export { ListCommentReports } from "./types/ListCommentReports";
|
||||||
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
|
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
|
||||||
export { ListCommunities } from "./types/ListCommunities";
|
export { ListCommunities } from "./types/ListCommunities";
|
||||||
export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
|
export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
|
||||||
|
export { ListCustomEmojis } from "./types/ListCustomEmojis";
|
||||||
|
export { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
|
||||||
export { ListLoginsResponse } from "./types/ListLoginsResponse";
|
export { ListLoginsResponse } from "./types/ListLoginsResponse";
|
||||||
export { ListMedia } from "./types/ListMedia";
|
export { ListMedia } from "./types/ListMedia";
|
||||||
export { ListMediaResponse } from "./types/ListMediaResponse";
|
export { ListMediaResponse } from "./types/ListMediaResponse";
|
||||||
|
@ -140,6 +144,8 @@ export { ListPrivateMessageReports } from "./types/ListPrivateMessageReports";
|
||||||
export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageReportsResponse";
|
export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageReportsResponse";
|
||||||
export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
||||||
export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
|
export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
|
||||||
|
export { ListTaglines } from "./types/ListTaglines";
|
||||||
|
export { ListTaglinesResponse } from "./types/ListTaglinesResponse";
|
||||||
export { ListingType } from "./types/ListingType";
|
export { ListingType } from "./types/ListingType";
|
||||||
export { LocalImage } from "./types/LocalImage";
|
export { LocalImage } from "./types/LocalImage";
|
||||||
export { LocalImageView } from "./types/LocalImageView";
|
export { LocalImageView } from "./types/LocalImageView";
|
||||||
|
@ -211,6 +217,7 @@ export { PostReportId } from "./types/PostReportId";
|
||||||
export { PostReportResponse } from "./types/PostReportResponse";
|
export { PostReportResponse } from "./types/PostReportResponse";
|
||||||
export { PostReportView } from "./types/PostReportView";
|
export { PostReportView } from "./types/PostReportView";
|
||||||
export { PostResponse } from "./types/PostResponse";
|
export { PostResponse } from "./types/PostResponse";
|
||||||
|
export { PostSortType } from "./types/PostSortType";
|
||||||
export { PostView } from "./types/PostView";
|
export { PostView } from "./types/PostView";
|
||||||
export { PrivateMessage } from "./types/PrivateMessage";
|
export { PrivateMessage } from "./types/PrivateMessage";
|
||||||
export { PrivateMessageId } from "./types/PrivateMessageId";
|
export { PrivateMessageId } from "./types/PrivateMessageId";
|
||||||
|
@ -252,11 +259,13 @@ export { SiteAggregates } from "./types/SiteAggregates";
|
||||||
export { SiteId } from "./types/SiteId";
|
export { SiteId } from "./types/SiteId";
|
||||||
export { SiteResponse } from "./types/SiteResponse";
|
export { SiteResponse } from "./types/SiteResponse";
|
||||||
export { SiteView } from "./types/SiteView";
|
export { SiteView } from "./types/SiteView";
|
||||||
export { SortType } from "./types/SortType";
|
|
||||||
export { SubscribedType } from "./types/SubscribedType";
|
export { SubscribedType } from "./types/SubscribedType";
|
||||||
export { SuccessResponse } from "./types/SuccessResponse";
|
export { SuccessResponse } from "./types/SuccessResponse";
|
||||||
export { Tagline } from "./types/Tagline";
|
export { Tagline } from "./types/Tagline";
|
||||||
|
export { TaglineId } from "./types/TaglineId";
|
||||||
|
export { TaglineResponse } from "./types/TaglineResponse";
|
||||||
export { TransferCommunity } from "./types/TransferCommunity";
|
export { TransferCommunity } from "./types/TransferCommunity";
|
||||||
|
export { UpdateTagline } from "./types/UpdateTagline";
|
||||||
export { UpdateTotp } from "./types/UpdateTotp";
|
export { UpdateTotp } from "./types/UpdateTotp";
|
||||||
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
||||||
export { VerifyEmail } from "./types/VerifyEmail";
|
export { VerifyEmail } from "./types/VerifyEmail";
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// 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 { LanguageId } from "./LanguageId";
|
||||||
import type { ListingType } from "./ListingType";
|
import type { ListingType } from "./ListingType";
|
||||||
import type { PostListingMode } from "./PostListingMode";
|
import type { PostListingMode } from "./PostListingMode";
|
||||||
|
import type { PostSortType } from "./PostSortType";
|
||||||
import type { RegistrationMode } from "./RegistrationMode";
|
import type { RegistrationMode } from "./RegistrationMode";
|
||||||
import type { SortType } from "./SortType";
|
|
||||||
|
|
||||||
export interface CreateSite {
|
export interface CreateSite {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -19,7 +20,9 @@ export interface CreateSite {
|
||||||
private_instance?: boolean;
|
private_instance?: boolean;
|
||||||
default_theme?: string;
|
default_theme?: string;
|
||||||
default_post_listing_type?: ListingType;
|
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;
|
legal_information?: string;
|
||||||
application_email_admins?: boolean;
|
application_email_admins?: boolean;
|
||||||
hide_modlog_mod_names?: boolean;
|
hide_modlog_mod_names?: boolean;
|
||||||
|
@ -44,9 +47,7 @@ export interface CreateSite {
|
||||||
captcha_difficulty?: string;
|
captcha_difficulty?: string;
|
||||||
allowed_instances?: Array<string>;
|
allowed_instances?: Array<string>;
|
||||||
blocked_instances?: Array<string>;
|
blocked_instances?: Array<string>;
|
||||||
taglines?: Array<string>;
|
|
||||||
registration_mode?: RegistrationMode;
|
registration_mode?: RegistrationMode;
|
||||||
oauth_registration?: boolean;
|
oauth_registration?: boolean;
|
||||||
content_warning?: string;
|
content_warning?: string;
|
||||||
default_post_listing_mode?: PostListingMode;
|
|
||||||
}
|
}
|
||||||
|
|
5
src/types/CreateTagline.ts
Normal file
5
src/types/CreateTagline.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 CreateTagline {
|
||||||
|
content: string;
|
||||||
|
}
|
|
@ -1,10 +1,8 @@
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// 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 { CustomEmojiId } from "./CustomEmojiId";
|
||||||
import type { LocalSiteId } from "./LocalSiteId";
|
|
||||||
|
|
||||||
export interface CustomEmoji {
|
export interface CustomEmoji {
|
||||||
id: CustomEmojiId;
|
id: CustomEmojiId;
|
||||||
local_site_id: LocalSiteId;
|
|
||||||
shortcode: string;
|
shortcode: string;
|
||||||
image_url: string;
|
image_url: string;
|
||||||
alt_text: string;
|
alt_text: string;
|
||||||
|
|
6
src/types/DeleteTagline.ts
Normal file
6
src/types/DeleteTagline.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { TaglineId } from "./TaglineId";
|
||||||
|
|
||||||
|
export interface DeleteTagline {
|
||||||
|
id: TaglineId;
|
||||||
|
}
|
|
@ -1,9 +1,10 @@
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// 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 { LanguageId } from "./LanguageId";
|
||||||
import type { ListingType } from "./ListingType";
|
import type { ListingType } from "./ListingType";
|
||||||
import type { PostListingMode } from "./PostListingMode";
|
import type { PostListingMode } from "./PostListingMode";
|
||||||
|
import type { PostSortType } from "./PostSortType";
|
||||||
import type { RegistrationMode } from "./RegistrationMode";
|
import type { RegistrationMode } from "./RegistrationMode";
|
||||||
import type { SortType } from "./SortType";
|
|
||||||
|
|
||||||
export interface EditSite {
|
export interface EditSite {
|
||||||
name?: string;
|
name?: string;
|
||||||
|
@ -19,7 +20,9 @@ export interface EditSite {
|
||||||
private_instance?: boolean;
|
private_instance?: boolean;
|
||||||
default_theme?: string;
|
default_theme?: string;
|
||||||
default_post_listing_type?: ListingType;
|
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;
|
legal_information?: string;
|
||||||
application_email_admins?: boolean;
|
application_email_admins?: boolean;
|
||||||
hide_modlog_mod_names?: boolean;
|
hide_modlog_mod_names?: boolean;
|
||||||
|
@ -45,10 +48,8 @@ export interface EditSite {
|
||||||
allowed_instances?: Array<string>;
|
allowed_instances?: Array<string>;
|
||||||
blocked_instances?: Array<string>;
|
blocked_instances?: Array<string>;
|
||||||
blocked_urls?: Array<string>;
|
blocked_urls?: Array<string>;
|
||||||
taglines?: Array<string>;
|
|
||||||
registration_mode?: RegistrationMode;
|
registration_mode?: RegistrationMode;
|
||||||
oauth_registration?: boolean;
|
oauth_registration?: boolean;
|
||||||
reports_email_admins?: boolean;
|
reports_email_admins?: boolean;
|
||||||
content_warning?: string;
|
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.
|
// 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 { CommunityId } from "./CommunityId";
|
||||||
import type { PersonId } from "./PersonId";
|
import type { PersonId } from "./PersonId";
|
||||||
import type { SortType } from "./SortType";
|
import type { PostSortType } from "./PostSortType";
|
||||||
|
|
||||||
export interface GetPersonDetails {
|
export interface GetPersonDetails {
|
||||||
person_id?: PersonId;
|
person_id?: PersonId;
|
||||||
username?: string;
|
username?: string;
|
||||||
sort?: SortType;
|
sort?: PostSortType;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
import type { CommunityId } from "./CommunityId";
|
import type { CommunityId } from "./CommunityId";
|
||||||
import type { ListingType } from "./ListingType";
|
import type { ListingType } from "./ListingType";
|
||||||
import type { PaginationCursor } from "./PaginationCursor";
|
import type { PaginationCursor } from "./PaginationCursor";
|
||||||
import type { SortType } from "./SortType";
|
import type { PostSortType } from "./PostSortType";
|
||||||
|
|
||||||
export interface GetPosts {
|
export interface GetPosts {
|
||||||
type_?: ListingType;
|
type_?: ListingType;
|
||||||
sort?: SortType;
|
sort?: PostSortType;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
community_id?: CommunityId;
|
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.
|
// 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 { Language } from "./Language";
|
||||||
import type { LanguageId } from "./LanguageId";
|
import type { LanguageId } from "./LanguageId";
|
||||||
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
|
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
|
||||||
|
@ -17,8 +16,7 @@ export interface GetSiteResponse {
|
||||||
my_user?: MyUserInfo;
|
my_user?: MyUserInfo;
|
||||||
all_languages: Array<Language>;
|
all_languages: Array<Language>;
|
||||||
discussion_languages: Array<LanguageId>;
|
discussion_languages: Array<LanguageId>;
|
||||||
taglines: Array<Tagline>;
|
tagline?: Tagline;
|
||||||
custom_emojis: Array<CustomEmojiView>;
|
|
||||||
oauth_providers?: Array<PublicOAuthProvider>;
|
oauth_providers?: Array<PublicOAuthProvider>;
|
||||||
admin_oauth_providers?: Array<OAuthProvider>;
|
admin_oauth_providers?: Array<OAuthProvider>;
|
||||||
blocked_urls: Array<LocalSiteUrlBlocklist>;
|
blocked_urls: Array<LocalSiteUrlBlocklist>;
|
||||||
|
|
|
@ -34,19 +34,6 @@ export type LemmyErrorType =
|
||||||
| { error: "site_ban" }
|
| { error: "site_ban" }
|
||||||
| { error: "deleted" }
|
| { error: "deleted" }
|
||||||
| { error: "banned_from_community" }
|
| { 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: "person_is_blocked" }
|
||||||
| { error: "community_is_blocked" }
|
| { error: "community_is_blocked" }
|
||||||
| { error: "instance_is_blocked" }
|
| { error: "instance_is_blocked" }
|
||||||
|
@ -67,7 +54,6 @@ export type LemmyErrorType =
|
||||||
| { error: "only_mods_can_post_in_community" }
|
| { error: "only_mods_can_post_in_community" }
|
||||||
| { error: "couldnt_update_post" }
|
| { error: "couldnt_update_post" }
|
||||||
| { error: "no_post_edit_allowed" }
|
| { error: "no_post_edit_allowed" }
|
||||||
| { error: "couldnt_find_post" }
|
|
||||||
| { error: "edit_private_message_not_allowed" }
|
| { error: "edit_private_message_not_allowed" }
|
||||||
| { error: "site_already_exists" }
|
| { error: "site_already_exists" }
|
||||||
| { error: "application_question_required" }
|
| { error: "application_question_required" }
|
||||||
|
@ -123,7 +109,6 @@ export type LemmyErrorType =
|
||||||
| { error: "couldnt_update_community_hidden_status" }
|
| { error: "couldnt_update_community_hidden_status" }
|
||||||
| { error: "person_block_already_exists" }
|
| { error: "person_block_already_exists" }
|
||||||
| { error: "user_already_exists" }
|
| { error: "user_already_exists" }
|
||||||
| { error: "token_not_found" }
|
|
||||||
| { error: "couldnt_like_post" }
|
| { error: "couldnt_like_post" }
|
||||||
| { error: "couldnt_save_post" }
|
| { error: "couldnt_save_post" }
|
||||||
| { error: "couldnt_mark_post_as_read" }
|
| { error: "couldnt_mark_post_as_read" }
|
||||||
|
@ -145,7 +130,6 @@ export type LemmyErrorType =
|
||||||
| { error: "invalid_url" }
|
| { error: "invalid_url" }
|
||||||
| { error: "email_send_failed" }
|
| { error: "email_send_failed" }
|
||||||
| { error: "slurs" }
|
| { error: "slurs" }
|
||||||
| { error: "couldnt_find_object" }
|
|
||||||
| { error: "registration_denied"; message: string | null }
|
| { error: "registration_denied"; message: string | null }
|
||||||
| { error: "federation_disabled" }
|
| { error: "federation_disabled" }
|
||||||
| { error: "domain_blocked"; message: string }
|
| { error: "domain_blocked"; message: string }
|
||||||
|
@ -175,4 +159,5 @@ export type LemmyErrorType =
|
||||||
| { error: "couldnt_delete_oauth_provider" }
|
| { error: "couldnt_delete_oauth_provider" }
|
||||||
| { error: "unknown"; message: string }
|
| { error: "unknown"; message: string }
|
||||||
| { error: "cant_delete_site" }
|
| { 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.
|
// 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 { ListingType } from "./ListingType";
|
||||||
import type { SortType } from "./SortType";
|
import type { PostSortType } from "./PostSortType";
|
||||||
|
|
||||||
export interface ListCommunities {
|
export interface ListCommunities {
|
||||||
type_?: ListingType;
|
type_?: ListingType;
|
||||||
sort?: SortType;
|
sort?: PostSortType;
|
||||||
show_nsfw?: boolean;
|
show_nsfw?: boolean;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
|
|
8
src/types/ListCustomEmojis.ts
Normal file
8
src/types/ListCustomEmojis.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.
|
||||||
|
|
||||||
|
export interface ListCustomEmojis {
|
||||||
|
page?: number;
|
||||||
|
limit?: number;
|
||||||
|
category?: string;
|
||||||
|
ignore_page_limits?: boolean;
|
||||||
|
}
|
6
src/types/ListCustomEmojisResponse.ts
Normal file
6
src/types/ListCustomEmojisResponse.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// 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";
|
||||||
|
|
||||||
|
export interface ListCustomEmojisResponse {
|
||||||
|
custom_emojis: Array<CustomEmojiView>;
|
||||||
|
}
|
6
src/types/ListTaglines.ts
Normal file
6
src/types/ListTaglines.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export interface ListTaglines {
|
||||||
|
page?: number;
|
||||||
|
limit?: number;
|
||||||
|
}
|
6
src/types/ListTaglinesResponse.ts
Normal file
6
src/types/ListTaglinesResponse.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { Tagline } from "./Tagline";
|
||||||
|
|
||||||
|
export interface ListTaglinesResponse {
|
||||||
|
taglines: Array<Tagline>;
|
||||||
|
}
|
|
@ -1,10 +1,11 @@
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// 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 { ListingType } from "./ListingType";
|
||||||
import type { LocalSiteId } from "./LocalSiteId";
|
import type { LocalSiteId } from "./LocalSiteId";
|
||||||
import type { PostListingMode } from "./PostListingMode";
|
import type { PostListingMode } from "./PostListingMode";
|
||||||
|
import type { PostSortType } from "./PostSortType";
|
||||||
import type { RegistrationMode } from "./RegistrationMode";
|
import type { RegistrationMode } from "./RegistrationMode";
|
||||||
import type { SiteId } from "./SiteId";
|
import type { SiteId } from "./SiteId";
|
||||||
import type { SortType } from "./SortType";
|
|
||||||
|
|
||||||
export interface LocalSite {
|
export interface LocalSite {
|
||||||
id: LocalSiteId;
|
id: LocalSiteId;
|
||||||
|
@ -31,6 +32,7 @@ export interface LocalSite {
|
||||||
reports_email_admins: boolean;
|
reports_email_admins: boolean;
|
||||||
federation_signed_fetch: boolean;
|
federation_signed_fetch: boolean;
|
||||||
default_post_listing_mode: PostListingMode;
|
default_post_listing_mode: PostListingMode;
|
||||||
default_sort_type: SortType;
|
default_post_sort_type: PostSortType;
|
||||||
|
default_comment_sort_type: CommentSortType;
|
||||||
oauth_registration: boolean;
|
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.
|
// 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 { ListingType } from "./ListingType";
|
||||||
import type { LocalUserId } from "./LocalUserId";
|
import type { LocalUserId } from "./LocalUserId";
|
||||||
import type { PersonId } from "./PersonId";
|
import type { PersonId } from "./PersonId";
|
||||||
import type { PostListingMode } from "./PostListingMode";
|
import type { PostListingMode } from "./PostListingMode";
|
||||||
import type { SortType } from "./SortType";
|
import type { PostSortType } from "./PostSortType";
|
||||||
|
|
||||||
export interface LocalUser {
|
export interface LocalUser {
|
||||||
id: LocalUserId;
|
id: LocalUserId;
|
||||||
|
@ -11,7 +12,7 @@ export interface LocalUser {
|
||||||
email?: string;
|
email?: string;
|
||||||
show_nsfw: boolean;
|
show_nsfw: boolean;
|
||||||
theme: string;
|
theme: string;
|
||||||
default_sort_type: SortType;
|
default_post_sort_type: PostSortType;
|
||||||
default_listing_type: ListingType;
|
default_listing_type: ListingType;
|
||||||
interface_language: string;
|
interface_language: string;
|
||||||
show_avatars: boolean;
|
show_avatars: boolean;
|
||||||
|
@ -30,4 +31,5 @@ export interface LocalUser {
|
||||||
enable_keyboard_navigation: boolean;
|
enable_keyboard_navigation: boolean;
|
||||||
enable_animated_images: boolean;
|
enable_animated_images: boolean;
|
||||||
collapse_bot_comments: boolean;
|
collapse_bot_comments: boolean;
|
||||||
|
default_comment_sort_type: CommentSortType;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export type SortType =
|
export type PostSortType =
|
||||||
| "Active"
|
| "Active"
|
||||||
| "Hot"
|
| "Hot"
|
||||||
| "New"
|
| "New"
|
|
@ -1,16 +1,19 @@
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// 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 { LanguageId } from "./LanguageId";
|
||||||
import type { ListingType } from "./ListingType";
|
import type { ListingType } from "./ListingType";
|
||||||
import type { PostListingMode } from "./PostListingMode";
|
import type { PostListingMode } from "./PostListingMode";
|
||||||
import type { SortType } from "./SortType";
|
import type { PostSortType } from "./PostSortType";
|
||||||
|
|
||||||
export interface SaveUserSettings {
|
export interface SaveUserSettings {
|
||||||
show_nsfw?: boolean;
|
show_nsfw?: boolean;
|
||||||
blur_nsfw?: boolean;
|
blur_nsfw?: boolean;
|
||||||
auto_expand?: boolean;
|
auto_expand?: boolean;
|
||||||
theme?: string;
|
theme?: string;
|
||||||
default_sort_type?: SortType;
|
|
||||||
default_listing_type?: ListingType;
|
default_listing_type?: ListingType;
|
||||||
|
post_listing_mode?: PostListingMode;
|
||||||
|
default_post_sort_type?: PostSortType;
|
||||||
|
default_comment_sort_type?: CommentSortType;
|
||||||
interface_language?: string;
|
interface_language?: string;
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
banner?: string;
|
banner?: string;
|
||||||
|
@ -26,7 +29,6 @@ export interface SaveUserSettings {
|
||||||
discussion_languages?: Array<LanguageId>;
|
discussion_languages?: Array<LanguageId>;
|
||||||
open_links_in_new_tab?: boolean;
|
open_links_in_new_tab?: boolean;
|
||||||
infinite_scroll_enabled?: boolean;
|
infinite_scroll_enabled?: boolean;
|
||||||
post_listing_mode?: PostListingMode;
|
|
||||||
enable_keyboard_navigation?: boolean;
|
enable_keyboard_navigation?: boolean;
|
||||||
enable_animated_images?: boolean;
|
enable_animated_images?: boolean;
|
||||||
collapse_bot_comments?: boolean;
|
collapse_bot_comments?: boolean;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
import type { CommunityId } from "./CommunityId";
|
import type { CommunityId } from "./CommunityId";
|
||||||
import type { ListingType } from "./ListingType";
|
import type { ListingType } from "./ListingType";
|
||||||
import type { PersonId } from "./PersonId";
|
import type { PersonId } from "./PersonId";
|
||||||
|
import type { PostSortType } from "./PostSortType";
|
||||||
import type { SearchType } from "./SearchType";
|
import type { SearchType } from "./SearchType";
|
||||||
import type { SortType } from "./SortType";
|
|
||||||
|
|
||||||
export interface Search {
|
export interface Search {
|
||||||
q: string;
|
q: string;
|
||||||
|
@ -11,7 +11,7 @@ export interface Search {
|
||||||
community_name?: string;
|
community_name?: string;
|
||||||
creator_id?: PersonId;
|
creator_id?: PersonId;
|
||||||
type_?: SearchType;
|
type_?: SearchType;
|
||||||
sort?: SortType;
|
sort?: PostSortType;
|
||||||
listing_type?: ListingType;
|
listing_type?: ListingType;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: 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.
|
// 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 { SiteView } from "./SiteView";
|
||||||
import type { Tagline } from "./Tagline";
|
|
||||||
|
|
||||||
export interface SiteResponse {
|
export interface SiteResponse {
|
||||||
site_view: SiteView;
|
site_view: SiteView;
|
||||||
taglines: Array<Tagline>;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// 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 {
|
export interface Tagline {
|
||||||
id: number;
|
id: number;
|
||||||
local_site_id: LocalSiteId;
|
|
||||||
content: string;
|
content: string;
|
||||||
published: string;
|
published: string;
|
||||||
updated?: string;
|
updated?: string;
|
||||||
|
|
3
src/types/TaglineId.ts
Normal file
3
src/types/TaglineId.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 TaglineId = number;
|
6
src/types/TaglineResponse.ts
Normal file
6
src/types/TaglineResponse.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { Tagline } from "./Tagline";
|
||||||
|
|
||||||
|
export interface TaglineResponse {
|
||||||
|
tagline: Tagline;
|
||||||
|
}
|
7
src/types/UpdateTagline.ts
Normal file
7
src/types/UpdateTagline.ts
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { TaglineId } from "./TaglineId";
|
||||||
|
|
||||||
|
export interface UpdateTagline {
|
||||||
|
id: TaglineId;
|
||||||
|
content: string;
|
||||||
|
}
|
Loading…
Reference in a new issue