anixapi 0.2.1

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 (164) hide show
  1. package/LICENSE +339 -0
  2. package/README.md +165 -0
  3. package/dist/api/auth.d.ts +129 -0
  4. package/dist/api/auth.js +156 -0
  5. package/dist/api/bookmarks/export.d.ts +19 -0
  6. package/dist/api/bookmarks/export.js +24 -0
  7. package/dist/api/bookmarks/import.d.ts +29 -0
  8. package/dist/api/bookmarks/import.js +36 -0
  9. package/dist/api/bookmarks/index.d.ts +2 -0
  10. package/dist/api/bookmarks/index.js +18 -0
  11. package/dist/api/channel/article.d.ts +119 -0
  12. package/dist/api/channel/article.js +144 -0
  13. package/dist/api/channel/articleComment.d.ts +119 -0
  14. package/dist/api/channel/articleComment.js +144 -0
  15. package/dist/api/channel/articleSuggestion.d.ts +69 -0
  16. package/dist/api/channel/articleSuggestion.js +84 -0
  17. package/dist/api/channel/channel.d.ts +249 -0
  18. package/dist/api/channel/channel.js +300 -0
  19. package/dist/api/channel/index.d.ts +4 -0
  20. package/dist/api/channel/index.js +20 -0
  21. package/dist/api/collection/collection.d.ts +59 -0
  22. package/dist/api/collection/collection.js +72 -0
  23. package/dist/api/collection/collectionComment.d.ts +109 -0
  24. package/dist/api/collection/collectionComment.js +132 -0
  25. package/dist/api/collection/collectionFavorite.d.ts +39 -0
  26. package/dist/api/collection/collectionFavorite.js +48 -0
  27. package/dist/api/collection/collectionMy.d.ts +69 -0
  28. package/dist/api/collection/collectionMy.js +84 -0
  29. package/dist/api/collection/index.d.ts +4 -0
  30. package/dist/api/collection/index.js +20 -0
  31. package/dist/api/config.d.ts +29 -0
  32. package/dist/api/config.js +36 -0
  33. package/dist/api/discover.d.ts +59 -0
  34. package/dist/api/discover.js +72 -0
  35. package/dist/api/feed.d.ts +39 -0
  36. package/dist/api/feed.js +48 -0
  37. package/dist/api/index.d.ts +12 -0
  38. package/dist/api/index.js +28 -0
  39. package/dist/api/notification/index.d.ts +2 -0
  40. package/dist/api/notification/index.js +18 -0
  41. package/dist/api/notification/notification.d.ts +199 -0
  42. package/dist/api/notification/notification.js +240 -0
  43. package/dist/api/notification/notificationPreference.d.ts +159 -0
  44. package/dist/api/notification/notificationPreference.js +192 -0
  45. package/dist/api/profile/index.d.ts +10 -0
  46. package/dist/api/profile/index.js +26 -0
  47. package/dist/api/profile/profile.d.ts +65 -0
  48. package/dist/api/profile/profile.js +80 -0
  49. package/dist/api/profile/profileBadge.d.ts +39 -0
  50. package/dist/api/profile/profileBadge.js +48 -0
  51. package/dist/api/profile/profileBlockList.d.ts +39 -0
  52. package/dist/api/profile/profileBlockList.js +48 -0
  53. package/dist/api/profile/profileDeletion.d.ts +39 -0
  54. package/dist/api/profile/profileDeletion.js +48 -0
  55. package/dist/api/profile/profileFriend.d.ts +99 -0
  56. package/dist/api/profile/profileFriend.js +120 -0
  57. package/dist/api/profile/profileHealth.d.ts +59 -0
  58. package/dist/api/profile/profileHealth.js +72 -0
  59. package/dist/api/profile/profileList.d.ts +49 -0
  60. package/dist/api/profile/profileList.js +60 -0
  61. package/dist/api/profile/profilePreference.d.ts +239 -0
  62. package/dist/api/profile/profilePreference.js +288 -0
  63. package/dist/api/profile/profileReleaseVote.d.ts +39 -0
  64. package/dist/api/profile/profileReleaseVote.js +48 -0
  65. package/dist/api/profile/profileRoleList.d.ts +19 -0
  66. package/dist/api/profile/profileRoleList.js +24 -0
  67. package/dist/api/release/episode.d.ts +99 -0
  68. package/dist/api/release/episode.js +120 -0
  69. package/dist/api/release/favorite.d.ts +39 -0
  70. package/dist/api/release/favorite.js +48 -0
  71. package/dist/api/release/filter.d.ts +19 -0
  72. package/dist/api/release/filter.js +24 -0
  73. package/dist/api/release/history.d.ts +39 -0
  74. package/dist/api/release/history.js +48 -0
  75. package/dist/api/release/index.d.ts +13 -0
  76. package/dist/api/release/index.js +29 -0
  77. package/dist/api/release/related.d.ts +19 -0
  78. package/dist/api/release/related.js +24 -0
  79. package/dist/api/release/release.d.ts +79 -0
  80. package/dist/api/release/release.js +96 -0
  81. package/dist/api/release/releaseComment.d.ts +109 -0
  82. package/dist/api/release/releaseComment.js +132 -0
  83. package/dist/api/release/releaseStreamingPlatform.d.ts +19 -0
  84. package/dist/api/release/releaseStreamingPlatform.js +24 -0
  85. package/dist/api/release/releaseVideo.d.ts +59 -0
  86. package/dist/api/release/releaseVideo.js +72 -0
  87. package/dist/api/release/releaseVideoAppeal.d.ts +49 -0
  88. package/dist/api/release/releaseVideoAppeal.js +60 -0
  89. package/dist/api/release/releaseVideoFavorite.d.ts +39 -0
  90. package/dist/api/release/releaseVideoFavorite.js +48 -0
  91. package/dist/api/release/schedule.d.ts +19 -0
  92. package/dist/api/release/schedule.js +24 -0
  93. package/dist/api/release/type.d.ts +39 -0
  94. package/dist/api/release/type.js +48 -0
  95. package/dist/api/report.d.ts +189 -0
  96. package/dist/api/report.js +228 -0
  97. package/dist/api/search.d.ts +129 -0
  98. package/dist/api/search.js +156 -0
  99. package/dist/classes/Article.d.ts +18 -0
  100. package/dist/classes/Article.js +44 -0
  101. package/dist/classes/ArticleComment.d.ts +15 -0
  102. package/dist/classes/ArticleComment.js +37 -0
  103. package/dist/classes/BaseArticle.d.ts +21 -0
  104. package/dist/classes/BaseArticle.js +23 -0
  105. package/dist/classes/BaseComment.d.ts +22 -0
  106. package/dist/classes/BaseComment.js +25 -0
  107. package/dist/classes/BaseProfile.d.ts +29 -0
  108. package/dist/classes/BaseProfile.js +52 -0
  109. package/dist/classes/Channel.d.ts +47 -0
  110. package/dist/classes/Channel.js +108 -0
  111. package/dist/classes/Collection.d.ts +29 -0
  112. package/dist/classes/Collection.js +58 -0
  113. package/dist/classes/Dubber.d.ts +19 -0
  114. package/dist/classes/Dubber.js +24 -0
  115. package/dist/classes/Episode.d.ts +20 -0
  116. package/dist/classes/Episode.js +30 -0
  117. package/dist/classes/FullProfile.d.ts +70 -0
  118. package/dist/classes/FullProfile.js +92 -0
  119. package/dist/classes/Release.d.ts +91 -0
  120. package/dist/classes/Release.js +150 -0
  121. package/dist/classes/ReleaseComment.d.ts +16 -0
  122. package/dist/classes/ReleaseComment.js +45 -0
  123. package/dist/classes/Source.d.ts +15 -0
  124. package/dist/classes/Source.js +20 -0
  125. package/dist/classes/SuggestionArticle.d.ts +14 -0
  126. package/dist/classes/SuggestionArticle.js +30 -0
  127. package/dist/client.d.ts +49 -0
  128. package/dist/client.js +183 -0
  129. package/dist/endpoints.d.ts +63 -0
  130. package/dist/endpoints.js +67 -0
  131. package/dist/errors.d.ts +37 -0
  132. package/dist/errors.js +122 -0
  133. package/dist/index.d.ts +5 -0
  134. package/dist/index.js +23 -0
  135. package/dist/types/auth.d.ts +127 -0
  136. package/dist/types/auth.js +47 -0
  137. package/dist/types/channel.d.ts +350 -0
  138. package/dist/types/channel.js +104 -0
  139. package/dist/types/collection.d.ts +105 -0
  140. package/dist/types/collection.js +44 -0
  141. package/dist/types/config.d.ts +41 -0
  142. package/dist/types/config.js +4 -0
  143. package/dist/types/index.d.ts +13 -0
  144. package/dist/types/index.js +26 -0
  145. package/dist/types/notification.d.ts +81 -0
  146. package/dist/types/notification.js +2 -0
  147. package/dist/types/profile.d.ts +339 -0
  148. package/dist/types/profile.js +46 -0
  149. package/dist/types/release.d.ts +467 -0
  150. package/dist/types/release.js +39 -0
  151. package/dist/types/request.d.ts +138 -0
  152. package/dist/types/request.js +2 -0
  153. package/dist/types/response.d.ts +104 -0
  154. package/dist/types/response.js +35 -0
  155. package/dist/types/settings.d.ts +119 -0
  156. package/dist/types/settings.js +48 -0
  157. package/dist/utils/ArticleBuilder.d.ts +38 -0
  158. package/dist/utils/ArticleBuilder.js +144 -0
  159. package/dist/utils/LinkParser.d.ts +253 -0
  160. package/dist/utils/LinkParser.js +253 -0
  161. package/dist/utils/Utils.d.ts +3 -0
  162. package/dist/utils/Utils.js +11 -0
  163. package/docs/DOCUMENTATION.md +290 -0
  164. package/package.json +55 -0
@@ -0,0 +1,350 @@
1
+ import { IProfile } from "./profile";
2
+ import { IBaseSearchRequest } from "./request";
3
+ import { IResponse, IBaseComment, CommentAddResult, IPageableResponse } from "./response";
4
+ export interface IChannel {
5
+ id: number;
6
+ title: string;
7
+ description: string;
8
+ avatar: string;
9
+ cover: string;
10
+ permission: number;
11
+ article_count: number;
12
+ subscriber_count: number;
13
+ creation_date: number;
14
+ last_update_date: number;
15
+ is_blog: boolean;
16
+ is_commenting_enabled: boolean;
17
+ is_article_suggestion_enabled: boolean;
18
+ is_verified: boolean;
19
+ is_deleted: boolean;
20
+ blog_profile_id: number;
21
+ is_subscribed: boolean;
22
+ is_blocked: boolean;
23
+ block_reason: string;
24
+ block_expire_date: number;
25
+ is_perm_blocked: boolean;
26
+ is_administrator_or_higher: boolean;
27
+ }
28
+ export interface IArticleUploadFileResponse extends IResponse {
29
+ file: IArticleImageItem;
30
+ success: number;
31
+ }
32
+ export interface IArticleSuggestionPublishResponse extends IResponse<ArticleSuggestionPublishResult> {
33
+ article_id: number;
34
+ }
35
+ export interface IChannelResponse<T extends number = ChannelResult> extends IResponse<T> {
36
+ channel: IChannel;
37
+ suggestion_count: number;
38
+ }
39
+ export interface IChannelCreateRequest {
40
+ title: string;
41
+ description: string;
42
+ is_article_suggestion_enabled: boolean;
43
+ is_commenting_enabled: boolean;
44
+ }
45
+ export interface ISubsciptionCountResponse extends IResponse {
46
+ subscription_count: number;
47
+ }
48
+ /** @alias {@link ISubsciptionCountResponse} */
49
+ export type ISubscriptionCountResponse = ISubsciptionCountResponse;
50
+ export interface IArticleCommentResponce extends IResponse<CommentAddResult> {
51
+ comment: IArticleComment;
52
+ }
53
+ export interface IArticleTextBlock {
54
+ text: string;
55
+ text_length: number;
56
+ }
57
+ export interface IArticleHeaderBlock {
58
+ text: string;
59
+ text_length: number;
60
+ level: number;
61
+ }
62
+ export interface IArticleImageItem {
63
+ id: string;
64
+ url: string;
65
+ hash: string;
66
+ width: number;
67
+ height: number;
68
+ }
69
+ export interface IArticleImageBlock {
70
+ items: IArticleImageItem[];
71
+ item_count: number;
72
+ }
73
+ export interface IArticleQuoteBlock {
74
+ text: string;
75
+ caption: string;
76
+ alignment: string;
77
+ text_length: number;
78
+ caption_length: number;
79
+ }
80
+ export interface IArticleListBlock {
81
+ style: string;
82
+ items: string[];
83
+ item_count: number;
84
+ }
85
+ export interface IArticleEmbedBlock {
86
+ url: string;
87
+ hash: string;
88
+ embed: string;
89
+ width: number;
90
+ height: number;
91
+ image: string;
92
+ title: string;
93
+ service: string;
94
+ site_name: string;
95
+ description: string;
96
+ }
97
+ export interface IArticlePayloadBlock {
98
+ id: string;
99
+ data: IArticleTextBlock | IArticleImageBlock | IArticleHeaderBlock | IArticleQuoteBlock | IArticleListBlock | IArticleEmbedBlock | {};
100
+ name: string;
101
+ type: string;
102
+ }
103
+ export interface IArticleCreateRequest {
104
+ is_signed: boolean;
105
+ repost_article_id: number | null;
106
+ payload: {
107
+ time: number;
108
+ version: string;
109
+ blocks: IArticlePayloadBlock[];
110
+ block_count: number;
111
+ };
112
+ }
113
+ export interface IArticleSuggestionCreateRequest extends Omit<IArticleCreateRequest, 'repost_article_id'> {
114
+ }
115
+ export interface IEmbedData extends IResponse {
116
+ success: number;
117
+ hash: string;
118
+ site_name: string;
119
+ title: string;
120
+ description: string;
121
+ image: string;
122
+ embed: string;
123
+ width: number;
124
+ height: number;
125
+ url: string;
126
+ }
127
+ export interface IArticleResponse<T extends number = ArticleResult> extends IResponse<T> {
128
+ article: IArticle;
129
+ }
130
+ export interface IArticleCreateResponse extends IResponse<ArticleCreateEditResult> {
131
+ article: IArticle;
132
+ }
133
+ export interface IArticle {
134
+ id: number;
135
+ channel: IChannel;
136
+ author: IProfile | null;
137
+ payload: {
138
+ time: number;
139
+ blocks: IArticlePayloadBlock[];
140
+ };
141
+ vote: number;
142
+ repost_article: IArticle;
143
+ comment_count: number;
144
+ repost_count: number;
145
+ vote_count: number;
146
+ creation_date: number;
147
+ last_update_date: number;
148
+ is_deleted: boolean;
149
+ under_moderation_reason: string | null;
150
+ is_under_moderation: boolean;
151
+ contains_repost_article: boolean;
152
+ }
153
+ export interface IChannelBlockManageRequest {
154
+ target_profile_id: number;
155
+ is_blocked: boolean;
156
+ reason: string | null;
157
+ expire_date: number | null;
158
+ is_reason_showing_enabled: boolean;
159
+ is_perm_blocked: boolean;
160
+ }
161
+ export interface IChannelBlockInfo {
162
+ "@id": number;
163
+ reason: string | null;
164
+ added_date: number;
165
+ expire_date: number | null;
166
+ is_reason_showing_enabled: boolean;
167
+ is_perm_blocked: boolean;
168
+ }
169
+ export interface IChannelBlockInfoResponse extends IResponse<ChannelBlockResult> {
170
+ channel_block: IChannelBlockInfo | null;
171
+ }
172
+ export interface IChannelSearchRequest {
173
+ query: string;
174
+ permission?: number;
175
+ is_blog: boolean;
176
+ is_subscribed: boolean;
177
+ }
178
+ export interface IArticleSearchRequest extends Omit<IBaseSearchRequest, "searchBy"> {
179
+ channel_id: number;
180
+ }
181
+ export interface IArticleComment extends IBaseComment {
182
+ article: IArticle;
183
+ }
184
+ export interface IChannelMediaTokenResponse extends IResponse<EditorAvaliableResult> {
185
+ media_upload_token: string;
186
+ }
187
+ export interface IFeedSearchResponse extends IResponse {
188
+ articles: IPageableResponse<IArticle>;
189
+ channels: IPageableResponse<IChannel>;
190
+ tags: IPageableResponse<string>;
191
+ blogs: IPageableResponse<IChannel>;
192
+ }
193
+ export interface IChannelSubscribersSearchRequest extends IBaseSearchRequest {
194
+ channel_id: number;
195
+ }
196
+ export interface IChannelPermissionManageRequest {
197
+ target_profile_id: number;
198
+ permission: number;
199
+ }
200
+ export interface IArticleEventRequest {
201
+ type: "view" | "open" | "read";
202
+ entry_point: "article" | "feed" | "channel" | "latest" | "search" | "unknown";
203
+ articles: number[];
204
+ }
205
+ export declare enum ArticleCreateEditResult {
206
+ InvalidRepostArticle = 2,
207
+ InvalidPayload = 3,
208
+ InvalidTags = 4,
209
+ TemporarilyDisabled = 5,
210
+ ArticleLimitReached = 6,
211
+ ChannelNotFound = 7,
212
+ ChannelNotOwned = 8,
213
+ ChannelCreatorBanned = 9,
214
+ ChannelBlocked = 10,
215
+ ArticleNotFound = 11,
216
+ ArticleDeleted = 12,
217
+ BlogNotCreated = 13
218
+ }
219
+ export declare enum ArticleDeleteResult {
220
+ ArticleNotFound = 2,
221
+ ArticleNotOwned = 3,
222
+ ArticleDeleted = 4
223
+ }
224
+ export declare enum ArticleResult {
225
+ ArticleDeleted = 2
226
+ }
227
+ export declare enum BlogCreateResult {
228
+ ReputationLevelTooLow = 2
229
+ }
230
+ export declare enum ChannelCreateEditResult {
231
+ InvalidTitle = 2,
232
+ InvalidDescription = 3,
233
+ ChannelLimitReached = 4,
234
+ ChannelNotFound = 5,
235
+ ChannelNotOwned = 6,
236
+ ChannelCreatorBanned = 7
237
+ }
238
+ export declare enum ChannelPermissionManageResult {
239
+ PermissionInvalid = 2,
240
+ TargetProfileNotFound = 3,
241
+ ChannelNotFound = 4,
242
+ ChannelNotOwned = 5
243
+ }
244
+ export declare enum ChannelResult {
245
+ ChannelNotFound = 2
246
+ }
247
+ export declare enum ChannelSubscribeResult {
248
+ SubscriptionExists = 2,
249
+ SubscriptionLimitReached = 3
250
+ }
251
+ export declare enum ChannelUnsubscribeResult {
252
+ SubscriptionNotExists = 2
253
+ }
254
+ export declare enum ChannelBlockResult {
255
+ ChannelNotFound = 2,
256
+ ChannelNotOwned = 3,
257
+ BlockNotFound = 4
258
+ }
259
+ export declare enum ChannelUploadCoverAvatarResult {
260
+ ChannelNotFound = 2,
261
+ ChannelNotOwned = 3
262
+ }
263
+ export declare enum EditorAvaliableResult {
264
+ TemporarilyDisabled = 2,
265
+ ArticleLimitReached = 3,
266
+ ChannelNotFound = 4,
267
+ ChannelNotOwned = 5,
268
+ ChannelCreatorBanned = 6,
269
+ BlogNotCreated = 7
270
+ }
271
+ export declare enum ArticleSuggestionPublishResult {
272
+ ArticleSuggestionNotFound = 2,
273
+ ChannelNotFound = 3,
274
+ ChannelNotOwned = 4,
275
+ InvalidPayload = 5,
276
+ InvalidTags = 6,
277
+ ChannelCreatorBanned = 7,
278
+ TemporarilyDisabled = 8,
279
+ BlogNotCreated = 9
280
+ }
281
+ export declare enum ArticleSuggestionDeleteResult {
282
+ ArticleSuggestionNotFound = 2,
283
+ ArticleSuggestionNotOwned = 3
284
+ }
285
+ export declare enum ArticleEditPinnedResult {
286
+ ArticleDeleted = 2,
287
+ ArticleNotFound = 3,
288
+ ChannelNotFound = 4,
289
+ ChannelNotOwned = 5
290
+ }
291
+ export interface IArticleDeleteResponse extends IResponse {
292
+ }
293
+ export interface IArticleMuteResponse extends IResponse {
294
+ }
295
+ export interface IArticleEditPinnedResponse extends IResponse {
296
+ }
297
+ export interface IArticleSuggestionDeleteResponse extends IResponse {
298
+ }
299
+ export interface IArticleVoteResponse extends IResponse {
300
+ }
301
+ export interface IChannelBlockManageResponse extends IResponse {
302
+ }
303
+ export interface IChannelPermissionManageResponse extends IResponse {
304
+ }
305
+ export interface IChannelSubscribeResponse extends IResponse {
306
+ }
307
+ export interface IChannelUnsubscribeResponse extends IResponse {
308
+ }
309
+ export interface IChannelUploadCoverAvatarResponse extends IResponse {
310
+ url?: string;
311
+ }
312
+ export interface IChannelProfile {
313
+ block_expire_date?: number | null;
314
+ block_reason?: string | null;
315
+ channel_id: number;
316
+ permission_creation_date: number;
317
+ is_blocked: boolean;
318
+ is_perm_blocked: boolean;
319
+ permission: number;
320
+ }
321
+ export interface IArticleCompact {
322
+ creation_date?: number;
323
+ last_update_date?: number;
324
+ id?: number;
325
+ }
326
+ export interface IChannelBlock {
327
+ added_date?: number;
328
+ expire_date?: number | null;
329
+ is_perm_blocked?: boolean;
330
+ is_reason_showing_enabled?: boolean;
331
+ reason?: string | null;
332
+ }
333
+ export interface IChannelCompact {
334
+ blog_profile_id?: number;
335
+ is_blog?: boolean;
336
+ is_commenting_enabled?: boolean;
337
+ is_deleted?: boolean;
338
+ avatar?: string;
339
+ cover?: string;
340
+ description?: string;
341
+ id?: number;
342
+ permission?: number;
343
+ title?: string;
344
+ }
345
+ export interface IArticleCommentCompact {
346
+ article?: IArticle;
347
+ embeddable_description?: string;
348
+ embeddable_id?: number;
349
+ embeddable_title?: string;
350
+ }
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArticleEditPinnedResult = exports.ArticleSuggestionDeleteResult = exports.ArticleSuggestionPublishResult = exports.EditorAvaliableResult = exports.ChannelUploadCoverAvatarResult = exports.ChannelBlockResult = exports.ChannelUnsubscribeResult = exports.ChannelSubscribeResult = exports.ChannelResult = exports.ChannelPermissionManageResult = exports.ChannelCreateEditResult = exports.BlogCreateResult = exports.ArticleResult = exports.ArticleDeleteResult = exports.ArticleCreateEditResult = void 0;
4
+ var ArticleCreateEditResult;
5
+ (function (ArticleCreateEditResult) {
6
+ ArticleCreateEditResult[ArticleCreateEditResult["InvalidRepostArticle"] = 2] = "InvalidRepostArticle";
7
+ ArticleCreateEditResult[ArticleCreateEditResult["InvalidPayload"] = 3] = "InvalidPayload";
8
+ ArticleCreateEditResult[ArticleCreateEditResult["InvalidTags"] = 4] = "InvalidTags";
9
+ ArticleCreateEditResult[ArticleCreateEditResult["TemporarilyDisabled"] = 5] = "TemporarilyDisabled";
10
+ ArticleCreateEditResult[ArticleCreateEditResult["ArticleLimitReached"] = 6] = "ArticleLimitReached";
11
+ ArticleCreateEditResult[ArticleCreateEditResult["ChannelNotFound"] = 7] = "ChannelNotFound";
12
+ ArticleCreateEditResult[ArticleCreateEditResult["ChannelNotOwned"] = 8] = "ChannelNotOwned";
13
+ ArticleCreateEditResult[ArticleCreateEditResult["ChannelCreatorBanned"] = 9] = "ChannelCreatorBanned";
14
+ ArticleCreateEditResult[ArticleCreateEditResult["ChannelBlocked"] = 10] = "ChannelBlocked";
15
+ ArticleCreateEditResult[ArticleCreateEditResult["ArticleNotFound"] = 11] = "ArticleNotFound";
16
+ ArticleCreateEditResult[ArticleCreateEditResult["ArticleDeleted"] = 12] = "ArticleDeleted";
17
+ ArticleCreateEditResult[ArticleCreateEditResult["BlogNotCreated"] = 13] = "BlogNotCreated";
18
+ })(ArticleCreateEditResult || (exports.ArticleCreateEditResult = ArticleCreateEditResult = {}));
19
+ var ArticleDeleteResult;
20
+ (function (ArticleDeleteResult) {
21
+ ArticleDeleteResult[ArticleDeleteResult["ArticleNotFound"] = 2] = "ArticleNotFound";
22
+ ArticleDeleteResult[ArticleDeleteResult["ArticleNotOwned"] = 3] = "ArticleNotOwned";
23
+ ArticleDeleteResult[ArticleDeleteResult["ArticleDeleted"] = 4] = "ArticleDeleted";
24
+ })(ArticleDeleteResult || (exports.ArticleDeleteResult = ArticleDeleteResult = {}));
25
+ var ArticleResult;
26
+ (function (ArticleResult) {
27
+ ArticleResult[ArticleResult["ArticleDeleted"] = 2] = "ArticleDeleted";
28
+ })(ArticleResult || (exports.ArticleResult = ArticleResult = {}));
29
+ var BlogCreateResult;
30
+ (function (BlogCreateResult) {
31
+ BlogCreateResult[BlogCreateResult["ReputationLevelTooLow"] = 2] = "ReputationLevelTooLow";
32
+ })(BlogCreateResult || (exports.BlogCreateResult = BlogCreateResult = {}));
33
+ var ChannelCreateEditResult;
34
+ (function (ChannelCreateEditResult) {
35
+ ChannelCreateEditResult[ChannelCreateEditResult["InvalidTitle"] = 2] = "InvalidTitle";
36
+ ChannelCreateEditResult[ChannelCreateEditResult["InvalidDescription"] = 3] = "InvalidDescription";
37
+ ChannelCreateEditResult[ChannelCreateEditResult["ChannelLimitReached"] = 4] = "ChannelLimitReached";
38
+ ChannelCreateEditResult[ChannelCreateEditResult["ChannelNotFound"] = 5] = "ChannelNotFound";
39
+ ChannelCreateEditResult[ChannelCreateEditResult["ChannelNotOwned"] = 6] = "ChannelNotOwned";
40
+ ChannelCreateEditResult[ChannelCreateEditResult["ChannelCreatorBanned"] = 7] = "ChannelCreatorBanned";
41
+ })(ChannelCreateEditResult || (exports.ChannelCreateEditResult = ChannelCreateEditResult = {}));
42
+ var ChannelPermissionManageResult;
43
+ (function (ChannelPermissionManageResult) {
44
+ ChannelPermissionManageResult[ChannelPermissionManageResult["PermissionInvalid"] = 2] = "PermissionInvalid";
45
+ ChannelPermissionManageResult[ChannelPermissionManageResult["TargetProfileNotFound"] = 3] = "TargetProfileNotFound";
46
+ ChannelPermissionManageResult[ChannelPermissionManageResult["ChannelNotFound"] = 4] = "ChannelNotFound";
47
+ ChannelPermissionManageResult[ChannelPermissionManageResult["ChannelNotOwned"] = 5] = "ChannelNotOwned";
48
+ })(ChannelPermissionManageResult || (exports.ChannelPermissionManageResult = ChannelPermissionManageResult = {}));
49
+ var ChannelResult;
50
+ (function (ChannelResult) {
51
+ ChannelResult[ChannelResult["ChannelNotFound"] = 2] = "ChannelNotFound";
52
+ })(ChannelResult || (exports.ChannelResult = ChannelResult = {}));
53
+ var ChannelSubscribeResult;
54
+ (function (ChannelSubscribeResult) {
55
+ ChannelSubscribeResult[ChannelSubscribeResult["SubscriptionExists"] = 2] = "SubscriptionExists";
56
+ ChannelSubscribeResult[ChannelSubscribeResult["SubscriptionLimitReached"] = 3] = "SubscriptionLimitReached";
57
+ })(ChannelSubscribeResult || (exports.ChannelSubscribeResult = ChannelSubscribeResult = {}));
58
+ var ChannelUnsubscribeResult;
59
+ (function (ChannelUnsubscribeResult) {
60
+ ChannelUnsubscribeResult[ChannelUnsubscribeResult["SubscriptionNotExists"] = 2] = "SubscriptionNotExists";
61
+ })(ChannelUnsubscribeResult || (exports.ChannelUnsubscribeResult = ChannelUnsubscribeResult = {}));
62
+ var ChannelBlockResult;
63
+ (function (ChannelBlockResult) {
64
+ ChannelBlockResult[ChannelBlockResult["ChannelNotFound"] = 2] = "ChannelNotFound";
65
+ ChannelBlockResult[ChannelBlockResult["ChannelNotOwned"] = 3] = "ChannelNotOwned";
66
+ ChannelBlockResult[ChannelBlockResult["BlockNotFound"] = 4] = "BlockNotFound";
67
+ })(ChannelBlockResult || (exports.ChannelBlockResult = ChannelBlockResult = {}));
68
+ var ChannelUploadCoverAvatarResult;
69
+ (function (ChannelUploadCoverAvatarResult) {
70
+ ChannelUploadCoverAvatarResult[ChannelUploadCoverAvatarResult["ChannelNotFound"] = 2] = "ChannelNotFound";
71
+ ChannelUploadCoverAvatarResult[ChannelUploadCoverAvatarResult["ChannelNotOwned"] = 3] = "ChannelNotOwned";
72
+ })(ChannelUploadCoverAvatarResult || (exports.ChannelUploadCoverAvatarResult = ChannelUploadCoverAvatarResult = {}));
73
+ var EditorAvaliableResult;
74
+ (function (EditorAvaliableResult) {
75
+ EditorAvaliableResult[EditorAvaliableResult["TemporarilyDisabled"] = 2] = "TemporarilyDisabled";
76
+ EditorAvaliableResult[EditorAvaliableResult["ArticleLimitReached"] = 3] = "ArticleLimitReached";
77
+ EditorAvaliableResult[EditorAvaliableResult["ChannelNotFound"] = 4] = "ChannelNotFound";
78
+ EditorAvaliableResult[EditorAvaliableResult["ChannelNotOwned"] = 5] = "ChannelNotOwned";
79
+ EditorAvaliableResult[EditorAvaliableResult["ChannelCreatorBanned"] = 6] = "ChannelCreatorBanned";
80
+ EditorAvaliableResult[EditorAvaliableResult["BlogNotCreated"] = 7] = "BlogNotCreated";
81
+ })(EditorAvaliableResult || (exports.EditorAvaliableResult = EditorAvaliableResult = {}));
82
+ var ArticleSuggestionPublishResult;
83
+ (function (ArticleSuggestionPublishResult) {
84
+ ArticleSuggestionPublishResult[ArticleSuggestionPublishResult["ArticleSuggestionNotFound"] = 2] = "ArticleSuggestionNotFound";
85
+ ArticleSuggestionPublishResult[ArticleSuggestionPublishResult["ChannelNotFound"] = 3] = "ChannelNotFound";
86
+ ArticleSuggestionPublishResult[ArticleSuggestionPublishResult["ChannelNotOwned"] = 4] = "ChannelNotOwned";
87
+ ArticleSuggestionPublishResult[ArticleSuggestionPublishResult["InvalidPayload"] = 5] = "InvalidPayload";
88
+ ArticleSuggestionPublishResult[ArticleSuggestionPublishResult["InvalidTags"] = 6] = "InvalidTags";
89
+ ArticleSuggestionPublishResult[ArticleSuggestionPublishResult["ChannelCreatorBanned"] = 7] = "ChannelCreatorBanned";
90
+ ArticleSuggestionPublishResult[ArticleSuggestionPublishResult["TemporarilyDisabled"] = 8] = "TemporarilyDisabled";
91
+ ArticleSuggestionPublishResult[ArticleSuggestionPublishResult["BlogNotCreated"] = 9] = "BlogNotCreated";
92
+ })(ArticleSuggestionPublishResult || (exports.ArticleSuggestionPublishResult = ArticleSuggestionPublishResult = {}));
93
+ var ArticleSuggestionDeleteResult;
94
+ (function (ArticleSuggestionDeleteResult) {
95
+ ArticleSuggestionDeleteResult[ArticleSuggestionDeleteResult["ArticleSuggestionNotFound"] = 2] = "ArticleSuggestionNotFound";
96
+ ArticleSuggestionDeleteResult[ArticleSuggestionDeleteResult["ArticleSuggestionNotOwned"] = 3] = "ArticleSuggestionNotOwned";
97
+ })(ArticleSuggestionDeleteResult || (exports.ArticleSuggestionDeleteResult = ArticleSuggestionDeleteResult = {}));
98
+ var ArticleEditPinnedResult;
99
+ (function (ArticleEditPinnedResult) {
100
+ ArticleEditPinnedResult[ArticleEditPinnedResult["ArticleDeleted"] = 2] = "ArticleDeleted";
101
+ ArticleEditPinnedResult[ArticleEditPinnedResult["ArticleNotFound"] = 3] = "ArticleNotFound";
102
+ ArticleEditPinnedResult[ArticleEditPinnedResult["ChannelNotFound"] = 4] = "ChannelNotFound";
103
+ ArticleEditPinnedResult[ArticleEditPinnedResult["ChannelNotOwned"] = 5] = "ChannelNotOwned";
104
+ })(ArticleEditPinnedResult || (exports.ArticleEditPinnedResult = ArticleEditPinnedResult = {}));
@@ -0,0 +1,105 @@
1
+ import { IProfile } from "./profile";
2
+ import { IRelease } from "./release";
3
+ import { IBaseComment, IBaseCompactComment, IResponse, CommentAddResult } from "./response";
4
+ import { IBaseRequestPageable } from "./request";
5
+ export interface ICollection {
6
+ '@id': number;
7
+ id: number;
8
+ creator: IProfile;
9
+ title: string;
10
+ description: string;
11
+ image: string;
12
+ creation_date: number;
13
+ last_update_date: number;
14
+ comment_count: number;
15
+ favorites_count: number;
16
+ is_private: boolean;
17
+ is_deleted: boolean;
18
+ is_favorite: boolean;
19
+ releases: IRelease[];
20
+ }
21
+ export interface ICollectionCompact {
22
+ id: number;
23
+ title: string;
24
+ image: string;
25
+ }
26
+ export interface ICollectionCompactComment extends IBaseCompactComment {
27
+ collection: ICollectionCompact;
28
+ }
29
+ export interface ICollectionResponse<T extends number = CollectionResult> extends IResponse<T> {
30
+ collection: ICollection;
31
+ watching_count: number;
32
+ plan_count: number;
33
+ completed_count: number;
34
+ hold_on_count: number;
35
+ dropped_count: number;
36
+ }
37
+ export interface IReleaseInCollectionRequest extends IBaseRequestPageable {
38
+ id: number;
39
+ sort: number;
40
+ }
41
+ export interface ICollectionCreateRequest {
42
+ title: string;
43
+ description: string;
44
+ releases: number[];
45
+ is_private: boolean;
46
+ }
47
+ export interface ICollectionComment extends IBaseComment {
48
+ collection: ICollection;
49
+ }
50
+ export interface ICollectionCommentAddResponse extends IResponse<CommentAddResult> {
51
+ comment?: ICollectionComment;
52
+ }
53
+ export declare enum CollectionResult {
54
+ InvalidId = 2,
55
+ IsPrivate = 3,
56
+ IsDeleted = 4
57
+ }
58
+ export declare enum FavoriteCollectionAddResult {
59
+ CollectionNotFound = 2,
60
+ CollectionAlreadyInFavorite = 3
61
+ }
62
+ export declare enum FavoriteCollectionDeleteResult {
63
+ CollectionNotFound = 2
64
+ }
65
+ export declare enum CollectionCreateEditResult {
66
+ InvalidTitle = 2,
67
+ InvalidDescription = 3,
68
+ InvalidReleases = 4,
69
+ CollectionLimitReached = 5,
70
+ CollectionNotFound = 6,
71
+ CollectionNotOwned = 7,
72
+ CollectionDeleted = 8,
73
+ ReleaseLimitReached = 9
74
+ }
75
+ export declare enum ReleaseAddCollectionResult {
76
+ CollectionNotFound = 2,
77
+ CollectionNotOwned = 3,
78
+ InvalidRelease = 4,
79
+ ReleaseAlreadyInCollection = 5,
80
+ CollectionDeleted = 6,
81
+ ReleaseLimitReached = 7
82
+ }
83
+ export declare enum CollectionDeleteResult {
84
+ CollectionNotFound = 2,
85
+ CollectionNotOwned = 3,
86
+ CollectionDeleted = 4
87
+ }
88
+ export interface ICollectionDeleteResponse extends IResponse {
89
+ }
90
+ export interface ICollectionEditImageResponse extends IResponse {
91
+ url?: string;
92
+ }
93
+ export interface ICollectionReportResponse extends IResponse {
94
+ }
95
+ export interface IFavoriteCollectionAddResponse extends IResponse {
96
+ }
97
+ export interface IFavoriteCollectionDeleteResponse extends IResponse {
98
+ }
99
+ export interface IReleaseAddCollectionResponse extends IResponse {
100
+ }
101
+ export interface ICollectionCommentCompact {
102
+ collection?: ICollectionCompact;
103
+ embeddable_id?: number;
104
+ embeddable_title?: string;
105
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CollectionDeleteResult = exports.ReleaseAddCollectionResult = exports.CollectionCreateEditResult = exports.FavoriteCollectionDeleteResult = exports.FavoriteCollectionAddResult = exports.CollectionResult = void 0;
4
+ var CollectionResult;
5
+ (function (CollectionResult) {
6
+ CollectionResult[CollectionResult["InvalidId"] = 2] = "InvalidId";
7
+ CollectionResult[CollectionResult["IsPrivate"] = 3] = "IsPrivate";
8
+ CollectionResult[CollectionResult["IsDeleted"] = 4] = "IsDeleted";
9
+ })(CollectionResult || (exports.CollectionResult = CollectionResult = {}));
10
+ var FavoriteCollectionAddResult;
11
+ (function (FavoriteCollectionAddResult) {
12
+ FavoriteCollectionAddResult[FavoriteCollectionAddResult["CollectionNotFound"] = 2] = "CollectionNotFound";
13
+ FavoriteCollectionAddResult[FavoriteCollectionAddResult["CollectionAlreadyInFavorite"] = 3] = "CollectionAlreadyInFavorite";
14
+ })(FavoriteCollectionAddResult || (exports.FavoriteCollectionAddResult = FavoriteCollectionAddResult = {}));
15
+ var FavoriteCollectionDeleteResult;
16
+ (function (FavoriteCollectionDeleteResult) {
17
+ FavoriteCollectionDeleteResult[FavoriteCollectionDeleteResult["CollectionNotFound"] = 2] = "CollectionNotFound";
18
+ })(FavoriteCollectionDeleteResult || (exports.FavoriteCollectionDeleteResult = FavoriteCollectionDeleteResult = {}));
19
+ var CollectionCreateEditResult;
20
+ (function (CollectionCreateEditResult) {
21
+ CollectionCreateEditResult[CollectionCreateEditResult["InvalidTitle"] = 2] = "InvalidTitle";
22
+ CollectionCreateEditResult[CollectionCreateEditResult["InvalidDescription"] = 3] = "InvalidDescription";
23
+ CollectionCreateEditResult[CollectionCreateEditResult["InvalidReleases"] = 4] = "InvalidReleases";
24
+ CollectionCreateEditResult[CollectionCreateEditResult["CollectionLimitReached"] = 5] = "CollectionLimitReached";
25
+ CollectionCreateEditResult[CollectionCreateEditResult["CollectionNotFound"] = 6] = "CollectionNotFound";
26
+ CollectionCreateEditResult[CollectionCreateEditResult["CollectionNotOwned"] = 7] = "CollectionNotOwned";
27
+ CollectionCreateEditResult[CollectionCreateEditResult["CollectionDeleted"] = 8] = "CollectionDeleted";
28
+ CollectionCreateEditResult[CollectionCreateEditResult["ReleaseLimitReached"] = 9] = "ReleaseLimitReached";
29
+ })(CollectionCreateEditResult || (exports.CollectionCreateEditResult = CollectionCreateEditResult = {}));
30
+ var ReleaseAddCollectionResult;
31
+ (function (ReleaseAddCollectionResult) {
32
+ ReleaseAddCollectionResult[ReleaseAddCollectionResult["CollectionNotFound"] = 2] = "CollectionNotFound";
33
+ ReleaseAddCollectionResult[ReleaseAddCollectionResult["CollectionNotOwned"] = 3] = "CollectionNotOwned";
34
+ ReleaseAddCollectionResult[ReleaseAddCollectionResult["InvalidRelease"] = 4] = "InvalidRelease";
35
+ ReleaseAddCollectionResult[ReleaseAddCollectionResult["ReleaseAlreadyInCollection"] = 5] = "ReleaseAlreadyInCollection";
36
+ ReleaseAddCollectionResult[ReleaseAddCollectionResult["CollectionDeleted"] = 6] = "CollectionDeleted";
37
+ ReleaseAddCollectionResult[ReleaseAddCollectionResult["ReleaseLimitReached"] = 7] = "ReleaseLimitReached";
38
+ })(ReleaseAddCollectionResult || (exports.ReleaseAddCollectionResult = ReleaseAddCollectionResult = {}));
39
+ var CollectionDeleteResult;
40
+ (function (CollectionDeleteResult) {
41
+ CollectionDeleteResult[CollectionDeleteResult["CollectionNotFound"] = 2] = "CollectionNotFound";
42
+ CollectionDeleteResult[CollectionDeleteResult["CollectionNotOwned"] = 3] = "CollectionNotOwned";
43
+ CollectionDeleteResult[CollectionDeleteResult["CollectionDeleted"] = 4] = "CollectionDeleted";
44
+ })(CollectionDeleteResult || (exports.CollectionDeleteResult = CollectionDeleteResult = {}));
@@ -0,0 +1,41 @@
1
+ import { IResponse } from "./response";
2
+ export declare const DEFAULT_VERSION_CODE = 25082901;
3
+ export interface IConfigRequest {
4
+ versionCode?: number;
5
+ beta?: boolean;
6
+ shouldUseMirrorUrls?: boolean;
7
+ }
8
+ export interface IConfigUrlsResponse extends IResponse {
9
+ api_urls: string[];
10
+ editor_url?: string;
11
+ static_domain?: string;
12
+ should_use_mirror_urls: boolean;
13
+ }
14
+ export interface ITogglesResponse extends IResponse {
15
+ minVersionCode?: number;
16
+ lastVersionCode?: number;
17
+ whatsNew?: string;
18
+ downloadLink?: string;
19
+ baseUrl?: string;
20
+ apiUrl?: string;
21
+ apiAltUrl?: string;
22
+ apiAltAvailable?: boolean;
23
+ editorUrl?: string;
24
+ staticDomain?: string;
25
+ pageNoConnectionUrl?: string;
26
+ torlookUrl?: string;
27
+ kodikVideoLinksUrl?: string;
28
+ iframeEmbedUrl?: string;
29
+ inAppUpdates?: boolean;
30
+ snowfall?: boolean;
31
+ sponsorshipAvailable?: boolean;
32
+ sponsorshipPromotion?: boolean;
33
+ sponsorshipText?: string;
34
+ googleAuthAvailable?: boolean;
35
+ vkAuthAvailable?: boolean;
36
+ telegramAuthAvailable?: boolean;
37
+ [key: string]: unknown;
38
+ }
39
+ export interface ILatestArticleResponse extends IResponse {
40
+ article_id?: number | null;
41
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_VERSION_CODE = void 0;
4
+ exports.DEFAULT_VERSION_CODE = 25082901;
@@ -0,0 +1,13 @@
1
+ export * from "./response";
2
+ export * from "./profile";
3
+ export * from "./auth";
4
+ export * from "./request";
5
+ export * from "./release";
6
+ export * from "./settings";
7
+ export * from "./notification";
8
+ export * from "./collection";
9
+ export * from "./channel";
10
+ export * from "./config";
11
+ export type Writable<T> = {
12
+ -readonly [K in keyof T]: T[K];
13
+ };