lemmy-js-client 0.20.0-show-mod-reports.2 → 1.0.0-post-tags.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/http.d.ts CHANGED
@@ -21,6 +21,7 @@ import { CreateComment } from "./types/CreateComment";
21
21
  import { CreateCommentLike } from "./types/CreateCommentLike";
22
22
  import { CreateCommentReport } from "./types/CreateCommentReport";
23
23
  import { CreateCommunity } from "./types/CreateCommunity";
24
+ import { CreateCommunityTag } from "./types/CreateCommunityTag";
24
25
  import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
25
26
  import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
26
27
  import { CreatePost } from "./types/CreatePost";
@@ -33,6 +34,7 @@ import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
33
34
  import { DeleteAccount } from "./types/DeleteAccount";
34
35
  import { DeleteComment } from "./types/DeleteComment";
35
36
  import { DeleteCommunity } from "./types/DeleteCommunity";
37
+ import { DeleteCommunityTag } from "./types/DeleteCommunityTag";
36
38
  import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
37
39
  import { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
38
40
  import { DeletePost } from "./types/DeletePost";
@@ -62,6 +64,8 @@ import { GetSiteResponse } from "./types/GetSiteResponse";
62
64
  import { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
63
65
  import { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
64
66
  import { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
67
+ import { ListCommunityTags } from "./types/ListCommunityTags";
68
+ import { ListCommunityTagsResponse } from "./types/ListCommunityTagsResponse";
65
69
  import { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
66
70
  import { LockPost } from "./types/LockPost";
67
71
  import { Login } from "./types/Login";
@@ -94,6 +98,8 @@ import { SaveUserSettings } from "./types/SaveUserSettings";
94
98
  import { SearchResponse } from "./types/SearchResponse";
95
99
  import { SiteResponse } from "./types/SiteResponse";
96
100
  import { TransferCommunity } from "./types/TransferCommunity";
101
+ import { UpdateCommunityTag } from "./types/UpdateCommunityTag";
102
+ import { UpdatePostTags } from "./types/UpdatePostTags";
97
103
  import { VerifyEmail } from "./types/VerifyEmail";
98
104
  import { DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
99
105
  import { HideCommunity } from "./types/HideCommunity";
@@ -129,6 +135,7 @@ import { MarkPersonCommentMentionAsRead } from "./types/MarkPersonCommentMention
129
135
  import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead";
130
136
  import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
131
137
  import { Controller } from "tsoa";
138
+ import { CommunityTagResponse } from "./types/CommunityTagResponse";
132
139
  type RequestOptions = Pick<RequestInit, "signal">;
133
140
  /**
134
141
  * Helps build lemmy HTTP requests.
@@ -588,6 +595,26 @@ export declare class LemmyHttp extends Controller {
588
595
  * @summary List taglines.
589
596
  */
590
597
  listTaglines(form: ListTaglinesI, options?: RequestOptions): Promise<ListTaglinesResponse>;
598
+ /**
599
+ * @summary Create a community tag.
600
+ */
601
+ createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
602
+ /**
603
+ * @summary Update a community tag.
604
+ */
605
+ updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
606
+ /**
607
+ * @summary List community tags.
608
+ */
609
+ listCommunityTags(form: ListCommunityTags, options?: RequestOptions): Promise<ListCommunityTagsResponse>;
610
+ /**
611
+ * @summary Delete a community tag.
612
+ */
613
+ deleteCommunityTag(form: DeleteCommunityTag, options?: RequestOptions): Promise<CommunityTagResponse>;
614
+ /**
615
+ * @summary Update post tags.
616
+ */
617
+ updatePostTags(form: UpdatePostTags, options?: RequestOptions): Promise<PostResponse>;
591
618
  /**
592
619
  * @summary Create a new oauth provider method
593
620
  */
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,10 +47,10 @@ let LemmyHttp = class LemmyHttp extends tsoa_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 === null || options === void 0 ? void 0 : options.headers) {
50
+ if (options?.headers) {
60
51
  __classPrivateFieldSet(this, _LemmyHttp_headers, options.headers, "f");
61
52
  }
62
- if (options === null || options === void 0 ? void 0 : options.fetchFunction) {
53
+ if (options?.fetchFunction) {
63
54
  __classPrivateFieldSet(this, _LemmyHttp_fetchFunction, options.fetchFunction, "f");
64
55
  }
65
56
  }
@@ -721,6 +712,36 @@ let LemmyHttp = class LemmyHttp extends tsoa_1.Controller {
721
712
  listTaglines(form, options) {
722
713
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/tagline/list", form, options);
723
714
  }
715
+ /**
716
+ * @summary Create a community tag.
717
+ */
718
+ createCommunityTag(form, options) {
719
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/post_tag", form, options);
720
+ }
721
+ /**
722
+ * @summary Update a community tag.
723
+ */
724
+ updateCommunityTag(form, options) {
725
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/community/post_tag", form, options);
726
+ }
727
+ /**
728
+ * @summary List community tags.
729
+ */
730
+ listCommunityTags(form, options) {
731
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/post_tag/list", form, options);
732
+ }
733
+ /**
734
+ * @summary Delete a community tag.
735
+ */
736
+ deleteCommunityTag(form, options) {
737
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/post_tag", form, options);
738
+ }
739
+ /**
740
+ * @summary Update post tags.
741
+ */
742
+ updatePostTags(form, options) {
743
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/tags", form, options);
744
+ }
724
745
  /**
725
746
  * @summary Create a new oauth provider method
726
747
  */
@@ -778,122 +799,92 @@ let LemmyHttp = class LemmyHttp extends tsoa_1.Controller {
778
799
  /**
779
800
  * @summary Upload new user avatar.
780
801
  */
781
- uploadUserAvatar(image, options) {
782
- return __awaiter(this, void 0, void 0, function* () {
783
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
784
- });
802
+ async uploadUserAvatar(image, options) {
803
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/avatar", image, options);
785
804
  }
786
805
  /**
787
806
  * @summary Delete the user avatar.
788
807
  */
789
- deleteUserAvatar(options) {
790
- return __awaiter(this, void 0, void 0, function* () {
791
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
792
- });
808
+ async deleteUserAvatar(options) {
809
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/avatar", {}, options);
793
810
  }
794
811
  /**
795
812
  * @summary Upload new user banner.
796
813
  */
797
- uploadUserBanner(image, options) {
798
- return __awaiter(this, void 0, void 0, function* () {
799
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
800
- });
814
+ async uploadUserBanner(image, options) {
815
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/account/banner", image, options);
801
816
  }
802
817
  /**
803
818
  * @summary Delete the user banner.
804
819
  */
805
- deleteUserBanner(options) {
806
- return __awaiter(this, void 0, void 0, function* () {
807
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
808
- });
820
+ async deleteUserBanner(options) {
821
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/account/banner", {}, options);
809
822
  }
810
823
  /**
811
824
  * @summary Upload new community icon.
812
825
  */
813
- uploadCommunityIcon(image, options) {
814
- return __awaiter(this, void 0, void 0, function* () {
815
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/icon", image, options);
816
- });
826
+ async uploadCommunityIcon(image, options) {
827
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/icon", image, options);
817
828
  }
818
829
  /**
819
830
  * @summary Delete the community icon.
820
831
  */
821
- deleteCommunityIcon(options) {
822
- return __awaiter(this, void 0, void 0, function* () {
823
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", {}, options);
824
- });
832
+ async deleteCommunityIcon(options) {
833
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/icon", {}, options);
825
834
  }
826
835
  /**
827
836
  * @summary Upload new community banner.
828
837
  */
829
- uploadCommunityBanner(image, options) {
830
- return __awaiter(this, void 0, void 0, function* () {
831
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/banner", image, options);
832
- });
838
+ async uploadCommunityBanner(image, options) {
839
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/community/banner", image, options);
833
840
  }
834
841
  /**
835
842
  * @summary Delete the community banner.
836
843
  */
837
- deleteCommunityBanner(options) {
838
- return __awaiter(this, void 0, void 0, function* () {
839
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", {}, options);
840
- });
844
+ async deleteCommunityBanner(options) {
845
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/community/banner", {}, options);
841
846
  }
842
847
  /**
843
848
  * @summary Upload new site icon.
844
849
  */
845
- uploadSiteIcon(image, options) {
846
- return __awaiter(this, void 0, void 0, function* () {
847
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
848
- });
850
+ async uploadSiteIcon(image, options) {
851
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/icon", image, options);
849
852
  }
850
853
  /**
851
854
  * @summary Delete the site icon.
852
855
  */
853
- deleteSiteIcon(options) {
854
- return __awaiter(this, void 0, void 0, function* () {
855
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
856
- });
856
+ async deleteSiteIcon(options) {
857
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/icon", {}, options);
857
858
  }
858
859
  /**
859
860
  * @summary Upload new site banner.
860
861
  */
861
- uploadSiteBanner(image, options) {
862
- return __awaiter(this, void 0, void 0, function* () {
863
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
864
- });
862
+ async uploadSiteBanner(image, options) {
863
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/site/banner", image, options);
865
864
  }
866
865
  /**
867
866
  * @summary Delete the site banner.
868
867
  */
869
- deleteSiteBanner(options) {
870
- return __awaiter(this, void 0, void 0, function* () {
871
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
872
- });
868
+ async deleteSiteBanner(options) {
869
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/site/banner", {}, options);
873
870
  }
874
871
  /**
875
872
  * @summary Upload an image to the server.
876
873
  */
877
- uploadImage(image, options) {
878
- return __awaiter(this, void 0, void 0, function* () {
879
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
880
- });
874
+ async uploadImage(image, options) {
875
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_upload).call(this, "/image", image, options);
881
876
  }
882
877
  /**
883
878
  * @summary Delete a pictrs image
884
879
  */
885
- deleteImage(form, options) {
886
- return __awaiter(this, void 0, void 0, function* () {
887
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
888
- });
880
+ async deleteImage(form, options) {
881
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/image", form, options);
889
882
  }
890
883
  /**
891
884
  * @summary Health check for image functionality
892
885
  */
893
- imageHealth(options) {
894
- return __awaiter(this, void 0, void 0, function* () {
895
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
896
- });
886
+ async imageHealth(options) {
887
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/image/health", {}, options);
897
888
  }
898
889
  /**
899
890
  * Set the headers (can be used to set the auth header)
@@ -910,38 +901,50 @@ _LemmyHttp_instances = new WeakSet();
910
901
  _LemmyHttp_buildFullUrl = function _LemmyHttp_buildFullUrl(endpoint) {
911
902
  return `${__classPrivateFieldGet(this, _LemmyHttp_apiUrl, "f")}${endpoint}`;
912
903
  };
913
- _LemmyHttp_upload = function _LemmyHttp_upload(path_1, _a, options_1) {
914
- return __awaiter(this, arguments, void 0, function* (path, { image }, options) {
915
- const formData = createFormData(image);
916
- const response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, path), Object.assign(Object.assign({}, options), { method: HttpType.Post, body: formData, headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f") }));
917
- return response.json();
904
+ _LemmyHttp_upload = async function _LemmyHttp_upload(path, { image }, options) {
905
+ const formData = createFormData(image);
906
+ const response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, path), {
907
+ ...options,
908
+ method: HttpType.Post,
909
+ body: formData,
910
+ headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
918
911
  });
912
+ return response.json();
919
913
  };
920
- _LemmyHttp_wrapper = function _LemmyHttp_wrapper(type_, endpoint, form, options) {
921
- return __awaiter(this, void 0, void 0, function* () {
922
- var _a;
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 = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, getUrl, Object.assign(Object.assign({}, options), { method: HttpType.Get, headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f") }));
927
- }
928
- else {
929
- response = yield __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint), Object.assign(Object.assign({}, options), { method: type_, headers: Object.assign({ "Content-Type": "application/json" }, __classPrivateFieldGet(this, _LemmyHttp_headers, "f")), body: JSON.stringify(form) }));
930
- }
931
- let json = undefined;
932
- try {
933
- json = yield response.json();
934
- }
935
- catch (_b) {
936
- throw new Error(response.statusText);
937
- }
938
- if (!response.ok) {
939
- throw new Error((_a = json["error"]) !== null && _a !== void 0 ? _a : response.statusText);
940
- }
941
- else {
942
- return json;
943
- }
944
- });
914
+ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, options) {
915
+ let response;
916
+ if (type_ === HttpType.Get) {
917
+ const getUrl = `${__classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint)}?${encodeGetParams(form)}`;
918
+ response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, getUrl, {
919
+ ...options,
920
+ method: HttpType.Get,
921
+ headers: __classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
922
+ });
923
+ }
924
+ else {
925
+ response = await __classPrivateFieldGet(this, _LemmyHttp_fetchFunction, "f").call(this, __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_buildFullUrl).call(this, endpoint), {
926
+ ...options,
927
+ method: type_,
928
+ headers: {
929
+ "Content-Type": "application/json",
930
+ ...__classPrivateFieldGet(this, _LemmyHttp_headers, "f"),
931
+ },
932
+ body: JSON.stringify(form),
933
+ });
934
+ }
935
+ let json = undefined;
936
+ try {
937
+ json = await response.json();
938
+ }
939
+ catch {
940
+ throw new Error(response.statusText);
941
+ }
942
+ if (!response.ok) {
943
+ throw new Error(json["error"] ?? response.statusText);
944
+ }
945
+ else {
946
+ return json;
947
+ }
945
948
  };
946
949
  __decorate([
947
950
  (0, tsoa_1.Security)("bearerAuth"),
@@ -1699,6 +1702,42 @@ __decorate([
1699
1702
  __param(0, (0, tsoa_1.Queries)()),
1700
1703
  __param(1, (0, tsoa_1.Inject)())
1701
1704
  ], LemmyHttp.prototype, "listTaglines", null);
1705
+ __decorate([
1706
+ (0, tsoa_1.Security)("bearerAuth"),
1707
+ (0, tsoa_1.Post)("/community/post_tag"),
1708
+ (0, tsoa_1.Tags)("Community"),
1709
+ __param(0, (0, tsoa_1.Body)()),
1710
+ __param(1, (0, tsoa_1.Inject)())
1711
+ ], LemmyHttp.prototype, "createCommunityTag", null);
1712
+ __decorate([
1713
+ (0, tsoa_1.Security)("bearerAuth"),
1714
+ (0, tsoa_1.Put)("/community/post_tag"),
1715
+ (0, tsoa_1.Tags)("Community"),
1716
+ __param(0, (0, tsoa_1.Body)()),
1717
+ __param(1, (0, tsoa_1.Inject)())
1718
+ ], LemmyHttp.prototype, "updateCommunityTag", null);
1719
+ __decorate([
1720
+ (0, tsoa_1.Security)("bearerAuth"),
1721
+ (0, tsoa_1.Security)({}),
1722
+ (0, tsoa_1.Get)("/community/post_tag/list"),
1723
+ (0, tsoa_1.Tags)("Community"),
1724
+ __param(0, (0, tsoa_1.Queries)()),
1725
+ __param(1, (0, tsoa_1.Inject)())
1726
+ ], LemmyHttp.prototype, "listCommunityTags", null);
1727
+ __decorate([
1728
+ (0, tsoa_1.Security)("bearerAuth"),
1729
+ (0, tsoa_1.Post)("/community/post_tag"),
1730
+ (0, tsoa_1.Tags)("Community"),
1731
+ __param(0, (0, tsoa_1.Body)()),
1732
+ __param(1, (0, tsoa_1.Inject)())
1733
+ ], LemmyHttp.prototype, "deleteCommunityTag", null);
1734
+ __decorate([
1735
+ (0, tsoa_1.Security)("bearerAuth"),
1736
+ (0, tsoa_1.Put)("/post/tags"),
1737
+ (0, tsoa_1.Tags)("Post"),
1738
+ __param(0, (0, tsoa_1.Body)()),
1739
+ __param(1, (0, tsoa_1.Inject)())
1740
+ ], LemmyHttp.prototype, "updatePostTags", null);
1702
1741
  __decorate([
1703
1742
  (0, tsoa_1.Security)("bearerAuth"),
1704
1743
  (0, tsoa_1.Post)("/oauth_provider"),
package/dist/index.d.ts CHANGED
@@ -64,12 +64,14 @@ export { CommunityReportId } from "./types/CommunityReportId";
64
64
  export { CommunityReportView } from "./types/CommunityReportView";
65
65
  export { CommunityResponse } from "./types/CommunityResponse";
66
66
  export { CommunitySortType } from "./types/CommunitySortType";
67
+ export { CommunityTagResponse } from "./types/CommunityTagResponse";
67
68
  export { CommunityView } from "./types/CommunityView";
68
69
  export { CommunityVisibility } from "./types/CommunityVisibility";
69
70
  export { CreateComment } from "./types/CreateComment";
70
71
  export { CreateCommentLike } from "./types/CreateCommentLike";
71
72
  export { CreateCommentReport } from "./types/CreateCommentReport";
72
73
  export { CreateCommunity } from "./types/CreateCommunity";
74
+ export { CreateCommunityTag } from "./types/CreateCommunityTag";
73
75
  export { CreateCustomEmoji } from "./types/CreateCustomEmoji";
74
76
  export { CreateOAuthProvider } from "./types/CreateOAuthProvider";
75
77
  export { CreatePost } from "./types/CreatePost";
@@ -88,6 +90,7 @@ export { DbUrl } from "./types/DbUrl";
88
90
  export { DeleteAccount } from "./types/DeleteAccount";
89
91
  export { DeleteComment } from "./types/DeleteComment";
90
92
  export { DeleteCommunity } from "./types/DeleteCommunity";
93
+ export { DeleteCommunityTag } from "./types/DeleteCommunityTag";
91
94
  export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
92
95
  export { DeleteImageParams } from "./types/DeleteImageParams";
93
96
  export { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
@@ -157,6 +160,8 @@ export { ListCommunities } from "./types/ListCommunities";
157
160
  export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
158
161
  export { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
159
162
  export { ListCommunityPendingFollowsResponse } from "./types/ListCommunityPendingFollowsResponse";
163
+ export { ListCommunityTags } from "./types/ListCommunityTags";
164
+ export { ListCommunityTagsResponse } from "./types/ListCommunityTagsResponse";
160
165
  export { ListCustomEmojis } from "./types/ListCustomEmojis";
161
166
  export { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
162
167
  export { ListInbox } from "./types/ListInbox";
@@ -323,6 +328,8 @@ export { Tagline } from "./types/Tagline";
323
328
  export { TaglineId } from "./types/TaglineId";
324
329
  export { TaglineResponse } from "./types/TaglineResponse";
325
330
  export { TransferCommunity } from "./types/TransferCommunity";
331
+ export { UpdateCommunityTag } from "./types/UpdateCommunityTag";
332
+ export { UpdatePostTags } from "./types/UpdatePostTags";
326
333
  export { UpdateTagline } from "./types/UpdateTagline";
327
334
  export { UpdateTotp } from "./types/UpdateTotp";
328
335
  export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
@@ -31,9 +31,9 @@ export type Community = {
31
31
  */
32
32
  nsfw: boolean;
33
33
  /**
34
- * The federated ap_id.
34
+ * The federated actor_id.
35
35
  */
36
- ap_id: DbUrl;
36
+ actor_id: DbUrl;
37
37
  /**
38
38
  * Whether the community is local.
39
39
  */
@@ -0,0 +1,7 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ import type { TagId } from "./TagId";
3
+ export type CommunityTagResponse = {
4
+ id: TagId;
5
+ name: string;
6
+ community_id: CommunityId;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ /**
3
+ * Create a tag for a community.
4
+ */
5
+ export type CreateCommunityTag = {
6
+ community_id: CommunityId;
7
+ id_slug: string;
8
+ name: string;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type { TagId } from "./TagId";
2
+ /**
3
+ * Delete a community tag.
4
+ */
5
+ export type DeleteCommunityTag = {
6
+ tag_id: TagId;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,5 @@
1
1
  import type { LanguageId } from "./LanguageId";
2
2
  import type { PostId } from "./PostId";
3
- import type { TagId } from "./TagId";
4
3
  /**
5
4
  * Edit a post.
6
5
  */
@@ -22,7 +21,6 @@ export type EditPost = {
22
21
  * Instead of fetching a thumbnail, use a custom one.
23
22
  */
24
23
  custom_thumbnail?: string;
25
- tags?: Array<TagId>;
26
24
  /**
27
25
  * Time when this post should be scheduled. Null means publish immediately.
28
26
  */
@@ -0,0 +1,7 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ /**
3
+ * List tags for a community.
4
+ */
5
+ export type ListCommunityTags = {
6
+ community_id: CommunityId;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { CommunityTagResponse } from "./CommunityTagResponse";
2
+ export type ListCommunityTagsResponse = {
3
+ tags: Array<CommunityTagResponse>;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -24,8 +24,4 @@ export type ListReports = {
24
24
  community_id?: CommunityId;
25
25
  page_cursor?: ReportCombinedPaginationCursor;
26
26
  page_back?: boolean;
27
- /**
28
- * Only for admins: also show reports with `violates_instance_rules=false`
29
- */
30
- show_community_rule_violations?: boolean;
31
27
  };
@@ -22,9 +22,9 @@ export type Person = {
22
22
  published: string;
23
23
  updated?: string;
24
24
  /**
25
- * The federated ap_id.
25
+ * The federated actor_id.
26
26
  */
27
- ap_id: DbUrl;
27
+ actor_id: DbUrl;
28
28
  /**
29
29
  * An optional bio, in markdown.
30
30
  */
@@ -2,6 +2,4 @@ import type { Tag } from "./Tag";
2
2
  /**
3
3
  * we wrap this in a struct so we can implement FromSqlRow<Json> for it
4
4
  */
5
- export type PostTags = {
6
- tags: Array<Tag>;
7
- };
5
+ export type PostTags = Array<Tag>;
@@ -26,9 +26,9 @@ export type Site = {
26
26
  */
27
27
  description?: string;
28
28
  /**
29
- * The federated ap_id.
29
+ * The federated actor_id.
30
30
  */
31
- ap_id: DbUrl;
31
+ actor_id: DbUrl;
32
32
  /**
33
33
  * The time the site was last refreshed.
34
34
  */
@@ -0,0 +1,8 @@
1
+ import type { TagId } from "./TagId";
2
+ /**
3
+ * Update a community tag.
4
+ */
5
+ export type UpdateCommunityTag = {
6
+ tag_id: TagId;
7
+ name: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type { PostId } from "./PostId";
2
+ import type { TagId } from "./TagId";
3
+ /**
4
+ * Update tags for a post.
5
+ */
6
+ export type UpdatePostTags = {
7
+ post_id: PostId;
8
+ tags: Array<TagId>;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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": "0.20.0-show-mod-reports.2",
4
+ "version": "1.0.0-post-tags.0",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",