@mx-space/api-client 1.8.1 → 1.9.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/controllers/recently.ts +13 -5
- package/dist/adaptors/umi-request.global.js +2 -2
- package/dist/index.cjs +8 -1
- package/dist/index.d.cts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.global.js +8 -1
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/controllers/recently.ts
CHANGED
|
@@ -50,11 +50,15 @@ export class RecentlyController<ResponseWrapper> implements IController {
|
|
|
50
50
|
}>()
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
getList(
|
|
54
|
-
before
|
|
55
|
-
after
|
|
56
|
-
size
|
|
57
|
-
|
|
53
|
+
getList({
|
|
54
|
+
before,
|
|
55
|
+
after,
|
|
56
|
+
size,
|
|
57
|
+
}: {
|
|
58
|
+
before?: string | undefined
|
|
59
|
+
after?: string | undefined
|
|
60
|
+
size?: number | number
|
|
61
|
+
} = {}) {
|
|
58
62
|
return this.proxy.get<{ data: RecentlyModel[] & { comments: number } }>({
|
|
59
63
|
params: {
|
|
60
64
|
before,
|
|
@@ -64,6 +68,10 @@ export class RecentlyController<ResponseWrapper> implements IController {
|
|
|
64
68
|
})
|
|
65
69
|
}
|
|
66
70
|
|
|
71
|
+
getById(id: string) {
|
|
72
|
+
return this.proxy(id).get<RecentlyModel & { comments: number }>()
|
|
73
|
+
}
|
|
74
|
+
|
|
67
75
|
/** 表态:点赞,点踩 */
|
|
68
76
|
attitude(id: string, attitude: RecentlyAttitudeEnum) {
|
|
69
77
|
return this.proxy.attitude(id).get<{ code: RecentlyAttitudeResultEnum }>({
|
|
@@ -694,9 +694,9 @@
|
|
|
694
694
|
}
|
|
695
695
|
});
|
|
696
696
|
|
|
697
|
-
// ../../node_modules/.pnpm/set-function-length@1.2.
|
|
697
|
+
// ../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js
|
|
698
698
|
var require_set_function_length = __commonJS({
|
|
699
|
-
"../../node_modules/.pnpm/set-function-length@1.2.
|
|
699
|
+
"../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(exports, module) {
|
|
700
700
|
"use strict";
|
|
701
701
|
var GetIntrinsic = require_get_intrinsic();
|
|
702
702
|
var define = require_define_data_property();
|
package/dist/index.cjs
CHANGED
|
@@ -660,7 +660,11 @@ var RecentlyController = class {
|
|
|
660
660
|
getAll() {
|
|
661
661
|
return this.proxy.all.get();
|
|
662
662
|
}
|
|
663
|
-
getList(
|
|
663
|
+
getList({
|
|
664
|
+
before,
|
|
665
|
+
after,
|
|
666
|
+
size
|
|
667
|
+
} = {}) {
|
|
664
668
|
return this.proxy.get({
|
|
665
669
|
params: {
|
|
666
670
|
before,
|
|
@@ -669,6 +673,9 @@ var RecentlyController = class {
|
|
|
669
673
|
}
|
|
670
674
|
});
|
|
671
675
|
}
|
|
676
|
+
getById(id) {
|
|
677
|
+
return this.proxy(id).get();
|
|
678
|
+
}
|
|
672
679
|
/** 表态:点赞,点踩 */
|
|
673
680
|
attitude(id, attitude) {
|
|
674
681
|
return this.proxy.attitude(id).get({
|
package/dist/index.d.cts
CHANGED
|
@@ -1229,7 +1229,11 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
1229
1229
|
};
|
|
1230
1230
|
};
|
|
1231
1231
|
}>;
|
|
1232
|
-
getList(before
|
|
1232
|
+
getList({ before, after, size, }?: {
|
|
1233
|
+
before?: string | undefined;
|
|
1234
|
+
after?: string | undefined;
|
|
1235
|
+
size?: number | number;
|
|
1236
|
+
}): RequestProxyResult<{
|
|
1233
1237
|
data: RecentlyModel[] & {
|
|
1234
1238
|
comments: number;
|
|
1235
1239
|
};
|
|
@@ -1253,6 +1257,22 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
1253
1257
|
};
|
|
1254
1258
|
};
|
|
1255
1259
|
}>;
|
|
1260
|
+
getById(id: string): RequestProxyResult<RecentlyModel & {
|
|
1261
|
+
comments: number;
|
|
1262
|
+
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1263
|
+
[key: string]: any;
|
|
1264
|
+
data: RecentlyModel & {
|
|
1265
|
+
comments: number;
|
|
1266
|
+
};
|
|
1267
|
+
} : ResponseWrapper extends {
|
|
1268
|
+
data: RecentlyModel & {
|
|
1269
|
+
comments: number;
|
|
1270
|
+
};
|
|
1271
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1272
|
+
data: RecentlyModel & {
|
|
1273
|
+
comments: number;
|
|
1274
|
+
};
|
|
1275
|
+
}>;
|
|
1256
1276
|
/** 表态:点赞,点踩 */
|
|
1257
1277
|
attitude(id: string, attitude: RecentlyAttitudeEnum): RequestProxyResult<{
|
|
1258
1278
|
code: RecentlyAttitudeResultEnum;
|
package/dist/index.d.ts
CHANGED
|
@@ -1229,7 +1229,11 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
1229
1229
|
};
|
|
1230
1230
|
};
|
|
1231
1231
|
}>;
|
|
1232
|
-
getList(before
|
|
1232
|
+
getList({ before, after, size, }?: {
|
|
1233
|
+
before?: string | undefined;
|
|
1234
|
+
after?: string | undefined;
|
|
1235
|
+
size?: number | number;
|
|
1236
|
+
}): RequestProxyResult<{
|
|
1233
1237
|
data: RecentlyModel[] & {
|
|
1234
1238
|
comments: number;
|
|
1235
1239
|
};
|
|
@@ -1253,6 +1257,22 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
1253
1257
|
};
|
|
1254
1258
|
};
|
|
1255
1259
|
}>;
|
|
1260
|
+
getById(id: string): RequestProxyResult<RecentlyModel & {
|
|
1261
|
+
comments: number;
|
|
1262
|
+
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1263
|
+
[key: string]: any;
|
|
1264
|
+
data: RecentlyModel & {
|
|
1265
|
+
comments: number;
|
|
1266
|
+
};
|
|
1267
|
+
} : ResponseWrapper extends {
|
|
1268
|
+
data: RecentlyModel & {
|
|
1269
|
+
comments: number;
|
|
1270
|
+
};
|
|
1271
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1272
|
+
data: RecentlyModel & {
|
|
1273
|
+
comments: number;
|
|
1274
|
+
};
|
|
1275
|
+
}>;
|
|
1256
1276
|
/** 表态:点赞,点踩 */
|
|
1257
1277
|
attitude(id: string, attitude: RecentlyAttitudeEnum): RequestProxyResult<{
|
|
1258
1278
|
code: RecentlyAttitudeResultEnum;
|
package/dist/index.global.js
CHANGED
|
@@ -596,7 +596,11 @@
|
|
|
596
596
|
getAll() {
|
|
597
597
|
return this.proxy.all.get();
|
|
598
598
|
}
|
|
599
|
-
getList(
|
|
599
|
+
getList({
|
|
600
|
+
before,
|
|
601
|
+
after,
|
|
602
|
+
size
|
|
603
|
+
} = {}) {
|
|
600
604
|
return this.proxy.get({
|
|
601
605
|
params: {
|
|
602
606
|
before,
|
|
@@ -605,6 +609,9 @@
|
|
|
605
609
|
}
|
|
606
610
|
});
|
|
607
611
|
}
|
|
612
|
+
getById(id) {
|
|
613
|
+
return this.proxy(id).get();
|
|
614
|
+
}
|
|
608
615
|
/** 表态:点赞,点踩 */
|
|
609
616
|
attitude(id, attitude) {
|
|
610
617
|
return this.proxy.attitude(id).get({
|
package/dist/index.js
CHANGED
|
@@ -594,7 +594,11 @@ var RecentlyController = class {
|
|
|
594
594
|
getAll() {
|
|
595
595
|
return this.proxy.all.get();
|
|
596
596
|
}
|
|
597
|
-
getList(
|
|
597
|
+
getList({
|
|
598
|
+
before,
|
|
599
|
+
after,
|
|
600
|
+
size
|
|
601
|
+
} = {}) {
|
|
598
602
|
return this.proxy.get({
|
|
599
603
|
params: {
|
|
600
604
|
before,
|
|
@@ -603,6 +607,9 @@ var RecentlyController = class {
|
|
|
603
607
|
}
|
|
604
608
|
});
|
|
605
609
|
}
|
|
610
|
+
getById(id) {
|
|
611
|
+
return this.proxy(id).get();
|
|
612
|
+
}
|
|
606
613
|
/** 表态:点赞,点踩 */
|
|
607
614
|
attitude(id, attitude) {
|
|
608
615
|
return this.proxy.attitude(id).get({
|