From f03bcca1dfd38f98f09771aae9d64a444c99d17e Mon Sep 17 00:00:00 2001 From: James Xylight Date: Wed, 3 Sep 2025 20:30:16 -0700 Subject: [PATCH] stage2: add piefed client --- bun.lockb | Bin 178594 -> 179370 bytes package.json | 1 + src/lib/auth.svelte.ts | 26 +- src/lib/client/base.ts | 3 +- src/lib/client/lemmy.svelte.ts | 27 +- src/lib/client/lemmy/lemmy.ts | 28 +- src/lib/client/lemmy/rewrite.ts | 16 + src/lib/client/piefed/piefed.ts | 520 ++ src/lib/client/piefed/rewrite.ts | 137 + src/lib/client/piefed/schema.d.ts | 5460 +++++++++++++++++ src/lib/client/types/index.ts | 68 +- src/lib/client/types/payload/GetComment.d.ts | 4 - src/lib/client/types/payload/GetComments.d.ts | 19 - .../client/types/payload/GetCommunity.d.ts | 5 - src/lib/client/types/payload/GetModlog.d.ts | 15 - .../types/payload/GetPersonDetails.d.ts | 12 - .../types/payload/GetPersonMentions.d.ts | 7 - src/lib/client/types/payload/GetPost.d.ts | 6 - src/lib/client/types/payload/GetPosts.d.ts | 19 - .../types/payload/GetPrivateMessages.d.ts | 7 - .../payload/GetRegistrationApplication.d.ts | 4 - src/lib/client/types/payload/GetReplies.d.ts | 7 - .../client/types/payload/GetReportCount.d.ts | 4 - src/lib/client/types/payload/index.ts | 13 - .../types/response/AddAdminResponse.d.ts | 4 - .../response/AddModToCommunityResponse.d.ts | 4 - .../response/BanFromCommunityResponse.d.ts | 5 - .../types/response/BanPersonResponse.d.ts | 5 - .../types/response/BannedPersonsResponse.d.ts | 4 - .../response/BlockCommunityResponse.d.ts | 5 - .../types/response/BlockPersonResponse.d.ts | 5 - .../types/response/CommentReplyResponse.d.ts | 4 - .../types/response/CommentReportResponse.d.ts | 4 - .../types/response/CommentResponse.d.ts | 6 - .../types/response/CommunityResponse.d.ts | 6 - .../types/response/CustomEmojiResponse.d.ts | 4 - .../types/response/GetCaptchaResponse.d.ts | 4 - .../types/response/GetCommentsResponse.d.ts | 4 - .../types/response/GetCommunityResponse.d.ts | 10 - .../GetFederatedInstancesResponse.d.ts | 4 - .../types/response/GetModlogResponse.d.ts | 32 - .../response/GetPersonDetailsResponse.d.ts | 12 - .../response/GetPersonMentionsResponse.d.ts | 4 - .../types/response/GetPostResponse.d.ts | 9 - .../types/response/GetPostsResponse.d.ts | 6 - .../types/response/GetRepliesResponse.d.ts | 4 - .../response/GetReportCountResponse.d.ts | 7 - .../response/GetSiteMetadataResponse.d.ts | 4 - .../types/response/GetSiteResponse.d.ts | 19 - .../response/ListCommentLikesResponse.d.ts | 4 - .../response/ListCommentReportsResponse.d.ts | 4 - .../response/ListCommunitiesResponse.d.ts | 4 - .../types/response/ListMediaResponse.d.ts | 4 - .../types/response/ListPostLikesResponse.d.ts | 4 - .../response/ListPostReportsResponse.d.ts | 4 - .../ListPrivateMessageReportsResponse.d.ts | 4 - .../ListRegistrationApplicationsResponse.d.ts | 4 - .../types/response/PersonMentionResponse.d.ts | 4 - .../types/response/PostReportResponse.d.ts | 4 - .../client/types/response/PostResponse.d.ts | 4 - .../PrivateMessageReportResponse.d.ts | 4 - .../response/PrivateMessageResponse.d.ts | 4 - .../response/PrivateMessagesResponse.d.ts | 4 - .../RegistrationApplicationResponse.d.ts | 4 - .../types/response/ResolveObjectResponse.d.ts | 10 - .../client/types/response/SearchResponse.d.ts | 12 - .../client/types/response/SiteResponse.d.ts | 6 - src/lib/client/types/response/index.ts | 51 - .../client/types/schemas/AddAdminResponse.ts | 4 + .../schemas/AddModToCommunityResponse.ts | 4 + .../types/schemas/BanFromCommunityResponse.ts | 5 + .../client/types/schemas/BanPersonResponse.ts | 5 + .../types/schemas/BannedPersonsResponse.ts | 4 + .../types/schemas/BlockCommunityResponse.ts | 5 + .../BlockInstanceResponse.ts} | 0 .../types/schemas/BlockPersonResponse.ts | 5 + .../CaptchaResponse.ts} | 0 .../types/schemas/CommentReplyResponse.ts | 4 + .../types/schemas/CommentReportResponse.ts | 4 + .../client/types/schemas/CommentResponse.ts | 6 + .../client/types/schemas/CommunityResponse.ts | 6 + .../types/schemas/CustomEmojiResponse.ts | 4 + .../GenerateTotpSecretResponse.ts} | 0 .../types/schemas/GetCaptchaResponse.ts | 4 + src/lib/client/types/schemas/GetComment.ts | 4 + src/lib/client/types/schemas/GetComments.ts | 19 + .../types/schemas/GetCommentsResponse.ts | 4 + src/lib/client/types/schemas/GetCommunity.ts | 5 + .../types/schemas/GetCommunityResponse.ts | 10 + .../schemas/GetFederatedInstancesResponse.ts | 4 + src/lib/client/types/schemas/GetModlog.ts | 15 + .../client/types/schemas/GetModlogResponse.ts | 32 + .../client/types/schemas/GetPersonDetails.ts | 12 + .../types/schemas/GetPersonDetailsResponse.ts | 12 + .../client/types/schemas/GetPersonMentions.ts | 7 + .../schemas/GetPersonMentionsResponse.ts | 4 + src/lib/client/types/schemas/GetPost.ts | 6 + .../client/types/schemas/GetPostResponse.ts | 9 + src/lib/client/types/schemas/GetPosts.ts | 19 + .../client/types/schemas/GetPostsResponse.ts | 6 + .../types/schemas/GetPrivateMessages.ts | 7 + .../schemas/GetRegistrationApplication.ts | 4 + src/lib/client/types/schemas/GetReplies.ts | 7 + .../types/schemas/GetRepliesResponse.ts | 4 + .../client/types/schemas/GetReportCount.ts | 4 + .../types/schemas/GetReportCountResponse.ts | 7 + .../GetSiteMetadata.ts} | 0 .../types/schemas/GetSiteMetadataResponse.ts | 4 + .../client/types/schemas/GetSiteResponse.ts | 22 + .../GetUnreadCountResponse.ts} | 0 ...adRegistrationApplicationCountResponse.ts} | 0 .../types/schemas/ListCommentLikesResponse.ts | 4 + .../schemas/ListCommentReportsResponse.ts | 4 + .../types/schemas/ListCommunitiesResponse.ts | 4 + .../client/types/schemas/ListMediaResponse.ts | 4 + .../types/schemas/ListPostLikesResponse.ts | 4 + .../types/schemas/ListPostReportsResponse.ts | 4 + .../ListPrivateMessageReportsResponse.ts | 4 + .../ListRegistrationApplicationsResponse.ts | 4 + .../LoginResponse.ts} | 0 .../types/schemas/PersonMentionResponse.ts | 4 + .../types/schemas/PostReportResponse.ts | 4 + src/lib/client/types/schemas/PostResponse.ts | 4 + .../schemas/PrivateMessageReportResponse.ts | 4 + .../types/schemas/PrivateMessageResponse.ts | 4 + .../types/schemas/PrivateMessagesResponse.ts | 4 + .../RegistrationApplicationResponse.ts | 4 + .../types/schemas/ResolveObjectResponse.ts | 6 + .../client/types/schemas/SearchResponse.ts | 12 + src/lib/client/types/schemas/SiteResponse.ts | 6 + .../SuccessResponse.ts} | 0 .../UpdateTotpResponse.ts} | 0 src/lib/client/types/{ => schemas}/schemas.ts | 94 +- .../components/lemmy/moderation/moderation.ts | 7 +- src/lib/components/ui/LabelStat.svelte | 26 +- .../ui/sidebar/ProfileSelection.svelte | 5 +- src/routes/accounts/+page.svelte | 3 +- 137 files changed, 6698 insertions(+), 530 deletions(-) create mode 100644 src/lib/client/lemmy/rewrite.ts create mode 100644 src/lib/client/piefed/piefed.ts create mode 100644 src/lib/client/piefed/rewrite.ts create mode 100644 src/lib/client/piefed/schema.d.ts delete mode 100644 src/lib/client/types/payload/GetComment.d.ts delete mode 100644 src/lib/client/types/payload/GetComments.d.ts delete mode 100644 src/lib/client/types/payload/GetCommunity.d.ts delete mode 100644 src/lib/client/types/payload/GetModlog.d.ts delete mode 100644 src/lib/client/types/payload/GetPersonDetails.d.ts delete mode 100644 src/lib/client/types/payload/GetPersonMentions.d.ts delete mode 100644 src/lib/client/types/payload/GetPost.d.ts delete mode 100644 src/lib/client/types/payload/GetPosts.d.ts delete mode 100644 src/lib/client/types/payload/GetPrivateMessages.d.ts delete mode 100644 src/lib/client/types/payload/GetRegistrationApplication.d.ts delete mode 100644 src/lib/client/types/payload/GetReplies.d.ts delete mode 100644 src/lib/client/types/payload/GetReportCount.d.ts delete mode 100644 src/lib/client/types/payload/index.ts delete mode 100644 src/lib/client/types/response/AddAdminResponse.d.ts delete mode 100644 src/lib/client/types/response/AddModToCommunityResponse.d.ts delete mode 100644 src/lib/client/types/response/BanFromCommunityResponse.d.ts delete mode 100644 src/lib/client/types/response/BanPersonResponse.d.ts delete mode 100644 src/lib/client/types/response/BannedPersonsResponse.d.ts delete mode 100644 src/lib/client/types/response/BlockCommunityResponse.d.ts delete mode 100644 src/lib/client/types/response/BlockPersonResponse.d.ts delete mode 100644 src/lib/client/types/response/CommentReplyResponse.d.ts delete mode 100644 src/lib/client/types/response/CommentReportResponse.d.ts delete mode 100644 src/lib/client/types/response/CommentResponse.d.ts delete mode 100644 src/lib/client/types/response/CommunityResponse.d.ts delete mode 100644 src/lib/client/types/response/CustomEmojiResponse.d.ts delete mode 100644 src/lib/client/types/response/GetCaptchaResponse.d.ts delete mode 100644 src/lib/client/types/response/GetCommentsResponse.d.ts delete mode 100644 src/lib/client/types/response/GetCommunityResponse.d.ts delete mode 100644 src/lib/client/types/response/GetFederatedInstancesResponse.d.ts delete mode 100644 src/lib/client/types/response/GetModlogResponse.d.ts delete mode 100644 src/lib/client/types/response/GetPersonDetailsResponse.d.ts delete mode 100644 src/lib/client/types/response/GetPersonMentionsResponse.d.ts delete mode 100644 src/lib/client/types/response/GetPostResponse.d.ts delete mode 100644 src/lib/client/types/response/GetPostsResponse.d.ts delete mode 100644 src/lib/client/types/response/GetRepliesResponse.d.ts delete mode 100644 src/lib/client/types/response/GetReportCountResponse.d.ts delete mode 100644 src/lib/client/types/response/GetSiteMetadataResponse.d.ts delete mode 100644 src/lib/client/types/response/GetSiteResponse.d.ts delete mode 100644 src/lib/client/types/response/ListCommentLikesResponse.d.ts delete mode 100644 src/lib/client/types/response/ListCommentReportsResponse.d.ts delete mode 100644 src/lib/client/types/response/ListCommunitiesResponse.d.ts delete mode 100644 src/lib/client/types/response/ListMediaResponse.d.ts delete mode 100644 src/lib/client/types/response/ListPostLikesResponse.d.ts delete mode 100644 src/lib/client/types/response/ListPostReportsResponse.d.ts delete mode 100644 src/lib/client/types/response/ListPrivateMessageReportsResponse.d.ts delete mode 100644 src/lib/client/types/response/ListRegistrationApplicationsResponse.d.ts delete mode 100644 src/lib/client/types/response/PersonMentionResponse.d.ts delete mode 100644 src/lib/client/types/response/PostReportResponse.d.ts delete mode 100644 src/lib/client/types/response/PostResponse.d.ts delete mode 100644 src/lib/client/types/response/PrivateMessageReportResponse.d.ts delete mode 100644 src/lib/client/types/response/PrivateMessageResponse.d.ts delete mode 100644 src/lib/client/types/response/PrivateMessagesResponse.d.ts delete mode 100644 src/lib/client/types/response/RegistrationApplicationResponse.d.ts delete mode 100644 src/lib/client/types/response/ResolveObjectResponse.d.ts delete mode 100644 src/lib/client/types/response/SearchResponse.d.ts delete mode 100644 src/lib/client/types/response/SiteResponse.d.ts delete mode 100644 src/lib/client/types/response/index.ts create mode 100644 src/lib/client/types/schemas/AddAdminResponse.ts create mode 100644 src/lib/client/types/schemas/AddModToCommunityResponse.ts create mode 100644 src/lib/client/types/schemas/BanFromCommunityResponse.ts create mode 100644 src/lib/client/types/schemas/BanPersonResponse.ts create mode 100644 src/lib/client/types/schemas/BannedPersonsResponse.ts create mode 100644 src/lib/client/types/schemas/BlockCommunityResponse.ts rename src/lib/client/types/{response/BlockInstanceResponse.d.ts => schemas/BlockInstanceResponse.ts} (100%) create mode 100644 src/lib/client/types/schemas/BlockPersonResponse.ts rename src/lib/client/types/{response/CaptchaResponse.d.ts => schemas/CaptchaResponse.ts} (100%) create mode 100644 src/lib/client/types/schemas/CommentReplyResponse.ts create mode 100644 src/lib/client/types/schemas/CommentReportResponse.ts create mode 100644 src/lib/client/types/schemas/CommentResponse.ts create mode 100644 src/lib/client/types/schemas/CommunityResponse.ts create mode 100644 src/lib/client/types/schemas/CustomEmojiResponse.ts rename src/lib/client/types/{response/GenerateTotpSecretResponse.d.ts => schemas/GenerateTotpSecretResponse.ts} (100%) create mode 100644 src/lib/client/types/schemas/GetCaptchaResponse.ts create mode 100644 src/lib/client/types/schemas/GetComment.ts create mode 100644 src/lib/client/types/schemas/GetComments.ts create mode 100644 src/lib/client/types/schemas/GetCommentsResponse.ts create mode 100644 src/lib/client/types/schemas/GetCommunity.ts create mode 100644 src/lib/client/types/schemas/GetCommunityResponse.ts create mode 100644 src/lib/client/types/schemas/GetFederatedInstancesResponse.ts create mode 100644 src/lib/client/types/schemas/GetModlog.ts create mode 100644 src/lib/client/types/schemas/GetModlogResponse.ts create mode 100644 src/lib/client/types/schemas/GetPersonDetails.ts create mode 100644 src/lib/client/types/schemas/GetPersonDetailsResponse.ts create mode 100644 src/lib/client/types/schemas/GetPersonMentions.ts create mode 100644 src/lib/client/types/schemas/GetPersonMentionsResponse.ts create mode 100644 src/lib/client/types/schemas/GetPost.ts create mode 100644 src/lib/client/types/schemas/GetPostResponse.ts create mode 100644 src/lib/client/types/schemas/GetPosts.ts create mode 100644 src/lib/client/types/schemas/GetPostsResponse.ts create mode 100644 src/lib/client/types/schemas/GetPrivateMessages.ts create mode 100644 src/lib/client/types/schemas/GetRegistrationApplication.ts create mode 100644 src/lib/client/types/schemas/GetReplies.ts create mode 100644 src/lib/client/types/schemas/GetRepliesResponse.ts create mode 100644 src/lib/client/types/schemas/GetReportCount.ts create mode 100644 src/lib/client/types/schemas/GetReportCountResponse.ts rename src/lib/client/types/{payload/GetSiteMetadata.d.ts => schemas/GetSiteMetadata.ts} (100%) create mode 100644 src/lib/client/types/schemas/GetSiteMetadataResponse.ts create mode 100644 src/lib/client/types/schemas/GetSiteResponse.ts rename src/lib/client/types/{response/GetUnreadCountResponse.d.ts => schemas/GetUnreadCountResponse.ts} (100%) rename src/lib/client/types/{response/GetUnreadRegistrationApplicationCountResponse.d.ts => schemas/GetUnreadRegistrationApplicationCountResponse.ts} (100%) create mode 100644 src/lib/client/types/schemas/ListCommentLikesResponse.ts create mode 100644 src/lib/client/types/schemas/ListCommentReportsResponse.ts create mode 100644 src/lib/client/types/schemas/ListCommunitiesResponse.ts create mode 100644 src/lib/client/types/schemas/ListMediaResponse.ts create mode 100644 src/lib/client/types/schemas/ListPostLikesResponse.ts create mode 100644 src/lib/client/types/schemas/ListPostReportsResponse.ts create mode 100644 src/lib/client/types/schemas/ListPrivateMessageReportsResponse.ts create mode 100644 src/lib/client/types/schemas/ListRegistrationApplicationsResponse.ts rename src/lib/client/types/{response/LoginResponse.d.ts => schemas/LoginResponse.ts} (100%) create mode 100644 src/lib/client/types/schemas/PersonMentionResponse.ts create mode 100644 src/lib/client/types/schemas/PostReportResponse.ts create mode 100644 src/lib/client/types/schemas/PostResponse.ts create mode 100644 src/lib/client/types/schemas/PrivateMessageReportResponse.ts create mode 100644 src/lib/client/types/schemas/PrivateMessageResponse.ts create mode 100644 src/lib/client/types/schemas/PrivateMessagesResponse.ts create mode 100644 src/lib/client/types/schemas/RegistrationApplicationResponse.ts create mode 100644 src/lib/client/types/schemas/ResolveObjectResponse.ts create mode 100644 src/lib/client/types/schemas/SearchResponse.ts create mode 100644 src/lib/client/types/schemas/SiteResponse.ts rename src/lib/client/types/{response/SuccessResponse.d.ts => schemas/SuccessResponse.ts} (100%) rename src/lib/client/types/{response/UpdateTotpResponse.d.ts => schemas/UpdateTotpResponse.ts} (100%) rename src/lib/client/types/{ => schemas}/schemas.ts (96%) diff --git a/bun.lockb b/bun.lockb index 868bcd47e7425425cd8a66870b91e208834ba6e7..76cd965864210ad7235c0b8042b0f9466e0799b3 100755 GIT binary patch delta 28694 zcmeIbd3;S*+dh8wmXlwj?DeADgG(AGW1-T9J`jFEMnQ6#AhU{R-R=O-Ht#1$(Lw@IEvD8BbpBnP8A$J;bJ!D

(C%@rC>x5>#nF^gV*5T_8OnV<6p1 z5XdUZ&6zmaVsZ7>hhPGv2l(8qDHAzb4ukJ)$U%?_;xn_d3PN&aGchv+ zeVL7ZWc+ZoQuZntjz&{^99FFE73j=mY_4PSVGyWoY+8>8xrQ=X9cFrfz*;zSl z^hS;^3YqT6%e6QP#}zmVi?W7;r@b1i%ZDJ5e@SUzTfH~NVZa>dz1_$N|4KLDgPjl- zqR+oY(0!oiLb8HpZ*IWk41m4}lJT#$)4hFcnC{hykm&Hz_2A)OrM{5#^6R0j$k0D~ zR|h1Zw_S!S-DW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&l`-X%8gRztlmtvoxi-O`mlH%;E_9f4O|O;_$wxBV|wIGA(* diff --git a/package.json b/package.json index 6d915318..f3581f3a 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "marked": "7.0.5", "marked-linkify-it": "^3.1.13", "nprogress": "^0.2.0", + "openapi-fetch": "^0.14.0", "postcss": "^8.4.30", "prettier": "^3.3.3", "prettier-plugin-svelte": "^3.2.7", diff --git a/src/lib/auth.svelte.ts b/src/lib/auth.svelte.ts index 70d018de..5d4bd699 100644 --- a/src/lib/auth.svelte.ts +++ b/src/lib/auth.svelte.ts @@ -5,19 +5,21 @@ import { isAdmin, } from '$lib/components/lemmy/moderation/moderation.js' import { DEFAULT_INSTANCE_URL } from '$lib/instance.svelte.js' -import { client, getClient, site } from '$lib/client/lemmy.svelte' +import { + client, + getClient, + site, + type ClientType, + DEFAULT_CLIENT_TYPE, +} from '$lib/client/lemmy.svelte' import { instanceToURL, moveItem } from '$lib/util.svelte' import { MINIMUM_VERSION, versionIsSupported } from '$lib/version.js' -import { - type Community, - type GetSiteResponse, - type MyUserInfo, -} from 'lemmy-js-client' import { toast } from 'mono-svelte' import { writable } from 'svelte/store' import { t } from './i18n/translations' import { errorMessage } from './lemmy/error' import { publishedToDate } from './components/util/date' +import type { Community, GetSiteResponse, MyUserInfo } from './client/types' function getFromStorage(key: string): T | undefined { if (typeof localStorage == 'undefined') return undefined @@ -41,6 +43,7 @@ export interface ProfileInfo { avatar?: string favorites?: Community[] color?: string + client: ClientType } /** @@ -77,6 +80,7 @@ class Profile { instance: DEFAULT_INSTANCE_URL, username: 'Guest', color: '#505050', + client: DEFAULT_CLIENT_TYPE, }, ], profile: 1, @@ -91,6 +95,7 @@ class Profile { return { id: -1, instance: DEFAULT_INSTANCE_URL, + client: DEFAULT_CLIENT_TYPE, } } @@ -104,7 +109,11 @@ class Profile { const jwt = getCookie('jwt') if (jwt) { ;(async () => { - const result = await this.add(jwt, env.PUBLIC_INSTANCE_URL ?? '') + const result = await this.add( + jwt, + env.PUBLIC_INSTANCE_URL ?? '', + DEFAULT_CLIENT_TYPE, + ) if (result) toast({ @@ -220,7 +229,7 @@ class Profile { } } - async add(jwt: string, instance: string) { + async add(jwt: string, instance: string, type: ClientType) { const user = await userFromJwt(jwt, instance) .then(u => u) .catch(err => { @@ -241,6 +250,7 @@ class Profile { jwt: jwt, username: user?.user?.local_user_view.person.name, avatar: user?.user?.local_user_view.person.avatar, + client: type, }) return user diff --git a/src/lib/client/base.ts b/src/lib/client/base.ts index b04288de..9eb089f0 100644 --- a/src/lib/client/base.ts +++ b/src/lib/client/base.ts @@ -1,7 +1,8 @@ +import type { ClientType } from './lemmy.svelte' import * as types from './types' export abstract class BaseClient { - static type: 'lemmy' | 'piefed' + static type: ClientType abstract getSite(): Promise abstract generateTotpSecret(): Promise diff --git a/src/lib/client/lemmy.svelte.ts b/src/lib/client/lemmy.svelte.ts index aac37291..0a7c0c6c 100644 --- a/src/lib/client/lemmy.svelte.ts +++ b/src/lib/client/lemmy.svelte.ts @@ -4,6 +4,7 @@ import { instanceToURL } from '$lib/util.svelte' import { error } from '@sveltejs/kit' import { type GetSiteResponse } from 'lemmy-js-client' import { LemmyClient } from './lemmy/lemmy' +import { PiefedClient } from './piefed/piefed' class SiteData { #data = $state() @@ -53,6 +54,7 @@ export function client({ instanceURL, func, auth, + clientType, }: { instanceURL?: string func?: ( @@ -60,18 +62,26 @@ export function client({ init?: RequestInit | undefined, ) => Promise auth?: string + clientType?: ClientType } = {}) { if (!instanceURL) instanceURL = profile.current.instance || DEFAULT_INSTANCE_URL + if (!clientType) { + clientType = profile.current.client + } + const jwt = auth ? auth : profile.current?.jwt const headers = jwt ? { authorization: `Bearer ${jwt}` } : {} - return new LemmyClient(instanceToURL(instanceURL), { - fetchFunction: (input, init) => customFetch(func, input, init, jwt), - headers: headers, - }) + return new (clientType.name == 'piefed' ? PiefedClient : LemmyClient)( + instanceToURL(instanceURL), + { + fetchFunction: (input, init) => customFetch(func, input, init, jwt), + headers: headers, + }, + ) } export function getClient( @@ -127,3 +137,12 @@ export function mayBeIncompatible( return false } + +export type ClientType = + | { name: 'lemmy'; baseUrl: '/api/v3' } + | { name: 'piefed'; baseUrl: '/api/alpha' } + +export const DEFAULT_CLIENT_TYPE: ClientType = { + name: 'lemmy', + baseUrl: '/api/v3', +} diff --git a/src/lib/client/lemmy/lemmy.ts b/src/lib/client/lemmy/lemmy.ts index 4ba6bcbd..ad6ec6e5 100644 --- a/src/lib/client/lemmy/lemmy.ts +++ b/src/lib/client/lemmy/lemmy.ts @@ -1,8 +1,9 @@ import { LemmyHttp } from 'lemmy-js-client' import type { BaseClient } from '../base' +import { fromGetPosts, toListingType } from './rewrite' export class LemmyClient implements BaseClient { - static type = 'lemmy' + static type = { name: 'lemmy', baseUrl: '/api/v3' } #client: LemmyHttp @@ -47,9 +48,12 @@ export class LemmyClient implements BaseClient { return await this.#client.getModlog(...params) } async search( - ...params: Parameters + params: Parameters[0], ): ReturnType { - return await this.#client.search(...params) + return await this.#client.search({ + ...params, + listing_type: toListingType(params.listing_type), + }) } async resolveObject( ...params: Parameters @@ -72,9 +76,12 @@ export class LemmyClient implements BaseClient { return await this.#client.editCommunity(...params) } async listCommunities( - ...params: Parameters + params: Parameters[0], ): ReturnType { - return await this.#client.listCommunities(...params) + return await this.#client.listCommunities({ + ...params, + type_: toListingType(params.type_), + }) } async followCommunity( ...params: Parameters @@ -157,9 +164,9 @@ export class LemmyClient implements BaseClient { return await this.#client.featurePost(...params) } async getPosts( - ...params: Parameters + params: Parameters[0], ): ReturnType { - return await this.#client.getPosts(...params) + return await this.#client.getPosts(fromGetPosts(params)) } async likePost( ...params: Parameters @@ -242,9 +249,12 @@ export class LemmyClient implements BaseClient { return await this.#client.distinguishComment(...params) } async getComments( - ...params: Parameters + params: Parameters[0], ): ReturnType { - return await this.#client.getComments(...params) + return await this.#client.getComments({ + ...params, + type_: toListingType(params.type_), + }) } async getComment( ...params: Parameters diff --git a/src/lib/client/lemmy/rewrite.ts b/src/lib/client/lemmy/rewrite.ts new file mode 100644 index 00000000..5fdc5cb7 --- /dev/null +++ b/src/lib/client/lemmy/rewrite.ts @@ -0,0 +1,16 @@ +import * as lemmy from 'lemmy-js-client' +import type { GetPosts, ListingType } from '../types' + +export function fromGetPosts(getPosts: GetPosts): lemmy.GetPosts { + return { + ...getPosts, + type_: getPosts.type_ == 'Popular' ? 'All' : getPosts.type_, + } +} + +export function toListingType( + listingType?: ListingType, +): lemmy.ListingType | undefined { + if (listingType == 'Popular') listingType = 'All' + return listingType +} diff --git a/src/lib/client/piefed/piefed.ts b/src/lib/client/piefed/piefed.ts new file mode 100644 index 00000000..c06b6017 --- /dev/null +++ b/src/lib/client/piefed/piefed.ts @@ -0,0 +1,520 @@ +import createClient from 'openapi-fetch' +import type { BaseClient } from '../base' +import { + fromGetPosts, + toLocalSite, + toMyUser, + toPersonView, + toPostView, +} from './rewrite' +import type { paths } from './schema' + +export class PiefedClient implements BaseClient { + static type = { name: 'piefed', baseUrl: '/api/alpha' } + + #client: ReturnType> + + constructor( + baseUrl: string, + args: { + fetchFunction: (input: any, init: any) => Promise + headers: any + }, + ) { + this.#client = createClient({ + baseUrl: `${baseUrl}/api/alpha`, + // @ts-expect-error i dont feel like fixing this right now + fetch: args.fetchFunction, + headers: args.headers, + }) + } + + async getSite(): ReturnType { + // throw new Error('Unimplemented') + + const response = (await this.#client.GET('/site')).data! + + return { + admins: response.admins.map(toPersonView), + site_view: { + counts: { + comments: -1, + communities: -1, + posts: -1, + site_id: -1, + users: response.site.user_count ?? -1, + users_active_day: -1, + users_active_half_year: -1, + users_active_month: -1, + users_active_week: -1, + }, + local_site: toLocalSite(response.site), + site: response.site, + }, + all_languages: + (response.site.all_languages as { + code: string + id: number + name: string + }[]) ?? [], + blocked_urls: [], + custom_emojis: [], + discussion_languages: [], + taglines: [], + version: response.version, + my_user: response.my_user ? toMyUser(response.my_user) : undefined, + } + } + + async createPost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getPost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async editPost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async deletePost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async removePost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + + async getPosts( + params: Parameters[0], + ): ReturnType { + const response = ( + await this.#client.GET('/post/list', { + params: fromGetPosts(params), + }) + ).data! + + return { + posts: response.posts.map(toPostView), + next_page: (Number(params.page_cursor ?? 1) + 1).toString(), + } + } + async likePost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + + async generateTotpSecret( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async listLogins( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async listAllMedia( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async updateTotp( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getModlog( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async search( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async resolveObject( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async createCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async editCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async listCommunities( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async followCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async blockCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async deleteCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async hideCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async removeCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async banFromCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async addModToCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async markPostAsRead( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async hidePost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async lockPost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async featurePost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async listPostLikes( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async savePost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async createPostReport( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async resolvePostReport( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async listPostReports( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getSiteMetadata( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async createComment( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async editComment( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async deleteComment( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async removeComment( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async markCommentReplyAsRead( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async likeComment( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async listCommentLikes( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async saveComment( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async distinguishComment( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getComments( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getComment( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async createCommentReport( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async resolveCommentReport( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async listCommentReports( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getPrivateMessages( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async createPrivateMessage( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async editPrivateMessage( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async deletePrivateMessage( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async markPrivateMessageAsRead( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async createPrivateMessageReport( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async resolvePrivateMessageReport( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async listPrivateMessageReports( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async register( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async login( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async logout( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getPersonDetails( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getPersonMentions( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async markPersonMentionAsRead( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getReplies( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async banPerson( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getBannedPersons( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async blockPerson( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getCaptcha( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async deleteAccount( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async passwordReset( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async passwordChangeAfterReset( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async markAllAsRead( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async saveUserSettings( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async changePassword( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getReportCount( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getUnreadCount( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async verifyEmail( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async addAdmin( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getUnreadRegistrationApplicationCount( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async listRegistrationApplications( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async approveRegistrationApplication( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getRegistrationApplication( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async purgePerson( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async purgeCommunity( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async purgePost( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async purgeComment( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async getFederatedInstances( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } + async blockInstance( + ...params: Parameters + ): ReturnType { + throw new Error('Unimplemented') + } +} diff --git a/src/lib/client/piefed/rewrite.ts b/src/lib/client/piefed/rewrite.ts new file mode 100644 index 00000000..0bd2be5c --- /dev/null +++ b/src/lib/client/piefed/rewrite.ts @@ -0,0 +1,137 @@ +import type { + Community, + GetPosts, + LocalSite, + MyUserInfo, + Person, + PersonView, + Post, + PostView, + SortType, +} from '../types' +import type { components, paths } from './schema' + +export function toPersonView( + personView: components['schemas']['PersonView'], +): PersonView { + return { + counts: personView.counts, + is_admin: personView.is_admin, + person: toPerson(personView.person), + } +} + +export function toPerson(person: components['schemas']['Person']): Person { + return { + ...person, + id: person.id, + name: person.user_name, + bot_account: person.bot, + } +} + +export function toLocalSite(site: components['schemas']['Site']): LocalSite { + if (site) return {} + return {} +} + +export function toCommunity( + community: components['schemas']['Community'], +): Community { + return { + ...community, + posting_restricted_to_mods: false, + visibility: 'Public', + } +} + +export function toMyUser( + myUser: components['schemas']['MyUserInfo'], +): MyUserInfo { + return { + ...myUser, + community_blocks: myUser.community_blocks.map(i => ({ + community: toCommunity(i.community), + person: toPerson(i.person), + })), + local_user_view: { + ...myUser.local_user_view, + local_user: { + ...myUser.local_user_view.local_user, + id: myUser.local_user_view.person.id, + person_id: myUser.local_user_view.person.id, + totp_2fa_enabled: false, + default_listing_type: 'All', + }, + person: toPerson(myUser.local_user_view.person), + }, + follows: myUser.follows.map(i => ({ + follower: toPerson(i.follower), + community: toCommunity(i.community), + })), + moderates: myUser.moderates.map(i => ({ + community: toCommunity(i.community), + moderator: toPerson(i.moderator), + })), + instance_blocks: myUser.instance_blocks.map(i => ({ + instance: i.instance, + person: toPerson(i.person), + })), + person_blocks: myUser.person_blocks.map(i => ({ + person: toPerson(i.person), + target: toPerson(i.target), + })), + discussion_languages: myUser.discussion_languages.map(i => i.id!), + } +} + +export function toPostView( + postView: components['schemas']['PostView'], +): PostView { + return { + ...postView, + creator: toPerson(postView.creator), + creator_blocked: false, + post: toPost(postView.post), + community: toCommunity(postView.community), + } +} + +export function toPost(post: components['schemas']['Post']): Post { + return { + ...post, + creator_id: -1, + name: post.title, + featured_community: post.sticky, + featured_local: false, + } +} + +// Query calls +export function fromGetPosts( + getPosts: GetPosts, +): paths['/post/list']['get']['parameters'] { + return { + query: { + GetPosts: { + ...getPosts, + sort: toSortType(getPosts.sort), + page_cursor: Number(getPosts.page_cursor), + }, + }, + } +} + +// Misc +export function toSortType( + sortType?: SortType, +): components['schemas']['SortType'] | undefined { + if ( + sortType == 'Old' || + sortType == 'MostComments' || + sortType == 'Controversial' || + sortType == 'NewComments' + ) + sortType = 'New' + return sortType +} diff --git a/src/lib/client/piefed/schema.d.ts b/src/lib/client/piefed/schema.d.ts new file mode 100644 index 00000000..1cbd604c --- /dev/null +++ b/src/lib/client/piefed/schema.d.ts @@ -0,0 +1,5460 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + '/site': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Gets the site, and your user data. */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetSiteResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/site/version': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** (instances running PieFed v1.2 or later only) Gets version of PieFed. */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK, */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetSiteVersionResponse'] + } + } + /** @description Bad Request, */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/site/block': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Block an instance. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['BlockInstance'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BlockInstanceResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/site/instance_chooser': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** (instances running PieFed v1.2 or later only) Gets the site info for use by other instances in the Instance Chooser functionality. */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetSiteInstanceChooserResponse'] + } + } + /** @description Bad Request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/site/instance_chooser_search': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** (instances running PieFed v1.2 or later only) Search for other instances. */ + get: { + parameters: { + query?: { + InstanceChooserSearch?: components['schemas']['InstanceChooserSearch'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetSiteInstanceChooserSearchResponse'] + } + } + /** @description Bad Request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/search': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Search PieFed. */ + get: { + parameters: { + query?: { + Search?: components['schemas']['Search'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SearchResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/resolve_object': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Fetch a non-local / federated object. */ + get: { + parameters: { + query?: { + ResolveObject?: components['schemas']['ResolveObject'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ResolveObjectResponse'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/federated_instances': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Fetch federated instances. */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetFederatedInstancesResponse'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get / fetch a community. */ + get: { + parameters: { + query?: { + GetCommunity?: components['schemas']['GetCommunity'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetCommunityResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + /** Edit community. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['EditCommunity'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommunityResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + /** Create a new community. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['CreateCommunity'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommunityResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + /** @description You are being rate limited */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/delete': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Delete a community. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['DeleteCommunity'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommunityResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/list': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** List communities, with various filters. */ + get: { + parameters: { + query?: { + ListCommunities?: components['schemas']['ListCommunities'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ListCommunitiesResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/follow': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Follow / subscribe to a community. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['FollowCommunity'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommunityResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/block': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Block a community. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['BlockCommunity'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BlockCommunityResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/mod': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Add or remove a moderator for your community.. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['AddModToCommunity'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['AddModToCommunityResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/subscribe': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Subscribe to activities in a community. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['SubscribeCommunity'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommunityResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/moderate/bans': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get the list of banned users for a community. */ + get: { + parameters: { + query?: { + GetCommunityModerationBansList?: components['schemas']['GetCommunityModerationBansList'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ModerationCommunityBansListResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/moderate/ban': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Ban a user from a community. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['ModerateCommunityBan'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ModerateCommunityBanResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/moderate/unban': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Unban a user from a community. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['ModerateCommunityUnBan'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ModerateCommunityUnBanResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/community/moderate/post/nsfw': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Mark or unmark a post as NSFW. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['ModerateCommunityPostNsfw'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ModerateCommunityPostNsfwResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/list': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get / fetch posts, with various filters. */ + get: { + parameters: { + query?: { + GetPosts?: components['schemas']['GetPosts'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetPostsResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get / fetch a post. */ + get: { + parameters: { + query?: { + GetPost?: components['schemas']['GetPost'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetPostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + /** Edit a post. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['EditPost'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + /** Create a post. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['CreatePost'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + /** @description You are being rate limited */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/like': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Like / vote on a post. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['CreatePostLike'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/save': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Save a post. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['SavePost'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/subscribe': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Subscribe to a post. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['SubscribePost'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/delete': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Delete a post. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['DeletePost'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/report': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Report a post. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['CreatePostReport'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostReportResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/lock': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** A moderator can lock a post ( IE disable new comments ). */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['LockPost'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/feature': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** A moderator can feature a community post ( IE stick it to the top of a community ). */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['FeaturePost'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/mark_as_read': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Mark a post as read. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['MarkPostAsRead'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['SuccessResponse-2'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/post/remove': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** A moderator remove for a post. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['RemovePost'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PostResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/comment': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get / fetch a comment. */ + get: { + parameters: { + query?: { + GetComments?: components['schemas']['GetComment'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + /** Edit a comment. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['EditComment'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + /** Create a comment. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['CreateComment'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + /** @description You are being rate limited */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/comment/list': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get / fetch comments. */ + get: { + parameters: { + query?: { + GetComments?: components['schemas']['GetComments'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetCommentsResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/comment/delete': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Delete a comment. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['DeleteComment'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/comment/mark_as_read': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Mark a comment reply as read. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['MarkReplyAsRead'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentReplyResponse-2'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/comment/remove': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** A moderator remove for a comment. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['RemoveComment'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/comment/like': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Like / vote on a comment. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['CreateCommentLike'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/comment/save': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Save a comment. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['SaveComment'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/comment/subscribe': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Subscribe to a comment. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['SubscribeComment'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/comment/report': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Report a comment. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['CreateCommentReport'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['CommentReportResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/private_message/list': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get / fetch private messages. */ + get: { + parameters: { + query?: { + GetPrivateMessages?: components['schemas']['GetPrivateMessages'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PrivateMessagesResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/private_message/conversation': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get / fetch private messages. */ + get: { + parameters: { + query?: { + GetPrivateMessagesConversation?: components['schemas']['GetPrivateMessagesConversation'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PrivateMessagesResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/private_message': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Edit a private message. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['EditPrivateMessage'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PrivateMessageResponse'] + } + } + } + } + /** Create a private message. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['CreatePrivateMessage'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PrivateMessageResponse'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/private_message/mark_as_read': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Mark a private message as read. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['MarkPrivateMessageAsRead'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PrivateMessageResponse'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/private_message/delete': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Delete a private message. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['DeletePrivateMessage'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PrivateMessageResponse'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get the details for a person. */ + get: { + parameters: { + query?: { + GetPersonDetails?: components['schemas']['GetPersonDetails'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetPersonDetailsResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/replies': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get comment replies. */ + get: { + parameters: { + query?: { + GetReplies?: components['schemas']['GetReplies'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetRepliesResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/mentions': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get mentions of your account made in comments. */ + get: { + parameters: { + query?: { + GetReplies?: components['schemas']['GetReplies'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetRepliesResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/block': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Block a person. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['BlockPerson'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BlockPersonResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/login': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Log into PieFed. */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['Login'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['LoginResponse'] + } + } + /** @description BAD REQUEST */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['ErrorResponseLogin'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/mark_all_as_read': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Mark all replies as read. */ + post: operations['markAllAsRead'] + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/unread_count': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get your unread counts */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetUnreadCountResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/subscribe': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Subscribe to activities from another user */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['SubscribePerson'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PersonResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/set_flair': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Set your flair for a community */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['SetPersonFlair'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PersonResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/save_user_settings': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Save your user settings. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['SaveUserSettings'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content?: never + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/notifications': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get your user notifications */ + get: { + parameters: { + query?: { + Status?: components['schemas']['GetNotificationStatus'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['NotificationsResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/notification_state': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Set the read status of a given notification. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['EditNotificationState'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['NotificationsReadStatusResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/notifications_count': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get user unread notifications count. */ + get: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['NotificationsCountResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/mark_all_notifications_read': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + /** Set all unread user notifications to read. */ + put: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['NotificationsMarkAllReadResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/user/verify_credentials': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** Verify username / password credentials */ + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'application/json': components['schemas']['Login'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description BAD REQUEST */ + 400: { + headers: { + [name: string]: unknown + } + content?: never + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/feed/list': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get list of feeds */ + get: { + parameters: { + query?: { + FeedList?: components['schemas']['FeedList'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['FeedListResponse'] + } + } + /** @description Bad Request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/topic/list': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get list of topics */ + get: { + parameters: { + query?: { + TopicList?: components['schemas']['TopicList'] + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['TopicListResponse'] + } + } + /** @description Bad Request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/upload/image': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'multipart/form-data': components['schemas']['ImageUpload'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['UploadResponse'] + } + } + /** @description The uploaded image was missing or invalid */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + /** @description You are being rate limited */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/upload/community_image': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'multipart/form-data': components['schemas']['ImageUpload'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['UploadResponse'] + } + } + /** @description The uploaded image was missing or invalid */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + /** @description You are being rate limited */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/upload/user_image': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + post: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: { + content: { + 'multipart/form-data': components['schemas']['ImageUpload'] + } + } + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['UploadResponse'] + } + } + /** @description The uploaded image was missing or invalid */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + /** @description You are being rate limited */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } +} +export type webhooks = Record +export interface components { + schemas: { + /** BlockInstance */ + BlockInstance: { + /** BlockInstance.instance_id */ + instance_id: number + /** BlockInstance.block */ + block: boolean + } + /** InstanceChooserSearch */ + InstanceChooserSearch: { + /** InstanceChooserSearch.q */ + q?: string + /** + * InstanceChooserSearch.nsfw + * @example no + */ + nsfw?: string + /** + * InstanceChooserSearch.language + * @example en + */ + language?: string + /** + * InstanceChooserSearch.newbie + * @example yes + */ + newbie?: string + } + /** Search */ + Search: { + /** Search.q */ + q: string + /** Search.type_ */ + type_?: components['schemas']['SearchType'] + /** Search.sort */ + sort?: components['schemas']['SortType'] + /** Search.listing_type */ + listing_type?: components['schemas']['ListingType'] + /** Search.page */ + page?: number + /** Search.limit */ + limit?: number + } + /** ResolveObject */ + ResolveObject: { + /** ResolveObject.q */ + q: string + } + /** GetCommunity */ + GetCommunity: { + /** GetCommunity.id */ + id?: number + /** GetCommunity.name */ + name?: string + } + /** CreateCommunity */ + CreateCommunity: { + /** CreateCommunity.name */ + name: string + /** CreateCommunity.title */ + title: string + /** CreateCommunity.description */ + description?: string + /** CreateCommunity.rules */ + rules?: string + /** + * CreateCommunity.icon + * Format: url + */ + icon_url?: string + /** + * CreateCommunity.banner + * Format: url + */ + banner_url?: string + /** CreateCommunity.nsfw */ + nsfw?: boolean + /** CreateCommunity.restricted_to_mods */ + restricted_to_mods?: boolean + /** CreateCommunity.local_only */ + local_only?: boolean + /** CreateCommunity.discussion_languages */ + discussion_languages?: number[] + } + /** CreateCommunity */ + EditCommunity: { + /** CreateCommunity.id */ + id: number + /** CreateCommunity.title */ + title?: string + /** CreateCommunity.description */ + description?: string + /** CreateCommunity.rules */ + rules?: string + /** + * CreateCommunity.icon + * Format: url + */ + icon_url?: string + /** + * CreateCommunity.banner + * Format: url + */ + banner_url?: string + /** CreateCommunity.nsfw */ + nsfw?: boolean + /** CreateCommunity.restricted_to_mods */ + restricted_to_mods?: boolean + /** CreateCommunity.local_only */ + local_only?: boolean + /** CreateCommunity.discussion_languages */ + discussion_languages?: number[] + } + /** DeleteCommunity */ + DeleteCommunity: { + /** DeleteCommunity.community_id */ + community_id: number + /** DeleteCommunity.deleted */ + deleted: boolean + } + /** AddModToCommunity */ + AddModToCommunity: { + /** AddModToCommunity.community_id */ + community_id: number + /** AddModToCommunity.person_id */ + person_id: number + /** AddModToCommunity.added */ + added: boolean + } + /** ListCommunities */ + ListCommunities: { + /** ListCommunities.type_ */ + type_?: components['schemas']['ListingType'] + /** ListCommunities.sort */ + sort?: components['schemas']['CommunitySortType'] + /** ListCommunities.show_nsfw */ + show_nsfw?: boolean + /** ListCommunities.page */ + page?: number + /** ListCommunities.limit */ + limit?: number + } + /** FollowCommunity */ + FollowCommunity: { + /** FollowCommunity.community_id */ + community_id: number + /** FollowCommunity.follow */ + follow: boolean + } + /** BlockCommunity */ + BlockCommunity: { + /** BlockCommunity.community_id */ + community_id: number + /** BlockCommunity.block */ + block: boolean + } + /** SubscribeCommunity */ + SubscribeCommunity: { + /** SubscribeCommunity.community_id */ + community_id: number + /** SubscribeCommunity.subscribe */ + subscribe: boolean + } + /** GetCommunityModerationBansList */ + GetCommunityModerationBansList: { + /** + * GetCommunityModerationBansList.community_id + * @example 42 + */ + community_id?: number + /** + * GetCommunityModerationBansList.page + * @example 1 + */ + page?: number + } + /** ModerateCommunityBan */ + ModerateCommunityBan: { + /** + * PostCommunityModerateBan.community_id + * @example 42 + */ + community_id: number + /** + * PostCommunityModerateBan.user_id + * @example 1234 + */ + user_id: number + /** + * PostCommunityModerateBan.reason + * @example Violation of Rule 1. + */ + reason: string + /** + * PostCommunityModerateBan.expiredAt + * @example 2025-01-01T12:00:00 + */ + expiredAt: string + } + /** ModerateCommunityUnBan */ + ModerateCommunityUnBan: { + /** + * PutCommunityModerateUnBan.community_id + * @example 42 + */ + community_id: number + /** + * PutCommunityModerateUnBan.user_id + * @example 1234 + */ + user_id: number + } + /** ModerateCommunityPostNsfw */ + ModerateCommunityPostNsfw: { + /** + * PostCommunityModeratePostNsfw.post_id + * @example 123456 + */ + post_id: number + /** + * PostCommunityModeratePostNsfw.nsfw_status + * @example true + */ + nsfw_status: boolean + } + /** GetPosts */ + GetPosts: { + /** GetPosts.type_ */ + type_?: components['schemas']['ListingType'] + /** GetPosts.sort */ + sort?: components['schemas']['SortType'] + /** GetPosts.page_cursor */ + page_cursor?: number + /** GetPosts.limit */ + limit?: number + /** GetPosts.community_id */ + community_id?: number + /** GetPosts.person_id */ + person_id?: number + /** GetPosts.community_name */ + community_name?: string + /** GetPosts.liked_only */ + liked_only?: boolean + /** GetPosts.saved_only */ + saved_only?: boolean + } + /** GetPost */ + GetPost: { + /** GetPost.id */ + id?: number + /** GetPost.comment_id */ + comment_id?: number + } + /** EditPost */ + EditPost: { + /** EditPost.post_id */ + post_id: number + /** EditPost.title */ + title?: string + /** + * EditPost.url + * Format: url + */ + url?: string + /** EditPost.body */ + body?: string + /** EditPost.nsfw */ + nsfw?: boolean + /** EditPost.language_id */ + language_id?: number + } + /** CreatePost */ + CreatePost: { + /** CreatePost.title */ + title: string + /** CreatePost.community_id */ + community_id: number + /** + * CreatePost.url + * Format: url + */ + url?: string + /** CreatePost.body */ + body?: string + /** CreatePost.nsfw */ + nsfw?: boolean + /** CreatePost.language_id */ + language_id?: number + } + /** CreatePostLike */ + CreatePostLike: { + /** CreatePostLike.post_id */ + post_id: number + /** CreatePostLike.score */ + score: number + } + /** SavePost */ + SavePost: { + /** SavePost.post_id */ + post_id: number + /** SavePost.save */ + save: boolean + } + /** SubscribePost */ + SubscribePost: { + /** SubscribePost.post_id */ + post_id: number + /** SubscribePost.subscribe */ + subscribe: boolean + } + /** DeletePost */ + DeletePost: { + /** DeletePost.post_id */ + post_id: number + /** DeletePost.deleted */ + deleted: boolean + } + /** CreatePostReport */ + CreatePostReport: { + /** CreatePostReport.post_id */ + post_id: number + /** CreatePostReport.reason */ + reason: string + } + /** LockPost */ + LockPost: { + /** LockPost.post_id */ + post_id: number + /** LockPost.locked */ + locked: boolean + } + /** FeaturePost */ + FeaturePost: { + /** FeaturePost.post_id */ + post_id: number + /** FeaturePost.featured */ + featured: boolean + /** FeaturePost.feature_type */ + feature_type: components['schemas']['PostFeatureType'] + } + /** MarkPostAsRead */ + MarkPostAsRead: { + /** MarkPostAsRead.post_ids */ + post_ids?: number[] + /** MarkPostAsRead.post.id */ + post_id?: number + /** MarkPostAsRead.read */ + read: boolean + } + /** RemovePost */ + RemovePost: { + /** RemovePost.post_id */ + post_id: number + /** RemovePost.removed */ + removed: boolean + /** RemovePost.reason */ + reason?: string + } + /** CreateComment */ + CreateComment: { + /** CreateComment.content */ + body: string + /** CreateComment.post_id */ + post_id: number + /** CreateComment.parent_id */ + parent_id?: number + /** CreateComment.language_id */ + language_id?: number + } + /** EditComment */ + EditComment: { + /** EditComment.comment_id */ + comment_id: number + /** EditComment.content */ + body?: string + /** EditComment.language_id */ + language_id?: number + } + /** GetComment */ + GetComment: { + /** GetComment.id */ + id: number + } + /** GetComments */ + GetComments: { + /** GetComments.type_ */ + type_?: components['schemas']['ListingType'] + /** GetComments.sort */ + sort?: components['schemas']['CommentSortType'] + /** GetComments.max_depth */ + max_depth?: number + /** GetComments.page */ + page?: number + /** GetComments.limit */ + limit?: number + /** GetComments.community_id */ + community_id?: number + /** GetComments.post_id */ + post_id?: number + /** GetComments.parent_id */ + parent_id?: number + /** GetComments.person_id */ + person_id?: number + /** GetComments.liked_only */ + liked_only?: boolean + /** GetComments.saved_only */ + saved_only?: boolean + } + /** DeleteComment */ + DeleteComment: { + /** DeleteComment.comment_id */ + comment_id: number + /** DeleteComment.deleted */ + deleted: boolean + } + /** MarkReplyAsRead */ + MarkReplyAsRead: { + /** MarkReplyAsRead.comment_reply_id */ + comment_reply_id: number + read: boolean + } + /** RemoveComment */ + RemoveComment: { + /** RemoveComment.comment_id */ + comment_id: number + /** RemoveComment.removed */ + removed: boolean + /** RemoveComment.reason */ + reason?: string + } + /** CreateCommentLike */ + CreateCommentLike: { + /** CreateCommentLike.comment_id */ + comment_id: number + /** CreateCommentLike.score */ + score: number + } + /** SaveComment */ + SaveComment: { + /** SaveComment.comment_id */ + comment_id: number + /** SaveComment.save */ + save: boolean + } + /** SubscribeComment */ + SubscribeComment: { + /** SubscribeComment.comment_id */ + comment_id: number + /** SubscribeComment.subscribe */ + subscribe: boolean + } + /** CreateCommentReport */ + CreateCommentReport: { + /** CreateCommentReport.comment_id */ + comment_id: number + /** CreateCommentReport.reason */ + reason: string + } + /** GetPrivateMessages */ + GetPrivateMessages: { + /** GetPrivateMessages.unread_only */ + unread_only?: boolean + /** GetPrivateMessages.page */ + page?: number + /** GetPrivateMessages.limit */ + limit?: number + } + /** GetPrivateMessagesConversation */ + GetPrivateMessagesConversation: { + /** GetPrivateMessagesConversation.page */ + page?: number + /** GetPrivateMessagesConversation.limit */ + limit?: number + /** GetPrivateMessagesConversation.person_id */ + person_id: number + } + /** CreatePrivateMessage */ + CreatePrivateMessage: { + /** CreatePrivateMessage.content */ + content: string + /** CreatePrivateMessage.recipient_id */ + recipient_id: number + } + /** EditPrivateMessage */ + EditPrivateMessage: { + /** EditPrivateMessage.private_message_id */ + private_message_id: number + /** EditPrivateMessage.content */ + content: string + } + /** MarkPrivateMessageAsRead */ + MarkPrivateMessageAsRead: { + /** MarkPrivateMessageAsRead.private_message_id */ + private_message_id: number + /** MarkPrivateMessageAsRead.read */ + read: boolean + } + /** DeletePrivateMessage */ + DeletePrivateMessage: { + /** DeletePrivateMessage.private_message_id */ + private_message_id: number + /** DeletePrivateMessage.deleted */ + deleted: boolean + } + /** GetPersonDetails */ + GetPersonDetails: { + /** GetPersonDetails.person_id */ + person_id?: number + /** GetPersonDetails.username */ + username?: string + /** GetPersonDetails.sort */ + sort?: components['schemas']['SortType'] + /** GetPersonDetails.page */ + page?: number + /** GetPersonDetails.limit */ + limit?: number + /** GetPersonDetails.community_id */ + community_id?: number + /** GetPersonDetails.saved_only */ + saved_only?: boolean + /** GetPersonDetails.include_content */ + include_content?: boolean + } + /** GetReplies */ + GetReplies: { + /** GetReplies.sort */ + sort?: components['schemas']['CommentSortType'] + /** GetReplies.page */ + page?: number + /** GetReplies.limit */ + limit?: number + /** GetReplies.unread_only */ + unread_only?: boolean + } + /** BlockPerson */ + BlockPerson: { + /** BlockPerson.person_id */ + person_id: number + /** BlockPerson.block */ + block: boolean + } + /** Login */ + Login: { + /** Login.username */ + username: string + /** Login.password */ + password: string + } + /** GetUnreadCountResponse */ + GetUnreadCountResponse: { + /** GetUnreadCountResponse.replies */ + replies: number + /** GetUnreadCountResponse.mentions */ + mentions: number + /** GetUnreadCountResponse.private_messages */ + private_messages: number + } + /** SubscribePerson */ + SubscribePerson: { + /** SubscribePerson.person_id */ + person_id: number + /** SubscribePerson.subscribe */ + subscribe: boolean + } + /** SetPersonFlair */ + SetPersonFlair: { + /** SetPersonFlair.community_id */ + community_id: number + /** SetPersonFlair.flair_text */ + flair_text: string + } + /** SaveUserSettings */ + SaveUserSettings: { + /** SaveUserSettings.show_nsfw */ + show_nsfw?: boolean + /** SaveUserSettings.show_read_posts */ + show_read_posts?: boolean + /** SaveUserSettings.bio */ + bio?: string + } + /** GetNotificationStatus */ + GetNotificationStatus: { + /** GetNotificationStatus.status */ + status: components['schemas']['NotificationStatusType'] + /** + * GetNotificationStatus.page + * @default 1 + */ + page: number + } + /** EditNotificationState */ + EditNotificationState: { + /** GetNotificationStatus.notif_id */ + notif_id?: number + /** GetNotificationStatus.read_state */ + read_state?: boolean + } + /** FeedList */ + FeedList: { + /** + * FeedList.include_communities + * @description include list of communities in each feed with result + */ + include_communities?: boolean + /** + * FeedList.mine_only + * @description only return feeds created by the authorized user + */ + mine_only?: boolean + } + /** TopicList */ + TopicList: { + /** + * TopicList.include_communities + * @description include list of communities in each topic with result + */ + include_communities?: boolean + } + ImageUpload: { + /** Format: binary */ + file: string + } + /** SuccessResponse */ + SuccessResponse: { + success: boolean + } + BadRequest: { + /** @example An error occurred */ + error: string + } + /** GetSiteResponse */ + GetSiteResponse: { + /** GetSiteResponse.my_user */ + my_user?: components['schemas']['MyUserInfo'] + /** GetSiteResponse.site */ + site: components['schemas']['Site'] + /** GetSiteResponse.version */ + version: string + /** GetSiteResponse.admins */ + admins: components['schemas']['PersonView'][] + } + /** GetSiteVersionResponse */ + GetSiteVersionResponse: { + /** GetSiteVersionResponse.version */ + version: string + } + /** BlockInstanceResponse */ + BlockInstanceResponse: { + /** BlockInstanceResponse.blocked */ + blocked: boolean + } + GetSiteInstanceChooserResponse: { + language: components['schemas']['LanguageView'] + /** GetSiteInstanceChooserResponse.nsfw */ + nsfw: boolean + /** GetSiteInstanceChooserResponse.newbie_friendly */ + newbie_friendly: boolean + /** GetSiteInstanceChooserResponse.name */ + name: string + /** GetSiteInstanceChooserResponse.elevator_pitch */ + elevator_pitch: string + /** GetSiteInstanceChooserResponse.description */ + description: string + /** GetSiteInstanceChooserResponse.about */ + about: string + /** GetSiteInstanceChooserResponse.sidebar */ + sidebar: string + /** GetSiteInstanceChooserResponse.logo_url */ + logo_url: string + /** GetSiteInstanceChooserResponse.majority */ + maturity: string + /** GetSiteInstanceChooserResponse.tos_url */ + tos_url: string + /** GetSiteInstanceChooserResponse.mau */ + mau: number + /** GetSiteInstanceChooserResponse.can_make_communities */ + can_make_communities: boolean + /** GetSiteInstanceChooserResponse.defederation */ + defederation: string[] + /** GetSiteInstanceChooserResponse.trusts */ + trusts: string[] + /** GetSiteInstanceChooserResponse.registration_mode */ + registration_mode: string + } + GetSiteInstanceChooserSearchResponse: { + result: components['schemas']['GetSiteInstanceChooserSearchResponseItem'][] + } + /** SearchResponse */ + SearchResponse: { + /** SearchResponse.type_ */ + type_: components['schemas']['SearchType'] + /** SearchResponse.posts */ + posts: components['schemas']['PostView'][] + /** SearchResponse.communities */ + communities: components['schemas']['CommunityView'][] + /** SearchResponse.users */ + users: components['schemas']['PersonView'][] + } + /** ResolveObjectResponse */ + ResolveObjectResponse: { + /** ResolveObjectResponse.comment */ + comment?: components['schemas']['CommentView'] + /** ResolveObjectResponse.post */ + post?: components['schemas']['PostView'] + /** ResolveObjectResponse.community */ + community?: components['schemas']['CommunityView'] + /** ResolveObjectResponse.person */ + person?: components['schemas']['PersonView'] + } + /** GetFederatedInstancesResponse */ + GetFederatedInstancesResponse: { + /** GetFederatedInstancesResponse.federated_instances */ + federated_instances?: components['schemas']['FederatedInstancesView'] + } + /** GetCommunityResponse */ + GetCommunityResponse: { + /** GetCommunityResponse.community_view */ + community_view: components['schemas']['CommunityView'] + /** GetCommunityResponse.site */ + site?: components['schemas']['Site'] + /** GetCommunityResponse.moderators */ + moderators: components['schemas']['CommunityModeratorView'][] + /** GetCommunityResponse.discussion_languages */ + discussion_languages: number[] + } + /** CommunityResponse */ + CommunityResponse: { + /** CommunityResponse.community_view */ + community_view: components['schemas']['CommunityView'] + /** CommunityResponse.discussion_languages */ + discussion_languages: number[] + } + /** ListCommunitiesResponse */ + ListCommunitiesResponse: { + /** ListCommunitiesResponse.communities */ + communities: components['schemas']['CommunityView'][] + } + /** BlockCommunityResponse */ + BlockCommunityResponse: { + /** BlockCommunityResponse.community_view */ + community_view: components['schemas']['CommunityView'] + /** BlockCommunityResponse.blocked */ + blocked: boolean + } + /** AddModToCommunityResponse */ + AddModToCommunityResponse: { + /** AddModToCommunityResponse.moderators */ + moderators: components['schemas']['CommunityModeratorView'][] + } + /** ModerationCommunityBansListResponse */ + ModerationCommunityBansListResponse: { + /** GetCommunityModerationBansListResponse.items */ + items?: components['schemas']['CommunityModerationBanItem'][] + /** + * GetCommunityModerationBansListResponse.next_page + * @example 3 + */ + next_page?: string + } + /** ModerateCommunityBanResponse */ + ModerateCommunityBanResponse: components['schemas']['CommunityModerationBanItem'] + /** ModerateCommunityUnBanResponse */ + ModerateCommunityUnBanResponse: components['schemas']['CommunityModerationBanItem'] + /** ModerateCommunityPostNsfwResponse */ + ModerateCommunityPostNsfwResponse: components['schemas']['PostView'] + /** GetPostsResponse */ + GetPostsResponse: { + /** GetPostsResponse.posts */ + posts: components['schemas']['PostView'][] + } + /** GetPostResponse */ + GetPostResponse: { + /** GetPostResponse.post_view */ + post_view: components['schemas']['PostView'] + /** GetPostResponse.community_view */ + community_view: components['schemas']['CommunityView'] + /** GetPostResponse.moderators */ + moderators: components['schemas']['CommunityModeratorView'][] + /** GetPostResponse.cross_posts */ + cross_posts: components['schemas']['PostView'][] + } + /** PostResponse */ + PostResponse: { + /** PostResponse.post_view */ + post_view: components['schemas']['PostView'] + } + /** PostReportResponse */ + PostReportResponse: { + /** PostReportResponse.post_report_view */ + post_report_view: components['schemas']['PostReportView'] + } + /** CommentResponse */ + CommentResponse: { + /** CommentResponse.comment_view */ + comment_view: components['schemas']['CommentView'] + } + /** GetCommentsResponse */ + GetCommentsResponse: { + /** GetCommentsResponse.comments */ + comments: components['schemas']['CommentView'][] + } + /** CommentReportResponse */ + CommentReportResponse: { + /** CommentReportResponse.comment_report_view */ + comment_report_view: components['schemas']['CommentReportView'] + } + /** PrivateMessagesResponse */ + PrivateMessagesResponse: { + /** PrivateMessagesResponse.private_messages */ + private_messages: components['schemas']['PrivateMessageView'][] + } + /** PrivateMessageResponse */ + PrivateMessageResponse: { + /** PrivateMessageResponse.private_message_view */ + private_message_view: components['schemas']['PrivateMessageView'] + } + /** GetPersonDetailsResponse */ + GetPersonDetailsResponse: { + /** GetPersonDetailsResponse.person_view */ + person_view: components['schemas']['PersonView'] + /** GetPersonDetailsResponse.site */ + site?: components['schemas']['Site'] + /** GetPersonDetailsResponse.comments */ + comments: components['schemas']['CommentView'][] + /** GetPersonDetailsResponse.posts */ + posts: components['schemas']['PostView'][] + /** GetPersonDetailsResponse.moderates */ + moderates: components['schemas']['CommunityModeratorView'][] + } + /** GetRepliesResponse */ + GetRepliesResponse: { + /** GetRepliesResponse.replies */ + replies: components['schemas']['CommentReplyView'][] + } + /** PersonResponse */ + PersonResponse: { + /** PersonResponse.person_view */ + person_view: components['schemas']['PersonView'] + } + /** BlockPersonResponse */ + BlockPersonResponse: { + /** BlockPersonResponse.person_view */ + person_view: components['schemas']['PersonView'] + /** BlockPersonResponse.blocked */ + blocked: boolean + } + /** LoginResponse */ + LoginResponse: { + /** LoginResponse.jwt */ + jwt?: string + } + ErrorResponseLogin: { + /** @example incorrect_login */ + error?: string + } + /** NotificationsResponse */ + NotificationsResponse: { + /** NotificationsResponse.counts */ + counts: components['schemas']['NotificationsCountsView'] + /** NotificationsResponse.items */ + items: ( + | components['schemas']['NotificationsItemUserView'] + | components['schemas']['NotificationsItemCommunityView'] + | components['schemas']['NotificationsItemTopicView'] + | components['schemas']['NotificationsItemPostView'] + | components['schemas']['NotificationsItemReplyView'] + | components['schemas']['NotificationsItemFeedView'] + | components['schemas']['NotificationsItemPostMentionView'] + | components['schemas']['NotificationsItemCommentMentionView'] + )[] + /** + * NotificationsResponse.status + * @example New + */ + status: string + /** + * NotificationsResponse.user + * @example MyPieFedUserName + */ + user: string + } + /** NotificationsReadStatusResponse */ + NotificationsReadStatusResponse: + | components['schemas']['NotificationsItemUserView'] + | components['schemas']['NotificationsItemCommunityView'] + | components['schemas']['NotificationsItemTopicView'] + | components['schemas']['NotificationsItemPostView'] + | components['schemas']['NotificationsItemReplyView'] + | components['schemas']['NotificationsItemFeedView'] + | components['schemas']['NotificationsItemPostMentionView'] + | components['schemas']['NotificationsItemCommentMentionView'] + /** NotificationsCountResponse */ + NotificationsCountResponse: { + /** + * NotificationsCountResponse.count + * @example 42 + */ + count?: number + } + /** NotificationsMarkAllReadResponse */ + NotificationsMarkAllReadResponse: { + /** + * NotificationsMarkAllReadResponse.mark_all_notifications_as_read + * @example complete + */ + mark_all_notifications_as_read?: string + } + FeedListResponse: { + feeds: components['schemas']['FeedView'][] + } + TopicListResponse: { + /** TopicListResponse.topics */ + topics: components['schemas']['TopicView'][] + } + UploadResponse: { + /** + * Format: url + * @example https://preferred.social/static/media/image.png + */ + url: string + } + /** Site */ + Site: { + /** + * Site.actor_id + * Format: url + * @example https://piefed.social/ + */ + actor_id: string + /** Site.all_languages */ + all_languages?: components['schemas']['LanguageView'][] + /** Site.description */ + description?: string + /** Site.enable_downvotes */ + enable_downvotes?: boolean + /** + * Site.icon + * Format: url + */ + icon?: string + /** Site.name */ + name: string + /** Site.registration_mode */ + registration_mode?: components['schemas']['RegistrationMode'] + /** Site.sidebar */ + sidebar?: string + /** Site.user_count */ + user_count?: number + } + /** Instance */ + Instance: { + /** Instance.id */ + id: number + /** Instance.domain */ + domain: string + /** + * Instance.published + * Format: date-time + */ + published: string + /** + * Instance.updated + * Format: date-time + */ + updated?: string + /** Instance.software */ + software?: string + /** Instance.version */ + version?: string + } + /** InstanceWithoutFederationState */ + InstanceWithoutFederationState: { + /** InstanceWithoutFederationState.id */ + id: number + /** InstanceWithoutFederationState.domain */ + domain: string + /** InstanceWithoutFederationState.published */ + published: string + /** InstanceWithoutFederationState.updated */ + updated?: string + /** InstanceWithoutFederationState.software */ + software?: string + /** InstanceWithoutFederationState.version */ + version?: string + } + /** Community */ + Community: { + /** + * Community.actor_id + * Format: url + */ + actor_id: string + /** Community.ap_domain */ + ap_domain?: string + /** Community.banned */ + banned?: boolean + /** + * Community.banner + * Format: url + */ + banner?: string + /** Community.deleted */ + deleted: boolean + /** Community.description */ + description?: string + /** Community.hidden */ + hidden: boolean + /** + * Community.icon + * Format: url + */ + icon?: string + /** Community.id */ + id: number + /** Community.instance_id */ + instance_id: number + /** Community.local */ + local: boolean + /** Community.name */ + name: string + /** Community.nsfw */ + nsfw: boolean + /** Community.posting_warning */ + posting_warning?: string + /** + * Community.published + * Format: date-time + */ + published: string + /** Community.removed */ + removed: boolean + /** Community.restricted_to_mods */ + restricted_to_mods: boolean + /** Community.title */ + title: string + /** + * Community.updated + * Format: date-time + */ + updated?: string + } + /** Post */ + Post: { + /** Post.id */ + id: number + /** Post.title */ + title: string + /** + * Post.url + * Format: url + */ + url?: string + /** Post.body */ + body?: string + /** Post.user_id */ + user_id: number + /** Post.community_id */ + community_id: number + /** Post.removed */ + removed: boolean + /** Post.locked */ + locked: boolean + /** + * Post.published + * Format: date-time + */ + published: string + /** + * Post.updated + * Format: date-time + */ + updated?: string + /** Post.deleted */ + deleted: boolean + /** Post.nsfw */ + nsfw: boolean + /** + * Post.thumbnail_url + * Format: url + */ + thumbnail_url?: string + /** + * Post.small_thumbnail_url + * Format: url + */ + small_thumbnail_url?: string + /** + * Post.ap_id + * Format: url + */ + ap_id: string + /** Post.local */ + local: boolean + /** Post.language_id */ + language_id: number + /** Post.sticky */ + sticky: boolean + /** Post.alt_text */ + alt_text?: string + } + /** PostReport */ + PostReport: { + /** PostReport.id */ + id: number + /** PostReport.creator_id */ + creator_id: number + /** PostReport.post_id */ + post_id: number + /** PostReport.original_post_name */ + original_post_name: string + /** PostReport.original_post_url */ + original_post_url?: string + /** PostReport.original_post_body */ + original_post_body?: string + /** PostReport.reason */ + reason: string + /** PostReport.resolved */ + resolved: boolean + /** PostReport.resolver_id */ + resolver_id?: number + /** + * PostReport.published + * Format: date-time + */ + published: string + /** + * PostReport.updated + * Format: date-time + */ + updated?: string + } + /** Comment */ + Comment: { + /** Comment.id */ + id: number + /** Comment.user_id */ + user_id: number + /** Comment.post_id */ + post_id: number + /** Comment.body */ + body: string + /** Comment.removed */ + removed: boolean + /** + * Comment.published + * Format: date-time + */ + published: string + /** + * Comment.updated + * Format: date-time + */ + updated?: string + /** Comment.deleted */ + deleted: boolean + /** + * Comment.ap_id + * Format: url + */ + ap_id: string + /** Comment.local */ + local: boolean + /** Comment.path */ + path: string + /** Comment.distinguished */ + distinguished?: boolean + /** Comment.language_id */ + language_id: number + } + /** CommentReply */ + CommentReply: { + /** CommentReply.id */ + id: number + /** CommentReply.recipient_id */ + recipient_id: number + /** CommentReply.comment_id */ + comment_id: number + /** CommentReply.read */ + read: boolean + /** + * CommentReply.published + * Format: date-time + */ + published: string + } + /** CommentReport */ + CommentReport: { + /** CommentReport.id */ + id: number + /** CommentReport.creator_id */ + creator_id: number + /** CommentReport.comment_id */ + comment_id: number + /** CommentReport.original_comment_text */ + original_comment_text: string + /** CommentReport.reason */ + reason: string + /** CommentReport.resolved */ + resolved: boolean + /** CommentReport.resolver_id */ + resolver_id?: number + /** + * CommentReport.published + * Format: date-time + */ + published: string + /** + * CommentReport.updated + * Format: date-time + */ + updated?: string + } + /** PrivateMessage */ + PrivateMessage: { + /** PrivateMessage.id */ + id: number + /** PrivateMessage.creator_id */ + creator_id: number + /** PrivateMessage.recipient_id */ + recipient_id: number + /** PrivateMessage.content */ + content: string + /** PrivateMessage.deleted */ + deleted: boolean + /** PrivateMessage.read */ + read: boolean + /** + * PrivateMessage.published + * Format: date-time + */ + published: string + /** + * PrivateMessage.updated + * Format: date-time + */ + updated?: string + /** + * PrivateMessage.ap_id + * Format: url + */ + ap_id: string + /** PrivateMessage.local */ + local: boolean + } + /** Person */ + Person: { + /** + * Person.actor_id + * Format: url + */ + actor_id: string + /** + * Person.avatar + * Format: url + */ + avatar?: string + /** Person.banned */ + banned: boolean + /** + * Person.banner + * Format: url + */ + banner?: string + /** Person.about */ + about?: string + /** Person.bot */ + bot: boolean + /** Person.deleted */ + deleted: boolean + /** Person.flair */ + flair?: string + /** Person.id */ + id: number + /** Person.instance_id */ + instance_id: number + /** Person.local */ + local: boolean + /** + * Person.published + * Format: date-time + */ + published: string + /** Person.title */ + title?: string + /** Person.user_name */ + user_name: string + } + /** LocalUser */ + LocalUser: { + /** LocalUser.default_listing_type */ + default_listing_type: components['schemas']['ListingType'] + /** LocalUser.default_sort_type */ + default_sort_type: components['schemas']['SortType'] + /** LocalUser.show_bot_accounts */ + show_bot_accounts: boolean + /** LocalUser.show_nsfw */ + show_nsfw: boolean + /** LocalUser.show_read_posts */ + show_read_posts: boolean + /** LocalUser.show_scores */ + show_scores: boolean + } + /** MyUserInfo */ + MyUserInfo: { + /** MyUserInfo.community_blocks */ + community_blocks: components['schemas']['CommunityBlockView'][] + /** MyUserInfo.discussion_languages */ + discussion_languages: components['schemas']['LanguageView'][] + /** MyUserInfo.follows */ + follows: components['schemas']['CommunityFollowerView'][] + /** MyUserInfo.instance_blocks */ + instance_blocks: components['schemas']['InstanceBlockView'][] + /** MyUserInfo.local_user_view */ + local_user_view: components['schemas']['LocalUserView'] + /** MyUserInfo.moderates */ + moderates: components['schemas']['CommunityModeratorView'][] + /** MyUserInfo.person_blocks */ + person_blocks: components['schemas']['PersonBlockView'][] + } + GetSiteInstanceChooserSearchResponseItem: { + /** GetSiteInstanceChooserSearchResponseItem.id */ + id: number + /** GetSiteInstanceChooserSearchResponseItem.name */ + name: string + /** GetSiteInstanceChooserSearchResponseItem.domain */ + domain: string + /** GetSiteInstanceChooserSearchResponseItem.elevator_pitch */ + elevator_pitch: string + /** GetSiteInstanceChooserSearchResponseItem.description */ + description: string + /** GetSiteInstanceChooserSearchResponseItem.about */ + about: string + /** GetSiteInstanceChooserSearchResponseItem.sidebar */ + sidebar: string + /** GetSiteInstanceChooserSearchResponseItem.logo_url */ + logo_url: string + /** GetSiteInstanceChooserSearchResponseItem.maturity */ + maturity: string + /** GetSiteInstanceChooserSearchResponseItem.tos_url */ + tos_url: string + /** GetSiteInstanceChooserSearchResponseItem.uptime */ + uptime: string + /** GetSiteInstanceChooserSearchResponseItem.mau */ + mau: number + /** GetSiteInstanceChooserSearchResponseItem.can_make_communities */ + can_make_communities: boolean + /** GetSiteInstanceChooserSearchResponseItem.newbie_friendly */ + newbie_friendly: boolean + /** GetSiteInstanceChooserSearchResponseItem.defederation */ + defederation: string[] + /** GetSiteInstanceChooserSearchResponseItem.trusts */ + trusts: string[] + /** GetSiteInstanceChooserSearchResponseItem.registration_mode */ + registration_mode: string + /** GetSiteInstanceChooserSearchResponseItem.language */ + language: string + /** GetSiteInstanceChooserSearchResponseItem.monthsmonitored */ + monthsmonitored: number + } + /** FederatedInstancesView */ + FederatedInstancesView: { + /** FederatedInstances.linked */ + linked: components['schemas']['InstanceWithoutFederationState'][] + /** FederatedInstances.allowed */ + allowed: components['schemas']['InstanceWithoutFederationState'][] + /** FederatedInstances.blocked */ + blocked: components['schemas']['InstanceWithoutFederationState'][] + } + /** CommunityBlockView */ + CommunityBlockView: { + /** CommunityBlockView.community */ + community: components['schemas']['Community'] + /** CommunityBlockView.person */ + person: components['schemas']['Person'] + } + /** CommunityFollowerView */ + CommunityFollowerView: { + /** CommunityFollowerView.community */ + community: components['schemas']['Community'] + /** CommunityFollowerView.follower */ + follower: components['schemas']['Person'] + } + /** LanguageView */ + LanguageView: { + /** + * Language.code + * @example en + */ + code?: string + /** + * Language.id + * @example 2 + */ + id?: number + /** + * Language.name + * @example English + */ + name?: string + } + /** InstanceBlockView */ + InstanceBlockView: { + /** InstanceBlockView.person */ + person: components['schemas']['Person'] + /** InstanceBlockView.instance */ + instance: components['schemas']['Instance'] + /** InstanceBlockView.site */ + site?: components['schemas']['Site'] + } + /** LocalUserView */ + LocalUserView: { + /** LocalUserView.counts */ + counts: components['schemas']['PersonAggregates'] + /** LocalUserView.local_user */ + local_user: components['schemas']['LocalUser'] + /** LocalUserView.person */ + person: components['schemas']['Person'] + } + /** CommunityModeratorView */ + CommunityModeratorView: { + /** CommunityModeratorView.community */ + community: components['schemas']['Community'] + /** CommunityModeratorView.moderator */ + moderator: components['schemas']['Person'] + } + /** PersonBlockView */ + PersonBlockView: { + /** PersonBlockView.person */ + person: components['schemas']['Person'] + /** PersonBlockView.target */ + target: components['schemas']['Person'] + } + /** PersonView */ + PersonView: { + /** PersonView.person */ + person: components['schemas']['Person'] + /** PersonView.counts */ + counts: components['schemas']['PersonAggregates'] + /** PersonView.is_admin */ + is_admin: boolean + /** PersonView.activity_alert */ + activity_alert: boolean + } + /** CommentView */ + CommentView: { + /** CommentView.comment */ + comment: components['schemas']['Comment'] + /** CommentView.creator */ + creator: components['schemas']['Person'] + /** CommentView.post */ + post: components['schemas']['Post'] + /** CommentView.community */ + community: components['schemas']['Community'] + /** CommentView.counts */ + counts: components['schemas']['CommentAggregates'] + /** CommentView.creator_banned_from_community */ + creator_banned_from_community: boolean + /** CommentView.banned_from_community */ + banned_from_community: boolean + /** CommentView.creator_is_moderator */ + creator_is_moderator: boolean + /** CommentView.creator_is_admin */ + creator_is_admin: boolean + /** CommentView.subscribed */ + subscribed: components['schemas']['SubscribedType'] + /** CommentView.saved */ + saved: boolean + /** CommentView.activity_alert */ + activity_alert: boolean + /** CommentView.creator_blocked */ + creator_blocked: boolean + /** CommentView.my_vote */ + my_vote?: number + } + /** PostView */ + PostView: { + /** PostView.post */ + post: components['schemas']['Post'] + /** PostView.creator */ + creator: components['schemas']['Person'] + /** PostView.community */ + community: components['schemas']['Community'] + /** PostView.creator_banned_from_community */ + creator_banned_from_community: boolean + /** PostView.banned_from_community */ + banned_from_community: boolean + /** PostView.creator_is_moderator */ + creator_is_moderator: boolean + /** PostView.creator_is_admin */ + creator_is_admin: boolean + /** PostView.counts */ + counts: components['schemas']['PostAggregates'] + /** PostView.subscribed */ + subscribed: components['schemas']['SubscribedType'] + /** PostView.saved */ + saved: boolean + /** PostView.activity_alert */ + activity_alert?: boolean + /** PostView.read */ + read: boolean + /** PostView.hidden */ + hidden: boolean + /** PostView.my_vote */ + my_vote?: number + /** PostView.unread_comments */ + unread_comments: number + } + /** CommunityView */ + CommunityView: { + /** CommunityView.community */ + community: components['schemas']['Community'] + /** CommunityView.subscribed */ + subscribed: components['schemas']['SubscribedType'] + /** CommunityView.blocked */ + blocked: boolean + /** CommunityView.counts */ + counts: components['schemas']['CommunityAggregates'] + /** CommunityView.activity_alert */ + activity_alert: boolean + } + /** PostReportView */ + PostReportView: { + /** PostReportView.post_report */ + post_report: components['schemas']['PostReport'] + /** PostReportView.post */ + post: components['schemas']['Post'] + /** PostReportView.community */ + community: components['schemas']['Community'] + /** PostReportView.creator */ + creator: components['schemas']['Person'] + /** PostReportView.post_creator */ + post_creator: components['schemas']['Person'] + /** PostReportView.creator_banned_from_community */ + creator_banned_from_community: boolean + /** PostReportView.creator_is_moderator */ + creator_is_moderator: boolean + /** PostReportView.creator_is_admin */ + creator_is_admin: boolean + /** PostReportView.subscribed */ + subscribed: components['schemas']['SubscribedType'] + /** PostReportView.saved */ + saved: boolean + /** PostReportView.creator_blocked */ + creator_blocked: boolean + /** PostReportView.my_vote */ + my_vote?: number + /** PostReportView.counts */ + counts: components['schemas']['PostAggregates'] + /** PostReportView.resolver */ + resolver?: components['schemas']['Person'] + } + /** CommentReportView */ + CommentReportView: { + /** CommentReportView.comment_report */ + comment_report: components['schemas']['CommentReport'] + /** CommentReportView.comment */ + comment: components['schemas']['Comment'] + /** CommentReportView.post */ + post: components['schemas']['Post'] + /** CommentReportView.community */ + community: components['schemas']['Community'] + /** CommentReportView.creator */ + creator: components['schemas']['Person'] + /** CommentReportView.comment_creator */ + comment_creator: components['schemas']['Person'] + /** CommentReportView.counts */ + counts: components['schemas']['CommentAggregates'] + /** CommentReportView.creator_banned_from_community */ + creator_banned_from_community: boolean + /** CommentReportView.creator_is_moderator */ + creator_is_moderator: boolean + /** CommentReportView.creator_is_admin */ + creator_is_admin: boolean + /** CommentReportView.creator_blocked */ + creator_blocked: boolean + /** CommentReportView.subscribed */ + subscribed: components['schemas']['SubscribedType'] + /** CommentReportView.saved */ + saved: boolean + /** CommentReportView.my_vote */ + my_vote?: number + /** CommentReportView.resolver */ + resolver?: components['schemas']['Person'] + } + /** CommentReplyView */ + CommentReplyView: { + /** CommentReplyView.comment_reply */ + comment_reply: components['schemas']['CommentReply'] + /** CommentReplyView.comment */ + comment: components['schemas']['Comment'] + /** CommentReplyView.creator */ + creator: components['schemas']['Person'] + /** CommentReplyView.post */ + post: components['schemas']['Post'] + /** CommentReplyView.community */ + community: components['schemas']['Community'] + /** CommentReplyView.recipient */ + recipient: components['schemas']['Person'] + /** CommentReplyView.counts */ + counts: components['schemas']['CommentAggregates'] + /** CommentReplyView.creator_banned_from_community */ + creator_banned_from_community: boolean + /** CommentReplyView.creator_is_moderator */ + creator_is_moderator: boolean + /** CommentReplyView.creator_is_admin */ + creator_is_admin: boolean + /** CommentReplyView.subscribed */ + subscribed: components['schemas']['SubscribedType'] + /** CommentReplyView.saved */ + saved: boolean + /** CommentReplyView.creator_blocked */ + creator_blocked: boolean + /** CommentReplyView.my_vote */ + my_vote?: number + } + /** CommentReplyResponse */ + CommentReplyResponse: { + /** CommentResponse.comment_reply_view */ + comment_reply_view: components['schemas']['CommentReplyView'] + } + /** PrivateMessageView */ + PrivateMessageView: { + /** PrivateMessageView.private_message */ + private_message: components['schemas']['PrivateMessage'] + /** PrivateMessageView.creator */ + creator: components['schemas']['Person'] + /** PrivateMessageView.recipient */ + recipient: components['schemas']['Person'] + } + /** CommunityModerationBanItem */ + CommunityModerationBanItem: { + /** + * CommunityModerationBanItem.reason + * @example Violation of Rule 4 + */ + reason: string + /** + * CommunityModerationBanItem.expiredAt + * @example 2042-01-01T12:00:00 + */ + expiredAt: string + /** CommunityModerationBanItem.community */ + community: components['schemas']['Community'] + /** CommunityModerationBanItem.bannedUser */ + bannedUser: components['schemas']['Person'] + /** CommunityModerationBanItem.bannedBy */ + bannedBy: components['schemas']['Person'] + /** + * CommunityModerationBanItem.expired + * @example false + */ + expired: boolean + } + /** NotificationsCountsView */ + NotificationsCountsView: { + /** NotificationsCountsView.new_notifications */ + new_notifications: number + /** NotificationsCountsView.read_notifications */ + read_notifications: number + /** NotificationsCountsView.total_notifications */ + total_notifications?: number + } + /** NotificationsItemUserView */ + NotificationsItemUserView: { + /** + * NotificationsItemUserView.notif_id + * @example 1234 + */ + notif_id?: number + /** + * NotificationsItemUserView.notif_type + * @example 0 + */ + notif_type?: number + /** + * NotificationsItemUserView.notif_subtype + * @example new_post_from_followed_user + */ + notif_subtype?: string + /** NotificationsItemUserView.author */ + author?: components['schemas']['Person'] + /** NotificationsItemUserView.post */ + post?: components['schemas']['PostView'] + /** + * NotificationsItemUserView.post_id + * @example 1234 + */ + post_id?: number + /** + * NotificationsItemUserView.notif_body + * @example This is the body of a post. + */ + notif_body?: string + } + /** NotificationsItemCommunityView */ + NotificationsItemCommunityView: { + /** + * NotificationsItemCommunityView.notif_id + * @example 1234 + */ + notif_id?: number + /** + * NotificationsItemCommunityView.notif_type + * @example 1 + */ + notif_type?: number + /** + * NotificationsItemCommunityView.notif_subtype + * @example new_post_in_followed_community + */ + notif_subtype?: string + /** NotificationsItemCommunityView.author */ + author?: components['schemas']['Person'] + /** NotificationsItemCommunityView.post */ + post?: components['schemas']['PostView'] + /** + * NotificationsItemCommunityView.post_id + * @example 1234 + */ + post_id?: number + /** NotificationsItemCommunityView.community */ + community?: components['schemas']['CommunityView'] + /** + * NotificationsItemCommunityView.notif_body + * @example This is the body of a post. + */ + notif_body?: string + } + /** NotificationsItemTopicView */ + NotificationsItemTopicView: { + /** + * NotificationsItemTopicView.notif_id + * @example 1234 + */ + notif_id?: number + /** + * NotificationsItemTopicView.notif_type + * @example 2 + */ + notif_type?: number + /** + * NotificationsItemTopicView.notif_subtype + * @example new_post_in_followed_topic + */ + notif_subtype?: string + /** NotificationsItemTopicView.author */ + author?: components['schemas']['Person'] + /** NotificationsItemTopicView.post */ + post?: components['schemas']['PostView'] + /** + * NotificationsItemTopicView.post_id + * @example 1234 + */ + post_id?: number + /** + * NotificationsItemTopicView.notif_body + * @example This is the body of a post. + */ + notif_body?: string + } + /** NotificationsItemPostView */ + NotificationsItemPostView: { + /** + * NotificationsItemPostView.notif_id + * @example 1234 + */ + notif_id?: number + /** + * NotificationsItemPostView.notif_type + * @example 3 + */ + notif_type?: number + /** + * NotificationsItemPostView.notif_subtype + * @example top_level_comment_on_followed_post + */ + notif_subtype?: string + /** NotificationsItemPostView.author */ + author?: components['schemas']['Person'] + /** NotificationsItemPostView.post */ + post?: components['schemas']['PostView'] + /** + * NotificationsItemPostView.post_id + * @example 1234 + */ + post_id?: number + /** NotificationsItemPostView.comment */ + comment?: components['schemas']['Comment'] + /** + * NotificationsItemPostView.comment_id + * @example 1234 + */ + comment_id?: number + /** + * NotificationsItemPostView.notif_body + * @example This is the body of a comment. + */ + notif_body?: string + } + /** NotificationsItemReplyView */ + NotificationsItemReplyView: { + /** + * NotificationsItemReplyView.notif_id + * @example 1234 + */ + notif_id?: number + /** + * NotificationsItemReplyView.notif_type + * @example 4 + */ + notif_type?: number + /** + * NotificationsItemReplyView.notif_subtype + * @example new_reply_on_followed_comment + */ + notif_subtype?: string + /** NotificationsItemReplyView.author */ + author?: components['schemas']['Person'] + /** NotificationsItemReplyView.post */ + post?: components['schemas']['PostView'] + /** + * NotificationsItemReplyView.post_id + * @example 1234 + */ + post_id?: number + /** NotificationsItemReplyView.comment */ + comment?: components['schemas']['Comment'] + /** + * NotificationsItemReplyView.comment_id + * @example 1234 + */ + comment_id?: number + /** + * NotificationsItemReplyView.notif_body + * @example This is the body of a comment. + */ + notif_body?: string + } + /** NotificationsItemFeedView */ + NotificationsItemFeedView: { + /** + * NotificationsItemFeedView.notif_id + * @example 1234 + */ + notif_id?: number + /** + * NotificationsItemFeedView.notif_type + * @example 5 + */ + notif_type?: number + /** + * NotificationsItemFeedView.notif_subtype + * @example new_post_in_followed_feed + */ + notif_subtype?: string + /** NotificationsItemFeedView.author */ + author?: components['schemas']['Person'] + /** NotificationsItemFeedView.post */ + post?: components['schemas']['PostView'] + /** + * NotificationsItemFeedView.post_id + * @example 1234 + */ + post_id?: number + /** + * NotificationsItemFeedView.notif_body + * @example This is the body of a post. + */ + notif_body?: string + } + /** NotificationsItemPostMentionView */ + NotificationsItemPostMentionView: { + /** + * NotificationsItemPostMentionView.notif_id + * @example 1234 + */ + notif_id?: number + /** + * NotificationsItemPostMentionView.notif_type + * @example 6 + */ + notif_type?: number + /** + * NotificationsItemPostMentionView.notif_subtype + * @example post_mention + */ + notif_subtype?: string + /** NotificationsItemPostMentionView.author */ + author?: components['schemas']['Person'] + /** NotificationsItemPostMentionView.post */ + post?: components['schemas']['PostView'] + /** + * NotificationsItemPostMentionView.post_id + * @example 1234 + */ + post_id?: number + /** + * NotificationsItemPostMentionView.notif_body + * @example This is the body of a post. + */ + notif_body?: string + } + /** NotificationsItemCommentMentionView */ + NotificationsItemCommentMentionView: { + /** + * NotificationsItemCommentMentionView.notif_id + * @example 1234 + */ + notif_id?: number + /** + * NotificationsItemCommentMentionView.notif_type + * @example 6 + */ + notif_type?: number + /** + * NotificationsItemCommentMentionView.notif_subtype + * @example comment_mention + */ + notif_subtype?: string + /** NotificationsItemCommentMentionView.author */ + author?: components['schemas']['Person'] + /** NotificationsItemCommentMentionView.comment */ + comment?: components['schemas']['Comment'] + /** + * NotificationsItemCommentMentionView.comment_id + * @example 1234 + */ + comment_id?: number + /** + * NotificationsItemCommentMentionView.notif_body + * @example This is the body of a comment. + */ + notif_body?: string + } + FeedView: { + /** + * FeedView.actor_id + * Format: url + */ + actor_id: string + /** FeedView.ap_domain */ + ap_domain: string + /** FeedView.children */ + children: components['schemas']['FeedView'][] + /** FeedView.communities */ + communities: components['schemas']['Community'][] + /** FeedView.communities_count */ + communities_count: number + /** FeedView.id */ + id: number + /** FeedView.is_instance_feed */ + is_instance_feed: boolean + /** FeedView.local */ + local: boolean + /** FeedView.name */ + name: string + /** FeedView.nsfl */ + nsfl: boolean + /** FeedView.nsfw */ + nsfw: boolean + /** + * FeedView.owner + * @description Is the authorized user the creator of the feed? + */ + owner: boolean + /** FeedView.public */ + public: boolean + /** + * FeedView.published + * Format: datetime + * @example 2025-06-07T02:29:07.980084Z + */ + published: string + /** FeedView.show_posts_from_children */ + show_posts_from_children: boolean + /** FeedView.subscribed */ + subscribed: boolean + /** FeedView.subscriptions_count */ + subscriptions_count: number + /** FeedView.title */ + title: string + /** + * FeedView.updated + * Format: datetime + * @example 2025-06-07T02:29:07.980084Z + */ + updated: string + /** + * FeedView.user_id + * @description user_id of the feed creator/owner + */ + user_id: number + /** + * FeedView.banner + * Format: url + */ + banner?: string + /** + * FeedView.description + * Format: markdown + */ + description?: string + /** + * FeedView.description_html + * Format: html + */ + description_html?: string + /** + * FeedView.icon + * Format: url + */ + icon?: string + /** FeedView.parent_feed_id */ + parent_feed_id?: number + } + TopicView: { + /** TopicView.children */ + children: components['schemas']['TopicView'][] + /** TopicView.communities */ + communities: components['schemas']['Community'][] + /** TopicView.communities_count */ + communities_count: number + /** TopicView.id */ + id: number + /** TopicView.name */ + name: string + /** TopicView.show_posts_from_children */ + show_posts_from_children: boolean + /** TopicView.title */ + title: string + /** TopicView.parent_topic_id */ + parent_topic_id?: number + } + /** + * RegistrationMode + * @enum {string} + */ + RegistrationMode: 'Closed' | 'RequireApplication' | 'Open' + /** + * SearchType + * @enum {string} + */ + SearchType: 'Communities' | 'Posts' | 'Users' | 'Url' + /** + * CommunitySortType + * @enum {string} + */ + CommunitySortType: 'Active' | 'New' + /** + * ListingType + * @enum {string} + */ + ListingType: 'All' | 'Local' | 'Subscribed' | 'Popular' | 'ModeratorView' + /** + * SortType + * @enum {string} + */ + SortType: + | 'Active' + | 'Hot' + | 'New' + | 'TopHour' + | 'TopSixHour' + | 'TopTwelveHour' + | 'TopDay' + | 'TopWeek' + | 'TopMonth' + | 'TopThreeMonths' + | 'TopSixMonths' + | 'TopNineMonths' + | 'TopYear' + | 'TopAll' + | 'Scaled' + /** + * SubscribedType + * @enum {string} + */ + SubscribedType: 'Subscribed' | 'NotSubscribed' | 'Pending' + /** + * PostFeatureType + * @enum {string} + */ + PostFeatureType: 'Local' | 'Community' + /** + * CommentSortType + * @enum {string} + */ + CommentSortType: 'Hot' | 'Top' | 'New' | 'Old' + /** + * NotificationStatusType + * @enum {string} + */ + NotificationStatusType: 'All' | 'New' | 'Read' + /** PersonAggregates */ + PersonAggregates: { + /** PersonAggregates.comment_count */ + comment_count: number + /** PersonAggregates.person_id */ + person_id: number + /** PersonAggregates.post_count */ + post_count: number + } + /** CommentAggregates */ + CommentAggregates: { + /** CommentAggregates.comment_id */ + comment_id: number + /** CommentAggregates.score */ + score: number + /** CommentAggregates.upvotes */ + upvotes: number + /** CommentAggregates.downvotes */ + downvotes: number + /** + * CommentAggregates.published + * Format: date-time + */ + published: string + /** CommentAggregates.child_count */ + child_count: number + } + /** PostAggregates */ + PostAggregates: { + /** PostAggregates.post_id */ + post_id: number + /** PostAggregates.comments */ + comments: number + /** PostAggregates.score */ + score: number + /** PostAggregates.upvotes */ + upvotes: number + /** PostAggregates.downvotes */ + downvotes: number + /** + * PostAggregates.published + * Format: date-time + */ + published: string + /** PostAggregates.newest_comment_time */ + newest_comment_time: string + } + /** CommunityAggregates */ + CommunityAggregates: { + /** CommunityAggregates.active_6monthly */ + active_6monthly: number + /** CommunityAggregates.active_daily */ + active_daily: number + /** CommunityAggregates.active_monthly */ + active_monthly: number + /** CommunityAggregates.active_weekly */ + active_weekly: number + /** CommunityAggregates.community_id */ + id: number + /** CommunityAggregates.post_count */ + post_count: number + /** CommunityAggregates.post_reply_count */ + post_reply_count: number + /** + * CommunityAggregates.published + * Format: date-time + */ + published: string + /** CommunityAggregates.subscriptions_count */ + subscriptions_count: number + /** CommunityAggregates.total_subscriptions_count */ + total_subscriptions_count: number + } + 'SuccessResponse-2': unknown + 'CommentReplyResponse-2': unknown + } + responses: never + parameters: never + requestBodies: never + headers: never + pathItems: never +} +export type $defs = Record +export interface operations { + markAllAsRead: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetRepliesResponse'] + } + } + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['BadRequest'] + } + } + } + } +} diff --git a/src/lib/client/types/index.ts b/src/lib/client/types/index.ts index 19894d4c..455e1b73 100644 --- a/src/lib/client/types/index.ts +++ b/src/lib/client/types/index.ts @@ -1,3 +1,65 @@ -export * from './payload' -export * from './response' -export * from './schemas' +export * from './schemas/AddAdminResponse' +export * from './schemas/AddModToCommunityResponse' +export * from './schemas/BanFromCommunityResponse' +export * from './schemas/BanPersonResponse' +export * from './schemas/BannedPersonsResponse' +export * from './schemas/BlockCommunityResponse' +export * from './schemas/BlockInstanceResponse' +export * from './schemas/BlockPersonResponse' +export * from './schemas/CaptchaResponse' +export * from './schemas/CommentReplyResponse' +export * from './schemas/CommentReportResponse' +export * from './schemas/CommentResponse' +export * from './schemas/CommunityResponse' +export * from './schemas/CustomEmojiResponse' +export * from './schemas/GenerateTotpSecretResponse' +export * from './schemas/GetCaptchaResponse' +export * from './schemas/GetComment' +export * from './schemas/GetComments' +export * from './schemas/GetCommentsResponse' +export * from './schemas/GetCommunity' +export * from './schemas/GetCommunityResponse' +export * from './schemas/GetFederatedInstancesResponse' +export * from './schemas/GetModlog' +export * from './schemas/GetModlogResponse' +export * from './schemas/GetPersonDetails' +export * from './schemas/GetPersonDetailsResponse' +export * from './schemas/GetPersonMentions' +export * from './schemas/GetPersonMentionsResponse' +export * from './schemas/GetPost' +export * from './schemas/GetPostResponse' +export * from './schemas/GetPosts' +export * from './schemas/GetPostsResponse' +export * from './schemas/GetPrivateMessages' +export * from './schemas/GetRegistrationApplication' +export * from './schemas/GetReplies' +export * from './schemas/GetRepliesResponse' +export * from './schemas/GetReportCount' +export * from './schemas/GetReportCountResponse' +export * from './schemas/GetSiteMetadata' +export * from './schemas/GetSiteMetadataResponse' +export * from './schemas/GetSiteResponse' +export * from './schemas/GetUnreadCountResponse' +export * from './schemas/GetUnreadRegistrationApplicationCountResponse' +export * from './schemas/ListCommentLikesResponse' +export * from './schemas/ListCommentReportsResponse' +export * from './schemas/ListCommunitiesResponse' +export * from './schemas/ListMediaResponse' +export * from './schemas/ListPostLikesResponse' +export * from './schemas/ListPostReportsResponse' +export * from './schemas/ListPrivateMessageReportsResponse' +export * from './schemas/ListRegistrationApplicationsResponse' +export * from './schemas/LoginResponse' +export * from './schemas/PersonMentionResponse' +export * from './schemas/PostReportResponse' +export * from './schemas/PostResponse' +export * from './schemas/PrivateMessageReportResponse' +export * from './schemas/PrivateMessageResponse' +export * from './schemas/PrivateMessagesResponse' +export * from './schemas/RegistrationApplicationResponse' +export * from './schemas/ResolveObjectResponse' +export * from './schemas/SearchResponse' +export * from './schemas/SiteResponse' +export * from './schemas/SuccessResponse' +export * from './schemas/UpdateTotpResponse' +export * from './schemas/schemas' diff --git a/src/lib/client/types/payload/GetComment.d.ts b/src/lib/client/types/payload/GetComment.d.ts deleted file mode 100644 index 1f4261bd..00000000 --- a/src/lib/client/types/payload/GetComment.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CommentId } from "./CommentId"; -export interface GetComment { - id: CommentId; -} diff --git a/src/lib/client/types/payload/GetComments.d.ts b/src/lib/client/types/payload/GetComments.d.ts deleted file mode 100644 index 085304fc..00000000 --- a/src/lib/client/types/payload/GetComments.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { CommentId } from "./CommentId"; -import type { CommentSortType } from "./CommentSortType"; -import type { CommunityId } from "./CommunityId"; -import type { ListingType } from "./ListingType"; -import type { PostId } from "./PostId"; -export interface GetComments { - type_?: ListingType; - sort?: CommentSortType; - max_depth?: number; - page?: number; - limit?: number; - community_id?: CommunityId; - community_name?: string; - post_id?: PostId; - parent_id?: CommentId; - saved_only?: boolean; - liked_only?: boolean; - disliked_only?: boolean; -} diff --git a/src/lib/client/types/payload/GetCommunity.d.ts b/src/lib/client/types/payload/GetCommunity.d.ts deleted file mode 100644 index ab38f49d..00000000 --- a/src/lib/client/types/payload/GetCommunity.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CommunityId } from "./CommunityId"; -export interface GetCommunity { - id?: CommunityId; - name?: string; -} diff --git a/src/lib/client/types/payload/GetModlog.d.ts b/src/lib/client/types/payload/GetModlog.d.ts deleted file mode 100644 index c6ac43bf..00000000 --- a/src/lib/client/types/payload/GetModlog.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { CommentId } from "./CommentId"; -import type { CommunityId } from "./CommunityId"; -import type { ModlogActionType } from "./ModlogActionType"; -import type { PersonId } from "./PersonId"; -import type { PostId } from "./PostId"; -export interface GetModlog { - mod_person_id?: PersonId; - community_id?: CommunityId; - page?: number; - limit?: number; - type_?: ModlogActionType; - other_person_id?: PersonId; - post_id?: PostId; - comment_id?: CommentId; -} diff --git a/src/lib/client/types/payload/GetPersonDetails.d.ts b/src/lib/client/types/payload/GetPersonDetails.d.ts deleted file mode 100644 index a67b49ac..00000000 --- a/src/lib/client/types/payload/GetPersonDetails.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { CommunityId } from "./CommunityId"; -import type { PersonId } from "./PersonId"; -import type { SortType } from "./SortType"; -export interface GetPersonDetails { - person_id?: PersonId; - username?: string; - sort?: SortType; - page?: number; - limit?: number; - community_id?: CommunityId; - saved_only?: boolean; -} diff --git a/src/lib/client/types/payload/GetPersonMentions.d.ts b/src/lib/client/types/payload/GetPersonMentions.d.ts deleted file mode 100644 index b78422ca..00000000 --- a/src/lib/client/types/payload/GetPersonMentions.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { CommentSortType } from "./CommentSortType"; -export interface GetPersonMentions { - sort?: CommentSortType; - page?: number; - limit?: number; - unread_only?: boolean; -} diff --git a/src/lib/client/types/payload/GetPost.d.ts b/src/lib/client/types/payload/GetPost.d.ts deleted file mode 100644 index 8f433383..00000000 --- a/src/lib/client/types/payload/GetPost.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CommentId } from "./CommentId"; -import type { PostId } from "./PostId"; -export interface GetPost { - id?: PostId; - comment_id?: CommentId; -} diff --git a/src/lib/client/types/payload/GetPosts.d.ts b/src/lib/client/types/payload/GetPosts.d.ts deleted file mode 100644 index 50c878f7..00000000 --- a/src/lib/client/types/payload/GetPosts.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { CommunityId } from "./CommunityId"; -import type { ListingType } from "./ListingType"; -import type { PaginationCursor } from "./PaginationCursor"; -import type { SortType } from "./SortType"; -export interface GetPosts { - type_?: ListingType; - sort?: SortType; - page?: number; - limit?: number; - community_id?: CommunityId; - community_name?: string; - saved_only?: boolean; - liked_only?: boolean; - disliked_only?: boolean; - show_hidden?: boolean; - show_read?: boolean; - show_nsfw?: boolean; - page_cursor?: PaginationCursor; -} diff --git a/src/lib/client/types/payload/GetPrivateMessages.d.ts b/src/lib/client/types/payload/GetPrivateMessages.d.ts deleted file mode 100644 index bfed78d6..00000000 --- a/src/lib/client/types/payload/GetPrivateMessages.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { PersonId } from "./PersonId"; -export interface GetPrivateMessages { - unread_only?: boolean; - page?: number; - limit?: number; - creator_id?: PersonId; -} diff --git a/src/lib/client/types/payload/GetRegistrationApplication.d.ts b/src/lib/client/types/payload/GetRegistrationApplication.d.ts deleted file mode 100644 index 2e736d26..00000000 --- a/src/lib/client/types/payload/GetRegistrationApplication.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PersonId } from "./PersonId"; -export interface GetRegistrationApplication { - person_id: PersonId; -} diff --git a/src/lib/client/types/payload/GetReplies.d.ts b/src/lib/client/types/payload/GetReplies.d.ts deleted file mode 100644 index ff16aab6..00000000 --- a/src/lib/client/types/payload/GetReplies.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { CommentSortType } from "./CommentSortType"; -export interface GetReplies { - sort?: CommentSortType; - page?: number; - limit?: number; - unread_only?: boolean; -} diff --git a/src/lib/client/types/payload/GetReportCount.d.ts b/src/lib/client/types/payload/GetReportCount.d.ts deleted file mode 100644 index 06c4163d..00000000 --- a/src/lib/client/types/payload/GetReportCount.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CommunityId } from "./CommunityId"; -export interface GetReportCount { - community_id?: CommunityId; -} diff --git a/src/lib/client/types/payload/index.ts b/src/lib/client/types/payload/index.ts deleted file mode 100644 index 6b741421..00000000 --- a/src/lib/client/types/payload/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export * from './GetComment.d'; -export * from './GetComments.d'; -export * from './GetCommunity.d'; -export * from './GetModlog.d'; -export * from './GetPersonDetails.d'; -export * from './GetPersonMentions.d'; -export * from './GetPost.d'; -export * from './GetPosts.d'; -export * from './GetPrivateMessages.d'; -export * from './GetRegistrationApplication.d'; -export * from './GetReplies.d'; -export * from './GetReportCount.d'; -export * from './GetSiteMetadata.d'; diff --git a/src/lib/client/types/response/AddAdminResponse.d.ts b/src/lib/client/types/response/AddAdminResponse.d.ts deleted file mode 100644 index 67f93db6..00000000 --- a/src/lib/client/types/response/AddAdminResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PersonView } from "./PersonView"; -export interface AddAdminResponse { - admins: Array; -} diff --git a/src/lib/client/types/response/AddModToCommunityResponse.d.ts b/src/lib/client/types/response/AddModToCommunityResponse.d.ts deleted file mode 100644 index c55fbd43..00000000 --- a/src/lib/client/types/response/AddModToCommunityResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CommunityModeratorView } from "./CommunityModeratorView"; -export interface AddModToCommunityResponse { - moderators: Array; -} diff --git a/src/lib/client/types/response/BanFromCommunityResponse.d.ts b/src/lib/client/types/response/BanFromCommunityResponse.d.ts deleted file mode 100644 index 988112ed..00000000 --- a/src/lib/client/types/response/BanFromCommunityResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { PersonView } from "./PersonView"; -export interface BanFromCommunityResponse { - person_view: PersonView; - banned: boolean; -} diff --git a/src/lib/client/types/response/BanPersonResponse.d.ts b/src/lib/client/types/response/BanPersonResponse.d.ts deleted file mode 100644 index a810d530..00000000 --- a/src/lib/client/types/response/BanPersonResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { PersonView } from "./PersonView"; -export interface BanPersonResponse { - person_view: PersonView; - banned: boolean; -} diff --git a/src/lib/client/types/response/BannedPersonsResponse.d.ts b/src/lib/client/types/response/BannedPersonsResponse.d.ts deleted file mode 100644 index 699754ea..00000000 --- a/src/lib/client/types/response/BannedPersonsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PersonView } from "./PersonView"; -export interface BannedPersonsResponse { - banned: Array; -} diff --git a/src/lib/client/types/response/BlockCommunityResponse.d.ts b/src/lib/client/types/response/BlockCommunityResponse.d.ts deleted file mode 100644 index 2b91a977..00000000 --- a/src/lib/client/types/response/BlockCommunityResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CommunityView } from "./CommunityView"; -export interface BlockCommunityResponse { - community_view: CommunityView; - blocked: boolean; -} diff --git a/src/lib/client/types/response/BlockPersonResponse.d.ts b/src/lib/client/types/response/BlockPersonResponse.d.ts deleted file mode 100644 index 4efd8a06..00000000 --- a/src/lib/client/types/response/BlockPersonResponse.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { PersonView } from "./PersonView"; -export interface BlockPersonResponse { - person_view: PersonView; - blocked: boolean; -} diff --git a/src/lib/client/types/response/CommentReplyResponse.d.ts b/src/lib/client/types/response/CommentReplyResponse.d.ts deleted file mode 100644 index 78590e0f..00000000 --- a/src/lib/client/types/response/CommentReplyResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CommentReplyView } from "./CommentReplyView"; -export interface CommentReplyResponse { - comment_reply_view: CommentReplyView; -} diff --git a/src/lib/client/types/response/CommentReportResponse.d.ts b/src/lib/client/types/response/CommentReportResponse.d.ts deleted file mode 100644 index a1c00045..00000000 --- a/src/lib/client/types/response/CommentReportResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CommentReportView } from "./CommentReportView"; -export interface CommentReportResponse { - comment_report_view: CommentReportView; -} diff --git a/src/lib/client/types/response/CommentResponse.d.ts b/src/lib/client/types/response/CommentResponse.d.ts deleted file mode 100644 index df8db0ae..00000000 --- a/src/lib/client/types/response/CommentResponse.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CommentView } from "./CommentView"; -import type { LocalUserId } from "./LocalUserId"; -export interface CommentResponse { - comment_view: CommentView; - recipient_ids: Array; -} diff --git a/src/lib/client/types/response/CommunityResponse.d.ts b/src/lib/client/types/response/CommunityResponse.d.ts deleted file mode 100644 index 8a0240cc..00000000 --- a/src/lib/client/types/response/CommunityResponse.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CommunityView } from "./CommunityView"; -import type { LanguageId } from "./LanguageId"; -export interface CommunityResponse { - community_view: CommunityView; - discussion_languages: Array; -} diff --git a/src/lib/client/types/response/CustomEmojiResponse.d.ts b/src/lib/client/types/response/CustomEmojiResponse.d.ts deleted file mode 100644 index dc25b458..00000000 --- a/src/lib/client/types/response/CustomEmojiResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CustomEmojiView } from "./CustomEmojiView"; -export interface CustomEmojiResponse { - custom_emoji: CustomEmojiView; -} diff --git a/src/lib/client/types/response/GetCaptchaResponse.d.ts b/src/lib/client/types/response/GetCaptchaResponse.d.ts deleted file mode 100644 index 0bb6de7e..00000000 --- a/src/lib/client/types/response/GetCaptchaResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CaptchaResponse } from "./CaptchaResponse"; -export interface GetCaptchaResponse { - ok?: CaptchaResponse; -} diff --git a/src/lib/client/types/response/GetCommentsResponse.d.ts b/src/lib/client/types/response/GetCommentsResponse.d.ts deleted file mode 100644 index af24eb57..00000000 --- a/src/lib/client/types/response/GetCommentsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CommentView } from "./CommentView"; -export interface GetCommentsResponse { - comments: Array; -} diff --git a/src/lib/client/types/response/GetCommunityResponse.d.ts b/src/lib/client/types/response/GetCommunityResponse.d.ts deleted file mode 100644 index 3e2b221c..00000000 --- a/src/lib/client/types/response/GetCommunityResponse.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { CommunityModeratorView } from "./CommunityModeratorView"; -import type { CommunityView } from "./CommunityView"; -import type { LanguageId } from "./LanguageId"; -import type { Site } from "./Site"; -export interface GetCommunityResponse { - community_view: CommunityView; - site?: Site; - moderators: Array; - discussion_languages: Array; -} diff --git a/src/lib/client/types/response/GetFederatedInstancesResponse.d.ts b/src/lib/client/types/response/GetFederatedInstancesResponse.d.ts deleted file mode 100644 index 806446b0..00000000 --- a/src/lib/client/types/response/GetFederatedInstancesResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { FederatedInstances } from "./FederatedInstances"; -export interface GetFederatedInstancesResponse { - federated_instances?: FederatedInstances; -} diff --git a/src/lib/client/types/response/GetModlogResponse.d.ts b/src/lib/client/types/response/GetModlogResponse.d.ts deleted file mode 100644 index ddba530a..00000000 --- a/src/lib/client/types/response/GetModlogResponse.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { AdminPurgeCommentView } from "./AdminPurgeCommentView"; -import type { AdminPurgeCommunityView } from "./AdminPurgeCommunityView"; -import type { AdminPurgePersonView } from "./AdminPurgePersonView"; -import type { AdminPurgePostView } from "./AdminPurgePostView"; -import type { ModAddCommunityView } from "./ModAddCommunityView"; -import type { ModAddView } from "./ModAddView"; -import type { ModBanFromCommunityView } from "./ModBanFromCommunityView"; -import type { ModBanView } from "./ModBanView"; -import type { ModFeaturePostView } from "./ModFeaturePostView"; -import type { ModHideCommunityView } from "./ModHideCommunityView"; -import type { ModLockPostView } from "./ModLockPostView"; -import type { ModRemoveCommentView } from "./ModRemoveCommentView"; -import type { ModRemoveCommunityView } from "./ModRemoveCommunityView"; -import type { ModRemovePostView } from "./ModRemovePostView"; -import type { ModTransferCommunityView } from "./ModTransferCommunityView"; -export interface GetModlogResponse { - removed_posts: Array; - locked_posts: Array; - featured_posts: Array; - removed_comments: Array; - removed_communities: Array; - banned_from_community: Array; - banned: Array; - added_to_community: Array; - transferred_to_community: Array; - added: Array; - admin_purged_persons: Array; - admin_purged_communities: Array; - admin_purged_posts: Array; - admin_purged_comments: Array; - hidden_communities: Array; -} diff --git a/src/lib/client/types/response/GetPersonDetailsResponse.d.ts b/src/lib/client/types/response/GetPersonDetailsResponse.d.ts deleted file mode 100644 index 83026297..00000000 --- a/src/lib/client/types/response/GetPersonDetailsResponse.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { CommentView } from "./CommentView"; -import type { CommunityModeratorView } from "./CommunityModeratorView"; -import type { PersonView } from "./PersonView"; -import type { PostView } from "./PostView"; -import type { Site } from "./Site"; -export interface GetPersonDetailsResponse { - person_view: PersonView; - site?: Site; - comments: Array; - posts: Array; - moderates: Array; -} diff --git a/src/lib/client/types/response/GetPersonMentionsResponse.d.ts b/src/lib/client/types/response/GetPersonMentionsResponse.d.ts deleted file mode 100644 index 40319585..00000000 --- a/src/lib/client/types/response/GetPersonMentionsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PersonMentionView } from "./PersonMentionView"; -export interface GetPersonMentionsResponse { - mentions: Array; -} diff --git a/src/lib/client/types/response/GetPostResponse.d.ts b/src/lib/client/types/response/GetPostResponse.d.ts deleted file mode 100644 index 26c73fb4..00000000 --- a/src/lib/client/types/response/GetPostResponse.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { CommunityModeratorView } from "./CommunityModeratorView"; -import type { CommunityView } from "./CommunityView"; -import type { PostView } from "./PostView"; -export interface GetPostResponse { - post_view: PostView; - community_view: CommunityView; - moderators: Array; - cross_posts: Array; -} diff --git a/src/lib/client/types/response/GetPostsResponse.d.ts b/src/lib/client/types/response/GetPostsResponse.d.ts deleted file mode 100644 index 1c40f7ce..00000000 --- a/src/lib/client/types/response/GetPostsResponse.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { PaginationCursor } from "./PaginationCursor"; -import type { PostView } from "./PostView"; -export interface GetPostsResponse { - posts: Array; - next_page?: PaginationCursor; -} diff --git a/src/lib/client/types/response/GetRepliesResponse.d.ts b/src/lib/client/types/response/GetRepliesResponse.d.ts deleted file mode 100644 index 10cf639b..00000000 --- a/src/lib/client/types/response/GetRepliesResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CommentReplyView } from "./CommentReplyView"; -export interface GetRepliesResponse { - replies: Array; -} diff --git a/src/lib/client/types/response/GetReportCountResponse.d.ts b/src/lib/client/types/response/GetReportCountResponse.d.ts deleted file mode 100644 index 79c53861..00000000 --- a/src/lib/client/types/response/GetReportCountResponse.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { CommunityId } from "./CommunityId"; -export interface GetReportCountResponse { - community_id?: CommunityId; - comment_reports: number; - post_reports: number; - private_message_reports?: number; -} diff --git a/src/lib/client/types/response/GetSiteMetadataResponse.d.ts b/src/lib/client/types/response/GetSiteMetadataResponse.d.ts deleted file mode 100644 index 89403c14..00000000 --- a/src/lib/client/types/response/GetSiteMetadataResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { LinkMetadata } from "./LinkMetadata"; -export interface GetSiteMetadataResponse { - metadata: LinkMetadata; -} diff --git a/src/lib/client/types/response/GetSiteResponse.d.ts b/src/lib/client/types/response/GetSiteResponse.d.ts deleted file mode 100644 index a84f98ba..00000000 --- a/src/lib/client/types/response/GetSiteResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { CustomEmojiView } from "./CustomEmojiView"; -import type { Language } from "./Language"; -import type { LanguageId } from "./LanguageId"; -import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist"; -import type { MyUserInfo } from "./MyUserInfo"; -import type { PersonView } from "./PersonView"; -import type { SiteView } from "./SiteView"; -import type { Tagline } from "./Tagline"; -export interface GetSiteResponse { - site_view: SiteView; - admins: Array; - version: string; - my_user?: MyUserInfo; - all_languages: Array; - discussion_languages: Array; - taglines: Array; - custom_emojis: Array; - blocked_urls: Array; -} diff --git a/src/lib/client/types/response/ListCommentLikesResponse.d.ts b/src/lib/client/types/response/ListCommentLikesResponse.d.ts deleted file mode 100644 index 76431d74..00000000 --- a/src/lib/client/types/response/ListCommentLikesResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { VoteView } from "./VoteView"; -export interface ListCommentLikesResponse { - comment_likes: Array; -} diff --git a/src/lib/client/types/response/ListCommentReportsResponse.d.ts b/src/lib/client/types/response/ListCommentReportsResponse.d.ts deleted file mode 100644 index 3cbc1867..00000000 --- a/src/lib/client/types/response/ListCommentReportsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CommentReportView } from "./CommentReportView"; -export interface ListCommentReportsResponse { - comment_reports: Array; -} diff --git a/src/lib/client/types/response/ListCommunitiesResponse.d.ts b/src/lib/client/types/response/ListCommunitiesResponse.d.ts deleted file mode 100644 index 0894f710..00000000 --- a/src/lib/client/types/response/ListCommunitiesResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CommunityView } from "./CommunityView"; -export interface ListCommunitiesResponse { - communities: Array; -} diff --git a/src/lib/client/types/response/ListMediaResponse.d.ts b/src/lib/client/types/response/ListMediaResponse.d.ts deleted file mode 100644 index 0bf80732..00000000 --- a/src/lib/client/types/response/ListMediaResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { LocalImageView } from "./LocalImageView"; -export interface ListMediaResponse { - images: Array; -} diff --git a/src/lib/client/types/response/ListPostLikesResponse.d.ts b/src/lib/client/types/response/ListPostLikesResponse.d.ts deleted file mode 100644 index 80537ff1..00000000 --- a/src/lib/client/types/response/ListPostLikesResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { VoteView } from "./VoteView"; -export interface ListPostLikesResponse { - post_likes: Array; -} diff --git a/src/lib/client/types/response/ListPostReportsResponse.d.ts b/src/lib/client/types/response/ListPostReportsResponse.d.ts deleted file mode 100644 index 181091f7..00000000 --- a/src/lib/client/types/response/ListPostReportsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PostReportView } from "./PostReportView"; -export interface ListPostReportsResponse { - post_reports: Array; -} diff --git a/src/lib/client/types/response/ListPrivateMessageReportsResponse.d.ts b/src/lib/client/types/response/ListPrivateMessageReportsResponse.d.ts deleted file mode 100644 index efbde321..00000000 --- a/src/lib/client/types/response/ListPrivateMessageReportsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PrivateMessageReportView } from "./PrivateMessageReportView"; -export interface ListPrivateMessageReportsResponse { - private_message_reports: Array; -} diff --git a/src/lib/client/types/response/ListRegistrationApplicationsResponse.d.ts b/src/lib/client/types/response/ListRegistrationApplicationsResponse.d.ts deleted file mode 100644 index b2f7e95a..00000000 --- a/src/lib/client/types/response/ListRegistrationApplicationsResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { RegistrationApplicationView } from "./RegistrationApplicationView"; -export interface ListRegistrationApplicationsResponse { - registration_applications: Array; -} diff --git a/src/lib/client/types/response/PersonMentionResponse.d.ts b/src/lib/client/types/response/PersonMentionResponse.d.ts deleted file mode 100644 index 9c6aa1d2..00000000 --- a/src/lib/client/types/response/PersonMentionResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PersonMentionView } from "./PersonMentionView"; -export interface PersonMentionResponse { - person_mention_view: PersonMentionView; -} diff --git a/src/lib/client/types/response/PostReportResponse.d.ts b/src/lib/client/types/response/PostReportResponse.d.ts deleted file mode 100644 index bdd318a0..00000000 --- a/src/lib/client/types/response/PostReportResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PostReportView } from "./PostReportView"; -export interface PostReportResponse { - post_report_view: PostReportView; -} diff --git a/src/lib/client/types/response/PostResponse.d.ts b/src/lib/client/types/response/PostResponse.d.ts deleted file mode 100644 index 18084289..00000000 --- a/src/lib/client/types/response/PostResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PostView } from "./PostView"; -export interface PostResponse { - post_view: PostView; -} diff --git a/src/lib/client/types/response/PrivateMessageReportResponse.d.ts b/src/lib/client/types/response/PrivateMessageReportResponse.d.ts deleted file mode 100644 index 55216243..00000000 --- a/src/lib/client/types/response/PrivateMessageReportResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PrivateMessageReportView } from "./PrivateMessageReportView"; -export interface PrivateMessageReportResponse { - private_message_report_view: PrivateMessageReportView; -} diff --git a/src/lib/client/types/response/PrivateMessageResponse.d.ts b/src/lib/client/types/response/PrivateMessageResponse.d.ts deleted file mode 100644 index ca3f39e1..00000000 --- a/src/lib/client/types/response/PrivateMessageResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PrivateMessageView } from "./PrivateMessageView"; -export interface PrivateMessageResponse { - private_message_view: PrivateMessageView; -} diff --git a/src/lib/client/types/response/PrivateMessagesResponse.d.ts b/src/lib/client/types/response/PrivateMessagesResponse.d.ts deleted file mode 100644 index 9540d9ba..00000000 --- a/src/lib/client/types/response/PrivateMessagesResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { PrivateMessageView } from "./PrivateMessageView"; -export interface PrivateMessagesResponse { - private_messages: Array; -} diff --git a/src/lib/client/types/response/RegistrationApplicationResponse.d.ts b/src/lib/client/types/response/RegistrationApplicationResponse.d.ts deleted file mode 100644 index e08e96e4..00000000 --- a/src/lib/client/types/response/RegistrationApplicationResponse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { RegistrationApplicationView } from "./RegistrationApplicationView"; -export interface RegistrationApplicationResponse { - registration_application: RegistrationApplicationView; -} diff --git a/src/lib/client/types/response/ResolveObjectResponse.d.ts b/src/lib/client/types/response/ResolveObjectResponse.d.ts deleted file mode 100644 index 500bf016..00000000 --- a/src/lib/client/types/response/ResolveObjectResponse.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { CommentView } from "./CommentView"; -import type { CommunityView } from "./CommunityView"; -import type { PersonView } from "./PersonView"; -import type { PostView } from "./PostView"; -export interface ResolveObjectResponse { - comment?: CommentView; - post?: PostView; - community?: CommunityView; - person?: PersonView; -} diff --git a/src/lib/client/types/response/SearchResponse.d.ts b/src/lib/client/types/response/SearchResponse.d.ts deleted file mode 100644 index e90fd05f..00000000 --- a/src/lib/client/types/response/SearchResponse.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { CommentView } from "./CommentView"; -import type { CommunityView } from "./CommunityView"; -import type { PersonView } from "./PersonView"; -import type { PostView } from "./PostView"; -import type { SearchType } from "./SearchType"; -export interface SearchResponse { - type_: SearchType; - comments: Array; - posts: Array; - communities: Array; - users: Array; -} diff --git a/src/lib/client/types/response/SiteResponse.d.ts b/src/lib/client/types/response/SiteResponse.d.ts deleted file mode 100644 index b523722f..00000000 --- a/src/lib/client/types/response/SiteResponse.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SiteView } from "./SiteView"; -import type { Tagline } from "./Tagline"; -export interface SiteResponse { - site_view: SiteView; - taglines: Array; -} diff --git a/src/lib/client/types/response/index.ts b/src/lib/client/types/response/index.ts deleted file mode 100644 index 974edea4..00000000 --- a/src/lib/client/types/response/index.ts +++ /dev/null @@ -1,51 +0,0 @@ -export * from './AddAdminResponse.d'; -export * from './AddModToCommunityResponse.d'; -export * from './BanFromCommunityResponse.d'; -export * from './BanPersonResponse.d'; -export * from './BannedPersonsResponse.d'; -export * from './BlockCommunityResponse.d'; -export * from './BlockInstanceResponse.d'; -export * from './BlockPersonResponse.d'; -export * from './CaptchaResponse.d'; -export * from './CommentReplyResponse.d'; -export * from './CommentReportResponse.d'; -export * from './CommentResponse.d'; -export * from './CommunityResponse.d'; -export * from './CustomEmojiResponse.d'; -export * from './GenerateTotpSecretResponse.d'; -export * from './GetCaptchaResponse.d'; -export * from './GetCommentsResponse.d'; -export * from './GetCommunityResponse.d'; -export * from './GetFederatedInstancesResponse.d'; -export * from './GetModlogResponse.d'; -export * from './GetPersonDetailsResponse.d'; -export * from './GetPersonMentionsResponse.d'; -export * from './GetPostResponse.d'; -export * from './GetPostsResponse.d'; -export * from './GetRepliesResponse.d'; -export * from './GetReportCountResponse.d'; -export * from './GetSiteMetadataResponse.d'; -export * from './GetSiteResponse.d'; -export * from './GetUnreadCountResponse.d'; -export * from './GetUnreadRegistrationApplicationCountResponse.d'; -export * from './ListCommentLikesResponse.d'; -export * from './ListCommentReportsResponse.d'; -export * from './ListCommunitiesResponse.d'; -export * from './ListMediaResponse.d'; -export * from './ListPostLikesResponse.d'; -export * from './ListPostReportsResponse.d'; -export * from './ListPrivateMessageReportsResponse.d'; -export * from './ListRegistrationApplicationsResponse.d'; -export * from './LoginResponse.d'; -export * from './PersonMentionResponse.d'; -export * from './PostReportResponse.d'; -export * from './PostResponse.d'; -export * from './PrivateMessageReportResponse.d'; -export * from './PrivateMessageResponse.d'; -export * from './PrivateMessagesResponse.d'; -export * from './RegistrationApplicationResponse.d'; -export * from './ResolveObjectResponse.d'; -export * from './SearchResponse.d'; -export * from './SiteResponse.d'; -export * from './SuccessResponse.d'; -export * from './UpdateTotpResponse.d'; diff --git a/src/lib/client/types/schemas/AddAdminResponse.ts b/src/lib/client/types/schemas/AddAdminResponse.ts new file mode 100644 index 00000000..df4c1a63 --- /dev/null +++ b/src/lib/client/types/schemas/AddAdminResponse.ts @@ -0,0 +1,4 @@ +import type { PersonView } from './schemas' +export interface AddAdminResponse { + admins: Array +} diff --git a/src/lib/client/types/schemas/AddModToCommunityResponse.ts b/src/lib/client/types/schemas/AddModToCommunityResponse.ts new file mode 100644 index 00000000..aa6e6f78 --- /dev/null +++ b/src/lib/client/types/schemas/AddModToCommunityResponse.ts @@ -0,0 +1,4 @@ +import type { CommunityModeratorView } from './schemas' +export interface AddModToCommunityResponse { + moderators: Array +} diff --git a/src/lib/client/types/schemas/BanFromCommunityResponse.ts b/src/lib/client/types/schemas/BanFromCommunityResponse.ts new file mode 100644 index 00000000..fedba8f0 --- /dev/null +++ b/src/lib/client/types/schemas/BanFromCommunityResponse.ts @@ -0,0 +1,5 @@ +import type { PersonView } from './schemas' +export interface BanFromCommunityResponse { + person_view: PersonView + banned: boolean +} diff --git a/src/lib/client/types/schemas/BanPersonResponse.ts b/src/lib/client/types/schemas/BanPersonResponse.ts new file mode 100644 index 00000000..67d826ea --- /dev/null +++ b/src/lib/client/types/schemas/BanPersonResponse.ts @@ -0,0 +1,5 @@ +import type { PersonView } from './schemas' +export interface BanPersonResponse { + person_view: PersonView + banned: boolean +} diff --git a/src/lib/client/types/schemas/BannedPersonsResponse.ts b/src/lib/client/types/schemas/BannedPersonsResponse.ts new file mode 100644 index 00000000..cbf538bd --- /dev/null +++ b/src/lib/client/types/schemas/BannedPersonsResponse.ts @@ -0,0 +1,4 @@ +import type { PersonView } from './schemas' +export interface BannedPersonsResponse { + banned: Array +} diff --git a/src/lib/client/types/schemas/BlockCommunityResponse.ts b/src/lib/client/types/schemas/BlockCommunityResponse.ts new file mode 100644 index 00000000..b63ab275 --- /dev/null +++ b/src/lib/client/types/schemas/BlockCommunityResponse.ts @@ -0,0 +1,5 @@ +import type { CommunityView } from './schemas' +export interface BlockCommunityResponse { + community_view: CommunityView + blocked: boolean +} diff --git a/src/lib/client/types/response/BlockInstanceResponse.d.ts b/src/lib/client/types/schemas/BlockInstanceResponse.ts similarity index 100% rename from src/lib/client/types/response/BlockInstanceResponse.d.ts rename to src/lib/client/types/schemas/BlockInstanceResponse.ts diff --git a/src/lib/client/types/schemas/BlockPersonResponse.ts b/src/lib/client/types/schemas/BlockPersonResponse.ts new file mode 100644 index 00000000..7336a5ef --- /dev/null +++ b/src/lib/client/types/schemas/BlockPersonResponse.ts @@ -0,0 +1,5 @@ +import type { PersonView } from './schemas' +export interface BlockPersonResponse { + person_view: PersonView + blocked: boolean +} diff --git a/src/lib/client/types/response/CaptchaResponse.d.ts b/src/lib/client/types/schemas/CaptchaResponse.ts similarity index 100% rename from src/lib/client/types/response/CaptchaResponse.d.ts rename to src/lib/client/types/schemas/CaptchaResponse.ts diff --git a/src/lib/client/types/schemas/CommentReplyResponse.ts b/src/lib/client/types/schemas/CommentReplyResponse.ts new file mode 100644 index 00000000..c6668b27 --- /dev/null +++ b/src/lib/client/types/schemas/CommentReplyResponse.ts @@ -0,0 +1,4 @@ +import type { CommentReplyView } from './schemas' +export interface CommentReplyResponse { + comment_reply_view: CommentReplyView +} diff --git a/src/lib/client/types/schemas/CommentReportResponse.ts b/src/lib/client/types/schemas/CommentReportResponse.ts new file mode 100644 index 00000000..1955378e --- /dev/null +++ b/src/lib/client/types/schemas/CommentReportResponse.ts @@ -0,0 +1,4 @@ +import type { CommentReportView } from './schemas' +export interface CommentReportResponse { + comment_report_view: CommentReportView +} diff --git a/src/lib/client/types/schemas/CommentResponse.ts b/src/lib/client/types/schemas/CommentResponse.ts new file mode 100644 index 00000000..415b3dc2 --- /dev/null +++ b/src/lib/client/types/schemas/CommentResponse.ts @@ -0,0 +1,6 @@ +import type { CommentView } from './schemas' +import type { LocalUserId } from './schemas' +export interface CommentResponse { + comment_view: CommentView + recipient_ids: Array +} diff --git a/src/lib/client/types/schemas/CommunityResponse.ts b/src/lib/client/types/schemas/CommunityResponse.ts new file mode 100644 index 00000000..d74cd18d --- /dev/null +++ b/src/lib/client/types/schemas/CommunityResponse.ts @@ -0,0 +1,6 @@ +import type { CommunityView } from './schemas' +import type { LanguageId } from './schemas' +export interface CommunityResponse { + community_view: CommunityView + discussion_languages: Array +} diff --git a/src/lib/client/types/schemas/CustomEmojiResponse.ts b/src/lib/client/types/schemas/CustomEmojiResponse.ts new file mode 100644 index 00000000..56ba1ed9 --- /dev/null +++ b/src/lib/client/types/schemas/CustomEmojiResponse.ts @@ -0,0 +1,4 @@ +import type { CustomEmojiView } from './schemas' +export interface CustomEmojiResponse { + custom_emoji: CustomEmojiView +} diff --git a/src/lib/client/types/response/GenerateTotpSecretResponse.d.ts b/src/lib/client/types/schemas/GenerateTotpSecretResponse.ts similarity index 100% rename from src/lib/client/types/response/GenerateTotpSecretResponse.d.ts rename to src/lib/client/types/schemas/GenerateTotpSecretResponse.ts diff --git a/src/lib/client/types/schemas/GetCaptchaResponse.ts b/src/lib/client/types/schemas/GetCaptchaResponse.ts new file mode 100644 index 00000000..b52c0ae9 --- /dev/null +++ b/src/lib/client/types/schemas/GetCaptchaResponse.ts @@ -0,0 +1,4 @@ +import type { CaptchaResponse } from './schemas' +export interface GetCaptchaResponse { + ok?: CaptchaResponse +} diff --git a/src/lib/client/types/schemas/GetComment.ts b/src/lib/client/types/schemas/GetComment.ts new file mode 100644 index 00000000..fc3a7568 --- /dev/null +++ b/src/lib/client/types/schemas/GetComment.ts @@ -0,0 +1,4 @@ +import type { CommentId } from './schemas' +export interface GetComment { + id: CommentId +} diff --git a/src/lib/client/types/schemas/GetComments.ts b/src/lib/client/types/schemas/GetComments.ts new file mode 100644 index 00000000..43e7cddf --- /dev/null +++ b/src/lib/client/types/schemas/GetComments.ts @@ -0,0 +1,19 @@ +import type { CommentId } from './schemas' +import type { CommentSortType } from './schemas' +import type { CommunityId } from './schemas' +import type { ListingType } from './schemas' +import type { PostId } from './schemas' +export interface GetComments { + type_?: ListingType + sort?: CommentSortType + max_depth?: number + page?: number + limit?: number + community_id?: CommunityId + community_name?: string + post_id?: PostId + parent_id?: CommentId + saved_only?: boolean + liked_only?: boolean + disliked_only?: boolean +} diff --git a/src/lib/client/types/schemas/GetCommentsResponse.ts b/src/lib/client/types/schemas/GetCommentsResponse.ts new file mode 100644 index 00000000..b614a85e --- /dev/null +++ b/src/lib/client/types/schemas/GetCommentsResponse.ts @@ -0,0 +1,4 @@ +import type { CommentView } from './schemas' +export interface GetCommentsResponse { + comments: Array +} diff --git a/src/lib/client/types/schemas/GetCommunity.ts b/src/lib/client/types/schemas/GetCommunity.ts new file mode 100644 index 00000000..1e2fcbec --- /dev/null +++ b/src/lib/client/types/schemas/GetCommunity.ts @@ -0,0 +1,5 @@ +import type { CommunityId } from './schemas' +export interface GetCommunity { + id?: CommunityId + name?: string +} diff --git a/src/lib/client/types/schemas/GetCommunityResponse.ts b/src/lib/client/types/schemas/GetCommunityResponse.ts new file mode 100644 index 00000000..24890ccf --- /dev/null +++ b/src/lib/client/types/schemas/GetCommunityResponse.ts @@ -0,0 +1,10 @@ +import type { CommunityModeratorView } from './schemas' +import type { CommunityView } from './schemas' +import type { LanguageId } from './schemas' +import type { Site } from './schemas' +export interface GetCommunityResponse { + community_view: CommunityView + site?: Site + moderators: Array + discussion_languages: Array +} diff --git a/src/lib/client/types/schemas/GetFederatedInstancesResponse.ts b/src/lib/client/types/schemas/GetFederatedInstancesResponse.ts new file mode 100644 index 00000000..72319e3c --- /dev/null +++ b/src/lib/client/types/schemas/GetFederatedInstancesResponse.ts @@ -0,0 +1,4 @@ +import type { FederatedInstances } from './schemas' +export interface GetFederatedInstancesResponse { + federated_instances?: FederatedInstances +} diff --git a/src/lib/client/types/schemas/GetModlog.ts b/src/lib/client/types/schemas/GetModlog.ts new file mode 100644 index 00000000..115caae4 --- /dev/null +++ b/src/lib/client/types/schemas/GetModlog.ts @@ -0,0 +1,15 @@ +import type { CommentId } from './schemas' +import type { CommunityId } from './schemas' +import type { ModlogActionType } from './schemas' +import type { PersonId } from './schemas' +import type { PostId } from './schemas' +export interface GetModlog { + mod_person_id?: PersonId + community_id?: CommunityId + page?: number + limit?: number + type_?: ModlogActionType + other_person_id?: PersonId + post_id?: PostId + comment_id?: CommentId +} diff --git a/src/lib/client/types/schemas/GetModlogResponse.ts b/src/lib/client/types/schemas/GetModlogResponse.ts new file mode 100644 index 00000000..953c1024 --- /dev/null +++ b/src/lib/client/types/schemas/GetModlogResponse.ts @@ -0,0 +1,32 @@ +import type { AdminPurgeCommentView } from './schemas' +import type { AdminPurgeCommunityView } from './schemas' +import type { AdminPurgePersonView } from './schemas' +import type { AdminPurgePostView } from './schemas' +import type { ModAddCommunityView } from './schemas' +import type { ModAddView } from './schemas' +import type { ModBanFromCommunityView } from './schemas' +import type { ModBanView } from './schemas' +import type { ModFeaturePostView } from './schemas' +import type { ModHideCommunityView } from './schemas' +import type { ModLockPostView } from './schemas' +import type { ModRemoveCommentView } from './schemas' +import type { ModRemoveCommunityView } from './schemas' +import type { ModRemovePostView } from './schemas' +import type { ModTransferCommunityView } from './schemas' +export interface GetModlogResponse { + removed_posts: Array + locked_posts: Array + featured_posts: Array + removed_comments: Array + removed_communities: Array + banned_from_community: Array + banned: Array + added_to_community: Array + transferred_to_community: Array + added: Array + admin_purged_persons: Array + admin_purged_communities: Array + admin_purged_posts: Array + admin_purged_comments: Array + hidden_communities: Array +} diff --git a/src/lib/client/types/schemas/GetPersonDetails.ts b/src/lib/client/types/schemas/GetPersonDetails.ts new file mode 100644 index 00000000..dc3cacef --- /dev/null +++ b/src/lib/client/types/schemas/GetPersonDetails.ts @@ -0,0 +1,12 @@ +import type { CommunityId } from './schemas' +import type { PersonId } from './schemas' +import type { SortType } from './schemas' +export interface GetPersonDetails { + person_id?: PersonId + username?: string + sort?: SortType + page?: number + limit?: number + community_id?: CommunityId + saved_only?: boolean +} diff --git a/src/lib/client/types/schemas/GetPersonDetailsResponse.ts b/src/lib/client/types/schemas/GetPersonDetailsResponse.ts new file mode 100644 index 00000000..21d9dfb9 --- /dev/null +++ b/src/lib/client/types/schemas/GetPersonDetailsResponse.ts @@ -0,0 +1,12 @@ +import type { CommentView } from './schemas' +import type { CommunityModeratorView } from './schemas' +import type { PersonView } from './schemas' +import type { PostView } from './schemas' +import type { Site } from './schemas' +export interface GetPersonDetailsResponse { + person_view: PersonView + site?: Site + comments: Array + posts: Array + moderates: Array +} diff --git a/src/lib/client/types/schemas/GetPersonMentions.ts b/src/lib/client/types/schemas/GetPersonMentions.ts new file mode 100644 index 00000000..20c1620b --- /dev/null +++ b/src/lib/client/types/schemas/GetPersonMentions.ts @@ -0,0 +1,7 @@ +import type { CommentSortType } from './schemas' +export interface GetPersonMentions { + sort?: CommentSortType + page?: number + limit?: number + unread_only?: boolean +} diff --git a/src/lib/client/types/schemas/GetPersonMentionsResponse.ts b/src/lib/client/types/schemas/GetPersonMentionsResponse.ts new file mode 100644 index 00000000..be644a7d --- /dev/null +++ b/src/lib/client/types/schemas/GetPersonMentionsResponse.ts @@ -0,0 +1,4 @@ +import type { PersonMentionView } from './schemas' +export interface GetPersonMentionsResponse { + mentions: Array +} diff --git a/src/lib/client/types/schemas/GetPost.ts b/src/lib/client/types/schemas/GetPost.ts new file mode 100644 index 00000000..cbf0190c --- /dev/null +++ b/src/lib/client/types/schemas/GetPost.ts @@ -0,0 +1,6 @@ +import type { CommentId } from './schemas' +import type { PostId } from './schemas' +export interface GetPost { + id?: PostId + comment_id?: CommentId +} diff --git a/src/lib/client/types/schemas/GetPostResponse.ts b/src/lib/client/types/schemas/GetPostResponse.ts new file mode 100644 index 00000000..5e7b8e97 --- /dev/null +++ b/src/lib/client/types/schemas/GetPostResponse.ts @@ -0,0 +1,9 @@ +import type { CommunityModeratorView } from './schemas' +import type { CommunityView } from './schemas' +import type { PostView } from './schemas' +export interface GetPostResponse { + post_view: PostView + community_view: CommunityView + moderators: Array + cross_posts: Array +} diff --git a/src/lib/client/types/schemas/GetPosts.ts b/src/lib/client/types/schemas/GetPosts.ts new file mode 100644 index 00000000..c60808a0 --- /dev/null +++ b/src/lib/client/types/schemas/GetPosts.ts @@ -0,0 +1,19 @@ +import type { CommunityId } from './schemas' +import type { ListingType } from './schemas' +import type { PaginationCursor } from './schemas' +import type { SortType } from './schemas' +export interface GetPosts { + type_?: ListingType + sort?: SortType + page?: number + limit?: number + community_id?: CommunityId + community_name?: string + saved_only?: boolean + liked_only?: boolean + disliked_only?: boolean + show_hidden?: boolean + show_read?: boolean + show_nsfw?: boolean + page_cursor?: PaginationCursor +} diff --git a/src/lib/client/types/schemas/GetPostsResponse.ts b/src/lib/client/types/schemas/GetPostsResponse.ts new file mode 100644 index 00000000..d055fb80 --- /dev/null +++ b/src/lib/client/types/schemas/GetPostsResponse.ts @@ -0,0 +1,6 @@ +import type { PaginationCursor } from './schemas' +import type { PostView } from './schemas' +export interface GetPostsResponse { + posts: Array + next_page?: PaginationCursor +} diff --git a/src/lib/client/types/schemas/GetPrivateMessages.ts b/src/lib/client/types/schemas/GetPrivateMessages.ts new file mode 100644 index 00000000..28af2df3 --- /dev/null +++ b/src/lib/client/types/schemas/GetPrivateMessages.ts @@ -0,0 +1,7 @@ +import type { PersonId } from './schemas' +export interface GetPrivateMessages { + unread_only?: boolean + page?: number + limit?: number + creator_id?: PersonId +} diff --git a/src/lib/client/types/schemas/GetRegistrationApplication.ts b/src/lib/client/types/schemas/GetRegistrationApplication.ts new file mode 100644 index 00000000..3584cce6 --- /dev/null +++ b/src/lib/client/types/schemas/GetRegistrationApplication.ts @@ -0,0 +1,4 @@ +import type { PersonId } from './schemas' +export interface GetRegistrationApplication { + person_id: PersonId +} diff --git a/src/lib/client/types/schemas/GetReplies.ts b/src/lib/client/types/schemas/GetReplies.ts new file mode 100644 index 00000000..b544804f --- /dev/null +++ b/src/lib/client/types/schemas/GetReplies.ts @@ -0,0 +1,7 @@ +import type { CommentSortType } from './schemas' +export interface GetReplies { + sort?: CommentSortType + page?: number + limit?: number + unread_only?: boolean +} diff --git a/src/lib/client/types/schemas/GetRepliesResponse.ts b/src/lib/client/types/schemas/GetRepliesResponse.ts new file mode 100644 index 00000000..3eb5a004 --- /dev/null +++ b/src/lib/client/types/schemas/GetRepliesResponse.ts @@ -0,0 +1,4 @@ +import type { CommentReplyView } from './schemas' +export interface GetRepliesResponse { + replies: Array +} diff --git a/src/lib/client/types/schemas/GetReportCount.ts b/src/lib/client/types/schemas/GetReportCount.ts new file mode 100644 index 00000000..e1cfa6e5 --- /dev/null +++ b/src/lib/client/types/schemas/GetReportCount.ts @@ -0,0 +1,4 @@ +import type { CommunityId } from './schemas' +export interface GetReportCount { + community_id?: CommunityId +} diff --git a/src/lib/client/types/schemas/GetReportCountResponse.ts b/src/lib/client/types/schemas/GetReportCountResponse.ts new file mode 100644 index 00000000..eaf63ba3 --- /dev/null +++ b/src/lib/client/types/schemas/GetReportCountResponse.ts @@ -0,0 +1,7 @@ +import type { CommunityId } from './schemas' +export interface GetReportCountResponse { + community_id?: CommunityId + comment_reports: number + post_reports: number + private_message_reports?: number +} diff --git a/src/lib/client/types/payload/GetSiteMetadata.d.ts b/src/lib/client/types/schemas/GetSiteMetadata.ts similarity index 100% rename from src/lib/client/types/payload/GetSiteMetadata.d.ts rename to src/lib/client/types/schemas/GetSiteMetadata.ts diff --git a/src/lib/client/types/schemas/GetSiteMetadataResponse.ts b/src/lib/client/types/schemas/GetSiteMetadataResponse.ts new file mode 100644 index 00000000..6a42850c --- /dev/null +++ b/src/lib/client/types/schemas/GetSiteMetadataResponse.ts @@ -0,0 +1,4 @@ +import type { LinkMetadata } from './schemas' +export interface GetSiteMetadataResponse { + metadata: LinkMetadata +} diff --git a/src/lib/client/types/schemas/GetSiteResponse.ts b/src/lib/client/types/schemas/GetSiteResponse.ts new file mode 100644 index 00000000..3d2fe303 --- /dev/null +++ b/src/lib/client/types/schemas/GetSiteResponse.ts @@ -0,0 +1,22 @@ +import type { + CustomEmojiView, + Language, + LanguageId, + LocalSiteUrlBlocklist, + MyUserInfo, + PersonView, + SiteView, + Tagline, +} from '..' + +export interface GetSiteResponse { + site_view: SiteView + admins: Array + version: string + my_user?: MyUserInfo + all_languages: Array + discussion_languages: Array + taglines: Array + custom_emojis: Array + blocked_urls: Array +} diff --git a/src/lib/client/types/response/GetUnreadCountResponse.d.ts b/src/lib/client/types/schemas/GetUnreadCountResponse.ts similarity index 100% rename from src/lib/client/types/response/GetUnreadCountResponse.d.ts rename to src/lib/client/types/schemas/GetUnreadCountResponse.ts diff --git a/src/lib/client/types/response/GetUnreadRegistrationApplicationCountResponse.d.ts b/src/lib/client/types/schemas/GetUnreadRegistrationApplicationCountResponse.ts similarity index 100% rename from src/lib/client/types/response/GetUnreadRegistrationApplicationCountResponse.d.ts rename to src/lib/client/types/schemas/GetUnreadRegistrationApplicationCountResponse.ts diff --git a/src/lib/client/types/schemas/ListCommentLikesResponse.ts b/src/lib/client/types/schemas/ListCommentLikesResponse.ts new file mode 100644 index 00000000..e81f383b --- /dev/null +++ b/src/lib/client/types/schemas/ListCommentLikesResponse.ts @@ -0,0 +1,4 @@ +import type { VoteView } from './schemas' +export interface ListCommentLikesResponse { + comment_likes: Array +} diff --git a/src/lib/client/types/schemas/ListCommentReportsResponse.ts b/src/lib/client/types/schemas/ListCommentReportsResponse.ts new file mode 100644 index 00000000..6fa3d306 --- /dev/null +++ b/src/lib/client/types/schemas/ListCommentReportsResponse.ts @@ -0,0 +1,4 @@ +import type { CommentReportView } from './schemas' +export interface ListCommentReportsResponse { + comment_reports: Array +} diff --git a/src/lib/client/types/schemas/ListCommunitiesResponse.ts b/src/lib/client/types/schemas/ListCommunitiesResponse.ts new file mode 100644 index 00000000..8ae06ac1 --- /dev/null +++ b/src/lib/client/types/schemas/ListCommunitiesResponse.ts @@ -0,0 +1,4 @@ +import type { CommunityView } from './schemas' +export interface ListCommunitiesResponse { + communities: Array +} diff --git a/src/lib/client/types/schemas/ListMediaResponse.ts b/src/lib/client/types/schemas/ListMediaResponse.ts new file mode 100644 index 00000000..43e5ae3f --- /dev/null +++ b/src/lib/client/types/schemas/ListMediaResponse.ts @@ -0,0 +1,4 @@ +import type { LocalImageView } from './schemas' +export interface ListMediaResponse { + images: Array +} diff --git a/src/lib/client/types/schemas/ListPostLikesResponse.ts b/src/lib/client/types/schemas/ListPostLikesResponse.ts new file mode 100644 index 00000000..9507d0fb --- /dev/null +++ b/src/lib/client/types/schemas/ListPostLikesResponse.ts @@ -0,0 +1,4 @@ +import type { VoteView } from './schemas' +export interface ListPostLikesResponse { + post_likes: Array +} diff --git a/src/lib/client/types/schemas/ListPostReportsResponse.ts b/src/lib/client/types/schemas/ListPostReportsResponse.ts new file mode 100644 index 00000000..5d988fa9 --- /dev/null +++ b/src/lib/client/types/schemas/ListPostReportsResponse.ts @@ -0,0 +1,4 @@ +import type { PostReportView } from './schemas' +export interface ListPostReportsResponse { + post_reports: Array +} diff --git a/src/lib/client/types/schemas/ListPrivateMessageReportsResponse.ts b/src/lib/client/types/schemas/ListPrivateMessageReportsResponse.ts new file mode 100644 index 00000000..9121c5e5 --- /dev/null +++ b/src/lib/client/types/schemas/ListPrivateMessageReportsResponse.ts @@ -0,0 +1,4 @@ +import type { PrivateMessageReportView } from './schemas' +export interface ListPrivateMessageReportsResponse { + private_message_reports: Array +} diff --git a/src/lib/client/types/schemas/ListRegistrationApplicationsResponse.ts b/src/lib/client/types/schemas/ListRegistrationApplicationsResponse.ts new file mode 100644 index 00000000..20b30515 --- /dev/null +++ b/src/lib/client/types/schemas/ListRegistrationApplicationsResponse.ts @@ -0,0 +1,4 @@ +import type { RegistrationApplicationView } from './schemas' +export interface ListRegistrationApplicationsResponse { + registration_applications: Array +} diff --git a/src/lib/client/types/response/LoginResponse.d.ts b/src/lib/client/types/schemas/LoginResponse.ts similarity index 100% rename from src/lib/client/types/response/LoginResponse.d.ts rename to src/lib/client/types/schemas/LoginResponse.ts diff --git a/src/lib/client/types/schemas/PersonMentionResponse.ts b/src/lib/client/types/schemas/PersonMentionResponse.ts new file mode 100644 index 00000000..8943357b --- /dev/null +++ b/src/lib/client/types/schemas/PersonMentionResponse.ts @@ -0,0 +1,4 @@ +import type { PersonMentionView } from './schemas' +export interface PersonMentionResponse { + person_mention_view: PersonMentionView +} diff --git a/src/lib/client/types/schemas/PostReportResponse.ts b/src/lib/client/types/schemas/PostReportResponse.ts new file mode 100644 index 00000000..9b6e6f0e --- /dev/null +++ b/src/lib/client/types/schemas/PostReportResponse.ts @@ -0,0 +1,4 @@ +import type { PostReportView } from './schemas' +export interface PostReportResponse { + post_report_view: PostReportView +} diff --git a/src/lib/client/types/schemas/PostResponse.ts b/src/lib/client/types/schemas/PostResponse.ts new file mode 100644 index 00000000..67536631 --- /dev/null +++ b/src/lib/client/types/schemas/PostResponse.ts @@ -0,0 +1,4 @@ +import type { PostView } from './schemas' +export interface PostResponse { + post_view: PostView +} diff --git a/src/lib/client/types/schemas/PrivateMessageReportResponse.ts b/src/lib/client/types/schemas/PrivateMessageReportResponse.ts new file mode 100644 index 00000000..0898c8ed --- /dev/null +++ b/src/lib/client/types/schemas/PrivateMessageReportResponse.ts @@ -0,0 +1,4 @@ +import type { PrivateMessageReportView } from './schemas' +export interface PrivateMessageReportResponse { + private_message_report_view: PrivateMessageReportView +} diff --git a/src/lib/client/types/schemas/PrivateMessageResponse.ts b/src/lib/client/types/schemas/PrivateMessageResponse.ts new file mode 100644 index 00000000..30051909 --- /dev/null +++ b/src/lib/client/types/schemas/PrivateMessageResponse.ts @@ -0,0 +1,4 @@ +import type { PrivateMessageView } from './schemas' +export interface PrivateMessageResponse { + private_message_view: PrivateMessageView +} diff --git a/src/lib/client/types/schemas/PrivateMessagesResponse.ts b/src/lib/client/types/schemas/PrivateMessagesResponse.ts new file mode 100644 index 00000000..3fae981a --- /dev/null +++ b/src/lib/client/types/schemas/PrivateMessagesResponse.ts @@ -0,0 +1,4 @@ +import type { PrivateMessageView } from './schemas' +export interface PrivateMessagesResponse { + private_messages: Array +} diff --git a/src/lib/client/types/schemas/RegistrationApplicationResponse.ts b/src/lib/client/types/schemas/RegistrationApplicationResponse.ts new file mode 100644 index 00000000..cbba5a1f --- /dev/null +++ b/src/lib/client/types/schemas/RegistrationApplicationResponse.ts @@ -0,0 +1,4 @@ +import type { RegistrationApplicationView } from './schemas' +export interface RegistrationApplicationResponse { + registration_application: RegistrationApplicationView +} diff --git a/src/lib/client/types/schemas/ResolveObjectResponse.ts b/src/lib/client/types/schemas/ResolveObjectResponse.ts new file mode 100644 index 00000000..8d09d4ca --- /dev/null +++ b/src/lib/client/types/schemas/ResolveObjectResponse.ts @@ -0,0 +1,6 @@ +export interface ResolveObjectResponse { + comment?: CommentView + post?: PostView + community?: CommunityView + person?: PersonView +} diff --git a/src/lib/client/types/schemas/SearchResponse.ts b/src/lib/client/types/schemas/SearchResponse.ts new file mode 100644 index 00000000..7249b2d2 --- /dev/null +++ b/src/lib/client/types/schemas/SearchResponse.ts @@ -0,0 +1,12 @@ +import type { CommentView } from './schemas' +import type { CommunityView } from './schemas' +import type { PersonView } from './schemas' +import type { PostView } from './schemas' +import type { SearchType } from './schemas' +export interface SearchResponse { + type_: SearchType + comments: Array + posts: Array + communities: Array + users: Array +} diff --git a/src/lib/client/types/schemas/SiteResponse.ts b/src/lib/client/types/schemas/SiteResponse.ts new file mode 100644 index 00000000..675c1efe --- /dev/null +++ b/src/lib/client/types/schemas/SiteResponse.ts @@ -0,0 +1,6 @@ +import type { SiteView } from './schemas' +import type { Tagline } from './schemas' +export interface SiteResponse { + site_view: SiteView + taglines: Array +} diff --git a/src/lib/client/types/response/SuccessResponse.d.ts b/src/lib/client/types/schemas/SuccessResponse.ts similarity index 100% rename from src/lib/client/types/response/SuccessResponse.d.ts rename to src/lib/client/types/schemas/SuccessResponse.ts diff --git a/src/lib/client/types/response/UpdateTotpResponse.d.ts b/src/lib/client/types/schemas/UpdateTotpResponse.ts similarity index 100% rename from src/lib/client/types/response/UpdateTotpResponse.d.ts rename to src/lib/client/types/schemas/UpdateTotpResponse.ts diff --git a/src/lib/client/types/schemas.ts b/src/lib/client/types/schemas/schemas.ts similarity index 96% rename from src/lib/client/types/schemas.ts rename to src/lib/client/types/schemas/schemas.ts index c21678bd..cd0cf68c 100644 --- a/src/lib/client/types/schemas.ts +++ b/src/lib/client/types/schemas/schemas.ts @@ -1130,7 +1130,12 @@ export interface ListCommunities { page?: number limit?: number } -export type ListingType = 'All' | 'Local' | 'Subscribed' | 'ModeratorView' +export type ListingType = + | 'All' + | 'Local' + | 'Subscribed' + | 'ModeratorView' + | 'Popular' export interface ListMedia { page?: number limit?: number @@ -1173,32 +1178,32 @@ export interface LocalImageView { } export interface LocalSite { - id: LocalSiteId - site_id: SiteId - site_setup: boolean - enable_downvotes: boolean - enable_nsfw: boolean - community_creation_admin_only: boolean - require_email_verification: boolean + id?: LocalSiteId + site_id?: SiteId + site_setup?: boolean + enable_downvotes?: boolean + enable_nsfw?: boolean + community_creation_admin_only?: boolean + require_email_verification?: boolean application_question?: string - private_instance: boolean - default_theme: string - default_post_listing_type: ListingType + private_instance?: boolean + default_theme?: string + default_post_listing_type?: ListingType legal_information?: string - hide_modlog_mod_names: boolean - application_email_admins: boolean + hide_modlog_mod_names?: boolean + application_email_admins?: boolean slur_filter_regex?: string - actor_name_max_length: number - federation_enabled: boolean - captcha_enabled: boolean - captcha_difficulty: string - published: string + actor_name_max_length?: number + federation_enabled?: boolean + captcha_enabled?: boolean + captcha_difficulty?: string + published?: string updated?: string - registration_mode: RegistrationMode - reports_email_admins: boolean - federation_signed_fetch: boolean - default_post_listing_mode: PostListingMode - default_sort_type: SortType + registration_mode?: RegistrationMode + reports_email_admins?: boolean + federation_signed_fetch?: boolean + default_post_listing_mode?: PostListingMode + default_sort_type?: SortType } export type LocalSiteId = number @@ -1231,34 +1236,23 @@ export interface LocalUser { person_id: PersonId email?: string show_nsfw: boolean - theme: string default_sort_type: SortType default_listing_type: ListingType - interface_language: string - show_avatars: boolean - send_notifications_to_email: boolean - show_scores: boolean - show_bot_accounts: boolean - show_read_posts: boolean - email_verified: boolean - accepted_application: boolean - open_links_in_new_tab: boolean - blur_nsfw: boolean - auto_expand: boolean - infinite_scroll_enabled: boolean - admin: boolean - post_listing_mode: PostListingMode + interface_language?: string + show_avatars?: boolean + show_scores?: boolean + show_bot_accounts?: boolean + show_read_posts?: boolean + email_verified?: boolean + accepted_application?: boolean totp_2fa_enabled: boolean - enable_keyboard_navigation: boolean - enable_animated_images: boolean - collapse_bot_comments: boolean - last_donation_notification: string + last_donation_notification?: string } export type LocalUserId = number export interface LocalUserView { local_user: LocalUser - local_user_vote_display_mode: LocalUserVoteDisplayMode + local_user_vote_display_mode?: LocalUserVoteDisplayMode person: Person counts: PersonAggregates } @@ -1890,19 +1884,19 @@ export type SearchType = | 'Url' export interface Site { - id: SiteId + id?: SiteId name: string sidebar?: string - published: string + published?: string updated?: string icon?: string banner?: string description?: string actor_id: string - last_refreshed_at: string - inbox_url: string - public_key: string - instance_id: InstanceId + last_refreshed_at?: string + inbox_url?: string + public_key?: string + instance_id?: InstanceId content_warning?: string } @@ -1922,7 +1916,7 @@ export type SiteId = number export interface SiteView { site: Site local_site: LocalSite - local_site_rate_limit: LocalSiteRateLimit + local_site_rate_limit?: LocalSiteRateLimit counts: SiteAggregates } export type SortType = diff --git a/src/lib/components/lemmy/moderation/moderation.ts b/src/lib/components/lemmy/moderation/moderation.ts index 9834a70a..ba7d5515 100644 --- a/src/lib/components/lemmy/moderation/moderation.ts +++ b/src/lib/components/lemmy/moderation/moderation.ts @@ -1,14 +1,13 @@ import { client } from '$lib/client/lemmy.svelte' -import type { SubmissionView } from '$lib/lemmy/contentview.js' import type { - Comment, CommentView, Community, MyUserInfo, Person, PostView, PrivateMessageView, -} from 'lemmy-js-client' +} from '$lib/client/types' +import type { SubmissionView } from '$lib/lemmy/contentview.js' import { writable } from 'svelte/store' interface Modals { @@ -112,7 +111,7 @@ export const amMod = (me: MyUserInfo, community: Community) => export const amModOfAny = (me?: MyUserInfo) => me && (me.moderates.length > 0 || isAdmin(me)) -export const isAdmin = (me: MyUserInfo) => me.local_user_view.local_user.admin +export const isAdmin = (me: MyUserInfo) => me.local_user_view.person.admin export const removalTemplate = ( input: string, diff --git a/src/lib/components/ui/LabelStat.svelte b/src/lib/components/ui/LabelStat.svelte index 99e29706..deea569e 100644 --- a/src/lib/components/ui/LabelStat.svelte +++ b/src/lib/components/ui/LabelStat.svelte @@ -20,15 +20,17 @@ }: Props = $props() -

- - {label} - - - {#if formatted} - - {:else} - {content} - {/if} - -
+{#if content != '-1'} +
+ + {label} + + + {#if formatted} + + {:else} + {content} + {/if} + +
+{/if} diff --git a/src/lib/components/ui/sidebar/ProfileSelection.svelte b/src/lib/components/ui/sidebar/ProfileSelection.svelte index d13968d6..69c56ada 100644 --- a/src/lib/components/ui/sidebar/ProfileSelection.svelte +++ b/src/lib/components/ui/sidebar/ProfileSelection.svelte @@ -12,6 +12,7 @@ import { goto } from '$app/navigation' import { page } from '$app/state' import { t } from '$lib/i18n/translations' + import { DEFAULT_CLIENT_TYPE } from '$lib/client/lemmy.svelte' let { profiles }: { profiles: ProfileInfo[] } = $props() @@ -45,7 +46,7 @@
{profile.current.username}
- {profile.current.instance} + {profile.current.client?.name ?? DEFAULT_CLIENT_TYPE.name} • {profile.current.instance}
{#snippet suffix()} @@ -70,7 +71,7 @@
{p.username}
- {p.instance} + {p.client?.name ?? DEFAULT_CLIENT_TYPE.name} • {p.instance}
diff --git a/src/routes/accounts/+page.svelte b/src/routes/accounts/+page.svelte index fdb2335a..9aa36eaa 100644 --- a/src/routes/accounts/+page.svelte +++ b/src/routes/accounts/+page.svelte @@ -1,5 +1,6 @@