Merge remote-tracking branch 'origin/main' into api-v4

This commit is contained in:
Dessalines 2024-12-07 17:51:09 -05:00
commit f9a49723bb
10 changed files with 189 additions and 410 deletions

View file

@ -20,12 +20,14 @@ steps:
npm_publish:
image: node:alpine
environment:
NPM_TOKEN:
from_secret: npm_token
commands:
- *install_pnpm
- pnpm i
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
- echo "email = tyhou13@gmx.com" >> ~/.npmrc
- npm publish
secrets: [npm_token]
when:
- event: tag

View file

@ -1,7 +1,7 @@
{
"name": "lemmy-js-client",
"description": "A javascript / typescript client for Lemmy",
"version": "0.20.0-api-v4.16",
"version": "0.20.0-pkce.1",
"author": "Dessalines <tyhou13@gmx.com>",
"license": "AGPL-3.0",
"main": "./dist/index.js",
@ -31,11 +31,11 @@
"prettier-plugin-organize-imports": "^4.0.0",
"prettier-plugin-packagejson": "^2.5.1",
"sortpack": "^2.4.0",
"typedoc": "^0.26.5",
"typedoc": "^0.27.0",
"typescript": "^5.5.4",
"typescript-eslint": "^8.7.0"
},
"packageManager": "pnpm@9.14.2",
"packageManager": "pnpm@9.15.0",
"types": "./dist/index.d.ts",
"lint-staged": {
"*.{ts,tsx,js}": [

File diff suppressed because it is too large Load diff

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

@ -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" }

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