@mx-space/api-client 0.4.1 → 0.4.5

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
@@ -74,9 +74,18 @@ declare class BaseModel {
74
74
  created?: Date;
75
75
  id?: string;
76
76
  }
77
- export interface PostModel {
78
- commentsIndex: number;
77
+ export interface BaseCommentIndexModel {
78
+ commentsIndex?: number;
79
79
  allowComment: boolean;
80
+ }
81
+ export interface TextBaseModel extends BaseCommentIndexModel {
82
+ title: string;
83
+ text: string;
84
+ images?: Image[];
85
+ modified: string | null;
86
+ }
87
+ export interface PostModel extends TextBaseModel {
88
+ summary?: string;
80
89
  hide: boolean;
81
90
  copyright: boolean;
82
91
  tags: string[];
@@ -87,7 +96,6 @@ export interface PostModel {
87
96
  slug: string;
88
97
  categoryId: string;
89
98
  images: Image[];
90
- modified: string;
91
99
  created: string;
92
100
  category: CategoryModel;
93
101
  }
@@ -111,7 +119,7 @@ export interface TagModel {
111
119
  count: number;
112
120
  name: string;
113
121
  }
114
- export interface NoteModel {
122
+ export interface NoteModel extends TextBaseModel {
115
123
  id: string;
116
124
  hide: boolean;
117
125
  count: {
@@ -124,7 +132,6 @@ export interface NoteModel {
124
132
  weather?: string;
125
133
  hasMemory?: boolean;
126
134
  created: string;
127
- modified: string;
128
135
  secret?: Date;
129
136
  password?: string | null;
130
137
  nid: number;
@@ -150,20 +157,15 @@ declare enum EnumPageType {
150
157
  "html" = "html",
151
158
  "frame" = "frame"
152
159
  }
153
- export interface PageModel {
160
+ export interface PageModel extends TextBaseModel {
154
161
  created: string;
155
- modified: string;
156
162
  id: string;
157
163
  /** Slug */
158
164
  slug: string;
159
- /** Title */
160
- title: string;
161
165
  /** SubTitle */
162
166
  subtitle?: string;
163
167
  /** Order */
164
168
  order?: number;
165
- /** Text */
166
- text: string;
167
169
  /** Type (MD | html | frame) */
168
170
  type?: EnumPageType;
169
171
  /** Other Options */
@@ -733,7 +735,8 @@ export declare class SearchController implements IController {
733
735
  }
734
736
  declare enum SnippetType {
735
737
  JSON = "json",
736
- Text = "text"
738
+ Text = "text",
739
+ YAML = "yaml"
737
740
  }
738
741
  export interface SnippetModel<T = unknown> extends BaseModel {
739
742
  type: SnippetType;
@@ -25,3 +25,13 @@ export declare class BaseModel {
25
25
  created?: Date;
26
26
  id?: string;
27
27
  }
28
+ export interface BaseCommentIndexModel {
29
+ commentsIndex?: number;
30
+ allowComment: boolean;
31
+ }
32
+ export interface TextBaseModel extends BaseCommentIndexModel {
33
+ title: string;
34
+ text: string;
35
+ images?: Image[];
36
+ modified: string | null;
37
+ }
@@ -1,4 +1,5 @@
1
- export interface NoteModel {
1
+ import { TextBaseModel } from './base';
2
+ export interface NoteModel extends TextBaseModel {
2
3
  id: string;
3
4
  hide: boolean;
4
5
  count: {
@@ -11,7 +12,6 @@ export interface NoteModel {
11
12
  weather?: string;
12
13
  hasMemory?: boolean;
13
14
  created: string;
14
- modified: string;
15
15
  secret?: Date;
16
16
  password?: string | null;
17
17
  nid: number;
@@ -1,22 +1,18 @@
1
+ import { TextBaseModel } from './base';
1
2
  export declare enum EnumPageType {
2
3
  'md' = "md",
3
4
  'html' = "html",
4
5
  'frame' = "frame"
5
6
  }
6
- export interface PageModel {
7
+ export interface PageModel extends TextBaseModel {
7
8
  created: string;
8
- modified: string;
9
9
  id: string;
10
10
  /** Slug */
11
11
  slug: string;
12
- /** Title */
13
- title: string;
14
12
  /** SubTitle */
15
13
  subtitle?: string;
16
14
  /** Order */
17
15
  order?: number;
18
- /** Text */
19
- text: string;
20
16
  /** Type (MD | html | frame) */
21
17
  type?: EnumPageType;
22
18
  /** Other Options */
@@ -1 +1 @@
1
- {"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/models/page.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
1
+ {"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/models/page.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
@@ -1,8 +1,7 @@
1
- import { Count, Image } from './base';
1
+ import { Count, Image, TextBaseModel } from './base';
2
2
  import { CategoryModel } from './category';
3
- export interface PostModel {
4
- commentsIndex: number;
5
- allowComment: boolean;
3
+ export interface PostModel extends TextBaseModel {
4
+ summary?: string;
6
5
  hide: boolean;
7
6
  copyright: boolean;
8
7
  tags: string[];
@@ -13,7 +12,6 @@ export interface PostModel {
13
12
  slug: string;
14
13
  categoryId: string;
15
14
  images: Image[];
16
- modified: string;
17
15
  created: string;
18
16
  category: CategoryModel;
19
17
  }
@@ -1,7 +1,8 @@
1
1
  import { BaseModel } from './base';
2
2
  export declare enum SnippetType {
3
3
  JSON = "json",
4
- Text = "text"
4
+ Text = "text",
5
+ YAML = "yaml"
5
6
  }
6
7
  export interface SnippetModel<T = unknown> extends BaseModel {
7
8
  type: SnippetType;
@@ -3,5 +3,6 @@ export var SnippetType;
3
3
  SnippetType["JSON"] = "json";
4
4
  // Function = 'function',
5
5
  SnippetType["Text"] = "text";
6
+ SnippetType["YAML"] = "yaml";
6
7
  })(SnippetType || (SnippetType = {}));
7
8
  //# sourceMappingURL=snippet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../src/models/snippet.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,yBAAyB;IACzB,4BAAa,CAAA;AACf,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB"}
1
+ {"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../src/models/snippet.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,yBAAyB;IACzB,4BAAa,CAAA;IACb,4BAAa,CAAA;AACf,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB"}
@@ -25,3 +25,13 @@ export declare class BaseModel {
25
25
  created?: Date;
26
26
  id?: string;
27
27
  }
28
+ export interface BaseCommentIndexModel {
29
+ commentsIndex?: number;
30
+ allowComment: boolean;
31
+ }
32
+ export interface TextBaseModel extends BaseCommentIndexModel {
33
+ title: string;
34
+ text: string;
35
+ images?: Image[];
36
+ modified: string | null;
37
+ }
@@ -1,4 +1,5 @@
1
- export interface NoteModel {
1
+ import { TextBaseModel } from './base';
2
+ export interface NoteModel extends TextBaseModel {
2
3
  id: string;
3
4
  hide: boolean;
4
5
  count: {
@@ -11,7 +12,6 @@ export interface NoteModel {
11
12
  weather?: string;
12
13
  hasMemory?: boolean;
13
14
  created: string;
14
- modified: string;
15
15
  secret?: Date;
16
16
  password?: string | null;
17
17
  nid: number;
@@ -1,22 +1,18 @@
1
+ import { TextBaseModel } from './base';
1
2
  export declare enum EnumPageType {
2
3
  'md' = "md",
3
4
  'html' = "html",
4
5
  'frame' = "frame"
5
6
  }
6
- export interface PageModel {
7
+ export interface PageModel extends TextBaseModel {
7
8
  created: string;
8
- modified: string;
9
9
  id: string;
10
10
  /** Slug */
11
11
  slug: string;
12
- /** Title */
13
- title: string;
14
12
  /** SubTitle */
15
13
  subtitle?: string;
16
14
  /** Order */
17
15
  order?: number;
18
- /** Text */
19
- text: string;
20
16
  /** Type (MD | html | frame) */
21
17
  type?: EnumPageType;
22
18
  /** Other Options */
@@ -1 +1 @@
1
- {"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/models/page.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"}
1
+ {"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/models/page.ts"],"names":[],"mappings":";;;AAEA,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"}
@@ -1,8 +1,7 @@
1
- import { Count, Image } from './base';
1
+ import { Count, Image, TextBaseModel } from './base';
2
2
  import { CategoryModel } from './category';
3
- export interface PostModel {
4
- commentsIndex: number;
5
- allowComment: boolean;
3
+ export interface PostModel extends TextBaseModel {
4
+ summary?: string;
6
5
  hide: boolean;
7
6
  copyright: boolean;
8
7
  tags: string[];
@@ -13,7 +12,6 @@ export interface PostModel {
13
12
  slug: string;
14
13
  categoryId: string;
15
14
  images: Image[];
16
- modified: string;
17
15
  created: string;
18
16
  category: CategoryModel;
19
17
  }
@@ -1,7 +1,8 @@
1
1
  import { BaseModel } from './base';
2
2
  export declare enum SnippetType {
3
3
  JSON = "json",
4
- Text = "text"
4
+ Text = "text",
5
+ YAML = "yaml"
5
6
  }
6
7
  export interface SnippetModel<T = unknown> extends BaseModel {
7
8
  type: SnippetType;
@@ -6,5 +6,6 @@ var SnippetType;
6
6
  SnippetType["JSON"] = "json";
7
7
  // Function = 'function',
8
8
  SnippetType["Text"] = "text";
9
+ SnippetType["YAML"] = "yaml";
9
10
  })(SnippetType = exports.SnippetType || (exports.SnippetType = {}));
10
11
  //# sourceMappingURL=snippet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../src/models/snippet.ts"],"names":[],"mappings":";;;AACA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,yBAAyB;IACzB,4BAAa,CAAA;AACf,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB"}
1
+ {"version":3,"file":"snippet.js","sourceRoot":"","sources":["../../src/models/snippet.ts"],"names":[],"mappings":";;;AACA,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,yBAAyB;IACzB,4BAAa,CAAA;IACb,4BAAa,CAAA;AACf,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/api-client",
3
- "version": "0.4.1",
3
+ "version": "0.4.5",
4
4
  "description": "A api client for mx-space server@next",
5
5
  "author": "Innei",
6
6
  "license": "MIT",
@@ -66,25 +66,25 @@
66
66
  "@types/express": "4.17.13",
67
67
  "@types/jest": "27.0.3",
68
68
  "@types/lodash": "4.14.178",
69
- "@types/node": "16.11.15",
70
- "@types/react": "17.0.37",
69
+ "@types/node": "16.11.17",
70
+ "@types/react": "17.0.38",
71
71
  "@types/react-dom": "17.0.11",
72
72
  "@zerollup/ts-transform-paths": "1.7.18",
73
73
  "axios": "0.24.0",
74
74
  "cors": "2.8.5",
75
75
  "dts-bundle-generator": "6.2.0",
76
- "esbuild": "0.14.7",
76
+ "esbuild": "0.14.8",
77
77
  "express": "4.17.2",
78
78
  "gh-pages": "3.2.3",
79
79
  "husky": "7.0.4",
80
80
  "jest": "27.4.5",
81
- "lint-staged": "12.1.3",
81
+ "lint-staged": "12.1.4",
82
82
  "lodash": "4.17.21",
83
83
  "prettier": "2.5.1",
84
84
  "react": "18.0.0-rc.0-next-f2a59df48-20211208",
85
85
  "react-dom": "18.0.0-rc.0-next-f2a59df48-20211208",
86
86
  "react-json-view": "1.21.3",
87
- "rollup": "2.61.0",
87
+ "rollup": "2.62.0",
88
88
  "rollup-plugin-peer-deps-external": "2.2.4",
89
89
  "rollup-plugin-terser": "7.0.2",
90
90
  "ts-jest": "27.1.2",