Adding pkce settings. (#411)

* Adding pkce settings.

* 0.20.0-pkce.1
This commit is contained in:
Dessalines 2024-12-02 17:27:39 -05:00 committed by GitHub
parent efffc3c6e8
commit ba49f4ea72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 13 additions and 1 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "lemmy-js-client", "name": "lemmy-js-client",
"description": "A javascript / typescript client for Lemmy", "description": "A javascript / typescript client for Lemmy",
"version": "0.20.0-instance-blocks.5", "version": "0.20.0-pkce.1",
"author": "Dessalines <tyhou13@gmx.com>", "author": "Dessalines <tyhou13@gmx.com>",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "./dist/index.js", "main": "./dist/index.js",

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

@ -66,6 +66,7 @@ export type LemmyErrorType =
| { error: "invalid_email_address"; message: string } | { 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" }

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;
}; };