@mx-space/api-client 0.4.10 → 0.4.11

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.
package/build/index.d.ts CHANGED
@@ -353,21 +353,32 @@ export interface PaginationParams {
353
353
  size?: number;
354
354
  page?: number;
355
355
  }
356
+ declare enum RefType {
357
+ Page = "Page",
358
+ Post = "Post",
359
+ Note = "Note"
360
+ }
356
361
  export interface CommentModel extends BaseModel {
357
- refType: string;
362
+ refType: RefType;
358
363
  state: number;
359
- children: CommentModel[];
360
- commentsIndex: number;
364
+ comments_index: number;
361
365
  author: string;
362
366
  text: string;
363
- mail: string;
364
- url: string;
365
- ip: string;
366
- agent: string;
367
+ mail?: string;
368
+ url?: string;
369
+ ip?: string;
370
+ agent?: string;
367
371
  key: string;
368
- pid: string;
369
- modified: string;
372
+ ref: string | Ref;
370
373
  avatar: string;
374
+ parent?: CommentModel;
375
+ }
376
+ export interface Ref {
377
+ id: string;
378
+ category_id?: string;
379
+ slug: string;
380
+ title: string;
381
+ category?: CategoryModel;
371
382
  }
372
383
  declare class CommentDto {
373
384
  author: string;
@@ -1,23 +1,31 @@
1
- import { BaseModel, Pager } from './base';
1
+ import { BaseModel } from './base';
2
+ import { CategoryModel } from './category';
3
+ export declare enum RefType {
4
+ Page = "Page",
5
+ Post = "Post",
6
+ Note = "Note"
7
+ }
2
8
  export interface CommentModel extends BaseModel {
3
- refType: string;
9
+ refType: RefType;
4
10
  state: number;
5
- children: CommentModel[];
6
- commentsIndex: number;
11
+ comments_index: number;
7
12
  author: string;
8
13
  text: string;
9
- mail: string;
10
- url: string;
11
- ip: string;
12
- agent: string;
14
+ mail?: string;
15
+ url?: string;
16
+ ip?: string;
17
+ agent?: string;
13
18
  key: string;
14
- pid: string;
15
- modified: string;
19
+ ref: string | Ref;
16
20
  avatar: string;
21
+ parent?: CommentModel;
17
22
  }
18
- export interface CommentsResponse {
19
- data: CommentModel[];
20
- pagination: Pager;
23
+ export interface Ref {
24
+ id: string;
25
+ category_id?: string;
26
+ slug: string;
27
+ title: string;
28
+ category?: CategoryModel;
21
29
  }
22
30
  export declare enum CommentState {
23
31
  Unread = 0,
@@ -1,3 +1,9 @@
1
+ export var RefType;
2
+ (function (RefType) {
3
+ RefType["Page"] = "Page";
4
+ RefType["Post"] = "Post";
5
+ RefType["Note"] = "Note";
6
+ })(RefType || (RefType = {}));
1
7
  export var CommentState;
2
8
  (function (CommentState) {
3
9
  CommentState[CommentState["Unread"] = 0] = "Unread";
@@ -1 +1 @@
1
- {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/models/comment.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mDAAM,CAAA;IACN,+CAAI,CAAA;IACJ,+CAAI,CAAA;AACN,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
1
+ {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/models/comment.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,wBAAa,CAAA;IACb,wBAAa,CAAA;IACb,wBAAa,CAAA;AACf,CAAC,EAJW,OAAO,KAAP,OAAO,QAIlB;AAwBD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mDAAM,CAAA;IACN,+CAAI,CAAA;IACJ,+CAAI,CAAA;AACN,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
@@ -1,23 +1,31 @@
1
- import { BaseModel, Pager } from './base';
1
+ import { BaseModel } from './base';
2
+ import { CategoryModel } from './category';
3
+ export declare enum RefType {
4
+ Page = "Page",
5
+ Post = "Post",
6
+ Note = "Note"
7
+ }
2
8
  export interface CommentModel extends BaseModel {
3
- refType: string;
9
+ refType: RefType;
4
10
  state: number;
5
- children: CommentModel[];
6
- commentsIndex: number;
11
+ comments_index: number;
7
12
  author: string;
8
13
  text: string;
9
- mail: string;
10
- url: string;
11
- ip: string;
12
- agent: string;
14
+ mail?: string;
15
+ url?: string;
16
+ ip?: string;
17
+ agent?: string;
13
18
  key: string;
14
- pid: string;
15
- modified: string;
19
+ ref: string | Ref;
16
20
  avatar: string;
21
+ parent?: CommentModel;
17
22
  }
18
- export interface CommentsResponse {
19
- data: CommentModel[];
20
- pagination: Pager;
23
+ export interface Ref {
24
+ id: string;
25
+ category_id?: string;
26
+ slug: string;
27
+ title: string;
28
+ category?: CategoryModel;
21
29
  }
22
30
  export declare enum CommentState {
23
31
  Unread = 0,
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommentState = void 0;
3
+ exports.CommentState = exports.RefType = void 0;
4
+ var RefType;
5
+ (function (RefType) {
6
+ RefType["Page"] = "Page";
7
+ RefType["Post"] = "Post";
8
+ RefType["Note"] = "Note";
9
+ })(RefType = exports.RefType || (exports.RefType = {}));
4
10
  var CommentState;
5
11
  (function (CommentState) {
6
12
  CommentState[CommentState["Unread"] = 0] = "Unread";
@@ -1 +1 @@
1
- {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/models/comment.ts"],"names":[],"mappings":";;;AA0BA,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mDAAM,CAAA;IACN,+CAAI,CAAA;IACJ,+CAAI,CAAA;AACN,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"}
1
+ {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/models/comment.ts"],"names":[],"mappings":";;;AAGA,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,wBAAa,CAAA;IACb,wBAAa,CAAA;IACb,wBAAa,CAAA;AACf,CAAC,EAJW,OAAO,GAAP,eAAO,KAAP,eAAO,QAIlB;AAwBD,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mDAAM,CAAA;IACN,+CAAI,CAAA;IACJ,+CAAI,CAAA;AACN,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/api-client",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "description": "A api client for mx-space server@next",
5
5
  "author": "Innei",
6
6
  "license": "MIT",