lemmy-js-client 1.0.0-comment-lock.0 → 1.0.0-community-post-notifs.0

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
@@ -70,7 +70,6 @@ import { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnread
70
70
  import { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
71
71
  import { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
72
72
  import { LockPost } from "./types/LockPost";
73
- import { LockComment } from "./types/LockComment";
74
73
  import { Login } from "./types/Login";
75
74
  import { LoginResponse } from "./types/LoginResponse";
76
75
  import { MarkPostAsRead } from "./types/MarkPostAsRead";
@@ -148,6 +147,8 @@ import { UserBlockInstancePersonsParams } from "./types/UserBlockInstancePersons
148
147
  import { MarkNotificationAsRead } from "./types/MarkNotificationAsRead";
149
148
  import { ListNotificationsResponse } from "./types/ListNotificationsResponse";
150
149
  import { ModEditPost } from "./types/ModEditPost";
150
+ import { UpdateCommunityNotifications } from "./types/UpdateCommunityNotifications";
151
+ import { UpdatePostNotifications } from "./types/UpdatePostNotifications";
151
152
  type RequestOptions = Pick<RequestInit, "signal">;
152
153
  /**
153
154
  * Helps build lemmy HTTP requests.
@@ -408,11 +409,7 @@ export declare class LemmyHttp extends Controller {
408
409
  */
409
410
  removeComment(form: RemoveComment, options?: RequestOptions): Promise<CommentResponse>;
410
411
  /**
411
- * @summary A moderator can lock a comment (IE disable replies).
412
- */
413
- lockComment(form: LockComment, options?: RequestOptions): Promise<CommentResponse>;
414
- /**
415
- * @Summary Like / vote on a comment.
412
+ * @summary Like / vote on a comment.
416
413
  */
417
414
  likeComment(form: CreateCommentLike, options?: RequestOptions): Promise<CommentResponse>;
418
415
  /**
@@ -762,6 +759,14 @@ export declare class LemmyHttp extends Controller {
762
759
  deleteMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
763
760
  listMultiCommunities(form: ListMultiCommunitiesI, options?: RequestOptions): Promise<ListMultiCommunitiesResponse>;
764
761
  followMultiCommunity(form: FollowMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
762
+ /**
763
+ * @summary Change notification settings for a community
764
+ */
765
+ updateCommunityNotifications(form: UpdateCommunityNotifications, options?: RequestOptions): Promise<SuccessResponse>;
766
+ /**
767
+ * @summary Change notification settings for a post
768
+ */
769
+ updatePostNotifications(form: UpdatePostNotifications, options?: RequestOptions): Promise<SuccessResponse>;
765
770
  /**
766
771
  * Set the headers (can be used to set the auth header)
767
772
  */
package/dist/http.js CHANGED
@@ -413,13 +413,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
413
413
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
414
414
  }
415
415
  /**
416
- * @summary A moderator can lock a comment (IE disable replies).
417
- */
418
- async lockComment(form, options) {
419
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/lock", form, options);
420
- }
421
- /**
422
- * @Summary Like / vote on a comment.
416
+ * @summary Like / vote on a comment.
423
417
  */
424
418
  async likeComment(form, options) {
425
419
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
@@ -955,6 +949,18 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
955
949
  followMultiCommunity(form, options) {
956
950
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
957
951
  }
952
+ /**
953
+ * @summary Change notification settings for a community
954
+ */
955
+ updateCommunityNotifications(form, options) {
956
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/notifications", form, options);
957
+ }
958
+ /**
959
+ * @summary Change notification settings for a post
960
+ */
961
+ updatePostNotifications(form, options) {
962
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/notifications", form, options);
963
+ }
958
964
  /**
959
965
  * Set the headers (can be used to set the auth header)
960
966
  */
@@ -1428,13 +1434,6 @@ __decorate([
1428
1434
  __param(0, (0, runtime_1.Body)()),
1429
1435
  __param(1, (0, runtime_1.Inject)())
1430
1436
  ], LemmyHttp.prototype, "removeComment", null);
1431
- __decorate([
1432
- (0, runtime_1.Security)("bearerAuth"),
1433
- (0, runtime_1.Post)("/comment/lock"),
1434
- (0, runtime_1.Tags)("Comment", "Moderator"),
1435
- __param(0, (0, runtime_1.Body)()),
1436
- __param(1, (0, runtime_1.Inject)())
1437
- ], LemmyHttp.prototype, "lockComment", null);
1438
1437
  __decorate([
1439
1438
  (0, runtime_1.Security)("bearerAuth"),
1440
1439
  (0, runtime_1.Post)("/comment/like"),
@@ -2073,6 +2072,20 @@ __decorate([
2073
2072
  __param(0, (0, runtime_1.Body)()),
2074
2073
  __param(1, (0, runtime_1.Inject)())
2075
2074
  ], LemmyHttp.prototype, "followMultiCommunity", null);
2075
+ __decorate([
2076
+ (0, runtime_1.Security)("bearerAuth"),
2077
+ (0, runtime_1.Put)("/community/notifications"),
2078
+ (0, runtime_1.Tags)("Community"),
2079
+ __param(0, (0, runtime_1.Body)()),
2080
+ __param(1, (0, runtime_1.Inject)())
2081
+ ], LemmyHttp.prototype, "updateCommunityNotifications", null);
2082
+ __decorate([
2083
+ (0, runtime_1.Security)("bearerAuth"),
2084
+ (0, runtime_1.Put)("/post/notifications"),
2085
+ (0, runtime_1.Tags)("Post"),
2086
+ __param(0, (0, runtime_1.Body)()),
2087
+ __param(1, (0, runtime_1.Inject)())
2088
+ ], LemmyHttp.prototype, "updatePostNotifications", null);
2076
2089
  exports.LemmyHttp = LemmyHttp = __decorate([
2077
2090
  (0, runtime_1.Route)("api/v4")
2078
2091
  ], LemmyHttp);
package/dist/index.d.ts CHANGED
@@ -203,7 +203,6 @@ export { LocalSiteUrlBlocklist } from "./types/LocalSiteUrlBlocklist";
203
203
  export { LocalUser } from "./types/LocalUser";
204
204
  export { LocalUserId } from "./types/LocalUserId";
205
205
  export { LocalUserView } from "./types/LocalUserView";
206
- export { LockComment } from "./types/LockComment";
207
206
  export { LockPost } from "./types/LockPost";
208
207
  export { Login } from "./types/Login";
209
208
  export { LoginResponse } from "./types/LoginResponse";
@@ -240,9 +239,6 @@ export { ModRemoveCommentView } from "./types/ModRemoveCommentView";
240
239
  export { ModRemoveCommunity } from "./types/ModRemoveCommunity";
241
240
  export { ModRemoveCommunityId } from "./types/ModRemoveCommunityId";
242
241
  export { ModRemoveCommunityView } from "./types/ModRemoveCommunityView";
243
- export { ModLockComment } from "./types/ModLockComment";
244
- export { ModLockCommentId } from "./types/ModLockCommentId";
245
- export { ModLockCommentView } from "./types/ModLockCommentView";
246
242
  export { ModRemovePost } from "./types/ModRemovePost";
247
243
  export { ModRemovePostId } from "./types/ModRemovePostId";
248
244
  export { ModRemovePostView } from "./types/ModRemovePostView";
@@ -53,8 +53,4 @@ export type Comment = {
53
53
  * accepted by the community (by receiving it back via federation).
54
54
  */
55
55
  federation_pending: boolean;
56
- /**
57
- * Whether the comment is locked.
58
- */
59
- locked: boolean;
60
56
  };
@@ -10,7 +10,6 @@ import type { ModBanFromCommunityView } from "./ModBanFromCommunityView";
10
10
  import type { ModBanView } from "./ModBanView";
11
11
  import type { ModChangeCommunityVisibilityView } from "./ModChangeCommunityVisibilityView";
12
12
  import type { ModFeaturePostView } from "./ModFeaturePostView";
13
- import type { ModLockCommentView } from "./ModLockCommentView";
14
13
  import type { ModLockPostView } from "./ModLockPostView";
15
14
  import type { ModRemoveCommentView } from "./ModRemoveCommentView";
16
15
  import type { ModRemoveCommunityView } from "./ModRemoveCommunityView";
@@ -50,6 +49,4 @@ export type ModlogCombinedView = ({
50
49
  type_: "ModRemovePost";
51
50
  } & ModRemovePostView) | ({
52
51
  type_: "ModTransferCommunity";
53
- } & ModTransferCommunityView) | ({
54
- type_: "ModLockComment";
55
- } & ModLockCommentView);
52
+ } & ModTransferCommunityView);
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": "1.0.0-comment-lock.0",
4
+ "version": "1.0.0-community-post-notifs.0",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -32,19 +32,19 @@
32
32
  "eslint": "^9.11.1",
33
33
  "eslint-plugin-prettier": "^5.2.1",
34
34
  "husky": "^9.1.4",
35
- "joi": "^17.13.3",
35
+ "joi": "^18.0.0",
36
36
  "lint-staged": "^16.0.0",
37
37
  "prettier": "^3.3.3",
38
38
  "prettier-plugin-import-sort": "^0.0.7",
39
39
  "prettier-plugin-organize-imports": "^4.0.0",
40
40
  "prettier-plugin-packagejson": "^2.5.1",
41
- "sortpack": "^2.4.0",
41
+ "sortpack": "^3.0.0",
42
42
  "tsoa": "^6.6.0",
43
43
  "typedoc": "^0.28.0",
44
44
  "typescript": "^5.5.4",
45
45
  "typescript-eslint": "^8.7.0"
46
46
  },
47
- "packageManager": "pnpm@10.14.0",
47
+ "packageManager": "pnpm@10.15.0",
48
48
  "types": "./dist/index.d.ts",
49
49
  "lint-staged": {
50
50
  "*.{ts,tsx,js}": [
@@ -1,6 +0,0 @@
1
- import type { CommentId } from "./CommentId";
2
- export type LockComment = {
3
- comment_id: CommentId;
4
- locked: boolean;
5
- reason?: string;
6
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +0,0 @@
1
- import type { ModLockPostId } from "./ModLockPostId";
2
- import type { PersonId } from "./PersonId";
3
- import type { PostId } from "./PostId";
4
- /**
5
- * When a moderator locks a comment (prevents new replies to a comment or its children).
6
- */
7
- export type ModLockComment = {
8
- id: ModLockPostId;
9
- mod_person_id: PersonId;
10
- comment_id: PostId;
11
- locked: boolean;
12
- reason?: string;
13
- published_at: string;
14
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export type ModLockCommentId = number;
@@ -1,3 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +0,0 @@
1
- import type { Comment } from "./Comment";
2
- import type { Community } from "./Community";
3
- import type { ModLockComment } from "./ModLockComment";
4
- import type { Person } from "./Person";
5
- /**
6
- * When a moderator locks a comment (prevents replies to it or its children).
7
- */
8
- export type ModLockCommentView = {
9
- mod_lock_comment: ModLockComment;
10
- moderator?: Person;
11
- other_person: Person;
12
- comment: Comment;
13
- community: Community;
14
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });