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 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<null>;
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<null>;
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<null>;
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 jwt cookie not already set by browser, set it with passed in auth
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("jwt=")) &&
759
- !((_d = (_c = __classPrivateFieldGet(this, _LemmyHttp_headers, "f")) === null || _c === void 0 ? void 0 : _c.Cookie) === null || _d === void 0 ? void 0 : _d.includes("jwt="))) {
760
- headers.Cookie = `jwt=${auth}`;
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";
@@ -0,0 +1,6 @@
1
+ import type { InstanceId } from "./InstanceId";
2
+ export interface BlockInstance {
3
+ instance_id: InstanceId;
4
+ block: boolean;
5
+ auth: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface BlockInstanceResponse {
2
+ blocked: boolean;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -14,8 +14,6 @@ export interface Community {
14
14
  local: boolean;
15
15
  icon?: string;
16
16
  banner?: string;
17
- followers_url: string;
18
- inbox_url: string;
19
17
  hidden: boolean;
20
18
  posting_restricted_to_mods: boolean;
21
19
  instance_id: InstanceId;
@@ -1 +1 @@
1
- export type DeleteAccountResponse = null;
1
+ export type DeleteAccountResponse = Record<string, never>;
@@ -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,4 +1,6 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
1
2
  import type { PostView } from "./PostView";
2
3
  export interface GetPostsResponse {
3
4
  posts: Array<PostView>;
5
+ next_page?: PaginationCursor;
4
6
  }
@@ -0,0 +1,8 @@
1
+ import type { Instance } from "./Instance";
2
+ import type { Person } from "./Person";
3
+ import type { Site } from "./Site";
4
+ export interface InstanceBlockView {
5
+ person: Person;
6
+ instance: Instance;
7
+ site?: Site;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- export type PasswordResetResponse = null;
1
+ export type PasswordResetResponse = Record<string, never>;
@@ -13,7 +13,6 @@ export interface Person {
13
13
  local: boolean;
14
14
  banner?: string;
15
15
  deleted: boolean;
16
- inbox_url: string;
17
16
  matrix_user_id?: string;
18
17
  bot_account: boolean;
19
18
  ban_expires?: string;
@@ -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
  }
@@ -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 = null;
1
+ export type VerifyEmailResponse = Record<string, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
- "version": "0.19.0-rc.10",
3
+ "version": "0.19.0-rc.11",
4
4
  "description": "A javascript / typescript client for Lemmy",
5
5
  "repository": "https://github.com/LemmyNet/lemmy-js-client",
6
6
  "license": "AGPL-3.0",