mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2025-02-05 08:24:42 +00:00
Updating types
This commit is contained in:
parent
e01302659e
commit
f8ac266052
36 changed files with 83 additions and 39 deletions
|
@ -59,6 +59,9 @@ export { CommunityFollowerState } from "./types/CommunityFollowerState";
|
||||||
export { CommunityFollowerView } from "./types/CommunityFollowerView";
|
export { CommunityFollowerView } from "./types/CommunityFollowerView";
|
||||||
export { CommunityId } from "./types/CommunityId";
|
export { CommunityId } from "./types/CommunityId";
|
||||||
export { CommunityModeratorView } from "./types/CommunityModeratorView";
|
export { CommunityModeratorView } from "./types/CommunityModeratorView";
|
||||||
|
export { CommunityReport } from "./types/CommunityReport";
|
||||||
|
export { CommunityReportId } from "./types/CommunityReportId";
|
||||||
|
export { CommunityReportView } from "./types/CommunityReportView";
|
||||||
export { CommunityResponse } from "./types/CommunityResponse";
|
export { CommunityResponse } from "./types/CommunityResponse";
|
||||||
export { CommunitySortType } from "./types/CommunitySortType";
|
export { CommunitySortType } from "./types/CommunitySortType";
|
||||||
export { CommunityView } from "./types/CommunityView";
|
export { CommunityView } from "./types/CommunityView";
|
||||||
|
|
|
@ -9,5 +9,5 @@ export type AdminAllowInstance = {
|
||||||
admin_person_id: PersonId;
|
admin_person_id: PersonId;
|
||||||
allowed: boolean;
|
allowed: boolean;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,5 +10,5 @@ export type AdminBlockInstance = {
|
||||||
blocked: boolean;
|
blocked: boolean;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
expires?: string;
|
expires?: string;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,5 +11,5 @@ export type AdminPurgeComment = {
|
||||||
admin_person_id: PersonId;
|
admin_person_id: PersonId;
|
||||||
post_id: PostId;
|
post_id: PostId;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,5 +9,5 @@ export type AdminPurgeCommunity = {
|
||||||
id: AdminPurgeCommunityId;
|
id: AdminPurgeCommunityId;
|
||||||
admin_person_id: PersonId;
|
admin_person_id: PersonId;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,5 +9,5 @@ export type AdminPurgePerson = {
|
||||||
id: AdminPurgePersonId;
|
id: AdminPurgePersonId;
|
||||||
admin_person_id: PersonId;
|
admin_person_id: PersonId;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,5 +11,5 @@ export type AdminPurgePost = {
|
||||||
admin_person_id: PersonId;
|
admin_person_id: PersonId;
|
||||||
community_id: CommunityId;
|
community_id: CommunityId;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,4 +27,6 @@ export type CommunityAggregates = {
|
||||||
*/
|
*/
|
||||||
users_active_half_year: number;
|
users_active_half_year: number;
|
||||||
subscribers_local: number;
|
subscribers_local: number;
|
||||||
|
report_count: number;
|
||||||
|
unresolved_report_count: number;
|
||||||
};
|
};
|
||||||
|
|
24
src/types/CommunityReport.ts
Normal file
24
src/types/CommunityReport.ts
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// 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 { CommunityReportId } from "./CommunityReportId";
|
||||||
|
import type { PersonId } from "./PersonId";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A comment report.
|
||||||
|
*/
|
||||||
|
export type CommunityReport = {
|
||||||
|
id: CommunityReportId;
|
||||||
|
creator_id: PersonId;
|
||||||
|
community_id: CommunityId;
|
||||||
|
original_community_name: string;
|
||||||
|
original_community_title: string;
|
||||||
|
original_community_description?: string;
|
||||||
|
original_community_sidebar?: string;
|
||||||
|
original_community_icon?: string;
|
||||||
|
original_community_banner?: string;
|
||||||
|
reason: string;
|
||||||
|
resolved: boolean;
|
||||||
|
resolver_id?: PersonId;
|
||||||
|
published: string;
|
||||||
|
updated?: string;
|
||||||
|
};
|
6
src/types/CommunityReportId.ts
Normal file
6
src/types/CommunityReportId.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.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The community report id.
|
||||||
|
*/
|
||||||
|
export type CommunityReportId = number;
|
18
src/types/CommunityReportView.ts
Normal file
18
src/types/CommunityReportView.ts
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { Community } from "./Community";
|
||||||
|
import type { CommunityAggregates } from "./CommunityAggregates";
|
||||||
|
import type { CommunityReport } from "./CommunityReport";
|
||||||
|
import type { Person } from "./Person";
|
||||||
|
import type { SubscribedType } from "./SubscribedType";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A community report view.
|
||||||
|
*/
|
||||||
|
export type CommunityReportView = {
|
||||||
|
community_report: CommunityReport;
|
||||||
|
community: Community;
|
||||||
|
creator: Person;
|
||||||
|
counts: CommunityAggregates;
|
||||||
|
subscribed: SubscribedType;
|
||||||
|
resolver?: Person;
|
||||||
|
};
|
|
@ -14,7 +14,6 @@ export type CreateSite = {
|
||||||
name: string;
|
name: string;
|
||||||
sidebar?: string;
|
sidebar?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
enable_nsfw?: boolean;
|
|
||||||
community_creation_admin_only?: boolean;
|
community_creation_admin_only?: boolean;
|
||||||
require_email_verification?: boolean;
|
require_email_verification?: boolean;
|
||||||
application_question?: string;
|
application_question?: string;
|
||||||
|
@ -43,7 +42,6 @@ export type CreateSite = {
|
||||||
rate_limit_search?: number;
|
rate_limit_search?: number;
|
||||||
rate_limit_search_per_second?: number;
|
rate_limit_search_per_second?: number;
|
||||||
federation_enabled?: boolean;
|
federation_enabled?: boolean;
|
||||||
federation_debug?: boolean;
|
|
||||||
captcha_enabled?: boolean;
|
captcha_enabled?: boolean;
|
||||||
captcha_difficulty?: string;
|
captcha_difficulty?: string;
|
||||||
registration_mode?: RegistrationMode;
|
registration_mode?: RegistrationMode;
|
||||||
|
|
|
@ -20,10 +20,6 @@ export type EditSite = {
|
||||||
* A shorter, one line description of your site.
|
* A shorter, one line description of your site.
|
||||||
*/
|
*/
|
||||||
description?: string;
|
description?: string;
|
||||||
/**
|
|
||||||
* Whether to enable NSFW.
|
|
||||||
*/
|
|
||||||
enable_nsfw?: boolean;
|
|
||||||
/**
|
/**
|
||||||
* Limits community creation to admins only.
|
* Limits community creation to admins only.
|
||||||
*/
|
*/
|
||||||
|
@ -118,10 +114,6 @@ export type EditSite = {
|
||||||
* Whether to enable federation.
|
* Whether to enable federation.
|
||||||
*/
|
*/
|
||||||
federation_enabled?: boolean;
|
federation_enabled?: boolean;
|
||||||
/**
|
|
||||||
* Enables federation debugging.
|
|
||||||
*/
|
|
||||||
federation_debug?: boolean;
|
|
||||||
/**
|
/**
|
||||||
* Whether to enable captchas for signups.
|
* Whether to enable captchas for signups.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
* Federation related errors, these dont need to be translated.
|
* Federation related errors, these dont need to be translated.
|
||||||
*/
|
*/
|
||||||
export type FederationError =
|
export type FederationError =
|
||||||
| "CouldntFindActivity"
|
|
||||||
| "InvalidCommunity"
|
| "InvalidCommunity"
|
||||||
| "CannotCreatePostOrCommentInDeletedOrRemovedCommunity"
|
| "CannotCreatePostOrCommentInDeletedOrRemovedCommunity"
|
||||||
| "CannotReceivePage"
|
| "CannotReceivePage"
|
||||||
|
|
|
@ -13,7 +13,7 @@ export type GetModlog = {
|
||||||
mod_person_id?: PersonId;
|
mod_person_id?: PersonId;
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
type_?: ModlogActionType;
|
type_?: ModlogActionType;
|
||||||
modded_person_id?: PersonId;
|
other_person_id?: PersonId;
|
||||||
post_id?: PostId;
|
post_id?: PostId;
|
||||||
comment_id?: CommentId;
|
comment_id?: CommentId;
|
||||||
page_cursor?: ModlogCombinedPaginationCursor;
|
page_cursor?: ModlogCombinedPaginationCursor;
|
||||||
|
|
|
@ -10,5 +10,5 @@ export type ModAdd = {
|
||||||
mod_person_id: PersonId;
|
mod_person_id: PersonId;
|
||||||
other_person_id: PersonId;
|
other_person_id: PersonId;
|
||||||
removed: boolean;
|
removed: boolean;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,5 +12,5 @@ export type ModAddCommunity = {
|
||||||
other_person_id: PersonId;
|
other_person_id: PersonId;
|
||||||
community_id: CommunityId;
|
community_id: CommunityId;
|
||||||
removed: boolean;
|
removed: boolean;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,5 +10,5 @@ export type ModAddCommunityView = {
|
||||||
mod_add_community: ModAddCommunity;
|
mod_add_community: ModAddCommunity;
|
||||||
moderator?: Person;
|
moderator?: Person;
|
||||||
community: Community;
|
community: Community;
|
||||||
modded_person: Person;
|
other_person: Person;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,5 +8,5 @@ import type { Person } from "./Person";
|
||||||
export type ModAddView = {
|
export type ModAddView = {
|
||||||
mod_add: ModAdd;
|
mod_add: ModAdd;
|
||||||
moderator?: Person;
|
moderator?: Person;
|
||||||
modded_person: Person;
|
other_person: Person;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,5 +12,5 @@ export type ModBan = {
|
||||||
reason?: string;
|
reason?: string;
|
||||||
banned: boolean;
|
banned: boolean;
|
||||||
expires?: string;
|
expires?: string;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,5 +14,5 @@ export type ModBanFromCommunity = {
|
||||||
reason?: string;
|
reason?: string;
|
||||||
banned: boolean;
|
banned: boolean;
|
||||||
expires?: string;
|
expires?: string;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,5 +10,5 @@ export type ModBanFromCommunityView = {
|
||||||
mod_ban_from_community: ModBanFromCommunity;
|
mod_ban_from_community: ModBanFromCommunity;
|
||||||
moderator?: Person;
|
moderator?: Person;
|
||||||
community: Community;
|
community: Community;
|
||||||
modded_person: Person;
|
other_person: Person;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,5 +8,5 @@ import type { Person } from "./Person";
|
||||||
export type ModBanView = {
|
export type ModBanView = {
|
||||||
mod_ban: ModBan;
|
mod_ban: ModBan;
|
||||||
moderator?: Person;
|
moderator?: Person;
|
||||||
modded_person: Person;
|
other_person: Person;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,6 +11,6 @@ export type ModFeaturePost = {
|
||||||
mod_person_id: PersonId;
|
mod_person_id: PersonId;
|
||||||
post_id: PostId;
|
post_id: PostId;
|
||||||
featured: boolean;
|
featured: boolean;
|
||||||
when_: string;
|
published: string;
|
||||||
is_featured_community: boolean;
|
is_featured_community: boolean;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ import type { Post } from "./Post";
|
||||||
export type ModFeaturePostView = {
|
export type ModFeaturePostView = {
|
||||||
mod_feature_post: ModFeaturePost;
|
mod_feature_post: ModFeaturePost;
|
||||||
moderator?: Person;
|
moderator?: Person;
|
||||||
modded_person: Person;
|
other_person: Person;
|
||||||
post: Post;
|
post: Post;
|
||||||
community: Community;
|
community: Community;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ export type ModHideCommunity = {
|
||||||
id: ModHideCommunityId;
|
id: ModHideCommunityId;
|
||||||
community_id: CommunityId;
|
community_id: CommunityId;
|
||||||
mod_person_id: PersonId;
|
mod_person_id: PersonId;
|
||||||
when_: string;
|
published: string;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
hidden: boolean;
|
hidden: boolean;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,5 +11,5 @@ export type ModLockPost = {
|
||||||
mod_person_id: PersonId;
|
mod_person_id: PersonId;
|
||||||
post_id: PostId;
|
post_id: PostId;
|
||||||
locked: boolean;
|
locked: boolean;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ import type { Post } from "./Post";
|
||||||
export type ModLockPostView = {
|
export type ModLockPostView = {
|
||||||
mod_lock_post: ModLockPost;
|
mod_lock_post: ModLockPost;
|
||||||
moderator?: Person;
|
moderator?: Person;
|
||||||
modded_person: Person;
|
other_person: Person;
|
||||||
post: Post;
|
post: Post;
|
||||||
community: Community;
|
community: Community;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,5 +12,5 @@ export type ModRemoveComment = {
|
||||||
comment_id: CommentId;
|
comment_id: CommentId;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
removed: boolean;
|
removed: boolean;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,7 +11,7 @@ import type { Post } from "./Post";
|
||||||
export type ModRemoveCommentView = {
|
export type ModRemoveCommentView = {
|
||||||
mod_remove_comment: ModRemoveComment;
|
mod_remove_comment: ModRemoveComment;
|
||||||
moderator?: Person;
|
moderator?: Person;
|
||||||
modded_person: Person;
|
other_person: Person;
|
||||||
comment: Comment;
|
comment: Comment;
|
||||||
post: Post;
|
post: Post;
|
||||||
community: Community;
|
community: Community;
|
||||||
|
|
|
@ -12,5 +12,5 @@ export type ModRemoveCommunity = {
|
||||||
community_id: CommunityId;
|
community_id: CommunityId;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
removed: boolean;
|
removed: boolean;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,5 +12,5 @@ export type ModRemovePost = {
|
||||||
post_id: PostId;
|
post_id: PostId;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
removed: boolean;
|
removed: boolean;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ import type { Post } from "./Post";
|
||||||
export type ModRemovePostView = {
|
export type ModRemovePostView = {
|
||||||
mod_remove_post: ModRemovePost;
|
mod_remove_post: ModRemovePost;
|
||||||
moderator?: Person;
|
moderator?: Person;
|
||||||
modded_person: Person;
|
other_person: Person;
|
||||||
post: Post;
|
post: Post;
|
||||||
community: Community;
|
community: Community;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,5 +11,5 @@ export type ModTransferCommunity = {
|
||||||
mod_person_id: PersonId;
|
mod_person_id: PersonId;
|
||||||
other_person_id: PersonId;
|
other_person_id: PersonId;
|
||||||
community_id: CommunityId;
|
community_id: CommunityId;
|
||||||
when_: string;
|
published: string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,5 +10,5 @@ export type ModTransferCommunityView = {
|
||||||
mod_transfer_community: ModTransferCommunity;
|
mod_transfer_community: ModTransferCommunity;
|
||||||
moderator?: Person;
|
moderator?: Person;
|
||||||
community: Community;
|
community: Community;
|
||||||
modded_person: Person;
|
other_person: Person;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +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 { CommentReportView } from "./CommentReportView";
|
import type { CommentReportView } from "./CommentReportView";
|
||||||
|
import type { CommunityReportView } from "./CommunityReportView";
|
||||||
import type { PostReportView } from "./PostReportView";
|
import type { PostReportView } from "./PostReportView";
|
||||||
import type { PrivateMessageReportView } from "./PrivateMessageReportView";
|
import type { PrivateMessageReportView } from "./PrivateMessageReportView";
|
||||||
|
|
||||||
export type ReportCombinedView =
|
export type ReportCombinedView =
|
||||||
| ({ type_: "Post" } & PostReportView)
|
| ({ type_: "Post" } & PostReportView)
|
||||||
| ({ type_: "Comment" } & CommentReportView)
|
| ({ type_: "Comment" } & CommentReportView)
|
||||||
| ({ type_: "PrivateMessage" } & PrivateMessageReportView);
|
| ({ type_: "PrivateMessage" } & PrivateMessageReportView)
|
||||||
|
| ({ type_: "Community" } & CommunityReportView);
|
||||||
|
|
Loading…
Reference in a new issue