@mx-space/api-client 0.4.2 → 0.4.3

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,7 +74,13 @@ declare class BaseModel {
74
74
  created?: Date;
75
75
  id?: string;
76
76
  }
77
- export interface PostModel {
77
+ export interface TextBaseModel {
78
+ title: string;
79
+ text: string;
80
+ images?: Image[];
81
+ modified: string | null;
82
+ }
83
+ export interface PostModel extends TextBaseModel {
78
84
  commentsIndex: number;
79
85
  allowComment: boolean;
80
86
  hide: boolean;
@@ -87,7 +93,6 @@ export interface PostModel {
87
93
  slug: string;
88
94
  categoryId: string;
89
95
  images: Image[];
90
- modified: string;
91
96
  created: string;
92
97
  category: CategoryModel;
93
98
  }
@@ -111,7 +116,7 @@ export interface TagModel {
111
116
  count: number;
112
117
  name: string;
113
118
  }
114
- export interface NoteModel {
119
+ export interface NoteModel extends TextBaseModel {
115
120
  id: string;
116
121
  hide: boolean;
117
122
  count: {
@@ -124,7 +129,6 @@ export interface NoteModel {
124
129
  weather?: string;
125
130
  hasMemory?: boolean;
126
131
  created: string;
127
- modified: string;
128
132
  secret?: Date;
129
133
  password?: string | null;
130
134
  nid: number;
@@ -150,20 +154,15 @@ declare enum EnumPageType {
150
154
  "html" = "html",
151
155
  "frame" = "frame"
152
156
  }
153
- export interface PageModel {
157
+ export interface PageModel extends TextBaseModel {
154
158
  created: string;
155
- modified: string;
156
159
  id: string;
157
160
  /** Slug */
158
161
  slug: string;
159
- /** Title */
160
- title: string;
161
162
  /** SubTitle */
162
163
  subtitle?: string;
163
164
  /** Order */
164
165
  order?: number;
165
- /** Text */
166
- text: string;
167
166
  /** Type (MD | html | frame) */
168
167
  type?: EnumPageType;
169
168
  /** Other Options */
@@ -25,3 +25,9 @@ export declare class BaseModel {
25
25
  created?: Date;
26
26
  id?: string;
27
27
  }
28
+ export interface TextBaseModel {
29
+ title: string;
30
+ text: string;
31
+ images?: Image[];
32
+ modified: string | null;
33
+ }
@@ -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,6 +1,6 @@
1
- import { Count, Image } from './base';
1
+ import { Count, Image, TextBaseModel } from './base';
2
2
  import { CategoryModel } from './category';
3
- export interface PostModel {
3
+ export interface PostModel extends TextBaseModel {
4
4
  commentsIndex: number;
5
5
  allowComment: boolean;
6
6
  hide: boolean;
@@ -13,7 +13,6 @@ export interface PostModel {
13
13
  slug: string;
14
14
  categoryId: string;
15
15
  images: Image[];
16
- modified: string;
17
16
  created: string;
18
17
  category: CategoryModel;
19
18
  }
@@ -25,3 +25,9 @@ export declare class BaseModel {
25
25
  created?: Date;
26
26
  id?: string;
27
27
  }
28
+ export interface TextBaseModel {
29
+ title: string;
30
+ text: string;
31
+ images?: Image[];
32
+ modified: string | null;
33
+ }
@@ -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,6 +1,6 @@
1
- import { Count, Image } from './base';
1
+ import { Count, Image, TextBaseModel } from './base';
2
2
  import { CategoryModel } from './category';
3
- export interface PostModel {
3
+ export interface PostModel extends TextBaseModel {
4
4
  commentsIndex: number;
5
5
  allowComment: boolean;
6
6
  hide: boolean;
@@ -13,7 +13,6 @@ export interface PostModel {
13
13
  slug: string;
14
14
  categoryId: string;
15
15
  images: Image[];
16
- modified: string;
17
16
  created: string;
18
17
  category: CategoryModel;
19
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/api-client",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
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",