mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-12-04 18:21:12 +00:00
Adding pkce settings.
This commit is contained in:
parent
c275eea006
commit
49986ebdfc
15 changed files with 46 additions and 4 deletions
|
@ -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";
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,4 +25,5 @@ export type FederationError =
|
||||||
| "InboxTimeout"
|
| "InboxTimeout"
|
||||||
| "CantDeleteSite"
|
| "CantDeleteSite"
|
||||||
| "ObjectIsNotPublic"
|
| "ObjectIsNotPublic"
|
||||||
| "ObjectIsNotPrivate";
|
| "ObjectIsNotPrivate"
|
||||||
|
| "Unreachable";
|
||||||
|
|
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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 };
|
||||||
|
|
|
@ -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" }
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
7
src/types/MarkManyPostsAsRead.ts
Normal file
7
src/types/MarkManyPostsAsRead.ts
Normal 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> };
|
|
@ -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 };
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue