lemmy-js-client 0.20.0-alpha.1 → 0.20.0-alpha.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/dist/http.d.ts +36 -0
  2. package/dist/http.js +41 -1
  3. package/dist/index.d.ts +24 -6
  4. package/dist/other_types.d.ts +0 -1
  5. package/dist/types/ApproveRegistrationApplication.d.ts +2 -1
  6. package/dist/types/ApproveRegistrationApplication.js +0 -1
  7. package/dist/types/AuthenticateWithOauth.d.ts +8 -0
  8. package/dist/types/CreateOAuthProvider.d.ts +14 -0
  9. package/dist/types/CreateSite.d.ts +6 -4
  10. package/dist/types/CreateTagline.d.ts +3 -0
  11. package/dist/types/CreateTagline.js +3 -0
  12. package/dist/types/CustomEmoji.d.ts +0 -2
  13. package/dist/types/DeleteOAuthProvider.d.ts +4 -0
  14. package/dist/types/DeleteTagline.d.ts +4 -0
  15. package/dist/types/EditOAuthProvider.d.ts +14 -0
  16. package/dist/types/EditSite.d.ts +6 -4
  17. package/dist/types/GetPersonDetails.d.ts +2 -2
  18. package/dist/types/GetPosts.d.ts +4 -2
  19. package/dist/types/GetRegistrationApplication.d.ts +4 -0
  20. package/dist/types/GetRegistrationApplication.js +2 -0
  21. package/dist/types/GetSiteResponse.d.ts +5 -3
  22. package/dist/types/ImageDetails.d.ts +6 -0
  23. package/dist/types/ImageDetails.js +3 -0
  24. package/dist/types/LemmyErrorType.d.ts +22 -30
  25. package/dist/types/ListCommunities.d.ts +2 -2
  26. package/dist/types/ListCustomEmojis.d.ts +6 -0
  27. package/dist/types/ListCustomEmojis.js +3 -0
  28. package/dist/types/ListCustomEmojisResponse.d.ts +4 -0
  29. package/dist/types/ListCustomEmojisResponse.js +2 -0
  30. package/dist/types/ListLoginsResponse.d.ts +4 -0
  31. package/dist/types/ListLoginsResponse.js +2 -0
  32. package/dist/types/ListTaglines.d.ts +4 -0
  33. package/dist/types/ListTaglines.js +3 -0
  34. package/dist/types/ListTaglinesResponse.d.ts +4 -0
  35. package/dist/types/ListTaglinesResponse.js +2 -0
  36. package/dist/types/LocalSite.d.ts +5 -3
  37. package/dist/types/LocalUser.d.ts +4 -3
  38. package/dist/types/LocalUserVoteDisplayMode.d.ts +0 -2
  39. package/dist/types/LocalUserVoteDisplayMode.js +1 -0
  40. package/dist/types/MyUserInfo.d.ts +6 -6
  41. package/dist/types/OAuthAccount.d.ts +9 -0
  42. package/dist/types/OAuthAccount.js +2 -0
  43. package/dist/types/OAuthProvider.d.ts +17 -0
  44. package/dist/types/OAuthProvider.js +2 -0
  45. package/dist/types/OAuthProviderId.d.ts +1 -0
  46. package/dist/types/OAuthProviderId.js +3 -0
  47. package/dist/types/OAuthProviderInsertForm.d.ts +14 -0
  48. package/dist/types/OAuthProviderInsertForm.js +3 -0
  49. package/dist/types/OAuthProviderUpdateForm.d.ts +13 -0
  50. package/dist/types/OAuthProviderUpdateForm.js +3 -0
  51. package/dist/types/PostSortType.d.ts +1 -0
  52. package/dist/types/PostSortType.js +3 -0
  53. package/dist/types/PostView.d.ts +2 -0
  54. package/dist/types/PublicOAuthProvider.d.ts +2 -0
  55. package/dist/types/PublicOAuthProvider.js +2 -0
  56. package/dist/types/RegistrationApplication.d.ts +2 -1
  57. package/dist/types/RegistrationApplicationId.d.ts +1 -0
  58. package/dist/types/RegistrationApplicationId.js +3 -0
  59. package/dist/types/SaveUserSettings.d.ts +5 -3
  60. package/dist/types/Search.d.ts +3 -2
  61. package/dist/types/SiteResponse.d.ts +0 -2
  62. package/dist/types/Tagline.d.ts +0 -2
  63. package/dist/types/Tagline.js +1 -0
  64. package/dist/types/TaglineId.d.ts +1 -0
  65. package/dist/types/TaglineId.js +3 -0
  66. package/dist/types/TaglineResponse.d.ts +4 -0
  67. package/dist/types/TaglineResponse.js +2 -0
  68. package/dist/types/UpdateTagline.d.ts +5 -0
  69. package/dist/types/UpdateTagline.js +2 -0
  70. package/package.json +15 -15
  71. package/dist/types/CommunityBlockView.d.ts +0 -6
  72. package/dist/types/InstanceBlockView.d.ts +0 -8
  73. package/dist/types/PersonBlockId.d.ts +0 -1
  74. package/dist/types/PersonBlockView.d.ts +0 -5
  75. package/dist/types/SortType.d.ts +0 -1
  76. /package/dist/types/{PersonBlockId.js → AuthenticateWithOauth.js} +0 -0
  77. /package/dist/types/{SortType.js → CreateOAuthProvider.js} +0 -0
  78. /package/dist/types/{CommunityBlockView.js → DeleteOAuthProvider.js} +0 -0
  79. /package/dist/types/{InstanceBlockView.js → DeleteTagline.js} +0 -0
  80. /package/dist/types/{PersonBlockView.js → EditOAuthProvider.js} +0 -0
package/dist/http.d.ts CHANGED
@@ -22,6 +22,7 @@ import { CreateCommentLike } from "./types/CreateCommentLike";
22
22
  import { CreateCommentReport } from "./types/CreateCommentReport";
23
23
  import { CreateCommunity } from "./types/CreateCommunity";
24
24
  import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
25
+ import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
25
26
  import { CreatePost } from "./types/CreatePost";
26
27
  import { CreatePostLike } from "./types/CreatePostLike";
27
28
  import { CreatePostReport } from "./types/CreatePostReport";
@@ -33,15 +34,18 @@ import { DeleteAccount } from "./types/DeleteAccount";
33
34
  import { DeleteComment } from "./types/DeleteComment";
34
35
  import { DeleteCommunity } from "./types/DeleteCommunity";
35
36
  import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
37
+ import { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
36
38
  import { DeletePost } from "./types/DeletePost";
37
39
  import { DeletePrivateMessage } from "./types/DeletePrivateMessage";
38
40
  import { DistinguishComment } from "./types/DistinguishComment";
39
41
  import { EditComment } from "./types/EditComment";
40
42
  import { EditCommunity } from "./types/EditCommunity";
41
43
  import { EditCustomEmoji } from "./types/EditCustomEmoji";
44
+ import { EditOAuthProvider } from "./types/EditOAuthProvider";
42
45
  import { EditPost } from "./types/EditPost";
43
46
  import { EditPrivateMessage } from "./types/EditPrivateMessage";
44
47
  import { EditSite } from "./types/EditSite";
48
+ import { OAuthProvider } from "./types/OAuthProvider";
45
49
  import { FeaturePost } from "./types/FeaturePost";
46
50
  import { FollowCommunity } from "./types/FollowCommunity";
47
51
  import { GetCaptchaResponse } from "./types/GetCaptchaResponse";
@@ -134,6 +138,8 @@ import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
134
138
  import { HidePost } from "./types/HidePost";
135
139
  import { ListMedia } from "./types/ListMedia";
136
140
  import { ListMediaResponse } from "./types/ListMediaResponse";
141
+ import { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
142
+ import { GetRegistrationApplication } from "./types/GetRegistrationApplication";
137
143
  /**
138
144
  * Helps build lemmy HTTP requests.
139
145
  */
@@ -697,6 +703,12 @@ export declare class LemmyHttp {
697
703
  * `HTTP.PUT /admin/registration_application/approve`
698
704
  */
699
705
  approveRegistrationApplication(form: ApproveRegistrationApplication): Promise<RegistrationApplicationResponse>;
706
+ /**
707
+ * Get the application a user submitted when they first registered their account
708
+ *
709
+ * `HTTP.GET /admin/registration_application`
710
+ */
711
+ getRegistrationApplication(form: GetRegistrationApplication): Promise<RegistrationApplicationResponse>;
700
712
  /**
701
713
  * Purge / Delete a person from the database.
702
714
  *
@@ -739,6 +751,30 @@ export declare class LemmyHttp {
739
751
  * `HTTP.Post /custom_emoji/delete`
740
752
  */
741
753
  deleteCustomEmoji(form: DeleteCustomEmoji): Promise<SuccessResponse>;
754
+ /**
755
+ * Create a new oauth provider method
756
+ *
757
+ * `HTTP.POST /oauth_provider`
758
+ */
759
+ createOAuthProvider(form: CreateOAuthProvider): Promise<OAuthProvider>;
760
+ /**
761
+ * Edit an existing oauth provider method
762
+ *
763
+ * `HTTP.PUT /oauth_provider`
764
+ */
765
+ editOAuthProvider(form: EditOAuthProvider): Promise<OAuthProvider>;
766
+ /**
767
+ * Delete an oauth provider method
768
+ *
769
+ * `HTTP.Post /oauth_provider/delete`
770
+ */
771
+ deleteOAuthProvider(form: DeleteOAuthProvider): Promise<SuccessResponse>;
772
+ /**
773
+ * Authenticate with OAuth
774
+ *
775
+ * `HTTP.Post /oauth/authenticate`
776
+ */
777
+ authenticateWithOAuth(form: AuthenticateWithOauth): Promise<LoginResponse>;
742
778
  /**
743
779
  * Fetch federated instances.
744
780
  *
package/dist/http.js CHANGED
@@ -780,6 +780,14 @@ class LemmyHttp {
780
780
  approveRegistrationApplication(form) {
781
781
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/registration_application/approve", form);
782
782
  }
783
+ /**
784
+ * Get the application a user submitted when they first registered their account
785
+ *
786
+ * `HTTP.GET /admin/registration_application`
787
+ */
788
+ getRegistrationApplication(form) {
789
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application", form);
790
+ }
783
791
  /**
784
792
  * Purge / Delete a person from the database.
785
793
  *
@@ -836,6 +844,38 @@ class LemmyHttp {
836
844
  deleteCustomEmoji(form) {
837
845
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form);
838
846
  }
847
+ /**
848
+ * Create a new oauth provider method
849
+ *
850
+ * `HTTP.POST /oauth_provider`
851
+ */
852
+ createOAuthProvider(form) {
853
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider", form);
854
+ }
855
+ /**
856
+ * Edit an existing oauth provider method
857
+ *
858
+ * `HTTP.PUT /oauth_provider`
859
+ */
860
+ editOAuthProvider(form) {
861
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/oauth_provider", form);
862
+ }
863
+ /**
864
+ * Delete an oauth provider method
865
+ *
866
+ * `HTTP.Post /oauth_provider/delete`
867
+ */
868
+ deleteOAuthProvider(form) {
869
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth_provider/delete", form);
870
+ }
871
+ /**
872
+ * Authenticate with OAuth
873
+ *
874
+ * `HTTP.Post /oauth/authenticate`
875
+ */
876
+ authenticateWithOAuth(form) {
877
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/oauth/authenticate", form);
878
+ }
839
879
  /**
840
880
  * Fetch federated instances.
841
881
  *
@@ -923,7 +963,7 @@ _LemmyHttp_apiUrl = new WeakMap(), _LemmyHttp_headers = new WeakMap(), _LemmyHtt
923
963
  try {
924
964
  json = yield response.json();
925
965
  }
926
- catch (error) {
966
+ catch (_b) {
927
967
  throw new Error(response.statusText);
928
968
  }
929
969
  if (!response.ok) {
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export { AdminPurgePersonView } from "./types/AdminPurgePersonView";
13
13
  export { AdminPurgePost } from "./types/AdminPurgePost";
14
14
  export { AdminPurgePostView } from "./types/AdminPurgePostView";
15
15
  export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
16
+ export { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
16
17
  export { BanFromCommunity } from "./types/BanFromCommunity";
17
18
  export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
18
19
  export { BanPerson } from "./types/BanPerson";
@@ -42,7 +43,6 @@ export { CommentSortType } from "./types/CommentSortType";
42
43
  export { CommentView } from "./types/CommentView";
43
44
  export { Community } from "./types/Community";
44
45
  export { CommunityAggregates } from "./types/CommunityAggregates";
45
- export { CommunityBlockView } from "./types/CommunityBlockView";
46
46
  export { CommunityFollowerView } from "./types/CommunityFollowerView";
47
47
  export { CommunityId } from "./types/CommunityId";
48
48
  export { CommunityModeratorView } from "./types/CommunityModeratorView";
@@ -54,12 +54,14 @@ export { CreateCommentLike } from "./types/CreateCommentLike";
54
54
  export { CreateCommentReport } from "./types/CreateCommentReport";
55
55
  export { CreateCommunity } from "./types/CreateCommunity";
56
56
  export { CreateCustomEmoji } from "./types/CreateCustomEmoji";
57
+ export { CreateOAuthProvider } from "./types/CreateOAuthProvider";
57
58
  export { CreatePost } from "./types/CreatePost";
58
59
  export { CreatePostLike } from "./types/CreatePostLike";
59
60
  export { CreatePostReport } from "./types/CreatePostReport";
60
61
  export { CreatePrivateMessage } from "./types/CreatePrivateMessage";
61
62
  export { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
62
63
  export { CreateSite } from "./types/CreateSite";
64
+ export { CreateTagline } from "./types/CreateTagline";
63
65
  export { CustomEmoji } from "./types/CustomEmoji";
64
66
  export { CustomEmojiId } from "./types/CustomEmojiId";
65
67
  export { CustomEmojiKeyword } from "./types/CustomEmojiKeyword";
@@ -69,12 +71,15 @@ export { DeleteAccount } from "./types/DeleteAccount";
69
71
  export { DeleteComment } from "./types/DeleteComment";
70
72
  export { DeleteCommunity } from "./types/DeleteCommunity";
71
73
  export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
74
+ export { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
72
75
  export { DeletePost } from "./types/DeletePost";
73
76
  export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
77
+ export { DeleteTagline } from "./types/DeleteTagline";
74
78
  export { DistinguishComment } from "./types/DistinguishComment";
75
79
  export { EditComment } from "./types/EditComment";
76
80
  export { EditCommunity } from "./types/EditCommunity";
77
81
  export { EditCustomEmoji } from "./types/EditCustomEmoji";
82
+ export { EditOAuthProvider } from "./types/EditOAuthProvider";
78
83
  export { EditPost } from "./types/EditPost";
79
84
  export { EditPrivateMessage } from "./types/EditPrivateMessage";
80
85
  export { EditSite } from "./types/EditSite";
@@ -100,6 +105,7 @@ export { GetPostResponse } from "./types/GetPostResponse";
100
105
  export { GetPosts } from "./types/GetPosts";
101
106
  export { GetPostsResponse } from "./types/GetPostsResponse";
102
107
  export { GetPrivateMessages } from "./types/GetPrivateMessages";
108
+ export { GetRegistrationApplication } from "./types/GetRegistrationApplication";
103
109
  export { GetReplies } from "./types/GetReplies";
104
110
  export { GetRepliesResponse } from "./types/GetRepliesResponse";
105
111
  export { GetReportCount } from "./types/GetReportCount";
@@ -111,8 +117,8 @@ export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
111
117
  export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
112
118
  export { HideCommunity } from "./types/HideCommunity";
113
119
  export { HidePost } from "./types/HidePost";
120
+ export { ImageDetails } from "./types/ImageDetails";
114
121
  export { Instance } from "./types/Instance";
115
- export { InstanceBlockView } from "./types/InstanceBlockView";
116
122
  export { InstanceId } from "./types/InstanceId";
117
123
  export { InstanceWithFederationState } from "./types/InstanceWithFederationState";
118
124
  export { Language } from "./types/Language";
@@ -125,6 +131,9 @@ export { ListCommentReports } from "./types/ListCommentReports";
125
131
  export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
126
132
  export { ListCommunities } from "./types/ListCommunities";
127
133
  export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
134
+ export { ListCustomEmojis } from "./types/ListCustomEmojis";
135
+ export { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
136
+ export { ListLoginsResponse } from "./types/ListLoginsResponse";
128
137
  export { ListMedia } from "./types/ListMedia";
129
138
  export { ListMediaResponse } from "./types/ListMediaResponse";
130
139
  export { ListPostLikes } from "./types/ListPostLikes";
@@ -135,6 +144,8 @@ export { ListPrivateMessageReports } from "./types/ListPrivateMessageReports";
135
144
  export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageReportsResponse";
136
145
  export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
137
146
  export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
147
+ export { ListTaglines } from "./types/ListTaglines";
148
+ export { ListTaglinesResponse } from "./types/ListTaglinesResponse";
138
149
  export { ListingType } from "./types/ListingType";
139
150
  export { LocalImage } from "./types/LocalImage";
140
151
  export { LocalImageView } from "./types/LocalImageView";
@@ -179,14 +190,17 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
179
190
  export { ModlogActionType } from "./types/ModlogActionType";
180
191
  export { ModlogListParams } from "./types/ModlogListParams";
181
192
  export { MyUserInfo } from "./types/MyUserInfo";
193
+ export { OAuthAccount } from "./types/OAuthAccount";
194
+ export { OAuthProvider } from "./types/OAuthProvider";
195
+ export { OAuthProviderId } from "./types/OAuthProviderId";
196
+ export { OAuthProviderInsertForm } from "./types/OAuthProviderInsertForm";
197
+ export { OAuthProviderUpdateForm } from "./types/OAuthProviderUpdateForm";
182
198
  export { OpenGraphData } from "./types/OpenGraphData";
183
199
  export { PaginationCursor } from "./types/PaginationCursor";
184
200
  export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
185
201
  export { PasswordReset } from "./types/PasswordReset";
186
202
  export { Person } from "./types/Person";
187
203
  export { PersonAggregates } from "./types/PersonAggregates";
188
- export { PersonBlockId } from "./types/PersonBlockId";
189
- export { PersonBlockView } from "./types/PersonBlockView";
190
204
  export { PersonId } from "./types/PersonId";
191
205
  export { PersonMention } from "./types/PersonMention";
192
206
  export { PersonMentionId } from "./types/PersonMentionId";
@@ -203,6 +217,7 @@ export { PostReportId } from "./types/PostReportId";
203
217
  export { PostReportResponse } from "./types/PostReportResponse";
204
218
  export { PostReportView } from "./types/PostReportView";
205
219
  export { PostResponse } from "./types/PostResponse";
220
+ export { PostSortType } from "./types/PostSortType";
206
221
  export { PostView } from "./types/PostView";
207
222
  export { PrivateMessage } from "./types/PrivateMessage";
208
223
  export { PrivateMessageId } from "./types/PrivateMessageId";
@@ -213,6 +228,7 @@ export { PrivateMessageReportView } from "./types/PrivateMessageReportView";
213
228
  export { PrivateMessageResponse } from "./types/PrivateMessageResponse";
214
229
  export { PrivateMessageView } from "./types/PrivateMessageView";
215
230
  export { PrivateMessagesResponse } from "./types/PrivateMessagesResponse";
231
+ export { PublicOAuthProvider } from "./types/PublicOAuthProvider";
216
232
  export { PurgeComment } from "./types/PurgeComment";
217
233
  export { PurgeCommunity } from "./types/PurgeCommunity";
218
234
  export { PurgePerson } from "./types/PurgePerson";
@@ -220,6 +236,7 @@ export { PurgePost } from "./types/PurgePost";
220
236
  export { ReadableFederationState } from "./types/ReadableFederationState";
221
237
  export { Register } from "./types/Register";
222
238
  export { RegistrationApplication } from "./types/RegistrationApplication";
239
+ export { RegistrationApplicationId } from "./types/RegistrationApplicationId";
223
240
  export { RegistrationApplicationResponse } from "./types/RegistrationApplicationResponse";
224
241
  export { RegistrationApplicationView } from "./types/RegistrationApplicationView";
225
242
  export { RegistrationMode } from "./types/RegistrationMode";
@@ -242,13 +259,14 @@ export { SiteAggregates } from "./types/SiteAggregates";
242
259
  export { SiteId } from "./types/SiteId";
243
260
  export { SiteResponse } from "./types/SiteResponse";
244
261
  export { SiteView } from "./types/SiteView";
245
- export { SortType } from "./types/SortType";
246
262
  export { SubscribedType } from "./types/SubscribedType";
247
263
  export { SuccessResponse } from "./types/SuccessResponse";
248
264
  export { Tagline } from "./types/Tagline";
265
+ export { TaglineId } from "./types/TaglineId";
266
+ export { TaglineResponse } from "./types/TaglineResponse";
249
267
  export { TransferCommunity } from "./types/TransferCommunity";
268
+ export { UpdateTagline } from "./types/UpdateTagline";
250
269
  export { UpdateTotp } from "./types/UpdateTotp";
251
270
  export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
252
271
  export { VerifyEmail } from "./types/VerifyEmail";
253
272
  export { VoteView } from "./types/VoteView";
254
- export { UploadImage, UploadImageResponse, ImageFile, DeleteImage, } from "./other_types";
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export declare const VERSION = "v3";
3
2
  export interface UploadImage {
4
3
  image: File | Buffer;
@@ -1,5 +1,6 @@
1
+ import type { RegistrationApplicationId } from "./RegistrationApplicationId";
1
2
  export interface ApproveRegistrationApplication {
2
- id: number;
3
+ id: RegistrationApplicationId;
3
4
  approve: boolean;
4
5
  deny_reason?: string;
5
6
  }
@@ -1,3 +1,2 @@
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.
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface AuthenticateWithOauth {
2
+ code: string;
3
+ oauth_provider_id: string;
4
+ redirect_uri: string;
5
+ show_nsfw?: boolean;
6
+ username?: string;
7
+ answer?: string;
8
+ }
@@ -0,0 +1,14 @@
1
+ export interface CreateOAuthProvider {
2
+ display_name: string;
3
+ issuer: string;
4
+ authorization_endpoint: string;
5
+ token_endpoint: string;
6
+ userinfo_endpoint: string;
7
+ id_claim: string;
8
+ client_id: string;
9
+ client_secret: string;
10
+ scopes: string;
11
+ auto_verify_email: boolean;
12
+ account_linking_enabled: boolean;
13
+ enabled: boolean;
14
+ }
@@ -1,8 +1,9 @@
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";
5
+ import type { PostSortType } from "./PostSortType";
4
6
  import type { RegistrationMode } from "./RegistrationMode";
5
- import type { SortType } from "./SortType";
6
7
  export interface CreateSite {
7
8
  name: string;
8
9
  sidebar?: string;
@@ -17,7 +18,9 @@ export interface CreateSite {
17
18
  private_instance?: boolean;
18
19
  default_theme?: string;
19
20
  default_post_listing_type?: ListingType;
20
- default_sort_type?: SortType;
21
+ default_post_listing_mode?: PostListingMode;
22
+ default_post_sort_type?: PostSortType;
23
+ default_comment_sort_type?: CommentSortType;
21
24
  legal_information?: string;
22
25
  application_email_admins?: boolean;
23
26
  hide_modlog_mod_names?: boolean;
@@ -42,8 +45,7 @@ export interface CreateSite {
42
45
  captcha_difficulty?: string;
43
46
  allowed_instances?: Array<string>;
44
47
  blocked_instances?: Array<string>;
45
- taglines?: Array<string>;
46
48
  registration_mode?: RegistrationMode;
49
+ oauth_registration?: boolean;
47
50
  content_warning?: string;
48
- default_post_listing_mode?: PostListingMode;
49
51
  }
@@ -0,0 +1,3 @@
1
+ export interface CreateTagline {
2
+ content: string;
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 });
@@ -1,8 +1,6 @@
1
1
  import type { CustomEmojiId } from "./CustomEmojiId";
2
- import type { LocalSiteId } from "./LocalSiteId";
3
2
  export interface CustomEmoji {
4
3
  id: CustomEmojiId;
5
- local_site_id: LocalSiteId;
6
4
  shortcode: string;
7
5
  image_url: string;
8
6
  alt_text: string;
@@ -0,0 +1,4 @@
1
+ import type { OAuthProviderId } from "./OAuthProviderId";
2
+ export interface DeleteOAuthProvider {
3
+ id: OAuthProviderId;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { TaglineId } from "./TaglineId";
2
+ export interface DeleteTagline {
3
+ id: TaglineId;
4
+ }
@@ -0,0 +1,14 @@
1
+ import type { OAuthProviderId } from "./OAuthProviderId";
2
+ export interface EditOAuthProvider {
3
+ id: OAuthProviderId;
4
+ display_name: string | null;
5
+ authorization_endpoint: string | null;
6
+ token_endpoint: string | null;
7
+ userinfo_endpoint: string | null;
8
+ id_claim: string | null;
9
+ client_secret: string | null;
10
+ scopes: string | null;
11
+ auto_verify_email: boolean | null;
12
+ account_linking_enabled: boolean | null;
13
+ enabled: boolean | null;
14
+ }
@@ -1,8 +1,9 @@
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";
5
+ import type { PostSortType } from "./PostSortType";
4
6
  import type { RegistrationMode } from "./RegistrationMode";
5
- import type { SortType } from "./SortType";
6
7
  export interface EditSite {
7
8
  name?: string;
8
9
  sidebar?: string;
@@ -17,7 +18,9 @@ export interface EditSite {
17
18
  private_instance?: boolean;
18
19
  default_theme?: string;
19
20
  default_post_listing_type?: ListingType;
20
- default_sort_type?: SortType;
21
+ default_post_listing_mode?: PostListingMode;
22
+ default_post_sort_type?: PostSortType;
23
+ default_comment_sort_type?: CommentSortType;
21
24
  legal_information?: string;
22
25
  application_email_admins?: boolean;
23
26
  hide_modlog_mod_names?: boolean;
@@ -43,9 +46,8 @@ export interface EditSite {
43
46
  allowed_instances?: Array<string>;
44
47
  blocked_instances?: Array<string>;
45
48
  blocked_urls?: Array<string>;
46
- taglines?: Array<string>;
47
49
  registration_mode?: RegistrationMode;
50
+ oauth_registration?: boolean;
48
51
  reports_email_admins?: boolean;
49
52
  content_warning?: string;
50
- default_post_listing_mode?: PostListingMode;
51
53
  }
@@ -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;
@@ -13,5 +13,7 @@ export interface GetPosts {
13
13
  liked_only?: boolean;
14
14
  disliked_only?: boolean;
15
15
  show_hidden?: boolean;
16
+ show_read?: boolean;
17
+ show_nsfw?: boolean;
16
18
  page_cursor?: PaginationCursor;
17
19
  }
@@ -0,0 +1,4 @@
1
+ import type { PersonId } from "./PersonId";
2
+ export interface GetRegistrationApplication {
3
+ person_id: PersonId;
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,8 @@ 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
+ tagline?: Tagline;
18
+ oauth_providers?: Array<PublicOAuthProvider>;
19
+ admin_oauth_providers?: Array<OAuthProvider>;
18
20
  blocked_urls: Array<LocalSiteUrlBlocklist>;
19
21
  }
@@ -0,0 +1,6 @@
1
+ export interface ImageDetails {
2
+ link: string;
3
+ width: number;
4
+ height: number;
5
+ content_type: string;
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 });
@@ -56,36 +56,16 @@ export type LemmyErrorType = {
56
56
  error: "not_top_mod";
57
57
  } | {
58
58
  error: "not_logged_in";
59
+ } | {
60
+ error: "not_higher_mod";
61
+ } | {
62
+ error: "not_higher_admin";
59
63
  } | {
60
64
  error: "site_ban";
61
65
  } | {
62
66
  error: "deleted";
63
67
  } | {
64
68
  error: "banned_from_community";
65
- } | {
66
- error: "couldnt_find_community";
67
- } | {
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";
89
69
  } | {
90
70
  error: "person_is_blocked";
91
71
  } | {
@@ -126,8 +106,6 @@ export type LemmyErrorType = {
126
106
  error: "couldnt_update_post";
127
107
  } | {
128
108
  error: "no_post_edit_allowed";
129
- } | {
130
- error: "couldnt_find_post";
131
109
  } | {
132
110
  error: "edit_private_message_not_allowed";
133
111
  } | {
@@ -140,8 +118,12 @@ export type LemmyErrorType = {
140
118
  error: "registration_closed";
141
119
  } | {
142
120
  error: "registration_application_answer_required";
121
+ } | {
122
+ error: "registration_username_required";
143
123
  } | {
144
124
  error: "email_already_exists";
125
+ } | {
126
+ error: "username_already_exists";
145
127
  } | {
146
128
  error: "federation_forbidden_by_strict_allow_list";
147
129
  } | {
@@ -235,8 +217,6 @@ export type LemmyErrorType = {
235
217
  error: "person_block_already_exists";
236
218
  } | {
237
219
  error: "user_already_exists";
238
- } | {
239
- error: "token_not_found";
240
220
  } | {
241
221
  error: "couldnt_like_post";
242
222
  } | {
@@ -279,8 +259,6 @@ export type LemmyErrorType = {
279
259
  error: "email_send_failed";
280
260
  } | {
281
261
  error: "slurs";
282
- } | {
283
- error: "couldnt_find_object";
284
262
  } | {
285
263
  error: "registration_denied";
286
264
  message: string | null;
@@ -330,7 +308,21 @@ export type LemmyErrorType = {
330
308
  error: "url_without_domain";
331
309
  } | {
332
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";
333
319
  } | {
334
320
  error: "unknown";
335
321
  message: string;
322
+ } | {
323
+ error: "cant_delete_site";
324
+ } | {
325
+ error: "url_length_overflow";
326
+ } | {
327
+ error: "not_found";
336
328
  };
@@ -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,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";
1
2
  import type { ListingType } from "./ListingType";
2
3
  import type { LocalSiteId } from "./LocalSiteId";
3
4
  import type { PostListingMode } from "./PostListingMode";
5
+ import type { PostSortType } from "./PostSortType";
4
6
  import type { RegistrationMode } from "./RegistrationMode";
5
7
  import type { SiteId } from "./SiteId";
6
- import type { SortType } from "./SortType";
7
8
  export interface LocalSite {
8
9
  id: LocalSiteId;
9
10
  site_id: SiteId;
10
11
  site_setup: boolean;
11
12
  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,7 @@ 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;
34
36
  }
@@ -1,20 +1,20 @@
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;
@@ -29,4 +29,5 @@ export interface LocalUser {
29
29
  enable_keyboard_navigation: boolean;
30
30
  enable_animated_images: boolean;
31
31
  collapse_bot_comments: boolean;
32
+ default_comment_sort_type: CommentSortType;
32
33
  }
@@ -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 });
@@ -0,0 +1,14 @@
1
+ export interface OAuthProviderInsertForm {
2
+ display_name: string;
3
+ issuer: string;
4
+ authorization_endpoint: string;
5
+ token_endpoint: string;
6
+ userinfo_endpoint: string;
7
+ id_claim: string;
8
+ client_id: string;
9
+ client_secret: string;
10
+ scopes: string;
11
+ auto_verify_email: boolean;
12
+ account_linking_enabled: boolean;
13
+ enabled: boolean;
14
+ }
@@ -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,13 @@
1
+ export interface OAuthProviderUpdateForm {
2
+ display_name: string | null;
3
+ authorization_endpoint: string;
4
+ token_endpoint: string;
5
+ userinfo_endpoint: string;
6
+ id_claim: string | null;
7
+ client_secret: string | null;
8
+ scopes: string | null;
9
+ auto_verify_email: boolean | null;
10
+ account_linking_enabled: boolean | null;
11
+ enabled: boolean | null;
12
+ updated: string | null | null;
13
+ }
@@ -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 @@
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 });
@@ -1,4 +1,5 @@
1
1
  import type { Community } from "./Community";
2
+ import type { ImageDetails } from "./ImageDetails";
2
3
  import type { Person } from "./Person";
3
4
  import type { Post } from "./Post";
4
5
  import type { PostAggregates } from "./PostAggregates";
@@ -7,6 +8,7 @@ export interface PostView {
7
8
  post: Post;
8
9
  creator: Person;
9
10
  community: Community;
11
+ image_details?: ImageDetails;
10
12
  creator_banned_from_community: boolean;
11
13
  banned_from_community: boolean;
12
14
  creator_is_moderator: boolean;
@@ -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,7 +1,8 @@
1
1
  import type { LocalUserId } from "./LocalUserId";
2
2
  import type { PersonId } from "./PersonId";
3
+ import type { RegistrationApplicationId } from "./RegistrationApplicationId";
3
4
  export interface RegistrationApplication {
4
- id: number;
5
+ id: RegistrationApplicationId;
5
6
  local_user_id: LocalUserId;
6
7
  answer: string;
7
8
  admin_id?: PersonId;
@@ -0,0 +1 @@
1
+ export type RegistrationApplicationId = 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 });
@@ -1,14 +1,17 @@
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
9
  auto_expand?: boolean;
9
10
  theme?: string;
10
- default_sort_type?: SortType;
11
11
  default_listing_type?: ListingType;
12
+ post_listing_mode?: PostListingMode;
13
+ default_post_sort_type?: PostSortType;
14
+ default_comment_sort_type?: CommentSortType;
12
15
  interface_language?: string;
13
16
  avatar?: string;
14
17
  banner?: string;
@@ -24,7 +27,6 @@ export interface SaveUserSettings {
24
27
  discussion_languages?: Array<LanguageId>;
25
28
  open_links_in_new_tab?: boolean;
26
29
  infinite_scroll_enabled?: boolean;
27
- post_listing_mode?: PostListingMode;
28
30
  enable_keyboard_navigation?: boolean;
29
31
  enable_animated_images?: boolean;
30
32
  collapse_bot_comments?: boolean;
@@ -1,16 +1,17 @@
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
+ post_title_only?: boolean;
16
17
  }
@@ -1,6 +1,4 @@
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>;
6
4
  }
@@ -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.1",
4
+ "version": "0.20.0-alpha.10",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -19,23 +19,23 @@
19
19
  "url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/node": "^20.11.19",
23
- "@typescript-eslint/eslint-plugin": "^7.0.1",
24
- "@typescript-eslint/parser": "^7.0.1",
25
- "eslint": "^9.0.0",
26
- "eslint-plugin-prettier": "^5.1.3",
27
- "husky": "^9.0.11",
28
- "lint-staged": "^15.2.2",
29
- "prettier": "^3.2.5",
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",
26
+ "eslint-plugin-prettier": "^5.2.1",
27
+ "husky": "^9.1.4",
28
+ "lint-staged": "^15.2.7",
29
+ "prettier": "^3.3.3",
30
30
  "prettier-plugin-import-sort": "^0.0.7",
31
- "prettier-plugin-organize-imports": "^3.2.4",
32
- "prettier-plugin-packagejson": "^2.4.11",
31
+ "prettier-plugin-organize-imports": "^4.0.0",
32
+ "prettier-plugin-packagejson": "^2.5.1",
33
33
  "sortpack": "^2.4.0",
34
- "typedoc": "^0.25.8",
35
- "typescript": "^5.3.3",
36
- "typescript-eslint": "^7.9.0"
34
+ "typedoc": "^0.26.5",
35
+ "typescript": "^5.5.4",
36
+ "typescript-eslint": "^8.0.0"
37
37
  },
38
- "packageManager": "pnpm@9.1.4",
38
+ "packageManager": "pnpm@9.11.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 +0,0 @@
1
- export type PersonBlockId = number;
@@ -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";