lemmy-js-client 1.0.0-remove-page-limit.1 → 1.0.0-rename-timestamp-to-at.2
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 +40 -13
- package/dist/http.js +93 -21
- package/dist/index.d.ts +12 -2
- package/dist/other_types.d.ts +14 -2
- package/dist/types/AdminAllowInstance.d.ts +1 -1
- package/dist/types/AdminBlockInstance.d.ts +2 -2
- package/dist/types/AdminBlockInstanceParams.d.ts +1 -1
- package/dist/types/AdminListUsers.d.ts +7 -0
- package/dist/types/AdminListUsersResponse.d.ts +10 -0
- package/dist/types/AdminPurgeComment.d.ts +1 -1
- package/dist/types/AdminPurgeCommunity.d.ts +1 -1
- package/dist/types/AdminPurgePerson.d.ts +1 -1
- package/dist/types/AdminPurgePost.d.ts +1 -1
- package/dist/types/BanFromCommunity.d.ts +1 -1
- package/dist/types/BanPerson.d.ts +1 -1
- package/dist/types/Comment.d.ts +2 -2
- package/dist/types/CommentActions.d.ts +2 -6
- package/dist/types/CommentActions.js +1 -0
- package/dist/types/CommentReply.d.ts +1 -1
- package/dist/types/CommentReport.d.ts +2 -2
- package/dist/types/Community.d.ts +2 -2
- package/dist/types/CommunityActions.d.ts +5 -13
- package/dist/types/CommunityIdQuery.d.ts +8 -0
- package/dist/types/CommunityIdQuery.js +2 -0
- package/dist/types/CommunityReport.d.ts +2 -2
- package/dist/types/CreatePost.d.ts +1 -1
- package/dist/types/CreateSite.d.ts +1 -1
- package/dist/types/CustomEmoji.d.ts +2 -2
- package/dist/types/EditPost.d.ts +1 -1
- package/dist/types/EditSite.d.ts +4 -4
- package/dist/types/FederationBlockList.d.ts +3 -3
- package/dist/types/GetComments.d.ts +0 -2
- package/dist/types/GetPosts.d.ts +0 -2
- package/dist/types/Instance.d.ts +4 -3
- package/dist/types/InstanceActions.d.ts +3 -7
- package/dist/types/InstanceActions.js +1 -0
- package/dist/types/InstanceWithFederationState.d.ts +2 -2
- package/dist/types/LemmyErrorType.d.ts +2 -2
- package/dist/types/LikeType.d.ts +4 -0
- package/dist/types/LikeType.js +3 -0
- package/dist/types/{ListBannedPersons.d.ts → ListPersonHidden.d.ts} +2 -2
- package/dist/types/ListPersonHidden.js +2 -0
- package/dist/types/{BannedPersonsResponse.d.ts → ListPersonHiddenResponse.d.ts} +4 -4
- package/dist/types/ListPersonHiddenResponse.js +2 -0
- package/dist/types/ListPersonLiked.d.ts +13 -0
- package/dist/types/ListPersonLiked.js +2 -0
- package/dist/types/ListPersonLikedResponse.d.ts +13 -0
- package/dist/types/ListPersonLikedResponse.js +2 -0
- package/dist/types/ListPersonRead.d.ts +9 -0
- package/dist/types/ListPersonRead.js +2 -0
- package/dist/types/ListPersonReadResponse.d.ts +13 -0
- package/dist/types/ListPersonReadResponse.js +2 -0
- package/dist/types/LocalImage.d.ts +8 -3
- package/dist/types/LocalImageView.d.ts +2 -0
- package/dist/types/LocalSite.d.ts +6 -6
- package/dist/types/LocalSiteRateLimit.d.ts +2 -2
- package/dist/types/LocalSiteUrlBlocklist.d.ts +2 -2
- package/dist/types/LocalUser.d.ts +3 -2
- package/dist/types/LockPost.d.ts +1 -0
- package/dist/types/Login.d.ts +3 -0
- package/dist/types/LoginToken.d.ts +1 -1
- package/dist/types/ModAdd.d.ts +1 -1
- package/dist/types/ModAddCommunity.d.ts +1 -1
- package/dist/types/ModBan.d.ts +2 -2
- package/dist/types/ModBanFromCommunity.d.ts +2 -2
- package/dist/types/ModChangeCommunityVisibility.d.ts +1 -2
- package/dist/types/ModFeaturePost.d.ts +1 -1
- package/dist/types/ModLockPost.d.ts +2 -1
- package/dist/types/ModRemoveComment.d.ts +1 -1
- package/dist/types/ModRemoveCommunity.d.ts +1 -1
- package/dist/types/ModRemovePost.d.ts +1 -1
- package/dist/types/ModTransferCommunity.d.ts +1 -1
- package/dist/types/OAuthAccount.d.ts +2 -2
- package/dist/types/OAuthProvider.d.ts +2 -2
- package/dist/types/Person.d.ts +2 -2
- package/dist/types/PersonActions.d.ts +1 -4
- package/dist/types/PersonActions.js +1 -0
- package/dist/types/PersonCommentMention.d.ts +1 -1
- package/dist/types/PersonLikedCombinedView.d.ts +7 -0
- package/dist/types/PersonLikedCombinedView.js +2 -0
- package/dist/types/PersonPostMention.d.ts +1 -1
- package/dist/types/Post.d.ts +4 -4
- package/dist/types/PostActions.d.ts +5 -9
- package/dist/types/PostActions.js +1 -0
- package/dist/types/PostReport.d.ts +2 -2
- package/dist/types/PrivateMessage.d.ts +2 -2
- package/dist/types/PrivateMessageReport.d.ts +2 -2
- package/dist/types/ReadableFederationState.d.ts +2 -2
- package/dist/types/RegistrationApplication.d.ts +1 -1
- package/dist/types/SaveUserSettings.d.ts +2 -1
- package/dist/types/Search.d.ts +4 -0
- package/dist/types/Site.d.ts +4 -3
- package/dist/types/SiteResponse.d.ts +0 -4
- package/dist/types/Tag.d.ts +2 -2
- package/dist/types/Tagline.d.ts +2 -2
- package/dist/types/VoteShow.d.ts +4 -0
- package/dist/types/VoteShow.js +3 -0
- package/dist/types/VoteView.d.ts +0 -1
- package/package.json +4 -4
- /package/dist/types/{BannedPersonsResponse.js → AdminListUsers.js} +0 -0
- /package/dist/types/{ListBannedPersons.js → AdminListUsersResponse.js} +0 -0
package/dist/http.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Controller } from "@tsoa/runtime";
|
2
|
-
import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI,
|
2
|
+
import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonHiddenI, ListPersonLikedI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
|
3
3
|
import { AddAdmin } from "./types/AddAdmin";
|
4
4
|
import { AddAdminResponse } from "./types/AddAdminResponse";
|
5
5
|
import { AddModToCommunity } from "./types/AddModToCommunity";
|
@@ -10,7 +10,6 @@ import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
|
|
10
10
|
import { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
|
11
11
|
import { BanPerson } from "./types/BanPerson";
|
12
12
|
import { BanPersonResponse } from "./types/BanPersonResponse";
|
13
|
-
import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
14
13
|
import { BlockCommunity } from "./types/BlockCommunity";
|
15
14
|
import { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
16
15
|
import { BlockPerson } from "./types/BlockPerson";
|
@@ -18,11 +17,13 @@ import { BlockPersonResponse } from "./types/BlockPersonResponse";
|
|
18
17
|
import { ChangePassword } from "./types/ChangePassword";
|
19
18
|
import { CommentReportResponse } from "./types/CommentReportResponse";
|
20
19
|
import { CommentResponse } from "./types/CommentResponse";
|
20
|
+
import { CommunityReportResponse } from "./types/CommunityReportResponse";
|
21
21
|
import { CommunityResponse } from "./types/CommunityResponse";
|
22
22
|
import { CreateComment } from "./types/CreateComment";
|
23
23
|
import { CreateCommentLike } from "./types/CreateCommentLike";
|
24
24
|
import { CreateCommentReport } from "./types/CreateCommentReport";
|
25
25
|
import { CreateCommunity } from "./types/CreateCommunity";
|
26
|
+
import { CreateCommunityReport } from "./types/CreateCommunityReport";
|
26
27
|
import { CreateCommunityTag } from "./types/CreateCommunityTag";
|
27
28
|
import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
|
28
29
|
import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
|
@@ -89,7 +90,7 @@ import { RemoveComment } from "./types/RemoveComment";
|
|
89
90
|
import { RemoveCommunity } from "./types/RemoveCommunity";
|
90
91
|
import { RemovePost } from "./types/RemovePost";
|
91
92
|
import { ResolveCommentReport } from "./types/ResolveCommentReport";
|
92
|
-
import {
|
93
|
+
import { ResolveCommunityReport } from "./types/ResolveCommunityReport";
|
93
94
|
import { ResolvePostReport } from "./types/ResolvePostReport";
|
94
95
|
import { ResolvePrivateMessageReport } from "./types/ResolvePrivateMessageReport";
|
95
96
|
import { SaveComment } from "./types/SaveComment";
|
@@ -105,7 +106,6 @@ import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
|
105
106
|
import { UpdateTotp } from "./types/UpdateTotp";
|
106
107
|
import { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
107
108
|
import { SuccessResponse } from "./types/SuccessResponse";
|
108
|
-
import { LoginToken } from "./types/LoginToken";
|
109
109
|
import { ListPostLikesResponse } from "./types/ListPostLikesResponse";
|
110
110
|
import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
|
111
111
|
import { HidePost } from "./types/HidePost";
|
@@ -134,6 +134,13 @@ import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead
|
|
134
134
|
import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
|
135
135
|
import { Tag } from "./types/Tag";
|
136
136
|
import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
|
137
|
+
import { ListPersonReadResponse } from "./types/ListPersonReadResponse";
|
138
|
+
import { ListPersonHiddenResponse } from "./types/ListPersonHiddenResponse";
|
139
|
+
import { CommunityIdQuery } from "./types/CommunityIdQuery";
|
140
|
+
import { AdminListUsersResponse } from "./types/AdminListUsersResponse";
|
141
|
+
import { ListLoginsResponse } from "./types/ListLoginsResponse";
|
142
|
+
import { ListPersonLikedResponse } from "./types/ListPersonLikedResponse";
|
143
|
+
import { ResolveObjectResponse } from "./types/ResolveObjectResponse";
|
137
144
|
type RequestOptions = Pick<RequestInit, "signal">;
|
138
145
|
/**
|
139
146
|
* Helps build lemmy HTTP requests.
|
@@ -192,7 +199,7 @@ export declare class LemmyHttp extends Controller {
|
|
192
199
|
/**
|
193
200
|
* @summary List login tokens for your user
|
194
201
|
*/
|
195
|
-
listLogins(options?: RequestOptions): Promise<
|
202
|
+
listLogins(options?: RequestOptions): Promise<ListLoginsResponse>;
|
196
203
|
/**
|
197
204
|
* @summary Returns an error message if your auth token is invalid
|
198
205
|
*/
|
@@ -226,7 +233,7 @@ export declare class LemmyHttp extends Controller {
|
|
226
233
|
*/
|
227
234
|
getModlog(form?: GetModlogI, options?: RequestOptions): Promise<GetModlogResponse>;
|
228
235
|
/**
|
229
|
-
* @summary Search lemmy.
|
236
|
+
* @summary Search lemmy. If `search_term` is a url it also attempts to fetch it, just like `resolve_object`.
|
230
237
|
*/
|
231
238
|
search(form: SearchI, options?: RequestOptions): Promise<SearchResponse>;
|
232
239
|
/**
|
@@ -297,6 +304,14 @@ export declare class LemmyHttp extends Controller {
|
|
297
304
|
* @summary Get a random community.
|
298
305
|
*/
|
299
306
|
getRandomCommunity(form: GetRandomCommunityI, options?: RequestOptions): Promise<CommunityResponse>;
|
307
|
+
/**
|
308
|
+
* @summary Create a report for a community.
|
309
|
+
*/
|
310
|
+
createCommunityReport(form: CreateCommunityReport, options?: RequestOptions): Promise<CommunityReportResponse>;
|
311
|
+
/**
|
312
|
+
* @summary Resolve a report for a private message.
|
313
|
+
*/
|
314
|
+
resolveCommunityReport(form: ResolveCommunityReport, options?: RequestOptions): Promise<CommunityReportResponse>;
|
300
315
|
/**
|
301
316
|
* @summary Create a post.
|
302
317
|
*/
|
@@ -320,7 +335,7 @@ export declare class LemmyHttp extends Controller {
|
|
320
335
|
/**
|
321
336
|
* @summary Mark a post as read.
|
322
337
|
*/
|
323
|
-
markPostAsRead(form: MarkPostAsRead, options?: RequestOptions): Promise<
|
338
|
+
markPostAsRead(form: MarkPostAsRead, options?: RequestOptions): Promise<PostResponse>;
|
324
339
|
/**
|
325
340
|
* @summary Mark multiple posts as read.
|
326
341
|
*/
|
@@ -478,9 +493,9 @@ export declare class LemmyHttp extends Controller {
|
|
478
493
|
*/
|
479
494
|
banPerson(form: BanPerson, options?: RequestOptions): Promise<BanPersonResponse>;
|
480
495
|
/**
|
481
|
-
* @summary Get a list of
|
496
|
+
* @summary Get a list of users.
|
482
497
|
*/
|
483
|
-
|
498
|
+
listUsers(form?: AdminListUsersI, options?: RequestOptions): Promise<AdminListUsersResponse>;
|
484
499
|
/**
|
485
500
|
* @summary Block a person.
|
486
501
|
*/
|
@@ -537,6 +552,18 @@ export declare class LemmyHttp extends Controller {
|
|
537
552
|
* @summary List your saved content.
|
538
553
|
*/
|
539
554
|
listPersonSaved(form: ListPersonSavedI, options?: RequestOptions): Promise<ListPersonSavedResponse>;
|
555
|
+
/**
|
556
|
+
* @summary List your read content.
|
557
|
+
*/
|
558
|
+
listPersonRead(form: ListPersonReadI, options?: RequestOptions): Promise<ListPersonReadResponse>;
|
559
|
+
/**
|
560
|
+
* @summary List your hidden content.
|
561
|
+
*/
|
562
|
+
listPersonHidden(form: ListPersonHiddenI, options?: RequestOptions): Promise<ListPersonHiddenResponse>;
|
563
|
+
/**
|
564
|
+
* @summary List your liked content.
|
565
|
+
*/
|
566
|
+
listPersonLiked(form: ListPersonLikedI, options?: RequestOptions): Promise<ListPersonLikedResponse>;
|
540
567
|
/**
|
541
568
|
* @summary Add an admin to your site.
|
542
569
|
*/
|
@@ -672,19 +699,19 @@ export declare class LemmyHttp extends Controller {
|
|
672
699
|
/**
|
673
700
|
* @summary Upload new community icon.
|
674
701
|
*/
|
675
|
-
uploadCommunityIcon(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
|
702
|
+
uploadCommunityIcon(query: CommunityIdQueryI, image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
|
676
703
|
/**
|
677
704
|
* @summary Delete the community icon.
|
678
705
|
*/
|
679
|
-
deleteCommunityIcon(options?: RequestOptions): Promise<SuccessResponse>;
|
706
|
+
deleteCommunityIcon(form: CommunityIdQuery, options?: RequestOptions): Promise<SuccessResponse>;
|
680
707
|
/**
|
681
708
|
* @summary Upload new community banner.
|
682
709
|
*/
|
683
|
-
uploadCommunityBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
|
710
|
+
uploadCommunityBanner(query: CommunityIdQueryI, image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
|
684
711
|
/**
|
685
712
|
* @summary Delete the community banner.
|
686
713
|
*/
|
687
|
-
deleteCommunityBanner(options?: RequestOptions): Promise<SuccessResponse>;
|
714
|
+
deleteCommunityBanner(form: CommunityIdQuery, options?: RequestOptions): Promise<SuccessResponse>;
|
688
715
|
/**
|
689
716
|
* @summary Upload new site icon.
|
690
717
|
*/
|
package/dist/http.js
CHANGED
@@ -19,7 +19,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
19
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");
|
20
20
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
21
21
|
};
|
22
|
-
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;
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
24
24
|
exports.LemmyHttp = void 0;
|
25
25
|
const runtime_1 = require("@tsoa/runtime");
|
@@ -161,7 +161,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
161
161
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/modlog", form, options);
|
162
162
|
}
|
163
163
|
/**
|
164
|
-
* @summary Search lemmy.
|
164
|
+
* @summary Search lemmy. If `search_term` is a url it also attempts to fetch it, just like `resolve_object`.
|
165
165
|
*/
|
166
166
|
async search(form, options) {
|
167
167
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/search", form, options);
|
@@ -268,6 +268,18 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
268
268
|
async getRandomCommunity(form, options) {
|
269
269
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form, options);
|
270
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);
|
282
|
+
}
|
271
283
|
/**
|
272
284
|
* @summary Create a post.
|
273
285
|
*/
|
@@ -539,10 +551,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
539
551
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
|
540
552
|
}
|
541
553
|
/**
|
542
|
-
* @summary Get a list of
|
554
|
+
* @summary Get a list of users.
|
543
555
|
*/
|
544
|
-
async
|
545
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/
|
556
|
+
async listUsers(form = {}, options) {
|
557
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/users", form, options);
|
546
558
|
}
|
547
559
|
/**
|
548
560
|
* @summary Block a person.
|
@@ -628,6 +640,24 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
628
640
|
async listPersonSaved(form, options) {
|
629
641
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
|
630
642
|
}
|
643
|
+
/**
|
644
|
+
* @summary List your read content.
|
645
|
+
*/
|
646
|
+
async listPersonRead(form, options) {
|
647
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/read", form, options);
|
648
|
+
}
|
649
|
+
/**
|
650
|
+
* @summary List your hidden content.
|
651
|
+
*/
|
652
|
+
async listPersonHidden(form, options) {
|
653
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/hidden", form, options);
|
654
|
+
}
|
655
|
+
/**
|
656
|
+
* @summary List your liked content.
|
657
|
+
*/
|
658
|
+
async listPersonLiked(form, options) {
|
659
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/liked", form, options);
|
660
|
+
}
|
631
661
|
/**
|
632
662
|
* @summary Add an admin to your site.
|
633
663
|
*/
|
@@ -829,26 +859,26 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
829
859
|
/**
|
830
860
|
* @summary Upload new community icon.
|
831
861
|
*/
|
832
|
-
async uploadCommunityIcon(image, options) {
|
833
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m",
|
862
|
+
async uploadCommunityIcon(query, image, options) {
|
863
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/icon", query, image, options);
|
834
864
|
}
|
835
865
|
/**
|
836
866
|
* @summary Delete the community icon.
|
837
867
|
*/
|
838
|
-
async deleteCommunityIcon(options) {
|
839
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon",
|
868
|
+
async deleteCommunityIcon(form, options) {
|
869
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", form, options);
|
840
870
|
}
|
841
871
|
/**
|
842
872
|
* @summary Upload new community banner.
|
843
873
|
*/
|
844
|
-
async uploadCommunityBanner(image, options) {
|
845
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m",
|
874
|
+
async uploadCommunityBanner(query, image, options) {
|
875
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/banner", query, image, options);
|
846
876
|
}
|
847
877
|
/**
|
848
878
|
* @summary Delete the community banner.
|
849
879
|
*/
|
850
|
-
async deleteCommunityBanner(options) {
|
851
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner",
|
880
|
+
async deleteCommunityBanner(form, options) {
|
881
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", form, options);
|
852
882
|
}
|
853
883
|
/**
|
854
884
|
* @summary Upload new site icon.
|
@@ -919,6 +949,9 @@ _LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
|
|
919
949
|
});
|
920
950
|
return response.json();
|
921
951
|
};
|
952
|
+
_LemmyHttp_uploadWithQuery = async function _LemmyHttp_uploadWithQuery(path, query, { image }, options) {
|
953
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, `${path}?${encodeGetParams(query)}`, { image }, options);
|
954
|
+
};
|
922
955
|
_LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
|
923
956
|
let response;
|
924
957
|
if (type_ === HttpType.Get) {
|
@@ -1193,6 +1226,20 @@ __decorate([
|
|
1193
1226
|
__param(0, (0, runtime_1.Queries)()),
|
1194
1227
|
__param(1, (0, runtime_1.Inject)())
|
1195
1228
|
], LemmyHttp.prototype, "getRandomCommunity", null);
|
1229
|
+
__decorate([
|
1230
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1231
|
+
(0, runtime_1.Post)("/community/report"),
|
1232
|
+
(0, runtime_1.Tags)("Community"),
|
1233
|
+
__param(0, (0, runtime_1.Body)()),
|
1234
|
+
__param(1, (0, runtime_1.Inject)())
|
1235
|
+
], LemmyHttp.prototype, "createCommunityReport", null);
|
1236
|
+
__decorate([
|
1237
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1238
|
+
(0, runtime_1.Put)("/community/report/resolve"),
|
1239
|
+
(0, runtime_1.Tags)("Community", "Admin"),
|
1240
|
+
__param(0, (0, runtime_1.Body)()),
|
1241
|
+
__param(1, (0, runtime_1.Inject)())
|
1242
|
+
], LemmyHttp.prototype, "resolveCommunityReport", null);
|
1196
1243
|
__decorate([
|
1197
1244
|
(0, runtime_1.Security)("bearerAuth"),
|
1198
1245
|
(0, runtime_1.Post)("/post"),
|
@@ -1514,11 +1561,11 @@ __decorate([
|
|
1514
1561
|
], LemmyHttp.prototype, "banPerson", null);
|
1515
1562
|
__decorate([
|
1516
1563
|
(0, runtime_1.Security)("bearerAuth"),
|
1517
|
-
(0, runtime_1.Get)("/admin/
|
1564
|
+
(0, runtime_1.Get)("/admin/users"),
|
1518
1565
|
(0, runtime_1.Tags)("Admin", "Miscellaneous"),
|
1519
1566
|
__param(0, (0, runtime_1.Queries)()),
|
1520
1567
|
__param(1, (0, runtime_1.Inject)())
|
1521
|
-
], LemmyHttp.prototype, "
|
1568
|
+
], LemmyHttp.prototype, "listUsers", null);
|
1522
1569
|
__decorate([
|
1523
1570
|
(0, runtime_1.Security)("bearerAuth"),
|
1524
1571
|
(0, runtime_1.Post)("/account/block/person"),
|
@@ -1611,6 +1658,27 @@ __decorate([
|
|
1611
1658
|
__param(0, (0, runtime_1.Queries)()),
|
1612
1659
|
__param(1, (0, runtime_1.Inject)())
|
1613
1660
|
], LemmyHttp.prototype, "listPersonSaved", null);
|
1661
|
+
__decorate([
|
1662
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1663
|
+
(0, runtime_1.Get)("/account/read"),
|
1664
|
+
(0, runtime_1.Tags)("Account"),
|
1665
|
+
__param(0, (0, runtime_1.Queries)()),
|
1666
|
+
__param(1, (0, runtime_1.Inject)())
|
1667
|
+
], LemmyHttp.prototype, "listPersonRead", null);
|
1668
|
+
__decorate([
|
1669
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1670
|
+
(0, runtime_1.Get)("/account/hidden"),
|
1671
|
+
(0, runtime_1.Tags)("Account"),
|
1672
|
+
__param(0, (0, runtime_1.Queries)()),
|
1673
|
+
__param(1, (0, runtime_1.Inject)())
|
1674
|
+
], LemmyHttp.prototype, "listPersonHidden", null);
|
1675
|
+
__decorate([
|
1676
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1677
|
+
(0, runtime_1.Get)("/account/liked"),
|
1678
|
+
(0, runtime_1.Tags)("Account"),
|
1679
|
+
__param(0, (0, runtime_1.Queries)()),
|
1680
|
+
__param(1, (0, runtime_1.Inject)())
|
1681
|
+
], LemmyHttp.prototype, "listPersonLiked", null);
|
1614
1682
|
__decorate([
|
1615
1683
|
(0, runtime_1.Security)("bearerAuth"),
|
1616
1684
|
(0, runtime_1.Post)("/admin/add"),
|
@@ -1843,27 +1911,31 @@ __decorate([
|
|
1843
1911
|
(0, runtime_1.Security)("bearerAuth"),
|
1844
1912
|
(0, runtime_1.Post)("/community/icon"),
|
1845
1913
|
(0, runtime_1.Tags)("Community", "Media"),
|
1846
|
-
__param(0, (0, runtime_1.
|
1847
|
-
__param(1, (0, runtime_1.
|
1914
|
+
__param(0, (0, runtime_1.Queries)()),
|
1915
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1916
|
+
__param(2, (0, runtime_1.Inject)())
|
1848
1917
|
], LemmyHttp.prototype, "uploadCommunityIcon", null);
|
1849
1918
|
__decorate([
|
1850
1919
|
(0, runtime_1.Security)("bearerAuth"),
|
1851
1920
|
(0, runtime_1.Delete)("/community/icon"),
|
1852
1921
|
(0, runtime_1.Tags)("Community", "Media"),
|
1853
|
-
__param(0, (0, runtime_1.
|
1922
|
+
__param(0, (0, runtime_1.Body)()),
|
1923
|
+
__param(1, (0, runtime_1.Inject)())
|
1854
1924
|
], LemmyHttp.prototype, "deleteCommunityIcon", null);
|
1855
1925
|
__decorate([
|
1856
1926
|
(0, runtime_1.Security)("bearerAuth"),
|
1857
1927
|
(0, runtime_1.Post)("/community/banner"),
|
1858
1928
|
(0, runtime_1.Tags)("Community", "Media"),
|
1859
|
-
__param(0, (0, runtime_1.
|
1860
|
-
__param(1, (0, runtime_1.
|
1929
|
+
__param(0, (0, runtime_1.Queries)()),
|
1930
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1931
|
+
__param(2, (0, runtime_1.Inject)())
|
1861
1932
|
], LemmyHttp.prototype, "uploadCommunityBanner", null);
|
1862
1933
|
__decorate([
|
1863
1934
|
(0, runtime_1.Security)("bearerAuth"),
|
1864
1935
|
(0, runtime_1.Delete)("/community/banner"),
|
1865
1936
|
(0, runtime_1.Tags)("Community", "Media"),
|
1866
|
-
__param(0, (0, runtime_1.
|
1937
|
+
__param(0, (0, runtime_1.Body)()),
|
1938
|
+
__param(1, (0, runtime_1.Inject)())
|
1867
1939
|
], LemmyHttp.prototype, "deleteCommunityBanner", null);
|
1868
1940
|
__decorate([
|
1869
1941
|
(0, runtime_1.Security)("bearerAuth"),
|
package/dist/index.d.ts
CHANGED
@@ -13,6 +13,8 @@ export { AdminBlockInstance } from "./types/AdminBlockInstance";
|
|
13
13
|
export { AdminBlockInstanceId } from "./types/AdminBlockInstanceId";
|
14
14
|
export { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
15
15
|
export { AdminBlockInstanceView } from "./types/AdminBlockInstanceView";
|
16
|
+
export { AdminListUsers } from "./types/AdminListUsers";
|
17
|
+
export { AdminListUsersResponse } from "./types/AdminListUsersResponse";
|
16
18
|
export { AdminPurgeComment } from "./types/AdminPurgeComment";
|
17
19
|
export { AdminPurgeCommentId } from "./types/AdminPurgeCommentId";
|
18
20
|
export { AdminPurgeCommentView } from "./types/AdminPurgeCommentView";
|
@@ -32,7 +34,6 @@ export { BanFromCommunity } from "./types/BanFromCommunity";
|
|
32
34
|
export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
|
33
35
|
export { BanPerson } from "./types/BanPerson";
|
34
36
|
export { BanPersonResponse } from "./types/BanPersonResponse";
|
35
|
-
export { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
36
37
|
export { BlockCommunity } from "./types/BlockCommunity";
|
37
38
|
export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
38
39
|
export { BlockPerson } from "./types/BlockPerson";
|
@@ -58,6 +59,7 @@ export { CommunityActions } from "./types/CommunityActions";
|
|
58
59
|
export { CommunityFollowerState } from "./types/CommunityFollowerState";
|
59
60
|
export { CommunityFollowerView } from "./types/CommunityFollowerView";
|
60
61
|
export { CommunityId } from "./types/CommunityId";
|
62
|
+
export { CommunityIdQuery } from "./types/CommunityIdQuery";
|
61
63
|
export { CommunityModeratorView } from "./types/CommunityModeratorView";
|
62
64
|
export { CommunityReport } from "./types/CommunityReport";
|
63
65
|
export { CommunityReportId } from "./types/CommunityReportId";
|
@@ -154,8 +156,8 @@ export { InstanceWithFederationState } from "./types/InstanceWithFederationState
|
|
154
156
|
export { Language } from "./types/Language";
|
155
157
|
export { LanguageId } from "./types/LanguageId";
|
156
158
|
export { LemmyErrorType } from "./types/LemmyErrorType";
|
159
|
+
export { LikeType } from "./types/LikeType";
|
157
160
|
export { LinkMetadata } from "./types/LinkMetadata";
|
158
|
-
export { ListBannedPersons } from "./types/ListBannedPersons";
|
159
161
|
export { ListCommentLikes } from "./types/ListCommentLikes";
|
160
162
|
export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
|
161
163
|
export { ListCommunities } from "./types/ListCommunities";
|
@@ -171,6 +173,12 @@ export { ListMedia } from "./types/ListMedia";
|
|
171
173
|
export { ListMediaResponse } from "./types/ListMediaResponse";
|
172
174
|
export { ListPersonContent } from "./types/ListPersonContent";
|
173
175
|
export { ListPersonContentResponse } from "./types/ListPersonContentResponse";
|
176
|
+
export { ListPersonHidden } from "./types/ListPersonHidden";
|
177
|
+
export { ListPersonHiddenResponse } from "./types/ListPersonHiddenResponse";
|
178
|
+
export { ListPersonLiked } from "./types/ListPersonLiked";
|
179
|
+
export { ListPersonLikedResponse } from "./types/ListPersonLikedResponse";
|
180
|
+
export { ListPersonRead } from "./types/ListPersonRead";
|
181
|
+
export { ListPersonReadResponse } from "./types/ListPersonReadResponse";
|
174
182
|
export { ListPersonSaved } from "./types/ListPersonSaved";
|
175
183
|
export { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
|
176
184
|
export { ListPostLikes } from "./types/ListPostLikes";
|
@@ -253,6 +261,7 @@ export { PersonCommentMentionView } from "./types/PersonCommentMentionView";
|
|
253
261
|
export { PersonContentCombinedView } from "./types/PersonContentCombinedView";
|
254
262
|
export { PersonContentType } from "./types/PersonContentType";
|
255
263
|
export { PersonId } from "./types/PersonId";
|
264
|
+
export { PersonLikedCombinedView } from "./types/PersonLikedCombinedView";
|
256
265
|
export { PersonPostMention } from "./types/PersonPostMention";
|
257
266
|
export { PersonPostMentionId } from "./types/PersonPostMentionId";
|
258
267
|
export { PersonPostMentionView } from "./types/PersonPostMentionView";
|
@@ -331,4 +340,5 @@ export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
|
331
340
|
export { UploadImageResponse } from "./types/UploadImageResponse";
|
332
341
|
export { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
333
342
|
export { VerifyEmail } from "./types/VerifyEmail";
|
343
|
+
export { VoteShow } from "./types/VoteShow";
|
334
344
|
export { VoteView } from "./types/VoteView";
|
package/dist/other_types.d.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import { AdminListUsers } from "./types/AdminListUsers";
|
2
|
+
import { CommunityIdQuery } from "./types/CommunityIdQuery";
|
1
3
|
import { DeleteImageParams } from "./types/DeleteImageParams";
|
2
4
|
import { GetComment } from "./types/GetComment";
|
3
5
|
import { GetComments } from "./types/GetComments";
|
@@ -11,7 +13,6 @@ import { GetRandomCommunity } from "./types/GetRandomCommunity";
|
|
11
13
|
import { GetRegistrationApplication } from "./types/GetRegistrationApplication";
|
12
14
|
import { GetReportCount } from "./types/GetReportCount";
|
13
15
|
import { GetSiteMetadata } from "./types/GetSiteMetadata";
|
14
|
-
import { ListBannedPersons } from "./types/ListBannedPersons";
|
15
16
|
import { ListCommentLikes } from "./types/ListCommentLikes";
|
16
17
|
import { ListCommunities } from "./types/ListCommunities";
|
17
18
|
import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
|
@@ -19,6 +20,9 @@ import { ListCustomEmojis } from "./types/ListCustomEmojis";
|
|
19
20
|
import { ListInbox } from "./types/ListInbox";
|
20
21
|
import { ListMedia } from "./types/ListMedia";
|
21
22
|
import { ListPersonContent } from "./types/ListPersonContent";
|
23
|
+
import { ListPersonHidden } from "./types/ListPersonHidden";
|
24
|
+
import { ListPersonLiked } from "./types/ListPersonLiked";
|
25
|
+
import { ListPersonRead } from "./types/ListPersonRead";
|
22
26
|
import { ListPersonSaved } from "./types/ListPersonSaved";
|
23
27
|
import { ListPostLikes } from "./types/ListPostLikes";
|
24
28
|
import { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
@@ -72,6 +76,12 @@ export interface ListInboxI extends ListInbox {
|
|
72
76
|
}
|
73
77
|
export interface ListPersonSavedI extends ListPersonSaved {
|
74
78
|
}
|
79
|
+
export interface ListPersonReadI extends ListPersonRead {
|
80
|
+
}
|
81
|
+
export interface ListPersonHiddenI extends ListPersonHidden {
|
82
|
+
}
|
83
|
+
export interface ListPersonLikedI extends ListPersonLiked {
|
84
|
+
}
|
75
85
|
export interface ListRegistrationApplicationsI extends ListRegistrationApplications {
|
76
86
|
}
|
77
87
|
export interface GetRegistrationApplicationI extends GetRegistrationApplication {
|
@@ -84,5 +94,7 @@ export interface ListReportsI extends ListReports {
|
|
84
94
|
}
|
85
95
|
export interface DeleteImageParamsI extends DeleteImageParams {
|
86
96
|
}
|
87
|
-
export interface
|
97
|
+
export interface AdminListUsersI extends AdminListUsers {
|
98
|
+
}
|
99
|
+
export interface CommunityIdQueryI extends CommunityIdQuery {
|
88
100
|
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import type { LocalUserView } from "./LocalUserView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
3
|
+
export type AdminListUsersResponse = {
|
4
|
+
users: Array<LocalUserView>;
|
5
|
+
/**
|
6
|
+
* the pagination cursor to use to fetch the next page
|
7
|
+
*/
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
10
|
+
};
|
package/dist/types/Comment.d.ts
CHANGED
@@ -15,8 +15,8 @@ export type Comment = {
|
|
15
15
|
* Whether the comment has been removed.
|
16
16
|
*/
|
17
17
|
removed: boolean;
|
18
|
-
|
19
|
-
|
18
|
+
published_at: string;
|
19
|
+
updated_at?: string;
|
20
20
|
/**
|
21
21
|
* Whether the comment has been deleted by its creator.
|
22
22
|
*/
|
@@ -1,8 +1,4 @@
|
|
1
|
-
import type { CommentId } from "./CommentId";
|
2
|
-
import type { PersonId } from "./PersonId";
|
3
1
|
export type CommentActions = {
|
4
|
-
person_id: PersonId;
|
5
|
-
comment_id: CommentId;
|
6
2
|
/**
|
7
3
|
* The like / score for the comment.
|
8
4
|
*/
|
@@ -10,9 +6,9 @@ export type CommentActions = {
|
|
10
6
|
/**
|
11
7
|
* When the comment was liked.
|
12
8
|
*/
|
13
|
-
|
9
|
+
liked_at?: string;
|
14
10
|
/**
|
15
11
|
* When the comment was saved.
|
16
12
|
*/
|
17
|
-
|
13
|
+
saved_at?: string;
|
18
14
|
};
|
@@ -20,8 +20,8 @@ export type Community = {
|
|
20
20
|
* Whether the community is removed by a mod.
|
21
21
|
*/
|
22
22
|
removed: boolean;
|
23
|
-
|
24
|
-
|
23
|
+
published_at: string;
|
24
|
+
updated_at?: string;
|
25
25
|
/**
|
26
26
|
* Whether the community has been deleted by its creator.
|
27
27
|
*/
|