Adding pkce settings.

This commit is contained in:
Dessalines 2024-11-27 12:37:41 -05:00
parent c275eea006
commit 49986ebdfc
15 changed files with 46 additions and 4 deletions

View file

@ -179,6 +179,7 @@ export { Login } from "./types/Login";
export { LoginResponse } from "./types/LoginResponse";
export { LoginToken } from "./types/LoginToken";
export { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
export { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
export { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
export { MarkPostAsRead } from "./types/MarkPostAsRead";
export { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";

View file

@ -6,6 +6,7 @@ import type { OAuthProviderId } from "./OAuthProviderId";
*/
export type AuthenticateWithOauth = {
code: string;
pkce_code_verifier?: string;
oauth_provider_id: OAuthProviderId;
redirect_uri: string;
show_nsfw?: boolean;

View file

@ -14,4 +14,6 @@ export type CommentAggregates = {
* The total number of children in this comment branch.
*/
child_count: number;
report_count: number;
unresolved_report_count: number;
};

View file

@ -15,5 +15,6 @@ export type CreateOAuthProvider = {
scopes: string;
auto_verify_email?: boolean;
account_linking_enabled?: boolean;
use_pkce?: boolean;
enabled?: boolean;
};

View file

@ -15,5 +15,6 @@ export type EditOAuthProvider = {
scopes?: string;
auto_verify_email?: boolean;
account_linking_enabled?: boolean;
use_pkce?: boolean;
enabled?: boolean;
};

View file

@ -25,4 +25,5 @@ export type FederationError =
| "InboxTimeout"
| "CantDeleteSite"
| "ObjectIsNotPublic"
| "ObjectIsNotPrivate";
| "ObjectIsNotPrivate"
| "Unreachable";

View file

@ -29,6 +29,10 @@ export type GetPosts = {
* If true, then show the nsfw posts (even if your user setting is to hide them)
*/
show_nsfw?: boolean;
/**
* Whether to automatically mark fetched posts as read.
*/
mark_as_read?: boolean;
/**
* If true, then only show posts with no comments
*/

View file

@ -4,4 +4,4 @@ import type { PostId } from "./PostId";
/**
* Hide a post from list views
*/
export type HidePost = { post_ids: Array<PostId>; hide: boolean };
export type HidePost = { post_id: PostId; hide: boolean };

View file

@ -63,9 +63,10 @@ export type LemmyErrorType =
| { error: "no_email_setup" }
| { error: "local_site_not_setup" }
| { error: "email_smtp_server_needs_a_port" }
| { error: "missing_an_email" }
| { error: "invalid_email_address"; message: string }
| { error: "rate_limit_error" }
| { error: "invalid_name" }
| { error: "invalid_code_verifier" }
| { error: "invalid_display_name" }
| { error: "invalid_matrix_id" }
| { error: "invalid_post_title" }
@ -116,6 +117,7 @@ export type LemmyErrorType =
| { error: "invalid_regex" }
| { error: "captcha_incorrect" }
| { error: "couldnt_create_audio_captcha" }
| { error: "couldnt_create_image_captcha" }
| { error: "invalid_url_scheme" }
| { error: "couldnt_send_webmention" }
| { error: "contradicting_filters" }

View file

@ -73,9 +73,17 @@ export type LocalUser = {
* should be paused
*/
enable_animated_images: boolean;
/**
* Whether a user can send / receive private messages
*/
enable_private_messages: boolean;
/**
* Whether to auto-collapse bot comments.
*/
collapse_bot_comments: boolean;
default_comment_sort_type: CommentSortType;
/**
* Whether to automatically mark fetched posts as read.
*/
auto_mark_fetched_posts_as_read: boolean;
};

View file

@ -0,0 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PostId } from "./PostId";
/**
* Mark several posts as read.
*/
export type MarkManyPostsAsRead = { post_ids: Array<PostId> };

View file

@ -4,4 +4,4 @@ import type { PostId } from "./PostId";
/**
* Mark a post as read.
*/
export type MarkPostAsRead = { post_ids: Array<PostId>; read: boolean };
export type MarkPostAsRead = { post_id: PostId; read: boolean };

View file

@ -58,4 +58,8 @@ export type OAuthProvider = {
enabled: boolean;
published: string;
updated?: string;
/**
* switch to enable or disable PKCE
*/
use_pkce: boolean;
};

View file

@ -15,4 +15,6 @@ export type PostAggregates = {
* The time of the newest comment in the post.
*/
newest_comment_time: string;
report_count: number;
unresolved_report_count: number;
};

View file

@ -107,6 +107,10 @@ export type SaveUserSettings = {
* should be paused
*/
enable_animated_images?: boolean;
/**
* Whether a user can send / receive private messages
*/
enable_private_messages?: boolean;
/**
* Whether to auto-collapse bot comments.
*/
@ -118,4 +122,8 @@ export type SaveUserSettings = {
show_upvotes?: boolean;
show_downvotes?: boolean;
show_upvote_percentage?: boolean;
/**
* Whether to automatically mark fetched posts as read.
*/
auto_mark_fetched_posts_as_read?: boolean;
};