Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lemmy-js-client",
"description": "A javascript / typescript client for Lemmy",
"version": "1.0.0-search.4",
"version": "1.0.0-search-pagination.1",
"author": "Dessalines",
"license": "AGPL-3.0",
"main": "./dist/index.js",
Expand Down
16 changes: 8 additions & 8 deletions src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ import { LockComment } from "./types/LockComment";
import { Login } from "./types/Login";
import { LoginResponse } from "./types/LoginResponse";
import { MarkPostAsRead } from "./types/MarkPostAsRead";
import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
import { PasswordReset } from "./types/PasswordReset";
import { ChangePasswordAfterReset } from "./types/ChangePasswordAfterReset";
import { ResetPassword } from "./types/ResetPassword";
import { PostReportResponse } from "./types/PostReportResponse";
import { PostResponse } from "./types/PostResponse";
import { PrivateMessageReportResponse } from "./types/PrivateMessageReportResponse";
Expand Down Expand Up @@ -1898,11 +1898,11 @@ export class LemmyHttp extends LemmyController {
@Security("bearerAuth")
@Post("/account/auth/password_reset")
@Tags("Account")
async passwordReset(
@Body() form: PasswordReset,
async resetPassword(
@Body() form: ResetPassword,
@Inject() options?: RequestOptions,
) {
return this.wrapper<PasswordReset, SuccessResponse>(
return this.wrapper<ResetPassword, SuccessResponse>(
HttpType.Post,
"/account/auth/password_reset",
form,
Expand All @@ -1916,11 +1916,11 @@ export class LemmyHttp extends LemmyController {
@Security("bearerAuth")
@Post("/account/auth/password_change")
@Tags("Account")
async passwordChangeAfterReset(
@Body() form: PasswordChangeAfterReset,
async changePasswordAfterReset(
@Body() form: ChangePasswordAfterReset,
@Inject() options?: RequestOptions,
) {
return this.wrapper<PasswordChangeAfterReset, SuccessResponse>(
return this.wrapper<ChangePasswordAfterReset, SuccessResponse>(
HttpType.Post,
"/account/auth/password_change",
form,
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export { BlockCommunity } from "./types/BlockCommunity";
export { BlockPerson } from "./types/BlockPerson";
export { CaptchaResponse } from "./types/CaptchaResponse";
export { ChangePassword } from "./types/ChangePassword";
export { ChangePasswordAfterReset } from "./types/ChangePasswordAfterReset";
export { Comment } from "./types/Comment";
export { CommentActions } from "./types/CommentActions";
export { CommentId } from "./types/CommentId";
Expand Down Expand Up @@ -213,8 +214,6 @@ export { OAuthProviderId } from "./types/OAuthProviderId";
export { OpenGraphData } from "./types/OpenGraphData";
export { PagedResponse } from "./types/PagedResponse";
export { PaginationCursor } from "./types/PaginationCursor";
export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
export { PasswordReset } from "./types/PasswordReset";
export { PendingFollow } from "./types/PendingFollow";
export { PendingFollowerView } from "./types/PendingFollowerView";
export { Person } from "./types/Person";
Expand Down Expand Up @@ -266,6 +265,7 @@ export { RemovePost } from "./types/RemovePost";
export { ReportCombinedView } from "./types/ReportCombinedView";
export { ReportType } from "./types/ReportType";
export { ResendVerificationEmail } from "./types/ResendVerificationEmail";
export { ResetPassword } from "./types/ResetPassword";
export { ResolveCommentReport } from "./types/ResolveCommentReport";
export { ResolveCommunityReport } from "./types/ResolveCommunityReport";
export { ResolveObject } from "./types/ResolveObject";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { SensitiveString } from "./SensitiveString";
/**
* Change your password after receiving a reset request.
*/
export type PasswordChangeAfterReset = {
export type ChangePasswordAfterReset = {
token: SensitiveString;
password: SensitiveString;
password_verify: SensitiveString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import type { SensitiveString } from "./SensitiveString";
/**
* Reset your password via email.
*/
export type PasswordReset = { email: SensitiveString };
export type ResetPassword = { email: SensitiveString };
1 change: 1 addition & 0 deletions src/types/Search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ export type Search = {
* If true, then show the nsfw posts (even if your user setting is to hide them)
*/
show_nsfw?: boolean;
page_cursor?: string;
limit?: number;
};
2 changes: 2 additions & 0 deletions src/types/SearchResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ export type SearchResponse = {
communities: Array<CommunityView>;
persons: Array<PersonView>;
multi_communities: Array<MultiCommunityView>;
prev_page?: string;
next_page?: string;
};