Adding some types from lemmy/main.

This commit is contained in:
Dessalines 2024-02-16 09:46:06 -05:00
parent 39f247173d
commit 817baf35bb
17 changed files with 43 additions and 14 deletions

View file

@ -48,6 +48,7 @@ export { CommunityId } from "./types/CommunityId";
export { CommunityModeratorView } from "./types/CommunityModeratorView"; export { CommunityModeratorView } from "./types/CommunityModeratorView";
export { CommunityResponse } from "./types/CommunityResponse"; export { CommunityResponse } from "./types/CommunityResponse";
export { CommunityView } from "./types/CommunityView"; export { CommunityView } from "./types/CommunityView";
export { CommunityVisibility } from "./types/CommunityVisibility";
export { CreateComment } from "./types/CreateComment"; export { CreateComment } from "./types/CreateComment";
export { CreateCommentLike } from "./types/CreateCommentLike"; export { CreateCommentLike } from "./types/CreateCommentLike";
export { CreateCommentReport } from "./types/CreateCommentReport"; export { CreateCommentReport } from "./types/CreateCommentReport";
@ -109,7 +110,6 @@ export { GetSiteResponse } from "./types/GetSiteResponse";
export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse"; export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse"; export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
export { HideCommunity } from "./types/HideCommunity"; export { HideCommunity } from "./types/HideCommunity";
export { ImageUpload } from "./types/ImageUpload";
export { Instance } from "./types/Instance"; export { Instance } from "./types/Instance";
export { InstanceBlockView } from "./types/InstanceBlockView"; export { InstanceBlockView } from "./types/InstanceBlockView";
export { InstanceId } from "./types/InstanceId"; export { InstanceId } from "./types/InstanceId";
@ -117,6 +117,7 @@ export { InstanceWithFederationState } from "./types/InstanceWithFederationState
export { Language } from "./types/Language"; export { Language } from "./types/Language";
export { LanguageId } from "./types/LanguageId"; export { LanguageId } from "./types/LanguageId";
export { LemmyErrorType } from "./types/LemmyErrorType"; export { LemmyErrorType } from "./types/LemmyErrorType";
export { LinkMetadata } from "./types/LinkMetadata";
export { ListCommentLikes } from "./types/ListCommentLikes"; export { ListCommentLikes } from "./types/ListCommentLikes";
export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse"; export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
export { ListCommentReports } from "./types/ListCommentReports"; export { ListCommentReports } from "./types/ListCommentReports";
@ -171,6 +172,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
export { ModlogActionType } from "./types/ModlogActionType"; export { ModlogActionType } from "./types/ModlogActionType";
export { ModlogListParams } from "./types/ModlogListParams"; export { ModlogListParams } from "./types/ModlogListParams";
export { MyUserInfo } from "./types/MyUserInfo"; export { MyUserInfo } from "./types/MyUserInfo";
export { OpenGraphData } from "./types/OpenGraphData";
export { PaginationCursor } from "./types/PaginationCursor"; export { PaginationCursor } from "./types/PaginationCursor";
export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset"; export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
export { PasswordReset } from "./types/PasswordReset"; export { PasswordReset } from "./types/PasswordReset";
@ -231,7 +233,6 @@ export { SearchType } from "./types/SearchType";
export { Site } from "./types/Site"; export { Site } from "./types/Site";
export { SiteAggregates } from "./types/SiteAggregates"; export { SiteAggregates } from "./types/SiteAggregates";
export { SiteId } from "./types/SiteId"; export { SiteId } from "./types/SiteId";
export { SiteMetadata } from "./types/SiteMetadata";
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 { SortType } from "./types/SortType";

View file

@ -1,5 +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 { CommunityId } from "./CommunityId"; import type { CommunityId } from "./CommunityId";
import type { CommunityVisibility } from "./CommunityVisibility";
import type { InstanceId } from "./InstanceId"; import type { InstanceId } from "./InstanceId";
export interface Community { export interface Community {
@ -19,4 +20,5 @@ export interface Community {
hidden: boolean; hidden: boolean;
posting_restricted_to_mods: boolean; posting_restricted_to_mods: boolean;
instance_id: InstanceId; instance_id: InstanceId;
visibility: CommunityVisibility;
} }

View file

@ -11,4 +11,5 @@ export interface CommunityAggregates {
users_active_week: /* integer */ number; users_active_week: /* integer */ number;
users_active_month: /* integer */ number; users_active_month: /* integer */ number;
users_active_half_year: /* integer */ number; users_active_half_year: /* integer */ number;
subscribers_local: /* integer */ number;
} }

View 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 CommunityVisibility = "Public" | "LocalOnly";

View file

@ -1,4 +1,5 @@
// 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 { CommunityVisibility } from "./CommunityVisibility";
import type { LanguageId } from "./LanguageId"; import type { LanguageId } from "./LanguageId";
export interface CreateCommunity { export interface CreateCommunity {
@ -10,4 +11,5 @@ export interface CreateCommunity {
nsfw?: boolean; nsfw?: boolean;
posting_restricted_to_mods?: boolean; posting_restricted_to_mods?: boolean;
discussion_languages?: Array<LanguageId>; discussion_languages?: Array<LanguageId>;
visibility?: CommunityVisibility;
} }

View file

@ -10,4 +10,5 @@ export interface CreatePost {
honeypot?: string; honeypot?: string;
nsfw?: boolean; nsfw?: boolean;
language_id?: LanguageId; language_id?: LanguageId;
custom_thumbnail?: string;
} }

View file

@ -1,7 +1,9 @@
// 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 { 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 { RegistrationMode } from "./RegistrationMode"; import type { RegistrationMode } from "./RegistrationMode";
import type { SortType } from "./SortType";
export interface CreateSite { export interface CreateSite {
name: string; name: string;
@ -17,6 +19,7 @@ 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;
legal_information?: string; legal_information?: string;
application_email_admins?: boolean; application_email_admins?: boolean;
hide_modlog_mod_names?: boolean; hide_modlog_mod_names?: boolean;
@ -43,4 +46,6 @@ export interface CreateSite {
blocked_instances?: Array<string>; blocked_instances?: Array<string>;
taglines?: Array<string>; taglines?: Array<string>;
registration_mode?: RegistrationMode; registration_mode?: RegistrationMode;
content_warning?: string;
default_post_listing_mode?: PostListingMode;
} }

View file

@ -1,5 +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 { CommunityId } from "./CommunityId"; import type { CommunityId } from "./CommunityId";
import type { CommunityVisibility } from "./CommunityVisibility";
import type { LanguageId } from "./LanguageId"; import type { LanguageId } from "./LanguageId";
export interface EditCommunity { export interface EditCommunity {
@ -11,4 +12,5 @@ export interface EditCommunity {
nsfw?: boolean; nsfw?: boolean;
posting_restricted_to_mods?: boolean; posting_restricted_to_mods?: boolean;
discussion_languages?: Array<LanguageId>; discussion_languages?: Array<LanguageId>;
visibility?: CommunityVisibility;
} }

View file

@ -9,4 +9,5 @@ export interface EditPost {
body?: string; body?: string;
nsfw?: boolean; nsfw?: boolean;
language_id?: LanguageId; language_id?: LanguageId;
custom_thumbnail?: string;
} }

View file

@ -1,7 +1,9 @@
// 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 { 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 { RegistrationMode } from "./RegistrationMode"; import type { RegistrationMode } from "./RegistrationMode";
import type { SortType } from "./SortType";
export interface EditSite { export interface EditSite {
name?: string; name?: string;
@ -17,6 +19,7 @@ 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;
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,4 +47,6 @@ export interface EditSite {
taglines?: Array<string>; taglines?: Array<string>;
registration_mode?: RegistrationMode; registration_mode?: RegistrationMode;
reports_email_admins?: boolean; reports_email_admins?: boolean;
content_warning?: string;
default_post_listing_mode?: PostListingMode;
} }

View file

@ -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.
import type { SiteMetadata } from "./SiteMetadata"; import type { LinkMetadata } from "./LinkMetadata";
export interface GetSiteMetadataResponse { export interface GetSiteMetadataResponse {
metadata: SiteMetadata; metadata: LinkMetadata;
} }

View file

@ -1,9 +0,0 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { LocalUserId } from "./LocalUserId";
export interface ImageUpload {
local_user_id: LocalUserId;
pictrs_alias: string;
pictrs_delete_token: string;
published: string;
}

View file

@ -0,0 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export interface LinkMetadata {
title?: string;
description?: string;
image?: string;
embed_video_url?: string;
content_type?: string;
}

View file

@ -1,8 +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 { LocalSiteId } from "./LocalSiteId"; import type { LocalSiteId } from "./LocalSiteId";
import type { PostListingMode } from "./PostListingMode";
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;
@ -29,4 +31,6 @@ export interface LocalSite {
registration_mode: RegistrationMode; registration_mode: RegistrationMode;
reports_email_admins: boolean; reports_email_admins: boolean;
federation_signed_fetch: boolean; federation_signed_fetch: boolean;
default_post_listing_mode: PostListingMode;
default_sort_type: SortType;
} }

View file

@ -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 interface SiteMetadata { export interface OpenGraphData {
title?: string; title?: string;
description?: string; description?: string;
image?: string; image?: string;

View file

@ -26,4 +26,5 @@ export interface Post {
language_id: LanguageId; language_id: LanguageId;
featured_community: boolean; featured_community: boolean;
featured_local: boolean; featured_local: boolean;
url_content_type?: string;
} }

View file

@ -17,4 +17,5 @@ export interface Site {
private_key?: string; private_key?: string;
public_key: string; public_key: string;
instance_id: InstanceId; instance_id: InstanceId;
content_warning?: string;
} }