lemmy-js-client 0.17.0-rc.3 → 0.17.0-rc.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,13 @@
1
+ import { Option } from "@sniptt/monads";
2
+ import "reflect-metadata";
1
3
  import { CommentAggregates, CommunityAggregates, PersonAggregates, PostAggregates, SiteAggregates } from "./aggregates";
4
+ import { SubscribedType } from "./others";
2
5
  import { Comment, CommentReport, CommunitySafe, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, RegistrationApplication, Site } from "./source";
3
- export interface PersonViewSafe {
6
+ export declare class PersonViewSafe {
4
7
  person: PersonSafe;
5
8
  counts: PersonAggregates;
6
9
  }
7
- export interface PersonMentionView {
10
+ export declare class PersonMentionView {
8
11
  person_mention: PersonMention;
9
12
  comment: Comment;
10
13
  creator: PersonSafe;
@@ -13,63 +16,62 @@ export interface PersonMentionView {
13
16
  recipient: PersonSafe;
14
17
  counts: CommentAggregates;
15
18
  creator_banned_from_community: boolean;
16
- subscribed: boolean;
19
+ subscribed: SubscribedType;
17
20
  saved: boolean;
18
21
  creator_blocked: boolean;
19
- my_vote?: number;
22
+ my_vote: Option<number>;
20
23
  }
21
- export interface LocalUserSettingsView {
24
+ export declare class LocalUserSettingsView {
22
25
  local_user: LocalUserSettings;
23
26
  person: PersonSafe;
24
27
  counts: PersonAggregates;
25
28
  }
26
- export interface SiteView {
29
+ export declare class SiteView {
27
30
  site: Site;
28
- creator: PersonSafe;
29
31
  counts: SiteAggregates;
30
32
  }
31
- export interface PrivateMessageView {
33
+ export declare class PrivateMessageView {
32
34
  private_message: PrivateMessage;
33
35
  creator: PersonSafe;
34
36
  recipient: PersonSafe;
35
37
  }
36
- export interface PostView {
38
+ export declare class PostView {
37
39
  post: Post;
38
40
  creator: PersonSafe;
39
41
  community: CommunitySafe;
40
42
  creator_banned_from_community: boolean;
41
43
  counts: PostAggregates;
42
- subscribed: boolean;
44
+ subscribed: SubscribedType;
43
45
  saved: boolean;
44
46
  read: boolean;
45
47
  creator_blocked: boolean;
46
- my_vote?: number;
48
+ my_vote: Option<number>;
47
49
  }
48
- export interface PostReportView {
50
+ export declare class PostReportView {
49
51
  post_report: PostReport;
50
52
  post: Post;
51
53
  community: CommunitySafe;
52
54
  creator: PersonSafe;
53
55
  post_creator: PersonSafe;
54
56
  creator_banned_from_community: boolean;
55
- my_vote?: number;
57
+ my_vote: Option<number>;
56
58
  counts: PostAggregates;
57
- resolver?: PersonSafe;
59
+ resolver: Option<PersonSafe>;
58
60
  }
59
- export interface CommentView {
61
+ export declare class CommentView {
60
62
  comment: Comment;
61
63
  creator: PersonSafe;
62
- recipient?: PersonSafe;
64
+ recipient: Option<PersonSafe>;
63
65
  post: Post;
64
66
  community: CommunitySafe;
65
67
  counts: CommentAggregates;
66
68
  creator_banned_from_community: boolean;
67
- subscribed: boolean;
69
+ subscribed: SubscribedType;
68
70
  saved: boolean;
69
71
  creator_blocked: boolean;
70
- my_vote?: number;
72
+ my_vote: Option<number>;
71
73
  }
72
- export interface CommentReportView {
74
+ export declare class CommentReportView {
73
75
  comment_report: CommentReport;
74
76
  comment: Comment;
75
77
  post: Post;
@@ -78,44 +80,44 @@ export interface CommentReportView {
78
80
  comment_creator: PersonSafe;
79
81
  counts: CommentAggregates;
80
82
  creator_banned_from_community: boolean;
81
- my_vote?: number;
82
- resolver?: PersonSafe;
83
+ my_vote: Option<number>;
84
+ resolver: Option<PersonSafe>;
83
85
  }
84
- export interface ModAddCommunityView {
86
+ export declare class ModAddCommunityView {
85
87
  mod_add_community: ModAddCommunity;
86
88
  moderator: PersonSafe;
87
89
  community: CommunitySafe;
88
90
  modded_person: PersonSafe;
89
91
  }
90
- export interface ModTransferCommunityView {
92
+ export declare class ModTransferCommunityView {
91
93
  mod_transfer_community: ModTransferCommunity;
92
94
  moderator: PersonSafe;
93
95
  community: CommunitySafe;
94
96
  modded_person: PersonSafe;
95
97
  }
96
- export interface ModAddView {
98
+ export declare class ModAddView {
97
99
  mod_add: ModAdd;
98
100
  moderator: PersonSafe;
99
101
  modded_person: PersonSafe;
100
102
  }
101
- export interface ModBanFromCommunityView {
103
+ export declare class ModBanFromCommunityView {
102
104
  mod_ban_from_community: ModBanFromCommunity;
103
105
  moderator: PersonSafe;
104
106
  community: CommunitySafe;
105
107
  banned_person: PersonSafe;
106
108
  }
107
- export interface ModBanView {
109
+ export declare class ModBanView {
108
110
  mod_ban: ModBan;
109
111
  moderator: PersonSafe;
110
112
  banned_person: PersonSafe;
111
113
  }
112
- export interface ModLockPostView {
114
+ export declare class ModLockPostView {
113
115
  mod_lock_post: ModLockPost;
114
116
  moderator: PersonSafe;
115
117
  post: Post;
116
118
  community: CommunitySafe;
117
119
  }
118
- export interface ModRemoveCommentView {
120
+ export declare class ModRemoveCommentView {
119
121
  mod_remove_comment: ModRemoveComment;
120
122
  moderator: PersonSafe;
121
123
  comment: Comment;
@@ -123,53 +125,52 @@ export interface ModRemoveCommentView {
123
125
  post: Post;
124
126
  community: CommunitySafe;
125
127
  }
126
- export interface ModRemoveCommunityView {
128
+ export declare class ModRemoveCommunityView {
127
129
  mod_remove_community: ModRemoveCommunity;
128
130
  moderator: PersonSafe;
129
131
  community: CommunitySafe;
130
132
  }
131
- export interface ModRemovePostView {
133
+ export declare class ModRemovePostView {
132
134
  mod_remove_post: ModRemovePost;
133
135
  moderator: PersonSafe;
134
136
  post: Post;
135
137
  community: CommunitySafe;
136
138
  }
137
- export interface ModStickyPostView {
139
+ export declare class ModStickyPostView {
138
140
  mod_sticky_post: ModStickyPost;
139
141
  moderator: PersonSafe;
140
142
  post: Post;
141
143
  community: CommunitySafe;
142
144
  }
143
- export interface CommunityFollowerView {
145
+ export declare class CommunityFollowerView {
144
146
  community: CommunitySafe;
145
147
  follower: PersonSafe;
146
- pending: boolean;
147
148
  }
148
- export interface CommunityBlockView {
149
+ export declare class CommunityBlockView {
149
150
  person: PersonSafe;
150
151
  community: CommunitySafe;
151
152
  }
152
- export interface CommunityModeratorView {
153
+ export declare class CommunityModeratorView {
153
154
  community: CommunitySafe;
154
155
  moderator: PersonSafe;
155
156
  }
156
- export interface CommunityPersonBanView {
157
+ export declare class CommunityPersonBanView {
157
158
  community: CommunitySafe;
158
159
  person: PersonSafe;
159
160
  }
160
- export interface PersonBlockView {
161
+ export declare class PersonBlockView {
161
162
  person: PersonSafe;
162
163
  target: PersonSafe;
163
164
  }
164
- export interface CommunityView {
165
+ export declare class CommunityView {
165
166
  community: CommunitySafe;
166
- subscribed: boolean;
167
+ subscribed: SubscribedType;
167
168
  blocked: boolean;
168
169
  counts: CommunityAggregates;
169
170
  }
170
- export interface RegistrationApplicationView {
171
+ export declare class RegistrationApplicationView {
171
172
  registration_application: RegistrationApplication;
172
173
  creator_local_user: LocalUserSettings;
173
174
  creator: PersonSafe;
174
- admin?: PersonSafe;
175
+ admin: Option<PersonSafe>;
175
176
  }