lemmy-js-client 0.17.0-rc.59 → 0.17.0-rc.60

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.
@@ -1,28 +1,25 @@
1
- import { Option } from "@sniptt/monads";
2
- import "reflect-metadata";
3
1
  import { ListingType, ModlogActionType, SearchType, SortType } from "../others";
4
- import { Language, RegistrationMode, Tagline } from "../source";
2
+ import { Language, Tagline } from "../source";
5
3
  import { AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView, CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModFeaturePostView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModTransferCommunityView, PersonBlockView, PersonViewSafe, PostView, RegistrationApplicationView, SiteView } from "../views";
6
4
  /**
7
5
  * Search lemmy for different types of data.
8
6
  */
9
- export declare class Search {
7
+ export interface Search {
10
8
  /**
11
9
  * The search query string.
12
10
  */
13
11
  q: string;
14
- type_: Option<SearchType>;
15
- community_id: Option<number>;
16
- community_name: Option<string>;
17
- creator_id: Option<number>;
18
- sort: Option<SortType>;
19
- listing_type: Option<ListingType>;
20
- page: Option<number>;
21
- limit: Option<number>;
22
- auth: Option<string>;
23
- constructor(init: Search);
24
- }
25
- export declare class SearchResponse {
12
+ type_?: SearchType;
13
+ community_id?: number;
14
+ community_name?: string;
15
+ creator_id?: number;
16
+ sort?: SortType;
17
+ listing_type?: ListingType;
18
+ page?: number;
19
+ limit?: number;
20
+ auth?: string;
21
+ }
22
+ export interface SearchResponse {
26
23
  /**
27
24
  * The [[SearchType]].
28
25
  */
@@ -32,17 +29,16 @@ export declare class SearchResponse {
32
29
  communities: CommunityView[];
33
30
  users: PersonViewSafe[];
34
31
  }
35
- export declare class GetModlog {
36
- mod_person_id: Option<number>;
37
- community_id: Option<number>;
38
- page: Option<number>;
39
- limit: Option<number>;
40
- auth: Option<string>;
32
+ export interface GetModlog {
33
+ mod_person_id?: number;
34
+ community_id?: number;
35
+ page?: number;
36
+ limit?: number;
37
+ auth?: string;
41
38
  type_: ModlogActionType;
42
- other_person_id: Option<number>;
43
- constructor(init: GetModlog);
39
+ other_person_id?: number;
44
40
  }
45
- export declare class GetModlogResponse {
41
+ export interface GetModlogResponse {
46
42
  removed_posts: ModRemovePostView[];
47
43
  locked_posts: ModLockPostView[];
48
44
  featured_posts: ModFeaturePostView[];
@@ -58,102 +54,101 @@ export declare class GetModlogResponse {
58
54
  admin_purged_posts: AdminPurgePostView[];
59
55
  admin_purged_comments: AdminPurgeCommentView[];
60
56
  }
61
- export declare class CreateSite {
57
+ export interface CreateSite {
62
58
  name: string;
63
- sidebar: Option<string>;
64
- description: Option<string>;
65
- icon: Option<string>;
66
- banner: Option<string>;
67
- enable_downvotes: Option<boolean>;
68
- enable_nsfw: Option<boolean>;
69
- community_creation_admin_only: Option<boolean>;
70
- require_email_verification: Option<boolean>;
71
- registration_mode: Option<RegistrationMode>;
72
- application_question: Option<string>;
73
- private_instance: Option<boolean>;
74
- default_theme: Option<string>;
75
- default_post_listing_type: Option<string>;
76
- application_email_admins: Option<boolean>;
77
- hide_modlog_mod_names: Option<boolean>;
78
- discussion_languages: Option<number[]>;
79
- legal_information: Option<string>;
80
- slur_filter_regex: Option<string>;
81
- actor_name_max_length: Option<number>;
82
- rate_limit_message: Option<number>;
83
- rate_limit_message_per_second: Option<number>;
84
- rate_limit_post: Option<number>;
85
- rate_limit_post_per_second: Option<number>;
86
- rate_limit_register: Option<number>;
87
- rate_limit_register_per_second: Option<number>;
88
- rate_limit_image: Option<number>;
89
- rate_limit_image_per_second: Option<number>;
90
- rate_limit_comment: Option<number>;
91
- rate_limit_comment_per_second: Option<number>;
92
- rate_limit_search: Option<number>;
93
- rate_limit_search_per_second: Option<number>;
94
- federation_enabled: Option<boolean>;
95
- federation_debug: Option<boolean>;
96
- federation_worker_count: Option<number>;
97
- captcha_enabled: Option<boolean>;
98
- captcha_difficulty: Option<string>;
99
- allowed_instances: Option<string[]>;
100
- blocked_instances: Option<string[]>;
101
- taglines: Option<string[]>;
59
+ sidebar?: string;
60
+ description?: string;
61
+ icon?: string;
62
+ banner?: string;
63
+ enable_downvotes?: boolean;
64
+ open_registration?: boolean;
65
+ enable_nsfw?: boolean;
66
+ community_creation_admin_only?: boolean;
67
+ require_email_verification?: boolean;
68
+ require_application?: boolean;
69
+ application_question?: string;
70
+ private_instance?: boolean;
71
+ default_theme?: string;
72
+ default_post_listing_type?: string;
73
+ application_email_admins?: boolean;
74
+ hide_modlog_mod_names?: boolean;
75
+ discussion_languages?: number[];
76
+ legal_information?: string;
77
+ slur_filter_regex?: string;
78
+ actor_name_max_length?: number;
79
+ rate_limit_message?: number;
80
+ rate_limit_message_per_second?: number;
81
+ rate_limit_post?: number;
82
+ rate_limit_post_per_second?: number;
83
+ rate_limit_register?: number;
84
+ rate_limit_register_per_second?: number;
85
+ rate_limit_image?: number;
86
+ rate_limit_image_per_second?: number;
87
+ rate_limit_comment?: number;
88
+ rate_limit_comment_per_second?: number;
89
+ rate_limit_search?: number;
90
+ rate_limit_search_per_second?: number;
91
+ federation_enabled?: boolean;
92
+ federation_debug?: boolean;
93
+ federation_worker_count?: number;
94
+ captcha_enabled?: boolean;
95
+ captcha_difficulty?: string;
96
+ allowed_instances?: string[];
97
+ blocked_instances?: string[];
98
+ taglines?: string[];
102
99
  auth: string;
103
- constructor(init: CreateSite);
104
100
  }
105
- export declare class EditSite {
106
- name: Option<string>;
107
- sidebar: Option<string>;
108
- description: Option<string>;
109
- icon: Option<string>;
110
- banner: Option<string>;
111
- enable_downvotes: Option<boolean>;
112
- enable_nsfw: Option<boolean>;
113
- community_creation_admin_only: Option<boolean>;
114
- require_email_verification: Option<boolean>;
115
- registration_mode: Option<RegistrationMode>;
116
- application_question: Option<string>;
117
- private_instance: Option<boolean>;
118
- default_theme: Option<string>;
119
- default_post_listing_type: Option<string>;
120
- legal_information: Option<string>;
121
- application_email_admins: Option<boolean>;
122
- hide_modlog_mod_names: Option<boolean>;
123
- discussion_languages: Option<number[]>;
124
- slur_filter_regex: Option<string>;
125
- actor_name_max_length: Option<number>;
126
- rate_limit_message: Option<number>;
127
- rate_limit_message_per_second: Option<number>;
128
- rate_limit_post: Option<number>;
129
- rate_limit_post_per_second: Option<number>;
130
- rate_limit_register: Option<number>;
131
- rate_limit_register_per_second: Option<number>;
132
- rate_limit_image: Option<number>;
133
- rate_limit_image_per_second: Option<number>;
134
- rate_limit_comment: Option<number>;
135
- rate_limit_comment_per_second: Option<number>;
136
- rate_limit_search: Option<number>;
137
- rate_limit_search_per_second: Option<number>;
138
- federation_enabled: Option<boolean>;
139
- federation_debug: Option<boolean>;
140
- federation_worker_count: Option<number>;
141
- captcha_enabled: Option<boolean>;
142
- captcha_difficulty: Option<string>;
143
- allowed_instances: Option<string[]>;
144
- blocked_instances: Option<string[]>;
145
- taglines: Option<string[]>;
101
+ export interface EditSite {
102
+ name?: string;
103
+ sidebar?: string;
104
+ description?: string;
105
+ icon?: string;
106
+ banner?: string;
107
+ enable_downvotes?: boolean;
108
+ open_registration?: boolean;
109
+ enable_nsfw?: boolean;
110
+ community_creation_admin_only?: boolean;
111
+ require_email_verification?: boolean;
112
+ require_application?: boolean;
113
+ application_question?: string;
114
+ private_instance?: boolean;
115
+ default_theme?: string;
116
+ default_post_listing_type?: string;
117
+ legal_information?: string;
118
+ application_email_admins?: boolean;
119
+ hide_modlog_mod_names?: boolean;
120
+ discussion_languages?: number[];
121
+ slur_filter_regex?: string;
122
+ actor_name_max_length?: number;
123
+ rate_limit_message?: number;
124
+ rate_limit_message_per_second?: number;
125
+ rate_limit_post?: number;
126
+ rate_limit_post_per_second?: number;
127
+ rate_limit_register?: number;
128
+ rate_limit_register_per_second?: number;
129
+ rate_limit_image?: number;
130
+ rate_limit_image_per_second?: number;
131
+ rate_limit_comment?: number;
132
+ rate_limit_comment_per_second?: number;
133
+ rate_limit_search?: number;
134
+ rate_limit_search_per_second?: number;
135
+ federation_enabled?: boolean;
136
+ federation_debug?: boolean;
137
+ federation_worker_count?: number;
138
+ captcha_enabled?: boolean;
139
+ captcha_difficulty?: string;
140
+ allowed_instances?: string[];
141
+ blocked_instances?: string[];
142
+ taglines?: string[];
146
143
  auth: string;
147
- constructor(init: EditSite);
148
144
  }
149
- export declare class GetSite {
150
- auth: Option<string>;
151
- constructor(init: GetSite);
145
+ export interface GetSite {
146
+ auth?: string;
152
147
  }
153
- export declare class SiteResponse {
148
+ export interface SiteResponse {
154
149
  site_view: SiteView;
155
150
  }
156
- export declare class GetSiteResponse {
151
+ export interface GetSiteResponse {
157
152
  site_view: SiteView;
158
153
  admins: PersonViewSafe[];
159
154
  online: number;
@@ -161,16 +156,16 @@ export declare class GetSiteResponse {
161
156
  /**
162
157
  * If you're logged in, you'll get back extra user info.
163
158
  */
164
- my_user: Option<MyUserInfo>;
165
- federated_instances: Option<FederatedInstances>;
159
+ my_user?: MyUserInfo;
160
+ federated_instances?: FederatedInstances;
166
161
  all_languages: Language[];
167
162
  discussion_languages: number[];
168
- taglines: Option<Tagline[]>;
163
+ taglines?: Tagline[];
169
164
  }
170
165
  /**
171
166
  * Your user info, such as blocks, follows, etc.
172
167
  */
173
- export declare class MyUserInfo {
168
+ export interface MyUserInfo {
174
169
  local_user_view: LocalUserSettingsView;
175
170
  follows: CommunityFollowerView[];
176
171
  moderates: CommunityModeratorView[];
@@ -178,81 +173,71 @@ export declare class MyUserInfo {
178
173
  person_blocks: PersonBlockView[];
179
174
  discussion_languages: number[];
180
175
  }
181
- export declare class LeaveAdmin {
176
+ export interface LeaveAdmin {
182
177
  auth: string;
183
- constructor(init: LeaveAdmin);
184
178
  }
185
- export declare class FederatedInstances {
179
+ export interface FederatedInstances {
186
180
  linked: string[];
187
- allowed: Option<string[]>;
188
- blocked: Option<string[]>;
189
- constructor(init: FederatedInstances);
181
+ allowed?: string[];
182
+ blocked?: string[];
190
183
  }
191
- export declare class ResolveObject {
184
+ export interface ResolveObject {
192
185
  q: string;
193
- auth: Option<string>;
194
- constructor(init: ResolveObject);
186
+ auth?: string;
195
187
  }
196
- export declare class ResolveObjectResponse {
197
- comment: Option<CommentView>;
198
- post: Option<PostView>;
199
- community: Option<CommunityView>;
200
- person: Option<PersonViewSafe>;
188
+ export interface ResolveObjectResponse {
189
+ comment?: CommentView;
190
+ post?: PostView;
191
+ community?: CommunityView;
192
+ person?: PersonViewSafe;
201
193
  }
202
- export declare class PurgePerson {
194
+ export interface PurgePerson {
203
195
  person_id: number;
204
- reason: Option<string>;
196
+ reason?: string;
205
197
  auth: string;
206
- constructor(init: PurgePerson);
207
198
  }
208
- export declare class PurgeCommunity {
199
+ export interface PurgeCommunity {
209
200
  community_id: number;
210
- reason: Option<string>;
201
+ reason?: string;
211
202
  auth: string;
212
- constructor(init: PurgeCommunity);
213
203
  }
214
- export declare class PurgePost {
204
+ export interface PurgePost {
215
205
  post_id: number;
216
- reason: Option<string>;
206
+ reason?: string;
217
207
  auth: string;
218
- constructor(init: PurgePost);
219
208
  }
220
- export declare class PurgeComment {
209
+ export interface PurgeComment {
221
210
  comment_id: number;
222
- reason: Option<string>;
211
+ reason?: string;
223
212
  auth: string;
224
- constructor(init: PurgeComment);
225
213
  }
226
- export declare class PurgeItemResponse {
214
+ export interface PurgeItemResponse {
227
215
  success: boolean;
228
216
  }
229
- export declare class ListRegistrationApplications {
217
+ export interface ListRegistrationApplications {
230
218
  /**
231
219
  * Only shows the unread applications (IE those without an admin actor)
232
220
  */
233
- unread_only: Option<boolean>;
234
- page: Option<number>;
235
- limit: Option<number>;
221
+ unread_only?: boolean;
222
+ page?: number;
223
+ limit?: number;
236
224
  auth: string;
237
- constructor(init: ListRegistrationApplications);
238
225
  }
239
- export declare class ListRegistrationApplicationsResponse {
226
+ export interface ListRegistrationApplicationsResponse {
240
227
  registration_applications: RegistrationApplicationView[];
241
228
  }
242
- export declare class ApproveRegistrationApplication {
229
+ export interface ApproveRegistrationApplication {
243
230
  id: number;
244
231
  approve: boolean;
245
- deny_reason: Option<string>;
232
+ deny_reason?: string;
246
233
  auth: string;
247
- constructor(init: ApproveRegistrationApplication);
248
234
  }
249
- export declare class RegistrationApplicationResponse {
235
+ export interface RegistrationApplicationResponse {
250
236
  registration_application: RegistrationApplicationView;
251
237
  }
252
- export declare class GetUnreadRegistrationApplicationCount {
238
+ export interface GetUnreadRegistrationApplicationCount {
253
239
  auth: string;
254
- constructor(init: GetUnreadRegistrationApplicationCount);
255
240
  }
256
- export declare class GetUnreadRegistrationApplicationCountResponse {
241
+ export interface GetUnreadRegistrationApplicationCountResponse {
257
242
  registration_applications: number;
258
243
  }