lemmy-js-client 0.17.0-rc.16 → 0.17.0-rc.19

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.
@@ -18,7 +18,7 @@ export declare class Search {
18
18
  page: Option<number>;
19
19
  limit: Option<number>;
20
20
  auth: Option<string>;
21
- constructor(q: string, type_: Option<SearchType>, community_id: Option<number>, community_name: Option<string>, creator_id: Option<number>, sort: Option<SortType>, listing_type: Option<ListingType>, page: Option<number>, limit: Option<number>, auth: Option<string>);
21
+ constructor(init: Search);
22
22
  }
23
23
  export declare class SearchResponse {
24
24
  /**
@@ -36,7 +36,7 @@ export declare class GetModlog {
36
36
  page: Option<number>;
37
37
  limit: Option<number>;
38
38
  auth: Option<string>;
39
- constructor(mod_person_id: Option<number>, community_id: Option<number>, page: Option<number>, limit: Option<number>, auth: Option<string>);
39
+ constructor(init: GetModlog);
40
40
  }
41
41
  export declare class GetModlogResponse {
42
42
  removed_posts: ModRemovePostView[];
@@ -67,7 +67,7 @@ export declare class CreateSite {
67
67
  default_theme: Option<string>;
68
68
  default_post_listing_type: Option<string>;
69
69
  auth: string;
70
- constructor(name: string, sidebar: Option<string>, description: Option<string>, icon: Option<string>, banner: Option<string>, enable_downvotes: Option<boolean>, open_registration: Option<boolean>, enable_nsfw: Option<boolean>, community_creation_admin_only: Option<boolean>, require_email_verification: Option<boolean>, require_application: Option<boolean>, application_question: Option<string>, private_instance: Option<boolean>, default_theme: Option<string>, default_post_listing_type: Option<string>, auth: string);
70
+ constructor(init: CreateSite);
71
71
  }
72
72
  export declare class EditSite {
73
73
  name: Option<string>;
@@ -87,11 +87,11 @@ export declare class EditSite {
87
87
  legal_information: Option<string>;
88
88
  default_post_listing_type: Option<string>;
89
89
  auth: string;
90
- constructor(name: Option<string>, sidebar: Option<string>, description: Option<string>, icon: Option<string>, banner: Option<string>, enable_downvotes: Option<boolean>, open_registration: Option<boolean>, enable_nsfw: Option<boolean>, community_creation_admin_only: Option<boolean>, require_email_verification: Option<boolean>, require_application: Option<boolean>, application_question: Option<string>, private_instance: Option<boolean>, default_theme: Option<string>, legal_information: Option<string>, default_post_listing_type: Option<string>, auth: string);
90
+ constructor(init: EditSite);
91
91
  }
92
92
  export declare class GetSite {
93
93
  auth: Option<string>;
94
- constructor(auth: Option<string>);
94
+ constructor(init: GetSite);
95
95
  }
96
96
  export declare class SiteResponse {
97
97
  site_view: SiteView;
@@ -122,11 +122,11 @@ export interface MyUserInfo {
122
122
  }
123
123
  export declare class LeaveAdmin {
124
124
  auth: string;
125
- constructor(auth: string);
125
+ constructor(init: LeaveAdmin);
126
126
  }
127
127
  export declare class GetSiteConfig {
128
128
  auth: string;
129
- constructor(auth: string);
129
+ constructor(init: GetSiteConfig);
130
130
  }
131
131
  export declare class GetSiteConfigResponse {
132
132
  config_hjson: string;
@@ -134,17 +134,18 @@ export declare class GetSiteConfigResponse {
134
134
  export declare class SaveSiteConfig {
135
135
  config_hjson: string;
136
136
  auth: string;
137
- constructor(config_hjson: string, auth: string);
137
+ constructor(init: SaveSiteConfig);
138
138
  }
139
139
  export declare class FederatedInstances {
140
140
  linked: string[];
141
141
  allowed: Option<string[]>;
142
142
  blocked: Option<string[]>;
143
+ constructor(init: FederatedInstances);
143
144
  }
144
145
  export declare class ResolveObject {
145
146
  q: string;
146
147
  auth: Option<string>;
147
- constructor(q: string, auth: Option<string>);
148
+ constructor(init: ResolveObject);
148
149
  }
149
150
  export declare class ResolveObjectResponse {
150
151
  comment: Option<CommentView>;
@@ -160,7 +161,7 @@ export declare class ListRegistrationApplications {
160
161
  page: Option<number>;
161
162
  limit: Option<number>;
162
163
  auth: string;
163
- constructor(unread_only: Option<boolean>, page: Option<number>, limit: Option<number>, auth: string);
164
+ constructor(init: ListRegistrationApplications);
164
165
  }
165
166
  export declare class ListRegistrationApplicationsResponse {
166
167
  registration_applications: RegistrationApplicationView[];
@@ -170,14 +171,14 @@ export declare class ApproveRegistrationApplication {
170
171
  approve: boolean;
171
172
  deny_reason: Option<string>;
172
173
  auth: string;
173
- constructor(id: number, approve: boolean, deny_reason: Option<string>, auth: string);
174
+ constructor(init: ApproveRegistrationApplication);
174
175
  }
175
176
  export declare class RegistrationApplicationResponse {
176
177
  registration_application: RegistrationApplicationView;
177
178
  }
178
179
  export declare class GetUnreadRegistrationApplicationCount {
179
180
  auth: string;
180
- constructor(auth: string);
181
+ constructor(init: GetUnreadRegistrationApplicationCount);
181
182
  }
182
183
  export declare class GetUnreadRegistrationApplicationCountResponse {
183
184
  registration_applications: number;
@@ -14,17 +14,8 @@ var utils_1 = require("../../utils");
14
14
  * Search lemmy for different types of data.
15
15
  */
16
16
  var Search = /** @class */ (function () {
17
- function Search(q, type_, community_id, community_name, creator_id, sort, listing_type, page, limit, auth) {
18
- this.q = q;
19
- this.type_ = type_;
20
- this.community_id = community_id;
21
- this.community_name = community_name;
22
- this.creator_id = creator_id;
23
- this.sort = sort;
24
- this.listing_type = listing_type;
25
- this.page = page;
26
- this.limit = limit;
27
- this.auth = auth;
17
+ function Search(init) {
18
+ Object.assign(this, init);
28
19
  }
29
20
  __decorate([
30
21
  (0, class_transformer_1.Transform)(function (_a) {
@@ -135,12 +126,8 @@ var SearchResponse = /** @class */ (function () {
135
126
  }());
136
127
  exports.SearchResponse = SearchResponse;
137
128
  var GetModlog = /** @class */ (function () {
138
- function GetModlog(mod_person_id, community_id, page, limit, auth) {
139
- this.mod_person_id = mod_person_id;
140
- this.community_id = community_id;
141
- this.page = page;
142
- this.limit = limit;
143
- this.auth = auth;
129
+ function GetModlog(init) {
130
+ Object.assign(this, init);
144
131
  }
145
132
  __decorate([
146
133
  (0, class_transformer_1.Transform)(function (_a) {
@@ -207,23 +194,8 @@ var GetModlogResponse = /** @class */ (function () {
207
194
  }());
208
195
  exports.GetModlogResponse = GetModlogResponse;
209
196
  var CreateSite = /** @class */ (function () {
210
- function CreateSite(name, sidebar, description, icon, banner, enable_downvotes, open_registration, enable_nsfw, community_creation_admin_only, require_email_verification, require_application, application_question, private_instance, default_theme, default_post_listing_type, auth) {
211
- this.name = name;
212
- this.sidebar = sidebar;
213
- this.description = description;
214
- this.icon = icon;
215
- this.banner = banner;
216
- this.enable_downvotes = enable_downvotes;
217
- this.open_registration = open_registration;
218
- this.enable_nsfw = enable_nsfw;
219
- this.community_creation_admin_only = community_creation_admin_only;
220
- this.require_email_verification = require_email_verification;
221
- this.require_application = require_application;
222
- this.application_question = application_question;
223
- this.private_instance = private_instance;
224
- this.default_theme = default_theme;
225
- this.default_post_listing_type = default_post_listing_type;
226
- this.auth = auth;
197
+ function CreateSite(init) {
198
+ Object.assign(this, init);
227
199
  }
228
200
  __decorate([
229
201
  (0, class_transformer_1.Transform)(function (_a) {
@@ -383,24 +355,8 @@ var CreateSite = /** @class */ (function () {
383
355
  }());
384
356
  exports.CreateSite = CreateSite;
385
357
  var EditSite = /** @class */ (function () {
386
- function EditSite(name, sidebar, description, icon, banner, enable_downvotes, open_registration, enable_nsfw, community_creation_admin_only, require_email_verification, require_application, application_question, private_instance, default_theme, legal_information, default_post_listing_type, auth) {
387
- this.name = name;
388
- this.sidebar = sidebar;
389
- this.description = description;
390
- this.icon = icon;
391
- this.banner = banner;
392
- this.enable_downvotes = enable_downvotes;
393
- this.open_registration = open_registration;
394
- this.enable_nsfw = enable_nsfw;
395
- this.community_creation_admin_only = community_creation_admin_only;
396
- this.require_email_verification = require_email_verification;
397
- this.require_application = require_application;
398
- this.application_question = application_question;
399
- this.private_instance = private_instance;
400
- this.default_theme = default_theme;
401
- this.legal_information = legal_information;
402
- this.default_post_listing_type = default_post_listing_type;
403
- this.auth = auth;
358
+ function EditSite(init) {
359
+ Object.assign(this, init);
404
360
  }
405
361
  __decorate([
406
362
  (0, class_transformer_1.Transform)(function (_a) {
@@ -582,8 +538,8 @@ var EditSite = /** @class */ (function () {
582
538
  }());
583
539
  exports.EditSite = EditSite;
584
540
  var GetSite = /** @class */ (function () {
585
- function GetSite(auth) {
586
- this.auth = auth;
541
+ function GetSite(init) {
542
+ Object.assign(this, init);
587
543
  }
588
544
  __decorate([
589
545
  (0, class_transformer_1.Transform)(function (_a) {
@@ -645,15 +601,15 @@ var GetSiteResponse = /** @class */ (function () {
645
601
  }());
646
602
  exports.GetSiteResponse = GetSiteResponse;
647
603
  var LeaveAdmin = /** @class */ (function () {
648
- function LeaveAdmin(auth) {
649
- this.auth = auth;
604
+ function LeaveAdmin(init) {
605
+ Object.assign(this, init);
650
606
  }
651
607
  return LeaveAdmin;
652
608
  }());
653
609
  exports.LeaveAdmin = LeaveAdmin;
654
610
  var GetSiteConfig = /** @class */ (function () {
655
- function GetSiteConfig(auth) {
656
- this.auth = auth;
611
+ function GetSiteConfig(init) {
612
+ Object.assign(this, init);
657
613
  }
658
614
  return GetSiteConfig;
659
615
  }());
@@ -665,15 +621,15 @@ var GetSiteConfigResponse = /** @class */ (function () {
665
621
  }());
666
622
  exports.GetSiteConfigResponse = GetSiteConfigResponse;
667
623
  var SaveSiteConfig = /** @class */ (function () {
668
- function SaveSiteConfig(config_hjson, auth) {
669
- this.config_hjson = config_hjson;
670
- this.auth = auth;
624
+ function SaveSiteConfig(init) {
625
+ Object.assign(this, init);
671
626
  }
672
627
  return SaveSiteConfig;
673
628
  }());
674
629
  exports.SaveSiteConfig = SaveSiteConfig;
675
630
  var FederatedInstances = /** @class */ (function () {
676
- function FederatedInstances() {
631
+ function FederatedInstances(init) {
632
+ Object.assign(this, init);
677
633
  }
678
634
  __decorate([
679
635
  (0, class_transformer_1.Transform)(function (_a) {
@@ -701,9 +657,8 @@ var FederatedInstances = /** @class */ (function () {
701
657
  }());
702
658
  exports.FederatedInstances = FederatedInstances;
703
659
  var ResolveObject = /** @class */ (function () {
704
- function ResolveObject(q, auth) {
705
- this.q = q;
706
- this.auth = auth;
660
+ function ResolveObject(init) {
661
+ Object.assign(this, init);
707
662
  }
708
663
  __decorate([
709
664
  (0, class_transformer_1.Transform)(function (_a) {
@@ -770,11 +725,8 @@ var ResolveObjectResponse = /** @class */ (function () {
770
725
  }());
771
726
  exports.ResolveObjectResponse = ResolveObjectResponse;
772
727
  var ListRegistrationApplications = /** @class */ (function () {
773
- function ListRegistrationApplications(unread_only, page, limit, auth) {
774
- this.unread_only = unread_only;
775
- this.page = page;
776
- this.limit = limit;
777
- this.auth = auth;
728
+ function ListRegistrationApplications(init) {
729
+ Object.assign(this, init);
778
730
  }
779
731
  __decorate([
780
732
  (0, class_transformer_1.Transform)(function (_a) {
@@ -819,11 +771,8 @@ var ListRegistrationApplicationsResponse = /** @class */ (function () {
819
771
  }());
820
772
  exports.ListRegistrationApplicationsResponse = ListRegistrationApplicationsResponse;
821
773
  var ApproveRegistrationApplication = /** @class */ (function () {
822
- function ApproveRegistrationApplication(id, approve, deny_reason, auth) {
823
- this.id = id;
824
- this.approve = approve;
825
- this.deny_reason = deny_reason;
826
- this.auth = auth;
774
+ function ApproveRegistrationApplication(init) {
775
+ Object.assign(this, init);
827
776
  }
828
777
  __decorate([
829
778
  (0, class_transformer_1.Transform)(function (_a) {
@@ -846,8 +795,8 @@ var RegistrationApplicationResponse = /** @class */ (function () {
846
795
  }());
847
796
  exports.RegistrationApplicationResponse = RegistrationApplicationResponse;
848
797
  var GetUnreadRegistrationApplicationCount = /** @class */ (function () {
849
- function GetUnreadRegistrationApplicationCount(auth) {
850
- this.auth = auth;
798
+ function GetUnreadRegistrationApplicationCount(init) {
799
+ Object.assign(this, init);
851
800
  }
852
801
  return GetUnreadRegistrationApplicationCount;
853
802
  }());
@@ -152,4 +152,5 @@ export declare class SiteMetadata {
152
152
  description: Option<string>;
153
153
  image: Option<string>;
154
154
  html: Option<string>;
155
+ constructor(init: SiteMetadata);
155
156
  }
@@ -163,7 +163,8 @@ var SearchType;
163
163
  * A holder for a site's metadata ( such as opengraph tags ), used for post links.
164
164
  */
165
165
  var SiteMetadata = /** @class */ (function () {
166
- function SiteMetadata() {
166
+ function SiteMetadata(init) {
167
+ Object.assign(this, init);
167
168
  }
168
169
  __decorate([
169
170
  (0, class_transformer_1.Transform)(function (_a) {
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.17.0-rc.16",
4
+ "version": "0.17.0-rc.19",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",