diff --git a/package.json b/package.json index e7cef42..b4ad899 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lemmy-js-client", "description": "A javascript / typescript client for Lemmy", - "version": "0.20.0-instance-blocks.5", + "version": "0.20.0-pkce.1", "author": "Dessalines ", "license": "AGPL-3.0", "main": "./dist/index.js", diff --git a/src/types/AuthenticateWithOauth.ts b/src/types/AuthenticateWithOauth.ts index 862017f..bc8585b 100644 --- a/src/types/AuthenticateWithOauth.ts +++ b/src/types/AuthenticateWithOauth.ts @@ -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; diff --git a/src/types/CommentAggregates.ts b/src/types/CommentAggregates.ts index f25ba70..5938cf3 100644 --- a/src/types/CommentAggregates.ts +++ b/src/types/CommentAggregates.ts @@ -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; }; diff --git a/src/types/CreateOAuthProvider.ts b/src/types/CreateOAuthProvider.ts index 9c9e17c..856bc4c 100644 --- a/src/types/CreateOAuthProvider.ts +++ b/src/types/CreateOAuthProvider.ts @@ -15,5 +15,6 @@ export type CreateOAuthProvider = { scopes: string; auto_verify_email?: boolean; account_linking_enabled?: boolean; + use_pkce?: boolean; enabled?: boolean; }; diff --git a/src/types/EditOAuthProvider.ts b/src/types/EditOAuthProvider.ts index 472e7f1..8642189 100644 --- a/src/types/EditOAuthProvider.ts +++ b/src/types/EditOAuthProvider.ts @@ -15,5 +15,6 @@ export type EditOAuthProvider = { scopes?: string; auto_verify_email?: boolean; account_linking_enabled?: boolean; + use_pkce?: boolean; enabled?: boolean; }; diff --git a/src/types/LemmyErrorType.ts b/src/types/LemmyErrorType.ts index eaf3cbf..32b9c9e 100644 --- a/src/types/LemmyErrorType.ts +++ b/src/types/LemmyErrorType.ts @@ -66,6 +66,7 @@ export type LemmyErrorType = | { 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" } diff --git a/src/types/OAuthProvider.ts b/src/types/OAuthProvider.ts index fb9cc3b..2716f82 100644 --- a/src/types/OAuthProvider.ts +++ b/src/types/OAuthProvider.ts @@ -58,4 +58,8 @@ export type OAuthProvider = { enabled: boolean; published: string; updated?: string; + /** + * switch to enable or disable PKCE + */ + use_pkce: boolean; }; diff --git a/src/types/PostAggregates.ts b/src/types/PostAggregates.ts index 850d694..ffb9dd5 100644 --- a/src/types/PostAggregates.ts +++ b/src/types/PostAggregates.ts @@ -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; };