lemmy-js-client 1.0.0-bool-vote.0 → 1.0.0-bool-vote.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 +9 -10
- package/dist/http.js +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/types/AllLemmyErrors.js +1 -3
- package/dist/types/GetMultiCommunity.d.ts +2 -1
- package/dist/types/LemmyErrorType.d.ts +3 -6
- package/dist/types/MultiCommunityResponse.d.ts +4 -0
- package/dist/types/MultiCommunityView.d.ts +2 -0
- package/dist/types/PersonResponse.d.ts +7 -0
- package/dist/types/UntranslatedError.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/BanPersonResponse.d.ts +0 -8
- package/dist/types/BlockCommunityResponse.d.ts +0 -8
- package/dist/types/BlockPersonResponse.d.ts +0 -8
- package/dist/types/BlockPersonResponse.js +0 -2
- /package/dist/types/{BanPersonResponse.js → MultiCommunityResponse.js} +0 -0
- /package/dist/types/{BlockCommunityResponse.js → PersonResponse.js} +0 -0
package/dist/http.d.ts
CHANGED
|
@@ -9,11 +9,8 @@ import { BanFromCommunity } from "./types/BanFromCommunity";
|
|
|
9
9
|
import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
|
|
10
10
|
import { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
|
|
11
11
|
import { BanPerson } from "./types/BanPerson";
|
|
12
|
-
import { BanPersonResponse } from "./types/BanPersonResponse";
|
|
13
12
|
import { BlockCommunity } from "./types/BlockCommunity";
|
|
14
|
-
import { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
|
15
13
|
import { BlockPerson } from "./types/BlockPerson";
|
|
16
|
-
import { BlockPersonResponse } from "./types/BlockPersonResponse";
|
|
17
14
|
import { ChangePassword } from "./types/ChangePassword";
|
|
18
15
|
import { CommentReportResponse } from "./types/CommentReportResponse";
|
|
19
16
|
import { CommentResponse } from "./types/CommentResponse";
|
|
@@ -149,6 +146,8 @@ import { ListNotificationsResponse } from "./types/ListNotificationsResponse";
|
|
|
149
146
|
import { ModEditPost } from "./types/ModEditPost";
|
|
150
147
|
import { UpdateCommunityNotifications } from "./types/UpdateCommunityNotifications";
|
|
151
148
|
import { UpdatePostNotifications } from "./types/UpdatePostNotifications";
|
|
149
|
+
import { MultiCommunityResponse } from "./types/MultiCommunityResponse";
|
|
150
|
+
import { PersonResponse } from "./types/PersonResponse";
|
|
152
151
|
type RequestOptions = Pick<RequestInit, "signal">;
|
|
153
152
|
/**
|
|
154
153
|
* Helps build lemmy HTTP requests.
|
|
@@ -283,7 +282,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
283
282
|
/**
|
|
284
283
|
* @summary Block a community.
|
|
285
284
|
*/
|
|
286
|
-
blockCommunity(form: BlockCommunity, options?: RequestOptions): Promise<
|
|
285
|
+
blockCommunity(form: BlockCommunity, options?: RequestOptions): Promise<CommunityResponse>;
|
|
287
286
|
/**
|
|
288
287
|
* @summary Delete a community.
|
|
289
288
|
*/
|
|
@@ -495,7 +494,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
495
494
|
/**
|
|
496
495
|
* @summary Ban a person from your site.
|
|
497
496
|
*/
|
|
498
|
-
banPerson(form: BanPerson, options?: RequestOptions): Promise<
|
|
497
|
+
banPerson(form: BanPerson, options?: RequestOptions): Promise<PersonResponse>;
|
|
499
498
|
/**
|
|
500
499
|
* @summary Get a list of users.
|
|
501
500
|
*/
|
|
@@ -503,7 +502,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
503
502
|
/**
|
|
504
503
|
* @summary Block a person.
|
|
505
504
|
*/
|
|
506
|
-
blockPerson(form: BlockPerson, options?: RequestOptions): Promise<
|
|
505
|
+
blockPerson(form: BlockPerson, options?: RequestOptions): Promise<PersonResponse>;
|
|
507
506
|
/**
|
|
508
507
|
* @summary Fetch a Captcha.
|
|
509
508
|
*/
|
|
@@ -752,13 +751,13 @@ export declare class LemmyHttp extends Controller {
|
|
|
752
751
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
|
753
752
|
*/
|
|
754
753
|
donationDialogShown(options?: RequestOptions): Promise<SuccessResponse>;
|
|
755
|
-
createMultiCommunity(form: CreateMultiCommunity, options?: RequestOptions): Promise<
|
|
756
|
-
updateMultiCommunity(form: UpdateMultiCommunity, options?: RequestOptions): Promise<
|
|
754
|
+
createMultiCommunity(form: CreateMultiCommunity, options?: RequestOptions): Promise<MultiCommunityResponse>;
|
|
755
|
+
updateMultiCommunity(form: UpdateMultiCommunity, options?: RequestOptions): Promise<MultiCommunityResponse>;
|
|
757
756
|
getMultiCommunity(form: GetMultiCommunityI, options?: RequestOptions): Promise<GetMultiCommunityResponse>;
|
|
758
|
-
createMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<
|
|
757
|
+
createMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<CommunityResponse>;
|
|
759
758
|
deleteMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
|
|
760
759
|
listMultiCommunities(form: ListMultiCommunitiesI, options?: RequestOptions): Promise<ListMultiCommunitiesResponse>;
|
|
761
|
-
followMultiCommunity(form: FollowMultiCommunity, options?: RequestOptions): Promise<
|
|
760
|
+
followMultiCommunity(form: FollowMultiCommunity, options?: RequestOptions): Promise<MultiCommunityResponse>;
|
|
762
761
|
/**
|
|
763
762
|
* @summary Change notification settings for a community
|
|
764
763
|
*/
|
package/dist/http.js
CHANGED
|
@@ -1018,7 +1018,7 @@ _LemmyHttp_wrapper = async function _LemmyHttp_wrapper(type_, endpoint, form, op
|
|
|
1018
1018
|
throw new LemmyError(response.statusText, response.status);
|
|
1019
1019
|
}
|
|
1020
1020
|
if (!response.ok) {
|
|
1021
|
-
console.error(`Request error while calling ${type_} ${endpoint} with ${form}`);
|
|
1021
|
+
console.error(`Request error while calling ${type_} ${endpoint} with ${JSON.stringify(form)}`);
|
|
1022
1022
|
let err = new LemmyError(json.error ?? response.statusText, response.status, json.message);
|
|
1023
1023
|
throw err;
|
|
1024
1024
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,11 +43,8 @@ export { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
|
|
|
43
43
|
export { BanFromCommunity } from "./types/BanFromCommunity";
|
|
44
44
|
export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
|
|
45
45
|
export { BanPerson } from "./types/BanPerson";
|
|
46
|
-
export { BanPersonResponse } from "./types/BanPersonResponse";
|
|
47
46
|
export { BlockCommunity } from "./types/BlockCommunity";
|
|
48
|
-
export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
|
49
47
|
export { BlockPerson } from "./types/BlockPerson";
|
|
50
|
-
export { BlockPersonResponse } from "./types/BlockPersonResponse";
|
|
51
48
|
export { CaptchaResponse } from "./types/CaptchaResponse";
|
|
52
49
|
export { ChangePassword } from "./types/ChangePassword";
|
|
53
50
|
export { Comment } from "./types/Comment";
|
|
@@ -253,6 +250,7 @@ export { ModlogCombinedView } from "./types/ModlogCombinedView";
|
|
|
253
250
|
export { MultiCommunity } from "./types/MultiCommunity";
|
|
254
251
|
export { MultiCommunityFollow } from "./types/MultiCommunityFollow";
|
|
255
252
|
export { MultiCommunityId } from "./types/MultiCommunityId";
|
|
253
|
+
export { MultiCommunityResponse } from "./types/MultiCommunityResponse";
|
|
256
254
|
export { MultiCommunityView } from "./types/MultiCommunityView";
|
|
257
255
|
export { MyUserInfo } from "./types/MyUserInfo";
|
|
258
256
|
export { NotePerson } from "./types/NotePerson";
|
|
@@ -276,6 +274,7 @@ export { PersonContentCombinedView } from "./types/PersonContentCombinedView";
|
|
|
276
274
|
export { PersonContentType } from "./types/PersonContentType";
|
|
277
275
|
export { PersonId } from "./types/PersonId";
|
|
278
276
|
export { PersonLikedCombinedView } from "./types/PersonLikedCombinedView";
|
|
277
|
+
export { PersonResponse } from "./types/PersonResponse";
|
|
279
278
|
export { PersonSavedCombinedView } from "./types/PersonSavedCombinedView";
|
|
280
279
|
export { PersonView } from "./types/PersonView";
|
|
281
280
|
export { PluginMetadata } from "./types/PluginMetadata";
|
|
@@ -20,12 +20,10 @@ exports.AllLemmyErrors = [
|
|
|
20
20
|
"cannot_leave_mod",
|
|
21
21
|
"cannot_leave_mod",
|
|
22
22
|
"cannot_leave_mod",
|
|
23
|
-
"
|
|
24
|
-
"image_url_missing_last_path_segment",
|
|
23
|
+
"pictrs_api_key_not_provided",
|
|
25
24
|
"pictrs_api_key_not_provided",
|
|
26
25
|
"no_content_type_header",
|
|
27
26
|
"not_an_image_type",
|
|
28
|
-
"invalid_image_upload",
|
|
29
27
|
"image_upload_disabled",
|
|
30
28
|
"not_a_mod_or_admin",
|
|
31
29
|
"not_top_mod",
|
|
@@ -40,18 +40,15 @@ export type LemmyErrorType = {
|
|
|
40
40
|
} | {
|
|
41
41
|
error: "pictrs_purge_response_error";
|
|
42
42
|
message: string;
|
|
43
|
-
} | {
|
|
44
|
-
error: "image_url_missing_path_segments";
|
|
45
|
-
} | {
|
|
46
|
-
error: "image_url_missing_last_path_segment";
|
|
47
43
|
} | {
|
|
48
44
|
error: "pictrs_api_key_not_provided";
|
|
45
|
+
} | {
|
|
46
|
+
error: "pictrs_invalid_image_upload";
|
|
47
|
+
message: string;
|
|
49
48
|
} | {
|
|
50
49
|
error: "no_content_type_header";
|
|
51
50
|
} | {
|
|
52
51
|
error: "not_an_image_type";
|
|
53
|
-
} | {
|
|
54
|
-
error: "invalid_image_upload";
|
|
55
52
|
} | {
|
|
56
53
|
error: "image_upload_disabled";
|
|
57
54
|
} | {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { CommunityFollowerState } from "./CommunityFollowerState";
|
|
1
2
|
import type { MultiCommunity } from "./MultiCommunity";
|
|
2
3
|
import type { Person } from "./Person";
|
|
3
4
|
export type MultiCommunityView = {
|
|
4
5
|
multi: MultiCommunity;
|
|
6
|
+
follow_state?: CommunityFollowerState;
|
|
5
7
|
owner: Person;
|
|
6
8
|
};
|
|
@@ -9,4 +9,4 @@ export type UntranslatedError = "InvalidCommunity" | "CannotCreatePostOrCommentI
|
|
|
9
9
|
DomainNotInAllowList: string;
|
|
10
10
|
} | "FederationDisabledByStrictAllowList" | "ContradictingFilters" | "UrlWithoutDomain" | "InboxTimeout" | "CantDeleteSite" | "ObjectIsNotPublic" | "ObjectIsNotPrivate" | {
|
|
11
11
|
InvalidFollow: string;
|
|
12
|
-
} | "Unreachable" | "CouldntSendWebmention" | "CommunityHasNoFollowers";
|
|
12
|
+
} | "PurgeInvalidImageUrl" | "Unreachable" | "CouldntSendWebmention" | "CommunityHasNoFollowers";
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|