lemmy-js-client 0.20.0-api-v4.17 → 0.20.0-api-no-optional-vec.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 (221) hide show
  1. package/README.md +13 -4
  2. package/dist/http.d.ts +237 -430
  3. package/dist/http.js +1225 -411
  4. package/dist/index.d.ts +62 -20
  5. package/dist/other_types.d.ts +80 -16
  6. package/dist/types/AdminAllowInstance.d.ts +2 -1
  7. package/dist/types/AdminAllowInstanceId.d.ts +1 -0
  8. package/dist/types/AdminAllowInstanceView.d.ts +1 -1
  9. package/dist/types/AdminBlockInstance.d.ts +2 -1
  10. package/dist/types/AdminBlockInstanceId.d.ts +1 -0
  11. package/dist/types/AdminPurgeComment.d.ts +3 -2
  12. package/dist/types/AdminPurgeCommentId.d.ts +1 -0
  13. package/dist/types/AdminPurgeCommentId.js +3 -0
  14. package/dist/types/AdminPurgeCommunity.d.ts +3 -2
  15. package/dist/types/AdminPurgeCommunityId.d.ts +1 -0
  16. package/dist/types/AdminPurgeCommunityId.js +3 -0
  17. package/dist/types/AdminPurgePerson.d.ts +3 -2
  18. package/dist/types/AdminPurgePersonId.d.ts +1 -0
  19. package/dist/types/AdminPurgePersonId.js +3 -0
  20. package/dist/types/AdminPurgePost.d.ts +3 -2
  21. package/dist/types/AdminPurgePostId.d.ts +1 -0
  22. package/dist/types/AdminPurgePostId.js +3 -0
  23. package/dist/types/AuthenticateWithOauth.d.ts +1 -1
  24. package/dist/types/CommentReplyView.d.ts +5 -1
  25. package/dist/types/CommentReport.d.ts +1 -0
  26. package/dist/types/CommentReportView.d.ts +4 -1
  27. package/dist/types/CommentSlimView.d.ts +24 -0
  28. package/dist/types/CommentView.d.ts +5 -1
  29. package/dist/types/Community.d.ts +2 -2
  30. package/dist/types/CommunityAggregates.d.ts +2 -0
  31. package/dist/types/CommunityReport.d.ts +22 -0
  32. package/dist/types/CommunityReportId.d.ts +4 -0
  33. package/dist/types/CommunityReportId.js +3 -0
  34. package/dist/types/CommunityReportView.d.ts +16 -0
  35. package/dist/types/CommunitySortType.d.ts +1 -1
  36. package/dist/types/CommunityView.d.ts +1 -0
  37. package/dist/types/CreateCommentReport.d.ts +1 -0
  38. package/dist/types/CreateCommunity.d.ts +1 -1
  39. package/dist/types/CreatePost.d.ts +2 -0
  40. package/dist/types/CreatePostReport.d.ts +1 -0
  41. package/dist/types/CreateSite.d.ts +3 -5
  42. package/dist/types/DeleteImageParams.d.ts +3 -0
  43. package/dist/types/DeleteImageParams.js +3 -0
  44. package/dist/types/EditCommunity.d.ts +1 -9
  45. package/dist/types/EditPost.d.ts +2 -0
  46. package/dist/types/EditSite.d.ts +11 -18
  47. package/dist/types/FederationError.d.ts +2 -2
  48. package/dist/types/GetComments.d.ts +5 -1
  49. package/dist/types/GetCommentsSlimResponse.d.ts +7 -0
  50. package/dist/types/GetModlog.d.ts +27 -2
  51. package/dist/types/GetModlogResponse.d.ts +2 -34
  52. package/dist/types/GetPersonDetails.d.ts +0 -7
  53. package/dist/types/GetPersonDetailsResponse.d.ts +0 -4
  54. package/dist/types/GetPostResponse.d.ts +0 -2
  55. package/dist/types/GetPosts.d.ts +12 -0
  56. package/dist/types/GetRandomCommunity.d.ts +1 -0
  57. package/dist/types/GetReportCountResponse.d.ts +1 -5
  58. package/dist/types/GetReportCountResponse.js +1 -0
  59. package/dist/types/GetSiteResponse.d.ts +3 -10
  60. package/dist/types/GetUnreadCountResponse.d.ts +2 -4
  61. package/dist/types/ImageDetails.d.ts +1 -0
  62. package/dist/types/ImageGetParams.d.ts +4 -0
  63. package/dist/types/ImageGetParams.js +3 -0
  64. package/dist/types/ImageProxyParams.d.ts +5 -0
  65. package/dist/types/ImageProxyParams.js +3 -0
  66. package/dist/types/InboxCombinedPaginationCursor.d.ts +4 -0
  67. package/dist/types/InboxCombinedPaginationCursor.js +3 -0
  68. package/dist/types/InboxCombinedView.d.ts +13 -0
  69. package/dist/types/InboxDataType.d.ts +4 -0
  70. package/dist/types/InboxDataType.js +3 -0
  71. package/dist/types/LemmyErrorType.d.ts +5 -3
  72. package/dist/types/ListCommunities.d.ts +5 -0
  73. package/dist/types/ListInbox.d.ts +11 -0
  74. package/dist/types/ListInboxResponse.d.ts +7 -0
  75. package/dist/types/ListPersonContent.d.ts +18 -0
  76. package/dist/types/ListPersonContentResponse.d.ts +7 -0
  77. package/dist/types/ListPersonSaved.d.ts +10 -0
  78. package/dist/types/ListPersonSavedResponse.d.ts +7 -0
  79. package/dist/types/ListReports.d.ts +35 -0
  80. package/dist/types/ListReportsResponse.d.ts +7 -0
  81. package/dist/types/LocalImage.d.ts +0 -1
  82. package/dist/types/LocalSite.d.ts +9 -0
  83. package/dist/types/LocalUser.d.ts +13 -0
  84. package/dist/types/MarkPersonCommentMentionAsRead.d.ts +8 -0
  85. package/dist/types/MarkPersonPostMentionAsRead.d.ts +8 -0
  86. package/dist/types/ModAdd.d.ts +3 -2
  87. package/dist/types/ModAddCommunity.d.ts +3 -2
  88. package/dist/types/ModAddCommunityId.d.ts +1 -0
  89. package/dist/types/ModAddCommunityId.js +3 -0
  90. package/dist/types/ModAddCommunityView.d.ts +1 -1
  91. package/dist/types/ModAddId.d.ts +1 -0
  92. package/dist/types/ModAddId.js +3 -0
  93. package/dist/types/ModAddView.d.ts +1 -1
  94. package/dist/types/ModBan.d.ts +3 -2
  95. package/dist/types/ModBanFromCommunity.d.ts +3 -2
  96. package/dist/types/ModBanFromCommunityId.d.ts +1 -0
  97. package/dist/types/ModBanFromCommunityId.js +3 -0
  98. package/dist/types/ModBanFromCommunityView.d.ts +1 -1
  99. package/dist/types/ModBanId.d.ts +1 -0
  100. package/dist/types/ModBanId.js +3 -0
  101. package/dist/types/ModBanView.d.ts +1 -1
  102. package/dist/types/ModFeaturePost.d.ts +3 -2
  103. package/dist/types/ModFeaturePostId.d.ts +1 -0
  104. package/dist/types/ModFeaturePostId.js +3 -0
  105. package/dist/types/ModFeaturePostView.d.ts +1 -0
  106. package/dist/types/ModHideCommunity.d.ts +3 -2
  107. package/dist/types/ModHideCommunityId.d.ts +1 -0
  108. package/dist/types/ModHideCommunityId.js +3 -0
  109. package/dist/types/ModLockPost.d.ts +3 -2
  110. package/dist/types/ModLockPostId.d.ts +1 -0
  111. package/dist/types/ModLockPostId.js +3 -0
  112. package/dist/types/ModLockPostView.d.ts +1 -0
  113. package/dist/types/ModRemoveComment.d.ts +3 -2
  114. package/dist/types/ModRemoveCommentId.d.ts +1 -0
  115. package/dist/types/ModRemoveCommentId.js +3 -0
  116. package/dist/types/ModRemoveCommentView.d.ts +1 -1
  117. package/dist/types/ModRemoveCommunity.d.ts +3 -2
  118. package/dist/types/ModRemoveCommunityId.d.ts +1 -0
  119. package/dist/types/ModRemoveCommunityId.js +3 -0
  120. package/dist/types/ModRemovePost.d.ts +3 -2
  121. package/dist/types/ModRemovePostId.d.ts +1 -0
  122. package/dist/types/ModRemovePostId.js +3 -0
  123. package/dist/types/ModRemovePostView.d.ts +1 -0
  124. package/dist/types/ModTransferCommunity.d.ts +3 -2
  125. package/dist/types/ModTransferCommunityId.d.ts +1 -0
  126. package/dist/types/ModTransferCommunityId.js +3 -0
  127. package/dist/types/ModTransferCommunityView.d.ts +1 -1
  128. package/dist/types/ModlogCombinedPaginationCursor.d.ts +4 -0
  129. package/dist/types/ModlogCombinedPaginationCursor.js +3 -0
  130. package/dist/types/ModlogCombinedView.d.ts +52 -0
  131. package/dist/types/Person.d.ts +2 -2
  132. package/dist/types/PersonAggregates.d.ts +1 -0
  133. package/dist/types/{PersonMention.d.ts → PersonCommentMention.d.ts} +3 -3
  134. package/dist/types/PersonCommentMentionId.d.ts +4 -0
  135. package/dist/types/PersonCommentMentionId.js +3 -0
  136. package/dist/types/{PersonMentionView.d.ts → PersonCommentMentionView.d.ts} +9 -5
  137. package/dist/types/PersonCommentMentionView.js +2 -0
  138. package/dist/types/PersonContentCombinedPaginationCursor.d.ts +4 -0
  139. package/dist/types/PersonContentCombinedPaginationCursor.js +3 -0
  140. package/dist/types/PersonContentCombinedView.d.ts +7 -0
  141. package/dist/types/PersonContentCombinedView.js +2 -0
  142. package/dist/types/PersonContentType.d.ts +4 -0
  143. package/dist/types/PersonContentType.js +3 -0
  144. package/dist/types/PersonPostMention.d.ts +13 -0
  145. package/dist/types/PersonPostMention.js +2 -0
  146. package/dist/types/PersonPostMentionId.d.ts +4 -0
  147. package/dist/types/PersonPostMentionId.js +3 -0
  148. package/dist/types/PersonPostMentionView.d.ts +36 -0
  149. package/dist/types/PersonPostMentionView.js +2 -0
  150. package/dist/types/PersonSavedCombinedPaginationCursor.d.ts +4 -0
  151. package/dist/types/PersonSavedCombinedPaginationCursor.js +3 -0
  152. package/dist/types/PostReport.d.ts +1 -0
  153. package/dist/types/PostReportView.d.ts +4 -1
  154. package/dist/types/PostSortType.d.ts +1 -1
  155. package/dist/types/PostTags.d.ts +7 -0
  156. package/dist/types/PostTags.js +2 -0
  157. package/dist/types/PostView.d.ts +7 -1
  158. package/dist/types/PrivateMessage.d.ts +1 -0
  159. package/dist/types/ReportCombinedPaginationCursor.d.ts +4 -0
  160. package/dist/types/ReportCombinedPaginationCursor.js +3 -0
  161. package/dist/types/ReportCombinedView.d.ts +13 -0
  162. package/dist/types/ReportCombinedView.js +2 -0
  163. package/dist/types/ReportType.d.ts +4 -0
  164. package/dist/types/ReportType.js +3 -0
  165. package/dist/types/ResendVerificationEmail.d.ts +7 -0
  166. package/dist/types/ResendVerificationEmail.js +2 -0
  167. package/dist/types/SaveUserSettings.d.ts +9 -9
  168. package/dist/types/Search.d.ts +12 -7
  169. package/dist/types/SearchCombinedPaginationCursor.d.ts +4 -0
  170. package/dist/types/SearchCombinedPaginationCursor.js +3 -0
  171. package/dist/types/SearchCombinedView.d.ts +13 -0
  172. package/dist/types/SearchCombinedView.js +2 -0
  173. package/dist/types/SearchResponse.d.ts +2 -10
  174. package/dist/types/SearchSortType.d.ts +4 -0
  175. package/dist/types/SearchSortType.js +3 -0
  176. package/dist/types/Site.d.ts +2 -2
  177. package/dist/types/SiteResponse.d.ts +1 -1
  178. package/dist/types/SuccessResponse.d.ts +1 -1
  179. package/dist/types/Tag.d.ts +27 -0
  180. package/dist/types/Tag.js +2 -0
  181. package/dist/types/TagId.d.ts +4 -0
  182. package/dist/types/TagId.js +3 -0
  183. package/dist/types/UploadImageResponse.d.ts +4 -0
  184. package/dist/types/UploadImageResponse.js +3 -0
  185. package/package.json +9 -4
  186. package/dist/types/CommentReplyResponse.d.ts +0 -7
  187. package/dist/types/GetPersonMentions.d.ts +0 -10
  188. package/dist/types/GetPersonMentionsResponse.d.ts +0 -7
  189. package/dist/types/GetPrivateMessages.d.ts +0 -10
  190. package/dist/types/GetReplies.d.ts +0 -10
  191. package/dist/types/GetRepliesResponse.d.ts +0 -7
  192. package/dist/types/ListCommentReports.d.ts +0 -18
  193. package/dist/types/ListCommentReportsResponse.d.ts +0 -7
  194. package/dist/types/ListPostReports.d.ts +0 -18
  195. package/dist/types/ListPostReportsResponse.d.ts +0 -7
  196. package/dist/types/ListPrivateMessageReports.d.ts +0 -11
  197. package/dist/types/ListPrivateMessageReportsResponse.d.ts +0 -7
  198. package/dist/types/MarkPersonMentionAsRead.d.ts +0 -8
  199. package/dist/types/ModlogListParams.d.ts +0 -17
  200. package/dist/types/PersonMentionId.d.ts +0 -4
  201. package/dist/types/PersonMentionResponse.d.ts +0 -7
  202. package/dist/types/PrivateMessagesResponse.d.ts +0 -7
  203. /package/dist/types/{ListPrivateMessageReports.js → AdminAllowInstanceId.js} +0 -0
  204. /package/dist/types/{PersonMentionId.js → AdminBlockInstanceId.js} +0 -0
  205. /package/dist/types/{CommentReplyResponse.js → CommentSlimView.js} +0 -0
  206. /package/dist/types/{GetPersonMentions.js → CommunityReport.js} +0 -0
  207. /package/dist/types/{GetPersonMentionsResponse.js → CommunityReportView.js} +0 -0
  208. /package/dist/types/{GetPrivateMessages.js → GetCommentsSlimResponse.js} +0 -0
  209. /package/dist/types/{GetReplies.js → InboxCombinedView.js} +0 -0
  210. /package/dist/types/{GetRepliesResponse.js → ListInbox.js} +0 -0
  211. /package/dist/types/{ListCommentReports.js → ListInboxResponse.js} +0 -0
  212. /package/dist/types/{ListCommentReportsResponse.js → ListPersonContent.js} +0 -0
  213. /package/dist/types/{ListPostReports.js → ListPersonContentResponse.js} +0 -0
  214. /package/dist/types/{ListPostReportsResponse.js → ListPersonSaved.js} +0 -0
  215. /package/dist/types/{ListPrivateMessageReportsResponse.js → ListPersonSavedResponse.js} +0 -0
  216. /package/dist/types/{MarkPersonMentionAsRead.js → ListReports.js} +0 -0
  217. /package/dist/types/{ModlogListParams.js → ListReportsResponse.js} +0 -0
  218. /package/dist/types/{PersonMention.js → MarkPersonCommentMentionAsRead.js} +0 -0
  219. /package/dist/types/{PersonMentionResponse.js → MarkPersonPostMentionAsRead.js} +0 -0
  220. /package/dist/types/{PersonMentionView.js → ModlogCombinedView.js} +0 -0
  221. /package/dist/types/{PrivateMessagesResponse.js → PersonCommentMention.js} +0 -0
package/dist/http.js CHANGED
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
9
+ return function (target, key) { decorator(target, key, paramIndex); }
10
+ };
2
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
13
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -19,33 +28,34 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
19
28
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
29
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
30
  };
22
- var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_pictrsUrl, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_wrapper;
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;
34
+ const tsoa_1 = require("tsoa");
25
35
  const other_types_1 = require("./other_types");
26
36
  var HttpType;
27
37
  (function (HttpType) {
28
38
  HttpType["Get"] = "GET";
29
39
  HttpType["Post"] = "POST";
30
40
  HttpType["Put"] = "PUT";
41
+ HttpType["Delete"] = "DELETE";
31
42
  })(HttpType || (HttpType = {}));
32
43
  /**
33
44
  * Helps build lemmy HTTP requests.
34
45
  */
35
- class LemmyHttp {
46
+ let LemmyHttp = class LemmyHttp extends tsoa_1.Controller {
36
47
  /**
37
48
  * Generates a new instance of LemmyHttp.
38
49
  * @param baseUrl the base url, without the vX version: https://lemmy.ml -> goes to https://lemmy.ml/api/vX
39
50
  * @param headers optional headers. Should contain `x-real-ip` and `x-forwarded-for` .
40
51
  */
41
52
  constructor(baseUrl, options) {
53
+ super();
42
54
  _LemmyHttp_instances.add(this);
43
55
  _LemmyHttp_apiUrl.set(this, void 0);
44
56
  _LemmyHttp_headers.set(this, {});
45
- _LemmyHttp_pictrsUrl.set(this, void 0);
46
57
  _LemmyHttp_fetchFunction.set(this, fetch.bind(globalThis));
47
58
  __classPrivateFieldSet(this, _LemmyHttp_apiUrl, `${baseUrl.replace(/\/+$/, "")}/api/${other_types_1.VERSION}`, "f");
48
- __classPrivateFieldSet(this, _LemmyHttp_pictrsUrl, `${baseUrl}/pictrs/image`, "f");
49
59
  if (options === null || options === void 0 ? void 0 : options.headers) {
50
60
  __classPrivateFieldSet(this, _LemmyHttp_headers, options.headers, "f");
51
61
  }
@@ -54,972 +64,841 @@ class LemmyHttp {
54
64
  }
55
65
  }
56
66
  /**
57
- * Gets the site, and your user data.
58
- *
59
- * `HTTP.GET /site`
67
+ * @summary Gets the site, and your user data.
60
68
  */
61
69
  getSite(options) {
62
70
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/site", {}, options);
63
71
  }
64
72
  /**
65
- * Create your site.
66
- *
67
- * `HTTP.POST /site`
73
+ * @summary Create your site.
68
74
  */
69
75
  createSite(form, options) {
70
76
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/site", form, options);
71
77
  }
72
78
  /**
73
- * Edit your site.
74
- *
75
- * `HTTP.PUT /site`
79
+ * @summary Edit your site.
76
80
  */
77
81
  editSite(form, options) {
78
82
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/site", form, options);
79
83
  }
80
84
  /**
81
- * Leave the Site admins.
82
- *
83
- * `HTTP.POST /admin/leave`
85
+ * @summary Leave the Site admins.
84
86
  */
85
87
  leaveAdmin(options) {
86
88
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/leave", {}, options);
87
89
  }
88
90
  /**
89
- * Generate a TOTP / two-factor secret.
91
+ * @summary Generate a TOTP / two-factor secret.
90
92
  *
93
+ * Generate a TOTP / two-factor secret.
91
94
  * Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
92
- *
93
- * `HTTP.POST /account/auth/totp/generate`
94
95
  */
95
96
  generateTotpSecret(options) {
96
97
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/generate", {}, options);
97
98
  }
98
99
  /**
99
- * Get data of current user.
100
- *
101
- * `HTTP.GET /account`
100
+ * @summary Get data of current user.
102
101
  */
103
102
  getMyUser(options) {
104
103
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account", {}, options);
105
104
  }
106
105
  /**
106
+ * @summary Export a backup of your user settings.
107
+ *
107
108
  * Export a backup of your user settings, including your saved content,
108
109
  * followed communities, and blocks.
109
- *
110
- * `HTTP.GET /account/settings/export`
111
110
  */
112
111
  exportSettings(options) {
113
112
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/settings/export", {}, options);
114
113
  }
115
114
  /**
116
- * Import a backup of your user settings.
117
- *
118
- * `HTTP.POST /account/settings/import`
115
+ * @summary Import a backup of your user settings.
119
116
  */
120
117
  importSettings(form, options) {
121
118
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/settings/import", form, options);
122
119
  }
123
120
  /**
124
- * List login tokens for your user
125
- *
126
- * `HTTP.GET /account/list_logins`
121
+ * @summary List login tokens for your user
127
122
  */
128
123
  listLogins(options) {
129
124
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_logins", {}, options);
130
125
  }
131
126
  /**
132
- * Returns an error message if your auth token is invalid
133
- *
134
- * `HTTP.GET /account/validate_auth`
127
+ * @summary Returns an error message if your auth token is invalid
135
128
  */
136
129
  validateAuth(options) {
137
130
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/validate_auth", {}, options);
138
131
  }
139
132
  /**
140
- * List all the media for your user
141
- *
142
- * `HTTP.GET /account/list_media`
133
+ * @summary List all the media for your user
143
134
  */
144
135
  listMedia(form = {}, options) {
145
136
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_media", form, options);
146
137
  }
147
138
  /**
148
- * List all the media known to your instance.
149
- *
150
- * `HTTP.GET /admin/list_all_media`
139
+ * @summary List all the media known to your instance.
151
140
  */
152
141
  listAllMedia(form = {}, options) {
153
142
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/list_all_media", form, options);
154
143
  }
155
144
  /**
156
- * Enable / Disable TOTP / two-factor authentication.
145
+ * @summary Enable / Disable TOTP / two-factor authentication.
157
146
  *
158
147
  * To enable, you need to first call `/account/auth/totp/generate` and then pass a valid token to this.
159
148
  *
160
149
  * Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
161
- *
162
- * `HTTP.POST /account/auth/totp/update`
163
150
  */
164
151
  updateTotp(form, options) {
165
152
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/update", form, options);
166
153
  }
167
154
  /**
168
- * Get the modlog.
169
- *
170
- * `HTTP.GET /modlog`
155
+ * @summary Get the modlog.
171
156
  */
172
157
  getModlog(form = {}, options) {
173
158
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/modlog", form, options);
174
159
  }
175
160
  /**
176
- * Search lemmy.
177
- *
178
- * `HTTP.GET /search`
161
+ * @summary Search lemmy.
179
162
  */
180
163
  search(form, options) {
181
164
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/search", form, options);
182
165
  }
183
166
  /**
184
- * Fetch a non-local / federated object.
185
- *
186
- * `HTTP.GET /resolve_object`
167
+ * @summary Fetch a non-local / federated object.
187
168
  */
188
169
  resolveObject(form, options) {
189
170
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/resolve_object", form, options);
190
171
  }
191
172
  /**
192
- * Create a new community.
193
- *
194
- * `HTTP.POST /community`
173
+ * @summary Create a new community.
195
174
  */
196
175
  createCommunity(form, options) {
197
176
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community", form, options);
198
177
  }
199
178
  /**
200
- * Get / fetch a community.
201
- *
202
- * `HTTP.GET /community`
179
+ * @summary Get / fetch a community.
203
180
  */
204
181
  getCommunity(form = {}, options) {
205
182
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community", form, options);
206
183
  }
207
184
  /**
208
- * Edit a community.
209
- *
210
- * `HTTP.PUT /community`
185
+ * @summary Edit a community.
211
186
  */
212
187
  editCommunity(form, options) {
213
188
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community", form, options);
214
189
  }
215
190
  /**
216
- * List communities, with various filters.
217
- *
218
- * `HTTP.GET /community/list`
191
+ * @summary List communities, with various filters.
219
192
  */
220
193
  listCommunities(form = {}, options) {
221
194
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/list", form, options);
222
195
  }
223
196
  /**
224
- * Follow / subscribe to a community.
225
- *
226
- * `HTTP.POST /community/follow`
197
+ * @summary Follow / subscribe to a community.
227
198
  */
228
199
  followCommunity(form, options) {
229
200
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/follow", form, options);
230
201
  }
231
- getCommunityPendingFollowsCount(community_id, options) {
232
- const form = { community_id };
202
+ /**
203
+ * @summary Get a community's pending follows count.
204
+ */
205
+ getCommunityPendingFollowsCount(form, options) {
233
206
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", form, options);
234
207
  }
208
+ /**
209
+ * @summary Get a community's pending followers.
210
+ */
235
211
  listCommunityPendingFollows(form, options) {
236
212
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/list", form, options);
237
213
  }
214
+ /**
215
+ * @summary Approve a community pending follow request.
216
+ */
238
217
  approveCommunityPendingFollow(form, options) {
239
218
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/pending_follows/approve", form, options);
240
219
  }
241
220
  /**
242
- * Block a community.
243
- *
244
- * `HTTP.POST /account/block/community`
221
+ * @summary Block a community.
245
222
  */
246
223
  blockCommunity(form, options) {
247
224
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/community", form, options);
248
225
  }
249
226
  /**
250
- * Delete a community.
251
- *
252
- * `HTTP.POST /community/delete`
227
+ * @summary Delete a community.
253
228
  */
254
229
  deleteCommunity(form, options) {
255
230
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form, options);
256
231
  }
257
232
  /**
258
- * Hide a community from public / "All" view. Admins only.
259
- *
260
- * `HTTP.PUT /community/hide`
233
+ * @summary Hide a community from public / "All" view. Admins only.
261
234
  */
262
235
  hideCommunity(form, options) {
263
236
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/hide", form, options);
264
237
  }
265
238
  /**
266
- * A moderator remove for a community.
267
- *
268
- * `HTTP.POST /community/remove`
239
+ * @summary A moderator remove for a community.
269
240
  */
270
241
  removeCommunity(form, options) {
271
242
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/remove", form, options);
272
243
  }
273
244
  /**
274
- * Transfer your community to an existing moderator.
275
- *
276
- * `HTTP.POST /community/transfer`
245
+ * @summary Transfer your community to an existing moderator.
277
246
  */
278
247
  transferCommunity(form, options) {
279
248
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/transfer", form, options);
280
249
  }
281
250
  /**
282
- * Ban a user from a community.
283
- *
284
- * `HTTP.POST /community/ban_user`
251
+ * @summary Ban a user from a community.
285
252
  */
286
253
  banFromCommunity(form, options) {
287
254
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/ban_user", form, options);
288
255
  }
289
256
  /**
290
- * Add a moderator to your community.
291
- *
292
- * `HTTP.POST /community/mod`
257
+ * @summary Add a moderator to your community.
293
258
  */
294
259
  addModToCommunity(form, options) {
295
260
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/mod", form, options);
296
261
  }
297
262
  /**
298
- * Get a random community.
299
- *
300
- * `HTTP.GET /community/random`
263
+ * @summary Get a random community.
301
264
  */
302
265
  getRandomCommunity(form, options) {
303
266
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form, options);
304
267
  }
305
268
  /**
306
- * Create a post.
307
- *
308
- * `HTTP.POST /post`
269
+ * @summary Create a post.
309
270
  */
310
271
  createPost(form, options) {
311
272
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post", form, options);
312
273
  }
313
274
  /**
314
- * Get / fetch a post.
315
- *
316
- * `HTTP.GET /post`
275
+ * @summary Get / fetch a post.
317
276
  */
318
277
  getPost(form = {}, options) {
319
278
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post", form, options);
320
279
  }
321
280
  /**
322
- * Edit a post.
323
- *
324
- * `HTTP.PUT /post`
281
+ * @summary Edit a post.
325
282
  */
326
283
  editPost(form, options) {
327
284
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
328
285
  }
329
286
  /**
330
- * Delete a post.
331
- *
332
- * `HTTP.POST /post/delete`
287
+ * @summary Delete a post.
333
288
  */
334
289
  deletePost(form, options) {
335
290
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
336
291
  }
337
292
  /**
338
- * A moderator remove for a post.
339
- *
340
- * `HTTP.POST /post/remove`
293
+ * @summary A moderator remove for a post.
341
294
  */
342
295
  removePost(form, options) {
343
296
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/remove", form, options);
344
297
  }
345
298
  /**
346
- * Mark a post as read.
347
- *
348
- * `HTTP.POST /post/mark_as_read`
299
+ * @summary Mark a post as read.
349
300
  */
350
301
  markPostAsRead(form, options) {
351
302
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form, options);
352
303
  }
353
304
  /**
354
- * Mark multiple posts as read.
355
- *
356
- * `HTTP.POST /post/mark_as_read/many`
305
+ * @summary Mark multiple posts as read.
357
306
  */
358
307
  markManyPostAsRead(form, options) {
359
308
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read/many", form, options);
360
309
  }
361
310
  /**
362
- * Hide a post from list views.
363
- *
364
- * `HTTP.POST /post/hide`
311
+ * @summary Hide a post from list views.
365
312
  */
366
313
  hidePost(form, options) {
367
314
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form, options);
368
315
  }
369
316
  /**
370
- * A moderator can lock a post ( IE disable new comments ).
371
- *
372
- * `HTTP.POST /post/lock`
317
+ * @summary A moderator can lock a post ( IE disable new comments ).
373
318
  */
374
319
  lockPost(form, options) {
375
320
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/lock", form, options);
376
321
  }
377
322
  /**
378
- * A moderator can feature a community post ( IE stick it to the top of a community ).
379
- *
380
- * `HTTP.POST /post/feature`
323
+ * @summary A moderator can feature a community post ( IE stick it to the top of a community ).
381
324
  */
382
325
  featurePost(form, options) {
383
326
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/feature", form, options);
384
327
  }
385
328
  /**
386
- * Get / fetch posts, with various filters.
387
- *
388
- * `HTTP.GET /post/list`
329
+ * @summary Get / fetch posts, with various filters.
389
330
  */
390
331
  getPosts(form = {}, options) {
391
332
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/list", form, options);
392
333
  }
393
334
  /**
394
- * Like / vote on a post.
395
- *
396
- * `HTTP.POST /post/like`
335
+ * @summary Like / vote on a post.
397
336
  */
398
337
  likePost(form, options) {
399
338
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/like", form, options);
400
339
  }
401
340
  /**
402
- * List a post's likes. Admin-only.
403
- *
404
- * `HTTP.GET /post/like/list`
341
+ * @summary List a post's likes. Admin-only.
405
342
  */
406
343
  listPostLikes(form, options) {
407
344
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/like/list", form, options);
408
345
  }
409
346
  /**
410
- * Save a post.
411
- *
412
- * `HTTP.PUT /post/save`
347
+ * @summary Save a post.
413
348
  */
414
349
  savePost(form, options) {
415
350
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/save", form, options);
416
351
  }
417
352
  /**
418
- * Report a post.
419
- *
420
- * `HTTP.POST /post/report`
353
+ * @summary Report a post.
421
354
  */
422
355
  createPostReport(form, options) {
423
356
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/report", form, options);
424
357
  }
425
358
  /**
426
- * Resolve a post report. Only a mod can do this.
427
- *
428
- * `HTTP.PUT /post/report/resolve`
359
+ * @summary Resolve a post report. Only a mod can do this.
429
360
  */
430
361
  resolvePostReport(form, options) {
431
362
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/report/resolve", form, options);
432
363
  }
433
364
  /**
434
- * List post reports.
435
- *
436
- * `HTTP.GET /post/report/list`
437
- */
438
- listPostReports(form, options) {
439
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/report/list", form, options);
440
- }
441
- /**
442
- * Fetch metadata for any given site.
443
- *
444
- * `HTTP.GET /post/site_metadata`
365
+ * @summary Fetch metadata for any given site.
445
366
  */
446
367
  getSiteMetadata(form, options) {
447
368
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/site_metadata", form, options);
448
369
  }
449
370
  /**
450
- * Create a comment.
451
- *
452
- * `HTTP.POST /comment`
371
+ * @summary Create a comment.
453
372
  */
454
373
  createComment(form, options) {
455
374
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment", form, options);
456
375
  }
457
376
  /**
458
- * Edit a comment.
459
- *
460
- * `HTTP.PUT /comment`
377
+ * @summary Edit a comment.
461
378
  */
462
379
  editComment(form, options) {
463
380
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment", form, options);
464
381
  }
465
382
  /**
466
- * Delete a comment.
467
- *
468
- * `HTTP.POST /comment/delete`
383
+ * @summary Delete a comment.
469
384
  */
470
385
  deleteComment(form, options) {
471
386
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
472
387
  }
473
388
  /**
474
- * A moderator remove for a comment.
475
- *
476
- * `HTTP.POST /comment/remove`
389
+ * @summary A moderator remove for a comment.
477
390
  */
478
391
  removeComment(form, options) {
479
392
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
480
393
  }
481
394
  /**
482
- * Mark a comment as read.
483
- *
484
- * `HTTP.POST /comment/mark_as_read`
395
+ * @summary Mark a comment as read.
485
396
  */
486
397
  markCommentReplyAsRead(form, options) {
487
398
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/mark_as_read", form, options);
488
399
  }
489
400
  /**
490
- * Like / vote on a comment.
491
- *
492
- * `HTTP.POST /comment/like`
401
+ * @summary Like / vote on a comment.
493
402
  */
494
403
  likeComment(form, options) {
495
404
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
496
405
  }
497
406
  /**
498
- * List a comment's likes. Admin-only.
499
- *
500
- * `HTTP.GET /comment/like/list`
407
+ * @summary List a comment's likes. Admin-only.
501
408
  */
502
409
  listCommentLikes(form, options) {
503
410
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/like/list", form, options);
504
411
  }
505
412
  /**
506
- * Save a comment.
507
- *
508
- * `HTTP.PUT /comment/save`
413
+ * @summary Save a comment.
509
414
  */
510
415
  saveComment(form, options) {
511
416
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/save", form, options);
512
417
  }
513
418
  /**
514
- * Distinguishes a comment (speak as moderator)
515
- *
516
- * `HTTP.POST /comment/distinguish`
419
+ * @summary Distinguishes a comment (speak as moderator)
517
420
  */
518
421
  distinguishComment(form, options) {
519
422
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/distinguish", form, options);
520
423
  }
521
424
  /**
522
- * Get / fetch comments.
523
- *
524
- * `HTTP.GET /comment/list`
425
+ * @summary Get / fetch comments.
525
426
  */
526
427
  getComments(form = {}, options) {
527
428
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list", form, options);
528
429
  }
529
430
  /**
530
- * Get / fetch comment.
531
- *
532
- * `HTTP.GET /comment`
431
+ * @summary Get / fetch comments, but without the post or community.
432
+ */
433
+ getCommentsSlim(form = {}, options) {
434
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list/slim", form, options);
435
+ }
436
+ /**
437
+ * @summary Get / fetch comment.
533
438
  */
534
439
  getComment(form, options) {
535
440
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment", form, options);
536
441
  }
537
442
  /**
538
- * Report a comment.
539
- *
540
- * `HTTP.POST /comment/report`
443
+ * @summary Report a comment.
541
444
  */
542
445
  createCommentReport(form, options) {
543
446
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/report", form, options);
544
447
  }
545
448
  /**
546
- * Resolve a comment report. Only a mod can do this.
547
- *
548
- * `HTTP.PUT /comment/report/resolve`
449
+ * @summary Resolve a comment report. Only a mod can do this.
549
450
  */
550
451
  resolveCommentReport(form, options) {
551
452
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/report/resolve", form, options);
552
453
  }
553
454
  /**
554
- * List comment reports.
555
- *
556
- * `HTTP.GET /comment/report/list`
557
- */
558
- listCommentReports(form, options) {
559
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/report/list", form, options);
560
- }
561
- /**
562
- * Get / fetch private messages.
563
- *
564
- * `HTTP.GET /private_message/list`
565
- */
566
- getPrivateMessages(form, options) {
567
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/private_message/list", form, options);
568
- }
569
- /**
570
- * Create a private message.
571
- *
572
- * `HTTP.POST /private_message`
455
+ * @summary Create a private message.
573
456
  */
574
457
  createPrivateMessage(form, options) {
575
458
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message", form, options);
576
459
  }
577
460
  /**
578
- * Edit a private message.
579
- *
580
- * `HTTP.PUT /private_message`
461
+ * @summary Edit a private message.
581
462
  */
582
463
  editPrivateMessage(form, options) {
583
464
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message", form, options);
584
465
  }
585
466
  /**
586
- * Delete a private message.
587
- *
588
- * `HTTP.POST /private_message/delete`
467
+ * @summary Delete a private message.
589
468
  */
590
469
  deletePrivateMessage(form, options) {
591
470
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
592
471
  }
593
472
  /**
594
- * Mark a private message as read.
595
- *
596
- * `HTTP.POST /private_message/mark_as_read`
473
+ * @summary Mark a private message as read.
597
474
  */
598
475
  markPrivateMessageAsRead(form, options) {
599
476
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/mark_as_read", form, options);
600
477
  }
601
478
  /**
602
- * Create a report for a private message.
603
- *
604
- * `HTTP.POST /private_message/report`
479
+ * @summary Create a report for a private message.
605
480
  */
606
481
  createPrivateMessageReport(form, options) {
607
482
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/report", form, options);
608
483
  }
609
484
  /**
610
- * Resolve a report for a private message.
611
- *
612
- * `HTTP.PUT /private_message/report/resolve`
485
+ * @summary Resolve a report for a private message.
613
486
  */
614
487
  resolvePrivateMessageReport(form, options) {
615
488
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message/report/resolve", form, options);
616
489
  }
617
490
  /**
618
- * List private message reports.
619
- *
620
- * `HTTP.GET /private_message/report/list`
621
- */
622
- listPrivateMessageReports(form, options) {
623
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/private_message/report/list", form, options);
624
- }
625
- /**
626
- * Register a new user.
627
- *
628
- * `HTTP.POST /account/auth/register`
491
+ * @summary Register a new user.
629
492
  */
630
493
  register(form, options) {
631
494
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/register", form, options);
632
495
  }
633
496
  /**
634
- * Log into lemmy.
635
- *
636
- * `HTTP.POST /account/auth/login`
497
+ * @summary Log into lemmy.
637
498
  */
638
499
  login(form, options) {
639
500
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/login", form, options);
640
501
  }
641
502
  /**
642
- * Invalidate the currently used auth token.
643
- *
644
- * `HTTP.POST /account/auth/logout`
503
+ * @summary Invalidate the currently used auth token.
645
504
  */
646
505
  logout(options) {
647
506
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/logout", {}, options);
648
507
  }
649
508
  /**
650
- * Get the details for a person.
651
- *
652
- * `HTTP.GET /person`
509
+ * @summary Get the details for a person.
653
510
  */
654
511
  getPersonDetails(form = {}, options) {
655
512
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
656
513
  }
657
514
  /**
658
- * Get mentions for your user.
659
- *
660
- * `HTTP.GET /account/mention`
515
+ * @summary List the content for a person.
661
516
  */
662
- getPersonMentions(form, options) {
663
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/mention", form, options);
517
+ listPersonContent(form = {}, options) {
518
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
664
519
  }
665
520
  /**
666
- * Mark a person mention as read.
667
- *
668
- * `HTTP.POST /account/mention/mark_as_read`
521
+ * @summary Mark a person mention as read.
669
522
  */
670
- markPersonMentionAsRead(form, options) {
671
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/mark_as_read", form, options);
523
+ markCommentMentionAsRead(form, options) {
524
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/comment/mark_as_read", form, options);
672
525
  }
673
526
  /**
674
- * Mark a person mention as read.
675
- *
676
- * `HTTP.POST /account/mention/mark_as_read`
677
- */
678
- markPersonAllMentionAsRead(options) {
679
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/mark_as_read", {}, options);
680
- }
681
- /**
682
- * Get comment replies.
683
- *
684
- * `HTTP.GET /account/replies`
527
+ * @summary Mark a person post body mention as read.
685
528
  */
686
- getReplies(form, options) {
687
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/replies", form, options);
529
+ markPostMentionAsRead(form, options) {
530
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/post/mark_as_read", form, options);
688
531
  }
689
532
  /**
690
- * Ban a person from your site.
691
- *
692
- * `HTTP.POST /admin/ban`
533
+ * @summary Ban a person from your site.
693
534
  */
694
535
  banPerson(form, options) {
695
536
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
696
537
  }
697
538
  /**
698
- * Get a list of banned users
699
- *
700
- * `HTTP.GET /admin/banned`
539
+ * @summary Get a list of banned users.
701
540
  */
702
541
  getBannedPersons(options) {
703
542
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", {}, options);
704
543
  }
705
544
  /**
706
- * Block a person.
707
- *
708
- * `HTTP.POST /account/block/person`
545
+ * @summary Block a person.
709
546
  */
710
547
  blockPerson(form, options) {
711
548
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/person", form, options);
712
549
  }
713
550
  /**
714
- * Fetch a Captcha.
715
- *
716
- * `HTTP.GET /account/auth/get_captcha`
551
+ * @summary Fetch a Captcha.
717
552
  */
718
553
  getCaptcha(options) {
719
554
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/get_captcha", {}, options);
720
555
  }
721
556
  /**
722
- * Delete your account.
723
- *
724
- * `HTTP.POST /account/delete`
557
+ * @summary Delete your account.
725
558
  */
726
559
  deleteAccount(form, options) {
727
560
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
728
561
  }
729
562
  /**
730
- * Reset your password.
731
- *
732
- * `HTTP.POST /account/auth/password_reset`
563
+ * @summary Reset your password.
733
564
  */
734
565
  passwordReset(form, options) {
735
566
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_reset", form, options);
736
567
  }
737
568
  /**
738
- * Change your password from an email / token based reset.
739
- *
740
- * `HTTP.POST /account/auth/password_change`
569
+ * @summary Change your password from an email / token based reset.
741
570
  */
742
571
  passwordChangeAfterReset(form, options) {
743
572
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
744
573
  }
745
574
  /**
746
- * Mark all replies as read.
747
- *
748
- * `HTTP.POST /account/mention/mark_as_read/all`
575
+ * @summary Mark all replies as read.
749
576
  */
750
- markAllAsRead(options) {
751
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/mark_as_read/all", {}, options);
577
+ markAllNotificationsAsRead(options) {
578
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
752
579
  }
753
580
  /**
754
- * Save your user settings.
755
- *
756
- * `HTTP.PUT /account/settings/save`
581
+ * @summary Save your user settings.
757
582
  */
758
583
  saveUserSettings(form, options) {
759
584
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/settings/save", form, options);
760
585
  }
761
586
  /**
762
- * Change your user password.
763
- *
764
- * `HTTP.PUT /account/auth/change_password`
587
+ * @summary Change your user password.
765
588
  */
766
589
  changePassword(form, options) {
767
590
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
768
591
  }
769
592
  /**
770
- * Get counts for your reports
771
- *
772
- * `HTTP.GET /account/report_count`
593
+ * @summary Get counts for your reports.
773
594
  */
774
595
  getReportCount(form, options) {
775
596
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
776
597
  }
777
598
  /**
778
- * Get your unread counts
779
- *
780
- * `HTTP.GET /account/unread_count`
599
+ * @summary Get your unread counts.
781
600
  */
782
601
  getUnreadCount(options) {
783
602
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
784
603
  }
785
604
  /**
786
- * Verify your email
787
- *
788
- * `HTTP.POST /account/auth/verify_email`
605
+ * @summary Get your inbox (replies, comment mentions, post mentions, and messages)
606
+ */
607
+ listInbox(form, options) {
608
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/inbox", form, options);
609
+ }
610
+ /**
611
+ * @summary Verify your email
789
612
  */
790
613
  verifyEmail(form, options) {
791
614
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
792
615
  }
793
616
  /**
794
- * Add an admin to your site.
795
- *
796
- * `HTTP.POST /admin/add`
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
+ }
622
+ /**
623
+ * @summary List your saved content.
624
+ */
625
+ listPersonSaved(form, options) {
626
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/saved", form, options);
627
+ }
628
+ /**
629
+ * @summary Add an admin to your site.
797
630
  */
798
631
  addAdmin(form, options) {
799
632
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
800
633
  }
801
634
  /**
802
- * Get the unread registration applications count.
803
- *
804
- * `HTTP.GET /admin/registration_application/count`
635
+ * @summary Get the unread registration applications count.
805
636
  */
806
637
  getUnreadRegistrationApplicationCount(options) {
807
638
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
808
639
  }
809
640
  /**
810
- * List the registration applications.
811
- *
812
- * `HTTP.GET /admin/registration_application/list`
641
+ * @summary List the registration applications.
813
642
  */
814
643
  listRegistrationApplications(form, options) {
815
644
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/list", form, options);
816
645
  }
817
646
  /**
818
- * Approve a registration application
819
- *
820
- * `HTTP.PUT /admin/registration_application/approve`
647
+ * @summary Approve a registration application
821
648
  */
822
649
  approveRegistrationApplication(form, options) {
823
650
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form, options);
824
651
  }
825
652
  /**
826
- * Get the application a user submitted when they first registered their account
827
- *
828
- * `HTTP.GET /admin/registration_application`
653
+ * @summary Get the application a user submitted when they first registered their account
829
654
  */
830
655
  getRegistrationApplication(form, options) {
831
656
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form, options);
832
657
  }
833
658
  /**
834
- * Purge / Delete a person from the database.
835
- *
836
- * `HTTP.POST /admin/purge/person`
659
+ * @summary Purge / Delete a person from the database.
837
660
  */
838
661
  purgePerson(form, options) {
839
662
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/person", form, options);
840
663
  }
841
664
  /**
842
- * Purge / Delete a community from the database.
843
- *
844
- * `HTTP.POST /admin/purge/community`
665
+ * @summary Purge / Delete a community from the database.
845
666
  */
846
667
  purgeCommunity(form, options) {
847
668
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/community", form, options);
848
669
  }
849
670
  /**
850
- * Purge / Delete a post from the database.
851
- *
852
- * `HTTP.POST /admin/purge/post`
671
+ * @summary Purge / Delete a post from the database.
853
672
  */
854
673
  purgePost(form, options) {
855
674
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/post", form, options);
856
675
  }
857
676
  /**
858
- * Purge / Delete a comment from the database.
859
- *
860
- * `HTTP.POST /admin/purge/comment`
677
+ * @summary Purge / Delete a comment from the database.
861
678
  */
862
679
  purgeComment(form, options) {
863
680
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/comment", form, options);
864
681
  }
865
682
  /**
866
- * Create a new custom emoji
867
- *
868
- * `HTTP.POST /custom_emoji`
683
+ * @summary Create a new custom emoji.
869
684
  */
870
685
  createCustomEmoji(form, options) {
871
686
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form, options);
872
687
  }
873
688
  /**
874
- * Edit an existing custom emoji
875
- *
876
- * `HTTP.PUT /custom_emoji`
689
+ * @summary Edit an existing custom emoji.
877
690
  */
878
691
  editCustomEmoji(form, options) {
879
692
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form, options);
880
693
  }
881
694
  /**
882
- * Delete a custom emoji
883
- *
884
- * `HTTP.Post /custom_emoji/delete`
695
+ * @summary Delete a custom emoji.
885
696
  */
886
697
  deleteCustomEmoji(form, options) {
887
698
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form, options);
888
699
  }
889
700
  /**
890
- * List custom emojis
891
- *
892
- * `HTTP.GET /custom_emoji/list`
701
+ * @summary List custom emojis
893
702
  */
894
703
  listCustomEmojis(form, options) {
895
704
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/custom_emoji/list", form, options);
896
705
  }
897
706
  /**
898
- * Create a new tagline
899
- *
900
- * `HTTP.POST /admin/tagline`
707
+ * @summary Create a new tagline
901
708
  */
902
709
  createTagline(form, options) {
903
710
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form, options);
904
711
  }
905
712
  /**
906
- * Edit an existing tagline
907
- *
908
- * `HTTP.PUT /admin/tagline`
713
+ * @summary Edit an existing tagline
909
714
  */
910
715
  editTagline(form, options) {
911
716
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form, options);
912
717
  }
913
718
  /**
914
- * Delete a tagline
915
- *
916
- * `HTTP.Post /admin/tagline/delete`
719
+ * @summary Delete a tagline
917
720
  */
918
721
  deleteTagline(form, options) {
919
722
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form, options);
920
723
  }
921
724
  /**
922
- * List taglines
923
- *
924
- * `HTTP.GET /admin/tagline/list`
725
+ * @summary List taglines.
925
726
  */
926
727
  listTaglines(form, options) {
927
728
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/tagline/list", form, options);
928
729
  }
929
730
  /**
930
- * Create a new oauth provider method
931
- *
932
- * `HTTP.POST /oauth_provider`
731
+ * @summary Create a new oauth provider method
933
732
  */
934
733
  createOAuthProvider(form, options) {
935
734
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form, options);
936
735
  }
937
736
  /**
938
- * Edit an existing oauth provider method
939
- *
940
- * `HTTP.PUT /oauth_provider`
737
+ * @summary Edit an existing oauth provider method
941
738
  */
942
739
  editOAuthProvider(form, options) {
943
740
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form, options);
944
741
  }
945
742
  /**
946
- * Delete an oauth provider method
947
- *
948
- * `HTTP.Post /oauth_provider/delete`
743
+ * @summary Delete an oauth provider method
949
744
  */
950
745
  deleteOAuthProvider(form, options) {
951
746
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form, options);
952
747
  }
953
748
  /**
954
- * Authenticate with OAuth
955
- *
956
- * `HTTP.Post /oauth/authenticate`
749
+ * @summary Authenticate with OAuth
957
750
  */
958
751
  authenticateWithOAuth(form, options) {
959
752
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form, options);
960
753
  }
961
754
  /**
962
- * Fetch federated instances.
963
- *
964
- * `HTTP.Get /federated_instances`
755
+ * @summary Fetch federated instances.
965
756
  */
966
757
  getFederatedInstances(options) {
967
758
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
968
759
  }
969
760
  /**
970
- * Block an instance as user.
971
- *
972
- * `HTTP.Post /account/block/instance`
761
+ * @summary List user reports.
762
+ */
763
+ listReports(form, options) {
764
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
765
+ }
766
+ /**
767
+ * @summary Block an instance as user.
973
768
  */
974
769
  userBlockInstance(form, options) {
975
770
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
976
771
  }
977
772
  /**
978
- * Globally block an instance as admin.
979
- *
980
- * `HTTP.Post /admin/instance/block`
773
+ * @summary Globally block an instance as admin.
981
774
  */
982
775
  adminBlockInstance(form, options) {
983
776
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/block", form, options);
984
777
  }
985
778
  /**
986
- * Globally allow an instance as admin.
987
- *
988
- * `HTTP.Post /admin/instance/allow`
779
+ * @summary Globally allow an instance as admin.
989
780
  */
990
781
  adminAllowInstance(form, options) {
991
782
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/allow", form, options);
992
783
  }
993
784
  /**
994
- * Upload an image to the server.
995
- */
996
- uploadImage(_a, options_1) {
997
- return __awaiter(this, arguments, void 0, function* ({ image }, options) {
998
- const formData = createFormData(image);
999
- let url = undefined;
1000
- let delete_url = undefined;
1001
- const response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_pictrsUrl, "f"), Object.assign(Object.assign({}, options), { method: HttpType.Post, body: formData, headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f") }));
1002
- if (response.status === 413) {
1003
- return { msg: "too_large" };
1004
- }
1005
- const responseJson = yield response.json();
1006
- if (responseJson.msg === "ok") {
1007
- const { file: hash, delete_token: deleteToken } = responseJson.files[0];
1008
- delete_url = `${__classPrivateFieldGet(this, _LemmyHttp_pictrsUrl, "f")}/delete/${deleteToken}/${hash}`;
1009
- url = `${__classPrivateFieldGet(this, _LemmyHttp_pictrsUrl, "f")}/${hash}`;
1010
- }
1011
- return Object.assign(Object.assign({}, responseJson), { url,
1012
- delete_url });
785
+ * @summary Upload new user avatar.
786
+ */
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
+ });
791
+ }
792
+ /**
793
+ * @summary Delete the user avatar.
794
+ */
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);
1013
798
  });
1014
799
  }
1015
800
  /**
1016
- * Delete a pictrs image
801
+ * @summary Upload new user banner.
1017
802
  */
1018
- deleteImage(_a, options_1) {
1019
- return __awaiter(this, arguments, void 0, function* ({ token, filename }, options) {
1020
- const deleteUrl = `${__classPrivateFieldGet(this, _LemmyHttp_pictrsUrl, "f")}/delete/${token}/${filename}`;
1021
- const response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, deleteUrl, Object.assign(Object.assign({}, options), { method: HttpType.Get, headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f") }));
1022
- return response.status == 204;
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
+ });
807
+ }
808
+ /**
809
+ * @summary Delete the user banner.
810
+ */
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
+ });
815
+ }
816
+ /**
817
+ * @summary Upload new community icon.
818
+ */
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
+ });
823
+ }
824
+ /**
825
+ * @summary Delete the community icon.
826
+ */
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
+ });
831
+ }
832
+ /**
833
+ * @summary Upload new community banner.
834
+ */
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
+ });
839
+ }
840
+ /**
841
+ * @summary Delete the community banner.
842
+ */
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
+ });
847
+ }
848
+ /**
849
+ * @summary Upload new site icon.
850
+ */
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
+ });
855
+ }
856
+ /**
857
+ * @summary Delete the site icon.
858
+ */
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
+ });
863
+ }
864
+ /**
865
+ * @summary Upload new site banner.
866
+ */
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
+ });
871
+ }
872
+ /**
873
+ * @summary Delete the site banner.
874
+ */
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
+ });
879
+ }
880
+ /**
881
+ * @summary Upload an image to the server.
882
+ */
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
+ });
887
+ }
888
+ /**
889
+ * @summary Delete a pictrs image
890
+ */
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
+ });
895
+ }
896
+ /**
897
+ * @summary Health check for image functionality
898
+ */
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);
1023
902
  });
1024
903
  }
1025
904
  /**
@@ -1028,11 +907,23 @@ class LemmyHttp {
1028
907
  setHeaders(headers) {
1029
908
  __classPrivateFieldSet(this, _LemmyHttp_headers, headers, "f");
1030
909
  }
1031
- }
910
+ };
1032
911
  exports.LemmyHttp = LemmyHttp;
1033
- _LemmyHttp_apiUrl = new WeakMap(), _LemmyHttp_headers = new WeakMap(), _LemmyHttp_pictrsUrl = new WeakMap(), _LemmyHttp_fetchFunction = new WeakMap(), _LemmyHttp_instances = new WeakSet(), _LemmyHttp_buildFullUrl = function _LemmyHttp_buildFullUrl(endpoint) {
912
+ _LemmyHttp_apiUrl = new WeakMap();
913
+ _LemmyHttp_headers = new WeakMap();
914
+ _LemmyHttp_fetchFunction = new WeakMap();
915
+ _LemmyHttp_instances = new WeakSet();
916
+ _LemmyHttp_buildFullUrl = function _LemmyHttp_buildFullUrl(endpoint) {
1034
917
  return `${__classPrivateFieldGet(this, _LemmyHttp_apiUrl, "f")}${endpoint}`;
1035
- }, _LemmyHttp_wrapper = function _LemmyHttp_wrapper(type_, endpoint, form, options) {
918
+ };
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();
924
+ });
925
+ };
926
+ _LemmyHttp_wrapper = function _LemmyHttp_wrapper(type_, endpoint, form, options) {
1036
927
  return __awaiter(this, void 0, void 0, function* () {
1037
928
  var _a;
1038
929
  let response;
@@ -1058,6 +949,929 @@ _LemmyHttp_apiUrl = new WeakMap(), _LemmyHttp_headers = new WeakMap(), _LemmyHtt
1058
949
  }
1059
950
  });
1060
951
  };
952
+ __decorate([
953
+ (0, tsoa_1.Security)("bearerAuth"),
954
+ (0, tsoa_1.Security)({}),
955
+ (0, tsoa_1.Get)("/site"),
956
+ (0, tsoa_1.Tags)("Site"),
957
+ __param(0, (0, tsoa_1.Inject)())
958
+ ], LemmyHttp.prototype, "getSite", null);
959
+ __decorate([
960
+ (0, tsoa_1.Security)("bearerAuth"),
961
+ (0, tsoa_1.Post)("/site"),
962
+ (0, tsoa_1.Tags)("Site"),
963
+ __param(0, (0, tsoa_1.Body)()),
964
+ __param(1, (0, tsoa_1.Inject)())
965
+ ], LemmyHttp.prototype, "createSite", null);
966
+ __decorate([
967
+ (0, tsoa_1.Security)("bearerAuth"),
968
+ (0, tsoa_1.Put)("/site"),
969
+ (0, tsoa_1.Tags)("Site"),
970
+ __param(0, (0, tsoa_1.Body)()),
971
+ __param(1, (0, tsoa_1.Inject)())
972
+ ], LemmyHttp.prototype, "editSite", null);
973
+ __decorate([
974
+ (0, tsoa_1.Security)("bearerAuth"),
975
+ (0, tsoa_1.Post)("/admin/leave"),
976
+ (0, tsoa_1.Tags)("Admin"),
977
+ __param(0, (0, tsoa_1.Inject)())
978
+ ], LemmyHttp.prototype, "leaveAdmin", null);
979
+ __decorate([
980
+ (0, tsoa_1.Security)("bearerAuth"),
981
+ (0, tsoa_1.Post)("/account/auth/totp/generate"),
982
+ (0, tsoa_1.Tags)("Account"),
983
+ __param(0, (0, tsoa_1.Inject)())
984
+ ], LemmyHttp.prototype, "generateTotpSecret", null);
985
+ __decorate([
986
+ (0, tsoa_1.Security)("bearerAuth"),
987
+ (0, tsoa_1.Get)("/account"),
988
+ (0, tsoa_1.Tags)("Account"),
989
+ __param(0, (0, tsoa_1.Inject)())
990
+ ], LemmyHttp.prototype, "getMyUser", null);
991
+ __decorate([
992
+ (0, tsoa_1.Security)("bearerAuth"),
993
+ (0, tsoa_1.Get)("/account/settings/export"),
994
+ (0, tsoa_1.Tags)("Account"),
995
+ __param(0, (0, tsoa_1.Inject)())
996
+ ], LemmyHttp.prototype, "exportSettings", null);
997
+ __decorate([
998
+ (0, tsoa_1.Security)("bearerAuth"),
999
+ (0, tsoa_1.Post)("/account/settings/import"),
1000
+ (0, tsoa_1.Tags)("Account"),
1001
+ __param(0, (0, tsoa_1.Body)()),
1002
+ __param(1, (0, tsoa_1.Inject)())
1003
+ ], LemmyHttp.prototype, "importSettings", null);
1004
+ __decorate([
1005
+ (0, tsoa_1.Security)("bearerAuth"),
1006
+ (0, tsoa_1.Get)("/account/list_logins"),
1007
+ (0, tsoa_1.Tags)("Account"),
1008
+ __param(0, (0, tsoa_1.Inject)())
1009
+ ], LemmyHttp.prototype, "listLogins", null);
1010
+ __decorate([
1011
+ (0, tsoa_1.Security)("bearerAuth"),
1012
+ (0, tsoa_1.Get)("/account/validate_auth"),
1013
+ (0, tsoa_1.Tags)("Account"),
1014
+ __param(0, (0, tsoa_1.Inject)())
1015
+ ], LemmyHttp.prototype, "validateAuth", null);
1016
+ __decorate([
1017
+ (0, tsoa_1.Security)("bearerAuth"),
1018
+ (0, tsoa_1.Get)("/account/list_media"),
1019
+ (0, tsoa_1.Tags)("Account", "Media"),
1020
+ __param(0, (0, tsoa_1.Queries)()),
1021
+ __param(1, (0, tsoa_1.Inject)())
1022
+ ], LemmyHttp.prototype, "listMedia", null);
1023
+ __decorate([
1024
+ (0, tsoa_1.Security)("bearerAuth"),
1025
+ (0, tsoa_1.Get)("/admin/list_all_media"),
1026
+ (0, tsoa_1.Tags)("Admin", "Media"),
1027
+ __param(0, (0, tsoa_1.Queries)()),
1028
+ __param(1, (0, tsoa_1.Inject)())
1029
+ ], LemmyHttp.prototype, "listAllMedia", null);
1030
+ __decorate([
1031
+ (0, tsoa_1.Security)("bearerAuth"),
1032
+ (0, tsoa_1.Post)("/account/auth/totp/update"),
1033
+ (0, tsoa_1.Tags)("Account"),
1034
+ __param(0, (0, tsoa_1.Body)()),
1035
+ __param(1, (0, tsoa_1.Inject)())
1036
+ ], LemmyHttp.prototype, "updateTotp", null);
1037
+ __decorate([
1038
+ (0, tsoa_1.Security)("bearerAuth"),
1039
+ (0, tsoa_1.Security)({}),
1040
+ (0, tsoa_1.Get)("/modlog"),
1041
+ (0, tsoa_1.Tags)("Miscellaneous"),
1042
+ __param(0, (0, tsoa_1.Queries)()),
1043
+ __param(1, (0, tsoa_1.Inject)())
1044
+ ], LemmyHttp.prototype, "getModlog", null);
1045
+ __decorate([
1046
+ (0, tsoa_1.Security)("bearerAuth"),
1047
+ (0, tsoa_1.Security)({}),
1048
+ (0, tsoa_1.Get)("/search"),
1049
+ (0, tsoa_1.Tags)("Miscellaneous"),
1050
+ __param(0, (0, tsoa_1.Queries)()),
1051
+ __param(1, (0, tsoa_1.Inject)())
1052
+ ], LemmyHttp.prototype, "search", null);
1053
+ __decorate([
1054
+ (0, tsoa_1.Security)("bearerAuth"),
1055
+ (0, tsoa_1.Security)({}),
1056
+ (0, tsoa_1.Get)("/resolve_object"),
1057
+ (0, tsoa_1.Tags)("Miscellaneous"),
1058
+ __param(0, (0, tsoa_1.Queries)()),
1059
+ __param(1, (0, tsoa_1.Inject)())
1060
+ ], LemmyHttp.prototype, "resolveObject", null);
1061
+ __decorate([
1062
+ (0, tsoa_1.Security)("bearerAuth"),
1063
+ (0, tsoa_1.Post)("/community"),
1064
+ (0, tsoa_1.Tags)("Community"),
1065
+ __param(0, (0, tsoa_1.Body)()),
1066
+ __param(1, (0, tsoa_1.Inject)())
1067
+ ], LemmyHttp.prototype, "createCommunity", null);
1068
+ __decorate([
1069
+ (0, tsoa_1.Security)("bearerAuth"),
1070
+ (0, tsoa_1.Security)({}),
1071
+ (0, tsoa_1.Get)("/community"),
1072
+ (0, tsoa_1.Tags)("Community"),
1073
+ __param(0, (0, tsoa_1.Queries)()),
1074
+ __param(1, (0, tsoa_1.Inject)())
1075
+ ], LemmyHttp.prototype, "getCommunity", null);
1076
+ __decorate([
1077
+ (0, tsoa_1.Security)("bearerAuth"),
1078
+ (0, tsoa_1.Put)("/community"),
1079
+ (0, tsoa_1.Tags)("Community"),
1080
+ __param(0, (0, tsoa_1.Body)()),
1081
+ __param(1, (0, tsoa_1.Inject)())
1082
+ ], LemmyHttp.prototype, "editCommunity", null);
1083
+ __decorate([
1084
+ (0, tsoa_1.Security)("bearerAuth"),
1085
+ (0, tsoa_1.Security)({}),
1086
+ (0, tsoa_1.Get)("/community/list"),
1087
+ (0, tsoa_1.Tags)("Community"),
1088
+ __param(0, (0, tsoa_1.Queries)()),
1089
+ __param(1, (0, tsoa_1.Inject)())
1090
+ ], LemmyHttp.prototype, "listCommunities", null);
1091
+ __decorate([
1092
+ (0, tsoa_1.Security)("bearerAuth"),
1093
+ (0, tsoa_1.Post)("/community/follow"),
1094
+ (0, tsoa_1.Tags)("Community"),
1095
+ __param(0, (0, tsoa_1.Body)()),
1096
+ __param(1, (0, tsoa_1.Inject)()),
1097
+ __param(1, (0, tsoa_1.Inject)())
1098
+ ], LemmyHttp.prototype, "followCommunity", null);
1099
+ __decorate([
1100
+ (0, tsoa_1.Security)("bearerAuth"),
1101
+ (0, tsoa_1.Get)("/community/pending_follows/count"),
1102
+ (0, tsoa_1.Tags)("Community"),
1103
+ __param(0, (0, tsoa_1.Queries)()),
1104
+ __param(1, (0, tsoa_1.Inject)())
1105
+ ], LemmyHttp.prototype, "getCommunityPendingFollowsCount", null);
1106
+ __decorate([
1107
+ (0, tsoa_1.Security)("bearerAuth"),
1108
+ (0, tsoa_1.Get)("/community/pending_follows/list"),
1109
+ (0, tsoa_1.Tags)("Community"),
1110
+ __param(0, (0, tsoa_1.Queries)()),
1111
+ __param(1, (0, tsoa_1.Inject)())
1112
+ ], LemmyHttp.prototype, "listCommunityPendingFollows", null);
1113
+ __decorate([
1114
+ (0, tsoa_1.Security)("bearerAuth"),
1115
+ (0, tsoa_1.Post)("/community/pending_follows/approve"),
1116
+ (0, tsoa_1.Tags)("Community"),
1117
+ __param(0, (0, tsoa_1.Body)()),
1118
+ __param(1, (0, tsoa_1.Inject)())
1119
+ ], LemmyHttp.prototype, "approveCommunityPendingFollow", null);
1120
+ __decorate([
1121
+ (0, tsoa_1.Security)("bearerAuth"),
1122
+ (0, tsoa_1.Post)("/account/block/community"),
1123
+ (0, tsoa_1.Tags)("Account", "Community"),
1124
+ __param(0, (0, tsoa_1.Body)()),
1125
+ __param(1, (0, tsoa_1.Inject)())
1126
+ ], LemmyHttp.prototype, "blockCommunity", null);
1127
+ __decorate([
1128
+ (0, tsoa_1.Security)("bearerAuth"),
1129
+ (0, tsoa_1.Post)("/community/delete"),
1130
+ (0, tsoa_1.Tags)("Community"),
1131
+ __param(0, (0, tsoa_1.Body)()),
1132
+ __param(1, (0, tsoa_1.Inject)())
1133
+ ], LemmyHttp.prototype, "deleteCommunity", null);
1134
+ __decorate([
1135
+ (0, tsoa_1.Security)("bearerAuth"),
1136
+ (0, tsoa_1.Put)("/community/hide"),
1137
+ (0, tsoa_1.Tags)("Community", "Admin"),
1138
+ __param(0, (0, tsoa_1.Body)()),
1139
+ __param(1, (0, tsoa_1.Inject)())
1140
+ ], LemmyHttp.prototype, "hideCommunity", null);
1141
+ __decorate([
1142
+ (0, tsoa_1.Security)("bearerAuth"),
1143
+ (0, tsoa_1.Post)("/community/remove"),
1144
+ (0, tsoa_1.Tags)("Community", "Moderator"),
1145
+ __param(0, (0, tsoa_1.Body)()),
1146
+ __param(1, (0, tsoa_1.Inject)())
1147
+ ], LemmyHttp.prototype, "removeCommunity", null);
1148
+ __decorate([
1149
+ (0, tsoa_1.Security)("bearerAuth"),
1150
+ (0, tsoa_1.Post)("/community/transfer"),
1151
+ (0, tsoa_1.Tags)("Community", "Moderator"),
1152
+ __param(0, (0, tsoa_1.Body)()),
1153
+ __param(1, (0, tsoa_1.Inject)())
1154
+ ], LemmyHttp.prototype, "transferCommunity", null);
1155
+ __decorate([
1156
+ (0, tsoa_1.Security)("bearerAuth"),
1157
+ (0, tsoa_1.Post)("/community/ban_user"),
1158
+ (0, tsoa_1.Tags)("Community", "Moderator"),
1159
+ __param(0, (0, tsoa_1.Body)()),
1160
+ __param(1, (0, tsoa_1.Inject)())
1161
+ ], LemmyHttp.prototype, "banFromCommunity", null);
1162
+ __decorate([
1163
+ (0, tsoa_1.Security)("bearerAuth"),
1164
+ (0, tsoa_1.Post)("/community/mod"),
1165
+ (0, tsoa_1.Tags)("Community", "Moderator"),
1166
+ __param(0, (0, tsoa_1.Body)()),
1167
+ __param(1, (0, tsoa_1.Inject)())
1168
+ ], LemmyHttp.prototype, "addModToCommunity", null);
1169
+ __decorate([
1170
+ (0, tsoa_1.Security)("bearerAuth"),
1171
+ (0, tsoa_1.Security)({}),
1172
+ (0, tsoa_1.Get)("/community/random"),
1173
+ (0, tsoa_1.Tags)("Community"),
1174
+ __param(0, (0, tsoa_1.Queries)()),
1175
+ __param(1, (0, tsoa_1.Inject)())
1176
+ ], LemmyHttp.prototype, "getRandomCommunity", null);
1177
+ __decorate([
1178
+ (0, tsoa_1.Security)("bearerAuth"),
1179
+ (0, tsoa_1.Post)("/post"),
1180
+ (0, tsoa_1.Tags)("Post"),
1181
+ __param(0, (0, tsoa_1.Body)()),
1182
+ __param(1, (0, tsoa_1.Inject)())
1183
+ ], LemmyHttp.prototype, "createPost", null);
1184
+ __decorate([
1185
+ (0, tsoa_1.Security)("bearerAuth"),
1186
+ (0, tsoa_1.Security)({}),
1187
+ (0, tsoa_1.Get)("/post"),
1188
+ (0, tsoa_1.Tags)("Post"),
1189
+ __param(0, (0, tsoa_1.Queries)()),
1190
+ __param(1, (0, tsoa_1.Inject)())
1191
+ ], LemmyHttp.prototype, "getPost", null);
1192
+ __decorate([
1193
+ (0, tsoa_1.Security)("bearerAuth"),
1194
+ (0, tsoa_1.Put)("/post"),
1195
+ (0, tsoa_1.Tags)("Post"),
1196
+ __param(0, (0, tsoa_1.Body)()),
1197
+ __param(1, (0, tsoa_1.Inject)())
1198
+ ], LemmyHttp.prototype, "editPost", null);
1199
+ __decorate([
1200
+ (0, tsoa_1.Security)("bearerAuth"),
1201
+ (0, tsoa_1.Post)("/post/delete"),
1202
+ (0, tsoa_1.Tags)("Post"),
1203
+ __param(0, (0, tsoa_1.Body)()),
1204
+ __param(1, (0, tsoa_1.Inject)())
1205
+ ], LemmyHttp.prototype, "deletePost", null);
1206
+ __decorate([
1207
+ (0, tsoa_1.Security)("bearerAuth"),
1208
+ (0, tsoa_1.Post)("/post/remove"),
1209
+ (0, tsoa_1.Tags)("Post", "Moderator"),
1210
+ __param(0, (0, tsoa_1.Body)()),
1211
+ __param(1, (0, tsoa_1.Inject)())
1212
+ ], LemmyHttp.prototype, "removePost", null);
1213
+ __decorate([
1214
+ (0, tsoa_1.Security)("bearerAuth"),
1215
+ (0, tsoa_1.Post)("/post/mark_as_read"),
1216
+ (0, tsoa_1.Tags)("Post"),
1217
+ __param(0, (0, tsoa_1.Body)()),
1218
+ __param(1, (0, tsoa_1.Inject)())
1219
+ ], LemmyHttp.prototype, "markPostAsRead", null);
1220
+ __decorate([
1221
+ (0, tsoa_1.Security)("bearerAuth"),
1222
+ (0, tsoa_1.Post)("/post/mark_as_read/many"),
1223
+ (0, tsoa_1.Tags)("Post"),
1224
+ __param(0, (0, tsoa_1.Body)()),
1225
+ __param(1, (0, tsoa_1.Inject)())
1226
+ ], LemmyHttp.prototype, "markManyPostAsRead", null);
1227
+ __decorate([
1228
+ (0, tsoa_1.Security)("bearerAuth"),
1229
+ (0, tsoa_1.Post)("/post/hide"),
1230
+ (0, tsoa_1.Tags)("Post"),
1231
+ __param(0, (0, tsoa_1.Body)()),
1232
+ __param(1, (0, tsoa_1.Inject)())
1233
+ ], LemmyHttp.prototype, "hidePost", null);
1234
+ __decorate([
1235
+ (0, tsoa_1.Security)("bearerAuth"),
1236
+ (0, tsoa_1.Post)("/post/lock"),
1237
+ (0, tsoa_1.Tags)("Post"),
1238
+ __param(0, (0, tsoa_1.Body)()),
1239
+ __param(1, (0, tsoa_1.Inject)())
1240
+ ], LemmyHttp.prototype, "lockPost", null);
1241
+ __decorate([
1242
+ (0, tsoa_1.Security)("bearerAuth"),
1243
+ (0, tsoa_1.Post)("/post/feature"),
1244
+ (0, tsoa_1.Tags)("Post", "Moderator"),
1245
+ __param(0, (0, tsoa_1.Body)()),
1246
+ __param(1, (0, tsoa_1.Inject)())
1247
+ ], LemmyHttp.prototype, "featurePost", null);
1248
+ __decorate([
1249
+ (0, tsoa_1.Security)("bearerAuth"),
1250
+ (0, tsoa_1.Security)({}),
1251
+ (0, tsoa_1.Get)("/post/list"),
1252
+ (0, tsoa_1.Tags)("Post"),
1253
+ __param(0, (0, tsoa_1.Queries)()),
1254
+ __param(1, (0, tsoa_1.Inject)())
1255
+ ], LemmyHttp.prototype, "getPosts", null);
1256
+ __decorate([
1257
+ (0, tsoa_1.Security)("bearerAuth"),
1258
+ (0, tsoa_1.Post)("/post/like"),
1259
+ (0, tsoa_1.Tags)("Post"),
1260
+ __param(0, (0, tsoa_1.Body)()),
1261
+ __param(1, (0, tsoa_1.Inject)())
1262
+ ], LemmyHttp.prototype, "likePost", null);
1263
+ __decorate([
1264
+ (0, tsoa_1.Security)("bearerAuth"),
1265
+ (0, tsoa_1.Get)("/post/like/list"),
1266
+ (0, tsoa_1.Tags)("Post", "Admin"),
1267
+ __param(0, (0, tsoa_1.Queries)()),
1268
+ __param(1, (0, tsoa_1.Inject)())
1269
+ ], LemmyHttp.prototype, "listPostLikes", null);
1270
+ __decorate([
1271
+ (0, tsoa_1.Security)("bearerAuth"),
1272
+ (0, tsoa_1.Put)("/post/save"),
1273
+ (0, tsoa_1.Tags)("Post"),
1274
+ __param(0, (0, tsoa_1.Body)()),
1275
+ __param(1, (0, tsoa_1.Inject)())
1276
+ ], LemmyHttp.prototype, "savePost", null);
1277
+ __decorate([
1278
+ (0, tsoa_1.Security)("bearerAuth"),
1279
+ (0, tsoa_1.Post)("/post/report"),
1280
+ (0, tsoa_1.Tags)("Post"),
1281
+ __param(0, (0, tsoa_1.Body)()),
1282
+ __param(1, (0, tsoa_1.Inject)())
1283
+ ], LemmyHttp.prototype, "createPostReport", null);
1284
+ __decorate([
1285
+ (0, tsoa_1.Security)("bearerAuth"),
1286
+ (0, tsoa_1.Put)("/post/report/resolve"),
1287
+ (0, tsoa_1.Tags)("Post", "Moderator"),
1288
+ __param(0, (0, tsoa_1.Body)()),
1289
+ __param(1, (0, tsoa_1.Inject)())
1290
+ ], LemmyHttp.prototype, "resolvePostReport", null);
1291
+ __decorate([
1292
+ (0, tsoa_1.Security)("bearerAuth"),
1293
+ (0, tsoa_1.Get)("/post/site_metadata"),
1294
+ (0, tsoa_1.Tags)("Miscellaneous", "Post"),
1295
+ __param(0, (0, tsoa_1.Queries)()),
1296
+ __param(1, (0, tsoa_1.Inject)())
1297
+ ], LemmyHttp.prototype, "getSiteMetadata", null);
1298
+ __decorate([
1299
+ (0, tsoa_1.Security)("bearerAuth"),
1300
+ (0, tsoa_1.Post)("/comment"),
1301
+ (0, tsoa_1.Tags)("Comment"),
1302
+ __param(0, (0, tsoa_1.Body)()),
1303
+ __param(1, (0, tsoa_1.Inject)())
1304
+ ], LemmyHttp.prototype, "createComment", null);
1305
+ __decorate([
1306
+ (0, tsoa_1.Security)("bearerAuth"),
1307
+ (0, tsoa_1.Put)("/comment"),
1308
+ (0, tsoa_1.Tags)("Comment"),
1309
+ __param(0, (0, tsoa_1.Body)()),
1310
+ __param(1, (0, tsoa_1.Inject)())
1311
+ ], LemmyHttp.prototype, "editComment", null);
1312
+ __decorate([
1313
+ (0, tsoa_1.Security)("bearerAuth"),
1314
+ (0, tsoa_1.Post)("/comment/delete"),
1315
+ (0, tsoa_1.Tags)("Comment"),
1316
+ __param(0, (0, tsoa_1.Body)()),
1317
+ __param(1, (0, tsoa_1.Inject)())
1318
+ ], LemmyHttp.prototype, "deleteComment", null);
1319
+ __decorate([
1320
+ (0, tsoa_1.Security)("bearerAuth"),
1321
+ (0, tsoa_1.Post)("/comment/remove"),
1322
+ (0, tsoa_1.Tags)("Comment", "Moderator"),
1323
+ __param(0, (0, tsoa_1.Body)()),
1324
+ __param(1, (0, tsoa_1.Inject)())
1325
+ ], LemmyHttp.prototype, "removeComment", null);
1326
+ __decorate([
1327
+ (0, tsoa_1.Security)("bearerAuth"),
1328
+ (0, tsoa_1.Post)("/comment/mark_as_read"),
1329
+ (0, tsoa_1.Tags)("Comment"),
1330
+ __param(0, (0, tsoa_1.Body)()),
1331
+ __param(1, (0, tsoa_1.Inject)())
1332
+ ], LemmyHttp.prototype, "markCommentReplyAsRead", null);
1333
+ __decorate([
1334
+ (0, tsoa_1.Security)("bearerAuth"),
1335
+ (0, tsoa_1.Post)("/comment/like"),
1336
+ (0, tsoa_1.Tags)("Comment"),
1337
+ __param(0, (0, tsoa_1.Body)()),
1338
+ __param(1, (0, tsoa_1.Inject)())
1339
+ ], LemmyHttp.prototype, "likeComment", null);
1340
+ __decorate([
1341
+ (0, tsoa_1.Security)("bearerAuth"),
1342
+ (0, tsoa_1.Get)("/comment/like/list"),
1343
+ (0, tsoa_1.Tags)("Comment", "Admin"),
1344
+ __param(0, (0, tsoa_1.Queries)()),
1345
+ __param(1, (0, tsoa_1.Inject)())
1346
+ ], LemmyHttp.prototype, "listCommentLikes", null);
1347
+ __decorate([
1348
+ (0, tsoa_1.Security)("bearerAuth"),
1349
+ (0, tsoa_1.Put)("/comment/save"),
1350
+ (0, tsoa_1.Tags)("Comment"),
1351
+ __param(0, (0, tsoa_1.Body)()),
1352
+ __param(1, (0, tsoa_1.Inject)())
1353
+ ], LemmyHttp.prototype, "saveComment", null);
1354
+ __decorate([
1355
+ (0, tsoa_1.Security)("bearerAuth"),
1356
+ (0, tsoa_1.Post)("/comment/distinguish"),
1357
+ (0, tsoa_1.Tags)("Comment", "Moderator"),
1358
+ __param(0, (0, tsoa_1.Body)()),
1359
+ __param(1, (0, tsoa_1.Inject)())
1360
+ ], LemmyHttp.prototype, "distinguishComment", null);
1361
+ __decorate([
1362
+ (0, tsoa_1.Security)("bearerAuth"),
1363
+ (0, tsoa_1.Security)({}),
1364
+ (0, tsoa_1.Get)("/comment/list"),
1365
+ (0, tsoa_1.Tags)("Comment"),
1366
+ __param(0, (0, tsoa_1.Queries)()),
1367
+ __param(1, (0, tsoa_1.Inject)())
1368
+ ], LemmyHttp.prototype, "getComments", null);
1369
+ __decorate([
1370
+ (0, tsoa_1.Security)("bearerAuth"),
1371
+ (0, tsoa_1.Security)({}),
1372
+ (0, tsoa_1.Get)("/comment/list/slim"),
1373
+ (0, tsoa_1.Tags)("Comment"),
1374
+ __param(0, (0, tsoa_1.Queries)()),
1375
+ __param(1, (0, tsoa_1.Inject)())
1376
+ ], LemmyHttp.prototype, "getCommentsSlim", null);
1377
+ __decorate([
1378
+ (0, tsoa_1.Security)("bearerAuth"),
1379
+ (0, tsoa_1.Security)({}),
1380
+ (0, tsoa_1.Get)("/comment"),
1381
+ (0, tsoa_1.Tags)("Comment"),
1382
+ __param(0, (0, tsoa_1.Queries)()),
1383
+ __param(1, (0, tsoa_1.Inject)())
1384
+ ], LemmyHttp.prototype, "getComment", null);
1385
+ __decorate([
1386
+ (0, tsoa_1.Security)("bearerAuth"),
1387
+ (0, tsoa_1.Post)("/comment/report"),
1388
+ (0, tsoa_1.Tags)("Comment"),
1389
+ __param(0, (0, tsoa_1.Body)()),
1390
+ __param(1, (0, tsoa_1.Inject)())
1391
+ ], LemmyHttp.prototype, "createCommentReport", null);
1392
+ __decorate([
1393
+ (0, tsoa_1.Security)("bearerAuth"),
1394
+ (0, tsoa_1.Put)("/comment/report/resolve"),
1395
+ (0, tsoa_1.Tags)("Comment", "Moderator"),
1396
+ __param(0, (0, tsoa_1.Body)()),
1397
+ __param(1, (0, tsoa_1.Inject)())
1398
+ ], LemmyHttp.prototype, "resolveCommentReport", null);
1399
+ __decorate([
1400
+ (0, tsoa_1.Security)("bearerAuth"),
1401
+ (0, tsoa_1.Post)("/private_message"),
1402
+ (0, tsoa_1.Tags)("PrivateMessage"),
1403
+ __param(0, (0, tsoa_1.Body)()),
1404
+ __param(1, (0, tsoa_1.Inject)())
1405
+ ], LemmyHttp.prototype, "createPrivateMessage", null);
1406
+ __decorate([
1407
+ (0, tsoa_1.Security)("bearerAuth"),
1408
+ (0, tsoa_1.Put)("/private_message"),
1409
+ (0, tsoa_1.Tags)("PrivateMessage"),
1410
+ __param(0, (0, tsoa_1.Body)()),
1411
+ __param(1, (0, tsoa_1.Inject)())
1412
+ ], LemmyHttp.prototype, "editPrivateMessage", null);
1413
+ __decorate([
1414
+ (0, tsoa_1.Security)("bearerAuth"),
1415
+ (0, tsoa_1.Post)("/private_message/delete"),
1416
+ (0, tsoa_1.Tags)("PrivateMessage"),
1417
+ __param(0, (0, tsoa_1.Body)()),
1418
+ __param(1, (0, tsoa_1.Inject)())
1419
+ ], LemmyHttp.prototype, "deletePrivateMessage", null);
1420
+ __decorate([
1421
+ (0, tsoa_1.Security)("bearerAuth"),
1422
+ (0, tsoa_1.Post)("/private_message/mark_as_read"),
1423
+ (0, tsoa_1.Tags)("PrivateMessage"),
1424
+ __param(0, (0, tsoa_1.Body)()),
1425
+ __param(1, (0, tsoa_1.Inject)())
1426
+ ], LemmyHttp.prototype, "markPrivateMessageAsRead", null);
1427
+ __decorate([
1428
+ (0, tsoa_1.Security)("bearerAuth"),
1429
+ (0, tsoa_1.Post)("/private_message/report"),
1430
+ (0, tsoa_1.Tags)("PrivateMessage"),
1431
+ __param(0, (0, tsoa_1.Body)()),
1432
+ __param(1, (0, tsoa_1.Inject)())
1433
+ ], LemmyHttp.prototype, "createPrivateMessageReport", null);
1434
+ __decorate([
1435
+ (0, tsoa_1.Security)("bearerAuth"),
1436
+ (0, tsoa_1.Put)("/private_message/report/resolve"),
1437
+ (0, tsoa_1.Tags)("PrivateMessage", "Admin"),
1438
+ __param(0, (0, tsoa_1.Body)()),
1439
+ __param(1, (0, tsoa_1.Inject)())
1440
+ ], LemmyHttp.prototype, "resolvePrivateMessageReport", null);
1441
+ __decorate([
1442
+ (0, tsoa_1.Post)("/account/auth/register"),
1443
+ (0, tsoa_1.Tags)("Account"),
1444
+ __param(0, (0, tsoa_1.Body)()),
1445
+ __param(1, (0, tsoa_1.Inject)())
1446
+ ], LemmyHttp.prototype, "register", null);
1447
+ __decorate([
1448
+ (0, tsoa_1.Post)("/account/auth/login"),
1449
+ (0, tsoa_1.Tags)("Account"),
1450
+ __param(0, (0, tsoa_1.Body)()),
1451
+ __param(1, (0, tsoa_1.Inject)())
1452
+ ], LemmyHttp.prototype, "login", null);
1453
+ __decorate([
1454
+ (0, tsoa_1.Security)("bearerAuth"),
1455
+ (0, tsoa_1.Post)("/account/auth/logout"),
1456
+ (0, tsoa_1.Tags)("Account"),
1457
+ __param(0, (0, tsoa_1.Inject)())
1458
+ ], LemmyHttp.prototype, "logout", null);
1459
+ __decorate([
1460
+ (0, tsoa_1.Security)("bearerAuth"),
1461
+ (0, tsoa_1.Security)({}),
1462
+ (0, tsoa_1.Get)("/person"),
1463
+ (0, tsoa_1.Tags)("Person"),
1464
+ __param(0, (0, tsoa_1.Queries)()),
1465
+ __param(1, (0, tsoa_1.Inject)())
1466
+ ], LemmyHttp.prototype, "getPersonDetails", null);
1467
+ __decorate([
1468
+ (0, tsoa_1.Security)("bearerAuth"),
1469
+ (0, tsoa_1.Security)({}),
1470
+ (0, tsoa_1.Get)("/person/content"),
1471
+ (0, tsoa_1.Tags)("Person"),
1472
+ __param(0, (0, tsoa_1.Queries)()),
1473
+ __param(1, (0, tsoa_1.Inject)())
1474
+ ], LemmyHttp.prototype, "listPersonContent", null);
1475
+ __decorate([
1476
+ (0, tsoa_1.Security)("bearerAuth"),
1477
+ (0, tsoa_1.Post)("/account/mention/comment/mark_as_read"),
1478
+ (0, tsoa_1.Tags)("Account", "Person"),
1479
+ __param(0, (0, tsoa_1.Body)()),
1480
+ __param(1, (0, tsoa_1.Inject)())
1481
+ ], LemmyHttp.prototype, "markCommentMentionAsRead", null);
1482
+ __decorate([
1483
+ (0, tsoa_1.Security)("bearerAuth"),
1484
+ (0, tsoa_1.Post)("/account/mention/post/mark_as_read"),
1485
+ (0, tsoa_1.Tags)("Account", "Post"),
1486
+ __param(0, (0, tsoa_1.Body)()),
1487
+ __param(1, (0, tsoa_1.Inject)())
1488
+ ], LemmyHttp.prototype, "markPostMentionAsRead", null);
1489
+ __decorate([
1490
+ (0, tsoa_1.Security)("bearerAuth"),
1491
+ (0, tsoa_1.Post)("/admin/ban"),
1492
+ (0, tsoa_1.Tags)("Admin"),
1493
+ __param(0, (0, tsoa_1.Body)()),
1494
+ __param(1, (0, tsoa_1.Inject)())
1495
+ ], LemmyHttp.prototype, "banPerson", null);
1496
+ __decorate([
1497
+ (0, tsoa_1.Security)("bearerAuth"),
1498
+ (0, tsoa_1.Get)("/admin/banned"),
1499
+ (0, tsoa_1.Tags)("Admin", "Miscellaneous"),
1500
+ __param(0, (0, tsoa_1.Inject)())
1501
+ ], LemmyHttp.prototype, "getBannedPersons", null);
1502
+ __decorate([
1503
+ (0, tsoa_1.Security)("bearerAuth"),
1504
+ (0, tsoa_1.Post)("/account/block/person"),
1505
+ (0, tsoa_1.Tags)("Account"),
1506
+ __param(0, (0, tsoa_1.Body)()),
1507
+ __param(1, (0, tsoa_1.Inject)())
1508
+ ], LemmyHttp.prototype, "blockPerson", null);
1509
+ __decorate([
1510
+ (0, tsoa_1.Get)("/account/auth/get_captcha"),
1511
+ (0, tsoa_1.Tags)("Account"),
1512
+ __param(0, (0, tsoa_1.Inject)())
1513
+ ], LemmyHttp.prototype, "getCaptcha", null);
1514
+ __decorate([
1515
+ (0, tsoa_1.Security)("bearerAuth"),
1516
+ (0, tsoa_1.Post)("/account/delete"),
1517
+ (0, tsoa_1.Tags)("Account"),
1518
+ __param(0, (0, tsoa_1.Body)()),
1519
+ __param(1, (0, tsoa_1.Inject)())
1520
+ ], LemmyHttp.prototype, "deleteAccount", null);
1521
+ __decorate([
1522
+ (0, tsoa_1.Security)("bearerAuth"),
1523
+ (0, tsoa_1.Post)("/account/auth/password_reset"),
1524
+ (0, tsoa_1.Tags)("Account"),
1525
+ __param(0, (0, tsoa_1.Body)()),
1526
+ __param(1, (0, tsoa_1.Inject)())
1527
+ ], LemmyHttp.prototype, "passwordReset", null);
1528
+ __decorate([
1529
+ (0, tsoa_1.Security)("bearerAuth"),
1530
+ (0, tsoa_1.Post)("/account/auth/password_change"),
1531
+ (0, tsoa_1.Tags)("Account"),
1532
+ __param(0, (0, tsoa_1.Body)()),
1533
+ __param(1, (0, tsoa_1.Inject)())
1534
+ ], LemmyHttp.prototype, "passwordChangeAfterReset", null);
1535
+ __decorate([
1536
+ (0, tsoa_1.Security)("bearerAuth"),
1537
+ (0, tsoa_1.Post)("/account/mark_as_read/all"),
1538
+ (0, tsoa_1.Tags)("Account"),
1539
+ __param(0, (0, tsoa_1.Inject)())
1540
+ ], LemmyHttp.prototype, "markAllNotificationsAsRead", null);
1541
+ __decorate([
1542
+ (0, tsoa_1.Security)("bearerAuth"),
1543
+ (0, tsoa_1.Put)("/account/settings/save"),
1544
+ (0, tsoa_1.Tags)("Account"),
1545
+ __param(0, (0, tsoa_1.Body)()),
1546
+ __param(1, (0, tsoa_1.Inject)())
1547
+ ], LemmyHttp.prototype, "saveUserSettings", null);
1548
+ __decorate([
1549
+ (0, tsoa_1.Security)("bearerAuth"),
1550
+ (0, tsoa_1.Put)("/account/auth/change_password"),
1551
+ (0, tsoa_1.Tags)("Account"),
1552
+ __param(0, (0, tsoa_1.Body)()),
1553
+ __param(1, (0, tsoa_1.Inject)())
1554
+ ], LemmyHttp.prototype, "changePassword", null);
1555
+ __decorate([
1556
+ (0, tsoa_1.Security)("bearerAuth"),
1557
+ (0, tsoa_1.Get)("/account/report_count"),
1558
+ (0, tsoa_1.Tags)("Account"),
1559
+ __param(0, (0, tsoa_1.Queries)()),
1560
+ __param(1, (0, tsoa_1.Inject)())
1561
+ ], LemmyHttp.prototype, "getReportCount", null);
1562
+ __decorate([
1563
+ (0, tsoa_1.Security)("bearerAuth"),
1564
+ (0, tsoa_1.Get)("/account/unread_count"),
1565
+ (0, tsoa_1.Tags)("Account"),
1566
+ __param(0, (0, tsoa_1.Inject)())
1567
+ ], LemmyHttp.prototype, "getUnreadCount", null);
1568
+ __decorate([
1569
+ (0, tsoa_1.Security)("bearerAuth"),
1570
+ (0, tsoa_1.Get)("/account/inbox"),
1571
+ (0, tsoa_1.Tags)("Account"),
1572
+ __param(0, (0, tsoa_1.Queries)()),
1573
+ __param(1, (0, tsoa_1.Inject)())
1574
+ ], LemmyHttp.prototype, "listInbox", null);
1575
+ __decorate([
1576
+ (0, tsoa_1.Post)("/account/auth/verify_email"),
1577
+ (0, tsoa_1.Tags)("Account"),
1578
+ __param(0, (0, tsoa_1.Body)()),
1579
+ __param(1, (0, tsoa_1.Inject)())
1580
+ ], LemmyHttp.prototype, "verifyEmail", null);
1581
+ __decorate([
1582
+ (0, tsoa_1.Post)("/account/auth/resend_verification_email"),
1583
+ (0, tsoa_1.Tags)("Account"),
1584
+ __param(0, (0, tsoa_1.Body)()),
1585
+ __param(1, (0, tsoa_1.Inject)())
1586
+ ], LemmyHttp.prototype, "resendVerificationEmail", null);
1587
+ __decorate([
1588
+ (0, tsoa_1.Security)("bearerAuth"),
1589
+ (0, tsoa_1.Get)("/account/auth/saved"),
1590
+ (0, tsoa_1.Tags)("Account"),
1591
+ __param(0, (0, tsoa_1.Queries)()),
1592
+ __param(1, (0, tsoa_1.Inject)())
1593
+ ], LemmyHttp.prototype, "listPersonSaved", null);
1594
+ __decorate([
1595
+ (0, tsoa_1.Security)("bearerAuth"),
1596
+ (0, tsoa_1.Post)("/admin/add"),
1597
+ (0, tsoa_1.Tags)("Admin"),
1598
+ __param(0, (0, tsoa_1.Body)()),
1599
+ __param(1, (0, tsoa_1.Inject)())
1600
+ ], LemmyHttp.prototype, "addAdmin", null);
1601
+ __decorate([
1602
+ (0, tsoa_1.Security)("bearerAuth"),
1603
+ (0, tsoa_1.Get)("/admin/registration_application/count"),
1604
+ (0, tsoa_1.Tags)("Admin"),
1605
+ __param(0, (0, tsoa_1.Inject)())
1606
+ ], LemmyHttp.prototype, "getUnreadRegistrationApplicationCount", null);
1607
+ __decorate([
1608
+ (0, tsoa_1.Security)("bearerAuth"),
1609
+ (0, tsoa_1.Get)("/admin/registration_application/list"),
1610
+ (0, tsoa_1.Tags)("Admin"),
1611
+ __param(0, (0, tsoa_1.Queries)()),
1612
+ __param(1, (0, tsoa_1.Inject)())
1613
+ ], LemmyHttp.prototype, "listRegistrationApplications", null);
1614
+ __decorate([
1615
+ (0, tsoa_1.Security)("bearerAuth"),
1616
+ (0, tsoa_1.Put)("/admin/registration_application/approve"),
1617
+ (0, tsoa_1.Tags)("Admin"),
1618
+ __param(0, (0, tsoa_1.Body)()),
1619
+ __param(1, (0, tsoa_1.Inject)())
1620
+ ], LemmyHttp.prototype, "approveRegistrationApplication", null);
1621
+ __decorate([
1622
+ (0, tsoa_1.Security)("bearerAuth"),
1623
+ (0, tsoa_1.Get)("/admin/registration_application"),
1624
+ (0, tsoa_1.Tags)("Admin"),
1625
+ __param(0, (0, tsoa_1.Queries)()),
1626
+ __param(1, (0, tsoa_1.Inject)())
1627
+ ], LemmyHttp.prototype, "getRegistrationApplication", null);
1628
+ __decorate([
1629
+ (0, tsoa_1.Security)("bearerAuth"),
1630
+ (0, tsoa_1.Post)("/admin/purge/person"),
1631
+ (0, tsoa_1.Tags)("Admin"),
1632
+ __param(0, (0, tsoa_1.Body)()),
1633
+ __param(1, (0, tsoa_1.Inject)())
1634
+ ], LemmyHttp.prototype, "purgePerson", null);
1635
+ __decorate([
1636
+ (0, tsoa_1.Security)("bearerAuth"),
1637
+ (0, tsoa_1.Post)("/admin/purge/community"),
1638
+ (0, tsoa_1.Tags)("Admin"),
1639
+ __param(0, (0, tsoa_1.Body)()),
1640
+ __param(1, (0, tsoa_1.Inject)())
1641
+ ], LemmyHttp.prototype, "purgeCommunity", null);
1642
+ __decorate([
1643
+ (0, tsoa_1.Security)("bearerAuth"),
1644
+ (0, tsoa_1.Post)("/admin/purge/post"),
1645
+ (0, tsoa_1.Tags)("Admin"),
1646
+ __param(0, (0, tsoa_1.Body)()),
1647
+ __param(1, (0, tsoa_1.Inject)())
1648
+ ], LemmyHttp.prototype, "purgePost", null);
1649
+ __decorate([
1650
+ (0, tsoa_1.Security)("bearerAuth"),
1651
+ (0, tsoa_1.Post)("/admin/purge/comment"),
1652
+ (0, tsoa_1.Tags)("Admin"),
1653
+ __param(0, (0, tsoa_1.Body)()),
1654
+ __param(1, (0, tsoa_1.Inject)())
1655
+ ], LemmyHttp.prototype, "purgeComment", null);
1656
+ __decorate([
1657
+ (0, tsoa_1.Security)("bearerAuth"),
1658
+ (0, tsoa_1.Post)("/custom_emoji"),
1659
+ (0, tsoa_1.Tags)("CustomEmoji"),
1660
+ __param(0, (0, tsoa_1.Body)()),
1661
+ __param(1, (0, tsoa_1.Inject)())
1662
+ ], LemmyHttp.prototype, "createCustomEmoji", null);
1663
+ __decorate([
1664
+ (0, tsoa_1.Security)("bearerAuth"),
1665
+ (0, tsoa_1.Put)("/custom_emoji"),
1666
+ (0, tsoa_1.Tags)("CustomEmoji"),
1667
+ __param(0, (0, tsoa_1.Body)()),
1668
+ __param(1, (0, tsoa_1.Inject)())
1669
+ ], LemmyHttp.prototype, "editCustomEmoji", null);
1670
+ __decorate([
1671
+ (0, tsoa_1.Security)("bearerAuth"),
1672
+ (0, tsoa_1.Post)("/custom_emoji/delete"),
1673
+ (0, tsoa_1.Tags)("CustomEmoji"),
1674
+ __param(0, (0, tsoa_1.Body)()),
1675
+ __param(1, (0, tsoa_1.Inject)())
1676
+ ], LemmyHttp.prototype, "deleteCustomEmoji", null);
1677
+ __decorate([
1678
+ (0, tsoa_1.Security)("bearerAuth"),
1679
+ (0, tsoa_1.Security)({}),
1680
+ (0, tsoa_1.Get)("/custom_emoji/list"),
1681
+ (0, tsoa_1.Tags)("CustomEmoji"),
1682
+ __param(0, (0, tsoa_1.Queries)()),
1683
+ __param(1, (0, tsoa_1.Inject)())
1684
+ ], LemmyHttp.prototype, "listCustomEmojis", null);
1685
+ __decorate([
1686
+ (0, tsoa_1.Security)("bearerAuth"),
1687
+ (0, tsoa_1.Post)("/admin/tagline"),
1688
+ (0, tsoa_1.Tags)("Admin", "Tagline"),
1689
+ __param(0, (0, tsoa_1.Body)()),
1690
+ __param(1, (0, tsoa_1.Inject)())
1691
+ ], LemmyHttp.prototype, "createTagline", null);
1692
+ __decorate([
1693
+ (0, tsoa_1.Security)("bearerAuth"),
1694
+ (0, tsoa_1.Put)("/admin/tagline"),
1695
+ (0, tsoa_1.Tags)("Admin", "Tagline"),
1696
+ __param(0, (0, tsoa_1.Body)()),
1697
+ __param(1, (0, tsoa_1.Inject)())
1698
+ ], LemmyHttp.prototype, "editTagline", null);
1699
+ __decorate([
1700
+ (0, tsoa_1.Security)("bearerAuth"),
1701
+ (0, tsoa_1.Post)("/admin/tagline/delete"),
1702
+ (0, tsoa_1.Tags)("Admin", "Tagline"),
1703
+ __param(0, (0, tsoa_1.Body)()),
1704
+ __param(1, (0, tsoa_1.Inject)())
1705
+ ], LemmyHttp.prototype, "deleteTagline", null);
1706
+ __decorate([
1707
+ (0, tsoa_1.Security)("bearerAuth"),
1708
+ (0, tsoa_1.Security)({}),
1709
+ (0, tsoa_1.Get)("/admin/tagline/list"),
1710
+ (0, tsoa_1.Tags)("Admin", "Tagline"),
1711
+ __param(0, (0, tsoa_1.Queries)()),
1712
+ __param(1, (0, tsoa_1.Inject)())
1713
+ ], LemmyHttp.prototype, "listTaglines", null);
1714
+ __decorate([
1715
+ (0, tsoa_1.Security)("bearerAuth"),
1716
+ (0, tsoa_1.Post)("/oauth_provider"),
1717
+ (0, tsoa_1.Tags)("Miscellaneous", "OAuth"),
1718
+ __param(0, (0, tsoa_1.Body)()),
1719
+ __param(1, (0, tsoa_1.Inject)())
1720
+ ], LemmyHttp.prototype, "createOAuthProvider", null);
1721
+ __decorate([
1722
+ (0, tsoa_1.Security)("bearerAuth"),
1723
+ (0, tsoa_1.Put)("/oauth_provider"),
1724
+ (0, tsoa_1.Tags)("Miscellaneous", "OAuth"),
1725
+ __param(0, (0, tsoa_1.Body)()),
1726
+ __param(1, (0, tsoa_1.Inject)())
1727
+ ], LemmyHttp.prototype, "editOAuthProvider", null);
1728
+ __decorate([
1729
+ (0, tsoa_1.Security)("bearerAuth"),
1730
+ (0, tsoa_1.Post)("/oauth_provider/delete"),
1731
+ (0, tsoa_1.Tags)("Miscellaneous", "OAuth"),
1732
+ __param(0, (0, tsoa_1.Body)()),
1733
+ __param(1, (0, tsoa_1.Inject)())
1734
+ ], LemmyHttp.prototype, "deleteOAuthProvider", null);
1735
+ __decorate([
1736
+ (0, tsoa_1.Security)("bearerAuth"),
1737
+ (0, tsoa_1.Post)("/oauth/authenticate"),
1738
+ (0, tsoa_1.Tags)("Miscellaneous", "OAuth"),
1739
+ __param(0, (0, tsoa_1.Body)()),
1740
+ __param(1, (0, tsoa_1.Inject)())
1741
+ ], LemmyHttp.prototype, "authenticateWithOAuth", null);
1742
+ __decorate([
1743
+ (0, tsoa_1.Get)("/federated_instances"),
1744
+ (0, tsoa_1.Tags)("Miscellaneous"),
1745
+ __param(0, (0, tsoa_1.Inject)())
1746
+ ], LemmyHttp.prototype, "getFederatedInstances", null);
1747
+ __decorate([
1748
+ (0, tsoa_1.Security)("bearerAuth"),
1749
+ (0, tsoa_1.Get)("/report/list"),
1750
+ (0, tsoa_1.Tags)("Admin"),
1751
+ __param(0, (0, tsoa_1.Queries)()),
1752
+ __param(1, (0, tsoa_1.Inject)())
1753
+ ], LemmyHttp.prototype, "listReports", null);
1754
+ __decorate([
1755
+ (0, tsoa_1.Security)("bearerAuth"),
1756
+ (0, tsoa_1.Post)("/account/block/instance"),
1757
+ (0, tsoa_1.Tags)("Account"),
1758
+ __param(0, (0, tsoa_1.Body)()),
1759
+ __param(1, (0, tsoa_1.Inject)())
1760
+ ], LemmyHttp.prototype, "userBlockInstance", null);
1761
+ __decorate([
1762
+ (0, tsoa_1.Security)("bearerAuth"),
1763
+ (0, tsoa_1.Post)("/admin/instance/block"),
1764
+ (0, tsoa_1.Tags)("Admin"),
1765
+ __param(0, (0, tsoa_1.Body)()),
1766
+ __param(1, (0, tsoa_1.Inject)())
1767
+ ], LemmyHttp.prototype, "adminBlockInstance", null);
1768
+ __decorate([
1769
+ (0, tsoa_1.Security)("bearerAuth"),
1770
+ (0, tsoa_1.Post)("/admin/instance/allow"),
1771
+ (0, tsoa_1.Tags)("Admin"),
1772
+ __param(0, (0, tsoa_1.Body)()),
1773
+ __param(1, (0, tsoa_1.Inject)())
1774
+ ], LemmyHttp.prototype, "adminAllowInstance", null);
1775
+ __decorate([
1776
+ (0, tsoa_1.Security)("bearerAuth"),
1777
+ (0, tsoa_1.Post)("/account/avatar"),
1778
+ (0, tsoa_1.Tags)("Account", "Media"),
1779
+ __param(0, (0, tsoa_1.UploadedFile)()),
1780
+ __param(1, (0, tsoa_1.Inject)())
1781
+ ], LemmyHttp.prototype, "uploadUserAvatar", null);
1782
+ __decorate([
1783
+ (0, tsoa_1.Security)("bearerAuth"),
1784
+ (0, tsoa_1.Delete)("/account/avatar"),
1785
+ (0, tsoa_1.Tags)("Account", "Media"),
1786
+ __param(0, (0, tsoa_1.Inject)())
1787
+ ], LemmyHttp.prototype, "deleteUserAvatar", null);
1788
+ __decorate([
1789
+ (0, tsoa_1.Security)("bearerAuth"),
1790
+ (0, tsoa_1.Post)("/account/banner"),
1791
+ (0, tsoa_1.Tags)("Account", "Media"),
1792
+ __param(0, (0, tsoa_1.UploadedFile)()),
1793
+ __param(1, (0, tsoa_1.Inject)())
1794
+ ], LemmyHttp.prototype, "uploadUserBanner", null);
1795
+ __decorate([
1796
+ (0, tsoa_1.Security)("bearerAuth"),
1797
+ (0, tsoa_1.Delete)("/account/banner"),
1798
+ (0, tsoa_1.Tags)("Account", "Media"),
1799
+ __param(0, (0, tsoa_1.Inject)())
1800
+ ], LemmyHttp.prototype, "deleteUserBanner", null);
1801
+ __decorate([
1802
+ (0, tsoa_1.Security)("bearerAuth"),
1803
+ (0, tsoa_1.Post)("/community/icon"),
1804
+ (0, tsoa_1.Tags)("Community", "Media"),
1805
+ __param(0, (0, tsoa_1.UploadedFile)()),
1806
+ __param(1, (0, tsoa_1.Inject)())
1807
+ ], LemmyHttp.prototype, "uploadCommunityIcon", null);
1808
+ __decorate([
1809
+ (0, tsoa_1.Security)("bearerAuth"),
1810
+ (0, tsoa_1.Delete)("/community/icon"),
1811
+ (0, tsoa_1.Tags)("Community", "Media"),
1812
+ __param(0, (0, tsoa_1.Inject)())
1813
+ ], LemmyHttp.prototype, "deleteCommunityIcon", null);
1814
+ __decorate([
1815
+ (0, tsoa_1.Security)("bearerAuth"),
1816
+ (0, tsoa_1.Post)("/community/banner"),
1817
+ (0, tsoa_1.Tags)("Community", "Media"),
1818
+ __param(0, (0, tsoa_1.UploadedFile)()),
1819
+ __param(1, (0, tsoa_1.Inject)())
1820
+ ], LemmyHttp.prototype, "uploadCommunityBanner", null);
1821
+ __decorate([
1822
+ (0, tsoa_1.Security)("bearerAuth"),
1823
+ (0, tsoa_1.Delete)("/community/banner"),
1824
+ (0, tsoa_1.Tags)("Community", "Media"),
1825
+ __param(0, (0, tsoa_1.Inject)())
1826
+ ], LemmyHttp.prototype, "deleteCommunityBanner", null);
1827
+ __decorate([
1828
+ (0, tsoa_1.Security)("bearerAuth"),
1829
+ (0, tsoa_1.Post)("/site/icon"),
1830
+ (0, tsoa_1.Tags)("Site", "Media"),
1831
+ __param(0, (0, tsoa_1.UploadedFile)()),
1832
+ __param(1, (0, tsoa_1.Inject)())
1833
+ ], LemmyHttp.prototype, "uploadSiteIcon", null);
1834
+ __decorate([
1835
+ (0, tsoa_1.Security)("bearerAuth"),
1836
+ (0, tsoa_1.Delete)("/site/icon"),
1837
+ (0, tsoa_1.Tags)("Site", "Media"),
1838
+ __param(0, (0, tsoa_1.Inject)())
1839
+ ], LemmyHttp.prototype, "deleteSiteIcon", null);
1840
+ __decorate([
1841
+ (0, tsoa_1.Security)("bearerAuth"),
1842
+ (0, tsoa_1.Post)("/site/banner"),
1843
+ (0, tsoa_1.Tags)("Site", "Media"),
1844
+ __param(0, (0, tsoa_1.UploadedFile)()),
1845
+ __param(1, (0, tsoa_1.Inject)())
1846
+ ], LemmyHttp.prototype, "uploadSiteBanner", null);
1847
+ __decorate([
1848
+ (0, tsoa_1.Security)("bearerAuth"),
1849
+ (0, tsoa_1.Delete)("/site/banner"),
1850
+ (0, tsoa_1.Tags)("Site", "Media"),
1851
+ __param(0, (0, tsoa_1.Inject)())
1852
+ ], LemmyHttp.prototype, "deleteSiteBanner", null);
1853
+ __decorate([
1854
+ (0, tsoa_1.Security)("bearerAuth"),
1855
+ (0, tsoa_1.Post)("/image"),
1856
+ (0, tsoa_1.Tags)("Media"),
1857
+ __param(0, (0, tsoa_1.UploadedFile)()),
1858
+ __param(1, (0, tsoa_1.Inject)())
1859
+ ], LemmyHttp.prototype, "uploadImage", null);
1860
+ __decorate([
1861
+ (0, tsoa_1.Security)("bearerAuth"),
1862
+ (0, tsoa_1.Delete)("/image"),
1863
+ (0, tsoa_1.Tags)("Media"),
1864
+ __param(0, (0, tsoa_1.Queries)()),
1865
+ __param(1, (0, tsoa_1.Inject)())
1866
+ ], LemmyHttp.prototype, "deleteImage", null);
1867
+ __decorate([
1868
+ (0, tsoa_1.Get)("image/health"),
1869
+ (0, tsoa_1.Tags)("Media"),
1870
+ __param(0, (0, tsoa_1.Inject)())
1871
+ ], LemmyHttp.prototype, "imageHealth", null);
1872
+ exports.LemmyHttp = LemmyHttp = __decorate([
1873
+ (0, tsoa_1.Route)("api/v4")
1874
+ ], LemmyHttp);
1061
1875
  function encodeGetParams(p) {
1062
1876
  return Object.entries(p)
1063
1877
  .filter(kv => kv[1] !== undefined && kv[1] !== null)