lemmy-js-client 1.0.0-multi-community.1 → 1.0.0-multi-community.3

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
@@ -138,6 +138,11 @@ import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
138
138
  import { Tag } from "./types/Tag";
139
139
  import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
140
140
  import { CommunityIdQuery } from "./types/CommunityIdQuery";
141
+ import { CreateMultiCommunity } from "./types/CreateMultiCommunity";
142
+ import { MultiCommunity } from "./types/MultiCommunity";
143
+ import { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
144
+ import { ListMultiCommunities } from "./types/ListMultiCommunities";
145
+ import { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
141
146
  type RequestOptions = Pick<RequestInit, "signal">;
142
147
  /**
143
148
  * Helps build lemmy HTTP requests.
@@ -723,10 +728,11 @@ export declare class LemmyHttp extends Controller {
723
728
  imageHealth(options?: RequestOptions): Promise<SuccessResponse>;
724
729
  /**
725
730
  * Mark donation dialog as shown, so it isn't displayed anymore.
726
- *
727
- * `HTTP.POST /user/donation_dialog_shown`
728
731
  */
729
- donation_dialog_shown(options?: RequestOptions): Promise<SuccessResponse>;
732
+ donationDialogShown(options?: RequestOptions): Promise<SuccessResponse>;
733
+ createMultiCommunity(form: CreateMultiCommunity, options?: RequestOptions): Promise<MultiCommunity>;
734
+ updateMultiCommunity(form: UpdateMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
735
+ listMultiCommunities(form: ListMultiCommunities, options?: RequestOptions): Promise<ListMultiCommunitiesResponse>;
730
736
  /**
731
737
  * Set the headers (can be used to set the auth header)
732
738
  */
package/dist/http.js CHANGED
@@ -900,12 +900,19 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
900
900
  }
901
901
  /**
902
902
  * Mark donation dialog as shown, so it isn't displayed anymore.
903
- *
904
- * `HTTP.POST /user/donation_dialog_shown`
905
903
  */
906
- donation_dialog_shown(options) {
904
+ donationDialogShown(options) {
907
905
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/donation_dialog_shown", {}, options);
908
906
  }
907
+ createMultiCommunity(form, options) {
908
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community", form, options);
909
+ }
910
+ updateMultiCommunity(form, options) {
911
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/multi_community", form, options);
912
+ }
913
+ listMultiCommunities(form, options) {
914
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community/list", form, options);
915
+ }
909
916
  /**
910
917
  * Set the headers (can be used to set the auth header)
911
918
  */
@@ -1937,8 +1944,27 @@ __decorate([
1937
1944
  __param(0, (0, runtime_1.Inject)())
1938
1945
  ], LemmyHttp.prototype, "imageHealth", null);
1939
1946
  __decorate([
1947
+ (0, runtime_1.Security)("bearerAuth"),
1948
+ (0, runtime_1.Post)("/user/donation_dialog_shown"),
1940
1949
  __param(0, (0, runtime_1.Inject)())
1941
- ], LemmyHttp.prototype, "donation_dialog_shown", null);
1950
+ ], LemmyHttp.prototype, "donationDialogShown", null);
1951
+ __decorate([
1952
+ (0, runtime_1.Security)("bearerAuth"),
1953
+ (0, runtime_1.Post)("/multi_community"),
1954
+ __param(0, (0, runtime_1.Body)()),
1955
+ __param(1, (0, runtime_1.Inject)())
1956
+ ], LemmyHttp.prototype, "createMultiCommunity", null);
1957
+ __decorate([
1958
+ (0, runtime_1.Security)("bearerAuth"),
1959
+ (0, runtime_1.Put)("/multi_community"),
1960
+ __param(0, (0, runtime_1.Body)()),
1961
+ __param(1, (0, runtime_1.Inject)())
1962
+ ], LemmyHttp.prototype, "updateMultiCommunity", null);
1963
+ __decorate([
1964
+ (0, runtime_1.Put)("/multi_community/list"),
1965
+ __param(0, (0, runtime_1.Body)()),
1966
+ __param(1, (0, runtime_1.Inject)())
1967
+ ], LemmyHttp.prototype, "listMultiCommunities", null);
1942
1968
  exports.LemmyHttp = LemmyHttp = __decorate([
1943
1969
  (0, runtime_1.Route)("api/v4")
1944
1970
  ], LemmyHttp);
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-multi-community.1",
4
+ "version": "1.0.0-multi-community.3",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -1,6 +0,0 @@
1
- import type { DbUrl } from "./DbUrl";
2
- import type { MultiCommunity } from "./MultiCommunity";
3
- export type MultiCommunityViewApub = {
4
- multi: MultiCommunity;
5
- entries: Array<DbUrl>;
6
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });