lemmy-js-client 1.0.0-alpha.0 → 1.0.0-alpha.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.
Files changed (80) hide show
  1. package/dist/http.d.ts +26 -6
  2. package/dist/http.js +262 -237
  3. package/dist/index.d.ts +5 -1
  4. package/dist/types/BannedPersonsResponse.d.ts +1 -0
  5. package/dist/types/Comment.d.ts +5 -0
  6. package/dist/types/CommentReplyView.d.ts +5 -0
  7. package/dist/types/CommentSlimView.d.ts +3 -0
  8. package/dist/types/CommentView.d.ts +5 -0
  9. package/dist/types/Community.d.ts +1 -0
  10. package/dist/types/CommunityView.d.ts +2 -0
  11. package/dist/types/CreateCommunityTag.d.ts +8 -0
  12. package/dist/types/CreateCommunityTag.js +2 -0
  13. package/dist/types/CreateSite.d.ts +1 -1
  14. package/dist/types/DeleteCommunityTag.d.ts +7 -0
  15. package/dist/types/DeleteCommunityTag.js +2 -0
  16. package/dist/types/EditPost.d.ts +1 -1
  17. package/dist/types/EditSite.d.ts +4 -5
  18. package/dist/types/GetComments.d.ts +3 -1
  19. package/dist/types/GetCommentsResponse.d.ts +3 -0
  20. package/dist/types/GetCommentsSlimResponse.d.ts +3 -0
  21. package/dist/types/GetModlog.d.ts +1 -0
  22. package/dist/types/GetModlogResponse.d.ts +1 -0
  23. package/dist/types/GetPosts.d.ts +3 -9
  24. package/dist/types/GetPostsResponse.d.ts +3 -2
  25. package/dist/types/GetSiteResponse.d.ts +2 -0
  26. package/dist/types/InstanceActions.d.ts +8 -0
  27. package/dist/types/LemmyErrorType.d.ts +91 -22
  28. package/dist/types/ListCommentLikes.d.ts +3 -1
  29. package/dist/types/ListCommentLikesResponse.d.ts +6 -0
  30. package/dist/types/ListCommunities.d.ts +3 -1
  31. package/dist/types/ListCommunitiesResponse.d.ts +6 -0
  32. package/dist/types/ListCommunityPendingFollows.d.ts +3 -1
  33. package/dist/types/ListCommunityPendingFollows.js +0 -1
  34. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +6 -0
  35. package/dist/types/ListCustomEmojis.d.ts +0 -3
  36. package/dist/types/ListInbox.d.ts +1 -0
  37. package/dist/types/ListInboxResponse.d.ts +1 -0
  38. package/dist/types/ListMedia.d.ts +3 -1
  39. package/dist/types/ListMedia.js +0 -1
  40. package/dist/types/ListMediaResponse.d.ts +6 -0
  41. package/dist/types/ListPersonContent.d.ts +1 -0
  42. package/dist/types/ListPersonContentResponse.d.ts +1 -0
  43. package/dist/types/ListPersonSaved.d.ts +1 -0
  44. package/dist/types/ListPersonSavedResponse.d.ts +1 -0
  45. package/dist/types/ListPostLikes.d.ts +3 -1
  46. package/dist/types/ListPostLikesResponse.d.ts +6 -0
  47. package/dist/types/ListRegistrationApplications.d.ts +3 -1
  48. package/dist/types/ListRegistrationApplications.js +0 -1
  49. package/dist/types/ListRegistrationApplicationsResponse.d.ts +6 -0
  50. package/dist/types/ListReports.d.ts +1 -0
  51. package/dist/types/ListReportsResponse.d.ts +1 -0
  52. package/dist/types/ListTaglines.d.ts +3 -1
  53. package/dist/types/ListTaglines.js +0 -1
  54. package/dist/types/ListTaglinesResponse.d.ts +6 -0
  55. package/dist/types/LocalSite.d.ts +4 -5
  56. package/dist/types/LocalUserView.d.ts +2 -0
  57. package/dist/types/ModBan.d.ts +2 -0
  58. package/dist/types/MyUserInfo.d.ts +1 -0
  59. package/dist/types/Person.d.ts +0 -8
  60. package/dist/types/PersonCommentMentionView.d.ts +3 -0
  61. package/dist/types/PersonPostMentionView.d.ts +5 -0
  62. package/dist/types/PersonView.d.ts +4 -0
  63. package/dist/types/PluginMetadata.d.ts +5 -0
  64. package/dist/types/Post.d.ts +5 -0
  65. package/dist/types/PostView.d.ts +5 -0
  66. package/dist/types/SaveUserSettings.d.ts +1 -0
  67. package/dist/types/Search.d.ts +1 -0
  68. package/dist/types/SearchResponse.d.ts +1 -0
  69. package/dist/types/SiteView.d.ts +2 -0
  70. package/dist/types/Tag.d.ts +8 -6
  71. package/dist/types/Tagline.d.ts +2 -1
  72. package/dist/types/Tagline.js +0 -1
  73. package/dist/types/TagsView.d.ts +5 -0
  74. package/dist/types/TagsView.js +2 -0
  75. package/dist/types/UpdateCommunityTag.d.ts +8 -0
  76. package/dist/types/UpdateCommunityTag.js +2 -0
  77. package/dist/types/VoteView.d.ts +1 -0
  78. package/package.json +2 -2
  79. package/dist/types/PostPaginationCursor.d.ts +0 -7
  80. /package/dist/types/{PostPaginationCursor.js → PluginMetadata.js} +0 -0
package/dist/http.d.ts CHANGED
@@ -23,6 +23,7 @@ import { CreateComment } from "./types/CreateComment";
23
23
  import { CreateCommentLike } from "./types/CreateCommentLike";
24
24
  import { CreateCommentReport } from "./types/CreateCommentReport";
25
25
  import { CreateCommunity } from "./types/CreateCommunity";
26
+ import { CreateCommunityTag } from "./types/CreateCommunityTag";
26
27
  import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
27
28
  import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
28
29
  import { CreatePost } from "./types/CreatePost";
@@ -35,6 +36,7 @@ import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
35
36
  import { DeleteAccount } from "./types/DeleteAccount";
36
37
  import { DeleteComment } from "./types/DeleteComment";
37
38
  import { DeleteCommunity } from "./types/DeleteCommunity";
39
+ import { DeleteCommunityTag } from "./types/DeleteCommunityTag";
38
40
  import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
39
41
  import { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
40
42
  import { DeletePost } from "./types/DeletePost";
@@ -96,6 +98,7 @@ import { SaveUserSettings } from "./types/SaveUserSettings";
96
98
  import { SearchResponse } from "./types/SearchResponse";
97
99
  import { SiteResponse } from "./types/SiteResponse";
98
100
  import { TransferCommunity } from "./types/TransferCommunity";
101
+ import { UpdateCommunityTag } from "./types/UpdateCommunityTag";
99
102
  import { VerifyEmail } from "./types/VerifyEmail";
100
103
  import { HideCommunity } from "./types/HideCommunity";
101
104
  import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
@@ -129,6 +132,7 @@ import { ListInboxResponse } from "./types/ListInboxResponse";
129
132
  import { MarkPersonCommentMentionAsRead } from "./types/MarkPersonCommentMentionAsRead";
130
133
  import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead";
131
134
  import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
135
+ import { Tag } from "./types/Tag";
132
136
  import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
133
137
  type RequestOptions = Pick<RequestInit, "signal">;
134
138
  /**
@@ -194,13 +198,21 @@ export declare class LemmyHttp extends Controller {
194
198
  */
195
199
  validateAuth(options?: RequestOptions): Promise<SuccessResponse>;
196
200
  /**
197
- * @summary List all the media for your user
201
+ * @summary List all the media for your account.
198
202
  */
199
203
  listMedia(form?: ListMediaI, options?: RequestOptions): Promise<ListMediaResponse>;
204
+ /**
205
+ * @summary Delete media for your account.
206
+ */
207
+ deleteMedia(form: DeleteImageParamsI, options?: RequestOptions): Promise<SuccessResponse>;
208
+ /**
209
+ * @summary Delete any media. (Admin only)
210
+ */
211
+ deleteMediaAdmin(form: DeleteImageParamsI, options?: RequestOptions): Promise<SuccessResponse>;
200
212
  /**
201
213
  * @summary List all the media known to your instance.
202
214
  */
203
- listAllMedia(form?: ListMediaI, options?: RequestOptions): Promise<ListMediaResponse>;
215
+ listMediaAdmin(form?: ListMediaI, options?: RequestOptions): Promise<ListMediaResponse>;
204
216
  /**
205
217
  * @summary Enable / Disable TOTP / two-factor authentication.
206
218
  *
@@ -593,6 +605,18 @@ export declare class LemmyHttp extends Controller {
593
605
  * @summary List taglines.
594
606
  */
595
607
  listTaglines(form: ListTaglinesI, options?: RequestOptions): Promise<ListTaglinesResponse>;
608
+ /**
609
+ * @summary Create a community post tag.
610
+ */
611
+ createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<Tag>;
612
+ /**
613
+ * @summary Update a community post tag.
614
+ */
615
+ updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<Tag>;
616
+ /**
617
+ * @summary Delete a post tag in a community.
618
+ */
619
+ deleteCommunityTag(form: DeleteCommunityTag, options?: RequestOptions): Promise<Tag>;
596
620
  /**
597
621
  * @summary Create a new oauth provider method
598
622
  */
@@ -681,10 +705,6 @@ export declare class LemmyHttp extends Controller {
681
705
  * @summary Upload an image to the server.
682
706
  */
683
707
  uploadImage(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
684
- /**
685
- * @summary Delete a pictrs image
686
- */
687
- deleteImage(form: DeleteImageParamsI, options?: RequestOptions): Promise<SuccessResponse>;
688
708
  /**
689
709
  * @summary Health check for image functionality
690
710
  */