lemmy-js-client 1.0.0-media-fixes.0 → 1.0.0-multi-community.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http.d.ts +39 -5
- package/dist/http.js +402 -584
- package/dist/index.d.ts +11 -1
- package/dist/other_types.d.ts +3 -0
- package/dist/types/BannedPersonsResponse.d.ts +1 -0
- package/dist/types/CommentReplyView.d.ts +2 -0
- package/dist/types/CommentView.d.ts +2 -0
- package/dist/types/CommunityIdQuery.d.ts +8 -0
- package/dist/types/CommunityIdQuery.js +2 -0
- package/dist/types/CommunityView.d.ts +2 -0
- package/dist/types/CreateCommunityTag.d.ts +8 -0
- package/dist/types/CreateCommunityTag.js +2 -0
- package/dist/types/CreateMultiCommunity.d.ts +3 -0
- package/dist/types/CreateSite.d.ts +1 -0
- package/dist/types/DeleteCommunityTag.d.ts +7 -0
- package/dist/types/DeleteCommunityTag.js +2 -0
- package/dist/types/EditPost.d.ts +1 -1
- package/dist/types/EditSite.d.ts +4 -0
- package/dist/types/GetComments.d.ts +3 -1
- package/dist/types/GetCommentsResponse.d.ts +3 -0
- package/dist/types/GetCommentsSlimResponse.d.ts +3 -0
- package/dist/types/GetModlog.d.ts +1 -0
- package/dist/types/GetModlogResponse.d.ts +1 -0
- package/dist/types/GetPosts.d.ts +3 -9
- package/dist/types/GetPostsResponse.d.ts +3 -2
- package/dist/types/LemmyErrorType.d.ts +88 -20
- package/dist/types/ListCommentLikes.d.ts +3 -1
- package/dist/types/ListCommentLikesResponse.d.ts +6 -0
- package/dist/types/ListCommunities.d.ts +3 -1
- package/dist/types/ListCommunitiesResponse.d.ts +6 -0
- package/dist/types/ListCommunityPendingFollows.d.ts +3 -1
- package/dist/types/ListCommunityPendingFollows.js +0 -1
- package/dist/types/ListCommunityPendingFollowsResponse.d.ts +6 -0
- package/dist/types/ListCustomEmojis.d.ts +0 -3
- package/dist/types/ListInbox.d.ts +1 -0
- package/dist/types/ListInboxResponse.d.ts +1 -0
- package/dist/types/ListMedia.d.ts +3 -1
- package/dist/types/ListMedia.js +0 -1
- package/dist/types/ListMediaResponse.d.ts +6 -0
- package/dist/types/ListMultiCommunities.d.ts +4 -0
- package/dist/types/ListMultiCommunities.js +2 -0
- package/dist/types/ListMultiCommunitiesResponse.d.ts +4 -0
- package/dist/types/ListMultiCommunitiesResponse.js +2 -0
- package/dist/types/ListPersonContent.d.ts +1 -0
- package/dist/types/ListPersonContentResponse.d.ts +1 -0
- package/dist/types/ListPersonSaved.d.ts +1 -0
- package/dist/types/ListPersonSavedResponse.d.ts +1 -0
- package/dist/types/ListPostLikes.d.ts +3 -1
- package/dist/types/ListPostLikesResponse.d.ts +6 -0
- package/dist/types/ListRegistrationApplications.d.ts +3 -1
- package/dist/types/ListRegistrationApplications.js +0 -1
- package/dist/types/ListRegistrationApplicationsResponse.d.ts +6 -0
- package/dist/types/ListReports.d.ts +1 -0
- package/dist/types/ListReportsResponse.d.ts +1 -0
- package/dist/types/ListTaglines.d.ts +3 -1
- package/dist/types/ListTaglines.js +0 -1
- package/dist/types/ListTaglinesResponse.d.ts +6 -0
- package/dist/types/LocalSite.d.ts +4 -0
- package/dist/types/MultiCommunity.d.ts +9 -0
- package/dist/types/MultiCommunity.js +2 -0
- package/dist/types/MultiCommunityId.d.ts +1 -0
- package/dist/types/MultiCommunityId.js +3 -0
- package/dist/types/MultiCommunityView.d.ts +6 -0
- package/dist/types/MultiCommunityView.js +2 -0
- package/dist/types/MultiCommunityViewApub.d.ts +6 -0
- package/dist/types/MultiCommunityViewApub.js +2 -0
- package/dist/types/MyUserInfo.d.ts +1 -0
- package/dist/types/PersonPostMentionView.d.ts +2 -0
- package/dist/types/PostView.d.ts +2 -0
- package/dist/types/SaveUserSettings.d.ts +1 -0
- package/dist/types/Search.d.ts +1 -0
- package/dist/types/SearchResponse.d.ts +1 -0
- package/dist/types/Tag.d.ts +8 -6
- package/dist/types/Tagline.d.ts +2 -1
- package/dist/types/Tagline.js +0 -1
- package/dist/types/TagsView.d.ts +5 -0
- package/dist/types/TagsView.js +2 -0
- package/dist/types/UpdateCommunityTag.d.ts +8 -0
- package/dist/types/UpdateCommunityTag.js +2 -0
- package/dist/types/UpdateMultiCommunity.d.ts +6 -0
- package/dist/types/UpdateMultiCommunity.js +2 -0
- package/dist/types/VoteView.d.ts +1 -0
- package/package.json +3 -3
- package/dist/types/PostPaginationCursor.d.ts +0 -7
- /package/dist/types/{PostPaginationCursor.js → CreateMultiCommunity.js} +0 -0
package/dist/http.js
CHANGED
@@ -8,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
8
8
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
9
9
|
return function (target, key) { decorator(target, key, paramIndex); }
|
10
10
|
};
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
18
|
-
});
|
19
|
-
};
|
20
11
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
21
12
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
22
13
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
@@ -28,7 +19,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
28
19
|
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");
|
29
20
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
30
21
|
};
|
31
|
-
var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_upload, _LemmyHttp_wrapper;
|
22
|
+
var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_upload, _LemmyHttp_uploadWithQuery, _LemmyHttp_wrapper;
|
32
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
33
24
|
exports.LemmyHttp = void 0;
|
34
25
|
const runtime_1 = require("@tsoa/runtime");
|
@@ -56,44 +47,36 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
56
47
|
_LemmyHttp_headers.set(this, {});
|
57
48
|
_LemmyHttp_fetchFunction.set(this, fetch.bind(globalThis));
|
58
49
|
__classPrivateFieldSet(this, _LemmyHttp_apiUrl, `${baseUrl.replace(/\/+$/, "")}/api/${other_types_1.VERSION}`, "f");
|
59
|
-
if (options
|
50
|
+
if (options?.headers) {
|
60
51
|
__classPrivateFieldSet(this, _LemmyHttp_headers, options.headers, "f");
|
61
52
|
}
|
62
|
-
if (options
|
53
|
+
if (options?.fetchFunction) {
|
63
54
|
__classPrivateFieldSet(this, _LemmyHttp_fetchFunction, options.fetchFunction, "f");
|
64
55
|
}
|
65
56
|
}
|
66
57
|
/**
|
67
58
|
* @summary Gets the site, and your user data.
|
68
59
|
*/
|
69
|
-
getSite(options) {
|
70
|
-
return
|
71
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/site", {}, options);
|
72
|
-
});
|
60
|
+
async getSite(options) {
|
61
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/site", {}, options);
|
73
62
|
}
|
74
63
|
/**
|
75
64
|
* @summary Create your site.
|
76
65
|
*/
|
77
|
-
createSite(form, options) {
|
78
|
-
return
|
79
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/site", form, options);
|
80
|
-
});
|
66
|
+
async createSite(form, options) {
|
67
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/site", form, options);
|
81
68
|
}
|
82
69
|
/**
|
83
70
|
* @summary Edit your site.
|
84
71
|
*/
|
85
|
-
editSite(form, options) {
|
86
|
-
return
|
87
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/site", form, options);
|
88
|
-
});
|
72
|
+
async editSite(form, options) {
|
73
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/site", form, options);
|
89
74
|
}
|
90
75
|
/**
|
91
76
|
* @summary Leave the Site admins.
|
92
77
|
*/
|
93
|
-
leaveAdmin(options) {
|
94
|
-
return
|
95
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/leave", {}, options);
|
96
|
-
});
|
78
|
+
async leaveAdmin(options) {
|
79
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/leave", {}, options);
|
97
80
|
}
|
98
81
|
/**
|
99
82
|
* @summary Generate a TOTP / two-factor secret.
|
@@ -101,18 +84,14 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
101
84
|
* Generate a TOTP / two-factor secret.
|
102
85
|
* Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it.
|
103
86
|
*/
|
104
|
-
generateTotpSecret(options) {
|
105
|
-
return
|
106
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/generate", {}, options);
|
107
|
-
});
|
87
|
+
async generateTotpSecret(options) {
|
88
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/generate", {}, options);
|
108
89
|
}
|
109
90
|
/**
|
110
91
|
* @summary Get data of current user.
|
111
92
|
*/
|
112
|
-
getMyUser(options) {
|
113
|
-
return
|
114
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account", {}, options);
|
115
|
-
});
|
93
|
+
async getMyUser(options) {
|
94
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account", {}, options);
|
116
95
|
}
|
117
96
|
/**
|
118
97
|
* @summary Export a backup of your user settings.
|
@@ -120,66 +99,50 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
120
99
|
* Export a backup of your user settings, including your saved content,
|
121
100
|
* followed communities, and blocks.
|
122
101
|
*/
|
123
|
-
exportSettings(options) {
|
124
|
-
return
|
125
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/settings/export", {}, options);
|
126
|
-
});
|
102
|
+
async exportSettings(options) {
|
103
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/settings/export", {}, options);
|
127
104
|
}
|
128
105
|
/**
|
129
106
|
* @summary Import a backup of your user settings.
|
130
107
|
*/
|
131
|
-
importSettings(form, options) {
|
132
|
-
return
|
133
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/settings/import", form, options);
|
134
|
-
});
|
108
|
+
async importSettings(form, options) {
|
109
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/settings/import", form, options);
|
135
110
|
}
|
136
111
|
/**
|
137
112
|
* @summary List login tokens for your user
|
138
113
|
*/
|
139
|
-
listLogins(options) {
|
140
|
-
return
|
141
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_logins", {}, options);
|
142
|
-
});
|
114
|
+
async listLogins(options) {
|
115
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/list_logins", {}, options);
|
143
116
|
}
|
144
117
|
/**
|
145
118
|
* @summary Returns an error message if your auth token is invalid
|
146
119
|
*/
|
147
|
-
validateAuth(options) {
|
148
|
-
return
|
149
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/validate_auth", {}, options);
|
150
|
-
});
|
120
|
+
async validateAuth(options) {
|
121
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/validate_auth", {}, options);
|
151
122
|
}
|
152
123
|
/**
|
153
124
|
* @summary List all the media for your account.
|
154
125
|
*/
|
155
|
-
listMedia() {
|
156
|
-
return
|
157
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/media/list", form, options);
|
158
|
-
});
|
126
|
+
async listMedia(form = {}, options) {
|
127
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/media/list", form, options);
|
159
128
|
}
|
160
129
|
/**
|
161
130
|
* @summary Delete media for your account.
|
162
131
|
*/
|
163
|
-
deleteMedia(form, options) {
|
164
|
-
return
|
165
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/media", form, options);
|
166
|
-
});
|
132
|
+
async deleteMedia(form, options) {
|
133
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/media", form, options);
|
167
134
|
}
|
168
135
|
/**
|
169
136
|
* @summary Delete any media. (Admin only)
|
170
137
|
*/
|
171
|
-
deleteMediaAdmin(form, options) {
|
172
|
-
return
|
173
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
|
174
|
-
});
|
138
|
+
async deleteMediaAdmin(form, options) {
|
139
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
|
175
140
|
}
|
176
141
|
/**
|
177
142
|
* @summary List all the media known to your instance.
|
178
143
|
*/
|
179
|
-
listMediaAdmin() {
|
180
|
-
return
|
181
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/list", form, options);
|
182
|
-
});
|
144
|
+
async listMediaAdmin(form = {}, options) {
|
145
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/list", form, options);
|
183
146
|
}
|
184
147
|
/**
|
185
148
|
* @summary Enable / Disable TOTP / two-factor authentication.
|
@@ -188,962 +151,760 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
188
151
|
*
|
189
152
|
* Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
|
190
153
|
*/
|
191
|
-
updateTotp(form, options) {
|
192
|
-
return
|
193
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/update", form, options);
|
194
|
-
});
|
154
|
+
async updateTotp(form, options) {
|
155
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/totp/update", form, options);
|
195
156
|
}
|
196
157
|
/**
|
197
158
|
* @summary Get the modlog.
|
198
159
|
*/
|
199
|
-
getModlog() {
|
200
|
-
return
|
201
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/modlog", form, options);
|
202
|
-
});
|
160
|
+
async getModlog(form = {}, options) {
|
161
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/modlog", form, options);
|
203
162
|
}
|
204
163
|
/**
|
205
164
|
* @summary Search lemmy.
|
206
165
|
*/
|
207
|
-
search(form, options) {
|
208
|
-
return
|
209
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/search", form, options);
|
210
|
-
});
|
166
|
+
async search(form, options) {
|
167
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/search", form, options);
|
211
168
|
}
|
212
169
|
/**
|
213
170
|
* @summary Fetch a non-local / federated object.
|
214
171
|
*/
|
215
|
-
resolveObject(form, options) {
|
216
|
-
return
|
217
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/resolve_object", form, options);
|
218
|
-
});
|
172
|
+
async resolveObject(form, options) {
|
173
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/resolve_object", form, options);
|
219
174
|
}
|
220
175
|
/**
|
221
176
|
* @summary Create a new community.
|
222
177
|
*/
|
223
|
-
createCommunity(form, options) {
|
224
|
-
return
|
225
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community", form, options);
|
226
|
-
});
|
178
|
+
async createCommunity(form, options) {
|
179
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community", form, options);
|
227
180
|
}
|
228
181
|
/**
|
229
182
|
* @summary Get / fetch a community.
|
230
183
|
*/
|
231
|
-
getCommunity() {
|
232
|
-
return
|
233
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community", form, options);
|
234
|
-
});
|
184
|
+
async getCommunity(form = {}, options) {
|
185
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community", form, options);
|
235
186
|
}
|
236
187
|
/**
|
237
188
|
* @summary Edit a community.
|
238
189
|
*/
|
239
|
-
editCommunity(form, options) {
|
240
|
-
return
|
241
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community", form, options);
|
242
|
-
});
|
190
|
+
async editCommunity(form, options) {
|
191
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community", form, options);
|
243
192
|
}
|
244
193
|
/**
|
245
194
|
* @summary List communities, with various filters.
|
246
195
|
*/
|
247
|
-
listCommunities() {
|
248
|
-
return
|
249
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/list", form, options);
|
250
|
-
});
|
196
|
+
async listCommunities(form = {}, options) {
|
197
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/list", form, options);
|
251
198
|
}
|
252
199
|
/**
|
253
200
|
* @summary Follow / subscribe to a community.
|
254
201
|
*/
|
255
|
-
followCommunity(form, options) {
|
256
|
-
return
|
257
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/follow", form, options);
|
258
|
-
});
|
202
|
+
async followCommunity(form, options) {
|
203
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/follow", form, options);
|
259
204
|
}
|
260
205
|
/**
|
261
206
|
* @summary Get a community's pending follows count.
|
262
207
|
*/
|
263
|
-
getCommunityPendingFollowsCount(form, options) {
|
264
|
-
return
|
265
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", form, options);
|
266
|
-
});
|
208
|
+
async getCommunityPendingFollowsCount(form, options) {
|
209
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", form, options);
|
267
210
|
}
|
268
211
|
/**
|
269
212
|
* @summary Get a community's pending followers.
|
270
213
|
*/
|
271
|
-
listCommunityPendingFollows(form, options) {
|
272
|
-
return
|
273
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/list", form, options);
|
274
|
-
});
|
214
|
+
async listCommunityPendingFollows(form, options) {
|
215
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/list", form, options);
|
275
216
|
}
|
276
217
|
/**
|
277
218
|
* @summary Approve a community pending follow request.
|
278
219
|
*/
|
279
|
-
approveCommunityPendingFollow(form, options) {
|
280
|
-
return
|
281
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/pending_follows/approve", form, options);
|
282
|
-
});
|
220
|
+
async approveCommunityPendingFollow(form, options) {
|
221
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/pending_follows/approve", form, options);
|
283
222
|
}
|
284
223
|
/**
|
285
224
|
* @summary Block a community.
|
286
225
|
*/
|
287
|
-
blockCommunity(form, options) {
|
288
|
-
return
|
289
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/community", form, options);
|
290
|
-
});
|
226
|
+
async blockCommunity(form, options) {
|
227
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/community", form, options);
|
291
228
|
}
|
292
229
|
/**
|
293
230
|
* @summary Delete a community.
|
294
231
|
*/
|
295
|
-
deleteCommunity(form, options) {
|
296
|
-
return
|
297
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form, options);
|
298
|
-
});
|
232
|
+
async deleteCommunity(form, options) {
|
233
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form, options);
|
299
234
|
}
|
300
235
|
/**
|
301
236
|
* @summary Hide a community from public / "All" view. Admins only.
|
302
237
|
*/
|
303
|
-
hideCommunity(form, options) {
|
304
|
-
return
|
305
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/hide", form, options);
|
306
|
-
});
|
238
|
+
async hideCommunity(form, options) {
|
239
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/hide", form, options);
|
307
240
|
}
|
308
241
|
/**
|
309
242
|
* @summary A moderator remove for a community.
|
310
243
|
*/
|
311
|
-
removeCommunity(form, options) {
|
312
|
-
return
|
313
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/remove", form, options);
|
314
|
-
});
|
244
|
+
async removeCommunity(form, options) {
|
245
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/remove", form, options);
|
315
246
|
}
|
316
247
|
/**
|
317
248
|
* @summary Transfer your community to an existing moderator.
|
318
249
|
*/
|
319
|
-
transferCommunity(form, options) {
|
320
|
-
return
|
321
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/transfer", form, options);
|
322
|
-
});
|
250
|
+
async transferCommunity(form, options) {
|
251
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/transfer", form, options);
|
323
252
|
}
|
324
253
|
/**
|
325
254
|
* @summary Ban a user from a community.
|
326
255
|
*/
|
327
|
-
banFromCommunity(form, options) {
|
328
|
-
return
|
329
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/ban_user", form, options);
|
330
|
-
});
|
256
|
+
async banFromCommunity(form, options) {
|
257
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/ban_user", form, options);
|
331
258
|
}
|
332
259
|
/**
|
333
260
|
* @summary Add a moderator to your community.
|
334
261
|
*/
|
335
|
-
addModToCommunity(form, options) {
|
336
|
-
return
|
337
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/mod", form, options);
|
338
|
-
});
|
262
|
+
async addModToCommunity(form, options) {
|
263
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/mod", form, options);
|
339
264
|
}
|
340
265
|
/**
|
341
266
|
* @summary Get a random community.
|
342
267
|
*/
|
343
|
-
getRandomCommunity(form, options) {
|
344
|
-
return
|
345
|
-
|
346
|
-
|
268
|
+
async getRandomCommunity(form, options) {
|
269
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form, options);
|
270
|
+
}
|
271
|
+
/**
|
272
|
+
* @summary Create a report for a community.
|
273
|
+
*/
|
274
|
+
async createCommunityReport(form, options) {
|
275
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/report", form, options);
|
276
|
+
}
|
277
|
+
/**
|
278
|
+
* @summary Resolve a report for a private message.
|
279
|
+
*/
|
280
|
+
async resolveCommunityReport(form, options) {
|
281
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/report/resolve", form, options);
|
347
282
|
}
|
348
283
|
/**
|
349
284
|
* @summary Create a post.
|
350
285
|
*/
|
351
|
-
createPost(form, options) {
|
352
|
-
return
|
353
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post", form, options);
|
354
|
-
});
|
286
|
+
async createPost(form, options) {
|
287
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post", form, options);
|
355
288
|
}
|
356
289
|
/**
|
357
290
|
* @summary Get / fetch a post.
|
358
291
|
*/
|
359
|
-
getPost() {
|
360
|
-
return
|
361
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post", form, options);
|
362
|
-
});
|
292
|
+
async getPost(form = {}, options) {
|
293
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post", form, options);
|
363
294
|
}
|
364
295
|
/**
|
365
296
|
* @summary Edit a post.
|
366
297
|
*/
|
367
|
-
editPost(form, options) {
|
368
|
-
return
|
369
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
|
370
|
-
});
|
298
|
+
async editPost(form, options) {
|
299
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
|
371
300
|
}
|
372
301
|
/**
|
373
302
|
* @summary Delete a post.
|
374
303
|
*/
|
375
|
-
deletePost(form, options) {
|
376
|
-
return
|
377
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
|
378
|
-
});
|
304
|
+
async deletePost(form, options) {
|
305
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
|
379
306
|
}
|
380
307
|
/**
|
381
308
|
* @summary A moderator remove for a post.
|
382
309
|
*/
|
383
|
-
removePost(form, options) {
|
384
|
-
return
|
385
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/remove", form, options);
|
386
|
-
});
|
310
|
+
async removePost(form, options) {
|
311
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/remove", form, options);
|
387
312
|
}
|
388
313
|
/**
|
389
314
|
* @summary Mark a post as read.
|
390
315
|
*/
|
391
|
-
markPostAsRead(form, options) {
|
392
|
-
return
|
393
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form, options);
|
394
|
-
});
|
316
|
+
async markPostAsRead(form, options) {
|
317
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form, options);
|
395
318
|
}
|
396
319
|
/**
|
397
320
|
* @summary Mark multiple posts as read.
|
398
321
|
*/
|
399
|
-
markManyPostAsRead(form, options) {
|
400
|
-
return
|
401
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read/many", form, options);
|
402
|
-
});
|
322
|
+
async markManyPostAsRead(form, options) {
|
323
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read/many", form, options);
|
403
324
|
}
|
404
325
|
/**
|
405
326
|
* @summary Hide a post from list views.
|
406
327
|
*/
|
407
|
-
hidePost(form, options) {
|
408
|
-
return
|
409
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form, options);
|
410
|
-
});
|
328
|
+
async hidePost(form, options) {
|
329
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form, options);
|
411
330
|
}
|
412
331
|
/**
|
413
332
|
* @summary A moderator can lock a post ( IE disable new comments ).
|
414
333
|
*/
|
415
|
-
lockPost(form, options) {
|
416
|
-
return
|
417
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/lock", form, options);
|
418
|
-
});
|
334
|
+
async lockPost(form, options) {
|
335
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/lock", form, options);
|
419
336
|
}
|
420
337
|
/**
|
421
338
|
* @summary A moderator can feature a community post ( IE stick it to the top of a community ).
|
422
339
|
*/
|
423
|
-
featurePost(form, options) {
|
424
|
-
return
|
425
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/feature", form, options);
|
426
|
-
});
|
340
|
+
async featurePost(form, options) {
|
341
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/feature", form, options);
|
427
342
|
}
|
428
343
|
/**
|
429
344
|
* @summary Get / fetch posts, with various filters.
|
430
345
|
*/
|
431
|
-
getPosts() {
|
432
|
-
return
|
433
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/list", form, options);
|
434
|
-
});
|
346
|
+
async getPosts(form = {}, options) {
|
347
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/list", form, options);
|
435
348
|
}
|
436
349
|
/**
|
437
350
|
* @summary Like / vote on a post.
|
438
351
|
*/
|
439
|
-
likePost(form, options) {
|
440
|
-
return
|
441
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/like", form, options);
|
442
|
-
});
|
352
|
+
async likePost(form, options) {
|
353
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/like", form, options);
|
443
354
|
}
|
444
355
|
/**
|
445
356
|
* @summary List a post's likes. Admin-only.
|
446
357
|
*/
|
447
|
-
listPostLikes(form, options) {
|
448
|
-
return
|
449
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/like/list", form, options);
|
450
|
-
});
|
358
|
+
async listPostLikes(form, options) {
|
359
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/like/list", form, options);
|
451
360
|
}
|
452
361
|
/**
|
453
362
|
* @summary Save a post.
|
454
363
|
*/
|
455
|
-
savePost(form, options) {
|
456
|
-
return
|
457
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/save", form, options);
|
458
|
-
});
|
364
|
+
async savePost(form, options) {
|
365
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/save", form, options);
|
459
366
|
}
|
460
367
|
/**
|
461
368
|
* @summary Report a post.
|
462
369
|
*/
|
463
|
-
createPostReport(form, options) {
|
464
|
-
return
|
465
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/report", form, options);
|
466
|
-
});
|
370
|
+
async createPostReport(form, options) {
|
371
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/report", form, options);
|
467
372
|
}
|
468
373
|
/**
|
469
374
|
* @summary Resolve a post report. Only a mod can do this.
|
470
375
|
*/
|
471
|
-
resolvePostReport(form, options) {
|
472
|
-
return
|
473
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/report/resolve", form, options);
|
474
|
-
});
|
376
|
+
async resolvePostReport(form, options) {
|
377
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/report/resolve", form, options);
|
475
378
|
}
|
476
379
|
/**
|
477
380
|
* @summary Fetch metadata for any given site.
|
478
381
|
*/
|
479
|
-
getSiteMetadata(form, options) {
|
480
|
-
return
|
481
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/site_metadata", form, options);
|
482
|
-
});
|
382
|
+
async getSiteMetadata(form, options) {
|
383
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/site_metadata", form, options);
|
483
384
|
}
|
484
385
|
/**
|
485
386
|
* @summary Create a comment.
|
486
387
|
*/
|
487
|
-
createComment(form, options) {
|
488
|
-
return
|
489
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment", form, options);
|
490
|
-
});
|
388
|
+
async createComment(form, options) {
|
389
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment", form, options);
|
491
390
|
}
|
492
391
|
/**
|
493
392
|
* @summary Edit a comment.
|
494
393
|
*/
|
495
|
-
editComment(form, options) {
|
496
|
-
return
|
497
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment", form, options);
|
498
|
-
});
|
394
|
+
async editComment(form, options) {
|
395
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment", form, options);
|
499
396
|
}
|
500
397
|
/**
|
501
398
|
* @summary Delete a comment.
|
502
399
|
*/
|
503
|
-
deleteComment(form, options) {
|
504
|
-
return
|
505
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
|
506
|
-
});
|
400
|
+
async deleteComment(form, options) {
|
401
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
|
507
402
|
}
|
508
403
|
/**
|
509
404
|
* @summary A moderator remove for a comment.
|
510
405
|
*/
|
511
|
-
removeComment(form, options) {
|
512
|
-
return
|
513
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
514
|
-
});
|
406
|
+
async removeComment(form, options) {
|
407
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
515
408
|
}
|
516
409
|
/**
|
517
410
|
* @summary Mark a comment as read.
|
518
411
|
*/
|
519
|
-
markCommentReplyAsRead(form, options) {
|
520
|
-
return
|
521
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/mark_as_read", form, options);
|
522
|
-
});
|
412
|
+
async markCommentReplyAsRead(form, options) {
|
413
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/mark_as_read", form, options);
|
523
414
|
}
|
524
415
|
/**
|
525
416
|
* @summary Like / vote on a comment.
|
526
417
|
*/
|
527
|
-
likeComment(form, options) {
|
528
|
-
return
|
529
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
530
|
-
});
|
418
|
+
async likeComment(form, options) {
|
419
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
531
420
|
}
|
532
421
|
/**
|
533
422
|
* @summary List a comment's likes. Admin-only.
|
534
423
|
*/
|
535
|
-
listCommentLikes(form, options) {
|
536
|
-
return
|
537
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/like/list", form, options);
|
538
|
-
});
|
424
|
+
async listCommentLikes(form, options) {
|
425
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/like/list", form, options);
|
539
426
|
}
|
540
427
|
/**
|
541
428
|
* @summary Save a comment.
|
542
429
|
*/
|
543
|
-
saveComment(form, options) {
|
544
|
-
return
|
545
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/save", form, options);
|
546
|
-
});
|
430
|
+
async saveComment(form, options) {
|
431
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/save", form, options);
|
547
432
|
}
|
548
433
|
/**
|
549
434
|
* @summary Distinguishes a comment (speak as moderator)
|
550
435
|
*/
|
551
|
-
distinguishComment(form, options) {
|
552
|
-
return
|
553
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/distinguish", form, options);
|
554
|
-
});
|
436
|
+
async distinguishComment(form, options) {
|
437
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/distinguish", form, options);
|
555
438
|
}
|
556
439
|
/**
|
557
440
|
* @summary Get / fetch comments.
|
558
441
|
*/
|
559
|
-
getComments() {
|
560
|
-
return
|
561
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list", form, options);
|
562
|
-
});
|
442
|
+
async getComments(form = {}, options) {
|
443
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list", form, options);
|
563
444
|
}
|
564
445
|
/**
|
565
446
|
* @summary Get / fetch comments, but without the post or community.
|
566
447
|
*/
|
567
|
-
getCommentsSlim() {
|
568
|
-
return
|
569
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list/slim", form, options);
|
570
|
-
});
|
448
|
+
async getCommentsSlim(form = {}, options) {
|
449
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list/slim", form, options);
|
571
450
|
}
|
572
451
|
/**
|
573
452
|
* @summary Get / fetch comment.
|
574
453
|
*/
|
575
|
-
getComment(form, options) {
|
576
|
-
return
|
577
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment", form, options);
|
578
|
-
});
|
454
|
+
async getComment(form, options) {
|
455
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment", form, options);
|
579
456
|
}
|
580
457
|
/**
|
581
458
|
* @summary Report a comment.
|
582
459
|
*/
|
583
|
-
createCommentReport(form, options) {
|
584
|
-
return
|
585
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/report", form, options);
|
586
|
-
});
|
460
|
+
async createCommentReport(form, options) {
|
461
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/report", form, options);
|
587
462
|
}
|
588
463
|
/**
|
589
464
|
* @summary Resolve a comment report. Only a mod can do this.
|
590
465
|
*/
|
591
|
-
resolveCommentReport(form, options) {
|
592
|
-
return
|
593
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/report/resolve", form, options);
|
594
|
-
});
|
466
|
+
async resolveCommentReport(form, options) {
|
467
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/report/resolve", form, options);
|
595
468
|
}
|
596
469
|
/**
|
597
470
|
* @summary Create a private message.
|
598
471
|
*/
|
599
|
-
createPrivateMessage(form, options) {
|
600
|
-
return
|
601
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message", form, options);
|
602
|
-
});
|
472
|
+
async createPrivateMessage(form, options) {
|
473
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message", form, options);
|
603
474
|
}
|
604
475
|
/**
|
605
476
|
* @summary Edit a private message.
|
606
477
|
*/
|
607
|
-
editPrivateMessage(form, options) {
|
608
|
-
return
|
609
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message", form, options);
|
610
|
-
});
|
478
|
+
async editPrivateMessage(form, options) {
|
479
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message", form, options);
|
611
480
|
}
|
612
481
|
/**
|
613
482
|
* @summary Delete a private message.
|
614
483
|
*/
|
615
|
-
deletePrivateMessage(form, options) {
|
616
|
-
return
|
617
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
|
618
|
-
});
|
484
|
+
async deletePrivateMessage(form, options) {
|
485
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
|
619
486
|
}
|
620
487
|
/**
|
621
488
|
* @summary Mark a private message as read.
|
622
489
|
*/
|
623
|
-
markPrivateMessageAsRead(form, options) {
|
624
|
-
return
|
625
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/mark_as_read", form, options);
|
626
|
-
});
|
490
|
+
async markPrivateMessageAsRead(form, options) {
|
491
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/mark_as_read", form, options);
|
627
492
|
}
|
628
493
|
/**
|
629
494
|
* @summary Create a report for a private message.
|
630
495
|
*/
|
631
|
-
createPrivateMessageReport(form, options) {
|
632
|
-
return
|
633
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/report", form, options);
|
634
|
-
});
|
496
|
+
async createPrivateMessageReport(form, options) {
|
497
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/report", form, options);
|
635
498
|
}
|
636
499
|
/**
|
637
500
|
* @summary Resolve a report for a private message.
|
638
501
|
*/
|
639
|
-
resolvePrivateMessageReport(form, options) {
|
640
|
-
return
|
641
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message/report/resolve", form, options);
|
642
|
-
});
|
502
|
+
async resolvePrivateMessageReport(form, options) {
|
503
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message/report/resolve", form, options);
|
643
504
|
}
|
644
505
|
/**
|
645
506
|
* @summary Register a new user.
|
646
507
|
*/
|
647
|
-
register(form, options) {
|
648
|
-
return
|
649
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/register", form, options);
|
650
|
-
});
|
508
|
+
async register(form, options) {
|
509
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/register", form, options);
|
651
510
|
}
|
652
511
|
/**
|
653
512
|
* @summary Log into lemmy.
|
654
513
|
*/
|
655
|
-
login(form, options) {
|
656
|
-
return
|
657
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/login", form, options);
|
658
|
-
});
|
514
|
+
async login(form, options) {
|
515
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/login", form, options);
|
659
516
|
}
|
660
517
|
/**
|
661
518
|
* @summary Invalidate the currently used auth token.
|
662
519
|
*/
|
663
|
-
logout(options) {
|
664
|
-
return
|
665
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/logout", {}, options);
|
666
|
-
});
|
520
|
+
async logout(options) {
|
521
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/logout", {}, options);
|
667
522
|
}
|
668
523
|
/**
|
669
524
|
* @summary Get the details for a person.
|
670
525
|
*/
|
671
|
-
getPersonDetails() {
|
672
|
-
return
|
673
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
|
674
|
-
});
|
526
|
+
async getPersonDetails(form = {}, options) {
|
527
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
|
675
528
|
}
|
676
529
|
/**
|
677
530
|
* @summary List the content for a person.
|
678
531
|
*/
|
679
|
-
listPersonContent() {
|
680
|
-
return
|
681
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
682
|
-
});
|
532
|
+
async listPersonContent(form = {}, options) {
|
533
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
683
534
|
}
|
684
535
|
/**
|
685
536
|
* @summary Mark a person mention as read.
|
686
537
|
*/
|
687
|
-
markCommentMentionAsRead(form, options) {
|
688
|
-
return
|
689
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/comment/mark_as_read", form, options);
|
690
|
-
});
|
538
|
+
async markCommentMentionAsRead(form, options) {
|
539
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/comment/mark_as_read", form, options);
|
691
540
|
}
|
692
541
|
/**
|
693
542
|
* @summary Mark a person post body mention as read.
|
694
543
|
*/
|
695
|
-
markPostMentionAsRead(form, options) {
|
696
|
-
return
|
697
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/post/mark_as_read", form, options);
|
698
|
-
});
|
544
|
+
async markPostMentionAsRead(form, options) {
|
545
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/post/mark_as_read", form, options);
|
699
546
|
}
|
700
547
|
/**
|
701
548
|
* @summary Ban a person from your site.
|
702
549
|
*/
|
703
|
-
banPerson(form, options) {
|
704
|
-
return
|
705
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
|
706
|
-
});
|
550
|
+
async banPerson(form, options) {
|
551
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
|
707
552
|
}
|
708
553
|
/**
|
709
554
|
* @summary Get a list of banned users.
|
710
555
|
*/
|
711
|
-
listBannedPersons() {
|
712
|
-
return
|
713
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", form, options);
|
714
|
-
});
|
556
|
+
async listBannedPersons(form = {}, options) {
|
557
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", form, options);
|
715
558
|
}
|
716
559
|
/**
|
717
560
|
* @summary Block a person.
|
718
561
|
*/
|
719
|
-
blockPerson(form, options) {
|
720
|
-
return
|
721
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/person", form, options);
|
722
|
-
});
|
562
|
+
async blockPerson(form, options) {
|
563
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/person", form, options);
|
723
564
|
}
|
724
565
|
/**
|
725
566
|
* @summary Fetch a Captcha.
|
726
567
|
*/
|
727
|
-
getCaptcha(options) {
|
728
|
-
return
|
729
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/get_captcha", {}, options);
|
730
|
-
});
|
568
|
+
async getCaptcha(options) {
|
569
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/get_captcha", {}, options);
|
731
570
|
}
|
732
571
|
/**
|
733
572
|
* @summary Delete your account.
|
734
573
|
*/
|
735
|
-
deleteAccount(form, options) {
|
736
|
-
return
|
737
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
|
738
|
-
});
|
574
|
+
async deleteAccount(form, options) {
|
575
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
|
739
576
|
}
|
740
577
|
/**
|
741
578
|
* @summary Reset your password.
|
742
579
|
*/
|
743
|
-
passwordReset(form, options) {
|
744
|
-
return
|
745
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_reset", form, options);
|
746
|
-
});
|
580
|
+
async passwordReset(form, options) {
|
581
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_reset", form, options);
|
747
582
|
}
|
748
583
|
/**
|
749
584
|
* @summary Change your password from an email / token based reset.
|
750
585
|
*/
|
751
|
-
passwordChangeAfterReset(form, options) {
|
752
|
-
return
|
753
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
|
754
|
-
});
|
586
|
+
async passwordChangeAfterReset(form, options) {
|
587
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
|
755
588
|
}
|
756
589
|
/**
|
757
590
|
* @summary Mark all replies as read.
|
758
591
|
*/
|
759
|
-
markAllNotificationsAsRead(options) {
|
760
|
-
return
|
761
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
|
762
|
-
});
|
592
|
+
async markAllNotificationsAsRead(options) {
|
593
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
|
763
594
|
}
|
764
595
|
/**
|
765
596
|
* @summary Save your user settings.
|
766
597
|
*/
|
767
|
-
saveUserSettings(form, options) {
|
768
|
-
return
|
769
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/settings/save", form, options);
|
770
|
-
});
|
598
|
+
async saveUserSettings(form, options) {
|
599
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/settings/save", form, options);
|
771
600
|
}
|
772
601
|
/**
|
773
602
|
* @summary Change your user password.
|
774
603
|
*/
|
775
|
-
changePassword(form, options) {
|
776
|
-
return
|
777
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
|
778
|
-
});
|
604
|
+
async changePassword(form, options) {
|
605
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
|
779
606
|
}
|
780
607
|
/**
|
781
608
|
* @summary Get counts for your reports.
|
782
609
|
*/
|
783
|
-
getReportCount(form, options) {
|
784
|
-
return
|
785
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
|
786
|
-
});
|
610
|
+
async getReportCount(form, options) {
|
611
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
|
787
612
|
}
|
788
613
|
/**
|
789
614
|
* @summary Get your unread counts.
|
790
615
|
*/
|
791
|
-
getUnreadCount(options) {
|
792
|
-
return
|
793
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
|
794
|
-
});
|
616
|
+
async getUnreadCount(options) {
|
617
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
|
795
618
|
}
|
796
619
|
/**
|
797
620
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
798
621
|
*/
|
799
|
-
listInbox(form, options) {
|
800
|
-
return
|
801
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/inbox", form, options);
|
802
|
-
});
|
622
|
+
async listInbox(form, options) {
|
623
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/inbox", form, options);
|
803
624
|
}
|
804
625
|
/**
|
805
626
|
* @summary Verify your email
|
806
627
|
*/
|
807
|
-
verifyEmail(form, options) {
|
808
|
-
return
|
809
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
|
810
|
-
});
|
628
|
+
async verifyEmail(form, options) {
|
629
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
|
811
630
|
}
|
812
631
|
/**
|
813
632
|
* @summary Resend a verification email.
|
814
633
|
*/
|
815
|
-
resendVerificationEmail(form, options) {
|
816
|
-
return
|
817
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/resend_verification_email", form, options);
|
818
|
-
});
|
634
|
+
async resendVerificationEmail(form, options) {
|
635
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/resend_verification_email", form, options);
|
819
636
|
}
|
820
637
|
/**
|
821
638
|
* @summary List your saved content.
|
822
639
|
*/
|
823
|
-
listPersonSaved(form, options) {
|
824
|
-
return
|
825
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
|
826
|
-
});
|
640
|
+
async listPersonSaved(form, options) {
|
641
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
|
827
642
|
}
|
828
643
|
/**
|
829
644
|
* @summary Add an admin to your site.
|
830
645
|
*/
|
831
|
-
addAdmin(form, options) {
|
832
|
-
return
|
833
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
|
834
|
-
});
|
646
|
+
async addAdmin(form, options) {
|
647
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
|
835
648
|
}
|
836
649
|
/**
|
837
650
|
* @summary Get the unread registration applications count.
|
838
651
|
*/
|
839
|
-
getUnreadRegistrationApplicationCount(options) {
|
840
|
-
return
|
841
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
|
842
|
-
});
|
652
|
+
async getUnreadRegistrationApplicationCount(options) {
|
653
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
|
843
654
|
}
|
844
655
|
/**
|
845
656
|
* @summary List the registration applications.
|
846
657
|
*/
|
847
|
-
listRegistrationApplications(form, options) {
|
848
|
-
return
|
849
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/list", form, options);
|
850
|
-
});
|
658
|
+
async listRegistrationApplications(form, options) {
|
659
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/list", form, options);
|
851
660
|
}
|
852
661
|
/**
|
853
662
|
* @summary Approve a registration application
|
854
663
|
*/
|
855
|
-
approveRegistrationApplication(form, options) {
|
856
|
-
return
|
857
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form, options);
|
858
|
-
});
|
664
|
+
async approveRegistrationApplication(form, options) {
|
665
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form, options);
|
859
666
|
}
|
860
667
|
/**
|
861
668
|
* @summary Get the application a user submitted when they first registered their account
|
862
669
|
*/
|
863
|
-
getRegistrationApplication(form, options) {
|
864
|
-
return
|
865
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form, options);
|
866
|
-
});
|
670
|
+
async getRegistrationApplication(form, options) {
|
671
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form, options);
|
867
672
|
}
|
868
673
|
/**
|
869
674
|
* @summary Purge / Delete a person from the database.
|
870
675
|
*/
|
871
|
-
purgePerson(form, options) {
|
872
|
-
return
|
873
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/person", form, options);
|
874
|
-
});
|
676
|
+
async purgePerson(form, options) {
|
677
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/person", form, options);
|
875
678
|
}
|
876
679
|
/**
|
877
680
|
* @summary Purge / Delete a community from the database.
|
878
681
|
*/
|
879
|
-
purgeCommunity(form, options) {
|
880
|
-
return
|
881
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/community", form, options);
|
882
|
-
});
|
682
|
+
async purgeCommunity(form, options) {
|
683
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/community", form, options);
|
883
684
|
}
|
884
685
|
/**
|
885
686
|
* @summary Purge / Delete a post from the database.
|
886
687
|
*/
|
887
|
-
purgePost(form, options) {
|
888
|
-
return
|
889
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/post", form, options);
|
890
|
-
});
|
688
|
+
async purgePost(form, options) {
|
689
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/post", form, options);
|
891
690
|
}
|
892
691
|
/**
|
893
692
|
* @summary Purge / Delete a comment from the database.
|
894
693
|
*/
|
895
|
-
purgeComment(form, options) {
|
896
|
-
return
|
897
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/comment", form, options);
|
898
|
-
});
|
694
|
+
async purgeComment(form, options) {
|
695
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/comment", form, options);
|
899
696
|
}
|
900
697
|
/**
|
901
698
|
* @summary Create a new custom emoji.
|
902
699
|
*/
|
903
|
-
createCustomEmoji(form, options) {
|
904
|
-
return
|
905
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form, options);
|
906
|
-
});
|
700
|
+
async createCustomEmoji(form, options) {
|
701
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form, options);
|
907
702
|
}
|
908
703
|
/**
|
909
704
|
* @summary Edit an existing custom emoji.
|
910
705
|
*/
|
911
|
-
editCustomEmoji(form, options) {
|
912
|
-
return
|
913
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form, options);
|
914
|
-
});
|
706
|
+
async editCustomEmoji(form, options) {
|
707
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form, options);
|
915
708
|
}
|
916
709
|
/**
|
917
710
|
* @summary Delete a custom emoji.
|
918
711
|
*/
|
919
|
-
deleteCustomEmoji(form, options) {
|
920
|
-
return
|
921
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form, options);
|
922
|
-
});
|
712
|
+
async deleteCustomEmoji(form, options) {
|
713
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form, options);
|
923
714
|
}
|
924
715
|
/**
|
925
716
|
* @summary List custom emojis
|
926
717
|
*/
|
927
|
-
listCustomEmojis(form, options) {
|
928
|
-
return
|
929
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/custom_emoji/list", form, options);
|
930
|
-
});
|
718
|
+
async listCustomEmojis(form, options) {
|
719
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/custom_emoji/list", form, options);
|
931
720
|
}
|
932
721
|
/**
|
933
722
|
* @summary Create a new tagline
|
934
723
|
*/
|
935
|
-
createTagline(form, options) {
|
936
|
-
return
|
937
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form, options);
|
938
|
-
});
|
724
|
+
async createTagline(form, options) {
|
725
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form, options);
|
939
726
|
}
|
940
727
|
/**
|
941
728
|
* @summary Edit an existing tagline
|
942
729
|
*/
|
943
|
-
editTagline(form, options) {
|
944
|
-
return
|
945
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form, options);
|
946
|
-
});
|
730
|
+
async editTagline(form, options) {
|
731
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form, options);
|
947
732
|
}
|
948
733
|
/**
|
949
734
|
* @summary Delete a tagline
|
950
735
|
*/
|
951
|
-
deleteTagline(form, options) {
|
952
|
-
return
|
953
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form, options);
|
954
|
-
});
|
736
|
+
async deleteTagline(form, options) {
|
737
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form, options);
|
955
738
|
}
|
956
739
|
/**
|
957
740
|
* @summary List taglines.
|
958
741
|
*/
|
959
|
-
listTaglines(form, options) {
|
960
|
-
return
|
961
|
-
|
962
|
-
|
742
|
+
async listTaglines(form, options) {
|
743
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/tagline/list", form, options);
|
744
|
+
}
|
745
|
+
/**
|
746
|
+
* @summary Create a community post tag.
|
747
|
+
*/
|
748
|
+
createCommunityTag(form, options) {
|
749
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
750
|
+
}
|
751
|
+
/**
|
752
|
+
* @summary Update a community post tag.
|
753
|
+
*/
|
754
|
+
updateCommunityTag(form, options) {
|
755
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/tag", form, options);
|
756
|
+
}
|
757
|
+
/**
|
758
|
+
* @summary Delete a post tag in a community.
|
759
|
+
*/
|
760
|
+
deleteCommunityTag(form, options) {
|
761
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/tag", form, options);
|
963
762
|
}
|
964
763
|
/**
|
965
764
|
* @summary Create a new oauth provider method
|
966
765
|
*/
|
967
|
-
createOAuthProvider(form, options) {
|
968
|
-
return
|
969
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form, options);
|
970
|
-
});
|
766
|
+
async createOAuthProvider(form, options) {
|
767
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form, options);
|
971
768
|
}
|
972
769
|
/**
|
973
770
|
* @summary Edit an existing oauth provider method
|
974
771
|
*/
|
975
|
-
editOAuthProvider(form, options) {
|
976
|
-
return
|
977
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form, options);
|
978
|
-
});
|
772
|
+
async editOAuthProvider(form, options) {
|
773
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form, options);
|
979
774
|
}
|
980
775
|
/**
|
981
776
|
* @summary Delete an oauth provider method
|
982
777
|
*/
|
983
|
-
deleteOAuthProvider(form, options) {
|
984
|
-
return
|
985
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form, options);
|
986
|
-
});
|
778
|
+
async deleteOAuthProvider(form, options) {
|
779
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form, options);
|
987
780
|
}
|
988
781
|
/**
|
989
782
|
* @summary Authenticate with OAuth
|
990
783
|
*/
|
991
|
-
authenticateWithOAuth(form, options) {
|
992
|
-
return
|
993
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form, options);
|
994
|
-
});
|
784
|
+
async authenticateWithOAuth(form, options) {
|
785
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form, options);
|
995
786
|
}
|
996
787
|
/**
|
997
788
|
* @summary Fetch federated instances.
|
998
789
|
*/
|
999
|
-
getFederatedInstances(options) {
|
1000
|
-
return
|
1001
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
|
1002
|
-
});
|
790
|
+
async getFederatedInstances(options) {
|
791
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
|
1003
792
|
}
|
1004
793
|
/**
|
1005
794
|
* @summary List user reports.
|
1006
795
|
*/
|
1007
|
-
listReports(form, options) {
|
1008
|
-
return
|
1009
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
1010
|
-
});
|
796
|
+
async listReports(form, options) {
|
797
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
1011
798
|
}
|
1012
799
|
/**
|
1013
800
|
* @summary Block an instance as user.
|
1014
801
|
*/
|
1015
|
-
userBlockInstance(form, options) {
|
1016
|
-
return
|
1017
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
|
1018
|
-
});
|
802
|
+
async userBlockInstance(form, options) {
|
803
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
|
1019
804
|
}
|
1020
805
|
/**
|
1021
806
|
* @summary Globally block an instance as admin.
|
1022
807
|
*/
|
1023
|
-
adminBlockInstance(form, options) {
|
1024
|
-
return
|
1025
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/block", form, options);
|
1026
|
-
});
|
808
|
+
async adminBlockInstance(form, options) {
|
809
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/block", form, options);
|
1027
810
|
}
|
1028
811
|
/**
|
1029
812
|
* @summary Globally allow an instance as admin.
|
1030
813
|
*/
|
1031
|
-
adminAllowInstance(form, options) {
|
1032
|
-
return
|
1033
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/allow", form, options);
|
1034
|
-
});
|
814
|
+
async adminAllowInstance(form, options) {
|
815
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/allow", form, options);
|
1035
816
|
}
|
1036
817
|
/**
|
1037
818
|
* @summary Upload new user avatar.
|
1038
819
|
*/
|
1039
|
-
uploadUserAvatar(image, options) {
|
1040
|
-
return
|
1041
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
|
1042
|
-
});
|
820
|
+
async uploadUserAvatar(image, options) {
|
821
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
|
1043
822
|
}
|
1044
823
|
/**
|
1045
824
|
* @summary Delete the user avatar.
|
1046
825
|
*/
|
1047
|
-
deleteUserAvatar(options) {
|
1048
|
-
return
|
1049
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
|
1050
|
-
});
|
826
|
+
async deleteUserAvatar(options) {
|
827
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
|
1051
828
|
}
|
1052
829
|
/**
|
1053
830
|
* @summary Upload new user banner.
|
1054
831
|
*/
|
1055
|
-
uploadUserBanner(image, options) {
|
1056
|
-
return
|
1057
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
|
1058
|
-
});
|
832
|
+
async uploadUserBanner(image, options) {
|
833
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
|
1059
834
|
}
|
1060
835
|
/**
|
1061
836
|
* @summary Delete the user banner.
|
1062
837
|
*/
|
1063
|
-
deleteUserBanner(options) {
|
1064
|
-
return
|
1065
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
|
1066
|
-
});
|
838
|
+
async deleteUserBanner(options) {
|
839
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
|
1067
840
|
}
|
1068
841
|
/**
|
1069
842
|
* @summary Upload new community icon.
|
1070
843
|
*/
|
1071
|
-
uploadCommunityIcon(image, options) {
|
1072
|
-
return
|
1073
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/icon", image, options);
|
1074
|
-
});
|
844
|
+
async uploadCommunityIcon(query, image, options) {
|
845
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/icon", query, image, options);
|
1075
846
|
}
|
1076
847
|
/**
|
1077
848
|
* @summary Delete the community icon.
|
1078
849
|
*/
|
1079
|
-
deleteCommunityIcon(options) {
|
1080
|
-
return
|
1081
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", {}, options);
|
1082
|
-
});
|
850
|
+
async deleteCommunityIcon(form, options) {
|
851
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", form, options);
|
1083
852
|
}
|
1084
853
|
/**
|
1085
854
|
* @summary Upload new community banner.
|
1086
855
|
*/
|
1087
|
-
uploadCommunityBanner(image, options) {
|
1088
|
-
return
|
1089
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/banner", image, options);
|
1090
|
-
});
|
856
|
+
async uploadCommunityBanner(query, image, options) {
|
857
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/banner", query, image, options);
|
1091
858
|
}
|
1092
859
|
/**
|
1093
860
|
* @summary Delete the community banner.
|
1094
861
|
*/
|
1095
|
-
deleteCommunityBanner(options) {
|
1096
|
-
return
|
1097
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", {}, options);
|
1098
|
-
});
|
862
|
+
async deleteCommunityBanner(form, options) {
|
863
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", form, options);
|
1099
864
|
}
|
1100
865
|
/**
|
1101
866
|
* @summary Upload new site icon.
|
1102
867
|
*/
|
1103
|
-
uploadSiteIcon(image, options) {
|
1104
|
-
return
|
1105
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
|
1106
|
-
});
|
868
|
+
async uploadSiteIcon(image, options) {
|
869
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
|
1107
870
|
}
|
1108
871
|
/**
|
1109
872
|
* @summary Delete the site icon.
|
1110
873
|
*/
|
1111
|
-
deleteSiteIcon(options) {
|
1112
|
-
return
|
1113
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
|
1114
|
-
});
|
874
|
+
async deleteSiteIcon(options) {
|
875
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
|
1115
876
|
}
|
1116
877
|
/**
|
1117
878
|
* @summary Upload new site banner.
|
1118
879
|
*/
|
1119
|
-
uploadSiteBanner(image, options) {
|
1120
|
-
return
|
1121
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
|
1122
|
-
});
|
880
|
+
async uploadSiteBanner(image, options) {
|
881
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
|
1123
882
|
}
|
1124
883
|
/**
|
1125
884
|
* @summary Delete the site banner.
|
1126
885
|
*/
|
1127
|
-
deleteSiteBanner(options) {
|
1128
|
-
return
|
1129
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
|
1130
|
-
});
|
886
|
+
async deleteSiteBanner(options) {
|
887
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
|
1131
888
|
}
|
1132
889
|
/**
|
1133
890
|
* @summary Upload an image to the server.
|
1134
891
|
*/
|
1135
|
-
uploadImage(image, options) {
|
1136
|
-
return
|
1137
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
|
1138
|
-
});
|
892
|
+
async uploadImage(image, options) {
|
893
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
|
1139
894
|
}
|
1140
895
|
/**
|
1141
896
|
* @summary Health check for image functionality
|
1142
897
|
*/
|
1143
|
-
imageHealth(options) {
|
1144
|
-
return
|
1145
|
-
|
1146
|
-
|
898
|
+
async imageHealth(options) {
|
899
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
|
900
|
+
}
|
901
|
+
/**
|
902
|
+
* Mark donation dialog as shown, so it isn't displayed anymore.
|
903
|
+
*
|
904
|
+
* `HTTP.POST /user/donation_dialog_shown`
|
905
|
+
*/
|
906
|
+
donation_dialog_shown(options) {
|
907
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/donation_dialog_shown", {}, options);
|
1147
908
|
}
|
1148
909
|
/**
|
1149
910
|
* Set the headers (can be used to set the auth header)
|
@@ -1160,38 +921,53 @@ _LemmyHttp_instances = new WeakSet();
|
|
1160
921
|
_LemmyHttp_buildFullUrl = function _LemmyHttp_buildFullUrl(endpoint) {
|
1161
922
|
return `${__classPrivateFieldGet(this, _LemmyHttp_apiUrl, "f")}${endpoint}`;
|
1162
923
|
};
|
1163
|
-
_LemmyHttp_upload = function _LemmyHttp_upload(
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
924
|
+
_LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
|
925
|
+
const formData = createFormData(image);
|
926
|
+
const response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, path), {
|
927
|
+
...options,
|
928
|
+
method: HttpType.Post,
|
929
|
+
body: formData,
|
930
|
+
headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
|
1168
931
|
});
|
932
|
+
return response.json();
|
1169
933
|
};
|
1170
|
-
|
1171
|
-
return
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
934
|
+
_LemmyHttp_uploadWithQuery = async function _LemmyHttp_uploadWithQuery(path, query, { image }, options) {
|
935
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, `${path}?${encodeGetParams(query)}`, { image }, options);
|
936
|
+
};
|
937
|
+
_LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
|
938
|
+
let response;
|
939
|
+
if (type_ === HttpType.Get) {
|
940
|
+
const getUrl = `${__classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint)}?${encodeGetParams(form)}`;
|
941
|
+
response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, getUrl, {
|
942
|
+
...options,
|
943
|
+
method: HttpType.Get,
|
944
|
+
headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
|
945
|
+
});
|
946
|
+
}
|
947
|
+
else {
|
948
|
+
response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint), {
|
949
|
+
...options,
|
950
|
+
method: type_,
|
951
|
+
headers: {
|
952
|
+
"Content-Type": "application/json",
|
953
|
+
...__classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
|
954
|
+
},
|
955
|
+
body: JSON.stringify(form),
|
956
|
+
});
|
957
|
+
}
|
958
|
+
let json = undefined;
|
959
|
+
try {
|
960
|
+
json = await response.json();
|
961
|
+
}
|
962
|
+
catch {
|
963
|
+
throw new Error(response.statusText);
|
964
|
+
}
|
965
|
+
if (!response.ok) {
|
966
|
+
throw new Error(json["error"] ?? response.statusText);
|
967
|
+
}
|
968
|
+
else {
|
969
|
+
return json;
|
970
|
+
}
|
1195
971
|
};
|
1196
972
|
__decorate([
|
1197
973
|
(0, runtime_1.Security)("bearerAuth"),
|
@@ -1432,6 +1208,20 @@ __decorate([
|
|
1432
1208
|
__param(0, (0, runtime_1.Queries)()),
|
1433
1209
|
__param(1, (0, runtime_1.Inject)())
|
1434
1210
|
], LemmyHttp.prototype, "getRandomCommunity", null);
|
1211
|
+
__decorate([
|
1212
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1213
|
+
(0, runtime_1.Post)("/community/report"),
|
1214
|
+
(0, runtime_1.Tags)("Community"),
|
1215
|
+
__param(0, (0, runtime_1.Body)()),
|
1216
|
+
__param(1, (0, runtime_1.Inject)())
|
1217
|
+
], LemmyHttp.prototype, "createCommunityReport", null);
|
1218
|
+
__decorate([
|
1219
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1220
|
+
(0, runtime_1.Put)("/community/report/resolve"),
|
1221
|
+
(0, runtime_1.Tags)("Community", "Admin"),
|
1222
|
+
__param(0, (0, runtime_1.Body)()),
|
1223
|
+
__param(1, (0, runtime_1.Inject)())
|
1224
|
+
], LemmyHttp.prototype, "resolveCommunityReport", null);
|
1435
1225
|
__decorate([
|
1436
1226
|
(0, runtime_1.Security)("bearerAuth"),
|
1437
1227
|
(0, runtime_1.Post)("/post"),
|
@@ -1970,6 +1760,27 @@ __decorate([
|
|
1970
1760
|
__param(0, (0, runtime_1.Queries)()),
|
1971
1761
|
__param(1, (0, runtime_1.Inject)())
|
1972
1762
|
], LemmyHttp.prototype, "listTaglines", null);
|
1763
|
+
__decorate([
|
1764
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1765
|
+
(0, runtime_1.Post)("/community/tag"),
|
1766
|
+
(0, runtime_1.Tags)("Community"),
|
1767
|
+
__param(0, (0, runtime_1.Body)()),
|
1768
|
+
__param(1, (0, runtime_1.Inject)())
|
1769
|
+
], LemmyHttp.prototype, "createCommunityTag", null);
|
1770
|
+
__decorate([
|
1771
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1772
|
+
(0, runtime_1.Put)("/community/tag"),
|
1773
|
+
(0, runtime_1.Tags)("Community"),
|
1774
|
+
__param(0, (0, runtime_1.Body)()),
|
1775
|
+
__param(1, (0, runtime_1.Inject)())
|
1776
|
+
], LemmyHttp.prototype, "updateCommunityTag", null);
|
1777
|
+
__decorate([
|
1778
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1779
|
+
(0, runtime_1.Delete)("/community/tag"),
|
1780
|
+
(0, runtime_1.Tags)("Community"),
|
1781
|
+
__param(0, (0, runtime_1.Body)()),
|
1782
|
+
__param(1, (0, runtime_1.Inject)())
|
1783
|
+
], LemmyHttp.prototype, "deleteCommunityTag", null);
|
1973
1784
|
__decorate([
|
1974
1785
|
(0, runtime_1.Security)("bearerAuth"),
|
1975
1786
|
(0, runtime_1.Post)("/oauth_provider"),
|
@@ -2061,27 +1872,31 @@ __decorate([
|
|
2061
1872
|
(0, runtime_1.Security)("bearerAuth"),
|
2062
1873
|
(0, runtime_1.Post)("/community/icon"),
|
2063
1874
|
(0, runtime_1.Tags)("Community", "Media"),
|
2064
|
-
__param(0, (0, runtime_1.
|
2065
|
-
__param(1, (0, runtime_1.
|
1875
|
+
__param(0, (0, runtime_1.Queries)()),
|
1876
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1877
|
+
__param(2, (0, runtime_1.Inject)())
|
2066
1878
|
], LemmyHttp.prototype, "uploadCommunityIcon", null);
|
2067
1879
|
__decorate([
|
2068
1880
|
(0, runtime_1.Security)("bearerAuth"),
|
2069
1881
|
(0, runtime_1.Delete)("/community/icon"),
|
2070
1882
|
(0, runtime_1.Tags)("Community", "Media"),
|
2071
|
-
__param(0, (0, runtime_1.
|
1883
|
+
__param(0, (0, runtime_1.Body)()),
|
1884
|
+
__param(1, (0, runtime_1.Inject)())
|
2072
1885
|
], LemmyHttp.prototype, "deleteCommunityIcon", null);
|
2073
1886
|
__decorate([
|
2074
1887
|
(0, runtime_1.Security)("bearerAuth"),
|
2075
1888
|
(0, runtime_1.Post)("/community/banner"),
|
2076
1889
|
(0, runtime_1.Tags)("Community", "Media"),
|
2077
|
-
__param(0, (0, runtime_1.
|
2078
|
-
__param(1, (0, runtime_1.
|
1890
|
+
__param(0, (0, runtime_1.Queries)()),
|
1891
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1892
|
+
__param(2, (0, runtime_1.Inject)())
|
2079
1893
|
], LemmyHttp.prototype, "uploadCommunityBanner", null);
|
2080
1894
|
__decorate([
|
2081
1895
|
(0, runtime_1.Security)("bearerAuth"),
|
2082
1896
|
(0, runtime_1.Delete)("/community/banner"),
|
2083
1897
|
(0, runtime_1.Tags)("Community", "Media"),
|
2084
|
-
__param(0, (0, runtime_1.
|
1898
|
+
__param(0, (0, runtime_1.Body)()),
|
1899
|
+
__param(1, (0, runtime_1.Inject)())
|
2085
1900
|
], LemmyHttp.prototype, "deleteCommunityBanner", null);
|
2086
1901
|
__decorate([
|
2087
1902
|
(0, runtime_1.Security)("bearerAuth"),
|
@@ -2121,6 +1936,9 @@ __decorate([
|
|
2121
1936
|
(0, runtime_1.Tags)("Media"),
|
2122
1937
|
__param(0, (0, runtime_1.Inject)())
|
2123
1938
|
], LemmyHttp.prototype, "imageHealth", null);
|
1939
|
+
__decorate([
|
1940
|
+
__param(0, (0, runtime_1.Inject)())
|
1941
|
+
], LemmyHttp.prototype, "donation_dialog_shown", null);
|
2124
1942
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
2125
1943
|
(0, runtime_1.Route)("api/v4")
|
2126
1944
|
], LemmyHttp);
|