@mx-space/api-client 1.15.0 → 1.16.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/controllers/comment.ts +9 -6
- package/controllers/index.ts +9 -10
- package/dist/adaptors/axios.global.js +16 -15
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +24 -6
- package/dist/index.d.ts +24 -6
- package/dist/index.global.js +4 -4
- package/dist/index.js +4 -4
- package/models/comment.ts +2 -0
- package/models/index.ts +1 -0
- package/models/reader.ts +9 -0
- package/package.json +2 -2
package/controllers/comment.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { IRequestAdapter } from '~/interfaces/adapter'
|
|
|
2
2
|
import type { IController } from '~/interfaces/controller'
|
|
3
3
|
import type { PaginationParams } from '~/interfaces/params'
|
|
4
4
|
import type { IRequestHandler } from '~/interfaces/request'
|
|
5
|
+
import type { ReaderModel } from '~/models'
|
|
5
6
|
import type { PaginateResult } from '~/models/base'
|
|
6
7
|
import type { CommentModel } from '~/models/comment'
|
|
7
8
|
import type { HTTPClient } from '../core'
|
|
@@ -31,7 +32,7 @@ export class CommentController<ResponseWrapper> implements IController {
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/**
|
|
34
|
-
* 根据 comment id
|
|
35
|
+
* 根据 comment id 获取评论,包括子评论
|
|
35
36
|
*/
|
|
36
37
|
getById(id: string) {
|
|
37
38
|
return this.proxy(id).get<CommentModel & { ref: string }>()
|
|
@@ -43,11 +44,13 @@ export class CommentController<ResponseWrapper> implements IController {
|
|
|
43
44
|
*/
|
|
44
45
|
getByRefId(refId: string, pagination: PaginationParams = {}) {
|
|
45
46
|
const { page, size } = pagination
|
|
46
|
-
return this.proxy
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
return this.proxy.ref(refId).get<
|
|
48
|
+
PaginateResult<CommentModel & { ref: string }> & {
|
|
49
|
+
readers: Record<string, ReaderModel>
|
|
50
|
+
}
|
|
51
|
+
>({
|
|
52
|
+
params: { page: page || 1, size: size || 10 },
|
|
53
|
+
})
|
|
51
54
|
}
|
|
52
55
|
/**
|
|
53
56
|
* 评论
|
package/controllers/index.ts
CHANGED
|
@@ -23,10 +23,10 @@ import { TopicController } from './topic'
|
|
|
23
23
|
import { UserController } from './user'
|
|
24
24
|
|
|
25
25
|
export const allControllers = [
|
|
26
|
-
AIController,
|
|
27
26
|
AckController,
|
|
28
27
|
ActivityController,
|
|
29
28
|
AggregateController,
|
|
29
|
+
AIController,
|
|
30
30
|
CategoryController,
|
|
31
31
|
CommentController,
|
|
32
32
|
LinkController,
|
|
@@ -35,12 +35,12 @@ export const allControllers = [
|
|
|
35
35
|
PostController,
|
|
36
36
|
ProjectController,
|
|
37
37
|
RecentlyController,
|
|
38
|
-
TopicController,
|
|
39
38
|
SayController,
|
|
40
39
|
SearchController,
|
|
41
|
-
SnippetController,
|
|
42
40
|
ServerlessController,
|
|
41
|
+
SnippetController,
|
|
43
42
|
SubscribeController,
|
|
43
|
+
TopicController,
|
|
44
44
|
UserController,
|
|
45
45
|
]
|
|
46
46
|
|
|
@@ -72,10 +72,10 @@ export const allControllerNames = [
|
|
|
72
72
|
] as const
|
|
73
73
|
|
|
74
74
|
export {
|
|
75
|
-
AIController,
|
|
76
75
|
AckController,
|
|
77
76
|
ActivityController,
|
|
78
77
|
AggregateController,
|
|
78
|
+
AIController,
|
|
79
79
|
CategoryController,
|
|
80
80
|
CommentController,
|
|
81
81
|
LinkController,
|
|
@@ -83,16 +83,15 @@ export {
|
|
|
83
83
|
PageController,
|
|
84
84
|
PostController,
|
|
85
85
|
ProjectController,
|
|
86
|
+
// Enum
|
|
87
|
+
RecentlyAttitudeEnum,
|
|
88
|
+
RecentlyAttitudeResultEnum,
|
|
86
89
|
RecentlyController,
|
|
87
90
|
SayController,
|
|
88
91
|
SearchController,
|
|
89
|
-
SnippetController,
|
|
90
92
|
ServerlessController,
|
|
93
|
+
SnippetController,
|
|
91
94
|
SubscribeController,
|
|
92
|
-
UserController,
|
|
93
95
|
TopicController,
|
|
94
|
-
|
|
95
|
-
// Enum
|
|
96
|
-
RecentlyAttitudeEnum,
|
|
97
|
-
RecentlyAttitudeResultEnum,
|
|
96
|
+
UserController,
|
|
98
97
|
}
|
|
@@ -9538,9 +9538,9 @@
|
|
|
9538
9538
|
}
|
|
9539
9539
|
});
|
|
9540
9540
|
|
|
9541
|
-
// ../../node_modules/.pnpm/ms@2.1.
|
|
9541
|
+
// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
9542
9542
|
var require_ms = __commonJS({
|
|
9543
|
-
"../../node_modules/.pnpm/ms@2.1.
|
|
9543
|
+
"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module) {
|
|
9544
9544
|
"use strict";
|
|
9545
9545
|
var s = 1e3;
|
|
9546
9546
|
var m = s * 60;
|
|
@@ -9655,9 +9655,9 @@
|
|
|
9655
9655
|
}
|
|
9656
9656
|
});
|
|
9657
9657
|
|
|
9658
|
-
// ../../node_modules/.pnpm/debug@4.3.
|
|
9658
|
+
// ../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js
|
|
9659
9659
|
var require_common = __commonJS({
|
|
9660
|
-
"../../node_modules/.pnpm/debug@4.3.
|
|
9660
|
+
"../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js"(exports, module) {
|
|
9661
9661
|
"use strict";
|
|
9662
9662
|
function setup(env) {
|
|
9663
9663
|
createDebug.debug = createDebug;
|
|
@@ -9819,9 +9819,9 @@
|
|
|
9819
9819
|
}
|
|
9820
9820
|
});
|
|
9821
9821
|
|
|
9822
|
-
// ../../node_modules/.pnpm/debug@4.3.
|
|
9822
|
+
// ../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/browser.js
|
|
9823
9823
|
var require_browser = __commonJS({
|
|
9824
|
-
"../../node_modules/.pnpm/debug@4.3.
|
|
9824
|
+
"../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/browser.js"(exports, module) {
|
|
9825
9825
|
"use strict";
|
|
9826
9826
|
exports.formatArgs = formatArgs;
|
|
9827
9827
|
exports.save = save;
|
|
@@ -9922,10 +9922,11 @@
|
|
|
9922
9922
|
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
9923
9923
|
return false;
|
|
9924
9924
|
}
|
|
9925
|
+
let m;
|
|
9925
9926
|
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
9926
9927
|
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
9927
9928
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
9928
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(
|
|
9929
|
+
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
9929
9930
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
9930
9931
|
}
|
|
9931
9932
|
function formatArgs(args) {
|
|
@@ -10104,9 +10105,9 @@
|
|
|
10104
10105
|
}
|
|
10105
10106
|
});
|
|
10106
10107
|
|
|
10107
|
-
// ../../node_modules/.pnpm/debug@4.3.
|
|
10108
|
+
// ../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/node.js
|
|
10108
10109
|
var require_node = __commonJS({
|
|
10109
|
-
"../../node_modules/.pnpm/debug@4.3.
|
|
10110
|
+
"../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/node.js"(exports, module) {
|
|
10110
10111
|
"use strict";
|
|
10111
10112
|
var tty = __require("tty");
|
|
10112
10113
|
var util2 = __require("util");
|
|
@@ -10279,9 +10280,9 @@
|
|
|
10279
10280
|
}
|
|
10280
10281
|
});
|
|
10281
10282
|
|
|
10282
|
-
// ../../node_modules/.pnpm/debug@4.3.
|
|
10283
|
+
// ../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/index.js
|
|
10283
10284
|
var require_src = __commonJS({
|
|
10284
|
-
"../../node_modules/.pnpm/debug@4.3.
|
|
10285
|
+
"../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/index.js"(exports, module) {
|
|
10285
10286
|
"use strict";
|
|
10286
10287
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
10287
10288
|
module.exports = require_browser();
|
|
@@ -10291,9 +10292,9 @@
|
|
|
10291
10292
|
}
|
|
10292
10293
|
});
|
|
10293
10294
|
|
|
10294
|
-
// ../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.3.
|
|
10295
|
+
// ../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.3.7/node_modules/follow-redirects/debug.js
|
|
10295
10296
|
var require_debug = __commonJS({
|
|
10296
|
-
"../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.3.
|
|
10297
|
+
"../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.3.7/node_modules/follow-redirects/debug.js"(exports, module) {
|
|
10297
10298
|
"use strict";
|
|
10298
10299
|
var debug;
|
|
10299
10300
|
module.exports = function() {
|
|
@@ -10312,9 +10313,9 @@
|
|
|
10312
10313
|
}
|
|
10313
10314
|
});
|
|
10314
10315
|
|
|
10315
|
-
// ../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.3.
|
|
10316
|
+
// ../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.3.7/node_modules/follow-redirects/index.js
|
|
10316
10317
|
var require_follow_redirects = __commonJS({
|
|
10317
|
-
"../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.3.
|
|
10318
|
+
"../../node_modules/.pnpm/follow-redirects@1.15.6_debug@4.3.7/node_modules/follow-redirects/index.js"(exports, module) {
|
|
10318
10319
|
"use strict";
|
|
10319
10320
|
var url2 = __require("url");
|
|
10320
10321
|
var URL2 = url2.URL;
|
package/dist/index.cjs
CHANGED
|
@@ -438,7 +438,7 @@ var CommentController = class {
|
|
|
438
438
|
return this.client.proxy(this.base);
|
|
439
439
|
}
|
|
440
440
|
/**
|
|
441
|
-
* 根据 comment id
|
|
441
|
+
* 根据 comment id 获取评论,包括子评论
|
|
442
442
|
*/
|
|
443
443
|
getById(id) {
|
|
444
444
|
return this.proxy(id).get();
|
|
@@ -912,10 +912,10 @@ var UserController = class {
|
|
|
912
912
|
|
|
913
913
|
// controllers/index.ts
|
|
914
914
|
var allControllers = [
|
|
915
|
-
AIController,
|
|
916
915
|
AckController,
|
|
917
916
|
ActivityController,
|
|
918
917
|
AggregateController,
|
|
918
|
+
AIController,
|
|
919
919
|
CategoryController,
|
|
920
920
|
CommentController,
|
|
921
921
|
LinkController,
|
|
@@ -924,12 +924,12 @@ var allControllers = [
|
|
|
924
924
|
PostController,
|
|
925
925
|
ProjectController,
|
|
926
926
|
RecentlyController,
|
|
927
|
-
TopicController,
|
|
928
927
|
SayController,
|
|
929
928
|
SearchController,
|
|
930
|
-
SnippetController,
|
|
931
929
|
ServerlessController,
|
|
930
|
+
SnippetController,
|
|
932
931
|
SubscribeController,
|
|
932
|
+
TopicController,
|
|
933
933
|
UserController
|
|
934
934
|
];
|
|
935
935
|
var allControllerNames = [
|
package/dist/index.d.cts
CHANGED
|
@@ -571,6 +571,8 @@ interface CommentModel extends BaseModel {
|
|
|
571
571
|
isWhispers?: boolean;
|
|
572
572
|
location?: string;
|
|
573
573
|
source?: string;
|
|
574
|
+
readerId?: string;
|
|
575
|
+
editedAt?: string;
|
|
574
576
|
}
|
|
575
577
|
interface CommentRef {
|
|
576
578
|
id: string;
|
|
@@ -618,6 +620,14 @@ interface ProjectModel extends BaseModel {
|
|
|
618
620
|
text: string;
|
|
619
621
|
}
|
|
620
622
|
|
|
623
|
+
interface ReaderModel {
|
|
624
|
+
email: string;
|
|
625
|
+
name: string;
|
|
626
|
+
handle: string;
|
|
627
|
+
image: string;
|
|
628
|
+
isOwner: boolean;
|
|
629
|
+
}
|
|
630
|
+
|
|
621
631
|
declare enum RecentlyRefTypes {
|
|
622
632
|
Post = "Post",
|
|
623
633
|
Note = "Note",
|
|
@@ -1103,7 +1113,7 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1103
1113
|
constructor(client: HTTPClient);
|
|
1104
1114
|
get proxy(): IRequestHandler<ResponseWrapper>;
|
|
1105
1115
|
/**
|
|
1106
|
-
* 根据 comment id
|
|
1116
|
+
* 根据 comment id 获取评论,包括子评论
|
|
1107
1117
|
*/
|
|
1108
1118
|
getById(id: string): RequestProxyResult<CommentModel & {
|
|
1109
1119
|
ref: string;
|
|
@@ -1127,19 +1137,27 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1127
1137
|
*/
|
|
1128
1138
|
getByRefId(refId: string, pagination?: PaginationParams): RequestProxyResult<PaginateResult<CommentModel & {
|
|
1129
1139
|
ref: string;
|
|
1130
|
-
}
|
|
1140
|
+
}> & {
|
|
1141
|
+
readers: Record<string, ReaderModel>;
|
|
1142
|
+
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1131
1143
|
[key: string]: any;
|
|
1132
1144
|
data: PaginateResult<CommentModel & {
|
|
1133
1145
|
ref: string;
|
|
1134
|
-
}
|
|
1146
|
+
}> & {
|
|
1147
|
+
readers: Record<string, ReaderModel>;
|
|
1148
|
+
};
|
|
1135
1149
|
} : ResponseWrapper extends {
|
|
1136
1150
|
data: PaginateResult<CommentModel & {
|
|
1137
1151
|
ref: string;
|
|
1138
|
-
}
|
|
1152
|
+
}> & {
|
|
1153
|
+
readers: Record<string, ReaderModel>;
|
|
1154
|
+
};
|
|
1139
1155
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1140
1156
|
data: PaginateResult<CommentModel & {
|
|
1141
1157
|
ref: string;
|
|
1142
|
-
}
|
|
1158
|
+
}> & {
|
|
1159
|
+
readers: Record<string, ReaderModel>;
|
|
1160
|
+
};
|
|
1143
1161
|
}>;
|
|
1144
1162
|
/**
|
|
1145
1163
|
* 评论
|
|
@@ -1880,4 +1898,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
1880
1898
|
*/
|
|
1881
1899
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
1882
1900
|
|
|
1883
|
-
export { AIController, type AISummaryModel, AckController, ActivityController, type ActivityPresence, AdminExtraModel, AggregateController, type AggregateRoot, type AggregateRootWithTheme, type AggregateStat, type AggregateTop, type AggregateTopNote, type AggregateTopPost, AlgoliaSearchOptionsModel, type AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, type BaseCommentIndexModel, type BaseModel, CategoryController, type CategoryEntries, type CategoryModel, CategoryType, type CategoryWithChildrenModel, CollectionRefTypes, CommentController, type CommentDto, type CommentModel, CommentOptionsModel, type CommentRef, CommentState, type Coordinate, type Count, EnumPageType, HTTPClient, type IConfig, type IConfigKeys, IRequestAdapter, type Image, type LastYearPublication, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, type RecentActivities, type RecentComment, type RecentLike, type RecentNote, type RecentPost, type RecentRecent, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, type RoomOmittedNote, type RoomOmittedPage, type RoomOmittedPost, type RoomsData, SayController, type SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, type SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, type SubscribeType, SubscribeTypeToBitMap, type TLogin, type TagModel, type TextBaseModel, type TimelineData, TimelineType, TopicController, type TopicModel, type Url, UrlOptionModel, UserController, type UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
|
1901
|
+
export { AIController, type AISummaryModel, AckController, ActivityController, type ActivityPresence, AdminExtraModel, AggregateController, type AggregateRoot, type AggregateRootWithTheme, type AggregateStat, type AggregateTop, type AggregateTopNote, type AggregateTopPost, AlgoliaSearchOptionsModel, type AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, type BaseCommentIndexModel, type BaseModel, CategoryController, type CategoryEntries, type CategoryModel, CategoryType, type CategoryWithChildrenModel, CollectionRefTypes, CommentController, type CommentDto, type CommentModel, CommentOptionsModel, type CommentRef, CommentState, type Coordinate, type Count, EnumPageType, HTTPClient, type IConfig, type IConfigKeys, IRequestAdapter, type Image, type LastYearPublication, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, type ReaderModel, type RecentActivities, type RecentComment, type RecentLike, type RecentNote, type RecentPost, type RecentRecent, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, type RoomOmittedNote, type RoomOmittedPage, type RoomOmittedPost, type RoomsData, SayController, type SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, type SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, type SubscribeType, SubscribeTypeToBitMap, type TLogin, type TagModel, type TextBaseModel, type TimelineData, TimelineType, TopicController, type TopicModel, type Url, UrlOptionModel, UserController, type UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
package/dist/index.d.ts
CHANGED
|
@@ -571,6 +571,8 @@ interface CommentModel extends BaseModel {
|
|
|
571
571
|
isWhispers?: boolean;
|
|
572
572
|
location?: string;
|
|
573
573
|
source?: string;
|
|
574
|
+
readerId?: string;
|
|
575
|
+
editedAt?: string;
|
|
574
576
|
}
|
|
575
577
|
interface CommentRef {
|
|
576
578
|
id: string;
|
|
@@ -618,6 +620,14 @@ interface ProjectModel extends BaseModel {
|
|
|
618
620
|
text: string;
|
|
619
621
|
}
|
|
620
622
|
|
|
623
|
+
interface ReaderModel {
|
|
624
|
+
email: string;
|
|
625
|
+
name: string;
|
|
626
|
+
handle: string;
|
|
627
|
+
image: string;
|
|
628
|
+
isOwner: boolean;
|
|
629
|
+
}
|
|
630
|
+
|
|
621
631
|
declare enum RecentlyRefTypes {
|
|
622
632
|
Post = "Post",
|
|
623
633
|
Note = "Note",
|
|
@@ -1103,7 +1113,7 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1103
1113
|
constructor(client: HTTPClient);
|
|
1104
1114
|
get proxy(): IRequestHandler<ResponseWrapper>;
|
|
1105
1115
|
/**
|
|
1106
|
-
* 根据 comment id
|
|
1116
|
+
* 根据 comment id 获取评论,包括子评论
|
|
1107
1117
|
*/
|
|
1108
1118
|
getById(id: string): RequestProxyResult<CommentModel & {
|
|
1109
1119
|
ref: string;
|
|
@@ -1127,19 +1137,27 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1127
1137
|
*/
|
|
1128
1138
|
getByRefId(refId: string, pagination?: PaginationParams): RequestProxyResult<PaginateResult<CommentModel & {
|
|
1129
1139
|
ref: string;
|
|
1130
|
-
}
|
|
1140
|
+
}> & {
|
|
1141
|
+
readers: Record<string, ReaderModel>;
|
|
1142
|
+
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1131
1143
|
[key: string]: any;
|
|
1132
1144
|
data: PaginateResult<CommentModel & {
|
|
1133
1145
|
ref: string;
|
|
1134
|
-
}
|
|
1146
|
+
}> & {
|
|
1147
|
+
readers: Record<string, ReaderModel>;
|
|
1148
|
+
};
|
|
1135
1149
|
} : ResponseWrapper extends {
|
|
1136
1150
|
data: PaginateResult<CommentModel & {
|
|
1137
1151
|
ref: string;
|
|
1138
|
-
}
|
|
1152
|
+
}> & {
|
|
1153
|
+
readers: Record<string, ReaderModel>;
|
|
1154
|
+
};
|
|
1139
1155
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1140
1156
|
data: PaginateResult<CommentModel & {
|
|
1141
1157
|
ref: string;
|
|
1142
|
-
}
|
|
1158
|
+
}> & {
|
|
1159
|
+
readers: Record<string, ReaderModel>;
|
|
1160
|
+
};
|
|
1143
1161
|
}>;
|
|
1144
1162
|
/**
|
|
1145
1163
|
* 评论
|
|
@@ -1880,4 +1898,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
1880
1898
|
*/
|
|
1881
1899
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
1882
1900
|
|
|
1883
|
-
export { AIController, type AISummaryModel, AckController, ActivityController, type ActivityPresence, AdminExtraModel, AggregateController, type AggregateRoot, type AggregateRootWithTheme, type AggregateStat, type AggregateTop, type AggregateTopNote, type AggregateTopPost, AlgoliaSearchOptionsModel, type AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, type BaseCommentIndexModel, type BaseModel, CategoryController, type CategoryEntries, type CategoryModel, CategoryType, type CategoryWithChildrenModel, CollectionRefTypes, CommentController, type CommentDto, type CommentModel, CommentOptionsModel, type CommentRef, CommentState, type Coordinate, type Count, EnumPageType, HTTPClient, type IConfig, type IConfigKeys, IRequestAdapter, type Image, type LastYearPublication, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, type RecentActivities, type RecentComment, type RecentLike, type RecentNote, type RecentPost, type RecentRecent, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, type RoomOmittedNote, type RoomOmittedPage, type RoomOmittedPost, type RoomsData, SayController, type SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, type SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, type SubscribeType, SubscribeTypeToBitMap, type TLogin, type TagModel, type TextBaseModel, type TimelineData, TimelineType, TopicController, type TopicModel, type Url, UrlOptionModel, UserController, type UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
|
1901
|
+
export { AIController, type AISummaryModel, AckController, ActivityController, type ActivityPresence, AdminExtraModel, AggregateController, type AggregateRoot, type AggregateRootWithTheme, type AggregateStat, type AggregateTop, type AggregateTopNote, type AggregateTopPost, AlgoliaSearchOptionsModel, type AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, type BaseCommentIndexModel, type BaseModel, CategoryController, type CategoryEntries, type CategoryModel, CategoryType, type CategoryWithChildrenModel, CollectionRefTypes, CommentController, type CommentDto, type CommentModel, CommentOptionsModel, type CommentRef, CommentState, type Coordinate, type Count, EnumPageType, HTTPClient, type IConfig, type IConfigKeys, IRequestAdapter, type Image, type LastYearPublication, LinkController, type LinkModel, LinkState, LinkType, MailOptionsModel, type ModelWithLiked, NoteController, type NoteModel, type NoteWrappedPayload, type NoteWrappedWithLikedPayload, PageController, type PageModel, type Pager, type PaginateResult, PostController, type PostModel, ProjectController, type ProjectModel, type ReaderModel, type RecentActivities, type RecentComment, type RecentLike, type RecentNote, type RecentPost, type RecentRecent, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, type RecentlyModel, type RecentlyRefType, RecentlyRefTypes, RequestError, type RoomOmittedNote, type RoomOmittedPage, type RoomOmittedPost, type RoomsData, SayController, type SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, type SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, type SubscribeType, SubscribeTypeToBitMap, type TLogin, type TagModel, type TextBaseModel, type TimelineData, TimelineType, TopicController, type TopicModel, type Url, UrlOptionModel, UserController, type UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
package/dist/index.global.js
CHANGED
|
@@ -373,7 +373,7 @@
|
|
|
373
373
|
return this.client.proxy(this.base);
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
376
|
-
* 根据 comment id
|
|
376
|
+
* 根据 comment id 获取评论,包括子评论
|
|
377
377
|
*/
|
|
378
378
|
getById(id) {
|
|
379
379
|
return this.proxy(id).get();
|
|
@@ -847,10 +847,10 @@
|
|
|
847
847
|
|
|
848
848
|
// controllers/index.ts
|
|
849
849
|
var allControllers = [
|
|
850
|
-
AIController,
|
|
851
850
|
AckController,
|
|
852
851
|
ActivityController,
|
|
853
852
|
AggregateController,
|
|
853
|
+
AIController,
|
|
854
854
|
CategoryController,
|
|
855
855
|
CommentController,
|
|
856
856
|
LinkController,
|
|
@@ -859,12 +859,12 @@
|
|
|
859
859
|
PostController,
|
|
860
860
|
ProjectController,
|
|
861
861
|
RecentlyController,
|
|
862
|
-
TopicController,
|
|
863
862
|
SayController,
|
|
864
863
|
SearchController,
|
|
865
|
-
SnippetController,
|
|
866
864
|
ServerlessController,
|
|
865
|
+
SnippetController,
|
|
867
866
|
SubscribeController,
|
|
867
|
+
TopicController,
|
|
868
868
|
UserController
|
|
869
869
|
];
|
|
870
870
|
var allControllerNames = [
|
package/dist/index.js
CHANGED
|
@@ -371,7 +371,7 @@ var CommentController = class {
|
|
|
371
371
|
return this.client.proxy(this.base);
|
|
372
372
|
}
|
|
373
373
|
/**
|
|
374
|
-
* 根据 comment id
|
|
374
|
+
* 根据 comment id 获取评论,包括子评论
|
|
375
375
|
*/
|
|
376
376
|
getById(id) {
|
|
377
377
|
return this.proxy(id).get();
|
|
@@ -845,10 +845,10 @@ var UserController = class {
|
|
|
845
845
|
|
|
846
846
|
// controllers/index.ts
|
|
847
847
|
var allControllers = [
|
|
848
|
-
AIController,
|
|
849
848
|
AckController,
|
|
850
849
|
ActivityController,
|
|
851
850
|
AggregateController,
|
|
851
|
+
AIController,
|
|
852
852
|
CategoryController,
|
|
853
853
|
CommentController,
|
|
854
854
|
LinkController,
|
|
@@ -857,12 +857,12 @@ var allControllers = [
|
|
|
857
857
|
PostController,
|
|
858
858
|
ProjectController,
|
|
859
859
|
RecentlyController,
|
|
860
|
-
TopicController,
|
|
861
860
|
SayController,
|
|
862
861
|
SearchController,
|
|
863
|
-
SnippetController,
|
|
864
862
|
ServerlessController,
|
|
863
|
+
SnippetController,
|
|
865
864
|
SubscribeController,
|
|
865
|
+
TopicController,
|
|
866
866
|
UserController
|
|
867
867
|
];
|
|
868
868
|
var allControllerNames = [
|
package/models/comment.ts
CHANGED
package/models/index.ts
CHANGED
package/models/reader.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mx-space/api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A api client for mx-space server@next",
|
|
6
6
|
"author": "Innei",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"axios": "^1.6.7",
|
|
52
52
|
"camelcase-keys": "^9.1.3",
|
|
53
53
|
"cors": "2.8.5",
|
|
54
|
-
"express": "4.
|
|
54
|
+
"express": "4.20.0",
|
|
55
55
|
"form-data": "4.0.0",
|
|
56
56
|
"lodash": "4.17.21",
|
|
57
57
|
"tsup": "8.2.4",
|