lemmy-js-client 1.0.0-media-fixes.0 → 1.0.0-media-fixes.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 +22 -0
- package/dist/http.js +362 -577
- package/dist/index.d.ts +4 -0
- package/dist/types/CommentReplyView.d.ts +2 -0
- package/dist/types/CommentView.d.ts +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/DeleteCommunityTag.d.ts +7 -0
- package/dist/types/DeleteCommunityTag.js +2 -0
- package/dist/types/EditPost.d.ts +1 -1
- package/dist/types/LemmyErrorType.d.ts +4 -0
- package/dist/types/PersonPostMentionView.d.ts +2 -0
- package/dist/types/PostView.d.ts +2 -0
- package/dist/types/Tag.d.ts +8 -6
- 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/package.json +2 -2
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");
|
@@ -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,748 @@ 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
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form, options);
|
346
|
-
});
|
268
|
+
async getRandomCommunity(form, options) {
|
269
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form, options);
|
347
270
|
}
|
348
271
|
/**
|
349
272
|
* @summary Create a post.
|
350
273
|
*/
|
351
|
-
createPost(form, options) {
|
352
|
-
return
|
353
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post", form, options);
|
354
|
-
});
|
274
|
+
async createPost(form, options) {
|
275
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post", form, options);
|
355
276
|
}
|
356
277
|
/**
|
357
278
|
* @summary Get / fetch a post.
|
358
279
|
*/
|
359
|
-
getPost() {
|
360
|
-
return
|
361
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post", form, options);
|
362
|
-
});
|
280
|
+
async getPost(form = {}, options) {
|
281
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post", form, options);
|
363
282
|
}
|
364
283
|
/**
|
365
284
|
* @summary Edit a post.
|
366
285
|
*/
|
367
|
-
editPost(form, options) {
|
368
|
-
return
|
369
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
|
370
|
-
});
|
286
|
+
async editPost(form, options) {
|
287
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
|
371
288
|
}
|
372
289
|
/**
|
373
290
|
* @summary Delete a post.
|
374
291
|
*/
|
375
|
-
deletePost(form, options) {
|
376
|
-
return
|
377
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
|
378
|
-
});
|
292
|
+
async deletePost(form, options) {
|
293
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/delete", form, options);
|
379
294
|
}
|
380
295
|
/**
|
381
296
|
* @summary A moderator remove for a post.
|
382
297
|
*/
|
383
|
-
removePost(form, options) {
|
384
|
-
return
|
385
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/remove", form, options);
|
386
|
-
});
|
298
|
+
async removePost(form, options) {
|
299
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/remove", form, options);
|
387
300
|
}
|
388
301
|
/**
|
389
302
|
* @summary Mark a post as read.
|
390
303
|
*/
|
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
|
-
});
|
304
|
+
async markPostAsRead(form, options) {
|
305
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form, options);
|
395
306
|
}
|
396
307
|
/**
|
397
308
|
* @summary Mark multiple posts as read.
|
398
309
|
*/
|
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
|
-
});
|
310
|
+
async markManyPostAsRead(form, options) {
|
311
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read/many", form, options);
|
403
312
|
}
|
404
313
|
/**
|
405
314
|
* @summary Hide a post from list views.
|
406
315
|
*/
|
407
|
-
hidePost(form, options) {
|
408
|
-
return
|
409
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form, options);
|
410
|
-
});
|
316
|
+
async hidePost(form, options) {
|
317
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form, options);
|
411
318
|
}
|
412
319
|
/**
|
413
320
|
* @summary A moderator can lock a post ( IE disable new comments ).
|
414
321
|
*/
|
415
|
-
lockPost(form, options) {
|
416
|
-
return
|
417
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/lock", form, options);
|
418
|
-
});
|
322
|
+
async lockPost(form, options) {
|
323
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/lock", form, options);
|
419
324
|
}
|
420
325
|
/**
|
421
326
|
* @summary A moderator can feature a community post ( IE stick it to the top of a community ).
|
422
327
|
*/
|
423
|
-
featurePost(form, options) {
|
424
|
-
return
|
425
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/feature", form, options);
|
426
|
-
});
|
328
|
+
async featurePost(form, options) {
|
329
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/feature", form, options);
|
427
330
|
}
|
428
331
|
/**
|
429
332
|
* @summary Get / fetch posts, with various filters.
|
430
333
|
*/
|
431
|
-
getPosts() {
|
432
|
-
return
|
433
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/list", form, options);
|
434
|
-
});
|
334
|
+
async getPosts(form = {}, options) {
|
335
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/list", form, options);
|
435
336
|
}
|
436
337
|
/**
|
437
338
|
* @summary Like / vote on a post.
|
438
339
|
*/
|
439
|
-
likePost(form, options) {
|
440
|
-
return
|
441
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/like", form, options);
|
442
|
-
});
|
340
|
+
async likePost(form, options) {
|
341
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/like", form, options);
|
443
342
|
}
|
444
343
|
/**
|
445
344
|
* @summary List a post's likes. Admin-only.
|
446
345
|
*/
|
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
|
-
});
|
346
|
+
async listPostLikes(form, options) {
|
347
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/like/list", form, options);
|
451
348
|
}
|
452
349
|
/**
|
453
350
|
* @summary Save a post.
|
454
351
|
*/
|
455
|
-
savePost(form, options) {
|
456
|
-
return
|
457
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/save", form, options);
|
458
|
-
});
|
352
|
+
async savePost(form, options) {
|
353
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/save", form, options);
|
459
354
|
}
|
460
355
|
/**
|
461
356
|
* @summary Report a post.
|
462
357
|
*/
|
463
|
-
createPostReport(form, options) {
|
464
|
-
return
|
465
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/report", form, options);
|
466
|
-
});
|
358
|
+
async createPostReport(form, options) {
|
359
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/report", form, options);
|
467
360
|
}
|
468
361
|
/**
|
469
362
|
* @summary Resolve a post report. Only a mod can do this.
|
470
363
|
*/
|
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
|
-
});
|
364
|
+
async resolvePostReport(form, options) {
|
365
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/report/resolve", form, options);
|
475
366
|
}
|
476
367
|
/**
|
477
368
|
* @summary Fetch metadata for any given site.
|
478
369
|
*/
|
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
|
-
});
|
370
|
+
async getSiteMetadata(form, options) {
|
371
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/post/site_metadata", form, options);
|
483
372
|
}
|
484
373
|
/**
|
485
374
|
* @summary Create a comment.
|
486
375
|
*/
|
487
|
-
createComment(form, options) {
|
488
|
-
return
|
489
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment", form, options);
|
490
|
-
});
|
376
|
+
async createComment(form, options) {
|
377
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment", form, options);
|
491
378
|
}
|
492
379
|
/**
|
493
380
|
* @summary Edit a comment.
|
494
381
|
*/
|
495
|
-
editComment(form, options) {
|
496
|
-
return
|
497
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment", form, options);
|
498
|
-
});
|
382
|
+
async editComment(form, options) {
|
383
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment", form, options);
|
499
384
|
}
|
500
385
|
/**
|
501
386
|
* @summary Delete a comment.
|
502
387
|
*/
|
503
|
-
deleteComment(form, options) {
|
504
|
-
return
|
505
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
|
506
|
-
});
|
388
|
+
async deleteComment(form, options) {
|
389
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/delete", form, options);
|
507
390
|
}
|
508
391
|
/**
|
509
392
|
* @summary A moderator remove for a comment.
|
510
393
|
*/
|
511
|
-
removeComment(form, options) {
|
512
|
-
return
|
513
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
514
|
-
});
|
394
|
+
async removeComment(form, options) {
|
395
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/remove", form, options);
|
515
396
|
}
|
516
397
|
/**
|
517
398
|
* @summary Mark a comment as read.
|
518
399
|
*/
|
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
|
-
});
|
400
|
+
async markCommentReplyAsRead(form, options) {
|
401
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/mark_as_read", form, options);
|
523
402
|
}
|
524
403
|
/**
|
525
404
|
* @summary Like / vote on a comment.
|
526
405
|
*/
|
527
|
-
likeComment(form, options) {
|
528
|
-
return
|
529
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
530
|
-
});
|
406
|
+
async likeComment(form, options) {
|
407
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/like", form, options);
|
531
408
|
}
|
532
409
|
/**
|
533
410
|
* @summary List a comment's likes. Admin-only.
|
534
411
|
*/
|
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
|
-
});
|
412
|
+
async listCommentLikes(form, options) {
|
413
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/like/list", form, options);
|
539
414
|
}
|
540
415
|
/**
|
541
416
|
* @summary Save a comment.
|
542
417
|
*/
|
543
|
-
saveComment(form, options) {
|
544
|
-
return
|
545
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/save", form, options);
|
546
|
-
});
|
418
|
+
async saveComment(form, options) {
|
419
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/save", form, options);
|
547
420
|
}
|
548
421
|
/**
|
549
422
|
* @summary Distinguishes a comment (speak as moderator)
|
550
423
|
*/
|
551
|
-
distinguishComment(form, options) {
|
552
|
-
return
|
553
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/distinguish", form, options);
|
554
|
-
});
|
424
|
+
async distinguishComment(form, options) {
|
425
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/distinguish", form, options);
|
555
426
|
}
|
556
427
|
/**
|
557
428
|
* @summary Get / fetch comments.
|
558
429
|
*/
|
559
|
-
getComments() {
|
560
|
-
return
|
561
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list", form, options);
|
562
|
-
});
|
430
|
+
async getComments(form = {}, options) {
|
431
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list", form, options);
|
563
432
|
}
|
564
433
|
/**
|
565
434
|
* @summary Get / fetch comments, but without the post or community.
|
566
435
|
*/
|
567
|
-
getCommentsSlim() {
|
568
|
-
return
|
569
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list/slim", form, options);
|
570
|
-
});
|
436
|
+
async getCommentsSlim(form = {}, options) {
|
437
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment/list/slim", form, options);
|
571
438
|
}
|
572
439
|
/**
|
573
440
|
* @summary Get / fetch comment.
|
574
441
|
*/
|
575
|
-
getComment(form, options) {
|
576
|
-
return
|
577
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment", form, options);
|
578
|
-
});
|
442
|
+
async getComment(form, options) {
|
443
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/comment", form, options);
|
579
444
|
}
|
580
445
|
/**
|
581
446
|
* @summary Report a comment.
|
582
447
|
*/
|
583
|
-
createCommentReport(form, options) {
|
584
|
-
return
|
585
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/report", form, options);
|
586
|
-
});
|
448
|
+
async createCommentReport(form, options) {
|
449
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/comment/report", form, options);
|
587
450
|
}
|
588
451
|
/**
|
589
452
|
* @summary Resolve a comment report. Only a mod can do this.
|
590
453
|
*/
|
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
|
-
});
|
454
|
+
async resolveCommentReport(form, options) {
|
455
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/comment/report/resolve", form, options);
|
595
456
|
}
|
596
457
|
/**
|
597
458
|
* @summary Create a private message.
|
598
459
|
*/
|
599
|
-
createPrivateMessage(form, options) {
|
600
|
-
return
|
601
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message", form, options);
|
602
|
-
});
|
460
|
+
async createPrivateMessage(form, options) {
|
461
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message", form, options);
|
603
462
|
}
|
604
463
|
/**
|
605
464
|
* @summary Edit a private message.
|
606
465
|
*/
|
607
|
-
editPrivateMessage(form, options) {
|
608
|
-
return
|
609
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message", form, options);
|
610
|
-
});
|
466
|
+
async editPrivateMessage(form, options) {
|
467
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message", form, options);
|
611
468
|
}
|
612
469
|
/**
|
613
470
|
* @summary Delete a private message.
|
614
471
|
*/
|
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
|
-
});
|
472
|
+
async deletePrivateMessage(form, options) {
|
473
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/delete", form, options);
|
619
474
|
}
|
620
475
|
/**
|
621
476
|
* @summary Mark a private message as read.
|
622
477
|
*/
|
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
|
-
});
|
478
|
+
async markPrivateMessageAsRead(form, options) {
|
479
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/mark_as_read", form, options);
|
627
480
|
}
|
628
481
|
/**
|
629
482
|
* @summary Create a report for a private message.
|
630
483
|
*/
|
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
|
-
});
|
484
|
+
async createPrivateMessageReport(form, options) {
|
485
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/private_message/report", form, options);
|
635
486
|
}
|
636
487
|
/**
|
637
488
|
* @summary Resolve a report for a private message.
|
638
489
|
*/
|
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
|
-
});
|
490
|
+
async resolvePrivateMessageReport(form, options) {
|
491
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/private_message/report/resolve", form, options);
|
643
492
|
}
|
644
493
|
/**
|
645
494
|
* @summary Register a new user.
|
646
495
|
*/
|
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
|
-
});
|
496
|
+
async register(form, options) {
|
497
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/register", form, options);
|
651
498
|
}
|
652
499
|
/**
|
653
500
|
* @summary Log into lemmy.
|
654
501
|
*/
|
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
|
-
});
|
502
|
+
async login(form, options) {
|
503
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/login", form, options);
|
659
504
|
}
|
660
505
|
/**
|
661
506
|
* @summary Invalidate the currently used auth token.
|
662
507
|
*/
|
663
|
-
logout(options) {
|
664
|
-
return
|
665
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/logout", {}, options);
|
666
|
-
});
|
508
|
+
async logout(options) {
|
509
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/logout", {}, options);
|
667
510
|
}
|
668
511
|
/**
|
669
512
|
* @summary Get the details for a person.
|
670
513
|
*/
|
671
|
-
getPersonDetails() {
|
672
|
-
return
|
673
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
|
674
|
-
});
|
514
|
+
async getPersonDetails(form = {}, options) {
|
515
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person", form, options);
|
675
516
|
}
|
676
517
|
/**
|
677
518
|
* @summary List the content for a person.
|
678
519
|
*/
|
679
|
-
listPersonContent() {
|
680
|
-
return
|
681
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
682
|
-
});
|
520
|
+
async listPersonContent(form = {}, options) {
|
521
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/person/content", form, options);
|
683
522
|
}
|
684
523
|
/**
|
685
524
|
* @summary Mark a person mention as read.
|
686
525
|
*/
|
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
|
-
});
|
526
|
+
async markCommentMentionAsRead(form, options) {
|
527
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/comment/mark_as_read", form, options);
|
691
528
|
}
|
692
529
|
/**
|
693
530
|
* @summary Mark a person post body mention as read.
|
694
531
|
*/
|
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
|
-
});
|
532
|
+
async markPostMentionAsRead(form, options) {
|
533
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mention/post/mark_as_read", form, options);
|
699
534
|
}
|
700
535
|
/**
|
701
536
|
* @summary Ban a person from your site.
|
702
537
|
*/
|
703
|
-
banPerson(form, options) {
|
704
|
-
return
|
705
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
|
706
|
-
});
|
538
|
+
async banPerson(form, options) {
|
539
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
|
707
540
|
}
|
708
541
|
/**
|
709
542
|
* @summary Get a list of banned users.
|
710
543
|
*/
|
711
|
-
listBannedPersons() {
|
712
|
-
return
|
713
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", form, options);
|
714
|
-
});
|
544
|
+
async listBannedPersons(form = {}, options) {
|
545
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", form, options);
|
715
546
|
}
|
716
547
|
/**
|
717
548
|
* @summary Block a person.
|
718
549
|
*/
|
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
|
-
});
|
550
|
+
async blockPerson(form, options) {
|
551
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/person", form, options);
|
723
552
|
}
|
724
553
|
/**
|
725
554
|
* @summary Fetch a Captcha.
|
726
555
|
*/
|
727
|
-
getCaptcha(options) {
|
728
|
-
return
|
729
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/get_captcha", {}, options);
|
730
|
-
});
|
556
|
+
async getCaptcha(options) {
|
557
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/auth/get_captcha", {}, options);
|
731
558
|
}
|
732
559
|
/**
|
733
560
|
* @summary Delete your account.
|
734
561
|
*/
|
735
|
-
deleteAccount(form, options) {
|
736
|
-
return
|
737
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
|
738
|
-
});
|
562
|
+
async deleteAccount(form, options) {
|
563
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/delete", form, options);
|
739
564
|
}
|
740
565
|
/**
|
741
566
|
* @summary Reset your password.
|
742
567
|
*/
|
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
|
-
});
|
568
|
+
async passwordReset(form, options) {
|
569
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_reset", form, options);
|
747
570
|
}
|
748
571
|
/**
|
749
572
|
* @summary Change your password from an email / token based reset.
|
750
573
|
*/
|
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
|
-
});
|
574
|
+
async passwordChangeAfterReset(form, options) {
|
575
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/password_change", form, options);
|
755
576
|
}
|
756
577
|
/**
|
757
578
|
* @summary Mark all replies as read.
|
758
579
|
*/
|
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
|
-
});
|
580
|
+
async markAllNotificationsAsRead(options) {
|
581
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/mark_as_read/all", {}, options);
|
763
582
|
}
|
764
583
|
/**
|
765
584
|
* @summary Save your user settings.
|
766
585
|
*/
|
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
|
-
});
|
586
|
+
async saveUserSettings(form, options) {
|
587
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/settings/save", form, options);
|
771
588
|
}
|
772
589
|
/**
|
773
590
|
* @summary Change your user password.
|
774
591
|
*/
|
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
|
-
});
|
592
|
+
async changePassword(form, options) {
|
593
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
|
779
594
|
}
|
780
595
|
/**
|
781
596
|
* @summary Get counts for your reports.
|
782
597
|
*/
|
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
|
-
});
|
598
|
+
async getReportCount(form, options) {
|
599
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
|
787
600
|
}
|
788
601
|
/**
|
789
602
|
* @summary Get your unread counts.
|
790
603
|
*/
|
791
|
-
getUnreadCount(options) {
|
792
|
-
return
|
793
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
|
794
|
-
});
|
604
|
+
async getUnreadCount(options) {
|
605
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_count", {}, options);
|
795
606
|
}
|
796
607
|
/**
|
797
608
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
798
609
|
*/
|
799
|
-
listInbox(form, options) {
|
800
|
-
return
|
801
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/inbox", form, options);
|
802
|
-
});
|
610
|
+
async listInbox(form, options) {
|
611
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/inbox", form, options);
|
803
612
|
}
|
804
613
|
/**
|
805
614
|
* @summary Verify your email
|
806
615
|
*/
|
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
|
-
});
|
616
|
+
async verifyEmail(form, options) {
|
617
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/verify_email", form, options);
|
811
618
|
}
|
812
619
|
/**
|
813
620
|
* @summary Resend a verification email.
|
814
621
|
*/
|
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
|
-
});
|
622
|
+
async resendVerificationEmail(form, options) {
|
623
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/auth/resend_verification_email", form, options);
|
819
624
|
}
|
820
625
|
/**
|
821
626
|
* @summary List your saved content.
|
822
627
|
*/
|
823
|
-
listPersonSaved(form, options) {
|
824
|
-
return
|
825
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
|
826
|
-
});
|
628
|
+
async listPersonSaved(form, options) {
|
629
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
|
827
630
|
}
|
828
631
|
/**
|
829
632
|
* @summary Add an admin to your site.
|
830
633
|
*/
|
831
|
-
addAdmin(form, options) {
|
832
|
-
return
|
833
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
|
834
|
-
});
|
634
|
+
async addAdmin(form, options) {
|
635
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
|
835
636
|
}
|
836
637
|
/**
|
837
638
|
* @summary Get the unread registration applications count.
|
838
639
|
*/
|
839
|
-
getUnreadRegistrationApplicationCount(options) {
|
840
|
-
return
|
841
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
|
842
|
-
});
|
640
|
+
async getUnreadRegistrationApplicationCount(options) {
|
641
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
|
843
642
|
}
|
844
643
|
/**
|
845
644
|
* @summary List the registration applications.
|
846
645
|
*/
|
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
|
-
});
|
646
|
+
async listRegistrationApplications(form, options) {
|
647
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/list", form, options);
|
851
648
|
}
|
852
649
|
/**
|
853
650
|
* @summary Approve a registration application
|
854
651
|
*/
|
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
|
-
});
|
652
|
+
async approveRegistrationApplication(form, options) {
|
653
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form, options);
|
859
654
|
}
|
860
655
|
/**
|
861
656
|
* @summary Get the application a user submitted when they first registered their account
|
862
657
|
*/
|
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
|
-
});
|
658
|
+
async getRegistrationApplication(form, options) {
|
659
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form, options);
|
867
660
|
}
|
868
661
|
/**
|
869
662
|
* @summary Purge / Delete a person from the database.
|
870
663
|
*/
|
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
|
-
});
|
664
|
+
async purgePerson(form, options) {
|
665
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/person", form, options);
|
875
666
|
}
|
876
667
|
/**
|
877
668
|
* @summary Purge / Delete a community from the database.
|
878
669
|
*/
|
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
|
-
});
|
670
|
+
async purgeCommunity(form, options) {
|
671
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/community", form, options);
|
883
672
|
}
|
884
673
|
/**
|
885
674
|
* @summary Purge / Delete a post from the database.
|
886
675
|
*/
|
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
|
-
});
|
676
|
+
async purgePost(form, options) {
|
677
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/post", form, options);
|
891
678
|
}
|
892
679
|
/**
|
893
680
|
* @summary Purge / Delete a comment from the database.
|
894
681
|
*/
|
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
|
-
});
|
682
|
+
async purgeComment(form, options) {
|
683
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/purge/comment", form, options);
|
899
684
|
}
|
900
685
|
/**
|
901
686
|
* @summary Create a new custom emoji.
|
902
687
|
*/
|
903
|
-
createCustomEmoji(form, options) {
|
904
|
-
return
|
905
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form, options);
|
906
|
-
});
|
688
|
+
async createCustomEmoji(form, options) {
|
689
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji", form, options);
|
907
690
|
}
|
908
691
|
/**
|
909
692
|
* @summary Edit an existing custom emoji.
|
910
693
|
*/
|
911
|
-
editCustomEmoji(form, options) {
|
912
|
-
return
|
913
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form, options);
|
914
|
-
});
|
694
|
+
async editCustomEmoji(form, options) {
|
695
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/custom_emoji", form, options);
|
915
696
|
}
|
916
697
|
/**
|
917
698
|
* @summary Delete a custom emoji.
|
918
699
|
*/
|
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
|
-
});
|
700
|
+
async deleteCustomEmoji(form, options) {
|
701
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form, options);
|
923
702
|
}
|
924
703
|
/**
|
925
704
|
* @summary List custom emojis
|
926
705
|
*/
|
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
|
-
});
|
706
|
+
async listCustomEmojis(form, options) {
|
707
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/custom_emoji/list", form, options);
|
931
708
|
}
|
932
709
|
/**
|
933
710
|
* @summary Create a new tagline
|
934
711
|
*/
|
935
|
-
createTagline(form, options) {
|
936
|
-
return
|
937
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form, options);
|
938
|
-
});
|
712
|
+
async createTagline(form, options) {
|
713
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form, options);
|
939
714
|
}
|
940
715
|
/**
|
941
716
|
* @summary Edit an existing tagline
|
942
717
|
*/
|
943
|
-
editTagline(form, options) {
|
944
|
-
return
|
945
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form, options);
|
946
|
-
});
|
718
|
+
async editTagline(form, options) {
|
719
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form, options);
|
947
720
|
}
|
948
721
|
/**
|
949
722
|
* @summary Delete a tagline
|
950
723
|
*/
|
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
|
-
});
|
724
|
+
async deleteTagline(form, options) {
|
725
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form, options);
|
955
726
|
}
|
956
727
|
/**
|
957
728
|
* @summary List taglines.
|
958
729
|
*/
|
959
|
-
listTaglines(form, options) {
|
960
|
-
return
|
961
|
-
|
962
|
-
|
730
|
+
async listTaglines(form, options) {
|
731
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/tagline/list", form, options);
|
732
|
+
}
|
733
|
+
/**
|
734
|
+
* @summary Create a community post tag.
|
735
|
+
*/
|
736
|
+
createCommunityTag(form, options) {
|
737
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
738
|
+
}
|
739
|
+
/**
|
740
|
+
* @summary Update a community post tag.
|
741
|
+
*/
|
742
|
+
updateCommunityTag(form, options) {
|
743
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/tag", form, options);
|
744
|
+
}
|
745
|
+
/**
|
746
|
+
* @summary Delete a post tag in a community.
|
747
|
+
*/
|
748
|
+
deleteCommunityTag(form, options) {
|
749
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/tag", form, options);
|
963
750
|
}
|
964
751
|
/**
|
965
752
|
* @summary Create a new oauth provider method
|
966
753
|
*/
|
967
|
-
createOAuthProvider(form, options) {
|
968
|
-
return
|
969
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form, options);
|
970
|
-
});
|
754
|
+
async createOAuthProvider(form, options) {
|
755
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form, options);
|
971
756
|
}
|
972
757
|
/**
|
973
758
|
* @summary Edit an existing oauth provider method
|
974
759
|
*/
|
975
|
-
editOAuthProvider(form, options) {
|
976
|
-
return
|
977
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form, options);
|
978
|
-
});
|
760
|
+
async editOAuthProvider(form, options) {
|
761
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form, options);
|
979
762
|
}
|
980
763
|
/**
|
981
764
|
* @summary Delete an oauth provider method
|
982
765
|
*/
|
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
|
-
});
|
766
|
+
async deleteOAuthProvider(form, options) {
|
767
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form, options);
|
987
768
|
}
|
988
769
|
/**
|
989
770
|
* @summary Authenticate with OAuth
|
990
771
|
*/
|
991
|
-
authenticateWithOAuth(form, options) {
|
992
|
-
return
|
993
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form, options);
|
994
|
-
});
|
772
|
+
async authenticateWithOAuth(form, options) {
|
773
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form, options);
|
995
774
|
}
|
996
775
|
/**
|
997
776
|
* @summary Fetch federated instances.
|
998
777
|
*/
|
999
|
-
getFederatedInstances(options) {
|
1000
|
-
return
|
1001
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
|
1002
|
-
});
|
778
|
+
async getFederatedInstances(options) {
|
779
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
|
1003
780
|
}
|
1004
781
|
/**
|
1005
782
|
* @summary List user reports.
|
1006
783
|
*/
|
1007
|
-
listReports(form, options) {
|
1008
|
-
return
|
1009
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
1010
|
-
});
|
784
|
+
async listReports(form, options) {
|
785
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/report/list", form, options);
|
1011
786
|
}
|
1012
787
|
/**
|
1013
788
|
* @summary Block an instance as user.
|
1014
789
|
*/
|
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
|
-
});
|
790
|
+
async userBlockInstance(form, options) {
|
791
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/account/block/instance", form, options);
|
1019
792
|
}
|
1020
793
|
/**
|
1021
794
|
* @summary Globally block an instance as admin.
|
1022
795
|
*/
|
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
|
-
});
|
796
|
+
async adminBlockInstance(form, options) {
|
797
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/block", form, options);
|
1027
798
|
}
|
1028
799
|
/**
|
1029
800
|
* @summary Globally allow an instance as admin.
|
1030
801
|
*/
|
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
|
-
});
|
802
|
+
async adminAllowInstance(form, options) {
|
803
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/instance/allow", form, options);
|
1035
804
|
}
|
1036
805
|
/**
|
1037
806
|
* @summary Upload new user avatar.
|
1038
807
|
*/
|
1039
|
-
uploadUserAvatar(image, options) {
|
1040
|
-
return
|
1041
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
|
1042
|
-
});
|
808
|
+
async uploadUserAvatar(image, options) {
|
809
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
|
1043
810
|
}
|
1044
811
|
/**
|
1045
812
|
* @summary Delete the user avatar.
|
1046
813
|
*/
|
1047
|
-
deleteUserAvatar(options) {
|
1048
|
-
return
|
1049
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
|
1050
|
-
});
|
814
|
+
async deleteUserAvatar(options) {
|
815
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
|
1051
816
|
}
|
1052
817
|
/**
|
1053
818
|
* @summary Upload new user banner.
|
1054
819
|
*/
|
1055
|
-
uploadUserBanner(image, options) {
|
1056
|
-
return
|
1057
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
|
1058
|
-
});
|
820
|
+
async uploadUserBanner(image, options) {
|
821
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
|
1059
822
|
}
|
1060
823
|
/**
|
1061
824
|
* @summary Delete the user banner.
|
1062
825
|
*/
|
1063
|
-
deleteUserBanner(options) {
|
1064
|
-
return
|
1065
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
|
1066
|
-
});
|
826
|
+
async deleteUserBanner(options) {
|
827
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
|
1067
828
|
}
|
1068
829
|
/**
|
1069
830
|
* @summary Upload new community icon.
|
1070
831
|
*/
|
1071
|
-
uploadCommunityIcon(image, options) {
|
1072
|
-
return
|
1073
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/icon", image, options);
|
1074
|
-
});
|
832
|
+
async uploadCommunityIcon(image, options) {
|
833
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/icon", image, options);
|
1075
834
|
}
|
1076
835
|
/**
|
1077
836
|
* @summary Delete the community icon.
|
1078
837
|
*/
|
1079
|
-
deleteCommunityIcon(options) {
|
1080
|
-
return
|
1081
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", {}, options);
|
1082
|
-
});
|
838
|
+
async deleteCommunityIcon(options) {
|
839
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", {}, options);
|
1083
840
|
}
|
1084
841
|
/**
|
1085
842
|
* @summary Upload new community banner.
|
1086
843
|
*/
|
1087
|
-
uploadCommunityBanner(image, options) {
|
1088
|
-
return
|
1089
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/banner", image, options);
|
1090
|
-
});
|
844
|
+
async uploadCommunityBanner(image, options) {
|
845
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/banner", image, options);
|
1091
846
|
}
|
1092
847
|
/**
|
1093
848
|
* @summary Delete the community banner.
|
1094
849
|
*/
|
1095
|
-
deleteCommunityBanner(options) {
|
1096
|
-
return
|
1097
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", {}, options);
|
1098
|
-
});
|
850
|
+
async deleteCommunityBanner(options) {
|
851
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", {}, options);
|
1099
852
|
}
|
1100
853
|
/**
|
1101
854
|
* @summary Upload new site icon.
|
1102
855
|
*/
|
1103
|
-
uploadSiteIcon(image, options) {
|
1104
|
-
return
|
1105
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
|
1106
|
-
});
|
856
|
+
async uploadSiteIcon(image, options) {
|
857
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
|
1107
858
|
}
|
1108
859
|
/**
|
1109
860
|
* @summary Delete the site icon.
|
1110
861
|
*/
|
1111
|
-
deleteSiteIcon(options) {
|
1112
|
-
return
|
1113
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
|
1114
|
-
});
|
862
|
+
async deleteSiteIcon(options) {
|
863
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
|
1115
864
|
}
|
1116
865
|
/**
|
1117
866
|
* @summary Upload new site banner.
|
1118
867
|
*/
|
1119
|
-
uploadSiteBanner(image, options) {
|
1120
|
-
return
|
1121
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
|
1122
|
-
});
|
868
|
+
async uploadSiteBanner(image, options) {
|
869
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
|
1123
870
|
}
|
1124
871
|
/**
|
1125
872
|
* @summary Delete the site banner.
|
1126
873
|
*/
|
1127
|
-
deleteSiteBanner(options) {
|
1128
|
-
return
|
1129
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
|
1130
|
-
});
|
874
|
+
async deleteSiteBanner(options) {
|
875
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
|
1131
876
|
}
|
1132
877
|
/**
|
1133
878
|
* @summary Upload an image to the server.
|
1134
879
|
*/
|
1135
|
-
uploadImage(image, options) {
|
1136
|
-
return
|
1137
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
|
1138
|
-
});
|
880
|
+
async uploadImage(image, options) {
|
881
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
|
1139
882
|
}
|
1140
883
|
/**
|
1141
884
|
* @summary Health check for image functionality
|
1142
885
|
*/
|
1143
|
-
imageHealth(options) {
|
1144
|
-
return
|
1145
|
-
|
1146
|
-
|
886
|
+
async imageHealth(options) {
|
887
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
|
888
|
+
}
|
889
|
+
/**
|
890
|
+
* Mark donation dialog as shown, so it isn't displayed anymore.
|
891
|
+
*
|
892
|
+
* `HTTP.POST /user/donation_dialog_shown`
|
893
|
+
*/
|
894
|
+
donation_dialog_shown(options) {
|
895
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/donation_dialog_shown", {}, options);
|
1147
896
|
}
|
1148
897
|
/**
|
1149
898
|
* Set the headers (can be used to set the auth header)
|
@@ -1160,38 +909,50 @@ _LemmyHttp_instances = new WeakSet();
|
|
1160
909
|
_LemmyHttp_buildFullUrl = function _LemmyHttp_buildFullUrl(endpoint) {
|
1161
910
|
return `${__classPrivateFieldGet(this, _LemmyHttp_apiUrl, "f")}${endpoint}`;
|
1162
911
|
};
|
1163
|
-
_LemmyHttp_upload = function _LemmyHttp_upload(
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
912
|
+
_LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
|
913
|
+
const formData = createFormData(image);
|
914
|
+
const response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, path), {
|
915
|
+
...options,
|
916
|
+
method: HttpType.Post,
|
917
|
+
body: formData,
|
918
|
+
headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
|
1168
919
|
});
|
920
|
+
return response.json();
|
1169
921
|
};
|
1170
|
-
_LemmyHttp_wrapper = function _LemmyHttp_wrapper(type_, endpoint, form, options) {
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
}
|
922
|
+
_LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
|
923
|
+
let response;
|
924
|
+
if (type_ === HttpType.Get) {
|
925
|
+
const getUrl = `${__classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint)}?${encodeGetParams(form)}`;
|
926
|
+
response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, getUrl, {
|
927
|
+
...options,
|
928
|
+
method: HttpType.Get,
|
929
|
+
headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
|
930
|
+
});
|
931
|
+
}
|
932
|
+
else {
|
933
|
+
response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint), {
|
934
|
+
...options,
|
935
|
+
method: type_,
|
936
|
+
headers: {
|
937
|
+
"Content-Type": "application/json",
|
938
|
+
...__classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
|
939
|
+
},
|
940
|
+
body: JSON.stringify(form),
|
941
|
+
});
|
942
|
+
}
|
943
|
+
let json = undefined;
|
944
|
+
try {
|
945
|
+
json = await response.json();
|
946
|
+
}
|
947
|
+
catch {
|
948
|
+
throw new Error(response.statusText);
|
949
|
+
}
|
950
|
+
if (!response.ok) {
|
951
|
+
throw new Error(json["error"] ?? response.statusText);
|
952
|
+
}
|
953
|
+
else {
|
954
|
+
return json;
|
955
|
+
}
|
1195
956
|
};
|
1196
957
|
__decorate([
|
1197
958
|
(0, runtime_1.Security)("bearerAuth"),
|
@@ -1970,6 +1731,27 @@ __decorate([
|
|
1970
1731
|
__param(0, (0, runtime_1.Queries)()),
|
1971
1732
|
__param(1, (0, runtime_1.Inject)())
|
1972
1733
|
], LemmyHttp.prototype, "listTaglines", null);
|
1734
|
+
__decorate([
|
1735
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1736
|
+
(0, runtime_1.Post)("/community/tag"),
|
1737
|
+
(0, runtime_1.Tags)("Community"),
|
1738
|
+
__param(0, (0, runtime_1.Body)()),
|
1739
|
+
__param(1, (0, runtime_1.Inject)())
|
1740
|
+
], LemmyHttp.prototype, "createCommunityTag", null);
|
1741
|
+
__decorate([
|
1742
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1743
|
+
(0, runtime_1.Put)("/community/tag"),
|
1744
|
+
(0, runtime_1.Tags)("Community"),
|
1745
|
+
__param(0, (0, runtime_1.Body)()),
|
1746
|
+
__param(1, (0, runtime_1.Inject)())
|
1747
|
+
], LemmyHttp.prototype, "updateCommunityTag", null);
|
1748
|
+
__decorate([
|
1749
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1750
|
+
(0, runtime_1.Post)("/community/tag"),
|
1751
|
+
(0, runtime_1.Tags)("Community"),
|
1752
|
+
__param(0, (0, runtime_1.Body)()),
|
1753
|
+
__param(1, (0, runtime_1.Inject)())
|
1754
|
+
], LemmyHttp.prototype, "deleteCommunityTag", null);
|
1973
1755
|
__decorate([
|
1974
1756
|
(0, runtime_1.Security)("bearerAuth"),
|
1975
1757
|
(0, runtime_1.Post)("/oauth_provider"),
|
@@ -2121,6 +1903,9 @@ __decorate([
|
|
2121
1903
|
(0, runtime_1.Tags)("Media"),
|
2122
1904
|
__param(0, (0, runtime_1.Inject)())
|
2123
1905
|
], LemmyHttp.prototype, "imageHealth", null);
|
1906
|
+
__decorate([
|
1907
|
+
__param(0, (0, runtime_1.Inject)())
|
1908
|
+
], LemmyHttp.prototype, "donation_dialog_shown", null);
|
2124
1909
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
2125
1910
|
(0, runtime_1.Route)("api/v4")
|
2126
1911
|
], LemmyHttp);
|