lemmy-js-client 0.20.0-alpha.1 → 0.20.0-alpha.2
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 +7 -0
- package/dist/http.js +9 -1
- package/dist/index.d.ts +3 -1
- package/dist/other_types.d.ts +0 -1
- package/dist/types/ApproveRegistrationApplication.d.ts +2 -1
- package/dist/types/ApproveRegistrationApplication.js +0 -1
- package/dist/types/GetPosts.d.ts +2 -0
- package/dist/types/GetRegistrationApplication.d.ts +4 -0
- package/dist/types/GetRegistrationApplication.js +2 -0
- package/dist/types/ImageDetails.d.ts +6 -0
- package/dist/types/LemmyErrorType.d.ts +6 -0
- package/dist/types/PostView.d.ts +2 -0
- package/dist/types/RegistrationApplication.d.ts +2 -1
- package/dist/types/RegistrationApplicationId.d.ts +1 -0
- package/dist/types/RegistrationApplicationId.js +3 -0
- package/package.json +15 -15
- package/dist/types/PersonBlockId.d.ts +0 -1
- /package/dist/types/{PersonBlockId.js → ImageDetails.js} +0 -0
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 (
|
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";
|
@@ -111,6 +112,7 @@ export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
|
|
111
112
|
export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
|
112
113
|
export { HideCommunity } from "./types/HideCommunity";
|
113
114
|
export { HidePost } from "./types/HidePost";
|
115
|
+
export { ImageDetails } from "./types/ImageDetails";
|
114
116
|
export { Instance } from "./types/Instance";
|
115
117
|
export { InstanceBlockView } from "./types/InstanceBlockView";
|
116
118
|
export { InstanceId } from "./types/InstanceId";
|
@@ -185,7 +187,6 @@ export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
|
185
187
|
export { PasswordReset } from "./types/PasswordReset";
|
186
188
|
export { Person } from "./types/Person";
|
187
189
|
export { PersonAggregates } from "./types/PersonAggregates";
|
188
|
-
export { PersonBlockId } from "./types/PersonBlockId";
|
189
190
|
export { PersonBlockView } from "./types/PersonBlockView";
|
190
191
|
export { PersonId } from "./types/PersonId";
|
191
192
|
export { PersonMention } from "./types/PersonMention";
|
@@ -220,6 +221,7 @@ export { PurgePost } from "./types/PurgePost";
|
|
220
221
|
export { ReadableFederationState } from "./types/ReadableFederationState";
|
221
222
|
export { Register } from "./types/Register";
|
222
223
|
export { RegistrationApplication } from "./types/RegistrationApplication";
|
224
|
+
export { RegistrationApplicationId } from "./types/RegistrationApplicationId";
|
223
225
|
export { RegistrationApplicationResponse } from "./types/RegistrationApplicationResponse";
|
224
226
|
export { RegistrationApplicationView } from "./types/RegistrationApplicationView";
|
225
227
|
export { RegistrationMode } from "./types/RegistrationMode";
|
package/dist/other_types.d.ts
CHANGED
package/dist/types/GetPosts.d.ts
CHANGED
@@ -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
|
};
|
package/dist/types/PostView.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { Community } from "./Community";
|
2
|
+
import type { ImageDetails } from "./ImageDetails";
|
2
3
|
import type { Person } from "./Person";
|
3
4
|
import type { Post } from "./Post";
|
4
5
|
import type { PostAggregates } from "./PostAggregates";
|
@@ -7,6 +8,7 @@ export interface PostView {
|
|
7
8
|
post: Post;
|
8
9
|
creator: Person;
|
9
10
|
community: Community;
|
11
|
+
image_details?: ImageDetails;
|
10
12
|
creator_banned_from_community: boolean;
|
11
13
|
banned_from_community: boolean;
|
12
14
|
creator_is_moderator: boolean;
|
@@ -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:
|
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.20.0-alpha.
|
4
|
+
"version": "0.20.0-alpha.2",
|
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": "^
|
23
|
-
"@typescript-eslint/eslint-plugin": "^
|
24
|
-
"@typescript-eslint/parser": "^
|
25
|
-
"eslint": "^9.
|
26
|
-
"eslint-plugin-prettier": "^5.1
|
27
|
-
"husky": "^9.
|
28
|
-
"lint-staged": "^15.2.
|
29
|
-
"prettier": "^3.
|
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": "^
|
32
|
-
"prettier-plugin-packagejson": "^2.
|
31
|
+
"prettier-plugin-organize-imports": "^4.0.0",
|
32
|
+
"prettier-plugin-packagejson": "^2.5.1",
|
33
33
|
"sortpack": "^2.4.0",
|
34
|
-
"typedoc": "^0.
|
35
|
-
"typescript": "^5.
|
36
|
-
"typescript-eslint": "^
|
34
|
+
"typedoc": "^0.26.5",
|
35
|
+
"typescript": "^5.5.4",
|
36
|
+
"typescript-eslint": "^8.0.0"
|
37
37
|
},
|
38
|
-
"packageManager": "pnpm@9.
|
38
|
+
"packageManager": "pnpm@9.9.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;
|
File without changes
|