@mx-space/api-client 3.8.0 → 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 +9 -11
- package/dist/index.d.cts +331 -278
- package/dist/index.d.mts +331 -278
- package/dist/index.mjs +9 -11
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -126,17 +126,13 @@ declare class AckController<ResponseWrapper> implements IController {
|
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region ../../apps/core/src/constants/db.constant.d.ts
|
|
128
128
|
declare enum CollectionRefTypes {
|
|
129
|
-
Post = "
|
|
130
|
-
Note = "
|
|
131
|
-
Page = "
|
|
132
|
-
Recently = "
|
|
129
|
+
Post = "post",
|
|
130
|
+
Note = "note",
|
|
131
|
+
Page = "page",
|
|
132
|
+
Recently = "recently"
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region models/base.d.ts
|
|
136
|
-
interface Count {
|
|
137
|
-
read: number;
|
|
138
|
-
like: number;
|
|
139
|
-
}
|
|
140
136
|
interface Image {
|
|
141
137
|
height: number;
|
|
142
138
|
width: number;
|
|
@@ -157,33 +153,6 @@ interface PaginateResult<T> {
|
|
|
157
153
|
data: T[];
|
|
158
154
|
pagination: Pager;
|
|
159
155
|
}
|
|
160
|
-
interface BaseModel {
|
|
161
|
-
created: string;
|
|
162
|
-
id: string;
|
|
163
|
-
}
|
|
164
|
-
interface BaseCommentIndexModel extends BaseModel {
|
|
165
|
-
commentsIndex?: number;
|
|
166
|
-
allowComment: boolean;
|
|
167
|
-
}
|
|
168
|
-
interface TextBaseModelMarkdown extends BaseCommentIndexModel {
|
|
169
|
-
title: string;
|
|
170
|
-
text: string;
|
|
171
|
-
contentFormat?: 'markdown';
|
|
172
|
-
content?: undefined;
|
|
173
|
-
images?: Image[];
|
|
174
|
-
modified: string | null;
|
|
175
|
-
meta?: Record<string, any> | null;
|
|
176
|
-
}
|
|
177
|
-
interface TextBaseModelLexical extends BaseCommentIndexModel {
|
|
178
|
-
title: string;
|
|
179
|
-
text?: string;
|
|
180
|
-
contentFormat: 'lexical';
|
|
181
|
-
content: string;
|
|
182
|
-
images?: Image[];
|
|
183
|
-
modified: string | null;
|
|
184
|
-
meta?: Record<string, any> | null;
|
|
185
|
-
}
|
|
186
|
-
type TextBaseModel = TextBaseModelMarkdown | TextBaseModelLexical;
|
|
187
156
|
type ModelWithLiked<T> = T & {
|
|
188
157
|
liked: boolean;
|
|
189
158
|
};
|
|
@@ -206,33 +175,80 @@ type ModelWithTranslation<T> = T & {
|
|
|
206
175
|
};
|
|
207
176
|
//#endregion
|
|
208
177
|
//#region models/post.d.ts
|
|
209
|
-
type
|
|
178
|
+
type PostContentFormat = 'markdown' | 'lexical';
|
|
179
|
+
interface PostModelMarkdown {
|
|
180
|
+
id: string;
|
|
181
|
+
createdAt: string;
|
|
182
|
+
modifiedAt: string | null;
|
|
183
|
+
title: string;
|
|
184
|
+
text: string;
|
|
185
|
+
contentFormat?: 'markdown';
|
|
186
|
+
content?: undefined;
|
|
187
|
+
meta?: Record<string, any> | null;
|
|
210
188
|
summary?: string | null;
|
|
211
189
|
copyright: boolean;
|
|
212
190
|
tags: string[];
|
|
213
|
-
count: Count;
|
|
214
191
|
slug: string;
|
|
215
192
|
categoryId: string;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
193
|
+
category: CategoryModel;
|
|
194
|
+
images?: Image[];
|
|
195
|
+
isPublished: boolean;
|
|
196
|
+
readCount: number;
|
|
197
|
+
likeCount: number;
|
|
198
|
+
pinAt?: string | null;
|
|
199
|
+
pinOrder?: number | null;
|
|
200
|
+
related?: PostRelatedSummary[];
|
|
201
|
+
}
|
|
202
|
+
interface PostModelLexical {
|
|
203
|
+
id: string;
|
|
204
|
+
createdAt: string;
|
|
205
|
+
modifiedAt: string | null;
|
|
206
|
+
title: string;
|
|
207
|
+
text?: string;
|
|
208
|
+
contentFormat: 'lexical';
|
|
209
|
+
content: string;
|
|
210
|
+
meta?: Record<string, any> | null;
|
|
211
|
+
summary?: string | null;
|
|
212
|
+
copyright: boolean;
|
|
213
|
+
tags: string[];
|
|
214
|
+
slug: string;
|
|
215
|
+
categoryId: string;
|
|
216
|
+
category: CategoryModel;
|
|
217
|
+
images?: Image[];
|
|
218
|
+
isPublished: boolean;
|
|
219
|
+
readCount: number;
|
|
220
|
+
likeCount: number;
|
|
221
|
+
pinAt?: string | null;
|
|
222
|
+
pinOrder?: number | null;
|
|
223
|
+
related?: PostRelatedSummary[];
|
|
224
|
+
}
|
|
225
|
+
type PostModel = PostModelMarkdown | PostModelLexical;
|
|
226
|
+
interface PostRelatedSummary {
|
|
227
|
+
id: string;
|
|
228
|
+
title: string;
|
|
229
|
+
slug: string;
|
|
230
|
+
summary: string | null;
|
|
231
|
+
categoryId: string;
|
|
232
|
+
category?: CategoryModel;
|
|
233
|
+
createdAt: string;
|
|
234
|
+
modifiedAt: string | null;
|
|
235
|
+
}
|
|
222
236
|
//#endregion
|
|
223
237
|
//#region models/category.d.ts
|
|
224
238
|
declare enum CategoryType {
|
|
225
239
|
Category = 0,
|
|
226
240
|
Tag = 1
|
|
227
241
|
}
|
|
228
|
-
interface CategoryModel
|
|
242
|
+
interface CategoryModel {
|
|
243
|
+
id: string;
|
|
244
|
+
createdAt: string;
|
|
229
245
|
type: CategoryType;
|
|
230
|
-
count: number;
|
|
231
246
|
slug: string;
|
|
232
247
|
name: string;
|
|
248
|
+
count?: number;
|
|
233
249
|
}
|
|
234
|
-
type CategoryChildPost = Pick<PostModel, 'id' | 'title' | 'slug' | '
|
|
235
|
-
type CategoryWithChildrenModel = CategoryModel
|
|
250
|
+
type CategoryChildPost = Pick<PostModel, 'id' | 'title' | 'slug' | 'modifiedAt' | 'createdAt' | 'tags' | 'pinAt' | 'readCount' | 'likeCount'>;
|
|
251
|
+
type CategoryWithChildrenModel = CategoryModel & {
|
|
236
252
|
children: CategoryChildPost[]; /** Aggregated tag-name → post-count for posts under this category. */
|
|
237
253
|
tagsSum?: Array<{
|
|
238
254
|
name: string;
|
|
@@ -246,7 +262,7 @@ interface TagModel {
|
|
|
246
262
|
count: number;
|
|
247
263
|
name: string;
|
|
248
264
|
}
|
|
249
|
-
type TagDetailPost = Pick<PostModel, 'id' | 'title' | 'slug' | 'category' | '
|
|
265
|
+
type TagDetailPost = Pick<PostModel, 'id' | 'title' | 'slug' | 'category' | 'createdAt' | 'modifiedAt' | 'summary' | 'tags' | 'pinAt' | 'readCount' | 'likeCount'>;
|
|
250
266
|
//#endregion
|
|
251
267
|
//#region models/activity.d.ts
|
|
252
268
|
interface ActivityPresence {
|
|
@@ -264,21 +280,21 @@ interface RoomOmittedNote {
|
|
|
264
280
|
title: string;
|
|
265
281
|
nid: number;
|
|
266
282
|
id: string;
|
|
267
|
-
|
|
283
|
+
createdAt: string;
|
|
268
284
|
}
|
|
269
285
|
interface RoomOmittedPage {
|
|
270
286
|
title: string;
|
|
271
287
|
slug: string;
|
|
272
288
|
id: string;
|
|
273
|
-
|
|
289
|
+
createdAt: string;
|
|
274
290
|
}
|
|
275
291
|
interface RoomOmittedPost {
|
|
276
292
|
slug: string;
|
|
277
293
|
title: string;
|
|
278
294
|
categoryId: string;
|
|
279
|
-
category: CategoryModel
|
|
295
|
+
category: CategoryModel;
|
|
280
296
|
id: string;
|
|
281
|
-
|
|
297
|
+
createdAt: string;
|
|
282
298
|
}
|
|
283
299
|
interface RoomsData {
|
|
284
300
|
rooms: string[];
|
|
@@ -299,7 +315,7 @@ interface RecentActivities {
|
|
|
299
315
|
note: RecentNote[];
|
|
300
316
|
}
|
|
301
317
|
interface RecentComment {
|
|
302
|
-
|
|
318
|
+
createdAt: string;
|
|
303
319
|
author: string;
|
|
304
320
|
text: string;
|
|
305
321
|
id: string;
|
|
@@ -314,7 +330,7 @@ interface RecentComment {
|
|
|
314
330
|
};
|
|
315
331
|
}
|
|
316
332
|
interface RecentLike {
|
|
317
|
-
|
|
333
|
+
createdAt: string;
|
|
318
334
|
id: string;
|
|
319
335
|
type: CollectionRefTypes.Post | CollectionRefTypes.Note;
|
|
320
336
|
nid?: number;
|
|
@@ -323,16 +339,16 @@ interface RecentLike {
|
|
|
323
339
|
}
|
|
324
340
|
interface RecentNote {
|
|
325
341
|
id: string;
|
|
326
|
-
|
|
342
|
+
createdAt: string;
|
|
327
343
|
title: string;
|
|
328
|
-
|
|
344
|
+
modifiedAt: string | null;
|
|
329
345
|
nid: number;
|
|
330
346
|
}
|
|
331
347
|
interface RecentPost {
|
|
332
348
|
id: string;
|
|
333
|
-
|
|
349
|
+
createdAt: string;
|
|
334
350
|
title: string;
|
|
335
|
-
|
|
351
|
+
modifiedAt: string | null;
|
|
336
352
|
slug: string;
|
|
337
353
|
category?: {
|
|
338
354
|
slug: string;
|
|
@@ -344,7 +360,7 @@ interface RecentRecent {
|
|
|
344
360
|
content: string;
|
|
345
361
|
up: number;
|
|
346
362
|
down: number;
|
|
347
|
-
|
|
363
|
+
createdAt: string;
|
|
348
364
|
}
|
|
349
365
|
interface LastYearPublication {
|
|
350
366
|
posts: PostsItem[];
|
|
@@ -352,7 +368,7 @@ interface LastYearPublication {
|
|
|
352
368
|
}
|
|
353
369
|
interface PostsItem {
|
|
354
370
|
id: string;
|
|
355
|
-
|
|
371
|
+
createdAt: string;
|
|
356
372
|
title: string;
|
|
357
373
|
slug: string;
|
|
358
374
|
categoryId: string;
|
|
@@ -363,11 +379,11 @@ interface Category {
|
|
|
363
379
|
type: number;
|
|
364
380
|
name: string;
|
|
365
381
|
slug: string;
|
|
366
|
-
|
|
382
|
+
createdAt: string;
|
|
367
383
|
}
|
|
368
384
|
interface NotesItem {
|
|
369
385
|
id: string;
|
|
370
|
-
|
|
386
|
+
createdAt: string;
|
|
371
387
|
title: string;
|
|
372
388
|
mood: string;
|
|
373
389
|
weather: string;
|
|
@@ -376,33 +392,43 @@ interface NotesItem {
|
|
|
376
392
|
}
|
|
377
393
|
//#endregion
|
|
378
394
|
//#region models/topic.d.ts
|
|
379
|
-
interface TopicModel
|
|
380
|
-
|
|
381
|
-
|
|
395
|
+
interface TopicModel {
|
|
396
|
+
id: string;
|
|
397
|
+
createdAt: string;
|
|
382
398
|
name: string;
|
|
383
399
|
slug: string;
|
|
384
|
-
|
|
400
|
+
description: string;
|
|
401
|
+
introduce: string | null;
|
|
402
|
+
icon: string | null;
|
|
385
403
|
}
|
|
386
404
|
//#endregion
|
|
387
405
|
//#region models/note.d.ts
|
|
388
|
-
|
|
406
|
+
interface NoteModel {
|
|
407
|
+
id: string;
|
|
408
|
+
nid: number;
|
|
409
|
+
title: string;
|
|
410
|
+
slug?: string | null;
|
|
411
|
+
text: string;
|
|
412
|
+
content?: string | null;
|
|
413
|
+
contentFormat: 'markdown' | 'lexical';
|
|
414
|
+
images?: Image[] | null;
|
|
415
|
+
meta?: Record<string, any> | null;
|
|
389
416
|
isPublished: boolean;
|
|
390
|
-
|
|
391
|
-
read: number;
|
|
392
|
-
like: number;
|
|
393
|
-
};
|
|
394
|
-
mood?: string;
|
|
395
|
-
weather?: string;
|
|
396
|
-
bookmark?: boolean;
|
|
397
|
-
publicAt?: Date;
|
|
417
|
+
hasPassword: boolean;
|
|
398
418
|
password?: string | null;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
419
|
+
publicAt?: string | Date | null;
|
|
420
|
+
mood?: string | null;
|
|
421
|
+
weather?: string | null;
|
|
422
|
+
bookmark: boolean;
|
|
423
|
+
coordinates?: Coordinate | null;
|
|
424
|
+
location?: string | null;
|
|
425
|
+
readCount: number;
|
|
426
|
+
likeCount: number;
|
|
427
|
+
topicId?: string | null;
|
|
428
|
+
topic?: TopicModel | null;
|
|
429
|
+
createdAt: string;
|
|
430
|
+
modifiedAt: string | null;
|
|
431
|
+
}
|
|
406
432
|
interface Coordinate {
|
|
407
433
|
latitude: number;
|
|
408
434
|
longitude: number;
|
|
@@ -424,10 +450,12 @@ interface NoteWrappedWithLikedAndTranslationPayload {
|
|
|
424
450
|
}
|
|
425
451
|
//#endregion
|
|
426
452
|
//#region models/say.d.ts
|
|
427
|
-
interface SayModel
|
|
453
|
+
interface SayModel {
|
|
454
|
+
id: string;
|
|
455
|
+
createdAt: string;
|
|
428
456
|
text: string;
|
|
429
|
-
source
|
|
430
|
-
author
|
|
457
|
+
source: string | null;
|
|
458
|
+
author: string | null;
|
|
431
459
|
}
|
|
432
460
|
//#endregion
|
|
433
461
|
//#region models/setting.d.ts
|
|
@@ -512,26 +540,30 @@ interface IConfig {
|
|
|
512
540
|
declare type IConfigKeys = keyof IConfig;
|
|
513
541
|
//#endregion
|
|
514
542
|
//#region models/user.d.ts
|
|
515
|
-
interface UserModel
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
url: string;
|
|
519
|
-
name: string;
|
|
520
|
-
socialIds: Record<string, string>;
|
|
543
|
+
interface UserModel {
|
|
544
|
+
id: string;
|
|
545
|
+
createdAt: string;
|
|
521
546
|
username: string;
|
|
522
|
-
|
|
523
|
-
v: number;
|
|
524
|
-
lastLoginTime: string;
|
|
525
|
-
lastLoginIp?: string;
|
|
547
|
+
name: string;
|
|
526
548
|
avatar: string;
|
|
527
|
-
|
|
549
|
+
mail: string;
|
|
550
|
+
introduce?: string;
|
|
551
|
+
url?: string;
|
|
552
|
+
socialIds?: Record<string, string>;
|
|
553
|
+
lastLoginTime?: string;
|
|
554
|
+
lastLoginIp?: string | null;
|
|
555
|
+
role?: 'owner' | 'reader';
|
|
556
|
+
email?: string;
|
|
557
|
+
image?: string;
|
|
558
|
+
handle?: string;
|
|
559
|
+
displayUsername?: string;
|
|
528
560
|
}
|
|
529
561
|
type TLogin = {
|
|
530
562
|
token: string;
|
|
531
563
|
expiresIn: number;
|
|
532
564
|
lastLoginTime: null | string;
|
|
533
565
|
lastLoginIp?: null | string;
|
|
534
|
-
} & Pick<UserModel, 'name' | 'username' | '
|
|
566
|
+
} & Pick<UserModel, 'name' | 'username' | 'createdAt' | 'url' | 'mail' | 'avatar' | 'id'>;
|
|
535
567
|
type BetterAuthUserRole = 'owner' | 'reader';
|
|
536
568
|
interface BetterAuthUser {
|
|
537
569
|
id: string;
|
|
@@ -612,8 +644,8 @@ interface Url {
|
|
|
612
644
|
serverUrl: string;
|
|
613
645
|
webUrl: string;
|
|
614
646
|
}
|
|
615
|
-
interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | '
|
|
616
|
-
interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | '
|
|
647
|
+
interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'createdAt' | 'nid' | 'images' | 'mood' | 'weather'> {}
|
|
648
|
+
interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'createdAt' | 'title' | 'category' | 'images' | 'summary'> {}
|
|
617
649
|
interface AggregateTop {
|
|
618
650
|
notes: AggregateTopNote[];
|
|
619
651
|
posts: AggregateTopPost[];
|
|
@@ -624,15 +656,15 @@ declare enum TimelineType {
|
|
|
624
656
|
Note = 1
|
|
625
657
|
}
|
|
626
658
|
interface TimelineData {
|
|
627
|
-
notes?: Pick<NoteModel, 'id' | 'nid' | 'title' | 'weather' | 'mood' | '
|
|
628
|
-
posts?: (Pick<PostModel, 'id' | 'title' | 'slug' | '
|
|
659
|
+
notes?: Pick<NoteModel, 'id' | 'nid' | 'title' | 'weather' | 'mood' | 'createdAt' | 'modifiedAt' | 'bookmark'>[];
|
|
660
|
+
posts?: (Pick<PostModel, 'id' | 'title' | 'slug' | 'createdAt' | 'modifiedAt' | 'category'> & {
|
|
629
661
|
url: string;
|
|
630
662
|
})[];
|
|
631
663
|
}
|
|
632
|
-
interface LatestPostItem extends Pick<PostModel, 'id' | 'title' | 'slug' | '
|
|
664
|
+
interface LatestPostItem extends Pick<PostModel, 'id' | 'title' | 'slug' | 'createdAt' | 'modifiedAt' | 'tags'> {
|
|
633
665
|
category: Pick<CategoryModel, 'name' | 'slug'> | null;
|
|
634
666
|
}
|
|
635
|
-
interface LatestNoteItem extends Pick<NoteModel, 'id' | 'title' | 'nid' | '
|
|
667
|
+
interface LatestNoteItem extends Pick<NoteModel, 'id' | 'title' | 'nid' | 'createdAt' | 'modifiedAt' | 'mood' | 'weather' | 'bookmark'> {}
|
|
636
668
|
interface LatestData {
|
|
637
669
|
posts?: LatestPostItem[];
|
|
638
670
|
notes?: LatestNoteItem[];
|
|
@@ -665,15 +697,15 @@ interface AggregateStat {
|
|
|
665
697
|
//#region models/ai.d.ts
|
|
666
698
|
interface AISummaryModel {
|
|
667
699
|
id: string;
|
|
668
|
-
|
|
700
|
+
createdAt: string;
|
|
669
701
|
summary: string;
|
|
670
702
|
hash: string;
|
|
671
703
|
refId: string;
|
|
672
|
-
lang: string;
|
|
704
|
+
lang: string | null;
|
|
673
705
|
}
|
|
674
706
|
interface AITranslationModel {
|
|
675
707
|
id: string;
|
|
676
|
-
|
|
708
|
+
createdAt: string;
|
|
677
709
|
hash: string;
|
|
678
710
|
refId: string;
|
|
679
711
|
refType: string;
|
|
@@ -681,11 +713,13 @@ interface AITranslationModel {
|
|
|
681
713
|
sourceLang: string;
|
|
682
714
|
title: string;
|
|
683
715
|
text: string;
|
|
684
|
-
subtitle
|
|
685
|
-
summary
|
|
686
|
-
tags
|
|
687
|
-
aiModel
|
|
688
|
-
aiProvider
|
|
716
|
+
subtitle: string | null;
|
|
717
|
+
summary: string | null;
|
|
718
|
+
tags: string[];
|
|
719
|
+
aiModel: string | null;
|
|
720
|
+
aiProvider: string | null;
|
|
721
|
+
contentFormat: string | null;
|
|
722
|
+
content: string | null;
|
|
689
723
|
}
|
|
690
724
|
interface AIDeepReadingModel {
|
|
691
725
|
id: string;
|
|
@@ -723,19 +757,15 @@ type AITranslationStreamEvent = {
|
|
|
723
757
|
};
|
|
724
758
|
interface AIInsightsModel {
|
|
725
759
|
id: string;
|
|
726
|
-
|
|
727
|
-
updated?: string;
|
|
760
|
+
createdAt: string;
|
|
728
761
|
hash: string;
|
|
729
762
|
refId: string;
|
|
730
763
|
lang: string;
|
|
731
764
|
content: string;
|
|
732
765
|
isTranslation: boolean;
|
|
733
|
-
sourceInsightsId
|
|
734
|
-
sourceLang
|
|
735
|
-
modelInfo
|
|
736
|
-
provider: string;
|
|
737
|
-
model: string;
|
|
738
|
-
};
|
|
766
|
+
sourceInsightsId: string | null;
|
|
767
|
+
sourceLang: string | null;
|
|
768
|
+
modelInfo: Record<string, unknown> | null;
|
|
739
769
|
}
|
|
740
770
|
type AIInsightsStreamEvent = {
|
|
741
771
|
type: 'token';
|
|
@@ -760,29 +790,44 @@ interface AuthUser {
|
|
|
760
790
|
}
|
|
761
791
|
//#endregion
|
|
762
792
|
//#region models/comment.d.ts
|
|
763
|
-
|
|
793
|
+
/**
|
|
794
|
+
* 评论父级预览:仅暴露列表/详情中渲染父评论引用所需之最小字段。
|
|
795
|
+
* 服务端有意去 ip/mail/agent 等 PII,故不可与 CommentModel 通用。
|
|
796
|
+
*/
|
|
797
|
+
interface CommentParentPreview {
|
|
798
|
+
id: string;
|
|
799
|
+
author: string | null;
|
|
800
|
+
text: string;
|
|
801
|
+
isDeleted: boolean;
|
|
802
|
+
}
|
|
803
|
+
interface CommentModel {
|
|
804
|
+
id: string;
|
|
805
|
+
createdAt: string;
|
|
764
806
|
refType: CollectionRefTypes;
|
|
765
|
-
|
|
807
|
+
refId: string;
|
|
766
808
|
state: number;
|
|
767
|
-
author: string;
|
|
809
|
+
author: string | null;
|
|
768
810
|
text: string;
|
|
769
|
-
mail
|
|
770
|
-
url
|
|
771
|
-
ip
|
|
772
|
-
agent
|
|
773
|
-
pin
|
|
774
|
-
avatar: string;
|
|
775
|
-
parentCommentId
|
|
776
|
-
rootCommentId
|
|
777
|
-
replyCount
|
|
778
|
-
latestReplyAt
|
|
779
|
-
isDeleted
|
|
780
|
-
deletedAt
|
|
781
|
-
isWhispers
|
|
782
|
-
location
|
|
783
|
-
authProvider
|
|
784
|
-
readerId
|
|
785
|
-
editedAt
|
|
811
|
+
mail: string | null;
|
|
812
|
+
url: string | null;
|
|
813
|
+
ip: string | null;
|
|
814
|
+
agent: string | null;
|
|
815
|
+
pin: boolean;
|
|
816
|
+
avatar: string | null;
|
|
817
|
+
parentCommentId: string | null;
|
|
818
|
+
rootCommentId: string | null;
|
|
819
|
+
replyCount: number;
|
|
820
|
+
latestReplyAt: string | null;
|
|
821
|
+
isDeleted: boolean;
|
|
822
|
+
deletedAt: string | null;
|
|
823
|
+
isWhispers: boolean;
|
|
824
|
+
location: string | null;
|
|
825
|
+
authProvider: string | null;
|
|
826
|
+
readerId: string | null;
|
|
827
|
+
editedAt: string | null;
|
|
828
|
+
anchor: Record<string, unknown> | null;
|
|
829
|
+
/** 仅 list/detail 端点附加(服务端 attachParentPreview 之结果)。 */
|
|
830
|
+
parent?: CommentParentPreview | null;
|
|
786
831
|
}
|
|
787
832
|
interface CommentReplyWindow {
|
|
788
833
|
total: number;
|
|
@@ -807,7 +852,7 @@ interface CommentRef {
|
|
|
807
852
|
categoryId?: string;
|
|
808
853
|
slug: string;
|
|
809
854
|
title: string;
|
|
810
|
-
category?: CategoryModel
|
|
855
|
+
category?: CategoryModel;
|
|
811
856
|
}
|
|
812
857
|
declare enum CommentState {
|
|
813
858
|
Unread = 0,
|
|
@@ -827,15 +872,17 @@ declare enum LinkState {
|
|
|
827
872
|
Banned = 3,
|
|
828
873
|
Reject = 4
|
|
829
874
|
}
|
|
830
|
-
interface LinkModel
|
|
875
|
+
interface LinkModel {
|
|
876
|
+
id: string;
|
|
877
|
+
createdAt: string;
|
|
831
878
|
name: string;
|
|
832
879
|
url: string;
|
|
833
|
-
avatar: string;
|
|
834
|
-
description
|
|
880
|
+
avatar: string | null;
|
|
881
|
+
description: string | null;
|
|
835
882
|
type: LinkType;
|
|
836
883
|
state: LinkState;
|
|
837
884
|
hide: boolean;
|
|
838
|
-
email: string;
|
|
885
|
+
email: string | null;
|
|
839
886
|
}
|
|
840
887
|
//#endregion
|
|
841
888
|
//#region models/page.d.ts
|
|
@@ -844,25 +891,52 @@ declare enum EnumPageType {
|
|
|
844
891
|
'html' = "html",
|
|
845
892
|
'frame' = "frame"
|
|
846
893
|
}
|
|
847
|
-
|
|
848
|
-
|
|
894
|
+
interface PageModelMarkdown {
|
|
895
|
+
id: string;
|
|
896
|
+
createdAt: string;
|
|
897
|
+
modifiedAt: string | null;
|
|
898
|
+
title: string;
|
|
899
|
+
slug: string;
|
|
900
|
+
subtitle?: string | null;
|
|
901
|
+
text: string;
|
|
902
|
+
contentFormat?: 'markdown';
|
|
903
|
+
content?: undefined;
|
|
904
|
+
meta?: Record<string, any> | null;
|
|
905
|
+
images?: Image[];
|
|
906
|
+
order?: number;
|
|
907
|
+
type?: EnumPageType;
|
|
908
|
+
options?: object;
|
|
909
|
+
}
|
|
910
|
+
interface PageModelLexical {
|
|
911
|
+
id: string;
|
|
912
|
+
createdAt: string;
|
|
913
|
+
modifiedAt: string | null;
|
|
914
|
+
title: string;
|
|
849
915
|
slug: string;
|
|
850
|
-
subtitle?: string;
|
|
916
|
+
subtitle?: string | null;
|
|
917
|
+
text?: string;
|
|
918
|
+
contentFormat: 'lexical';
|
|
919
|
+
content: string;
|
|
920
|
+
meta?: Record<string, any> | null;
|
|
921
|
+
images?: Image[];
|
|
851
922
|
order?: number;
|
|
852
923
|
type?: EnumPageType;
|
|
853
924
|
options?: object;
|
|
854
|
-
}
|
|
925
|
+
}
|
|
926
|
+
type PageModel = PageModelMarkdown | PageModelLexical;
|
|
855
927
|
//#endregion
|
|
856
928
|
//#region models/project.d.ts
|
|
857
|
-
interface ProjectModel
|
|
929
|
+
interface ProjectModel {
|
|
930
|
+
id: string;
|
|
931
|
+
createdAt: string;
|
|
858
932
|
name: string;
|
|
859
|
-
previewUrl?: string;
|
|
860
|
-
docUrl?: string;
|
|
861
|
-
projectUrl?: string;
|
|
862
|
-
images?: string[];
|
|
863
933
|
description: string;
|
|
864
|
-
|
|
865
|
-
|
|
934
|
+
previewUrl: string | null;
|
|
935
|
+
docUrl: string | null;
|
|
936
|
+
projectUrl: string | null;
|
|
937
|
+
images: string[] | null;
|
|
938
|
+
avatar: string | null;
|
|
939
|
+
text: string | null;
|
|
866
940
|
}
|
|
867
941
|
//#endregion
|
|
868
942
|
//#region models/reader.d.ts
|
|
@@ -876,9 +950,10 @@ interface ReaderModel {
|
|
|
876
950
|
//#endregion
|
|
877
951
|
//#region models/recently.d.ts
|
|
878
952
|
declare enum RecentlyRefTypes {
|
|
879
|
-
Post = "
|
|
880
|
-
Note = "
|
|
881
|
-
Page = "
|
|
953
|
+
Post = "post",
|
|
954
|
+
Note = "note",
|
|
955
|
+
Page = "page",
|
|
956
|
+
Recently = "recently"
|
|
882
957
|
}
|
|
883
958
|
type RecentlyRefType = {
|
|
884
959
|
title: string;
|
|
@@ -948,37 +1023,49 @@ interface CodeMetadata {
|
|
|
948
1023
|
platform?: string;
|
|
949
1024
|
}
|
|
950
1025
|
type RecentlyMetadata = BookMetadata | MediaMetadata | MusicMetadata | GithubMetadata | LinkMetadata | AcademicMetadata | CodeMetadata;
|
|
951
|
-
interface RecentlyModel
|
|
1026
|
+
interface RecentlyModel {
|
|
1027
|
+
id: string;
|
|
1028
|
+
createdAt: string;
|
|
1029
|
+
modifiedAt: string | null;
|
|
952
1030
|
content: string;
|
|
953
1031
|
type: RecentlyTypeEnum;
|
|
954
|
-
metadata
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
};
|
|
958
|
-
refId?: string;
|
|
959
|
-
refType?: RecentlyRefTypes;
|
|
1032
|
+
metadata: RecentlyMetadata | null;
|
|
1033
|
+
refType: RecentlyRefTypes;
|
|
1034
|
+
refId: string | null;
|
|
960
1035
|
up: number;
|
|
961
1036
|
down: number;
|
|
962
|
-
|
|
1037
|
+
commentsIndex: number;
|
|
1038
|
+
allowComment: boolean;
|
|
963
1039
|
}
|
|
964
1040
|
//#endregion
|
|
965
1041
|
//#region models/snippet.d.ts
|
|
966
1042
|
declare enum SnippetType {
|
|
967
1043
|
JSON = "json",
|
|
1044
|
+
JSON5 = "json5",
|
|
968
1045
|
Function = "function",
|
|
969
1046
|
Text = "text",
|
|
970
1047
|
YAML = "yaml"
|
|
971
1048
|
}
|
|
972
|
-
interface SnippetModel<T = unknown>
|
|
1049
|
+
interface SnippetModel<T = unknown> {
|
|
1050
|
+
id: string;
|
|
1051
|
+
createdAt: string;
|
|
1052
|
+
updatedAt: string | null;
|
|
973
1053
|
type: SnippetType;
|
|
974
1054
|
private: boolean;
|
|
975
1055
|
raw: string;
|
|
976
1056
|
name: string;
|
|
977
1057
|
reference: string;
|
|
978
|
-
comment?: string;
|
|
979
|
-
metatype?: string;
|
|
980
|
-
schema?: string;
|
|
981
|
-
|
|
1058
|
+
comment?: string | null;
|
|
1059
|
+
metatype?: string | null;
|
|
1060
|
+
schema?: string | null;
|
|
1061
|
+
method?: string | null;
|
|
1062
|
+
customPath?: string | null;
|
|
1063
|
+
/** Encrypted on list endpoints; cleared key-value object on detail endpoints. */
|
|
1064
|
+
secret?: string | Record<string, unknown> | null;
|
|
1065
|
+
enable: boolean;
|
|
1066
|
+
builtIn: boolean;
|
|
1067
|
+
compiledCode?: string | null;
|
|
1068
|
+
data?: T;
|
|
982
1069
|
}
|
|
983
1070
|
//#endregion
|
|
984
1071
|
//#region ../../apps/core/src/modules/subscribe/subscribe.constant.d.ts
|
|
@@ -1266,11 +1353,11 @@ declare class AIController<ResponseWrapper> implements IController {
|
|
|
1266
1353
|
data: AISummaryModel;
|
|
1267
1354
|
}) ? T_1 extends unknown ? {
|
|
1268
1355
|
id: string;
|
|
1269
|
-
|
|
1356
|
+
created_at: string;
|
|
1270
1357
|
summary: string;
|
|
1271
1358
|
hash: string;
|
|
1272
1359
|
ref_id: string;
|
|
1273
|
-
lang: string;
|
|
1360
|
+
lang: string | null;
|
|
1274
1361
|
} : T_1 : never : never;
|
|
1275
1362
|
} : ResponseWrapper;
|
|
1276
1363
|
$request: {
|
|
@@ -1301,11 +1388,11 @@ declare class AIController<ResponseWrapper> implements IController {
|
|
|
1301
1388
|
data: AISummaryModel;
|
|
1302
1389
|
}) ? T_1 extends unknown ? {
|
|
1303
1390
|
id: string;
|
|
1304
|
-
|
|
1391
|
+
created_at: string;
|
|
1305
1392
|
summary: string;
|
|
1306
1393
|
hash: string;
|
|
1307
1394
|
ref_id: string;
|
|
1308
|
-
lang: string;
|
|
1395
|
+
lang: string | null;
|
|
1309
1396
|
} : T_1 : never : never;
|
|
1310
1397
|
} : ResponseWrapper;
|
|
1311
1398
|
$request: {
|
|
@@ -1385,7 +1472,7 @@ declare class AIController<ResponseWrapper> implements IController {
|
|
|
1385
1472
|
data: AITranslationModel;
|
|
1386
1473
|
}) ? T_1 extends unknown ? {
|
|
1387
1474
|
id: string;
|
|
1388
|
-
|
|
1475
|
+
created_at: string;
|
|
1389
1476
|
hash: string;
|
|
1390
1477
|
ref_id: string;
|
|
1391
1478
|
ref_type: string;
|
|
@@ -1393,11 +1480,13 @@ declare class AIController<ResponseWrapper> implements IController {
|
|
|
1393
1480
|
source_lang: string;
|
|
1394
1481
|
title: string;
|
|
1395
1482
|
text: string;
|
|
1396
|
-
subtitle
|
|
1397
|
-
summary
|
|
1398
|
-
tags
|
|
1399
|
-
ai_model
|
|
1400
|
-
ai_provider
|
|
1483
|
+
subtitle: string | null;
|
|
1484
|
+
summary: string | null;
|
|
1485
|
+
tags: string[];
|
|
1486
|
+
ai_model: string | null;
|
|
1487
|
+
ai_provider: string | null;
|
|
1488
|
+
content_format: string | null;
|
|
1489
|
+
content: string | null;
|
|
1401
1490
|
} : T_1 : never : never;
|
|
1402
1491
|
} : ResponseWrapper;
|
|
1403
1492
|
$request: {
|
|
@@ -1596,19 +1685,15 @@ declare class AIController<ResponseWrapper> implements IController {
|
|
|
1596
1685
|
data: AIInsightsModel | null;
|
|
1597
1686
|
}) ? T_1 extends unknown ? {
|
|
1598
1687
|
id: string;
|
|
1599
|
-
|
|
1600
|
-
updated?: string | undefined;
|
|
1688
|
+
created_at: string;
|
|
1601
1689
|
hash: string;
|
|
1602
1690
|
ref_id: string;
|
|
1603
1691
|
lang: string;
|
|
1604
1692
|
content: string;
|
|
1605
1693
|
is_translation: boolean;
|
|
1606
|
-
source_insights_id
|
|
1607
|
-
source_lang
|
|
1608
|
-
model_info
|
|
1609
|
-
provider: string;
|
|
1610
|
-
model: string;
|
|
1611
|
-
} | undefined;
|
|
1694
|
+
source_insights_id: string | null;
|
|
1695
|
+
source_lang: string | null;
|
|
1696
|
+
model_info: Record<string, unknown> | null;
|
|
1612
1697
|
} : T_1 : never : never;
|
|
1613
1698
|
} : ResponseWrapper;
|
|
1614
1699
|
$request: {
|
|
@@ -1659,14 +1744,14 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1659
1744
|
constructor(client: HTTPClient);
|
|
1660
1745
|
get proxy(): IRequestHandler<ResponseWrapper>;
|
|
1661
1746
|
getAllCategories(): RequestProxyResult<{
|
|
1662
|
-
data: CategoryModel
|
|
1747
|
+
data: CategoryModel[];
|
|
1663
1748
|
}, ResponseWrapper>;
|
|
1664
1749
|
getAllTags(): RequestProxyResult<{
|
|
1665
1750
|
data: TagModel[];
|
|
1666
1751
|
}, ResponseWrapper>;
|
|
1667
1752
|
getCategoryDetail(id: string): Promise<ResponseProxyExtraRaw<CategoryWithChildrenModel>>;
|
|
1668
1753
|
getCategoryDetail(ids: string[]): Promise<ResponseProxyExtraRaw<Map<string, CategoryWithChildrenModel>>>;
|
|
1669
|
-
getCategoryByIdOrSlug(idOrSlug: string): Promise<CategoryModel
|
|
1754
|
+
getCategoryByIdOrSlug(idOrSlug: string): Promise<CategoryModel & {
|
|
1670
1755
|
children: CategoryChildPost[];
|
|
1671
1756
|
tagsSum?: Array<{
|
|
1672
1757
|
name: string;
|
|
@@ -1692,12 +1777,12 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1692
1777
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1693
1778
|
data: CategoryWithChildrenModel;
|
|
1694
1779
|
}) ? T_1 extends unknown ? {
|
|
1780
|
+
id: string;
|
|
1781
|
+
created_at: string;
|
|
1695
1782
|
type: CategoryType;
|
|
1696
|
-
count: number;
|
|
1697
1783
|
slug: string;
|
|
1698
1784
|
name: string;
|
|
1699
|
-
|
|
1700
|
-
id: string;
|
|
1785
|
+
count?: number | undefined;
|
|
1701
1786
|
children: CategoryChildPost[];
|
|
1702
1787
|
tags_sum?: {
|
|
1703
1788
|
name: string;
|
|
@@ -1820,19 +1905,27 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1820
1905
|
* 根据 comment id 获取评论,包括子评论
|
|
1821
1906
|
*/
|
|
1822
1907
|
getById(id: string): RequestProxyResult<CommentModel & {
|
|
1823
|
-
|
|
1908
|
+
parent: CommentParentPreview | null;
|
|
1909
|
+
children?: CommentModel[];
|
|
1910
|
+
reader?: ReaderModel;
|
|
1824
1911
|
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1825
1912
|
[key: string]: any;
|
|
1826
1913
|
data: CommentModel & {
|
|
1827
|
-
|
|
1914
|
+
parent: CommentParentPreview | null;
|
|
1915
|
+
children?: CommentModel[];
|
|
1916
|
+
reader?: ReaderModel;
|
|
1828
1917
|
};
|
|
1829
1918
|
} : ResponseWrapper extends {
|
|
1830
1919
|
data: CommentModel & {
|
|
1831
|
-
|
|
1920
|
+
parent: CommentParentPreview | null;
|
|
1921
|
+
children?: CommentModel[];
|
|
1922
|
+
reader?: ReaderModel;
|
|
1832
1923
|
};
|
|
1833
1924
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1834
1925
|
data: CommentModel & {
|
|
1835
|
-
|
|
1926
|
+
parent: CommentParentPreview | null;
|
|
1927
|
+
children?: CommentModel[];
|
|
1928
|
+
reader?: ReaderModel;
|
|
1836
1929
|
};
|
|
1837
1930
|
}>;
|
|
1838
1931
|
/**
|
|
@@ -1842,27 +1935,19 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1842
1935
|
getByRefId(refId: string, params?: PaginationParams & {
|
|
1843
1936
|
sort?: 'pinned' | 'newest' | 'oldest';
|
|
1844
1937
|
around?: string;
|
|
1845
|
-
}): RequestProxyResult<PaginateResult<CommentThreadItem & {
|
|
1846
|
-
ref: string;
|
|
1847
|
-
}> & {
|
|
1938
|
+
}): RequestProxyResult<PaginateResult<CommentThreadItem> & {
|
|
1848
1939
|
readers: Record<string, ReaderModel>;
|
|
1849
1940
|
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1850
1941
|
[key: string]: any;
|
|
1851
|
-
data: PaginateResult<CommentThreadItem & {
|
|
1852
|
-
ref: string;
|
|
1853
|
-
}> & {
|
|
1942
|
+
data: PaginateResult<CommentThreadItem> & {
|
|
1854
1943
|
readers: Record<string, ReaderModel>;
|
|
1855
1944
|
};
|
|
1856
1945
|
} : ResponseWrapper extends {
|
|
1857
|
-
data: PaginateResult<CommentThreadItem & {
|
|
1858
|
-
ref: string;
|
|
1859
|
-
}> & {
|
|
1946
|
+
data: PaginateResult<CommentThreadItem> & {
|
|
1860
1947
|
readers: Record<string, ReaderModel>;
|
|
1861
1948
|
};
|
|
1862
1949
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1863
|
-
data: PaginateResult<CommentThreadItem & {
|
|
1864
|
-
ref: string;
|
|
1865
|
-
}> & {
|
|
1950
|
+
data: PaginateResult<CommentThreadItem> & {
|
|
1866
1951
|
readers: Record<string, ReaderModel>;
|
|
1867
1952
|
};
|
|
1868
1953
|
}>;
|
|
@@ -2008,7 +2093,7 @@ declare module '@mx-space/api-client' {
|
|
|
2008
2093
|
type NoteListOptions = {
|
|
2009
2094
|
select?: SelectFields<keyof NoteModel>;
|
|
2010
2095
|
year?: number;
|
|
2011
|
-
sortBy?: 'weather' | 'mood' | 'title' | '
|
|
2096
|
+
sortBy?: 'weather' | 'mood' | 'title' | 'createdAt' | 'modifiedAt';
|
|
2012
2097
|
sortOrder?: 1 | -1;
|
|
2013
2098
|
lang?: string;
|
|
2014
2099
|
withSummary?: boolean;
|
|
@@ -2026,7 +2111,7 @@ type NoteMiddleListOptions = {
|
|
|
2026
2111
|
type NoteTopicListOptions = SortOptions & {
|
|
2027
2112
|
lang?: string;
|
|
2028
2113
|
};
|
|
2029
|
-
type NoteTimelineItem = Pick<NoteModel, 'id' | 'title' | 'nid' | 'slug' | '
|
|
2114
|
+
type NoteTimelineItem = Pick<NoteModel, 'id' | 'title' | 'nid' | 'slug' | 'createdAt' | 'isPublished'> & {
|
|
2030
2115
|
isTranslated?: boolean;
|
|
2031
2116
|
translationMeta?: TranslationMeta;
|
|
2032
2117
|
};
|
|
@@ -2317,7 +2402,7 @@ declare module '@mx-space/api-client' {
|
|
|
2317
2402
|
}
|
|
2318
2403
|
type PageListOptions = {
|
|
2319
2404
|
select?: SelectFields<keyof PageModel>;
|
|
2320
|
-
sortBy?: 'order' | 'subtitle' | 'title' | '
|
|
2405
|
+
sortBy?: 'order' | 'subtitle' | 'title' | 'createdAt' | 'modifiedAt';
|
|
2321
2406
|
sortOrder?: 1 | -1;
|
|
2322
2407
|
};
|
|
2323
2408
|
declare class PageController<ResponseWrapper> implements IController {
|
|
@@ -2374,7 +2459,7 @@ declare module '@mx-space/api-client' {
|
|
|
2374
2459
|
type PostListOptions = {
|
|
2375
2460
|
select?: SelectFields<keyof PostModel>;
|
|
2376
2461
|
year?: number;
|
|
2377
|
-
sortBy?: 'categoryId' | 'title' | '
|
|
2462
|
+
sortBy?: 'categoryId' | 'title' | 'createdAt' | 'modifiedAt' | 'pinAt';
|
|
2378
2463
|
sortOrder?: 1 | -1;
|
|
2379
2464
|
truncate?: number; /** 语言代码,用于获取翻译版本 */
|
|
2380
2465
|
lang?: string;
|
|
@@ -2486,44 +2571,28 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
2486
2571
|
/**
|
|
2487
2572
|
* 获取最新一条
|
|
2488
2573
|
*/
|
|
2489
|
-
getLatestOne(): RequestProxyResult<RecentlyModel
|
|
2490
|
-
comments: number;
|
|
2491
|
-
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2574
|
+
getLatestOne(): RequestProxyResult<RecentlyModel | null, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2492
2575
|
[key: string]: any;
|
|
2493
|
-
data: RecentlyModel
|
|
2494
|
-
comments: number;
|
|
2495
|
-
};
|
|
2576
|
+
data: RecentlyModel | null;
|
|
2496
2577
|
} : ResponseWrapper extends {
|
|
2497
|
-
data: RecentlyModel
|
|
2498
|
-
comments: number;
|
|
2499
|
-
};
|
|
2578
|
+
data: RecentlyModel | null;
|
|
2500
2579
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2501
|
-
data: RecentlyModel
|
|
2502
|
-
comments: number;
|
|
2503
|
-
};
|
|
2580
|
+
data: RecentlyModel | null;
|
|
2504
2581
|
}>;
|
|
2505
2582
|
getAll(): RequestProxyResult<{
|
|
2506
|
-
data: RecentlyModel[]
|
|
2507
|
-
comments: number;
|
|
2508
|
-
};
|
|
2583
|
+
data: RecentlyModel[];
|
|
2509
2584
|
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2510
2585
|
[key: string]: any;
|
|
2511
2586
|
data: {
|
|
2512
|
-
data: RecentlyModel[]
|
|
2513
|
-
comments: number;
|
|
2514
|
-
};
|
|
2587
|
+
data: RecentlyModel[];
|
|
2515
2588
|
};
|
|
2516
2589
|
} : ResponseWrapper extends {
|
|
2517
2590
|
data: {
|
|
2518
|
-
data: RecentlyModel[]
|
|
2519
|
-
comments: number;
|
|
2520
|
-
};
|
|
2591
|
+
data: RecentlyModel[];
|
|
2521
2592
|
};
|
|
2522
2593
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2523
2594
|
data: {
|
|
2524
|
-
data: RecentlyModel[]
|
|
2525
|
-
comments: number;
|
|
2526
|
-
};
|
|
2595
|
+
data: RecentlyModel[];
|
|
2527
2596
|
};
|
|
2528
2597
|
}>;
|
|
2529
2598
|
getList({
|
|
@@ -2535,44 +2604,28 @@ declare class RecentlyController<ResponseWrapper> implements IController {
|
|
|
2535
2604
|
after?: string | undefined;
|
|
2536
2605
|
size?: number | number;
|
|
2537
2606
|
}): RequestProxyResult<{
|
|
2538
|
-
data: RecentlyModel[]
|
|
2539
|
-
comments: number;
|
|
2540
|
-
};
|
|
2607
|
+
data: RecentlyModel[];
|
|
2541
2608
|
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2542
2609
|
[key: string]: any;
|
|
2543
2610
|
data: {
|
|
2544
|
-
data: RecentlyModel[]
|
|
2545
|
-
comments: number;
|
|
2546
|
-
};
|
|
2611
|
+
data: RecentlyModel[];
|
|
2547
2612
|
};
|
|
2548
2613
|
} : ResponseWrapper extends {
|
|
2549
2614
|
data: {
|
|
2550
|
-
data: RecentlyModel[]
|
|
2551
|
-
comments: number;
|
|
2552
|
-
};
|
|
2615
|
+
data: RecentlyModel[];
|
|
2553
2616
|
};
|
|
2554
2617
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2555
2618
|
data: {
|
|
2556
|
-
data: RecentlyModel[]
|
|
2557
|
-
comments: number;
|
|
2558
|
-
};
|
|
2619
|
+
data: RecentlyModel[];
|
|
2559
2620
|
};
|
|
2560
2621
|
}>;
|
|
2561
|
-
getById(id: string): RequestProxyResult<RecentlyModel
|
|
2562
|
-
comments: number;
|
|
2563
|
-
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2622
|
+
getById(id: string): RequestProxyResult<RecentlyModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2564
2623
|
[key: string]: any;
|
|
2565
|
-
data: RecentlyModel
|
|
2566
|
-
comments: number;
|
|
2567
|
-
};
|
|
2624
|
+
data: RecentlyModel;
|
|
2568
2625
|
} : ResponseWrapper extends {
|
|
2569
|
-
data: RecentlyModel
|
|
2570
|
-
comments: number;
|
|
2571
|
-
};
|
|
2626
|
+
data: RecentlyModel;
|
|
2572
2627
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2573
|
-
data: RecentlyModel
|
|
2574
|
-
comments: number;
|
|
2575
|
-
};
|
|
2628
|
+
data: RecentlyModel;
|
|
2576
2629
|
}>;
|
|
2577
2630
|
/** 表态:点赞,点踩 */
|
|
2578
2631
|
attitude(id: string, attitude: RecentlyAttitudeEnum): RequestProxyResult<{
|
|
@@ -2649,38 +2702,38 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2649
2702
|
name: string;
|
|
2650
2703
|
constructor(client: HTTPClient);
|
|
2651
2704
|
get proxy(): IRequestHandler<ResponseWrapper>;
|
|
2652
|
-
search(type: 'note', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, '
|
|
2653
|
-
search(type: 'post', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, '
|
|
2654
|
-
search(type: 'page', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PageModel, '
|
|
2655
|
-
searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2705
|
+
search(type: 'note', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, 'modifiedAt' | 'id' | 'title' | 'createdAt' | 'nid'> & SearchResultHighlight>, ResponseWrapper>>;
|
|
2706
|
+
search(type: 'post', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, 'modifiedAt' | 'id' | 'title' | 'createdAt' | 'slug' | 'category'> & SearchResultHighlight>, ResponseWrapper>>;
|
|
2707
|
+
search(type: 'page', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PageModel, 'modifiedAt' | 'id' | 'title' | 'createdAt' | 'slug'> & SearchResultHighlight>, ResponseWrapper>>;
|
|
2708
|
+
searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "createdAt" | "modifiedAt" | "title" | "slug"> & SearchResultHighlight & {
|
|
2656
2709
|
type: "post";
|
|
2657
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2710
|
+
}) | (Pick<NoteModel, "id" | "createdAt" | "modifiedAt" | "title" | "nid"> & SearchResultHighlight & {
|
|
2658
2711
|
type: "note";
|
|
2659
|
-
}) | (Pick<PageModel, "id" | "
|
|
2712
|
+
}) | (Pick<PageModel, "id" | "createdAt" | "modifiedAt" | "title" | "slug"> & SearchResultHighlight & {
|
|
2660
2713
|
type: "page";
|
|
2661
2714
|
})>, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2662
2715
|
[key: string]: any;
|
|
2663
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2716
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "createdAt" | "modifiedAt" | "title" | "slug"> & SearchResultHighlight & {
|
|
2664
2717
|
type: "post";
|
|
2665
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2718
|
+
}) | (Pick<NoteModel, "id" | "createdAt" | "modifiedAt" | "title" | "nid"> & SearchResultHighlight & {
|
|
2666
2719
|
type: "note";
|
|
2667
|
-
}) | (Pick<PageModel, "id" | "
|
|
2720
|
+
}) | (Pick<PageModel, "id" | "createdAt" | "modifiedAt" | "title" | "slug"> & SearchResultHighlight & {
|
|
2668
2721
|
type: "page";
|
|
2669
2722
|
})>, ResponseWrapper>;
|
|
2670
2723
|
} : ResponseWrapper extends {
|
|
2671
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2724
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "createdAt" | "modifiedAt" | "title" | "slug"> & SearchResultHighlight & {
|
|
2672
2725
|
type: "post";
|
|
2673
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2726
|
+
}) | (Pick<NoteModel, "id" | "createdAt" | "modifiedAt" | "title" | "nid"> & SearchResultHighlight & {
|
|
2674
2727
|
type: "note";
|
|
2675
|
-
}) | (Pick<PageModel, "id" | "
|
|
2728
|
+
}) | (Pick<PageModel, "id" | "createdAt" | "modifiedAt" | "title" | "slug"> & SearchResultHighlight & {
|
|
2676
2729
|
type: "page";
|
|
2677
2730
|
})>, ResponseWrapper>;
|
|
2678
2731
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2679
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2732
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "createdAt" | "modifiedAt" | "title" | "slug"> & SearchResultHighlight & {
|
|
2680
2733
|
type: "post";
|
|
2681
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2734
|
+
}) | (Pick<NoteModel, "id" | "createdAt" | "modifiedAt" | "title" | "nid"> & SearchResultHighlight & {
|
|
2682
2735
|
type: "note";
|
|
2683
|
-
}) | (Pick<PageModel, "id" | "
|
|
2736
|
+
}) | (Pick<PageModel, "id" | "createdAt" | "modifiedAt" | "title" | "slug"> & SearchResultHighlight & {
|
|
2684
2737
|
type: "page";
|
|
2685
2738
|
})>, ResponseWrapper>;
|
|
2686
2739
|
}>;
|
|
@@ -2824,4 +2877,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
2824
2877
|
*/
|
|
2825
2878
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
2826
2879
|
//#endregion
|
|
2827
|
-
export { AIController, AIDeepReadingModel, AIInsightsModel, AIInsightsStreamEvent, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateSiteInfo, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AnonymousCommentDto, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel,
|
|
2880
|
+
export { AIController, AIDeepReadingModel, AIInsightsModel, AIInsightsStreamEvent, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateSiteInfo, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AnonymousCommentDto, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, BookMetadata, CategoryChildPost, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CodeMetadata, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentParentPreview, CommentRef, CommentReplyWindow, CommentState, CommentThreadItem, CommentThreadReplies, CommentUploadConfigDto, CommentUploadResultDto, Coordinate, EnumPageType, GithubMetadata, type HTTPClient, IConfig, IConfigKeys, type IRequestAdapter, Image, LastYearPublication, LatestCombinedItem, LatestData, LatestNoteItem, LatestPostItem, LinkController, LinkMetadata, LinkModel, LinkState, LinkType, MailOptionsModel, MediaMetadata, ModelWithLiked, ModelWithTranslation, MusicMetadata, NoteController, type NoteMiddleListOptions, NoteModel, type NoteTimelineItem, type NoteTopicListItem, type NoteTopicListOptions, NoteWrappedPayload, NoteWrappedWithLikedAndTranslationPayload, NoteWrappedWithLikedPayload, OwnerAllowLoginResult, OwnerSessionResult, PageController, PageModel, PageModelLexical, PageModelMarkdown, Pager, PaginateResult, PostContentFormat, PostController, type PostListItem, type PostListOptions, PostModel, PostModelLexical, PostModelMarkdown, PostRelatedSummary, ProjectController, ProjectModel, ReaderCommentDto, ReaderModel, RecentActivities, RecentComment, RecentLike, RecentNote, RecentPost, RecentRecent, RecentlyAttitudeEnum, RecentlyAttitudeResultEnum, RecentlyController, RecentlyMetadata, RecentlyModel, RecentlyRefType, RecentlyRefTypes, RecentlyTypeEnum, RequestError, RoomOmittedNote, RoomOmittedPage, RoomOmittedPost, RoomsData, SayController, SayModel, SearchController, SeoOptionModel, ServerlessController, SnippetController, SnippetModel, SnippetType, SubscribeAllBit, SubscribeController, SubscribeNoteCreateBit, SubscribePostCreateBit, SubscribeRecentCreateBit, SubscribeSayCreateBit, SubscribeType, SubscribeTypeToBitMap, TLogin, TagDetailPost, TagModel, ThirdPartyServiceIntegrationModel, TimelineData, TimelineType, TopicController, TopicModel, TranslationMeta, Url, UrlOptionModel, UserController, UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|