@mx-space/api-client 3.7.1 → 4.0.0-next.0
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/dist/index.cjs +24 -11
- package/dist/index.d.cts +368 -278
- package/dist/index.d.mts +368 -278
- package/dist/index.mjs +24 -11
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -491,6 +491,21 @@ var CommentController = class {
|
|
|
491
491
|
readerReply(commentId, data) {
|
|
492
492
|
return this.proxy.reader.reply(commentId).post({ data });
|
|
493
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* 取评论图片上传之公开配置(启用状态、限额、MIME 白名单等)
|
|
496
|
+
*/
|
|
497
|
+
getUploadConfig() {
|
|
498
|
+
return this.proxy.uploads.config.get();
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* 已登录读者上传评论图片
|
|
502
|
+
* @param file - 浏览器 File / Blob 或 node 之 Buffer 包装
|
|
503
|
+
*/
|
|
504
|
+
uploadImage(file) {
|
|
505
|
+
const form = new FormData();
|
|
506
|
+
form.append("file", file);
|
|
507
|
+
return this.proxy.uploads.post({ data: form });
|
|
508
|
+
}
|
|
494
509
|
};
|
|
495
510
|
//#endregion
|
|
496
511
|
//#region controllers/base.ts
|
|
@@ -1230,15 +1245,11 @@ let TimelineType = /* @__PURE__ */ function(TimelineType) {
|
|
|
1230
1245
|
}({});
|
|
1231
1246
|
//#endregion
|
|
1232
1247
|
//#region ../../apps/core/src/constants/db.constant.ts
|
|
1233
|
-
const NOTE_COLLECTION_NAME = "notes";
|
|
1234
|
-
const PAGE_COLLECTION_NAME = "pages";
|
|
1235
|
-
const POST_COLLECTION_NAME = "posts";
|
|
1236
|
-
const RECENTLY_COLLECTION_NAME = "recentlies";
|
|
1237
1248
|
let CollectionRefTypes = /* @__PURE__ */ function(CollectionRefTypes) {
|
|
1238
|
-
CollectionRefTypes[
|
|
1239
|
-
CollectionRefTypes[
|
|
1240
|
-
CollectionRefTypes[
|
|
1241
|
-
CollectionRefTypes[
|
|
1249
|
+
CollectionRefTypes["Post"] = "post";
|
|
1250
|
+
CollectionRefTypes["Note"] = "note";
|
|
1251
|
+
CollectionRefTypes["Page"] = "page";
|
|
1252
|
+
CollectionRefTypes["Recently"] = "recently";
|
|
1242
1253
|
return CollectionRefTypes;
|
|
1243
1254
|
}({});
|
|
1244
1255
|
//#endregion
|
|
@@ -1275,9 +1286,10 @@ let EnumPageType = /* @__PURE__ */ function(EnumPageType) {
|
|
|
1275
1286
|
//#endregion
|
|
1276
1287
|
//#region models/recently.ts
|
|
1277
1288
|
let RecentlyRefTypes = /* @__PURE__ */ function(RecentlyRefTypes) {
|
|
1278
|
-
RecentlyRefTypes["Post"] = "
|
|
1279
|
-
RecentlyRefTypes["Note"] = "
|
|
1280
|
-
RecentlyRefTypes["Page"] = "
|
|
1289
|
+
RecentlyRefTypes["Post"] = "post";
|
|
1290
|
+
RecentlyRefTypes["Note"] = "note";
|
|
1291
|
+
RecentlyRefTypes["Page"] = "page";
|
|
1292
|
+
RecentlyRefTypes["Recently"] = "recently";
|
|
1281
1293
|
return RecentlyRefTypes;
|
|
1282
1294
|
}({});
|
|
1283
1295
|
let RecentlyTypeEnum = /* @__PURE__ */ function(RecentlyTypeEnum) {
|
|
@@ -1295,6 +1307,7 @@ let RecentlyTypeEnum = /* @__PURE__ */ function(RecentlyTypeEnum) {
|
|
|
1295
1307
|
//#region models/snippet.ts
|
|
1296
1308
|
let SnippetType = /* @__PURE__ */ function(SnippetType) {
|
|
1297
1309
|
SnippetType["JSON"] = "json";
|
|
1310
|
+
SnippetType["JSON5"] = "json5";
|
|
1298
1311
|
SnippetType["Function"] = "function";
|
|
1299
1312
|
SnippetType["Text"] = "text";
|
|
1300
1313
|
SnippetType["YAML"] = "yaml";
|