lemmy-js-client 0.19.5-alpha.1 → 0.19.6-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/http.d.ts CHANGED
@@ -134,6 +134,7 @@ import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
134
134
  import { HidePost } from "./types/HidePost";
135
135
  import { ListMedia } from "./types/ListMedia";
136
136
  import { ListMediaResponse } from "./types/ListMediaResponse";
137
+ import { GetRegistrationApplication } from "./types/GetRegistrationApplication";
137
138
  /**
138
139
  * Helps build lemmy HTTP requests.
139
140
  */
@@ -697,6 +698,12 @@ export declare class LemmyHttp {
697
698
  * `HTTP.PUT /admin/registration_application/approve`
698
699
  */
699
700
  approveRegistrationApplication(form: ApproveRegistrationApplication): Promise<RegistrationApplicationResponse>;
701
+ /**
702
+ * Get the application a user submitted when they first registered their account
703
+ *
704
+ * `HTTP.GET /admin/registration_application`
705
+ */
706
+ getRegistrationApplication(form: GetRegistrationApplication): Promise<RegistrationApplicationResponse>;
700
707
  /**
701
708
  * Purge / Delete a person from the database.
702
709
  *
package/dist/http.js CHANGED
@@ -780,6 +780,14 @@ class LemmyHttp {
780
780
  approveRegistrationApplication(form) {
781
781
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form);
782
782
  }
783
+ /**
784
+ * Get the application a user submitted when they first registered their account
785
+ *
786
+ * `HTTP.GET /admin/registration_application`
787
+ */
788
+ getRegistrationApplication(form) {
789
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form);
790
+ }
783
791
  /**
784
792
  * Purge / Delete a person from the database.
785
793
  *
@@ -923,7 +931,7 @@ _LemmyHttp_apiUrl = new WeakMap(), _LemmyHttp_headers = new WeakMap(), _LemmyHtt
923
931
  try {
924
932
  json = yield response.json();
925
933
  }
926
- catch (error) {
934
+ catch (_b) {
927
935
  throw new Error(response.statusText);
928
936
  }
929
937
  if (!response.ok) {
package/dist/index.d.ts CHANGED
@@ -100,6 +100,7 @@ export { GetPostResponse } from "./types/GetPostResponse";
100
100
  export { GetPosts } from "./types/GetPosts";
101
101
  export { GetPostsResponse } from "./types/GetPostsResponse";
102
102
  export { GetPrivateMessages } from "./types/GetPrivateMessages";
103
+ export { GetRegistrationApplication } from "./types/GetRegistrationApplication";
103
104
  export { GetReplies } from "./types/GetReplies";
104
105
  export { GetRepliesResponse } from "./types/GetRepliesResponse";
105
106
  export { GetReportCount } from "./types/GetReportCount";
@@ -186,7 +187,6 @@ export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
186
187
  export { PasswordReset } from "./types/PasswordReset";
187
188
  export { Person } from "./types/Person";
188
189
  export { PersonAggregates } from "./types/PersonAggregates";
189
- export { PersonBlockId } from "./types/PersonBlockId";
190
190
  export { PersonBlockView } from "./types/PersonBlockView";
191
191
  export { PersonId } from "./types/PersonId";
192
192
  export { PersonMention } from "./types/PersonMention";
@@ -221,6 +221,7 @@ export { PurgePost } from "./types/PurgePost";
221
221
  export { ReadableFederationState } from "./types/ReadableFederationState";
222
222
  export { Register } from "./types/Register";
223
223
  export { RegistrationApplication } from "./types/RegistrationApplication";
224
+ export { RegistrationApplicationId } from "./types/RegistrationApplicationId";
224
225
  export { RegistrationApplicationResponse } from "./types/RegistrationApplicationResponse";
225
226
  export { RegistrationApplicationView } from "./types/RegistrationApplicationView";
226
227
  export { RegistrationMode } from "./types/RegistrationMode";
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export declare const VERSION = "v3";
3
2
  export interface UploadImage {
4
3
  image: File | Buffer;
@@ -1,5 +1,6 @@
1
+ import type { RegistrationApplicationId } from "./RegistrationApplicationId";
1
2
  export interface ApproveRegistrationApplication {
2
- id: number;
3
+ id: RegistrationApplicationId;
3
4
  approve: boolean;
4
5
  deny_reason?: string;
5
6
  }
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,5 +13,7 @@ export interface GetPosts {
13
13
  liked_only?: boolean;
14
14
  disliked_only?: boolean;
15
15
  show_hidden?: boolean;
16
+ show_read?: boolean;
17
+ show_nsfw?: boolean;
16
18
  page_cursor?: PaginationCursor;
17
19
  }
@@ -0,0 +1,4 @@
1
+ import type { PersonId } from "./PersonId";
2
+ export interface GetRegistrationApplication {
3
+ person_id: PersonId;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -56,6 +56,10 @@ export type LemmyErrorType = {
56
56
  error: "not_top_mod";
57
57
  } | {
58
58
  error: "not_logged_in";
59
+ } | {
60
+ error: "not_higher_mod";
61
+ } | {
62
+ error: "not_higher_admin";
59
63
  } | {
60
64
  error: "site_ban";
61
65
  } | {
@@ -333,4 +337,6 @@ export type LemmyErrorType = {
333
337
  } | {
334
338
  error: "unknown";
335
339
  message: string;
340
+ } | {
341
+ error: "cant_delete_site";
336
342
  };
@@ -1,7 +1,8 @@
1
1
  import type { LocalUserId } from "./LocalUserId";
2
2
  import type { PersonId } from "./PersonId";
3
+ import type { RegistrationApplicationId } from "./RegistrationApplicationId";
3
4
  export interface RegistrationApplication {
4
- id: number;
5
+ id: RegistrationApplicationId;
5
6
  local_user_id: LocalUserId;
6
7
  answer: string;
7
8
  admin_id?: PersonId;
@@ -0,0 +1 @@
1
+ export type RegistrationApplicationId = number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
3
  "description": "A javascript / typescript client for Lemmy",
4
- "version": "0.19.5-alpha.1",
4
+ "version": "0.19.6-beta.1",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -19,23 +19,23 @@
19
19
  "url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/node": "^20.11.19",
23
- "@typescript-eslint/eslint-plugin": "^7.0.1",
24
- "@typescript-eslint/parser": "^7.0.1",
25
- "eslint": "^9.0.0",
26
- "eslint-plugin-prettier": "^5.1.3",
27
- "husky": "^9.0.11",
28
- "lint-staged": "^15.2.2",
29
- "prettier": "^3.2.5",
22
+ "@types/node": "^22.1.0",
23
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
24
+ "@typescript-eslint/parser": "^8.0.0",
25
+ "eslint": "^9.8.0",
26
+ "eslint-plugin-prettier": "^5.2.1",
27
+ "husky": "^9.1.4",
28
+ "lint-staged": "^15.2.7",
29
+ "prettier": "^3.3.3",
30
30
  "prettier-plugin-import-sort": "^0.0.7",
31
- "prettier-plugin-organize-imports": "^3.2.4",
32
- "prettier-plugin-packagejson": "^2.4.11",
31
+ "prettier-plugin-organize-imports": "^4.0.0",
32
+ "prettier-plugin-packagejson": "^2.5.1",
33
33
  "sortpack": "^2.4.0",
34
- "typedoc": "^0.25.8",
35
- "typescript": "^5.3.3",
36
- "typescript-eslint": "^7.9.0"
34
+ "typedoc": "^0.26.5",
35
+ "typescript": "^5.5.4",
36
+ "typescript-eslint": "^8.0.0"
37
37
  },
38
- "packageManager": "pnpm@9.1.4",
38
+ "packageManager": "pnpm@9.6.0",
39
39
  "types": "./dist/index.d.ts",
40
40
  "lint-staged": {
41
41
  "*.{ts,tsx,js}": [
@@ -1 +0,0 @@
1
- export type PersonBlockId = number;