lemmy-js-client 1.0.0-post-tags.0 → 1.0.0-site-person-ban.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.
Files changed (131) hide show
  1. package/README.md +12 -3
  2. package/dist/http.d.ts +8 -30
  3. package/dist/http.js +119 -145
  4. package/dist/index.d.ts +15 -24
  5. package/dist/other_types.d.ts +3 -0
  6. package/dist/types/BannedPersonsResponse.d.ts +5 -0
  7. package/dist/types/Comment.d.ts +9 -0
  8. package/dist/types/CommentActions.d.ts +18 -0
  9. package/dist/types/CommentReplyView.d.ts +11 -11
  10. package/dist/types/CommentReport.d.ts +1 -0
  11. package/dist/types/CommentReportView.d.ts +8 -10
  12. package/dist/types/CommentSlimView.d.ts +9 -10
  13. package/dist/types/CommentView.d.ts +10 -10
  14. package/dist/types/Community.d.ts +25 -6
  15. package/dist/types/CommunityActions.d.ts +35 -0
  16. package/dist/types/CommunityReportResponse.d.ts +7 -0
  17. package/dist/types/CommunityReportView.d.ts +0 -4
  18. package/dist/types/CommunitySortType.d.ts +1 -1
  19. package/dist/types/CommunityView.d.ts +5 -6
  20. package/dist/types/CommunityVisibility.d.ts +1 -1
  21. package/dist/types/CreateCommentReport.d.ts +1 -0
  22. package/dist/types/CreateCommunityReport.d.ts +8 -0
  23. package/dist/types/CreatePostReport.d.ts +1 -0
  24. package/dist/types/CreateSite.d.ts +2 -0
  25. package/dist/types/EditPost.d.ts +2 -0
  26. package/dist/types/EditSite.d.ts +8 -0
  27. package/dist/types/FederationError.d.ts +1 -1
  28. package/dist/types/GetComments.d.ts +5 -0
  29. package/dist/types/GetModlog.d.ts +26 -2
  30. package/dist/types/GetModlogResponse.d.ts +5 -0
  31. package/dist/types/GetPostResponse.d.ts +0 -2
  32. package/dist/types/GetPosts.d.ts +8 -2
  33. package/dist/types/GetPostsResponse.d.ts +2 -2
  34. package/dist/types/GetSiteResponse.d.ts +2 -2
  35. package/dist/types/ImageDetails.d.ts +1 -0
  36. package/dist/types/Instance.d.ts +9 -0
  37. package/dist/types/InstanceActions.d.ts +18 -0
  38. package/dist/types/InstanceWithFederationState.d.ts +9 -0
  39. package/dist/types/LemmyErrorType.d.ts +6 -4
  40. package/dist/types/ListBannedPersons.d.ts +9 -0
  41. package/dist/types/ListCommunities.d.ts +5 -0
  42. package/dist/types/ListInbox.d.ts +2 -2
  43. package/dist/types/ListInboxResponse.d.ts +5 -0
  44. package/dist/types/ListPersonContent.d.ts +2 -2
  45. package/dist/types/ListPersonContentResponse.d.ts +5 -0
  46. package/dist/types/ListPersonSaved.d.ts +2 -2
  47. package/dist/types/ListPersonSavedResponse.d.ts +7 -2
  48. package/dist/types/ListReports.d.ts +10 -2
  49. package/dist/types/ListReportsResponse.d.ts +5 -0
  50. package/dist/types/LocalSite.d.ts +28 -0
  51. package/dist/types/LocalUser.d.ts +8 -0
  52. package/dist/types/LocalUserView.d.ts +2 -4
  53. package/dist/types/ModBan.d.ts +2 -0
  54. package/dist/types/ModChangeCommunityVisibility.d.ts +12 -0
  55. package/dist/types/ModChangeCommunityVisibilityId.d.ts +1 -0
  56. package/dist/types/ModChangeCommunityVisibilityView.d.ts +11 -0
  57. package/dist/types/ModlogActionType.d.ts +1 -1
  58. package/dist/types/ModlogCombinedView.d.ts +3 -3
  59. package/dist/types/PaginationCursor.d.ts +1 -4
  60. package/dist/types/PendingFollow.d.ts +2 -2
  61. package/dist/types/Person.d.ts +4 -10
  62. package/dist/types/PersonActions.d.ts +9 -0
  63. package/dist/types/PersonCommentMentionView.d.ts +11 -11
  64. package/dist/types/PersonPostMentionView.d.ts +11 -16
  65. package/dist/types/PersonSavedCombinedView.d.ts +7 -0
  66. package/dist/types/PersonView.d.ts +2 -2
  67. package/dist/types/Post.d.ts +10 -0
  68. package/dist/types/PostActions.d.ts +35 -0
  69. package/dist/types/PostPaginationCursor.d.ts +7 -0
  70. package/dist/types/PostReport.d.ts +1 -0
  71. package/dist/types/PostReportView.d.ts +8 -13
  72. package/dist/types/PostSortType.d.ts +1 -1
  73. package/dist/types/PostView.d.ts +10 -15
  74. package/dist/types/PrivateMessage.d.ts +1 -0
  75. package/dist/types/PrivateMessageReportView.d.ts +1 -1
  76. package/dist/types/ResendVerificationEmail.d.ts +7 -0
  77. package/dist/types/ResolveCommunityReport.d.ts +8 -0
  78. package/dist/types/SaveUserSettings.d.ts +4 -0
  79. package/dist/types/Search.d.ts +7 -2
  80. package/dist/types/SearchResponse.d.ts +5 -0
  81. package/dist/types/Site.d.ts +2 -2
  82. package/dist/types/SiteView.d.ts +0 -2
  83. package/package.json +3 -3
  84. package/dist/types/CommentAggregates.d.ts +0 -17
  85. package/dist/types/CommunityAggregates.d.ts +0 -30
  86. package/dist/types/CommunityTagResponse.d.ts +0 -7
  87. package/dist/types/CreateCommunityTag.d.ts +0 -9
  88. package/dist/types/DeleteCommunityTag.d.ts +0 -7
  89. package/dist/types/InboxCombinedPaginationCursor.d.ts +0 -4
  90. package/dist/types/ListCommunityTags.d.ts +0 -7
  91. package/dist/types/ListCommunityTagsResponse.d.ts +0 -4
  92. package/dist/types/LocalUserVoteDisplayMode.d.ts +0 -9
  93. package/dist/types/ModHideCommunity.d.ts +0 -14
  94. package/dist/types/ModHideCommunityId.d.ts +0 -1
  95. package/dist/types/ModHideCommunityId.js +0 -3
  96. package/dist/types/ModHideCommunityView.d.ts +0 -11
  97. package/dist/types/ModlogCombinedPaginationCursor.d.ts +0 -4
  98. package/dist/types/ModlogCombinedPaginationCursor.js +0 -3
  99. package/dist/types/PersonAggregates.d.ts +0 -9
  100. package/dist/types/PersonContentCombinedPaginationCursor.d.ts +0 -4
  101. package/dist/types/PersonContentCombinedPaginationCursor.js +0 -3
  102. package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +0 -4
  103. package/dist/types/PersonSavedCombinedPaginationCursor.js +0 -3
  104. package/dist/types/PostAggregates.d.ts +0 -18
  105. package/dist/types/PostTags.d.ts +0 -5
  106. package/dist/types/ReportCombinedPaginationCursor.d.ts +0 -4
  107. package/dist/types/ReportCombinedPaginationCursor.js +0 -3
  108. package/dist/types/SearchCombinedPaginationCursor.d.ts +0 -4
  109. package/dist/types/SearchCombinedPaginationCursor.js +0 -3
  110. package/dist/types/SiteAggregates.d.ts +0 -27
  111. package/dist/types/SubscribedType.d.ts +0 -4
  112. package/dist/types/SubscribedType.js +0 -3
  113. package/dist/types/UpdateCommunityTag.d.ts +0 -8
  114. package/dist/types/UpdateCommunityTag.js +0 -2
  115. package/dist/types/UpdatePostTags.d.ts +0 -9
  116. package/dist/types/UpdatePostTags.js +0 -2
  117. /package/dist/types/{CommentAggregates.js → CommentActions.js} +0 -0
  118. /package/dist/types/{CommunityAggregates.js → CommunityActions.js} +0 -0
  119. /package/dist/types/{CommunityTagResponse.js → CommunityReportResponse.js} +0 -0
  120. /package/dist/types/{CreateCommunityTag.js → CreateCommunityReport.js} +0 -0
  121. /package/dist/types/{DeleteCommunityTag.js → InstanceActions.js} +0 -0
  122. /package/dist/types/{ListCommunityTags.js → ListBannedPersons.js} +0 -0
  123. /package/dist/types/{ListCommunityTagsResponse.js → ModChangeCommunityVisibility.js} +0 -0
  124. /package/dist/types/{InboxCombinedPaginationCursor.js → ModChangeCommunityVisibilityId.js} +0 -0
  125. /package/dist/types/{ModHideCommunity.js → ModChangeCommunityVisibilityView.js} +0 -0
  126. /package/dist/types/{ModHideCommunityView.js → PersonActions.js} +0 -0
  127. /package/dist/types/{PersonAggregates.js → PersonSavedCombinedView.js} +0 -0
  128. /package/dist/types/{PostAggregates.js → PostActions.js} +0 -0
  129. /package/dist/types/{LocalUserVoteDisplayMode.js → PostPaginationCursor.js} +0 -0
  130. /package/dist/types/{PostTags.js → ResendVerificationEmail.js} +0 -0
  131. /package/dist/types/{SiteAggregates.js → ResolveCommunityReport.js} +0 -0
package/README.md CHANGED
@@ -50,6 +50,15 @@ const posts = await client.getPosts(getPostsForm);
50
50
 
51
51
  Use `pnpm add` to develop and test changes locally:
52
52
 
53
- ```
54
- pnpm add path/to/lemmy-js-client
55
- ```
53
+ `pnpm add path/to/lemmy-js-client`
54
+
55
+ ## OpenAPI
56
+
57
+ To generate OpenAPI docs, run `pnpm tsoa`
58
+
59
+ This creates two files:
60
+
61
+ - `redoc-static.html` - A static html rendering of the OpenAPI docs.
62
+ - `tsoa_build/swagger.json` - An OpenAPI / Swagger json file.
63
+
64
+ To contribute, check out the [tsoa docs](https://tsoa-community.github.io/docs/).
package/dist/http.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Controller } from "tsoa";
2
+ import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListBannedPersonsI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
1
3
  import { AddAdmin } from "./types/AddAdmin";
2
4
  import { AddAdminResponse } from "./types/AddAdminResponse";
3
5
  import { AddModToCommunity } from "./types/AddModToCommunity";
@@ -21,7 +23,6 @@ import { CreateComment } from "./types/CreateComment";
21
23
  import { CreateCommentLike } from "./types/CreateCommentLike";
22
24
  import { CreateCommentReport } from "./types/CreateCommentReport";
23
25
  import { CreateCommunity } from "./types/CreateCommunity";
24
- import { CreateCommunityTag } from "./types/CreateCommunityTag";
25
26
  import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
26
27
  import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
27
28
  import { CreatePost } from "./types/CreatePost";
@@ -34,7 +35,6 @@ import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
34
35
  import { DeleteAccount } from "./types/DeleteAccount";
35
36
  import { DeleteComment } from "./types/DeleteComment";
36
37
  import { DeleteCommunity } from "./types/DeleteCommunity";
37
- import { DeleteCommunityTag } from "./types/DeleteCommunityTag";
38
38
  import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
39
39
  import { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
40
40
  import { DeletePost } from "./types/DeletePost";
@@ -64,8 +64,6 @@ import { GetSiteResponse } from "./types/GetSiteResponse";
64
64
  import { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
65
65
  import { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
66
66
  import { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
67
- import { ListCommunityTags } from "./types/ListCommunityTags";
68
- import { ListCommunityTagsResponse } from "./types/ListCommunityTagsResponse";
69
67
  import { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
70
68
  import { LockPost } from "./types/LockPost";
71
69
  import { Login } from "./types/Login";
@@ -98,10 +96,7 @@ import { SaveUserSettings } from "./types/SaveUserSettings";
98
96
  import { SearchResponse } from "./types/SearchResponse";
99
97
  import { SiteResponse } from "./types/SiteResponse";
100
98
  import { TransferCommunity } from "./types/TransferCommunity";
101
- import { UpdateCommunityTag } from "./types/UpdateCommunityTag";
102
- import { UpdatePostTags } from "./types/UpdatePostTags";
103
99
  import { VerifyEmail } from "./types/VerifyEmail";
104
- import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
105
100
  import { HideCommunity } from "./types/HideCommunity";
106
101
  import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
107
102
  import { UpdateTotp } from "./types/UpdateTotp";
@@ -134,8 +129,7 @@ import { ListInboxResponse } from "./types/ListInboxResponse";
134
129
  import { MarkPersonCommentMentionAsRead } from "./types/MarkPersonCommentMentionAsRead";
135
130
  import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead";
136
131
  import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
137
- import { Controller } from "tsoa";
138
- import { CommunityTagResponse } from "./types/CommunityTagResponse";
132
+ import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
139
133
  type RequestOptions = Pick<RequestInit, "signal">;
140
134
  /**
141
135
  * Helps build lemmy HTTP requests.
@@ -474,7 +468,7 @@ export declare class LemmyHttp extends Controller {
474
468
  /**
475
469
  * @summary Get a list of banned users.
476
470
  */
477
- getBannedPersons(options?: RequestOptions): Promise<BannedPersonsResponse>;
471
+ listBannedPersons(form?: ListBannedPersonsI, options?: RequestOptions): Promise<BannedPersonsResponse>;
478
472
  /**
479
473
  * @summary Block a person.
480
474
  */
@@ -523,6 +517,10 @@ export declare class LemmyHttp extends Controller {
523
517
  * @summary Verify your email
524
518
  */
525
519
  verifyEmail(form: VerifyEmail, options?: RequestOptions): Promise<SuccessResponse>;
520
+ /**
521
+ * @summary Resend a verification email.
522
+ */
523
+ resendVerificationEmail(form: ResendVerificationEmail, options?: RequestOptions): Promise<SuccessResponse>;
526
524
  /**
527
525
  * @summary List your saved content.
528
526
  */
@@ -595,26 +593,6 @@ export declare class LemmyHttp extends Controller {
595
593
  * @summary List taglines.
596
594
  */
597
595
  listTaglines(form: ListTaglinesI, options?: RequestOptions): Promise<ListTaglinesResponse>;
598
- /**
599
- * @summary Create a community tag.
600
- */
601
- createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
602
- /**
603
- * @summary Update a community tag.
604
- */
605
- updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
606
- /**
607
- * @summary List community tags.
608
- */
609
- listCommunityTags(form: ListCommunityTags, options?: RequestOptions): Promise<ListCommunityTagsResponse>;
610
- /**
611
- * @summary Delete a community tag.
612
- */
613
- deleteCommunityTag(form: DeleteCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
614
- /**
615
- * @summary Update post tags.
616
- */
617
- updatePostTags(form: UpdatePostTags, options?: RequestOptions): Promise<PostResponse>;
618
596
  /**
619
597
  * @summary Create a new oauth provider method
620
598
  */
package/dist/http.js CHANGED
@@ -8,6 +8,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __param = (this && this.__param) || function (paramIndex, decorator) {
9
9
  return function (target, key) { decorator(target, key, paramIndex); }
10
10
  };
11
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
11
20
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12
21
  if (kind === "m") throw new TypeError("Private method is not writable");
13
22
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
@@ -22,8 +31,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
22
31
  var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_upload, _LemmyHttp_wrapper;
23
32
  Object.defineProperty(exports, "__esModule", { value: true });
24
33
  exports.LemmyHttp = void 0;
25
- const other_types_1 = require("./other_types");
26
34
  const tsoa_1 = require("tsoa");
35
+ const other_types_1 = require("./other_types");
27
36
  var HttpType;
28
37
  (function (HttpType) {
29
38
  HttpType["Get"] = "GET";
@@ -47,10 +56,10 @@ let LemmyHttp = class LemmyHttp extends tsoa_1.Controller {
47
56
  _LemmyHttp_headers.set(this, {});
48
57
  _LemmyHttp_fetchFunction.set(this, fetch.bind(globalThis));
49
58
  __classPrivateFieldSet(this, _LemmyHttp_apiUrl, `${baseUrl.replace(/\/+$/, "")}/api/${other_types_1.VERSION}`, "f");
50
- if (options?.headers) {
59
+ if (options === null || options === void 0 ? void 0 : options.headers) {
51
60
  __classPrivateFieldSet(this, _LemmyHttp_headers, options.headers, "f");
52
61
  }
53
- if (options?.fetchFunction) {
62
+ if (options === null || options === void 0 ? void 0 : options.fetchFunction) {
54
63
  __classPrivateFieldSet(this, _LemmyHttp_fetchFunction, options.fetchFunction, "f");
55
64
  }
56
65
  }
@@ -529,8 +538,8 @@ let LemmyHttp = class LemmyHttp extends tsoa_1.Controller {
529
538
  /**
530
539
  * @summary Get a list of banned users.
531
540
  */
532
- getBannedPersons(options) {
533
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", {}, options);
541
+ listBannedPersons(form = {}, options) {
542
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", form, options);
534
543
  }
535
544
  /**
536
545
  * @summary Block a person.
@@ -604,6 +613,12 @@ let LemmyHttp = class LemmyHttp extends tsoa_1.Controller {
604
613
  verifyEmail(form, options) {
605
614
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
606
615
  }
616
+ /**
617
+ * @summary Resend a verification email.
618
+ */
619
+ resendVerificationEmail(form, options) {
620
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/resend_verification_email", form, options);
621
+ }
607
622
  /**
608
623
  * @summary List your saved content.
609
624
  */
@@ -712,36 +727,6 @@ let LemmyHttp = class LemmyHttp extends tsoa_1.Controller {
712
727
  listTaglines(form, options) {
713
728
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/tagline/list", form, options);
714
729
  }
715
- /**
716
- * @summary Create a community tag.
717
- */
718
- createCommunityTag(form, options) {
719
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/post_tag", form, options);
720
- }
721
- /**
722
- * @summary Update a community tag.
723
- */
724
- updateCommunityTag(form, options) {
725
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/post_tag", form, options);
726
- }
727
- /**
728
- * @summary List community tags.
729
- */
730
- listCommunityTags(form, options) {
731
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/post_tag/list", form, options);
732
- }
733
- /**
734
- * @summary Delete a community tag.
735
- */
736
- deleteCommunityTag(form, options) {
737
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/post_tag", form, options);
738
- }
739
- /**
740
- * @summary Update post tags.
741
- */
742
- updatePostTags(form, options) {
743
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/tags", form, options);
744
- }
745
730
  /**
746
731
  * @summary Create a new oauth provider method
747
732
  */
@@ -799,92 +784,122 @@ let LemmyHttp = class LemmyHttp extends tsoa_1.Controller {
799
784
  /**
800
785
  * @summary Upload new user avatar.
801
786
  */
802
- async uploadUserAvatar(image, options) {
803
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
787
+ uploadUserAvatar(image, options) {
788
+ return __awaiter(this, void 0, void 0, function* () {
789
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
790
+ });
804
791
  }
805
792
  /**
806
793
  * @summary Delete the user avatar.
807
794
  */
808
- async deleteUserAvatar(options) {
809
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
795
+ deleteUserAvatar(options) {
796
+ return __awaiter(this, void 0, void 0, function* () {
797
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
798
+ });
810
799
  }
811
800
  /**
812
801
  * @summary Upload new user banner.
813
802
  */
814
- async uploadUserBanner(image, options) {
815
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
803
+ uploadUserBanner(image, options) {
804
+ return __awaiter(this, void 0, void 0, function* () {
805
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
806
+ });
816
807
  }
817
808
  /**
818
809
  * @summary Delete the user banner.
819
810
  */
820
- async deleteUserBanner(options) {
821
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
811
+ deleteUserBanner(options) {
812
+ return __awaiter(this, void 0, void 0, function* () {
813
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
814
+ });
822
815
  }
823
816
  /**
824
817
  * @summary Upload new community icon.
825
818
  */
826
- async uploadCommunityIcon(image, options) {
827
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/icon", image, options);
819
+ uploadCommunityIcon(image, options) {
820
+ return __awaiter(this, void 0, void 0, function* () {
821
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/icon", image, options);
822
+ });
828
823
  }
829
824
  /**
830
825
  * @summary Delete the community icon.
831
826
  */
832
- async deleteCommunityIcon(options) {
833
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", {}, options);
827
+ deleteCommunityIcon(options) {
828
+ return __awaiter(this, void 0, void 0, function* () {
829
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", {}, options);
830
+ });
834
831
  }
835
832
  /**
836
833
  * @summary Upload new community banner.
837
834
  */
838
- async uploadCommunityBanner(image, options) {
839
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/banner", image, options);
835
+ uploadCommunityBanner(image, options) {
836
+ return __awaiter(this, void 0, void 0, function* () {
837
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/banner", image, options);
838
+ });
840
839
  }
841
840
  /**
842
841
  * @summary Delete the community banner.
843
842
  */
844
- async deleteCommunityBanner(options) {
845
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", {}, options);
843
+ deleteCommunityBanner(options) {
844
+ return __awaiter(this, void 0, void 0, function* () {
845
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", {}, options);
846
+ });
846
847
  }
847
848
  /**
848
849
  * @summary Upload new site icon.
849
850
  */
850
- async uploadSiteIcon(image, options) {
851
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
851
+ uploadSiteIcon(image, options) {
852
+ return __awaiter(this, void 0, void 0, function* () {
853
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
854
+ });
852
855
  }
853
856
  /**
854
857
  * @summary Delete the site icon.
855
858
  */
856
- async deleteSiteIcon(options) {
857
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
859
+ deleteSiteIcon(options) {
860
+ return __awaiter(this, void 0, void 0, function* () {
861
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
862
+ });
858
863
  }
859
864
  /**
860
865
  * @summary Upload new site banner.
861
866
  */
862
- async uploadSiteBanner(image, options) {
863
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
867
+ uploadSiteBanner(image, options) {
868
+ return __awaiter(this, void 0, void 0, function* () {
869
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
870
+ });
864
871
  }
865
872
  /**
866
873
  * @summary Delete the site banner.
867
874
  */
868
- async deleteSiteBanner(options) {
869
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
875
+ deleteSiteBanner(options) {
876
+ return __awaiter(this, void 0, void 0, function* () {
877
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
878
+ });
870
879
  }
871
880
  /**
872
881
  * @summary Upload an image to the server.
873
882
  */
874
- async uploadImage(image, options) {
875
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
883
+ uploadImage(image, options) {
884
+ return __awaiter(this, void 0, void 0, function* () {
885
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
886
+ });
876
887
  }
877
888
  /**
878
889
  * @summary Delete a pictrs image
879
890
  */
880
- async deleteImage(form, options) {
881
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
891
+ deleteImage(form, options) {
892
+ return __awaiter(this, void 0, void 0, function* () {
893
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
894
+ });
882
895
  }
883
896
  /**
884
897
  * @summary Health check for image functionality
885
898
  */
886
- async imageHealth(options) {
887
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
899
+ imageHealth(options) {
900
+ return __awaiter(this, void 0, void 0, function* () {
901
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
902
+ });
888
903
  }
889
904
  /**
890
905
  * Set the headers (can be used to set the auth header)
@@ -901,50 +916,38 @@ _LemmyHttp_instances = new WeakSet();
901
916
  _LemmyHttp_buildFullUrl = function _LemmyHttp_buildFullUrl(endpoint) {
902
917
  return `${__classPrivateFieldGet(this, _LemmyHttp_apiUrl, "f")}${endpoint}`;
903
918
  };
904
- _LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
905
- const formData = createFormData(image);
906
- const response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, path), {
907
- ...options,
908
- method: HttpType.Post,
909
- body: formData,
910
- headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
919
+ _LemmyHttp_upload = function _LemmyHttp_upload(path_1, _a, options_1) {
920
+ return __awaiter(this, arguments, void 0, function* (path, { image }, options) {
921
+ const formData = createFormData(image);
922
+ const response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, path), Object.assign(Object.assign({}, options), { method: HttpType.Post, body: formData, headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f") }));
923
+ return response.json();
911
924
  });
912
- return response.json();
913
925
  };
914
- _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
915
- let response;
916
- if (type_ === HttpType.Get) {
917
- const getUrl = `${__classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint)}?${encodeGetParams(form)}`;
918
- response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, getUrl, {
919
- ...options,
920
- method: HttpType.Get,
921
- headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
922
- });
923
- }
924
- else {
925
- response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint), {
926
- ...options,
927
- method: type_,
928
- headers: {
929
- "Content-Type": "application/json",
930
- ...__classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
931
- },
932
- body: JSON.stringify(form),
933
- });
934
- }
935
- let json = undefined;
936
- try {
937
- json = await response.json();
938
- }
939
- catch {
940
- throw new Error(response.statusText);
941
- }
942
- if (!response.ok) {
943
- throw new Error(json["error"] ?? response.statusText);
944
- }
945
- else {
946
- return json;
947
- }
926
+ _LemmyHttp_wrapper = function _LemmyHttp_wrapper(type_, endpoint, form, options) {
927
+ return __awaiter(this, void 0, void 0, function* () {
928
+ var _a;
929
+ let response;
930
+ if (type_ === HttpType.Get) {
931
+ const getUrl = `${__classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint)}?${encodeGetParams(form)}`;
932
+ response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, getUrl, Object.assign(Object.assign({}, options), { method: HttpType.Get, headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f") }));
933
+ }
934
+ else {
935
+ response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint), Object.assign(Object.assign({}, options), { method: type_, headers: Object.assign({ "Content-Type": "application/json" }, __classPrivateFieldGet(this, _LemmyHttp_headers, "f")), body: JSON.stringify(form) }));
936
+ }
937
+ let json = undefined;
938
+ try {
939
+ json = yield response.json();
940
+ }
941
+ catch (_b) {
942
+ throw new Error(response.statusText);
943
+ }
944
+ if (!response.ok) {
945
+ throw new Error((_a = json["error"]) !== null && _a !== void 0 ? _a : response.statusText);
946
+ }
947
+ else {
948
+ return json;
949
+ }
950
+ });
948
951
  };
949
952
  __decorate([
950
953
  (0, tsoa_1.Security)("bearerAuth"),
@@ -1494,8 +1497,9 @@ __decorate([
1494
1497
  (0, tsoa_1.Security)("bearerAuth"),
1495
1498
  (0, tsoa_1.Get)("/admin/banned"),
1496
1499
  (0, tsoa_1.Tags)("Admin", "Miscellaneous"),
1497
- __param(0, (0, tsoa_1.Inject)())
1498
- ], LemmyHttp.prototype, "getBannedPersons", null);
1500
+ __param(0, (0, tsoa_1.Queries)()),
1501
+ __param(1, (0, tsoa_1.Inject)())
1502
+ ], LemmyHttp.prototype, "listBannedPersons", null);
1499
1503
  __decorate([
1500
1504
  (0, tsoa_1.Security)("bearerAuth"),
1501
1505
  (0, tsoa_1.Post)("/account/block/person"),
@@ -1575,6 +1579,12 @@ __decorate([
1575
1579
  __param(0, (0, tsoa_1.Body)()),
1576
1580
  __param(1, (0, tsoa_1.Inject)())
1577
1581
  ], LemmyHttp.prototype, "verifyEmail", null);
1582
+ __decorate([
1583
+ (0, tsoa_1.Post)("/account/auth/resend_verification_email"),
1584
+ (0, tsoa_1.Tags)("Account"),
1585
+ __param(0, (0, tsoa_1.Body)()),
1586
+ __param(1, (0, tsoa_1.Inject)())
1587
+ ], LemmyHttp.prototype, "resendVerificationEmail", null);
1578
1588
  __decorate([
1579
1589
  (0, tsoa_1.Security)("bearerAuth"),
1580
1590
  (0, tsoa_1.Get)("/account/auth/saved"),
@@ -1702,42 +1712,6 @@ __decorate([
1702
1712
  __param(0, (0, tsoa_1.Queries)()),
1703
1713
  __param(1, (0, tsoa_1.Inject)())
1704
1714
  ], LemmyHttp.prototype, "listTaglines", null);
1705
- __decorate([
1706
- (0, tsoa_1.Security)("bearerAuth"),
1707
- (0, tsoa_1.Post)("/community/post_tag"),
1708
- (0, tsoa_1.Tags)("Community"),
1709
- __param(0, (0, tsoa_1.Body)()),
1710
- __param(1, (0, tsoa_1.Inject)())
1711
- ], LemmyHttp.prototype, "createCommunityTag", null);
1712
- __decorate([
1713
- (0, tsoa_1.Security)("bearerAuth"),
1714
- (0, tsoa_1.Put)("/community/post_tag"),
1715
- (0, tsoa_1.Tags)("Community"),
1716
- __param(0, (0, tsoa_1.Body)()),
1717
- __param(1, (0, tsoa_1.Inject)())
1718
- ], LemmyHttp.prototype, "updateCommunityTag", null);
1719
- __decorate([
1720
- (0, tsoa_1.Security)("bearerAuth"),
1721
- (0, tsoa_1.Security)({}),
1722
- (0, tsoa_1.Get)("/community/post_tag/list"),
1723
- (0, tsoa_1.Tags)("Community"),
1724
- __param(0, (0, tsoa_1.Queries)()),
1725
- __param(1, (0, tsoa_1.Inject)())
1726
- ], LemmyHttp.prototype, "listCommunityTags", null);
1727
- __decorate([
1728
- (0, tsoa_1.Security)("bearerAuth"),
1729
- (0, tsoa_1.Post)("/community/post_tag"),
1730
- (0, tsoa_1.Tags)("Community"),
1731
- __param(0, (0, tsoa_1.Body)()),
1732
- __param(1, (0, tsoa_1.Inject)())
1733
- ], LemmyHttp.prototype, "deleteCommunityTag", null);
1734
- __decorate([
1735
- (0, tsoa_1.Security)("bearerAuth"),
1736
- (0, tsoa_1.Put)("/post/tags"),
1737
- (0, tsoa_1.Tags)("Post"),
1738
- __param(0, (0, tsoa_1.Body)()),
1739
- __param(1, (0, tsoa_1.Inject)())
1740
- ], LemmyHttp.prototype, "updatePostTags", null);
1741
1715
  __decorate([
1742
1716
  (0, tsoa_1.Security)("bearerAuth"),
1743
1717
  (0, tsoa_1.Post)("/oauth_provider"),