lemmy-js-client 0.19.0-rc.1 → 0.19.0-rc.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. package/dist/http.d.ts +21 -16
  2. package/dist/http.js +33 -27
  3. package/dist/index.d.ts +3 -19
  4. package/dist/types/AddAdmin.d.ts +0 -1
  5. package/dist/types/AddModToCommunity.d.ts +0 -1
  6. package/dist/types/ApproveRegistrationApplication.d.ts +0 -1
  7. package/dist/types/BanFromCommunity.d.ts +0 -1
  8. package/dist/types/BanPerson.d.ts +0 -1
  9. package/dist/types/BlockCommunity.d.ts +0 -1
  10. package/dist/types/BlockPerson.d.ts +0 -1
  11. package/dist/types/ChangePassword.d.ts +0 -1
  12. package/dist/types/CommentResponse.d.ts +0 -1
  13. package/dist/types/CreateComment.d.ts +0 -2
  14. package/dist/types/CreateCommentLike.d.ts +0 -1
  15. package/dist/types/CreateCommentReport.d.ts +0 -1
  16. package/dist/types/CreateCommunity.d.ts +0 -1
  17. package/dist/types/CreateCustomEmoji.d.ts +0 -1
  18. package/dist/types/CreatePost.d.ts +0 -1
  19. package/dist/types/CreatePostLike.d.ts +0 -1
  20. package/dist/types/CreatePostReport.d.ts +0 -1
  21. package/dist/types/CreatePrivateMessage.d.ts +0 -1
  22. package/dist/types/CreatePrivateMessageReport.d.ts +0 -1
  23. package/dist/types/CreateSite.d.ts +0 -1
  24. package/dist/types/DeleteAccount.d.ts +1 -1
  25. package/dist/types/DeleteComment.d.ts +0 -1
  26. package/dist/types/DeleteCommunity.d.ts +0 -1
  27. package/dist/types/DeleteCustomEmoji.d.ts +0 -1
  28. package/dist/types/DeletePost.d.ts +0 -1
  29. package/dist/types/DeletePrivateMessage.d.ts +0 -1
  30. package/dist/types/DistinguishComment.d.ts +0 -1
  31. package/dist/types/EditComment.d.ts +0 -2
  32. package/dist/types/EditCommunity.d.ts +0 -1
  33. package/dist/types/EditCustomEmoji.d.ts +0 -1
  34. package/dist/types/EditPost.d.ts +0 -1
  35. package/dist/types/EditPrivateMessage.d.ts +0 -1
  36. package/dist/types/EditSite.d.ts +0 -1
  37. package/dist/types/FeaturePost.d.ts +0 -1
  38. package/dist/types/FollowCommunity.d.ts +0 -1
  39. package/dist/types/GetComment.d.ts +0 -1
  40. package/dist/types/GetComments.d.ts +2 -1
  41. package/dist/types/GetCommunity.d.ts +0 -1
  42. package/dist/types/GetModlog.d.ts +0 -1
  43. package/dist/types/GetPersonDetails.d.ts +0 -1
  44. package/dist/types/GetPersonMentions.d.ts +0 -1
  45. package/dist/types/GetPost.d.ts +0 -1
  46. package/dist/types/GetPosts.d.ts +2 -2
  47. package/dist/types/GetPrivateMessages.d.ts +2 -1
  48. package/dist/types/GetPrivateMessages.js +0 -1
  49. package/dist/types/GetReplies.d.ts +0 -1
  50. package/dist/types/GetReportCount.d.ts +0 -1
  51. package/dist/types/HideCommunity.d.ts +0 -1
  52. package/dist/types/ImageUpload.d.ts +9 -0
  53. package/dist/types/ImageUploadId.d.ts +1 -0
  54. package/dist/types/ListCommentReports.d.ts +0 -1
  55. package/dist/types/ListCommunities.d.ts +0 -1
  56. package/dist/types/ListPostReports.d.ts +0 -1
  57. package/dist/types/ListPrivateMessageReports.d.ts +0 -1
  58. package/dist/types/ListRegistrationApplications.d.ts +0 -1
  59. package/dist/types/ListingType.d.ts +1 -1
  60. package/dist/types/LocalUser.d.ts +3 -0
  61. package/dist/types/LockPost.d.ts +0 -1
  62. package/dist/types/MarkCommentReplyAsRead.d.ts +0 -1
  63. package/dist/types/MarkPersonMentionAsRead.d.ts +0 -1
  64. package/dist/types/MarkPostAsRead.d.ts +0 -1
  65. package/dist/types/MarkPrivateMessageAsRead.d.ts +0 -1
  66. package/dist/types/Person.d.ts +0 -1
  67. package/dist/types/PostListingMode.d.ts +1 -0
  68. package/dist/types/PurgeComment.d.ts +0 -1
  69. package/dist/types/PurgeCommunity.d.ts +0 -1
  70. package/dist/types/PurgePerson.d.ts +0 -1
  71. package/dist/types/PurgePost.d.ts +0 -1
  72. package/dist/types/RemoveComment.d.ts +0 -1
  73. package/dist/types/RemoveCommunity.d.ts +0 -1
  74. package/dist/types/RemovePost.d.ts +0 -1
  75. package/dist/types/ResolveCommentReport.d.ts +0 -1
  76. package/dist/types/ResolveObject.d.ts +0 -1
  77. package/dist/types/ResolvePostReport.d.ts +0 -1
  78. package/dist/types/ResolvePrivateMessageReport.d.ts +0 -1
  79. package/dist/types/SaveComment.d.ts +0 -1
  80. package/dist/types/SavePost.d.ts +0 -1
  81. package/dist/types/SaveUserSettings.d.ts +0 -1
  82. package/dist/types/Search.d.ts +0 -1
  83. package/dist/types/TransferCommunity.d.ts +0 -1
  84. package/package.json +1 -1
  85. package/dist/types/CommunityJoin.d.ts +0 -4
  86. package/dist/types/CommunityJoinResponse.d.ts +0 -3
  87. package/dist/types/GetBannedPersons.d.ts +0 -3
  88. package/dist/types/GetCaptcha.d.ts +0 -3
  89. package/dist/types/GetCaptcha.js +0 -3
  90. package/dist/types/GetFederatedInstances.d.ts +0 -3
  91. package/dist/types/GetFederatedInstances.js +0 -3
  92. package/dist/types/GetSite.d.ts +0 -3
  93. package/dist/types/GetSite.js +0 -3
  94. package/dist/types/GetUnreadCount.d.ts +0 -3
  95. package/dist/types/GetUnreadCount.js +0 -3
  96. package/dist/types/GetUnreadRegistrationApplicationCount.d.ts +0 -3
  97. package/dist/types/GetUnreadRegistrationApplicationCount.js +0 -3
  98. package/dist/types/LeaveAdmin.d.ts +0 -3
  99. package/dist/types/LeaveAdmin.js +0 -3
  100. package/dist/types/MarkAllAsRead.d.ts +0 -3
  101. package/dist/types/MarkAllAsRead.js +0 -3
  102. package/dist/types/ModJoin.d.ts +0 -4
  103. package/dist/types/ModJoin.js +0 -2
  104. package/dist/types/ModJoinResponse.d.ts +0 -3
  105. package/dist/types/ModJoinResponse.js +0 -3
  106. package/dist/types/PostJoin.d.ts +0 -4
  107. package/dist/types/PostJoin.js +0 -2
  108. package/dist/types/PostJoinResponse.d.ts +0 -3
  109. package/dist/types/PostJoinResponse.js +0 -3
  110. package/dist/types/PostOrCommentId.d.ts +0 -7
  111. package/dist/types/PostOrCommentId.js +0 -2
  112. package/dist/types/UserJoin.d.ts +0 -3
  113. package/dist/types/UserJoin.js +0 -3
  114. package/dist/types/UserJoinResponse.d.ts +0 -3
  115. package/dist/types/UserJoinResponse.js +0 -3
  116. /package/dist/types/{CommunityJoin.js → ImageUpload.js} +0 -0
  117. /package/dist/types/{CommunityJoinResponse.js → ImageUploadId.js} +0 -0
  118. /package/dist/types/{GetBannedPersons.js → PostListingMode.js} +0 -0
@@ -8,5 +8,4 @@ export interface GetModlog {
8
8
  limit?: number;
9
9
  type_?: ModlogActionType;
10
10
  other_person_id?: PersonId;
11
- auth?: string;
12
11
  }
@@ -9,5 +9,4 @@ export interface GetPersonDetails {
9
9
  limit?: number;
10
10
  community_id?: CommunityId;
11
11
  saved_only?: boolean;
12
- auth?: string;
13
12
  }
@@ -4,5 +4,4 @@ export interface GetPersonMentions {
4
4
  page?: number;
5
5
  limit?: number;
6
6
  unread_only?: boolean;
7
- auth: string;
8
7
  }
@@ -3,5 +3,4 @@ import type { PostId } from "./PostId";
3
3
  export interface GetPost {
4
4
  id?: PostId;
5
5
  comment_id?: CommentId;
6
- auth?: string;
7
6
  }
@@ -9,6 +9,6 @@ export interface GetPosts {
9
9
  community_id?: CommunityId;
10
10
  community_name?: string;
11
11
  saved_only?: boolean;
12
- moderator_view?: boolean;
13
- auth?: string;
12
+ liked_only?: boolean;
13
+ disliked_only?: boolean;
14
14
  }
@@ -1,6 +1,7 @@
1
+ import type { PersonId } from "./PersonId";
1
2
  export interface GetPrivateMessages {
2
3
  unread_only?: boolean;
3
4
  page?: number;
4
5
  limit?: number;
5
- auth: string;
6
+ creator_id?: PersonId;
6
7
  }
@@ -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 });
@@ -4,5 +4,4 @@ export interface GetReplies {
4
4
  page?: number;
5
5
  limit?: number;
6
6
  unread_only?: boolean;
7
- auth: string;
8
7
  }
@@ -1,5 +1,4 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  export interface GetReportCount {
3
3
  community_id?: CommunityId;
4
- auth: string;
5
4
  }
@@ -3,5 +3,4 @@ export interface HideCommunity {
3
3
  community_id: CommunityId;
4
4
  hidden: boolean;
5
5
  reason?: string;
6
- auth: string;
7
6
  }
@@ -0,0 +1,9 @@
1
+ import type { ImageUploadId } from "./ImageUploadId";
2
+ import type { LocalUserId } from "./LocalUserId";
3
+ export interface ImageUpload {
4
+ id: ImageUploadId;
5
+ local_user_id: LocalUserId;
6
+ pictrs_alias: string;
7
+ pictrs_delete_token: string;
8
+ published: string;
9
+ }
@@ -0,0 +1 @@
1
+ export type ImageUploadId = number;
@@ -4,5 +4,4 @@ export interface ListCommentReports {
4
4
  limit?: number;
5
5
  unresolved_only?: boolean;
6
6
  community_id?: CommunityId;
7
- auth: string;
8
7
  }
@@ -6,5 +6,4 @@ export interface ListCommunities {
6
6
  show_nsfw?: boolean;
7
7
  page?: number;
8
8
  limit?: number;
9
- auth?: string;
10
9
  }
@@ -4,5 +4,4 @@ export interface ListPostReports {
4
4
  limit?: number;
5
5
  unresolved_only?: boolean;
6
6
  community_id?: CommunityId;
7
- auth: string;
8
7
  }
@@ -2,5 +2,4 @@ export interface ListPrivateMessageReports {
2
2
  page?: number;
3
3
  limit?: number;
4
4
  unresolved_only?: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ export interface ListRegistrationApplications {
2
2
  unread_only?: boolean;
3
3
  page?: number;
4
4
  limit?: number;
5
- auth: string;
6
5
  }
@@ -1 +1 @@
1
- export type ListingType = "All" | "Local" | "Subscribed";
1
+ export type ListingType = "All" | "Local" | "Subscribed" | "ModeratorView";
@@ -1,6 +1,7 @@
1
1
  import type { ListingType } from "./ListingType";
2
2
  import type { LocalUserId } from "./LocalUserId";
3
3
  import type { PersonId } from "./PersonId";
4
+ import type { PostListingMode } from "./PostListingMode";
4
5
  import type { SortType } from "./SortType";
5
6
  export interface LocalUser {
6
7
  id: LocalUserId;
@@ -25,4 +26,6 @@ export interface LocalUser {
25
26
  blur_nsfw: boolean;
26
27
  auto_expand: boolean;
27
28
  infinite_scroll_enabled: boolean;
29
+ admin: boolean;
30
+ post_listing_mode: PostListingMode;
28
31
  }
@@ -2,5 +2,4 @@ import type { PostId } from "./PostId";
2
2
  export interface LockPost {
3
3
  post_id: PostId;
4
4
  locked: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { CommentReplyId } from "./CommentReplyId";
2
2
  export interface MarkCommentReplyAsRead {
3
3
  comment_reply_id: CommentReplyId;
4
4
  read: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PersonMentionId } from "./PersonMentionId";
2
2
  export interface MarkPersonMentionAsRead {
3
3
  person_mention_id: PersonMentionId;
4
4
  read: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PostId } from "./PostId";
2
2
  export interface MarkPostAsRead {
3
3
  post_id: PostId;
4
4
  read: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PrivateMessageId } from "./PrivateMessageId";
2
2
  export interface MarkPrivateMessageAsRead {
3
3
  private_message_id: PrivateMessageId;
4
4
  read: boolean;
5
- auth: string;
6
5
  }
@@ -15,7 +15,6 @@ export interface Person {
15
15
  deleted: boolean;
16
16
  inbox_url: string;
17
17
  matrix_user_id?: string;
18
- admin: boolean;
19
18
  bot_account: boolean;
20
19
  ban_expires?: string;
21
20
  instance_id: InstanceId;
@@ -0,0 +1 @@
1
+ export type PostListingMode = "List" | "Card" | "SmallCard";
@@ -2,5 +2,4 @@ import type { CommentId } from "./CommentId";
2
2
  export interface PurgeComment {
3
3
  comment_id: CommentId;
4
4
  reason?: string;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { CommunityId } from "./CommunityId";
2
2
  export interface PurgeCommunity {
3
3
  community_id: CommunityId;
4
4
  reason?: string;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PersonId } from "./PersonId";
2
2
  export interface PurgePerson {
3
3
  person_id: PersonId;
4
4
  reason?: string;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PostId } from "./PostId";
2
2
  export interface PurgePost {
3
3
  post_id: PostId;
4
4
  reason?: string;
5
- auth: string;
6
5
  }
@@ -3,5 +3,4 @@ export interface RemoveComment {
3
3
  comment_id: CommentId;
4
4
  removed: boolean;
5
5
  reason?: string;
6
- auth: string;
7
6
  }
@@ -4,5 +4,4 @@ export interface RemoveCommunity {
4
4
  removed: boolean;
5
5
  reason?: string;
6
6
  expires?: number;
7
- auth: string;
8
7
  }
@@ -3,5 +3,4 @@ export interface RemovePost {
3
3
  post_id: PostId;
4
4
  removed: boolean;
5
5
  reason?: string;
6
- auth: string;
7
6
  }
@@ -2,5 +2,4 @@ import type { CommentReportId } from "./CommentReportId";
2
2
  export interface ResolveCommentReport {
3
3
  report_id: CommentReportId;
4
4
  resolved: boolean;
5
- auth: string;
6
5
  }
@@ -1,4 +1,3 @@
1
1
  export interface ResolveObject {
2
2
  q: string;
3
- auth: string | null;
4
3
  }
@@ -2,5 +2,4 @@ import type { PostReportId } from "./PostReportId";
2
2
  export interface ResolvePostReport {
3
3
  report_id: PostReportId;
4
4
  resolved: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PrivateMessageReportId } from "./PrivateMessageReportId";
2
2
  export interface ResolvePrivateMessageReport {
3
3
  report_id: PrivateMessageReportId;
4
4
  resolved: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { CommentId } from "./CommentId";
2
2
  export interface SaveComment {
3
3
  comment_id: CommentId;
4
4
  save: boolean;
5
- auth: string;
6
5
  }
@@ -2,5 +2,4 @@ import type { PostId } from "./PostId";
2
2
  export interface SavePost {
3
3
  post_id: PostId;
4
4
  save: boolean;
5
- auth: string;
6
5
  }
@@ -24,7 +24,6 @@ export interface SaveUserSettings {
24
24
  show_new_post_notifs?: boolean;
25
25
  discussion_languages?: Array<LanguageId>;
26
26
  generate_totp_2fa?: boolean;
27
- auth: string;
28
27
  open_links_in_new_tab?: boolean;
29
28
  infinite_scroll_enabled?: boolean;
30
29
  }
@@ -13,5 +13,4 @@ export interface Search {
13
13
  listing_type?: ListingType;
14
14
  page?: number;
15
15
  limit?: number;
16
- auth?: string;
17
16
  }
@@ -3,5 +3,4 @@ import type { PersonId } from "./PersonId";
3
3
  export interface TransferCommunity {
4
4
  community_id: CommunityId;
5
5
  person_id: PersonId;
6
- auth: string;
7
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
- "version": "0.19.0-rc.1",
3
+ "version": "0.19.0-rc.10",
4
4
  "description": "A javascript / typescript client for Lemmy",
5
5
  "repository": "https://github.com/LemmyNet/lemmy-js-client",
6
6
  "license": "AGPL-3.0",
@@ -1,4 +0,0 @@
1
- import type { CommunityId } from "./CommunityId";
2
- export interface CommunityJoin {
3
- community_id: CommunityId;
4
- }
@@ -1,3 +0,0 @@
1
- export interface CommunityJoinResponse {
2
- joined: boolean;
3
- }
@@ -1,3 +0,0 @@
1
- export interface GetBannedPersons {
2
- auth: string;
3
- }
@@ -1,3 +0,0 @@
1
- export interface GetCaptcha {
2
- auth?: string;
3
- }
@@ -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,3 +0,0 @@
1
- export interface GetFederatedInstances {
2
- auth?: string;
3
- }
@@ -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,3 +0,0 @@
1
- export interface GetSite {
2
- auth?: string;
3
- }
@@ -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,3 +0,0 @@
1
- export interface GetUnreadCount {
2
- auth: string;
3
- }
@@ -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,3 +0,0 @@
1
- export interface GetUnreadRegistrationApplicationCount {
2
- auth: string;
3
- }
@@ -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,3 +0,0 @@
1
- export interface LeaveAdmin {
2
- auth: string;
3
- }
@@ -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,3 +0,0 @@
1
- export interface MarkAllAsRead {
2
- auth: string;
3
- }
@@ -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,4 +0,0 @@
1
- import type { CommunityId } from "./CommunityId";
2
- export interface ModJoin {
3
- community_id: CommunityId;
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export interface ModJoinResponse {
2
- joined: boolean;
3
- }
@@ -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,4 +0,0 @@
1
- import type { PostId } from "./PostId";
2
- export interface PostJoin {
3
- post_id: PostId;
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export interface PostJoinResponse {
2
- joined: boolean;
3
- }
@@ -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,7 +0,0 @@
1
- import type { CommentId } from "./CommentId";
2
- import type { PostId } from "./PostId";
3
- export type PostOrCommentId = {
4
- Post: PostId;
5
- } | {
6
- Comment: CommentId;
7
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export interface UserJoin {
2
- auth: string;
3
- }
@@ -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,3 +0,0 @@
1
- export interface UserJoinResponse {
2
- joined: boolean;
3
- }
@@ -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 });
File without changes