anixartjs 0.1.0 → 0.1.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.
@@ -1,5 +1,6 @@
1
1
  import { IProfile } from "./profile";
2
- import { IResponse, IBaseComment, CommentAddResult } from "./response";
2
+ import { IBaseSearchRequest } from "./request";
3
+ import { IResponse, IBaseComment, CommentAddResult, IPageableResponse } from "./response";
3
4
  export interface IChannel {
4
5
  id: number;
5
6
  title: string;
@@ -167,9 +168,12 @@ export interface IChannelBlockInfoResponse extends IResponse<ChannelBlockResult>
167
168
  }
168
169
  export interface IChannelSearchRequest {
169
170
  query: string;
170
- permission: number;
171
+ permission?: number;
171
172
  is_blog: boolean;
172
- is_subscibed: boolean;
173
+ is_subscribed: boolean;
174
+ }
175
+ export interface IArticleSearchRequest extends Omit<IBaseSearchRequest, "searchBy"> {
176
+ channel_id: number;
173
177
  }
174
178
  export interface IArticleComment extends IBaseComment {
175
179
  article: IArticle;
@@ -177,6 +181,19 @@ export interface IArticleComment extends IBaseComment {
177
181
  export interface IChannelMediaTokenResponse extends IResponse<EditorAvaliableResult> {
178
182
  media_upload_token: string;
179
183
  }
184
+ export interface IFeedSearchResponse extends IResponse {
185
+ articles: IPageableResponse<IArticle>;
186
+ channels: IPageableResponse<IChannel>;
187
+ tags: IPageableResponse<string>;
188
+ blogs: IPageableResponse<IChannel>;
189
+ }
190
+ export interface IChannelSubscribersSearchRequest extends IBaseSearchRequest {
191
+ channel_id: number;
192
+ }
193
+ export interface IChannelPermissionManageRequest {
194
+ target_profile_id: number;
195
+ permission: number;
196
+ }
180
197
  export declare enum ArticleCreateEditResult {
181
198
  InvalidRepostArticle = 2,
182
199
  InvalidPayload = 3,
@@ -16,6 +16,10 @@ export interface IFriendNotification extends IBaseNotification {
16
16
  status: string;
17
17
  by_profile: IProfile;
18
18
  }
19
+ export interface IArticleNotification extends IBaseNotification {
20
+ '@id': number;
21
+ article: number;
22
+ }
19
23
  export interface IRelatedReleaseNotification extends IBaseNotification {
20
24
  '@id': number;
21
25
  release: IRelease | number;
@@ -21,7 +21,7 @@ export interface IBookmarkRequest extends IBaseRequestPageable {
21
21
  id: number;
22
22
  type: BookmarkType;
23
23
  sort: BookmarkSortType;
24
- filter: number;
24
+ filter?: number;
25
25
  }
26
26
  export interface IProfileToken {
27
27
  id: string;
@@ -137,6 +137,23 @@ export interface IProfileShort {
137
137
  friend_status: number;
138
138
  friend_count: number;
139
139
  }
140
+ export interface IProfileChannel {
141
+ id: number;
142
+ login: string;
143
+ avatar: string;
144
+ permission_creation_date: number;
145
+ permission: number;
146
+ badge_name: string | null;
147
+ badge_type: number | null;
148
+ badge_url: string | null;
149
+ is_blocked: boolean;
150
+ is_sponsor: boolean;
151
+ is_verified: boolean;
152
+ is_perm_blocked: boolean;
153
+ channel_id: number;
154
+ block_reason: string | null;
155
+ block_expire_date: number | null;
156
+ }
140
157
  export interface IProfileResponse extends IResponse {
141
158
  profile: IProfile;
142
159
  is_my_profile: boolean;
@@ -186,3 +203,6 @@ export declare enum AchivementResult {
186
203
  AlreadyGranted = 2,
187
204
  AchivementNotFound = 3
188
205
  }
206
+ export declare enum BlocklistAddResult {
207
+ AlreadyInBlocklist = 2
208
+ }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  //Thanks Nekonyx for this types (https://github.com/Nekonyx/anixart-api/blob/master/src/contracts/profile.ts)
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.AchivementResult = exports.RemoveFriendRequestResult = exports.SendFriendRequestResult = exports.BookmarkSortType = exports.BookmarkType = void 0;
4
+ exports.BlocklistAddResult = exports.AchivementResult = exports.RemoveFriendRequestResult = exports.SendFriendRequestResult = exports.BookmarkSortType = exports.BookmarkType = void 0;
5
5
  var BookmarkType;
6
6
  (function (BookmarkType) {
7
7
  BookmarkType[BookmarkType["Watching"] = 1] = "Watching";
@@ -40,3 +40,7 @@ var AchivementResult;
40
40
  AchivementResult[AchivementResult["AlreadyGranted"] = 2] = "AlreadyGranted";
41
41
  AchivementResult[AchivementResult["AchivementNotFound"] = 3] = "AchivementNotFound";
42
42
  })(AchivementResult || (exports.AchivementResult = AchivementResult = {}));
43
+ var BlocklistAddResult;
44
+ (function (BlocklistAddResult) {
45
+ BlocklistAddResult[BlocklistAddResult["AlreadyInBlocklist"] = 2] = "AlreadyInBlocklist";
46
+ })(BlocklistAddResult || (exports.BlocklistAddResult = BlocklistAddResult = {}));
@@ -1,6 +1,6 @@
1
1
  import { IPageableResponse, IResponse, IBaseComment, CommentAddResult } from './response';
2
- import { IProfile } from './profile';
3
- import { IBaseRequestPageable } from './request';
2
+ import { IProfile, BookmarkType } from './profile';
3
+ import { IBaseRequestPageable, IBaseSearchRequest } from './request';
4
4
  export declare enum ReleaseCategory {
5
5
  Unknown = 0,
6
6
  Series = 1,
@@ -314,3 +314,6 @@ export interface IExportRelease {
314
314
  profile_list_status: number;
315
315
  is_favorite: boolean;
316
316
  }
317
+ export interface IReleasesInBookmarksSearchRequest extends IBaseSearchRequest {
318
+ type: BookmarkType;
319
+ }
@@ -59,9 +59,6 @@ export declare enum ChangeLoginResult {
59
59
  LoginAlreadyTaken = 3,
60
60
  TimeLimit = 4
61
61
  }
62
- export declare enum BlocklistAddResult {
63
- AlreadyInBlocklist = 2
64
- }
65
62
  export declare enum ChangeEmailResult {
66
63
  InvalidEmail = 2,
67
64
  InvalidCurrentEmail = 3,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PrivacyFriendRequestState = exports.PrivacyState = exports.PasswordChangeResult = exports.ChangePasswordResult = exports.ChangeEmailConfirmResult = exports.ChangeEmailResult = exports.BlocklistAddResult = exports.ChangeLoginResult = exports.SocialEditResult = void 0;
3
+ exports.PrivacyFriendRequestState = exports.PrivacyState = exports.PasswordChangeResult = exports.ChangePasswordResult = exports.ChangeEmailConfirmResult = exports.ChangeEmailResult = exports.ChangeLoginResult = exports.SocialEditResult = void 0;
4
4
  var SocialEditResult;
5
5
  (function (SocialEditResult) {
6
6
  SocialEditResult[SocialEditResult["InvalidVk"] = 2] = "InvalidVk";
@@ -15,10 +15,6 @@ var ChangeLoginResult;
15
15
  ChangeLoginResult[ChangeLoginResult["LoginAlreadyTaken"] = 3] = "LoginAlreadyTaken";
16
16
  ChangeLoginResult[ChangeLoginResult["TimeLimit"] = 4] = "TimeLimit";
17
17
  })(ChangeLoginResult || (exports.ChangeLoginResult = ChangeLoginResult = {}));
18
- var BlocklistAddResult;
19
- (function (BlocklistAddResult) {
20
- BlocklistAddResult[BlocklistAddResult["AlreadyInBlocklist"] = 2] = "AlreadyInBlocklist";
21
- })(BlocklistAddResult || (exports.BlocklistAddResult = BlocklistAddResult = {}));
22
18
  var ChangeEmailResult;
23
19
  (function (ChangeEmailResult) {
24
20
  ChangeEmailResult[ChangeEmailResult["InvalidEmail"] = 2] = "InvalidEmail";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anixartjs",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Anixart API Wrapper for NodeJS",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",