lemmy-js-client 1.0.0-media-fixes.1 → 1.0.0-multi-community.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http.d.ts +17 -5
- package/dist/http.js +49 -16
- package/dist/index.d.ts +7 -1
- package/dist/other_types.d.ts +3 -0
- package/dist/types/BannedPersonsResponse.d.ts +1 -0
- package/dist/types/CommunityIdQuery.d.ts +8 -0
- package/dist/types/CommunityIdQuery.js +2 -0
- package/dist/types/CreateMultiCommunity.d.ts +3 -0
- package/dist/types/CreateSite.d.ts +1 -0
- package/dist/types/EditSite.d.ts +4 -0
- package/dist/types/GetComments.d.ts +3 -1
- package/dist/types/GetCommentsResponse.d.ts +3 -0
- package/dist/types/GetCommentsSlimResponse.d.ts +3 -0
- package/dist/types/GetModlog.d.ts +1 -0
- package/dist/types/GetModlogResponse.d.ts +1 -0
- package/dist/types/GetPosts.d.ts +3 -9
- package/dist/types/GetPostsResponse.d.ts +3 -2
- package/dist/types/LemmyErrorType.d.ts +84 -20
- package/dist/types/ListCommentLikes.d.ts +3 -1
- package/dist/types/ListCommentLikesResponse.d.ts +6 -0
- package/dist/types/ListCommunities.d.ts +3 -1
- package/dist/types/ListCommunitiesResponse.d.ts +6 -0
- package/dist/types/ListCommunityPendingFollows.d.ts +3 -1
- package/dist/types/ListCommunityPendingFollows.js +0 -1
- package/dist/types/ListCommunityPendingFollowsResponse.d.ts +6 -0
- package/dist/types/ListCustomEmojis.d.ts +0 -3
- package/dist/types/ListInbox.d.ts +1 -0
- package/dist/types/ListInboxResponse.d.ts +1 -0
- package/dist/types/ListMedia.d.ts +3 -1
- package/dist/types/ListMedia.js +0 -1
- package/dist/types/ListMediaResponse.d.ts +6 -0
- package/dist/types/ListMultiCommunities.d.ts +4 -0
- package/dist/types/ListMultiCommunities.js +2 -0
- package/dist/types/ListMultiCommunitiesResponse.d.ts +4 -0
- package/dist/types/ListMultiCommunitiesResponse.js +2 -0
- package/dist/types/ListPersonContent.d.ts +1 -0
- package/dist/types/ListPersonContentResponse.d.ts +1 -0
- package/dist/types/ListPersonSaved.d.ts +1 -0
- package/dist/types/ListPersonSavedResponse.d.ts +1 -0
- package/dist/types/ListPostLikes.d.ts +3 -1
- package/dist/types/ListPostLikesResponse.d.ts +6 -0
- package/dist/types/ListRegistrationApplications.d.ts +3 -1
- package/dist/types/ListRegistrationApplications.js +0 -1
- package/dist/types/ListRegistrationApplicationsResponse.d.ts +6 -0
- package/dist/types/ListReports.d.ts +1 -0
- package/dist/types/ListReportsResponse.d.ts +1 -0
- package/dist/types/ListTaglines.d.ts +3 -1
- package/dist/types/ListTaglines.js +0 -1
- package/dist/types/ListTaglinesResponse.d.ts +6 -0
- package/dist/types/LocalSite.d.ts +4 -0
- package/dist/types/MultiCommunity.d.ts +9 -0
- package/dist/types/MultiCommunity.js +2 -0
- package/dist/types/MultiCommunityId.d.ts +1 -0
- package/dist/types/MultiCommunityId.js +3 -0
- package/dist/types/MultiCommunityView.d.ts +6 -0
- package/dist/types/MultiCommunityView.js +2 -0
- package/dist/types/MultiCommunityViewApub.d.ts +6 -0
- package/dist/types/MultiCommunityViewApub.js +2 -0
- package/dist/types/MyUserInfo.d.ts +1 -0
- package/dist/types/SaveUserSettings.d.ts +1 -0
- package/dist/types/Search.d.ts +1 -0
- package/dist/types/SearchResponse.d.ts +1 -0
- package/dist/types/Tagline.d.ts +2 -1
- package/dist/types/Tagline.js +0 -1
- package/dist/types/UpdateMultiCommunity.d.ts +6 -0
- package/dist/types/UpdateMultiCommunity.js +2 -0
- package/dist/types/VoteView.d.ts +1 -0
- package/package.json +3 -3
- package/dist/types/PostPaginationCursor.d.ts +0 -7
- /package/dist/types/{PostPaginationCursor.js → CreateMultiCommunity.js} +0 -0
package/dist/http.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, ListBannedPersonsI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
|
2
|
+
import { CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListBannedPersonsI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
|
3
3
|
import { AddAdmin } from "./types/AddAdmin";
|
4
4
|
import { AddAdminResponse } from "./types/AddAdminResponse";
|
5
5
|
import { AddModToCommunity } from "./types/AddModToCommunity";
|
@@ -18,11 +18,13 @@ import { BlockPersonResponse } from "./types/BlockPersonResponse";
|
|
18
18
|
import { ChangePassword } from "./types/ChangePassword";
|
19
19
|
import { CommentReportResponse } from "./types/CommentReportResponse";
|
20
20
|
import { CommentResponse } from "./types/CommentResponse";
|
21
|
+
import { CommunityReportResponse } from "./types/CommunityReportResponse";
|
21
22
|
import { CommunityResponse } from "./types/CommunityResponse";
|
22
23
|
import { CreateComment } from "./types/CreateComment";
|
23
24
|
import { CreateCommentLike } from "./types/CreateCommentLike";
|
24
25
|
import { CreateCommentReport } from "./types/CreateCommentReport";
|
25
26
|
import { CreateCommunity } from "./types/CreateCommunity";
|
27
|
+
import { CreateCommunityReport } from "./types/CreateCommunityReport";
|
26
28
|
import { CreateCommunityTag } from "./types/CreateCommunityTag";
|
27
29
|
import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
|
28
30
|
import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
|
@@ -89,6 +91,7 @@ import { RemoveComment } from "./types/RemoveComment";
|
|
89
91
|
import { RemoveCommunity } from "./types/RemoveCommunity";
|
90
92
|
import { RemovePost } from "./types/RemovePost";
|
91
93
|
import { ResolveCommentReport } from "./types/ResolveCommentReport";
|
94
|
+
import { ResolveCommunityReport } from "./types/ResolveCommunityReport";
|
92
95
|
import { ResolveObjectResponse } from "./types/ResolveObjectResponse";
|
93
96
|
import { ResolvePostReport } from "./types/ResolvePostReport";
|
94
97
|
import { ResolvePrivateMessageReport } from "./types/ResolvePrivateMessageReport";
|
@@ -134,6 +137,7 @@ import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead
|
|
134
137
|
import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
|
135
138
|
import { Tag } from "./types/Tag";
|
136
139
|
import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
|
140
|
+
import { CommunityIdQuery } from "./types/CommunityIdQuery";
|
137
141
|
type RequestOptions = Pick<RequestInit, "signal">;
|
138
142
|
/**
|
139
143
|
* Helps build lemmy HTTP requests.
|
@@ -297,6 +301,14 @@ export declare class LemmyHttp extends Controller {
|
|
297
301
|
* @summary Get a random community.
|
298
302
|
*/
|
299
303
|
getRandomCommunity(form: GetRandomCommunityI, options?: RequestOptions): Promise<CommunityResponse>;
|
304
|
+
/**
|
305
|
+
* @summary Create a report for a community.
|
306
|
+
*/
|
307
|
+
createCommunityReport(form: CreateCommunityReport, options?: RequestOptions): Promise<CommunityReportResponse>;
|
308
|
+
/**
|
309
|
+
* @summary Resolve a report for a private message.
|
310
|
+
*/
|
311
|
+
resolveCommunityReport(form: ResolveCommunityReport, options?: RequestOptions): Promise<CommunityReportResponse>;
|
300
312
|
/**
|
301
313
|
* @summary Create a post.
|
302
314
|
*/
|
@@ -672,19 +684,19 @@ export declare class LemmyHttp extends Controller {
|
|
672
684
|
/**
|
673
685
|
* @summary Upload new community icon.
|
674
686
|
*/
|
675
|
-
uploadCommunityIcon(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
|
687
|
+
uploadCommunityIcon(query: CommunityIdQueryI, image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
|
676
688
|
/**
|
677
689
|
* @summary Delete the community icon.
|
678
690
|
*/
|
679
|
-
deleteCommunityIcon(options?: RequestOptions): Promise<SuccessResponse>;
|
691
|
+
deleteCommunityIcon(form: CommunityIdQuery, options?: RequestOptions): Promise<SuccessResponse>;
|
680
692
|
/**
|
681
693
|
* @summary Upload new community banner.
|
682
694
|
*/
|
683
|
-
uploadCommunityBanner(image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
|
695
|
+
uploadCommunityBanner(query: CommunityIdQueryI, image: UploadImage, options?: RequestOptions): Promise<UploadImageResponse>;
|
684
696
|
/**
|
685
697
|
* @summary Delete the community banner.
|
686
698
|
*/
|
687
|
-
deleteCommunityBanner(options?: RequestOptions): Promise<SuccessResponse>;
|
699
|
+
deleteCommunityBanner(form: CommunityIdQuery, options?: RequestOptions): Promise<SuccessResponse>;
|
688
700
|
/**
|
689
701
|
* @summary Upload new site icon.
|
690
702
|
*/
|
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");
|
@@ -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
|
*/
|
@@ -829,26 +841,26 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
829
841
|
/**
|
830
842
|
* @summary Upload new community icon.
|
831
843
|
*/
|
832
|
-
async uploadCommunityIcon(image, options) {
|
833
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m",
|
844
|
+
async uploadCommunityIcon(query, image, options) {
|
845
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/icon", query, image, options);
|
834
846
|
}
|
835
847
|
/**
|
836
848
|
* @summary Delete the community icon.
|
837
849
|
*/
|
838
|
-
async deleteCommunityIcon(options) {
|
839
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon",
|
850
|
+
async deleteCommunityIcon(form, options) {
|
851
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", form, options);
|
840
852
|
}
|
841
853
|
/**
|
842
854
|
* @summary Upload new community banner.
|
843
855
|
*/
|
844
|
-
async uploadCommunityBanner(image, options) {
|
845
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m",
|
856
|
+
async uploadCommunityBanner(query, image, options) {
|
857
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_uploadWithQuery).call(this, "/community/banner", query, image, options);
|
846
858
|
}
|
847
859
|
/**
|
848
860
|
* @summary Delete the community banner.
|
849
861
|
*/
|
850
|
-
async deleteCommunityBanner(options) {
|
851
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner",
|
862
|
+
async deleteCommunityBanner(form, options) {
|
863
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", form, options);
|
852
864
|
}
|
853
865
|
/**
|
854
866
|
* @summary Upload new site icon.
|
@@ -919,6 +931,9 @@ _LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
|
|
919
931
|
});
|
920
932
|
return response.json();
|
921
933
|
};
|
934
|
+
_LemmyHttp_uploadWithQuery = async function _LemmyHttp_uploadWithQuery(path, query, { image }, options) {
|
935
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, `${path}?${encodeGetParams(query)}`, { image }, options);
|
936
|
+
};
|
922
937
|
_LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
|
923
938
|
let response;
|
924
939
|
if (type_ === HttpType.Get) {
|
@@ -1193,6 +1208,20 @@ __decorate([
|
|
1193
1208
|
__param(0, (0, runtime_1.Queries)()),
|
1194
1209
|
__param(1, (0, runtime_1.Inject)())
|
1195
1210
|
], LemmyHttp.prototype, "getRandomCommunity", null);
|
1211
|
+
__decorate([
|
1212
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1213
|
+
(0, runtime_1.Post)("/community/report"),
|
1214
|
+
(0, runtime_1.Tags)("Community"),
|
1215
|
+
__param(0, (0, runtime_1.Body)()),
|
1216
|
+
__param(1, (0, runtime_1.Inject)())
|
1217
|
+
], LemmyHttp.prototype, "createCommunityReport", null);
|
1218
|
+
__decorate([
|
1219
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1220
|
+
(0, runtime_1.Put)("/community/report/resolve"),
|
1221
|
+
(0, runtime_1.Tags)("Community", "Admin"),
|
1222
|
+
__param(0, (0, runtime_1.Body)()),
|
1223
|
+
__param(1, (0, runtime_1.Inject)())
|
1224
|
+
], LemmyHttp.prototype, "resolveCommunityReport", null);
|
1196
1225
|
__decorate([
|
1197
1226
|
(0, runtime_1.Security)("bearerAuth"),
|
1198
1227
|
(0, runtime_1.Post)("/post"),
|
@@ -1747,7 +1776,7 @@ __decorate([
|
|
1747
1776
|
], LemmyHttp.prototype, "updateCommunityTag", null);
|
1748
1777
|
__decorate([
|
1749
1778
|
(0, runtime_1.Security)("bearerAuth"),
|
1750
|
-
(0, runtime_1.
|
1779
|
+
(0, runtime_1.Delete)("/community/tag"),
|
1751
1780
|
(0, runtime_1.Tags)("Community"),
|
1752
1781
|
__param(0, (0, runtime_1.Body)()),
|
1753
1782
|
__param(1, (0, runtime_1.Inject)())
|
@@ -1843,27 +1872,31 @@ __decorate([
|
|
1843
1872
|
(0, runtime_1.Security)("bearerAuth"),
|
1844
1873
|
(0, runtime_1.Post)("/community/icon"),
|
1845
1874
|
(0, runtime_1.Tags)("Community", "Media"),
|
1846
|
-
__param(0, (0, runtime_1.
|
1847
|
-
__param(1, (0, runtime_1.
|
1875
|
+
__param(0, (0, runtime_1.Queries)()),
|
1876
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1877
|
+
__param(2, (0, runtime_1.Inject)())
|
1848
1878
|
], LemmyHttp.prototype, "uploadCommunityIcon", null);
|
1849
1879
|
__decorate([
|
1850
1880
|
(0, runtime_1.Security)("bearerAuth"),
|
1851
1881
|
(0, runtime_1.Delete)("/community/icon"),
|
1852
1882
|
(0, runtime_1.Tags)("Community", "Media"),
|
1853
|
-
__param(0, (0, runtime_1.
|
1883
|
+
__param(0, (0, runtime_1.Body)()),
|
1884
|
+
__param(1, (0, runtime_1.Inject)())
|
1854
1885
|
], LemmyHttp.prototype, "deleteCommunityIcon", null);
|
1855
1886
|
__decorate([
|
1856
1887
|
(0, runtime_1.Security)("bearerAuth"),
|
1857
1888
|
(0, runtime_1.Post)("/community/banner"),
|
1858
1889
|
(0, runtime_1.Tags)("Community", "Media"),
|
1859
|
-
__param(0, (0, runtime_1.
|
1860
|
-
__param(1, (0, runtime_1.
|
1890
|
+
__param(0, (0, runtime_1.Queries)()),
|
1891
|
+
__param(1, (0, runtime_1.UploadedFile)()),
|
1892
|
+
__param(2, (0, runtime_1.Inject)())
|
1861
1893
|
], LemmyHttp.prototype, "uploadCommunityBanner", null);
|
1862
1894
|
__decorate([
|
1863
1895
|
(0, runtime_1.Security)("bearerAuth"),
|
1864
1896
|
(0, runtime_1.Delete)("/community/banner"),
|
1865
1897
|
(0, runtime_1.Tags)("Community", "Media"),
|
1866
|
-
__param(0, (0, runtime_1.
|
1898
|
+
__param(0, (0, runtime_1.Body)()),
|
1899
|
+
__param(1, (0, runtime_1.Inject)())
|
1867
1900
|
], LemmyHttp.prototype, "deleteCommunityBanner", null);
|
1868
1901
|
__decorate([
|
1869
1902
|
(0, runtime_1.Security)("bearerAuth"),
|
package/dist/index.d.ts
CHANGED
@@ -58,6 +58,7 @@ export { CommunityActions } from "./types/CommunityActions";
|
|
58
58
|
export { CommunityFollowerState } from "./types/CommunityFollowerState";
|
59
59
|
export { CommunityFollowerView } from "./types/CommunityFollowerView";
|
60
60
|
export { CommunityId } from "./types/CommunityId";
|
61
|
+
export { CommunityIdQuery } from "./types/CommunityIdQuery";
|
61
62
|
export { CommunityModeratorView } from "./types/CommunityModeratorView";
|
62
63
|
export { CommunityReport } from "./types/CommunityReport";
|
63
64
|
export { CommunityReportId } from "./types/CommunityReportId";
|
@@ -264,7 +265,6 @@ export { PostActions } from "./types/PostActions";
|
|
264
265
|
export { PostFeatureType } from "./types/PostFeatureType";
|
265
266
|
export { PostId } from "./types/PostId";
|
266
267
|
export { PostListingMode } from "./types/PostListingMode";
|
267
|
-
export { PostPaginationCursor } from "./types/PostPaginationCursor";
|
268
268
|
export { PostReport } from "./types/PostReport";
|
269
269
|
export { PostReportId } from "./types/PostReportId";
|
270
270
|
export { PostReportResponse } from "./types/PostReportResponse";
|
@@ -333,3 +333,9 @@ export { UploadImageResponse } from "./types/UploadImageResponse";
|
|
333
333
|
export { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
334
334
|
export { VerifyEmail } from "./types/VerifyEmail";
|
335
335
|
export { VoteView } from "./types/VoteView";
|
336
|
+
export { CreateMultiCommunity } from "./types/CreateMultiCommunity";
|
337
|
+
export { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
|
338
|
+
export { ListMultiCommunities } from "./types/ListMultiCommunities";
|
339
|
+
export { MultiCommunity } from "./types/MultiCommunity";
|
340
|
+
export { MultiCommunityId } from "./types/MultiCommunityId";
|
341
|
+
export { MultiCommunityView } from "./types/MultiCommunityView";
|
package/dist/other_types.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { CommunityIdQuery } from "./types/CommunityIdQuery";
|
1
2
|
import { DeleteImageParams } from "./types/DeleteImageParams";
|
2
3
|
import { GetComment } from "./types/GetComment";
|
3
4
|
import { GetComments } from "./types/GetComments";
|
@@ -86,3 +87,5 @@ export interface DeleteImageParamsI extends DeleteImageParams {
|
|
86
87
|
}
|
87
88
|
export interface ListBannedPersonsI extends ListBannedPersons {
|
88
89
|
}
|
90
|
+
export interface CommunityIdQueryI extends CommunityIdQuery {
|
91
|
+
}
|
package/dist/types/EditSite.d.ts
CHANGED
@@ -2,6 +2,7 @@ import type { CommentId } from "./CommentId";
|
|
2
2
|
import type { CommentSortType } from "./CommentSortType";
|
3
3
|
import type { CommunityId } from "./CommunityId";
|
4
4
|
import type { ListingType } from "./ListingType";
|
5
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
5
6
|
import type { PostId } from "./PostId";
|
6
7
|
/**
|
7
8
|
* Get a list of comments.
|
@@ -15,7 +16,8 @@ export type GetComments = {
|
|
15
16
|
*/
|
16
17
|
time_range_seconds?: number;
|
17
18
|
max_depth?: number;
|
18
|
-
|
19
|
+
page_cursor?: PaginationCursor;
|
20
|
+
page_back?: boolean;
|
19
21
|
limit?: number;
|
20
22
|
community_id?: CommunityId;
|
21
23
|
community_name?: string;
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import type { CommentView } from "./CommentView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* The comment list response.
|
4
5
|
*/
|
5
6
|
export type GetCommentsResponse = {
|
6
7
|
comments: Array<CommentView>;
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
7
10
|
};
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import type { CommentSlimView } from "./CommentSlimView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* A slimmer comment list response, without the post or community.
|
4
5
|
*/
|
5
6
|
export type GetCommentsSlimResponse = {
|
6
7
|
comments: Array<CommentSlimView>;
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
7
10
|
};
|
package/dist/types/GetPosts.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
2
|
import type { ListingType } from "./ListingType";
|
3
|
-
import type {
|
3
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
4
4
|
import type { PostSortType } from "./PostSortType";
|
5
5
|
/**
|
6
6
|
* Get a list of posts.
|
@@ -14,15 +14,8 @@ export type GetPosts = {
|
|
14
14
|
* Use Zero to override the local_site and local_user time_range.
|
15
15
|
*/
|
16
16
|
time_range_seconds?: number;
|
17
|
-
/**
|
18
|
-
* DEPRECATED, use page_cursor
|
19
|
-
*/
|
20
|
-
page?: number;
|
21
|
-
limit?: number;
|
22
17
|
community_id?: CommunityId;
|
23
18
|
community_name?: string;
|
24
|
-
saved_only?: boolean;
|
25
|
-
read_only?: boolean;
|
26
19
|
liked_only?: boolean;
|
27
20
|
disliked_only?: boolean;
|
28
21
|
show_hidden?: boolean;
|
@@ -46,6 +39,7 @@ export type GetPosts = {
|
|
46
39
|
* If true, then only show posts with no comments
|
47
40
|
*/
|
48
41
|
no_comments_only?: boolean;
|
49
|
-
page_cursor?:
|
42
|
+
page_cursor?: PaginationCursor;
|
50
43
|
page_back?: boolean;
|
44
|
+
limit?: number;
|
51
45
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
2
|
import type { PostView } from "./PostView";
|
3
3
|
/**
|
4
4
|
* The post list response.
|
@@ -8,5 +8,6 @@ export type GetPostsResponse = {
|
|
8
8
|
/**
|
9
9
|
* the pagination cursor to use to fetch the next page
|
10
10
|
*/
|
11
|
-
next_page?:
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
12
13
|
};
|
@@ -1,5 +1,11 @@
|
|
1
1
|
import type { FederationError } from "./FederationError";
|
2
2
|
export type LemmyErrorType = {
|
3
|
+
error: "block_keyword_too_short";
|
4
|
+
} | {
|
5
|
+
error: "block_keyword_too_long";
|
6
|
+
} | {
|
7
|
+
error: "couldnt_update_keywords";
|
8
|
+
} | {
|
3
9
|
error: "report_reason_required";
|
4
10
|
} | {
|
5
11
|
error: "report_too_long";
|
@@ -21,8 +27,6 @@ export type LemmyErrorType = {
|
|
21
27
|
error: "email_required";
|
22
28
|
} | {
|
23
29
|
error: "couldnt_update_comment";
|
24
|
-
} | {
|
25
|
-
error: "couldnt_update_private_message";
|
26
30
|
} | {
|
27
31
|
error: "cannot_leave_admin";
|
28
32
|
} | {
|
@@ -89,6 +93,8 @@ export type LemmyErrorType = {
|
|
89
93
|
error: "community_already_exists";
|
90
94
|
} | {
|
91
95
|
error: "language_not_allowed";
|
96
|
+
} | {
|
97
|
+
error: "couldnt_update_languages";
|
92
98
|
} | {
|
93
99
|
error: "couldnt_update_post";
|
94
100
|
} | {
|
@@ -119,8 +125,6 @@ export type LemmyErrorType = {
|
|
119
125
|
error: "no_id_given";
|
120
126
|
} | {
|
121
127
|
error: "incorrect_login";
|
122
|
-
} | {
|
123
|
-
error: "object_not_local";
|
124
128
|
} | {
|
125
129
|
error: "no_email_setup";
|
126
130
|
} | {
|
@@ -176,8 +180,6 @@ export type LemmyErrorType = {
|
|
176
180
|
error: "community_follower_already_exists";
|
177
181
|
} | {
|
178
182
|
error: "person_block_already_exists";
|
179
|
-
} | {
|
180
|
-
error: "user_already_exists";
|
181
183
|
} | {
|
182
184
|
error: "couldnt_like_post";
|
183
185
|
} | {
|
@@ -191,27 +193,21 @@ export type LemmyErrorType = {
|
|
191
193
|
} | {
|
192
194
|
error: "couldnt_update_community";
|
193
195
|
} | {
|
194
|
-
error: "
|
195
|
-
} | {
|
196
|
-
error: "couldnt_update_person_comment_mentions";
|
196
|
+
error: "couldnt_create_person_comment_mention";
|
197
197
|
} | {
|
198
|
-
error: "
|
198
|
+
error: "couldnt_update_person_comment_mention";
|
199
199
|
} | {
|
200
|
-
error: "
|
200
|
+
error: "couldnt_create_person_post_mention";
|
201
201
|
} | {
|
202
|
-
error: "
|
202
|
+
error: "couldnt_update_person_post_mention";
|
203
203
|
} | {
|
204
|
-
error: "
|
204
|
+
error: "couldnt_create_post";
|
205
205
|
} | {
|
206
|
-
error: "
|
206
|
+
error: "couldnt_create_private_message";
|
207
207
|
} | {
|
208
|
-
error: "
|
208
|
+
error: "couldnt_update_private_message";
|
209
209
|
} | {
|
210
210
|
error: "blocked_url";
|
211
|
-
} | {
|
212
|
-
error: "couldnt_get_comments";
|
213
|
-
} | {
|
214
|
-
error: "couldnt_get_posts";
|
215
211
|
} | {
|
216
212
|
error: "invalid_url";
|
217
213
|
} | {
|
@@ -271,7 +267,9 @@ export type LemmyErrorType = {
|
|
271
267
|
} | {
|
272
268
|
error: "oauth_registration_closed";
|
273
269
|
} | {
|
274
|
-
error: "
|
270
|
+
error: "couldnt_create_oauth_provider";
|
271
|
+
} | {
|
272
|
+
error: "couldnt_update_oauth_provider";
|
275
273
|
} | {
|
276
274
|
error: "not_found";
|
277
275
|
} | {
|
@@ -292,4 +290,70 @@ export type LemmyErrorType = {
|
|
292
290
|
} | {
|
293
291
|
error: "plugin_error";
|
294
292
|
message: string;
|
293
|
+
} | {
|
294
|
+
error: "invalid_fetch_limit";
|
295
|
+
} | {
|
296
|
+
error: "couldnt_create_comment_reply";
|
297
|
+
} | {
|
298
|
+
error: "couldnt_update_comment_reply";
|
299
|
+
} | {
|
300
|
+
error: "couldnt_mark_comment_reply_as_read";
|
301
|
+
} | {
|
302
|
+
error: "couldnt_create_emoji";
|
303
|
+
} | {
|
304
|
+
error: "couldnt_update_emoji";
|
305
|
+
} | {
|
306
|
+
error: "couldnt_create_person";
|
307
|
+
} | {
|
308
|
+
error: "couldnt_update_person";
|
309
|
+
} | {
|
310
|
+
error: "couldnt_create_modlog";
|
311
|
+
} | {
|
312
|
+
error: "couldnt_update_modlog";
|
313
|
+
} | {
|
314
|
+
error: "couldnt_create_site";
|
315
|
+
} | {
|
316
|
+
error: "couldnt_update_site";
|
317
|
+
} | {
|
318
|
+
error: "couldnt_create_registration_application";
|
319
|
+
} | {
|
320
|
+
error: "couldnt_update_registration_application";
|
321
|
+
} | {
|
322
|
+
error: "couldnt_create_tag";
|
323
|
+
} | {
|
324
|
+
error: "couldnt_update_tag";
|
325
|
+
} | {
|
326
|
+
error: "couldnt_create_post_tag";
|
327
|
+
} | {
|
328
|
+
error: "couldnt_update_post_tag";
|
329
|
+
} | {
|
330
|
+
error: "couldnt_create_tagline";
|
331
|
+
} | {
|
332
|
+
error: "couldnt_update_tagline";
|
333
|
+
} | {
|
334
|
+
error: "couldnt_create_image";
|
335
|
+
} | {
|
336
|
+
error: "couldnt_allow_instance";
|
337
|
+
} | {
|
338
|
+
error: "couldnt_block_instance";
|
339
|
+
} | {
|
340
|
+
error: "couldnt_insert_activity";
|
341
|
+
} | {
|
342
|
+
error: "couldnt_create_rate_limit";
|
343
|
+
} | {
|
344
|
+
error: "couldnt_create_captcha_answer";
|
345
|
+
} | {
|
346
|
+
error: "couldnt_update_federation_queue_state";
|
347
|
+
} | {
|
348
|
+
error: "couldnt_create_oauth_account";
|
349
|
+
} | {
|
350
|
+
error: "couldnt_create_password_reset_request";
|
351
|
+
} | {
|
352
|
+
error: "couldnt_create_login_token";
|
353
|
+
} | {
|
354
|
+
error: "couldnt_update_local_site_url_blocklist";
|
355
|
+
} | {
|
356
|
+
error: "couldnt_create_email_verification";
|
357
|
+
} | {
|
358
|
+
error: "email_notifications_disabled";
|
295
359
|
};
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import type { CommentId } from "./CommentId";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* List comment likes. Admins-only.
|
4
5
|
*/
|
5
6
|
export type ListCommentLikes = {
|
6
7
|
comment_id: CommentId;
|
7
|
-
|
8
|
+
page_cursor?: PaginationCursor;
|
9
|
+
page_back?: boolean;
|
8
10
|
limit?: number;
|
9
11
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { VoteView } from "./VoteView";
|
2
3
|
/**
|
3
4
|
* The comment likes response
|
4
5
|
*/
|
5
6
|
export type ListCommentLikesResponse = {
|
6
7
|
comment_likes: Array<VoteView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { CommunitySortType } from "./CommunitySortType";
|
2
2
|
import type { ListingType } from "./ListingType";
|
3
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
3
4
|
/**
|
4
5
|
* Fetches a list of communities.
|
5
6
|
*/
|
@@ -12,6 +13,7 @@ export type ListCommunities = {
|
|
12
13
|
*/
|
13
14
|
time_range_seconds?: number;
|
14
15
|
show_nsfw?: boolean;
|
15
|
-
|
16
|
+
page_cursor?: PaginationCursor;
|
17
|
+
page_back?: boolean;
|
16
18
|
limit?: number;
|
17
19
|
};
|
@@ -1,7 +1,13 @@
|
|
1
1
|
import type { CommunityView } from "./CommunityView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
/**
|
3
4
|
* The response for listing communities.
|
4
5
|
*/
|
5
6
|
export type ListCommunitiesResponse = {
|
6
7
|
communities: Array<CommunityView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
export type ListCommunityPendingFollows = {
|
2
3
|
/**
|
3
4
|
* Only shows the unapproved applications
|
4
5
|
*/
|
5
6
|
pending_only?: boolean;
|
6
7
|
all_communities?: boolean;
|
7
|
-
|
8
|
+
page_cursor?: PaginationCursor;
|
9
|
+
page_back?: boolean;
|
8
10
|
limit?: number;
|
9
11
|
};
|
@@ -1,4 +1,10 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { PendingFollow } from "./PendingFollow";
|
2
3
|
export type ListCommunityPendingFollowsResponse = {
|
3
4
|
items: Array<PendingFollow>;
|
5
|
+
/**
|
6
|
+
* the pagination cursor to use to fetch the next page
|
7
|
+
*/
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
4
10
|
};
|
package/dist/types/ListMedia.js
CHANGED
@@ -1,4 +1,10 @@
|
|
1
1
|
import type { LocalImageView } from "./LocalImageView";
|
2
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
2
3
|
export type ListMediaResponse = {
|
3
4
|
images: Array<LocalImageView>;
|
5
|
+
/**
|
6
|
+
* the pagination cursor to use to fetch the next page
|
7
|
+
*/
|
8
|
+
next_page?: PaginationCursor;
|
9
|
+
prev_page?: PaginationCursor;
|
4
10
|
};
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { PostId } from "./PostId";
|
2
3
|
/**
|
3
4
|
* List post likes. Admins-only.
|
4
5
|
*/
|
5
6
|
export type ListPostLikes = {
|
6
7
|
post_id: PostId;
|
7
|
-
|
8
|
+
page_cursor?: PaginationCursor;
|
9
|
+
page_back?: boolean;
|
8
10
|
limit?: number;
|
9
11
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { VoteView } from "./VoteView";
|
2
3
|
/**
|
3
4
|
* The post likes response
|
4
5
|
*/
|
5
6
|
export type ListPostLikesResponse = {
|
6
7
|
post_likes: Array<VoteView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
/**
|
2
3
|
* Fetches a list of registration applications.
|
3
4
|
*/
|
@@ -6,6 +7,7 @@ export type ListRegistrationApplications = {
|
|
6
7
|
* Only shows the unread applications (IE those without an admin actor)
|
7
8
|
*/
|
8
9
|
unread_only?: boolean;
|
9
|
-
|
10
|
+
page_cursor?: PaginationCursor;
|
11
|
+
page_back?: boolean;
|
10
12
|
limit?: number;
|
11
13
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { RegistrationApplicationView } from "./RegistrationApplicationView";
|
2
3
|
/**
|
3
4
|
* The list of registration applications.
|
4
5
|
*/
|
5
6
|
export type ListRegistrationApplicationsResponse = {
|
6
7
|
registration_applications: Array<RegistrationApplicationView>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
1
2
|
import type { Tagline } from "./Tagline";
|
2
3
|
/**
|
3
4
|
* A response for taglines.
|
4
5
|
*/
|
5
6
|
export type ListTaglinesResponse = {
|
6
7
|
taglines: Array<Tagline>;
|
8
|
+
/**
|
9
|
+
* the pagination cursor to use to fetch the next page
|
10
|
+
*/
|
11
|
+
next_page?: PaginationCursor;
|
12
|
+
prev_page?: PaginationCursor;
|
7
13
|
};
|
@@ -141,4 +141,8 @@ export type LocalSite = {
|
|
141
141
|
* The number of users with any activity in the last half year.
|
142
142
|
*/
|
143
143
|
users_active_half_year: number;
|
144
|
+
/**
|
145
|
+
* Dont send email notifications to users for new replies, mentions etc
|
146
|
+
*/
|
147
|
+
disable_email_notifications: boolean;
|
144
148
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type MultiCommunityId = number;
|
package/dist/types/Search.d.ts
CHANGED
package/dist/types/Tagline.d.ts
CHANGED
package/dist/types/Tagline.js
CHANGED
package/dist/types/VoteView.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "lemmy-js-client",
|
3
3
|
"description": "A javascript / typescript client for Lemmy",
|
4
|
-
"version": "1.0.0-
|
4
|
+
"version": "1.0.0-multi-community.1",
|
5
5
|
"author": "Dessalines",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
"eslint": "^9.11.1",
|
33
33
|
"eslint-plugin-prettier": "^5.2.1",
|
34
34
|
"husky": "^9.1.4",
|
35
|
-
"lint-staged": "^
|
35
|
+
"lint-staged": "^16.0.0",
|
36
36
|
"prettier": "^3.3.3",
|
37
37
|
"prettier-plugin-import-sort": "^0.0.7",
|
38
38
|
"prettier-plugin-organize-imports": "^4.0.0",
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"typescript": "^5.5.4",
|
44
44
|
"typescript-eslint": "^8.7.0"
|
45
45
|
},
|
46
|
-
"packageManager": "pnpm@10.
|
46
|
+
"packageManager": "pnpm@10.10.0",
|
47
47
|
"types": "./dist/index.d.ts",
|
48
48
|
"lint-staged": {
|
49
49
|
"*.{ts,tsx,js}": [
|
@@ -1,7 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* currently this is just a wrapper around post id, but should be seen as opaque from the client's
|
3
|
-
* perspective. stringified since we might want to use arbitrary info later, with a P prepended to
|
4
|
-
* prevent ossification (api users love to make assumptions (e.g. parse stuff that looks like
|
5
|
-
* numbers as numbers) about apis that aren't part of the spec
|
6
|
-
*/
|
7
|
-
export type PostPaginationCursor = string;
|
File without changes
|