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 { LoginResponse } from "./types/LoginResponse";
export { LoginToken } from "./types/LoginToken"; export { LoginToken } from "./types/LoginToken";
export { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead"; export { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
export { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
export { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead"; export { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
export { MarkPostAsRead } from "./types/MarkPostAsRead"; export { MarkPostAsRead } from "./types/MarkPostAsRead";
export { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead"; export { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";

View file

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

View file

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

View file

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

View file

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

View file

@ -25,4 +25,5 @@ export type FederationError =
| "InboxTimeout" | "InboxTimeout"
| "CantDeleteSite" | "CantDeleteSite"
| "ObjectIsNotPublic" | "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) * If true, then show the nsfw posts (even if your user setting is to hide them)
*/ */
show_nsfw?: boolean; show_nsfw?: boolean;
/**
* Whether to automatically mark fetched posts as read.
*/
mark_as_read?: boolean;
/** /**
* If true, then only show posts with no comments * 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 * 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: "no_email_setup" }
| { error: "local_site_not_setup" } | { error: "local_site_not_setup" }
| { error: "email_smtp_server_needs_a_port" } | { error: "email_smtp_server_needs_a_port" }
| { error: "missing_an_email" } | { error: "invalid_email_address"; message: string }
| { error: "rate_limit_error" } | { error: "rate_limit_error" }
| { error: "invalid_name" } | { error: "invalid_name" }
| { error: "invalid_code_verifier" }
| { error: "invalid_display_name" } | { error: "invalid_display_name" }
| { error: "invalid_matrix_id" } | { error: "invalid_matrix_id" }
| { error: "invalid_post_title" } | { error: "invalid_post_title" }
@ -116,6 +117,7 @@ export type LemmyErrorType =
| { error: "invalid_regex" } | { error: "invalid_regex" }
| { error: "captcha_incorrect" } | { error: "captcha_incorrect" }
| { error: "couldnt_create_audio_captcha" } | { error: "couldnt_create_audio_captcha" }
| { error: "couldnt_create_image_captcha" }
| { error: "invalid_url_scheme" } | { error: "invalid_url_scheme" }
| { error: "couldnt_send_webmention" } | { error: "couldnt_send_webmention" }
| { error: "contradicting_filters" } | { error: "contradicting_filters" }

View file

@ -73,9 +73,17 @@ export type LocalUser = {
* should be paused * should be paused
*/ */
enable_animated_images: boolean; enable_animated_images: boolean;
/**
* Whether a user can send / receive private messages
*/
enable_private_messages: boolean;
/** /**
* Whether to auto-collapse bot comments. * Whether to auto-collapse bot comments.
*/ */
collapse_bot_comments: boolean; collapse_bot_comments: boolean;
default_comment_sort_type: CommentSortType; 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. * 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; enabled: boolean;
published: string; published: string;
updated?: 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. * The time of the newest comment in the post.
*/ */
newest_comment_time: string; newest_comment_time: string;
report_count: number;
unresolved_report_count: number;
}; };

View file

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