lemmy-js-client 0.20.0-alpha.6 → 0.20.0-private-community.2

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.
Files changed (86) hide show
  1. package/dist/http.d.ts +82 -0
  2. package/dist/http.js +90 -0
  3. package/dist/index.d.ts +28 -5
  4. package/dist/types/ApproveCommunityPendingFollows.d.ts +6 -0
  5. package/dist/types/AuthenticateWithOauth.d.ts +8 -0
  6. package/dist/types/BanFromCommunity.d.ts +1 -1
  7. package/dist/types/BanPerson.d.ts +1 -1
  8. package/dist/types/CommunityFollowerState.d.ts +1 -0
  9. package/dist/types/CommunityFollowerState.js +3 -0
  10. package/dist/types/CommunityVisibility.d.ts +1 -1
  11. package/dist/types/CreateOAuthProvider.d.ts +14 -0
  12. package/dist/types/CreateOAuthProvider.js +3 -0
  13. package/dist/types/CreateSite.d.ts +11 -5
  14. package/dist/types/CreateTagline.d.ts +3 -0
  15. package/dist/types/CreateTagline.js +3 -0
  16. package/dist/types/CustomEmoji.d.ts +0 -2
  17. package/dist/types/DeleteOAuthProvider.d.ts +4 -0
  18. package/dist/types/DeleteTagline.d.ts +4 -0
  19. package/dist/types/EditOAuthProvider.d.ts +14 -0
  20. package/dist/types/EditOAuthProvider.js +2 -0
  21. package/dist/types/EditPost.d.ts +1 -0
  22. package/dist/types/EditSite.d.ts +11 -5
  23. package/dist/types/FederationMode.d.ts +1 -0
  24. package/dist/types/FederationMode.js +3 -0
  25. package/dist/types/GetCommunityPendingFollowsCount.d.ts +4 -0
  26. package/dist/types/GetCommunityPendingFollowsCount.js +2 -0
  27. package/dist/types/GetCommunityPendingFollowsCountResponse.d.ts +3 -0
  28. package/dist/types/GetCommunityPendingFollowsCountResponse.js +3 -0
  29. package/dist/types/GetPersonDetails.d.ts +2 -2
  30. package/dist/types/GetPosts.d.ts +2 -2
  31. package/dist/types/GetRandomCommunity.d.ts +4 -0
  32. package/dist/types/GetRandomCommunity.js +2 -0
  33. package/dist/types/GetSiteResponse.d.ts +7 -3
  34. package/dist/types/LemmyErrorType.d.ts +19 -31
  35. package/dist/types/ListCommunities.d.ts +2 -2
  36. package/dist/types/ListCommunityPendingFollows.d.ts +7 -0
  37. package/dist/types/ListCommunityPendingFollows.js +2 -0
  38. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +4 -0
  39. package/dist/types/ListCommunityPendingFollowsResponse.js +2 -0
  40. package/dist/types/ListCustomEmojis.d.ts +6 -0
  41. package/dist/types/ListCustomEmojis.js +3 -0
  42. package/dist/types/ListCustomEmojisResponse.d.ts +4 -0
  43. package/dist/types/ListCustomEmojisResponse.js +2 -0
  44. package/dist/types/ListLoginsResponse.d.ts +4 -0
  45. package/dist/types/ListLoginsResponse.js +2 -0
  46. package/dist/types/ListTaglines.d.ts +4 -0
  47. package/dist/types/ListTaglines.js +3 -0
  48. package/dist/types/ListTaglinesResponse.d.ts +4 -0
  49. package/dist/types/ListTaglinesResponse.js +2 -0
  50. package/dist/types/LocalSite.d.ts +10 -4
  51. package/dist/types/LocalUser.d.ts +4 -4
  52. package/dist/types/LocalUserVoteDisplayMode.d.ts +0 -2
  53. package/dist/types/LocalUserVoteDisplayMode.js +1 -0
  54. package/dist/types/MyUserInfo.d.ts +6 -6
  55. package/dist/types/OAuthAccount.d.ts +9 -0
  56. package/dist/types/OAuthAccount.js +2 -0
  57. package/dist/types/OAuthProvider.d.ts +17 -0
  58. package/dist/types/OAuthProvider.js +2 -0
  59. package/dist/types/OAuthProviderId.d.ts +1 -0
  60. package/dist/types/OAuthProviderId.js +3 -0
  61. package/dist/types/Post.d.ts +1 -1
  62. package/dist/types/PostSortType.d.ts +1 -0
  63. package/dist/types/PostSortType.js +3 -0
  64. package/dist/types/PublicOAuthProvider.d.ts +2 -0
  65. package/dist/types/PublicOAuthProvider.js +2 -0
  66. package/dist/types/SaveUserSettings.d.ts +5 -4
  67. package/dist/types/Search.d.ts +7 -2
  68. package/dist/types/SearchType.d.ts +1 -1
  69. package/dist/types/SiteResponse.d.ts +1 -2
  70. package/dist/types/Tagline.d.ts +0 -2
  71. package/dist/types/Tagline.js +1 -0
  72. package/dist/types/TaglineId.d.ts +1 -0
  73. package/dist/types/TaglineId.js +3 -0
  74. package/dist/types/TaglineResponse.d.ts +4 -0
  75. package/dist/types/TaglineResponse.js +2 -0
  76. package/dist/types/UpdateTagline.d.ts +5 -0
  77. package/dist/types/UpdateTagline.js +2 -0
  78. package/package.json +7 -7
  79. package/dist/types/CommunityBlockView.d.ts +0 -6
  80. package/dist/types/InstanceBlockView.d.ts +0 -8
  81. package/dist/types/PersonBlockView.d.ts +0 -5
  82. package/dist/types/SortType.d.ts +0 -1
  83. /package/dist/types/{CommunityBlockView.js → ApproveCommunityPendingFollows.js} +0 -0
  84. /package/dist/types/{SortType.js → AuthenticateWithOauth.js} +0 -0
  85. /package/dist/types/{InstanceBlockView.js → DeleteOAuthProvider.js} +0 -0
  86. /package/dist/types/{PersonBlockView.js → DeleteTagline.js} +0 -0
@@ -1,10 +1,10 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  import type { PersonId } from "./PersonId";
3
- import type { SortType } from "./SortType";
3
+ import type { PostSortType } from "./PostSortType";
4
4
  export interface GetPersonDetails {
5
5
  person_id?: PersonId;
6
6
  username?: string;
7
- sort?: SortType;
7
+ sort?: PostSortType;
8
8
  page?: number;
9
9
  limit?: number;
10
10
  community_id?: CommunityId;
@@ -1,10 +1,10 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  import type { ListingType } from "./ListingType";
3
3
  import type { PaginationCursor } from "./PaginationCursor";
4
- import type { SortType } from "./SortType";
4
+ import type { PostSortType } from "./PostSortType";
5
5
  export interface GetPosts {
6
6
  type_?: ListingType;
7
- sort?: SortType;
7
+ sort?: PostSortType;
8
8
  page?: number;
9
9
  limit?: number;
10
10
  community_id?: CommunityId;
@@ -0,0 +1,4 @@
1
+ import type { ListingType } from "./ListingType";
2
+ export interface GetRandomCommunity {
3
+ type_?: ListingType;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,10 @@
1
- import type { CustomEmojiView } from "./CustomEmojiView";
2
1
  import type { Language } from "./Language";
3
2
  import type { LanguageId } from "./LanguageId";
4
3
  import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
5
4
  import type { MyUserInfo } from "./MyUserInfo";
5
+ import type { OAuthProvider } from "./OAuthProvider";
6
6
  import type { PersonView } from "./PersonView";
7
+ import type { PublicOAuthProvider } from "./PublicOAuthProvider";
7
8
  import type { SiteView } from "./SiteView";
8
9
  import type { Tagline } from "./Tagline";
9
10
  export interface GetSiteResponse {
@@ -13,7 +14,10 @@ export interface GetSiteResponse {
13
14
  my_user?: MyUserInfo;
14
15
  all_languages: Array<Language>;
15
16
  discussion_languages: Array<LanguageId>;
16
- taglines: Array<Tagline>;
17
- custom_emojis: Array<CustomEmojiView>;
17
+ taglines: Array<null>;
18
+ custom_emojis: Array<null>;
19
+ tagline?: Tagline;
20
+ oauth_providers?: Array<PublicOAuthProvider>;
21
+ admin_oauth_providers?: Array<OAuthProvider>;
18
22
  blocked_urls: Array<LocalSiteUrlBlocklist>;
19
23
  }
@@ -66,30 +66,6 @@ export type LemmyErrorType = {
66
66
  error: "deleted";
67
67
  } | {
68
68
  error: "banned_from_community";
69
- } | {
70
- error: "couldnt_find_community";
71
- } | {
72
- error: "couldnt_find_person";
73
- } | {
74
- error: "couldnt_find_comment";
75
- } | {
76
- error: "couldnt_find_comment_report";
77
- } | {
78
- error: "couldnt_find_post_report";
79
- } | {
80
- error: "couldnt_find_private_message_report";
81
- } | {
82
- error: "couldnt_find_local_user";
83
- } | {
84
- error: "couldnt_find_person_mention";
85
- } | {
86
- error: "couldnt_find_registration_application";
87
- } | {
88
- error: "couldnt_find_comment_reply";
89
- } | {
90
- error: "couldnt_find_private_message";
91
- } | {
92
- error: "couldnt_find_activity";
93
69
  } | {
94
70
  error: "person_is_blocked";
95
71
  } | {
@@ -97,7 +73,7 @@ export type LemmyErrorType = {
97
73
  } | {
98
74
  error: "instance_is_blocked";
99
75
  } | {
100
- error: "downvotes_are_disabled";
76
+ error: "vote_not_allowed";
101
77
  } | {
102
78
  error: "instance_is_private";
103
79
  } | {
@@ -130,8 +106,6 @@ export type LemmyErrorType = {
130
106
  error: "couldnt_update_post";
131
107
  } | {
132
108
  error: "no_post_edit_allowed";
133
- } | {
134
- error: "couldnt_find_post";
135
109
  } | {
136
110
  error: "edit_private_message_not_allowed";
137
111
  } | {
@@ -144,8 +118,12 @@ export type LemmyErrorType = {
144
118
  error: "registration_closed";
145
119
  } | {
146
120
  error: "registration_application_answer_required";
121
+ } | {
122
+ error: "registration_username_required";
147
123
  } | {
148
124
  error: "email_already_exists";
125
+ } | {
126
+ error: "username_already_exists";
149
127
  } | {
150
128
  error: "federation_forbidden_by_strict_allow_list";
151
129
  } | {
@@ -239,8 +217,6 @@ export type LemmyErrorType = {
239
217
  error: "person_block_already_exists";
240
218
  } | {
241
219
  error: "user_already_exists";
242
- } | {
243
- error: "token_not_found";
244
220
  } | {
245
221
  error: "couldnt_like_post";
246
222
  } | {
@@ -283,8 +259,6 @@ export type LemmyErrorType = {
283
259
  error: "email_send_failed";
284
260
  } | {
285
261
  error: "slurs";
286
- } | {
287
- error: "couldnt_find_object";
288
262
  } | {
289
263
  error: "registration_denied";
290
264
  message: string | null;
@@ -334,11 +308,25 @@ export type LemmyErrorType = {
334
308
  error: "url_without_domain";
335
309
  } | {
336
310
  error: "inbox_timeout";
311
+ } | {
312
+ error: "oauth_authorization_invalid";
313
+ } | {
314
+ error: "oauth_login_failed";
315
+ } | {
316
+ error: "oauth_registration_closed";
317
+ } | {
318
+ error: "couldnt_delete_oauth_provider";
337
319
  } | {
338
320
  error: "unknown";
339
321
  message: string;
340
322
  } | {
341
323
  error: "cant_delete_site";
324
+ } | {
325
+ error: "url_length_overflow";
342
326
  } | {
343
327
  error: "post_schedule_time_must_be_in_future";
328
+ } | {
329
+ error: "too_many_scheduled_posts";
330
+ } | {
331
+ error: "not_found";
344
332
  };
@@ -1,8 +1,8 @@
1
1
  import type { ListingType } from "./ListingType";
2
- import type { SortType } from "./SortType";
2
+ import type { PostSortType } from "./PostSortType";
3
3
  export interface ListCommunities {
4
4
  type_?: ListingType;
5
- sort?: SortType;
5
+ sort?: PostSortType;
6
6
  show_nsfw?: boolean;
7
7
  page?: number;
8
8
  limit?: number;
@@ -0,0 +1,7 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ export interface ListCommunityPendingFollows {
3
+ community_id: CommunityId;
4
+ pending_only: boolean | null;
5
+ page: number | null;
6
+ limit: number | null;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { Person } from "./Person";
2
+ export interface ListCommunityPendingFollowsResponse {
3
+ items: Array<Person>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface ListCustomEmojis {
2
+ page?: number;
3
+ limit?: number;
4
+ category?: string;
5
+ ignore_page_limits?: boolean;
6
+ }
@@ -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 });
@@ -0,0 +1,4 @@
1
+ import type { CustomEmojiView } from "./CustomEmojiView";
2
+ export interface ListCustomEmojisResponse {
3
+ custom_emojis: Array<CustomEmojiView>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { LoginToken } from "./LoginToken";
2
+ export interface ListLoginsResponse {
3
+ logins: Array<LoginToken>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface ListTaglines {
2
+ page?: number;
3
+ limit?: number;
4
+ }
@@ -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 });
@@ -0,0 +1,4 @@
1
+ import type { Tagline } from "./Tagline";
2
+ export interface ListTaglinesResponse {
3
+ taglines: Array<Tagline>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +1,15 @@
1
+ import type { CommentSortType } from "./CommentSortType";
2
+ import type { FederationMode } from "./FederationMode";
1
3
  import type { ListingType } from "./ListingType";
2
4
  import type { LocalSiteId } from "./LocalSiteId";
3
5
  import type { PostListingMode } from "./PostListingMode";
6
+ import type { PostSortType } from "./PostSortType";
4
7
  import type { RegistrationMode } from "./RegistrationMode";
5
8
  import type { SiteId } from "./SiteId";
6
- import type { SortType } from "./SortType";
7
9
  export interface LocalSite {
8
10
  id: LocalSiteId;
9
11
  site_id: SiteId;
10
12
  site_setup: boolean;
11
- enable_downvotes: boolean;
12
- enable_nsfw: boolean;
13
13
  community_creation_admin_only: boolean;
14
14
  require_email_verification: boolean;
15
15
  application_question?: string;
@@ -30,5 +30,11 @@ export interface LocalSite {
30
30
  reports_email_admins: boolean;
31
31
  federation_signed_fetch: boolean;
32
32
  default_post_listing_mode: PostListingMode;
33
- default_sort_type: SortType;
33
+ default_post_sort_type: PostSortType;
34
+ default_comment_sort_type: CommentSortType;
35
+ oauth_registration: boolean;
36
+ post_upvotes: FederationMode;
37
+ post_downvotes: FederationMode;
38
+ comment_upvotes: FederationMode;
39
+ comment_downvotes: FederationMode;
34
40
  }
@@ -1,27 +1,26 @@
1
+ import type { CommentSortType } from "./CommentSortType";
1
2
  import type { ListingType } from "./ListingType";
2
3
  import type { LocalUserId } from "./LocalUserId";
3
4
  import type { PersonId } from "./PersonId";
4
5
  import type { PostListingMode } from "./PostListingMode";
5
- import type { SortType } from "./SortType";
6
+ import type { PostSortType } from "./PostSortType";
6
7
  export interface LocalUser {
7
8
  id: LocalUserId;
8
9
  person_id: PersonId;
9
10
  email?: string;
10
11
  show_nsfw: boolean;
11
12
  theme: string;
12
- default_sort_type: SortType;
13
+ default_post_sort_type: PostSortType;
13
14
  default_listing_type: ListingType;
14
15
  interface_language: string;
15
16
  show_avatars: boolean;
16
17
  send_notifications_to_email: boolean;
17
- show_scores: boolean;
18
18
  show_bot_accounts: boolean;
19
19
  show_read_posts: boolean;
20
20
  email_verified: boolean;
21
21
  accepted_application: boolean;
22
22
  open_links_in_new_tab: boolean;
23
23
  blur_nsfw: boolean;
24
- auto_expand: boolean;
25
24
  infinite_scroll_enabled: boolean;
26
25
  admin: boolean;
27
26
  post_listing_mode: PostListingMode;
@@ -29,4 +28,5 @@ export interface LocalUser {
29
28
  enable_keyboard_navigation: boolean;
30
29
  enable_animated_images: boolean;
31
30
  collapse_bot_comments: boolean;
31
+ default_comment_sort_type: CommentSortType;
32
32
  }
@@ -1,6 +1,4 @@
1
- import type { LocalUserId } from "./LocalUserId";
2
1
  export interface LocalUserVoteDisplayMode {
3
- local_user_id: LocalUserId;
4
2
  score: boolean;
5
3
  upvotes: boolean;
6
4
  downvotes: boolean;
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +1,16 @@
1
- import type { CommunityBlockView } from "./CommunityBlockView";
1
+ import type { Community } from "./Community";
2
2
  import type { CommunityFollowerView } from "./CommunityFollowerView";
3
3
  import type { CommunityModeratorView } from "./CommunityModeratorView";
4
- import type { InstanceBlockView } from "./InstanceBlockView";
4
+ import type { Instance } from "./Instance";
5
5
  import type { LanguageId } from "./LanguageId";
6
6
  import type { LocalUserView } from "./LocalUserView";
7
- import type { PersonBlockView } from "./PersonBlockView";
7
+ import type { Person } from "./Person";
8
8
  export interface MyUserInfo {
9
9
  local_user_view: LocalUserView;
10
10
  follows: Array<CommunityFollowerView>;
11
11
  moderates: Array<CommunityModeratorView>;
12
- community_blocks: Array<CommunityBlockView>;
13
- instance_blocks: Array<InstanceBlockView>;
14
- person_blocks: Array<PersonBlockView>;
12
+ community_blocks: Array<Community>;
13
+ instance_blocks: Array<Instance>;
14
+ person_blocks: Array<Person>;
15
15
  discussion_languages: Array<LanguageId>;
16
16
  }
@@ -0,0 +1,9 @@
1
+ import type { LocalUserId } from "./LocalUserId";
2
+ import type { OAuthProviderId } from "./OAuthProviderId";
3
+ export interface OAuthAccount {
4
+ local_user_id: LocalUserId;
5
+ oauth_provider_id: OAuthProviderId;
6
+ oauth_user_id: string;
7
+ published: string;
8
+ updated?: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import type { OAuthProviderId } from "./OAuthProviderId";
2
+ export interface OAuthProvider {
3
+ id: OAuthProviderId;
4
+ display_name: string;
5
+ issuer: string;
6
+ authorization_endpoint: string;
7
+ token_endpoint: string;
8
+ userinfo_endpoint: string;
9
+ id_claim: string;
10
+ client_id: string;
11
+ scopes: string;
12
+ auto_verify_email: boolean;
13
+ account_linking_enabled: boolean;
14
+ enabled: boolean;
15
+ published: string;
16
+ updated?: string;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type OAuthProviderId = number;
@@ -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 });
@@ -26,5 +26,5 @@ export interface Post {
26
26
  featured_local: boolean;
27
27
  url_content_type?: string;
28
28
  alt_text?: string;
29
- scheduled_publish_time?: number;
29
+ scheduled_publish_time?: string;
30
30
  }
@@ -0,0 +1 @@
1
+ export type PostSortType = "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" | "TopThreeMonths" | "TopSixMonths" | "TopNineMonths" | "Controversial" | "Scaled";
@@ -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 });
@@ -0,0 +1,2 @@
1
+ import type { OAuthProvider } from "./OAuthProvider";
2
+ export type PublicOAuthProvider = OAuthProvider;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +1,16 @@
1
+ import type { CommentSortType } from "./CommentSortType";
1
2
  import type { LanguageId } from "./LanguageId";
2
3
  import type { ListingType } from "./ListingType";
3
4
  import type { PostListingMode } from "./PostListingMode";
4
- import type { SortType } from "./SortType";
5
+ import type { PostSortType } from "./PostSortType";
5
6
  export interface SaveUserSettings {
6
7
  show_nsfw?: boolean;
7
8
  blur_nsfw?: boolean;
8
- auto_expand?: boolean;
9
9
  theme?: string;
10
- default_sort_type?: SortType;
11
10
  default_listing_type?: ListingType;
11
+ post_listing_mode?: PostListingMode;
12
+ default_post_sort_type?: PostSortType;
13
+ default_comment_sort_type?: CommentSortType;
12
14
  interface_language?: string;
13
15
  avatar?: string;
14
16
  banner?: string;
@@ -24,7 +26,6 @@ export interface SaveUserSettings {
24
26
  discussion_languages?: Array<LanguageId>;
25
27
  open_links_in_new_tab?: boolean;
26
28
  infinite_scroll_enabled?: boolean;
27
- post_listing_mode?: PostListingMode;
28
29
  enable_keyboard_navigation?: boolean;
29
30
  enable_animated_images?: boolean;
30
31
  collapse_bot_comments?: boolean;
@@ -1,16 +1,21 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  import type { ListingType } from "./ListingType";
3
3
  import type { PersonId } from "./PersonId";
4
+ import type { PostSortType } from "./PostSortType";
4
5
  import type { SearchType } from "./SearchType";
5
- import type { SortType } from "./SortType";
6
6
  export interface Search {
7
7
  q: string;
8
8
  community_id?: CommunityId;
9
9
  community_name?: string;
10
10
  creator_id?: PersonId;
11
11
  type_?: SearchType;
12
- sort?: SortType;
12
+ sort?: PostSortType;
13
13
  listing_type?: ListingType;
14
14
  page?: number;
15
15
  limit?: number;
16
+ title_only?: boolean;
17
+ post_url_only?: boolean;
18
+ saved_only?: boolean;
19
+ liked_only?: boolean;
20
+ disliked_only?: boolean;
16
21
  }
@@ -1 +1 @@
1
- export type SearchType = "All" | "Comments" | "Posts" | "Communities" | "Users" | "Url";
1
+ export type SearchType = "All" | "Comments" | "Posts" | "Communities" | "Users";
@@ -1,6 +1,5 @@
1
1
  import type { SiteView } from "./SiteView";
2
- import type { Tagline } from "./Tagline";
3
2
  export interface SiteResponse {
4
3
  site_view: SiteView;
5
- taglines: Array<Tagline>;
4
+ taglines: Array<null>;
6
5
  }
@@ -1,7 +1,5 @@
1
- import type { LocalSiteId } from "./LocalSiteId";
2
1
  export interface Tagline {
3
2
  id: number;
4
- local_site_id: LocalSiteId;
5
3
  content: string;
6
4
  published: string;
7
5
  updated?: string;
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type TaglineId = number;
@@ -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 });
@@ -0,0 +1,4 @@
1
+ import type { Tagline } from "./Tagline";
2
+ export interface TaglineResponse {
3
+ tagline: Tagline;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type { TaglineId } from "./TaglineId";
2
+ export interface UpdateTagline {
3
+ id: TaglineId;
4
+ content: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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.20.0-alpha.6",
4
+ "version": "0.20.0-private-community.2",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -19,10 +19,10 @@
19
19
  "url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/node": "^22.1.0",
23
- "@typescript-eslint/eslint-plugin": "^8.0.0",
24
- "@typescript-eslint/parser": "^8.0.0",
25
- "eslint": "^9.8.0",
22
+ "@types/node": "^22.7.4",
23
+ "@typescript-eslint/eslint-plugin": "^8.7.0",
24
+ "@typescript-eslint/parser": "^8.7.0",
25
+ "eslint": "^9.11.1",
26
26
  "eslint-plugin-prettier": "^5.2.1",
27
27
  "husky": "^9.1.4",
28
28
  "lint-staged": "^15.2.7",
@@ -33,9 +33,9 @@
33
33
  "sortpack": "^2.4.0",
34
34
  "typedoc": "^0.26.5",
35
35
  "typescript": "^5.5.4",
36
- "typescript-eslint": "^8.0.0"
36
+ "typescript-eslint": "^8.7.0"
37
37
  },
38
- "packageManager": "pnpm@9.9.0",
38
+ "packageManager": "pnpm@9.12.0",
39
39
  "types": "./dist/index.d.ts",
40
40
  "lint-staged": {
41
41
  "*.{ts,tsx,js}": [
@@ -1,6 +0,0 @@
1
- import type { Community } from "./Community";
2
- import type { Person } from "./Person";
3
- export interface CommunityBlockView {
4
- person: Person;
5
- community: Community;
6
- }
@@ -1,8 +0,0 @@
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
- }
@@ -1,5 +0,0 @@
1
- import type { Person } from "./Person";
2
- export interface PersonBlockView {
3
- person: Person;
4
- target: Person;
5
- }
@@ -1 +0,0 @@
1
- export type SortType = "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" | "TopThreeMonths" | "TopSixMonths" | "TopNineMonths" | "Controversial" | "Scaled";