mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-12-14 23:11:26 +00:00
Merge remote-tracking branch 'origin/main' into combined_reports
This commit is contained in:
commit
e7957b4db3
6 changed files with 186 additions and 142 deletions
|
@ -20,12 +20,14 @@ steps:
|
||||||
|
|
||||||
npm_publish:
|
npm_publish:
|
||||||
image: node:alpine
|
image: node:alpine
|
||||||
|
environment:
|
||||||
|
NPM_TOKEN:
|
||||||
|
from_secret: npm_token
|
||||||
commands:
|
commands:
|
||||||
- *install_pnpm
|
- *install_pnpm
|
||||||
- pnpm i
|
- pnpm i
|
||||||
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
|
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
|
||||||
- echo "email = tyhou13@gmx.com" >> ~/.npmrc
|
- echo "email = tyhou13@gmx.com" >> ~/.npmrc
|
||||||
- npm publish
|
- npm publish
|
||||||
secrets: [npm_token]
|
|
||||||
when:
|
when:
|
||||||
- event: tag
|
- event: tag
|
||||||
|
|
|
@ -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-reports-combined.2",
|
"version": "0.20.0-api-v4.17",
|
||||||
"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",
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.5.4",
|
||||||
"typescript-eslint": "^8.7.0"
|
"typescript-eslint": "^8.7.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.14.4",
|
"packageManager": "pnpm@9.15.0",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{ts,tsx,js}": [
|
"*.{ts,tsx,js}": [
|
||||||
|
|
144
pnpm-lock.yaml
144
pnpm-lock.yaml
|
@ -13,16 +13,16 @@ importers:
|
||||||
version: 22.10.1
|
version: 22.10.1
|
||||||
'@typescript-eslint/eslint-plugin':
|
'@typescript-eslint/eslint-plugin':
|
||||||
specifier: ^8.7.0
|
specifier: ^8.7.0
|
||||||
version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)
|
version: 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)
|
||||||
'@typescript-eslint/parser':
|
'@typescript-eslint/parser':
|
||||||
specifier: ^8.7.0
|
specifier: ^8.7.0
|
||||||
version: 8.16.0(eslint@9.16.0)(typescript@5.7.2)
|
version: 8.17.0(eslint@9.16.0)(typescript@5.7.2)
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^9.11.1
|
specifier: ^9.11.1
|
||||||
version: 9.16.0
|
version: 9.16.0
|
||||||
eslint-plugin-prettier:
|
eslint-plugin-prettier:
|
||||||
specifier: ^5.2.1
|
specifier: ^5.2.1
|
||||||
version: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.1)
|
version: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.2)
|
||||||
husky:
|
husky:
|
||||||
specifier: ^9.1.4
|
specifier: ^9.1.4
|
||||||
version: 9.1.7
|
version: 9.1.7
|
||||||
|
@ -31,28 +31,28 @@ importers:
|
||||||
version: 15.2.10
|
version: 15.2.10
|
||||||
prettier:
|
prettier:
|
||||||
specifier: ^3.3.3
|
specifier: ^3.3.3
|
||||||
version: 3.4.1
|
version: 3.4.2
|
||||||
prettier-plugin-import-sort:
|
prettier-plugin-import-sort:
|
||||||
specifier: ^0.0.7
|
specifier: ^0.0.7
|
||||||
version: 0.0.7(prettier@3.4.1)
|
version: 0.0.7(prettier@3.4.2)
|
||||||
prettier-plugin-organize-imports:
|
prettier-plugin-organize-imports:
|
||||||
specifier: ^4.0.0
|
specifier: ^4.0.0
|
||||||
version: 4.1.0(prettier@3.4.1)(typescript@5.7.2)
|
version: 4.1.0(prettier@3.4.2)(typescript@5.7.2)
|
||||||
prettier-plugin-packagejson:
|
prettier-plugin-packagejson:
|
||||||
specifier: ^2.5.1
|
specifier: ^2.5.1
|
||||||
version: 2.5.6(prettier@3.4.1)
|
version: 2.5.6(prettier@3.4.2)
|
||||||
sortpack:
|
sortpack:
|
||||||
specifier: ^2.4.0
|
specifier: ^2.4.0
|
||||||
version: 2.4.0
|
version: 2.4.0
|
||||||
typedoc:
|
typedoc:
|
||||||
specifier: ^0.27.0
|
specifier: ^0.27.0
|
||||||
version: 0.27.2(typescript@5.7.2)
|
version: 0.27.3(typescript@5.7.2)
|
||||||
typescript:
|
typescript:
|
||||||
specifier: ^5.5.4
|
specifier: ^5.5.4
|
||||||
version: 5.7.2
|
version: 5.7.2
|
||||||
typescript-eslint:
|
typescript-eslint:
|
||||||
specifier: ^8.7.0
|
specifier: ^8.7.0
|
||||||
version: 8.16.0(eslint@9.16.0)(typescript@5.7.2)
|
version: 8.17.0(eslint@9.16.0)(typescript@5.7.2)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
|
@ -246,8 +246,8 @@ packages:
|
||||||
'@types/unist@3.0.3':
|
'@types/unist@3.0.3':
|
||||||
resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
|
resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
|
||||||
|
|
||||||
'@typescript-eslint/eslint-plugin@8.16.0':
|
'@typescript-eslint/eslint-plugin@8.17.0':
|
||||||
resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==}
|
resolution: {integrity: sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
|
'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
|
||||||
|
@ -257,8 +257,8 @@ packages:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@typescript-eslint/parser@8.16.0':
|
'@typescript-eslint/parser@8.17.0':
|
||||||
resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==}
|
resolution: {integrity: sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.57.0 || ^9.0.0
|
eslint: ^8.57.0 || ^9.0.0
|
||||||
|
@ -267,12 +267,12 @@ packages:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@typescript-eslint/scope-manager@8.16.0':
|
'@typescript-eslint/scope-manager@8.17.0':
|
||||||
resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==}
|
resolution: {integrity: sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@typescript-eslint/type-utils@8.16.0':
|
'@typescript-eslint/type-utils@8.17.0':
|
||||||
resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==}
|
resolution: {integrity: sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.57.0 || ^9.0.0
|
eslint: ^8.57.0 || ^9.0.0
|
||||||
|
@ -281,12 +281,12 @@ packages:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@typescript-eslint/types@8.16.0':
|
'@typescript-eslint/types@8.17.0':
|
||||||
resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==}
|
resolution: {integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@typescript-eslint/typescript-estree@8.16.0':
|
'@typescript-eslint/typescript-estree@8.17.0':
|
||||||
resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==}
|
resolution: {integrity: sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '*'
|
typescript: '*'
|
||||||
|
@ -294,8 +294,8 @@ packages:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@typescript-eslint/utils@8.16.0':
|
'@typescript-eslint/utils@8.17.0':
|
||||||
resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==}
|
resolution: {integrity: sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.57.0 || ^9.0.0
|
eslint: ^8.57.0 || ^9.0.0
|
||||||
|
@ -304,8 +304,8 @@ packages:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@typescript-eslint/visitor-keys@8.16.0':
|
'@typescript-eslint/visitor-keys@8.17.0':
|
||||||
resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==}
|
resolution: {integrity: sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
acorn-jsx@5.3.2:
|
acorn-jsx@5.3.2:
|
||||||
|
@ -988,8 +988,8 @@ packages:
|
||||||
prettier:
|
prettier:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
prettier@3.4.1:
|
prettier@3.4.2:
|
||||||
resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==}
|
resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
@ -1142,15 +1142,15 @@ packages:
|
||||||
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
|
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
|
||||||
engines: {node: '>= 0.8.0'}
|
engines: {node: '>= 0.8.0'}
|
||||||
|
|
||||||
typedoc@0.27.2:
|
typedoc@0.27.3:
|
||||||
resolution: {integrity: sha512-C2ima5TZJHU3ecnRIz50lKd1BsYck5LhYQIy7MRPmjuSEJreUEAt+uAVcZgY7wZsSORzEI7xW8miZIdxv/cbmw==}
|
resolution: {integrity: sha512-oWT7zDS5oIaxYL5yOikBX4cL99CpNAZn6mI24JZQxsYuIHbtguSSwJ7zThuzNNwSE0wqhlfTSd99HgqKu2aQXQ==}
|
||||||
engines: {node: '>= 18'}
|
engines: {node: '>= 18'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x
|
typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x
|
||||||
|
|
||||||
typescript-eslint@8.16.0:
|
typescript-eslint@8.17.0:
|
||||||
resolution: {integrity: sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ==}
|
resolution: {integrity: sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.57.0 || ^9.0.0
|
eslint: ^8.57.0 || ^9.0.0
|
||||||
|
@ -1448,14 +1448,14 @@ snapshots:
|
||||||
|
|
||||||
'@types/unist@3.0.3': {}
|
'@types/unist@3.0.3': {}
|
||||||
|
|
||||||
'@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)':
|
'@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/regexpp': 4.12.1
|
'@eslint-community/regexpp': 4.12.1
|
||||||
'@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2)
|
'@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@5.7.2)
|
||||||
'@typescript-eslint/scope-manager': 8.16.0
|
'@typescript-eslint/scope-manager': 8.17.0
|
||||||
'@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2)
|
'@typescript-eslint/type-utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2)
|
||||||
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2)
|
'@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2)
|
||||||
'@typescript-eslint/visitor-keys': 8.16.0
|
'@typescript-eslint/visitor-keys': 8.17.0
|
||||||
eslint: 9.16.0
|
eslint: 9.16.0
|
||||||
graphemer: 1.4.0
|
graphemer: 1.4.0
|
||||||
ignore: 5.3.2
|
ignore: 5.3.2
|
||||||
|
@ -1466,12 +1466,12 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2)':
|
'@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/scope-manager': 8.16.0
|
'@typescript-eslint/scope-manager': 8.17.0
|
||||||
'@typescript-eslint/types': 8.16.0
|
'@typescript-eslint/types': 8.17.0
|
||||||
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2)
|
'@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2)
|
||||||
'@typescript-eslint/visitor-keys': 8.16.0
|
'@typescript-eslint/visitor-keys': 8.17.0
|
||||||
debug: 4.3.7
|
debug: 4.3.7
|
||||||
eslint: 9.16.0
|
eslint: 9.16.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
@ -1479,15 +1479,15 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/scope-manager@8.16.0':
|
'@typescript-eslint/scope-manager@8.17.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 8.16.0
|
'@typescript-eslint/types': 8.17.0
|
||||||
'@typescript-eslint/visitor-keys': 8.16.0
|
'@typescript-eslint/visitor-keys': 8.17.0
|
||||||
|
|
||||||
'@typescript-eslint/type-utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)':
|
'@typescript-eslint/type-utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2)
|
'@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2)
|
||||||
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2)
|
'@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2)
|
||||||
debug: 4.3.7
|
debug: 4.3.7
|
||||||
eslint: 9.16.0
|
eslint: 9.16.0
|
||||||
ts-api-utils: 1.4.3(typescript@5.7.2)
|
ts-api-utils: 1.4.3(typescript@5.7.2)
|
||||||
|
@ -1496,12 +1496,12 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/types@8.16.0': {}
|
'@typescript-eslint/types@8.17.0': {}
|
||||||
|
|
||||||
'@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)':
|
'@typescript-eslint/typescript-estree@8.17.0(typescript@5.7.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 8.16.0
|
'@typescript-eslint/types': 8.17.0
|
||||||
'@typescript-eslint/visitor-keys': 8.16.0
|
'@typescript-eslint/visitor-keys': 8.17.0
|
||||||
debug: 4.3.7
|
debug: 4.3.7
|
||||||
fast-glob: 3.3.2
|
fast-glob: 3.3.2
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
|
@ -1513,21 +1513,21 @@ snapshots:
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)':
|
'@typescript-eslint/utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0)
|
'@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0)
|
||||||
'@typescript-eslint/scope-manager': 8.16.0
|
'@typescript-eslint/scope-manager': 8.17.0
|
||||||
'@typescript-eslint/types': 8.16.0
|
'@typescript-eslint/types': 8.17.0
|
||||||
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2)
|
'@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2)
|
||||||
eslint: 9.16.0
|
eslint: 9.16.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.7.2
|
typescript: 5.7.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@typescript-eslint/visitor-keys@8.16.0':
|
'@typescript-eslint/visitor-keys@8.17.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 8.16.0
|
'@typescript-eslint/types': 8.17.0
|
||||||
eslint-visitor-keys: 4.2.0
|
eslint-visitor-keys: 4.2.0
|
||||||
|
|
||||||
acorn-jsx@5.3.2(acorn@8.14.0):
|
acorn-jsx@5.3.2(acorn@8.14.0):
|
||||||
|
@ -1703,10 +1703,10 @@ snapshots:
|
||||||
eslint: 9.16.0
|
eslint: 9.16.0
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.1):
|
eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 9.16.0
|
eslint: 9.16.0
|
||||||
prettier: 3.4.1
|
prettier: 3.4.2
|
||||||
prettier-linter-helpers: 1.0.0
|
prettier-linter-helpers: 1.0.0
|
||||||
synckit: 0.9.1
|
synckit: 0.9.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
@ -2141,29 +2141,29 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-diff: 1.3.0
|
fast-diff: 1.3.0
|
||||||
|
|
||||||
prettier-plugin-import-sort@0.0.7(prettier@3.4.1):
|
prettier-plugin-import-sort@0.0.7(prettier@3.4.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
import-sort: 6.0.0
|
import-sort: 6.0.0
|
||||||
import-sort-config: 6.0.0
|
import-sort-config: 6.0.0
|
||||||
import-sort-parser-babylon: 6.0.0
|
import-sort-parser-babylon: 6.0.0
|
||||||
import-sort-parser-typescript: 6.0.0
|
import-sort-parser-typescript: 6.0.0
|
||||||
prettier: 3.4.1
|
prettier: 3.4.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
prettier-plugin-organize-imports@4.1.0(prettier@3.4.1)(typescript@5.7.2):
|
prettier-plugin-organize-imports@4.1.0(prettier@3.4.2)(typescript@5.7.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
prettier: 3.4.1
|
prettier: 3.4.2
|
||||||
typescript: 5.7.2
|
typescript: 5.7.2
|
||||||
|
|
||||||
prettier-plugin-packagejson@2.5.6(prettier@3.4.1):
|
prettier-plugin-packagejson@2.5.6(prettier@3.4.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
sort-package-json: 2.12.0
|
sort-package-json: 2.12.0
|
||||||
synckit: 0.9.2
|
synckit: 0.9.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
prettier: 3.4.1
|
prettier: 3.4.2
|
||||||
|
|
||||||
prettier@3.4.1: {}
|
prettier@3.4.2: {}
|
||||||
|
|
||||||
punycode.js@2.3.1: {}
|
punycode.js@2.3.1: {}
|
||||||
|
|
||||||
|
@ -2292,7 +2292,7 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
prelude-ls: 1.2.1
|
prelude-ls: 1.2.1
|
||||||
|
|
||||||
typedoc@0.27.2(typescript@5.7.2):
|
typedoc@0.27.3(typescript@5.7.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@gerrit0/mini-shiki': 1.24.1
|
'@gerrit0/mini-shiki': 1.24.1
|
||||||
lunr: 2.3.9
|
lunr: 2.3.9
|
||||||
|
@ -2301,11 +2301,11 @@ snapshots:
|
||||||
typescript: 5.7.2
|
typescript: 5.7.2
|
||||||
yaml: 2.6.1
|
yaml: 2.6.1
|
||||||
|
|
||||||
typescript-eslint@8.16.0(eslint@9.16.0)(typescript@5.7.2):
|
typescript-eslint@8.17.0(eslint@9.16.0)(typescript@5.7.2):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)
|
'@typescript-eslint/eslint-plugin': 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)
|
||||||
'@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2)
|
'@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@5.7.2)
|
||||||
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2)
|
'@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2)
|
||||||
eslint: 9.16.0
|
eslint: 9.16.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.7.2
|
typescript: 5.7.2
|
||||||
|
|
172
src/http.ts
172
src/http.ts
|
@ -5,6 +5,7 @@ import { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
|
||||||
import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
|
import { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
|
||||||
import { BanFromCommunity } from "./types/BanFromCommunity";
|
import { BanFromCommunity } from "./types/BanFromCommunity";
|
||||||
import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
|
import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
|
||||||
|
import { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
|
||||||
import { BanPerson } from "./types/BanPerson";
|
import { BanPerson } from "./types/BanPerson";
|
||||||
import { BanPersonResponse } from "./types/BanPersonResponse";
|
import { BanPersonResponse } from "./types/BanPersonResponse";
|
||||||
import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
||||||
|
@ -154,6 +155,7 @@ import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows
|
||||||
import { CommunityId } from "./types/CommunityId";
|
import { CommunityId } from "./types/CommunityId";
|
||||||
import { ListReports } from "./types/ListReports";
|
import { ListReports } from "./types/ListReports";
|
||||||
import { ListReportsResponse } from "./types/ListReportsResponse";
|
import { ListReportsResponse } from "./types/ListReportsResponse";
|
||||||
|
import { MyUserInfo } from "./types/MyUserInfo";
|
||||||
import { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
import { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
||||||
import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
||||||
import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
||||||
|
@ -243,12 +245,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Leave the Site admins.
|
* Leave the Site admins.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/leave_admin`
|
* `HTTP.POST /admin/leave`
|
||||||
*/
|
*/
|
||||||
leaveAdmin(options?: RequestOptions) {
|
leaveAdmin(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetSiteResponse>(
|
return this.#wrapper<object, GetSiteResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/leave_admin",
|
"/admin/leave",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -257,14 +259,28 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Generate a TOTP / two-factor secret.
|
* Generate a TOTP / two-factor secret.
|
||||||
*
|
*
|
||||||
* Afterwards you need to call `/user/totp/update` with a valid token to enable it.
|
* Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/totp/generate`
|
* `HTTP.POST /account/auth/totp/generate`
|
||||||
*/
|
*/
|
||||||
generateTotpSecret(options?: RequestOptions) {
|
generateTotpSecret(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GenerateTotpSecretResponse>(
|
return this.#wrapper<object, GenerateTotpSecretResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/totp/generate",
|
"/account/auth/totp/generate",
|
||||||
|
{},
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get data of current user.
|
||||||
|
*
|
||||||
|
* `HTTP.GET /account`
|
||||||
|
*/
|
||||||
|
getMyUser(options?: RequestOptions) {
|
||||||
|
return this.#wrapper<object, MyUserInfo>(
|
||||||
|
HttpType.Get,
|
||||||
|
"/account",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -274,12 +290,12 @@ export class LemmyHttp {
|
||||||
* Export a backup of your user settings, including your saved content,
|
* Export a backup of your user settings, including your saved content,
|
||||||
* followed communities, and blocks.
|
* followed communities, and blocks.
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user/export_settings`
|
* `HTTP.GET /account/settings/export`
|
||||||
*/
|
*/
|
||||||
exportSettings(options?: RequestOptions) {
|
exportSettings(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, string>(
|
return this.#wrapper<object, string>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user/export_settings",
|
"/account/settings/export",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -288,12 +304,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Import a backup of your user settings.
|
* Import a backup of your user settings.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/import_settings`
|
* `HTTP.POST /account/settings/import`
|
||||||
*/
|
*/
|
||||||
importSettings(form: any, options?: RequestOptions) {
|
importSettings(form: any, options?: RequestOptions) {
|
||||||
return this.#wrapper<object, SuccessResponse>(
|
return this.#wrapper<object, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/import_settings",
|
"/account/settings/import",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -302,12 +318,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* List login tokens for your user
|
* List login tokens for your user
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user/list_logins`
|
* `HTTP.GET /account/list_logins`
|
||||||
*/
|
*/
|
||||||
listLogins(options?: RequestOptions) {
|
listLogins(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, LoginToken[]>(
|
return this.#wrapper<object, LoginToken[]>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user/list_logins",
|
"/account/list_logins",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -316,12 +332,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Returns an error message if your auth token is invalid
|
* Returns an error message if your auth token is invalid
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user/validate_auth`
|
* `HTTP.GET /account/validate_auth`
|
||||||
*/
|
*/
|
||||||
validateAuth(options?: RequestOptions) {
|
validateAuth(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, SuccessResponse>(
|
return this.#wrapper<object, SuccessResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user/validate_auth",
|
"/account/validate_auth",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -358,16 +374,16 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Enable / Disable TOTP / two-factor authentication.
|
* Enable / Disable TOTP / two-factor authentication.
|
||||||
*
|
*
|
||||||
* To enable, you need to first call `/user/totp/generate` and then pass a valid token to this.
|
* To enable, you need to first call `/account/auth/totp/generate` and then pass a valid token to this.
|
||||||
*
|
*
|
||||||
* Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
|
* Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/totp/update`
|
* `HTTP.POST /account/auth/totp/update`
|
||||||
*/
|
*/
|
||||||
updateTotp(form: UpdateTotp, options?: RequestOptions) {
|
updateTotp(form: UpdateTotp, options?: RequestOptions) {
|
||||||
return this.#wrapper<UpdateTotp, UpdateTotpResponse>(
|
return this.#wrapper<UpdateTotp, UpdateTotpResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/totp/update",
|
"/account/auth/totp/update",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -521,12 +537,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Block a community.
|
* Block a community.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /community/block`
|
* `HTTP.POST /account/block/community`
|
||||||
*/
|
*/
|
||||||
blockCommunity(form: BlockCommunity, options?: RequestOptions) {
|
blockCommunity(form: BlockCommunity, options?: RequestOptions) {
|
||||||
return this.#wrapper<BlockCommunity, BlockCommunityResponse>(
|
return this.#wrapper<BlockCommunity, BlockCommunityResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/community/block",
|
"/account/block/community",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -714,6 +730,20 @@ export class LemmyHttp {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark multiple posts as read.
|
||||||
|
*
|
||||||
|
* `HTTP.POST /post/mark_as_read/many`
|
||||||
|
*/
|
||||||
|
markManyPostAsRead(form: MarkManyPostsAsRead, options?: RequestOptions) {
|
||||||
|
return this.#wrapper<MarkManyPostsAsRead, SuccessResponse>(
|
||||||
|
HttpType.Post,
|
||||||
|
"/post/mark_as_read/many",
|
||||||
|
form,
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide a post from list views.
|
* Hide a post from list views.
|
||||||
*
|
*
|
||||||
|
@ -1145,12 +1175,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Register a new user.
|
* Register a new user.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/register`
|
* `HTTP.POST /account/auth/register`
|
||||||
*/
|
*/
|
||||||
register(form: Register, options?: RequestOptions) {
|
register(form: Register, options?: RequestOptions) {
|
||||||
return this.#wrapper<Register, LoginResponse>(
|
return this.#wrapper<Register, LoginResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/register",
|
"/account/auth/register",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1159,12 +1189,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Log into lemmy.
|
* Log into lemmy.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/login`
|
* `HTTP.POST /account/auth/login`
|
||||||
*/
|
*/
|
||||||
login(form: Login, options?: RequestOptions) {
|
login(form: Login, options?: RequestOptions) {
|
||||||
return this.#wrapper<Login, LoginResponse>(
|
return this.#wrapper<Login, LoginResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/login",
|
"/account/auth/login",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1173,12 +1203,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Invalidate the currently used auth token.
|
* Invalidate the currently used auth token.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/logout`
|
* `HTTP.POST /account/auth/logout`
|
||||||
*/
|
*/
|
||||||
logout(options?: RequestOptions) {
|
logout(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, SuccessResponse>(
|
return this.#wrapper<object, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/logout",
|
"/account/auth/logout",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1187,12 +1217,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Get the details for a person.
|
* Get the details for a person.
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user`
|
* `HTTP.GET /person`
|
||||||
*/
|
*/
|
||||||
getPersonDetails(form: GetPersonDetails = {}, options?: RequestOptions) {
|
getPersonDetails(form: GetPersonDetails = {}, options?: RequestOptions) {
|
||||||
return this.#wrapper<GetPersonDetails, GetPersonDetailsResponse>(
|
return this.#wrapper<GetPersonDetails, GetPersonDetailsResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user",
|
"/person",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1201,12 +1231,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Get mentions for your user.
|
* Get mentions for your user.
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user/mention`
|
* `HTTP.GET /account/mention`
|
||||||
*/
|
*/
|
||||||
getPersonMentions(form: GetPersonMentions, options?: RequestOptions) {
|
getPersonMentions(form: GetPersonMentions, options?: RequestOptions) {
|
||||||
return this.#wrapper<GetPersonMentions, GetPersonMentionsResponse>(
|
return this.#wrapper<GetPersonMentions, GetPersonMentionsResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user/mention",
|
"/account/mention",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1215,7 +1245,7 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Mark a person mention as read.
|
* Mark a person mention as read.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/mention/mark_as_read`
|
* `HTTP.POST /account/mention/mark_as_read`
|
||||||
*/
|
*/
|
||||||
markPersonMentionAsRead(
|
markPersonMentionAsRead(
|
||||||
form: MarkPersonMentionAsRead,
|
form: MarkPersonMentionAsRead,
|
||||||
|
@ -1223,21 +1253,35 @@ export class LemmyHttp {
|
||||||
) {
|
) {
|
||||||
return this.#wrapper<MarkPersonMentionAsRead, PersonMentionResponse>(
|
return this.#wrapper<MarkPersonMentionAsRead, PersonMentionResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/mention/mark_as_read",
|
"/account/mention/mark_as_read",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark a person mention as read.
|
||||||
|
*
|
||||||
|
* `HTTP.POST /account/mention/mark_as_read`
|
||||||
|
*/
|
||||||
|
markPersonAllMentionAsRead(options?: RequestOptions) {
|
||||||
|
return this.#wrapper<object, PersonMentionResponse>(
|
||||||
|
HttpType.Post,
|
||||||
|
"/account/mention/mark_as_read",
|
||||||
|
{},
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get comment replies.
|
* Get comment replies.
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user/replies`
|
* `HTTP.GET /account/replies`
|
||||||
*/
|
*/
|
||||||
getReplies(form: GetReplies, options?: RequestOptions) {
|
getReplies(form: GetReplies, options?: RequestOptions) {
|
||||||
return this.#wrapper<GetReplies, GetRepliesResponse>(
|
return this.#wrapper<GetReplies, GetRepliesResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user/replies",
|
"/account/replies",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1246,12 +1290,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Ban a person from your site.
|
* Ban a person from your site.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/ban`
|
* `HTTP.POST /admin/ban`
|
||||||
*/
|
*/
|
||||||
banPerson(form: BanPerson, options?: RequestOptions) {
|
banPerson(form: BanPerson, options?: RequestOptions) {
|
||||||
return this.#wrapper<BanPerson, BanPersonResponse>(
|
return this.#wrapper<BanPerson, BanPersonResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/ban",
|
"/admin/ban",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1260,12 +1304,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Get a list of banned users
|
* Get a list of banned users
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user/banned`
|
* `HTTP.GET /admin/banned`
|
||||||
*/
|
*/
|
||||||
getBannedPersons(options?: RequestOptions) {
|
getBannedPersons(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, BannedPersonsResponse>(
|
return this.#wrapper<object, BannedPersonsResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user/banned",
|
"/admin/banned",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1274,12 +1318,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Block a person.
|
* Block a person.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/block`
|
* `HTTP.POST /account/block/person`
|
||||||
*/
|
*/
|
||||||
blockPerson(form: BlockPerson, options?: RequestOptions) {
|
blockPerson(form: BlockPerson, options?: RequestOptions) {
|
||||||
return this.#wrapper<BlockPerson, BlockPersonResponse>(
|
return this.#wrapper<BlockPerson, BlockPersonResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/block",
|
"/account/block/person",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1288,12 +1332,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Fetch a Captcha.
|
* Fetch a Captcha.
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user/get_captcha`
|
* `HTTP.GET /account/auth/get_captcha`
|
||||||
*/
|
*/
|
||||||
getCaptcha(options?: RequestOptions) {
|
getCaptcha(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetCaptchaResponse>(
|
return this.#wrapper<object, GetCaptchaResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user/get_captcha",
|
"/account/auth/get_captcha",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1302,12 +1346,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Delete your account.
|
* Delete your account.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/delete_account`
|
* `HTTP.POST /account/delete`
|
||||||
*/
|
*/
|
||||||
deleteAccount(form: DeleteAccount, options?: RequestOptions) {
|
deleteAccount(form: DeleteAccount, options?: RequestOptions) {
|
||||||
return this.#wrapper<DeleteAccount, SuccessResponse>(
|
return this.#wrapper<DeleteAccount, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/delete_account",
|
"/account/delete",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1316,12 +1360,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Reset your password.
|
* Reset your password.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/password_reset`
|
* `HTTP.POST /account/auth/password_reset`
|
||||||
*/
|
*/
|
||||||
passwordReset(form: PasswordReset, options?: RequestOptions) {
|
passwordReset(form: PasswordReset, options?: RequestOptions) {
|
||||||
return this.#wrapper<PasswordReset, SuccessResponse>(
|
return this.#wrapper<PasswordReset, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/password_reset",
|
"/account/auth/password_reset",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1330,7 +1374,7 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Change your password from an email / token based reset.
|
* Change your password from an email / token based reset.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/password_change`
|
* `HTTP.POST /account/auth/password_change`
|
||||||
*/
|
*/
|
||||||
passwordChangeAfterReset(
|
passwordChangeAfterReset(
|
||||||
form: PasswordChangeAfterReset,
|
form: PasswordChangeAfterReset,
|
||||||
|
@ -1338,7 +1382,7 @@ export class LemmyHttp {
|
||||||
) {
|
) {
|
||||||
return this.#wrapper<PasswordChangeAfterReset, SuccessResponse>(
|
return this.#wrapper<PasswordChangeAfterReset, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/password_change",
|
"/account/auth/password_change",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1347,12 +1391,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Mark all replies as read.
|
* Mark all replies as read.
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/mark_all_as_read`
|
* `HTTP.POST /account/mention/mark_as_read/all`
|
||||||
*/
|
*/
|
||||||
markAllAsRead(options?: RequestOptions) {
|
markAllAsRead(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetRepliesResponse>(
|
return this.#wrapper<object, GetRepliesResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/mark_all_as_read",
|
"/account/mention/mark_as_read/all",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1361,12 +1405,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Save your user settings.
|
* Save your user settings.
|
||||||
*
|
*
|
||||||
* `HTTP.PUT /user/save_user_settings`
|
* `HTTP.PUT /account/settings/save`
|
||||||
*/
|
*/
|
||||||
saveUserSettings(form: SaveUserSettings, options?: RequestOptions) {
|
saveUserSettings(form: SaveUserSettings, options?: RequestOptions) {
|
||||||
return this.#wrapper<SaveUserSettings, SuccessResponse>(
|
return this.#wrapper<SaveUserSettings, SuccessResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
"/user/save_user_settings",
|
"/account/settings/save",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1375,12 +1419,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Change your user password.
|
* Change your user password.
|
||||||
*
|
*
|
||||||
* `HTTP.PUT /user/change_password`
|
* `HTTP.PUT /account/auth/change_password`
|
||||||
*/
|
*/
|
||||||
changePassword(form: ChangePassword, options?: RequestOptions) {
|
changePassword(form: ChangePassword, options?: RequestOptions) {
|
||||||
return this.#wrapper<ChangePassword, LoginResponse>(
|
return this.#wrapper<ChangePassword, LoginResponse>(
|
||||||
HttpType.Put,
|
HttpType.Put,
|
||||||
"/user/change_password",
|
"/account/auth/change_password",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1389,12 +1433,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Get counts for your reports
|
* Get counts for your reports
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user/report_count`
|
* `HTTP.GET /account/report_count`
|
||||||
*/
|
*/
|
||||||
getReportCount(form: GetReportCount, options?: RequestOptions) {
|
getReportCount(form: GetReportCount, options?: RequestOptions) {
|
||||||
return this.#wrapper<GetReportCount, GetReportCountResponse>(
|
return this.#wrapper<GetReportCount, GetReportCountResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user/report_count",
|
"/account/report_count",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1403,12 +1447,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Get your unread counts
|
* Get your unread counts
|
||||||
*
|
*
|
||||||
* `HTTP.GET /user/unread_count`
|
* `HTTP.GET /account/unread_count`
|
||||||
*/
|
*/
|
||||||
getUnreadCount(options?: RequestOptions) {
|
getUnreadCount(options?: RequestOptions) {
|
||||||
return this.#wrapper<object, GetUnreadCountResponse>(
|
return this.#wrapper<object, GetUnreadCountResponse>(
|
||||||
HttpType.Get,
|
HttpType.Get,
|
||||||
"/user/unread_count",
|
"/account/unread_count",
|
||||||
{},
|
{},
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1417,12 +1461,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Verify your email
|
* Verify your email
|
||||||
*
|
*
|
||||||
* `HTTP.POST /user/verify_email`
|
* `HTTP.POST /account/auth/verify_email`
|
||||||
*/
|
*/
|
||||||
verifyEmail(form: VerifyEmail, options?: RequestOptions) {
|
verifyEmail(form: VerifyEmail, options?: RequestOptions) {
|
||||||
return this.#wrapper<VerifyEmail, SuccessResponse>(
|
return this.#wrapper<VerifyEmail, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/user/verify_email",
|
"/account/auth/verify_email",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1756,12 +1800,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Block an instance as user.
|
* Block an instance as user.
|
||||||
*
|
*
|
||||||
* `HTTP.Post /site/block`
|
* `HTTP.Post /account/block/instance`
|
||||||
*/
|
*/
|
||||||
userBlockInstance(form: UserBlockInstanceParams, options?: RequestOptions) {
|
userBlockInstance(form: UserBlockInstanceParams, options?: RequestOptions) {
|
||||||
return this.#wrapper<UserBlockInstanceParams, SuccessResponse>(
|
return this.#wrapper<UserBlockInstanceParams, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/site/block",
|
"/account/block/instance",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1770,12 +1814,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Globally block an instance as admin.
|
* Globally block an instance as admin.
|
||||||
*
|
*
|
||||||
* `HTTP.Post /admin/block_instance`
|
* `HTTP.Post /admin/instance/block`
|
||||||
*/
|
*/
|
||||||
adminBlockInstance(form: AdminBlockInstanceParams, options?: RequestOptions) {
|
adminBlockInstance(form: AdminBlockInstanceParams, options?: RequestOptions) {
|
||||||
return this.#wrapper<AdminBlockInstanceParams, SuccessResponse>(
|
return this.#wrapper<AdminBlockInstanceParams, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/admin/block_instance",
|
"/admin/instance/block",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
@ -1784,12 +1828,12 @@ export class LemmyHttp {
|
||||||
/**
|
/**
|
||||||
* Globally allow an instance as admin.
|
* Globally allow an instance as admin.
|
||||||
*
|
*
|
||||||
* `HTTP.Post /admin/allow_instance`
|
* `HTTP.Post /admin/instance/allow`
|
||||||
*/
|
*/
|
||||||
adminAllowInstance(form: AdminAllowInstanceParams, options?: RequestOptions) {
|
adminAllowInstance(form: AdminAllowInstanceParams, options?: RequestOptions) {
|
||||||
return this.#wrapper<AdminAllowInstanceParams, SuccessResponse>(
|
return this.#wrapper<AdminAllowInstanceParams, SuccessResponse>(
|
||||||
HttpType.Post,
|
HttpType.Post,
|
||||||
"/admin/allow_instance",
|
"/admin/instance/allow",
|
||||||
form,
|
form,
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export const VERSION = "v3";
|
export const VERSION = "v4";
|
||||||
|
|
||||||
export interface UploadImage {
|
export interface UploadImage {
|
||||||
image: File | Buffer;
|
image: File | Buffer;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import type { Language } from "./Language";
|
import type { Language } from "./Language";
|
||||||
import type { LanguageId } from "./LanguageId";
|
import type { LanguageId } from "./LanguageId";
|
||||||
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
|
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
|
||||||
import type { MyUserInfo } from "./MyUserInfo";
|
|
||||||
import type { OAuthProvider } from "./OAuthProvider";
|
import type { OAuthProvider } from "./OAuthProvider";
|
||||||
import type { PersonView } from "./PersonView";
|
import type { PersonView } from "./PersonView";
|
||||||
import type { PublicOAuthProvider } from "./PublicOAuthProvider";
|
import type { PublicOAuthProvider } from "./PublicOAuthProvider";
|
||||||
|
@ -16,7 +15,6 @@ export type GetSiteResponse = {
|
||||||
site_view: SiteView;
|
site_view: SiteView;
|
||||||
admins: Array<PersonView>;
|
admins: Array<PersonView>;
|
||||||
version: string;
|
version: string;
|
||||||
my_user?: MyUserInfo;
|
|
||||||
all_languages: Array<Language>;
|
all_languages: Array<Language>;
|
||||||
discussion_languages: Array<LanguageId>;
|
discussion_languages: Array<LanguageId>;
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue