lemmy-js-client 0.18.1-rc.1 → 0.18.1-rc.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
@@ -141,7 +141,7 @@ export declare class LemmyHttp {
141
141
  * @param headers optional headers. Should contain `x-real-ip` and `x-forwarded-for` .
142
142
  */
143
143
  constructor(baseUrl: string, options?: {
144
- fetchFunction: typeof fetch;
144
+ fetchFunction?: typeof fetch;
145
145
  headers?: {
146
146
  [key: string]: string;
147
147
  };
package/dist/http.js CHANGED
@@ -766,6 +766,9 @@ class LemmyHttp {
766
766
  body: formData,
767
767
  headers: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _LemmyHttp_headers, "f")), headers),
768
768
  });
769
+ if (response.status === 413) {
770
+ return { msg: "too_large" };
771
+ }
769
772
  const responseJson = yield response.json();
770
773
  if (responseJson.msg === "ok") {
771
774
  const { file: hash, delete_token: deleteToken } = responseJson.files[0];
@@ -14,6 +14,8 @@ export interface Community {
14
14
  local: boolean;
15
15
  icon?: string;
16
16
  banner?: string;
17
+ followers_url: string;
18
+ inbox_url: string;
17
19
  hidden: boolean;
18
20
  posting_restricted_to_mods: boolean;
19
21
  instance_id: InstanceId;
@@ -3,6 +3,7 @@ import type { SortType } from "./SortType";
3
3
  export interface ListCommunities {
4
4
  type_?: ListingType;
5
5
  sort?: SortType;
6
+ show_nsfw?: boolean;
6
7
  page?: number;
7
8
  limit?: number;
8
9
  auth?: string;
@@ -21,4 +21,5 @@ export interface LocalUser {
21
21
  email_verified: boolean;
22
22
  accepted_application: boolean;
23
23
  totp_2fa_url?: string;
24
+ open_links_in_new_tab: boolean;
24
25
  }
@@ -13,6 +13,7 @@ export interface Person {
13
13
  local: boolean;
14
14
  banner?: string;
15
15
  deleted: boolean;
16
+ inbox_url: string;
16
17
  matrix_user_id?: string;
17
18
  admin: boolean;
18
19
  bot_account: boolean;
@@ -23,4 +23,5 @@ export interface SaveUserSettings {
23
23
  discussion_languages?: Array<LanguageId>;
24
24
  generate_totp_2fa?: boolean;
25
25
  auth: string;
26
+ open_links_in_new_tab?: boolean;
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
- "version": "0.18.1-rc.1",
3
+ "version": "0.18.1-rc.3",
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",