lemmy-js-client 0.19.4-alpha.16 → 0.19.4-alpha.18

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
@@ -565,6 +565,11 @@ export declare class LemmyHttp {
565
565
  * `HTTP.POST /user/login`
566
566
  */
567
567
  login(form: Login): Promise<LoginResponse>;
568
+ /**
569
+ * Invalidate the currently used auth token.
570
+ *
571
+ * `HTTP.POST /user/logout`
572
+ */
568
573
  logout(): Promise<SuccessResponse>;
569
574
  /**
570
575
  * Get the details for a person.
package/dist/http.js CHANGED
@@ -604,6 +604,11 @@ class LemmyHttp {
604
604
  login(form) {
605
605
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/login", form);
606
606
  }
607
+ /**
608
+ * Invalidate the currently used auth token.
609
+ *
610
+ * `HTTP.POST /user/logout`
611
+ */
607
612
  logout() {
608
613
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/logout", {});
609
614
  }
@@ -931,7 +936,7 @@ _LemmyHttp_apiUrl = new WeakMap(), _LemmyHttp_headers = new WeakMap(), _LemmyHtt
931
936
  };
932
937
  function encodeGetParams(p) {
933
938
  return Object.entries(p)
934
- .filter(kv => !!kv[1])
939
+ .filter(kv => kv[1] !== undefined && kv[1] !== null)
935
940
  .map(kv => kv.map(encodeURIComponent).join("="))
936
941
  .join("&");
937
942
  }
package/dist/index.d.ts CHANGED
@@ -137,6 +137,7 @@ export { ListRegistrationApplications } from "./types/ListRegistrationApplicatio
137
137
  export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
138
138
  export { ListingType } from "./types/ListingType";
139
139
  export { LocalImage } from "./types/LocalImage";
140
+ export { LocalImageView } from "./types/LocalImageView";
140
141
  export { LocalSite } from "./types/LocalSite";
141
142
  export { LocalSiteId } from "./types/LocalSiteId";
142
143
  export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
@@ -66,6 +66,26 @@ export type LemmyErrorType = {
66
66
  error: "couldnt_find_community";
67
67
  } | {
68
68
  error: "couldnt_find_person";
69
+ } | {
70
+ error: "couldnt_find_comment";
71
+ } | {
72
+ error: "couldnt_find_comment_report";
73
+ } | {
74
+ error: "couldnt_find_post_report";
75
+ } | {
76
+ error: "couldnt_find_private_message_report";
77
+ } | {
78
+ error: "couldnt_find_local_user";
79
+ } | {
80
+ error: "couldnt_find_person_mention";
81
+ } | {
82
+ error: "couldnt_find_registration_application";
83
+ } | {
84
+ error: "couldnt_find_comment_reply";
85
+ } | {
86
+ error: "couldnt_find_private_message";
87
+ } | {
88
+ error: "couldnt_find_activity";
69
89
  } | {
70
90
  error: "person_is_blocked";
71
91
  } | {
@@ -163,6 +183,8 @@ export type LemmyErrorType = {
163
183
  error: "no_community_found_in_cc";
164
184
  } | {
165
185
  error: "no_email_setup";
186
+ } | {
187
+ error: "local_site_not_setup";
166
188
  } | {
167
189
  error: "email_smtp_server_needs_a_port";
168
190
  } | {
@@ -1,4 +1,4 @@
1
- import type { LocalImage } from "./LocalImage";
1
+ import type { LocalImageView } from "./LocalImageView";
2
2
  export interface ListMediaResponse {
3
- images: Array<LocalImage>;
3
+ images: Array<LocalImageView>;
4
4
  }
@@ -0,0 +1,6 @@
1
+ import type { LocalImage } from "./LocalImage";
2
+ import type { Person } from "./Person";
3
+ export interface LocalImageView {
4
+ local_image: LocalImage;
5
+ person: Person;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,6 +12,7 @@ export interface Site {
12
12
  actor_id: string;
13
13
  last_refreshed_at: string;
14
14
  inbox_url: string;
15
+ public_key: string;
15
16
  instance_id: InstanceId;
16
17
  content_warning?: string;
17
18
  }
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": "0.19.4-alpha.16",
4
+ "version": "0.19.4-alpha.18",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",