lemmy-js-client 0.19.0-rc.10 → 0.19.0-rc.11
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 +6 -3
- package/dist/http.js +4 -4
- package/dist/index.d.ts +6 -0
- package/dist/types/BlockInstance.d.ts +6 -0
- package/dist/types/BlockInstance.js +2 -0
- package/dist/types/BlockInstanceResponse.d.ts +3 -0
- package/dist/types/BlockInstanceResponse.js +3 -0
- package/dist/types/Community.d.ts +0 -2
- package/dist/types/DeleteAccountResponse.d.ts +1 -1
- package/dist/types/GetPosts.d.ts +2 -0
- package/dist/types/GetPostsResponse.d.ts +2 -0
- package/dist/types/InstanceBlockView.d.ts +8 -0
- package/dist/types/InstanceBlockView.js +2 -0
- package/dist/types/MyUserInfo.d.ts +2 -0
- package/dist/types/PaginationCursor.d.ts +1 -0
- package/dist/types/PaginationCursor.js +3 -0
- package/dist/types/PasswordResetResponse.d.ts +1 -1
- package/dist/types/Person.d.ts +0 -1
- package/dist/types/PostAggregates.d.ts +3 -0
- package/dist/types/SortType.d.ts +1 -1
- package/dist/types/VerifyEmailResponse.d.ts +1 -1
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -31,6 +31,7 @@ import { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
|
|
31
31
|
import { CreateSite } from "./types/CreateSite";
|
32
32
|
import { CustomEmojiResponse } from "./types/CustomEmojiResponse";
|
33
33
|
import { DeleteAccount } from "./types/DeleteAccount";
|
34
|
+
import { DeleteAccountResponse } from "./types/DeleteAccountResponse";
|
34
35
|
import { DeleteComment } from "./types/DeleteComment";
|
35
36
|
import { DeleteCommunity } from "./types/DeleteCommunity";
|
36
37
|
import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
@@ -92,6 +93,7 @@ import { MarkPostAsRead } from "./types/MarkPostAsRead";
|
|
92
93
|
import { MarkPrivateMessageAsRead } from "./types/MarkPrivateMessageAsRead";
|
93
94
|
import { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
94
95
|
import { PasswordReset } from "./types/PasswordReset";
|
96
|
+
import { PasswordResetResponse } from "./types/PasswordResetResponse";
|
95
97
|
import { PersonMentionResponse } from "./types/PersonMentionResponse";
|
96
98
|
import { PostReportResponse } from "./types/PostReportResponse";
|
97
99
|
import { PostResponse } from "./types/PostResponse";
|
@@ -121,6 +123,7 @@ import { SearchResponse } from "./types/SearchResponse";
|
|
121
123
|
import { SiteResponse } from "./types/SiteResponse";
|
122
124
|
import { TransferCommunity } from "./types/TransferCommunity";
|
123
125
|
import { VerifyEmail } from "./types/VerifyEmail";
|
126
|
+
import { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
124
127
|
import { UploadImage, UploadImageResponse } from "./types/others";
|
125
128
|
import { HideCommunity } from "./types/HideCommunity";
|
126
129
|
/**
|
@@ -534,13 +537,13 @@ export declare class LemmyHttp {
|
|
534
537
|
*
|
535
538
|
* `HTTP.POST /user/delete_account`
|
536
539
|
*/
|
537
|
-
deleteAccount(form: DeleteAccount): Promise<
|
540
|
+
deleteAccount(form: DeleteAccount): Promise<DeleteAccountResponse>;
|
538
541
|
/**
|
539
542
|
* Reset your password.
|
540
543
|
*
|
541
544
|
* `HTTP.POST /user/password_reset`
|
542
545
|
*/
|
543
|
-
passwordReset(form: PasswordReset): Promise<
|
546
|
+
passwordReset(form: PasswordReset): Promise<PasswordResetResponse>;
|
544
547
|
/**
|
545
548
|
* Change your password from an email / token based reset.
|
546
549
|
*
|
@@ -582,7 +585,7 @@ export declare class LemmyHttp {
|
|
582
585
|
*
|
583
586
|
* `HTTP.POST /user/verify_email`
|
584
587
|
*/
|
585
|
-
verifyEmail(form: VerifyEmail): Promise<
|
588
|
+
verifyEmail(form: VerifyEmail): Promise<VerifyEmailResponse>;
|
586
589
|
/**
|
587
590
|
* Add an admin to your site.
|
588
591
|
*
|
package/dist/http.js
CHANGED
@@ -753,11 +753,11 @@ class LemmyHttp {
|
|
753
753
|
var _a, _b, _c, _d;
|
754
754
|
return __awaiter(this, void 0, void 0, function* () {
|
755
755
|
const formData = createFormData(image);
|
756
|
-
// If
|
756
|
+
// If auth cookie not already set by browser, set it with passed in auth
|
757
757
|
const headers = {};
|
758
|
-
if (!((_b = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.cookie) === null || _b === void 0 ? void 0 : _b.includes("
|
759
|
-
!((_d = (_c = __classPrivateFieldGet(this, _LemmyHttp_headers, "f")) === null || _c === void 0 ? void 0 : _c.Cookie) === null || _d === void 0 ? void 0 : _d.includes("
|
760
|
-
headers.Cookie = `
|
758
|
+
if (!((_b = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.cookie) === null || _b === void 0 ? void 0 : _b.includes("auth=")) &&
|
759
|
+
!((_d = (_c = __classPrivateFieldGet(this, _LemmyHttp_headers, "f")) === null || _c === void 0 ? void 0 : _c.Cookie) === null || _d === void 0 ? void 0 : _d.includes("auth="))) {
|
760
|
+
headers.Cookie = `auth=${auth}`;
|
761
761
|
}
|
762
762
|
let url = undefined;
|
763
763
|
let delete_url = undefined;
|
package/dist/index.d.ts
CHANGED
@@ -19,6 +19,8 @@ export { BanPersonResponse } from "./types/BanPersonResponse";
|
|
19
19
|
export { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
20
20
|
export { BlockCommunity } from "./types/BlockCommunity";
|
21
21
|
export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
22
|
+
export { BlockInstance } from "./types/BlockInstance";
|
23
|
+
export { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
22
24
|
export { BlockPerson } from "./types/BlockPerson";
|
23
25
|
export { BlockPersonResponse } from "./types/BlockPersonResponse";
|
24
26
|
export { CaptchaResponse } from "./types/CaptchaResponse";
|
@@ -111,9 +113,11 @@ export { HideCommunity } from "./types/HideCommunity";
|
|
111
113
|
export { ImageUpload } from "./types/ImageUpload";
|
112
114
|
export { ImageUploadId } from "./types/ImageUploadId";
|
113
115
|
export { Instance } from "./types/Instance";
|
116
|
+
export { InstanceBlockView } from "./types/InstanceBlockView";
|
114
117
|
export { InstanceId } from "./types/InstanceId";
|
115
118
|
export { Language } from "./types/Language";
|
116
119
|
export { LanguageId } from "./types/LanguageId";
|
120
|
+
export { LemmyErrorType } from "./types/LemmyErrorType";
|
117
121
|
export { ListCommentReports } from "./types/ListCommentReports";
|
118
122
|
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
|
119
123
|
export { ListCommunities } from "./types/ListCommunities";
|
@@ -163,6 +167,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
|
|
163
167
|
export { ModlogActionType } from "./types/ModlogActionType";
|
164
168
|
export { ModlogListParams } from "./types/ModlogListParams";
|
165
169
|
export { MyUserInfo } from "./types/MyUserInfo";
|
170
|
+
export { PaginationCursor } from "./types/PaginationCursor";
|
166
171
|
export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
167
172
|
export { PasswordReset } from "./types/PasswordReset";
|
168
173
|
export { PasswordResetResponse } from "./types/PasswordResetResponse";
|
@@ -233,3 +238,4 @@ export { Tagline } from "./types/Tagline";
|
|
233
238
|
export { TransferCommunity } from "./types/TransferCommunity";
|
234
239
|
export { VerifyEmail } from "./types/VerifyEmail";
|
235
240
|
export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
241
|
+
export { UploadImage, UploadImageResponse, ImageFile } from "./types/others";
|
@@ -1 +1 @@
|
|
1
|
-
export type DeleteAccountResponse =
|
1
|
+
export type DeleteAccountResponse = Record<string, never>;
|
package/dist/types/GetPosts.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
2
|
import type { ListingType } from "./ListingType";
|
3
|
+
import type { PaginationCursor } from "./PaginationCursor";
|
3
4
|
import type { SortType } from "./SortType";
|
4
5
|
export interface GetPosts {
|
5
6
|
type_?: ListingType;
|
@@ -11,4 +12,5 @@ export interface GetPosts {
|
|
11
12
|
saved_only?: boolean;
|
12
13
|
liked_only?: boolean;
|
13
14
|
disliked_only?: boolean;
|
15
|
+
page_cursor?: PaginationCursor;
|
14
16
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { CommunityBlockView } from "./CommunityBlockView";
|
2
2
|
import type { CommunityFollowerView } from "./CommunityFollowerView";
|
3
3
|
import type { CommunityModeratorView } from "./CommunityModeratorView";
|
4
|
+
import type { InstanceBlockView } from "./InstanceBlockView";
|
4
5
|
import type { LanguageId } from "./LanguageId";
|
5
6
|
import type { LocalUserView } from "./LocalUserView";
|
6
7
|
import type { PersonBlockView } from "./PersonBlockView";
|
@@ -9,6 +10,7 @@ export interface MyUserInfo {
|
|
9
10
|
follows: Array<CommunityFollowerView>;
|
10
11
|
moderates: Array<CommunityModeratorView>;
|
11
12
|
community_blocks: Array<CommunityBlockView>;
|
13
|
+
instance_blocks: Array<InstanceBlockView>;
|
12
14
|
person_blocks: Array<PersonBlockView>;
|
13
15
|
discussion_languages: Array<LanguageId>;
|
14
16
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type PaginationCursor = string;
|
@@ -1 +1 @@
|
|
1
|
-
export type PasswordResetResponse =
|
1
|
+
export type PasswordResetResponse = Record<string, never>;
|
package/dist/types/Person.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
|
+
import type { InstanceId } from "./InstanceId";
|
2
3
|
import type { PersonId } from "./PersonId";
|
3
4
|
import type { PostId } from "./PostId";
|
4
5
|
export interface PostAggregates {
|
@@ -18,4 +19,6 @@ export interface PostAggregates {
|
|
18
19
|
community_id: CommunityId;
|
19
20
|
creator_id: PersonId;
|
20
21
|
controversy_rank: number;
|
22
|
+
instance_id: InstanceId;
|
23
|
+
scaled_rank: number;
|
21
24
|
}
|
package/dist/types/SortType.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export type SortType = "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" | "TopThreeMonths" | "TopSixMonths" | "TopNineMonths" | "Controversial";
|
1
|
+
export type SortType = "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" | "TopThreeMonths" | "TopSixMonths" | "TopNineMonths" | "Controversial" | "Scaled";
|
@@ -1 +1 @@
|
|
1
|
-
export type VerifyEmailResponse =
|
1
|
+
export type VerifyEmailResponse = Record<string, never>;
|
package/package.json
CHANGED