@mx-space/api-client 1.4.0 → 1.4.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.
- package/.eslintcache +1 -1
- package/controllers/aggregate.ts +7 -7
- package/controllers/base.ts +4 -4
- package/controllers/category.ts +12 -11
- package/controllers/comment.ts +9 -9
- package/controllers/link.ts +4 -3
- package/controllers/note.ts +9 -9
- package/controllers/page.ts +8 -8
- package/controllers/post.ts +8 -8
- package/controllers/project.ts +4 -3
- package/controllers/recently.ts +6 -6
- package/controllers/say.ts +6 -5
- package/controllers/search.ts +9 -9
- package/controllers/severless.ts +5 -5
- package/controllers/snippet.ts +5 -5
- package/controllers/subscribe.ts +6 -6
- package/controllers/topic.ts +6 -5
- package/controllers/user.ts +6 -6
- package/dist/adaptors/axios.d.ts +1 -1
- package/dist/adaptors/axios.global.js +146 -95
- package/dist/adaptors/umi-request.d.ts +1 -1
- package/dist/adaptors/umi-request.global.js +22 -13
- package/dist/index.cjs +21 -13
- package/dist/index.d.ts +11 -25
- package/dist/index.global.js +21 -13
- package/dist/index.js +21 -13
- package/interfaces/adapter.ts +1 -1
- package/interfaces/client.ts +2 -2
- package/interfaces/request.ts +3 -1
- package/models/aggregate.ts +7 -7
- package/models/category.ts +2 -2
- package/models/comment.ts +2 -2
- package/models/link.ts +1 -1
- package/models/note.ts +2 -2
- package/models/page.ts +1 -1
- package/models/post.ts +2 -2
- package/models/project.ts +1 -1
- package/models/recently.ts +1 -1
- package/models/say.ts +1 -1
- package/models/snippet.ts +1 -1
- package/models/subscribe.ts +1 -1
- package/models/topic.ts +1 -1
- package/models/user.ts +1 -1
- package/package.json +8 -20
- package/tsconfig.json +1 -1
|
@@ -177,9 +177,9 @@
|
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
-
// ../../node_modules/.pnpm/get-intrinsic@1.
|
|
180
|
+
// ../../node_modules/.pnpm/get-intrinsic@1.2.0/node_modules/get-intrinsic/index.js
|
|
181
181
|
var require_get_intrinsic = __commonJS({
|
|
182
|
-
"../../node_modules/.pnpm/get-intrinsic@1.
|
|
182
|
+
"../../node_modules/.pnpm/get-intrinsic@1.2.0/node_modules/get-intrinsic/index.js"(exports, module) {
|
|
183
183
|
"use strict";
|
|
184
184
|
var undefined2;
|
|
185
185
|
var $SyntaxError = SyntaxError;
|
|
@@ -232,6 +232,8 @@
|
|
|
232
232
|
"%AsyncIteratorPrototype%": needsEval,
|
|
233
233
|
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
234
234
|
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
235
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
236
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
235
237
|
"%Boolean%": Boolean,
|
|
236
238
|
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
237
239
|
"%Date%": Date,
|
|
@@ -287,6 +289,13 @@
|
|
|
287
289
|
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
288
290
|
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
|
|
289
291
|
};
|
|
292
|
+
try {
|
|
293
|
+
null.error;
|
|
294
|
+
} catch (e) {
|
|
295
|
+
errorProto = getProto(getProto(e));
|
|
296
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
297
|
+
}
|
|
298
|
+
var errorProto;
|
|
290
299
|
var doEval = function doEval2(name) {
|
|
291
300
|
var value;
|
|
292
301
|
if (name === "%AsyncFunction%") {
|
|
@@ -1160,9 +1169,9 @@
|
|
|
1160
1169
|
}
|
|
1161
1170
|
});
|
|
1162
1171
|
|
|
1163
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1172
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/formats.js
|
|
1164
1173
|
var require_formats = __commonJS({
|
|
1165
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1174
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/formats.js"(exports, module) {
|
|
1166
1175
|
"use strict";
|
|
1167
1176
|
var replace = String.prototype.replace;
|
|
1168
1177
|
var percentTwenties = /%20/g;
|
|
@@ -1186,9 +1195,9 @@
|
|
|
1186
1195
|
}
|
|
1187
1196
|
});
|
|
1188
1197
|
|
|
1189
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1198
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/utils.js
|
|
1190
1199
|
var require_utils = __commonJS({
|
|
1191
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1200
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/utils.js"(exports, module) {
|
|
1192
1201
|
"use strict";
|
|
1193
1202
|
var formats = require_formats();
|
|
1194
1203
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1385,9 +1394,9 @@
|
|
|
1385
1394
|
}
|
|
1386
1395
|
});
|
|
1387
1396
|
|
|
1388
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1397
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/stringify.js
|
|
1389
1398
|
var require_stringify = __commonJS({
|
|
1390
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1399
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/stringify.js"(exports, module) {
|
|
1391
1400
|
"use strict";
|
|
1392
1401
|
var getSideChannel = require_side_channel();
|
|
1393
1402
|
var utils = require_utils();
|
|
@@ -1642,9 +1651,9 @@
|
|
|
1642
1651
|
}
|
|
1643
1652
|
});
|
|
1644
1653
|
|
|
1645
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1654
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/parse.js
|
|
1646
1655
|
var require_parse = __commonJS({
|
|
1647
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1656
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/parse.js"(exports, module) {
|
|
1648
1657
|
"use strict";
|
|
1649
1658
|
var utils = require_utils();
|
|
1650
1659
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1681,7 +1690,7 @@
|
|
|
1681
1690
|
var isoSentinel = "utf8=%26%2310003%3B";
|
|
1682
1691
|
var charsetSentinel = "utf8=%E2%9C%93";
|
|
1683
1692
|
var parseValues = function parseQueryStringValues(str, options) {
|
|
1684
|
-
var obj = {};
|
|
1693
|
+
var obj = { __proto__: null };
|
|
1685
1694
|
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
|
|
1686
1695
|
var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
|
|
1687
1696
|
var parts = cleanStr.split(options.delimiter, limit);
|
|
@@ -1844,9 +1853,9 @@
|
|
|
1844
1853
|
}
|
|
1845
1854
|
});
|
|
1846
1855
|
|
|
1847
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1856
|
+
// ../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/index.js
|
|
1848
1857
|
var require_lib = __commonJS({
|
|
1849
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1858
|
+
"../../node_modules/.pnpm/qs@6.11.2/node_modules/qs/lib/index.js"(exports, module) {
|
|
1850
1859
|
"use strict";
|
|
1851
1860
|
var stringify2 = require_stringify();
|
|
1852
1861
|
var parse2 = require_parse();
|
package/dist/index.cjs
CHANGED
|
@@ -92,13 +92,14 @@ var attachRawFromOneToAnthor = (from, to) => {
|
|
|
92
92
|
if (!from || !isObject(to)) {
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
;
|
|
96
|
+
["$raw", "$request", "$serialized"].forEach((key) => {
|
|
97
|
+
from[key] && Object.defineProperty(to, key, {
|
|
98
|
+
get() {
|
|
99
|
+
return from[key];
|
|
100
|
+
},
|
|
101
|
+
enumerable: false
|
|
102
|
+
});
|
|
102
103
|
});
|
|
103
104
|
};
|
|
104
105
|
|
|
@@ -972,16 +973,18 @@ var HTTPClient = class {
|
|
|
972
973
|
if (!data) {
|
|
973
974
|
return null;
|
|
974
975
|
}
|
|
975
|
-
const
|
|
976
|
-
|
|
977
|
-
|
|
976
|
+
const cameledObject = (Array.isArray(data) || isPlainObject(data)) && that.options.transformResponse ? that.options.transformResponse(data) : data;
|
|
977
|
+
let nextObject = cameledObject;
|
|
978
|
+
if (cameledObject && typeof cameledObject === "object") {
|
|
979
|
+
nextObject = { ...cameledObject };
|
|
980
|
+
Object.defineProperty(nextObject, "$raw", {
|
|
978
981
|
get() {
|
|
979
982
|
return res;
|
|
980
983
|
},
|
|
981
984
|
enumerable: false,
|
|
982
985
|
configurable: false
|
|
983
986
|
});
|
|
984
|
-
Object.defineProperty(
|
|
987
|
+
Object.defineProperty(nextObject, "$request", {
|
|
985
988
|
get() {
|
|
986
989
|
return {
|
|
987
990
|
url,
|
|
@@ -991,8 +994,13 @@ var HTTPClient = class {
|
|
|
991
994
|
},
|
|
992
995
|
enumerable: false
|
|
993
996
|
});
|
|
997
|
+
Object.defineProperty(nextObject, "$serialized", {
|
|
998
|
+
get() {
|
|
999
|
+
return cameledObject;
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
994
1002
|
}
|
|
995
|
-
return
|
|
1003
|
+
return nextObject;
|
|
996
1004
|
};
|
|
997
1005
|
}
|
|
998
1006
|
route.push(name);
|
|
@@ -1084,7 +1092,7 @@ var SnippetType = /* @__PURE__ */ ((SnippetType2) => {
|
|
|
1084
1092
|
return SnippetType2;
|
|
1085
1093
|
})(SnippetType || {});
|
|
1086
1094
|
|
|
1087
|
-
// ../../src/modules/subscribe/subscribe.constant.ts
|
|
1095
|
+
// ../../apps/core/src/modules/subscribe/subscribe.constant.ts
|
|
1088
1096
|
var SubscribePostCreateBit = 1 << 0;
|
|
1089
1097
|
var SubscribeNoteCreateBit = 1 << 1;
|
|
1090
1098
|
var SubscribeSayCreateBit = 1 << 2;
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ type ResponseWrapperType<Response, RawData, T> = {
|
|
|
57
57
|
method: string;
|
|
58
58
|
[k: string]: string;
|
|
59
59
|
};
|
|
60
|
+
$serialized: T;
|
|
60
61
|
};
|
|
61
62
|
type ResponseProxyExtraRaw<T, RawData = unknown, Response = unknown> = T extends object ? T & ResponseWrapperType<Response, RawData, T> : T extends unknown ? T & ResponseWrapperType<Response, RawData, T> : unknown;
|
|
62
63
|
|
|
@@ -488,6 +489,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
488
489
|
path: string;
|
|
489
490
|
method: string;
|
|
490
491
|
};
|
|
492
|
+
$serialized: CategoryWithChildrenModel;
|
|
491
493
|
}>;
|
|
492
494
|
getTagByName(name: string): Promise<{
|
|
493
495
|
tag: string;
|
|
@@ -539,6 +541,10 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
539
541
|
path: string;
|
|
540
542
|
method: string;
|
|
541
543
|
};
|
|
544
|
+
$serialized: {
|
|
545
|
+
tag: string;
|
|
546
|
+
data: Pick<PostModel, 'id' | 'title' | 'slug' | 'category' | 'created'>[];
|
|
547
|
+
};
|
|
542
548
|
}>;
|
|
543
549
|
}
|
|
544
550
|
|
|
@@ -769,11 +775,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
769
775
|
[key: string]: any;
|
|
770
776
|
data: NoteWrappedWithLikedPayload;
|
|
771
777
|
} : ResponseWrapper extends {
|
|
772
|
-
data: NoteWrappedWithLikedPayload;
|
|
773
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
774
|
-
* @param id id | nid
|
|
775
|
-
* @param password 访问密码
|
|
776
|
-
*/
|
|
778
|
+
data: NoteWrappedWithLikedPayload;
|
|
777
779
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
778
780
|
data: NoteWrappedWithLikedPayload;
|
|
779
781
|
}>;
|
|
@@ -794,11 +796,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
794
796
|
[key: string]: any;
|
|
795
797
|
data: PaginateResult<NoteModel>;
|
|
796
798
|
} : ResponseWrapper extends {
|
|
797
|
-
data: PaginateResult<NoteModel>;
|
|
798
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
799
|
-
* @param id id | nid
|
|
800
|
-
* @param password 访问密码
|
|
801
|
-
*/
|
|
799
|
+
data: PaginateResult<NoteModel>;
|
|
802
800
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
803
801
|
data: PaginateResult<NoteModel>;
|
|
804
802
|
}>;
|
|
@@ -818,11 +816,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
818
816
|
data: {
|
|
819
817
|
data: Pick<NoteModel, 'id' | 'title' | 'nid' | 'created'>[];
|
|
820
818
|
size: number;
|
|
821
|
-
};
|
|
822
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
823
|
-
* @param id id | nid
|
|
824
|
-
* @param password 访问密码
|
|
825
|
-
*/
|
|
819
|
+
};
|
|
826
820
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
827
821
|
data: {
|
|
828
822
|
data: Pick<NoteModel, 'id' | 'title' | 'nid' | 'created'>[];
|
|
@@ -836,11 +830,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
836
830
|
[key: string]: any;
|
|
837
831
|
data: never;
|
|
838
832
|
} : ResponseWrapper extends {
|
|
839
|
-
data: never;
|
|
840
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
841
|
-
* @param id id | nid
|
|
842
|
-
* @param password 访问密码
|
|
843
|
-
*/
|
|
833
|
+
data: never;
|
|
844
834
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
845
835
|
data: never;
|
|
846
836
|
}>;
|
|
@@ -851,11 +841,7 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
851
841
|
[key: string]: any;
|
|
852
842
|
data: PaginateResult<NoteModel>;
|
|
853
843
|
} : ResponseWrapper extends {
|
|
854
|
-
data: PaginateResult<NoteModel>;
|
|
855
|
-
* 获取一篇日记,根据 Id 查询需要鉴权
|
|
856
|
-
* @param id id | nid
|
|
857
|
-
* @param password 访问密码
|
|
858
|
-
*/
|
|
844
|
+
data: PaginateResult<NoteModel>;
|
|
859
845
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
860
846
|
data: PaginateResult<NoteModel>;
|
|
861
847
|
}>;
|
package/dist/index.global.js
CHANGED
|
@@ -29,13 +29,14 @@
|
|
|
29
29
|
if (!from || !isObject(to)) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
;
|
|
33
|
+
["$raw", "$request", "$serialized"].forEach((key) => {
|
|
34
|
+
from[key] && Object.defineProperty(to, key, {
|
|
35
|
+
get() {
|
|
36
|
+
return from[key];
|
|
37
|
+
},
|
|
38
|
+
enumerable: false
|
|
39
|
+
});
|
|
39
40
|
});
|
|
40
41
|
};
|
|
41
42
|
|
|
@@ -909,16 +910,18 @@
|
|
|
909
910
|
if (!data) {
|
|
910
911
|
return null;
|
|
911
912
|
}
|
|
912
|
-
const
|
|
913
|
-
|
|
914
|
-
|
|
913
|
+
const cameledObject = (Array.isArray(data) || isPlainObject(data)) && that.options.transformResponse ? that.options.transformResponse(data) : data;
|
|
914
|
+
let nextObject = cameledObject;
|
|
915
|
+
if (cameledObject && typeof cameledObject === "object") {
|
|
916
|
+
nextObject = { ...cameledObject };
|
|
917
|
+
Object.defineProperty(nextObject, "$raw", {
|
|
915
918
|
get() {
|
|
916
919
|
return res;
|
|
917
920
|
},
|
|
918
921
|
enumerable: false,
|
|
919
922
|
configurable: false
|
|
920
923
|
});
|
|
921
|
-
Object.defineProperty(
|
|
924
|
+
Object.defineProperty(nextObject, "$request", {
|
|
922
925
|
get() {
|
|
923
926
|
return {
|
|
924
927
|
url,
|
|
@@ -928,8 +931,13 @@
|
|
|
928
931
|
},
|
|
929
932
|
enumerable: false
|
|
930
933
|
});
|
|
934
|
+
Object.defineProperty(nextObject, "$serialized", {
|
|
935
|
+
get() {
|
|
936
|
+
return cameledObject;
|
|
937
|
+
}
|
|
938
|
+
});
|
|
931
939
|
}
|
|
932
|
-
return
|
|
940
|
+
return nextObject;
|
|
933
941
|
};
|
|
934
942
|
}
|
|
935
943
|
route.push(name);
|
|
@@ -1021,7 +1029,7 @@
|
|
|
1021
1029
|
return SnippetType2;
|
|
1022
1030
|
})(SnippetType || {});
|
|
1023
1031
|
|
|
1024
|
-
// ../../src/modules/subscribe/subscribe.constant.ts
|
|
1032
|
+
// ../../apps/core/src/modules/subscribe/subscribe.constant.ts
|
|
1025
1033
|
var SubscribePostCreateBit = 1 << 0;
|
|
1026
1034
|
var SubscribeNoteCreateBit = 1 << 1;
|
|
1027
1035
|
var SubscribeSayCreateBit = 1 << 2;
|
package/dist/index.js
CHANGED
|
@@ -27,13 +27,14 @@ var attachRawFromOneToAnthor = (from, to) => {
|
|
|
27
27
|
if (!from || !isObject(to)) {
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
;
|
|
31
|
+
["$raw", "$request", "$serialized"].forEach((key) => {
|
|
32
|
+
from[key] && Object.defineProperty(to, key, {
|
|
33
|
+
get() {
|
|
34
|
+
return from[key];
|
|
35
|
+
},
|
|
36
|
+
enumerable: false
|
|
37
|
+
});
|
|
37
38
|
});
|
|
38
39
|
};
|
|
39
40
|
|
|
@@ -907,16 +908,18 @@ var HTTPClient = class {
|
|
|
907
908
|
if (!data) {
|
|
908
909
|
return null;
|
|
909
910
|
}
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
|
|
911
|
+
const cameledObject = (Array.isArray(data) || isPlainObject(data)) && that.options.transformResponse ? that.options.transformResponse(data) : data;
|
|
912
|
+
let nextObject = cameledObject;
|
|
913
|
+
if (cameledObject && typeof cameledObject === "object") {
|
|
914
|
+
nextObject = { ...cameledObject };
|
|
915
|
+
Object.defineProperty(nextObject, "$raw", {
|
|
913
916
|
get() {
|
|
914
917
|
return res;
|
|
915
918
|
},
|
|
916
919
|
enumerable: false,
|
|
917
920
|
configurable: false
|
|
918
921
|
});
|
|
919
|
-
Object.defineProperty(
|
|
922
|
+
Object.defineProperty(nextObject, "$request", {
|
|
920
923
|
get() {
|
|
921
924
|
return {
|
|
922
925
|
url,
|
|
@@ -926,8 +929,13 @@ var HTTPClient = class {
|
|
|
926
929
|
},
|
|
927
930
|
enumerable: false
|
|
928
931
|
});
|
|
932
|
+
Object.defineProperty(nextObject, "$serialized", {
|
|
933
|
+
get() {
|
|
934
|
+
return cameledObject;
|
|
935
|
+
}
|
|
936
|
+
});
|
|
929
937
|
}
|
|
930
|
-
return
|
|
938
|
+
return nextObject;
|
|
931
939
|
};
|
|
932
940
|
}
|
|
933
941
|
route.push(name);
|
|
@@ -1019,7 +1027,7 @@ var SnippetType = /* @__PURE__ */ ((SnippetType2) => {
|
|
|
1019
1027
|
return SnippetType2;
|
|
1020
1028
|
})(SnippetType || {});
|
|
1021
1029
|
|
|
1022
|
-
// ../../src/modules/subscribe/subscribe.constant.ts
|
|
1030
|
+
// ../../apps/core/src/modules/subscribe/subscribe.constant.ts
|
|
1023
1031
|
var SubscribePostCreateBit = 1 << 0;
|
|
1024
1032
|
var SubscribeNoteCreateBit = 1 << 1;
|
|
1025
1033
|
var SubscribeSayCreateBit = 1 << 2;
|
package/interfaces/adapter.ts
CHANGED
package/interfaces/client.ts
CHANGED
package/interfaces/request.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RequestOptions } from './instance'
|
|
1
|
+
import type { RequestOptions } from './instance'
|
|
2
2
|
|
|
3
3
|
type NoStringIndex<T> = { [K in keyof T as string extends K ? never : K]: T[K] }
|
|
4
4
|
|
|
@@ -70,6 +70,8 @@ type ResponseWrapperType<Response, RawData, T> = {
|
|
|
70
70
|
method: string
|
|
71
71
|
[k: string]: string
|
|
72
72
|
}
|
|
73
|
+
|
|
74
|
+
$serialized: T
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
export type ResponseProxyExtraRaw<
|
package/models/aggregate.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CategoryModel } from './category'
|
|
2
|
-
import { NoteModel } from './note'
|
|
3
|
-
import { PageModel } from './page'
|
|
4
|
-
import { PostModel } from './post'
|
|
5
|
-
import { SayModel } from './say'
|
|
6
|
-
import { SeoOptionModel } from './setting'
|
|
7
|
-
import { UserModel } from './user'
|
|
1
|
+
import type { CategoryModel } from './category'
|
|
2
|
+
import type { NoteModel } from './note'
|
|
3
|
+
import type { PageModel } from './page'
|
|
4
|
+
import type { PostModel } from './post'
|
|
5
|
+
import type { SayModel } from './say'
|
|
6
|
+
import type { SeoOptionModel } from './setting'
|
|
7
|
+
import type { UserModel } from './user'
|
|
8
8
|
|
|
9
9
|
export interface AggregateRoot {
|
|
10
10
|
user: UserModel
|
package/models/category.ts
CHANGED
package/models/comment.ts
CHANGED
package/models/link.ts
CHANGED
package/models/note.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModelWithLiked, TextBaseModel } from './base'
|
|
2
|
-
import { TopicModel } from './topic'
|
|
1
|
+
import type { ModelWithLiked, TextBaseModel } from './base'
|
|
2
|
+
import type { TopicModel } from './topic'
|
|
3
3
|
|
|
4
4
|
export interface NoteModel extends TextBaseModel {
|
|
5
5
|
hide: boolean
|
package/models/page.ts
CHANGED
package/models/post.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Count, Image, TextBaseModel } from './base'
|
|
2
|
-
import { CategoryModel } from './category'
|
|
1
|
+
import type { Count, Image, TextBaseModel } from './base'
|
|
2
|
+
import type { CategoryModel } from './category'
|
|
3
3
|
|
|
4
4
|
export interface PostModel extends TextBaseModel {
|
|
5
5
|
summary?: string
|
package/models/project.ts
CHANGED
package/models/recently.ts
CHANGED
package/models/say.ts
CHANGED
package/models/snippet.ts
CHANGED
package/models/subscribe.ts
CHANGED
package/models/topic.ts
CHANGED
package/models/user.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-space/api-client",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A api client for mx-space server@next",
|
|
6
6
|
"author": "Innei",
|
|
@@ -24,11 +24,6 @@
|
|
|
24
24
|
},
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
|
-
"husky": {
|
|
28
|
-
"hooks": {
|
|
29
|
-
"pre-commit": "lint-staged"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
27
|
"bump": {
|
|
33
28
|
"before": [
|
|
34
29
|
"git pull --rebase",
|
|
@@ -41,15 +36,6 @@
|
|
|
41
36
|
"tag": false,
|
|
42
37
|
"commit_message": "chore(release): bump @mx-space/api-client to v${NEW_VERSION}"
|
|
43
38
|
},
|
|
44
|
-
"lint-staged": {
|
|
45
|
-
"*.{js,jsx,ts,tsx}": [
|
|
46
|
-
"prettier --ignore-path ./.prettierignore --write ",
|
|
47
|
-
"eslint --cache"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"engines": {
|
|
51
|
-
"pnpm": ">=6"
|
|
52
|
-
},
|
|
53
39
|
"scripts": {
|
|
54
40
|
"package": "rm -rf dist && tsup && node mod-dts.mjs",
|
|
55
41
|
"build": "npm run package",
|
|
@@ -60,16 +46,18 @@
|
|
|
60
46
|
"devDependencies": {
|
|
61
47
|
"@types/cors": "2.8.13",
|
|
62
48
|
"@types/express": "4.17.17",
|
|
63
|
-
"@types/lodash": "4.14.
|
|
49
|
+
"@types/lodash": "4.14.195",
|
|
64
50
|
"abort-controller": "3.0.0",
|
|
65
|
-
"axios": "^1.
|
|
66
|
-
"camelcase-keys": "^7",
|
|
51
|
+
"axios": "^1.4.0",
|
|
52
|
+
"camelcase-keys": "^7.0.2",
|
|
67
53
|
"cors": "2.8.5",
|
|
68
54
|
"express": "4.18.2",
|
|
69
55
|
"ky": "0.33.3",
|
|
70
56
|
"lodash": "4.17.21",
|
|
71
|
-
"node-fetch": "3.3.1",
|
|
72
57
|
"tsup": "6.7.0",
|
|
73
|
-
"umi-request": "1.4.0"
|
|
58
|
+
"umi-request": "1.4.0",
|
|
59
|
+
"vitest": "^0.31.4",
|
|
60
|
+
"vite": "^4.3.9",
|
|
61
|
+
"form-data": "4.0.0"
|
|
74
62
|
}
|
|
75
63
|
}
|