@mx-space/api-client 1.14.0 → 1.14.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/activity.ts +5 -1
- package/dist/index.d.cts +347 -326
- package/dist/index.d.ts +347 -326
- package/models/auth.ts +8 -0
- package/models/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -324,137 +324,6 @@ interface NotesItem {
|
|
|
324
324
|
bookmark: boolean;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
declare module '@mx-space/api-client' {
|
|
328
|
-
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
329
|
-
activity: ActivityController<ResponseWrapper>;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* @support core >= 4.3.0
|
|
334
|
-
*/
|
|
335
|
-
declare class ActivityController<ResponseWrapper> implements IController {
|
|
336
|
-
private client;
|
|
337
|
-
base: string;
|
|
338
|
-
name: string;
|
|
339
|
-
constructor(client: HTTPClient);
|
|
340
|
-
get proxy(): IRequestHandler<ResponseWrapper>;
|
|
341
|
-
likeIt(type: 'Post' | 'Note', id: string): RequestProxyResult<never, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
342
|
-
[key: string]: any;
|
|
343
|
-
data: never;
|
|
344
|
-
} : ResponseWrapper extends {
|
|
345
|
-
data: never;
|
|
346
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
347
|
-
data: never;
|
|
348
|
-
}>;
|
|
349
|
-
/**
|
|
350
|
-
*
|
|
351
|
-
* @support core >= 5.0.0
|
|
352
|
-
*/
|
|
353
|
-
getPresence(roomName: string): RequestProxyResult<Record<string, ActivityPresence>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
354
|
-
[key: string]: any;
|
|
355
|
-
data: Record<string, ActivityPresence>;
|
|
356
|
-
} : ResponseWrapper extends {
|
|
357
|
-
data: Record<string, ActivityPresence>;
|
|
358
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
359
|
-
data: Record<string, ActivityPresence>;
|
|
360
|
-
}>;
|
|
361
|
-
/**
|
|
362
|
-
*
|
|
363
|
-
* @support core >= 5.0.0
|
|
364
|
-
*/
|
|
365
|
-
updatePresence({ identity, position, roomName, sid, ts, displayName, readerId, }: {
|
|
366
|
-
roomName: string;
|
|
367
|
-
position: number;
|
|
368
|
-
identity: string;
|
|
369
|
-
sid: string;
|
|
370
|
-
displayName?: string;
|
|
371
|
-
ts?: number;
|
|
372
|
-
readerId?: string;
|
|
373
|
-
}): RequestProxyResult<unknown, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
374
|
-
[key: string]: any;
|
|
375
|
-
data: unknown;
|
|
376
|
-
} : ResponseWrapper extends {
|
|
377
|
-
data: unknown;
|
|
378
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
379
|
-
data: unknown;
|
|
380
|
-
}>;
|
|
381
|
-
getRoomsInfo(): Promise<RoomsData & {
|
|
382
|
-
$raw: ResponseWrapper extends {
|
|
383
|
-
data: infer T;
|
|
384
|
-
} ? ResponseWrapper : ResponseWrapper extends unknown ? {
|
|
385
|
-
[i: string]: any;
|
|
386
|
-
data: (ResponseWrapper extends unknown ? {
|
|
387
|
-
[key: string]: any;
|
|
388
|
-
data: RoomsData;
|
|
389
|
-
} : ResponseWrapper extends {
|
|
390
|
-
data: RoomsData;
|
|
391
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
392
|
-
data: RoomsData;
|
|
393
|
-
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
394
|
-
[key: string]: any;
|
|
395
|
-
data: RoomsData;
|
|
396
|
-
} : ResponseWrapper extends {
|
|
397
|
-
data: RoomsData;
|
|
398
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
399
|
-
data: RoomsData;
|
|
400
|
-
}) ? T_1 extends unknown ? {
|
|
401
|
-
rooms: string[];
|
|
402
|
-
room_count: {
|
|
403
|
-
[key: string]: number;
|
|
404
|
-
};
|
|
405
|
-
objects: {
|
|
406
|
-
posts: RoomOmittedPost[];
|
|
407
|
-
notes: RoomOmittedNote[];
|
|
408
|
-
pages: RoomOmittedPage[];
|
|
409
|
-
};
|
|
410
|
-
} : T_1 : never : never;
|
|
411
|
-
} : ResponseWrapper;
|
|
412
|
-
$request: {
|
|
413
|
-
path: string;
|
|
414
|
-
method: string;
|
|
415
|
-
[k: string]: string;
|
|
416
|
-
};
|
|
417
|
-
$serialized: RoomsData;
|
|
418
|
-
}>;
|
|
419
|
-
getRecentActivities(): Promise<RecentActivities & {
|
|
420
|
-
$raw: ResponseWrapper extends {
|
|
421
|
-
data: infer T;
|
|
422
|
-
} ? ResponseWrapper : ResponseWrapper extends unknown ? {
|
|
423
|
-
[i: string]: any;
|
|
424
|
-
data: (ResponseWrapper extends unknown ? {
|
|
425
|
-
[key: string]: any;
|
|
426
|
-
data: RecentActivities;
|
|
427
|
-
} : ResponseWrapper extends {
|
|
428
|
-
data: RecentActivities;
|
|
429
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
430
|
-
data: RecentActivities;
|
|
431
|
-
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
432
|
-
[key: string]: any;
|
|
433
|
-
data: RecentActivities;
|
|
434
|
-
} : ResponseWrapper extends {
|
|
435
|
-
data: RecentActivities;
|
|
436
|
-
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
437
|
-
data: RecentActivities;
|
|
438
|
-
}) ? T_1 extends unknown ? {
|
|
439
|
-
like: RecentLike[];
|
|
440
|
-
comment: RecentComment[];
|
|
441
|
-
recent: RecentRecent[];
|
|
442
|
-
post: RecentPost[];
|
|
443
|
-
note: RecentNote[];
|
|
444
|
-
} : T_1 : never : never;
|
|
445
|
-
} : ResponseWrapper;
|
|
446
|
-
$request: {
|
|
447
|
-
path: string;
|
|
448
|
-
method: string;
|
|
449
|
-
[k: string]: string;
|
|
450
|
-
};
|
|
451
|
-
$serialized: RecentActivities;
|
|
452
|
-
}>;
|
|
453
|
-
getLastYearPublication(): Promise<LastYearPublication>;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
type SortOrder = 'asc' | 'desc';
|
|
457
|
-
|
|
458
327
|
interface TopicModel extends BaseModel {
|
|
459
328
|
description?: string;
|
|
460
329
|
introduce: string;
|
|
@@ -595,73 +464,353 @@ interface UserModel extends BaseModel {
|
|
|
595
464
|
avatar: string;
|
|
596
465
|
postID: string;
|
|
597
466
|
}
|
|
598
|
-
type TLogin = {
|
|
599
|
-
token: string;
|
|
600
|
-
expiresIn: number;
|
|
601
|
-
lastLoginTime: null | string;
|
|
602
|
-
lastLoginIp?: null | string;
|
|
603
|
-
} & Pick<UserModel, 'name' | 'username' | 'created' | 'url' | 'mail' | 'avatar' | 'id'>;
|
|
467
|
+
type TLogin = {
|
|
468
|
+
token: string;
|
|
469
|
+
expiresIn: number;
|
|
470
|
+
lastLoginTime: null | string;
|
|
471
|
+
lastLoginIp?: null | string;
|
|
472
|
+
} & Pick<UserModel, 'name' | 'username' | 'created' | 'url' | 'mail' | 'avatar' | 'id'>;
|
|
473
|
+
|
|
474
|
+
interface AggregateRoot {
|
|
475
|
+
user: UserModel;
|
|
476
|
+
seo: SeoOptionModel;
|
|
477
|
+
url: Url;
|
|
478
|
+
categories: CategoryModel[];
|
|
479
|
+
pageMeta: Pick<PageModel, 'title' | 'id' | 'slug' | 'order'>[] | null;
|
|
480
|
+
/**
|
|
481
|
+
* @available 4.2.2
|
|
482
|
+
*/
|
|
483
|
+
latestNoteId: {
|
|
484
|
+
id: string;
|
|
485
|
+
nid: number;
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
interface AggregateRootWithTheme<Theme = unknown> extends AggregateRoot {
|
|
489
|
+
theme?: Theme;
|
|
490
|
+
}
|
|
491
|
+
interface Url {
|
|
492
|
+
wsUrl: string;
|
|
493
|
+
serverUrl: string;
|
|
494
|
+
webUrl: string;
|
|
495
|
+
}
|
|
496
|
+
interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images'> {
|
|
497
|
+
}
|
|
498
|
+
interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'created' | 'title' | 'category' | 'images'> {
|
|
499
|
+
}
|
|
500
|
+
interface AggregateTop {
|
|
501
|
+
notes: AggregateTopNote[];
|
|
502
|
+
posts: AggregateTopPost[];
|
|
503
|
+
says: SayModel[];
|
|
504
|
+
}
|
|
505
|
+
declare enum TimelineType {
|
|
506
|
+
Post = 0,
|
|
507
|
+
Note = 1
|
|
508
|
+
}
|
|
509
|
+
interface TimelineData {
|
|
510
|
+
notes?: Pick<NoteModel, 'id' | 'nid' | 'title' | 'weather' | 'mood' | 'created' | 'modified' | 'bookmark'>[];
|
|
511
|
+
posts?: (Pick<PostModel, 'id' | 'title' | 'slug' | 'created' | 'modified' | 'category'> & {
|
|
512
|
+
url: string;
|
|
513
|
+
})[];
|
|
514
|
+
}
|
|
515
|
+
interface AggregateStat {
|
|
516
|
+
allComments: number;
|
|
517
|
+
categories: number;
|
|
518
|
+
comments: number;
|
|
519
|
+
linkApply: number;
|
|
520
|
+
links: number;
|
|
521
|
+
notes: number;
|
|
522
|
+
pages: number;
|
|
523
|
+
posts: number;
|
|
524
|
+
says: number;
|
|
525
|
+
recently: number;
|
|
526
|
+
unreadComments: number;
|
|
527
|
+
online: number;
|
|
528
|
+
todayMaxOnline: string;
|
|
529
|
+
todayOnlineTotal: string;
|
|
530
|
+
callTime: number;
|
|
531
|
+
uv: number;
|
|
532
|
+
todayIpAccessCount: number;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
interface AISummaryModel {
|
|
536
|
+
id: string;
|
|
537
|
+
created: string;
|
|
538
|
+
summary: string;
|
|
539
|
+
hash: string;
|
|
540
|
+
refId: string;
|
|
541
|
+
lang: string;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
interface AuthUser {
|
|
545
|
+
id: string;
|
|
546
|
+
email: string;
|
|
547
|
+
isOwner: boolean;
|
|
548
|
+
image: string;
|
|
549
|
+
name: string;
|
|
550
|
+
provider: string;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
interface CommentModel extends BaseModel {
|
|
554
|
+
refType: CollectionRefTypes;
|
|
555
|
+
ref: string;
|
|
556
|
+
state: number;
|
|
557
|
+
commentsIndex: number;
|
|
558
|
+
author: string;
|
|
559
|
+
text: string;
|
|
560
|
+
mail?: string;
|
|
561
|
+
url?: string;
|
|
562
|
+
ip?: string;
|
|
563
|
+
agent?: string;
|
|
564
|
+
key: string;
|
|
565
|
+
pin?: boolean;
|
|
566
|
+
avatar: string;
|
|
567
|
+
parent?: CommentModel | string;
|
|
568
|
+
children: CommentModel[];
|
|
569
|
+
isWhispers?: boolean;
|
|
570
|
+
location?: string;
|
|
571
|
+
source?: string;
|
|
572
|
+
}
|
|
573
|
+
interface CommentRef {
|
|
574
|
+
id: string;
|
|
575
|
+
categoryId?: string;
|
|
576
|
+
slug: string;
|
|
577
|
+
title: string;
|
|
578
|
+
category?: CategoryModel;
|
|
579
|
+
}
|
|
580
|
+
declare enum CommentState {
|
|
581
|
+
Unread = 0,
|
|
582
|
+
Read = 1,
|
|
583
|
+
Junk = 2
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
declare enum LinkType {
|
|
587
|
+
Friend = 0,
|
|
588
|
+
Collection = 1
|
|
589
|
+
}
|
|
590
|
+
declare enum LinkState {
|
|
591
|
+
Pass = 0,
|
|
592
|
+
Audit = 1,
|
|
593
|
+
Outdate = 2,
|
|
594
|
+
Banned = 3,
|
|
595
|
+
Reject = 4
|
|
596
|
+
}
|
|
597
|
+
interface LinkModel extends BaseModel {
|
|
598
|
+
name: string;
|
|
599
|
+
url: string;
|
|
600
|
+
avatar: string;
|
|
601
|
+
description?: string;
|
|
602
|
+
type: LinkType;
|
|
603
|
+
state: LinkState;
|
|
604
|
+
hide: boolean;
|
|
605
|
+
email: string;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
interface ProjectModel extends BaseModel {
|
|
609
|
+
name: string;
|
|
610
|
+
previewUrl?: string;
|
|
611
|
+
docUrl?: string;
|
|
612
|
+
projectUrl?: string;
|
|
613
|
+
images?: string[];
|
|
614
|
+
description: string;
|
|
615
|
+
avatar?: string;
|
|
616
|
+
text: string;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
declare enum RecentlyRefTypes {
|
|
620
|
+
Post = "Post",
|
|
621
|
+
Note = "Note",
|
|
622
|
+
Page = "Page"
|
|
623
|
+
}
|
|
624
|
+
type RecentlyRefType = {
|
|
625
|
+
title: string;
|
|
626
|
+
url: string;
|
|
627
|
+
};
|
|
628
|
+
interface RecentlyModel extends BaseCommentIndexModel {
|
|
629
|
+
content: string;
|
|
630
|
+
ref?: RecentlyRefType & {
|
|
631
|
+
[key: string]: any;
|
|
632
|
+
};
|
|
633
|
+
refId?: string;
|
|
634
|
+
refType?: RecentlyRefTypes;
|
|
635
|
+
up: number;
|
|
636
|
+
down: number;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
declare enum SnippetType {
|
|
640
|
+
JSON = "json",
|
|
641
|
+
Function = "function",
|
|
642
|
+
Text = "text",
|
|
643
|
+
YAML = "yaml"
|
|
644
|
+
}
|
|
645
|
+
interface SnippetModel<T = unknown> extends BaseModel {
|
|
646
|
+
type: SnippetType;
|
|
647
|
+
private: boolean;
|
|
648
|
+
raw: string;
|
|
649
|
+
name: string;
|
|
650
|
+
reference: string;
|
|
651
|
+
comment?: string;
|
|
652
|
+
metatype?: string;
|
|
653
|
+
schema?: string;
|
|
654
|
+
data: T;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
declare const SubscribePostCreateBit: number;
|
|
658
|
+
declare const SubscribeNoteCreateBit: number;
|
|
659
|
+
declare const SubscribeSayCreateBit: number;
|
|
660
|
+
declare const SubscribeRecentCreateBit: number;
|
|
661
|
+
declare const SubscribeAllBit: number;
|
|
662
|
+
declare const SubscribeTypeToBitMap: {
|
|
663
|
+
post_c: number;
|
|
664
|
+
note_c: number;
|
|
665
|
+
say_c: number;
|
|
666
|
+
recently_c: number;
|
|
667
|
+
all: number;
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
type SubscribeType = keyof typeof SubscribeTypeToBitMap;
|
|
671
|
+
|
|
672
|
+
declare module '@mx-space/api-client' {
|
|
673
|
+
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
674
|
+
activity: ActivityController<ResponseWrapper>;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* @support core >= 4.3.0
|
|
679
|
+
*/
|
|
680
|
+
declare class ActivityController<ResponseWrapper> implements IController {
|
|
681
|
+
private client;
|
|
682
|
+
base: string;
|
|
683
|
+
name: string;
|
|
684
|
+
constructor(client: HTTPClient);
|
|
685
|
+
get proxy(): IRequestHandler<ResponseWrapper>;
|
|
686
|
+
likeIt(type: 'Post' | 'Note', id: string): RequestProxyResult<never, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
687
|
+
[key: string]: any;
|
|
688
|
+
data: never;
|
|
689
|
+
} : ResponseWrapper extends {
|
|
690
|
+
data: never;
|
|
691
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
692
|
+
data: never;
|
|
693
|
+
}>;
|
|
694
|
+
/**
|
|
695
|
+
*
|
|
696
|
+
* @support core >= 5.0.0
|
|
697
|
+
*/
|
|
698
|
+
getPresence(roomName: string): RequestProxyResult<{
|
|
699
|
+
data: Record<string, ActivityPresence>;
|
|
700
|
+
readers: Record<string, AuthUser>;
|
|
701
|
+
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
702
|
+
[key: string]: any;
|
|
703
|
+
data: {
|
|
704
|
+
data: Record<string, ActivityPresence>;
|
|
705
|
+
readers: Record<string, AuthUser>;
|
|
706
|
+
};
|
|
707
|
+
} : ResponseWrapper extends {
|
|
708
|
+
data: {
|
|
709
|
+
data: Record<string, ActivityPresence>;
|
|
710
|
+
readers: Record<string, AuthUser>;
|
|
711
|
+
};
|
|
712
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
713
|
+
data: {
|
|
714
|
+
data: Record<string, ActivityPresence>;
|
|
715
|
+
readers: Record<string, AuthUser>;
|
|
716
|
+
};
|
|
717
|
+
}>;
|
|
718
|
+
/**
|
|
719
|
+
*
|
|
720
|
+
* @support core >= 5.0.0
|
|
721
|
+
*/
|
|
722
|
+
updatePresence({ identity, position, roomName, sid, ts, displayName, readerId, }: {
|
|
723
|
+
roomName: string;
|
|
724
|
+
position: number;
|
|
725
|
+
identity: string;
|
|
726
|
+
sid: string;
|
|
727
|
+
displayName?: string;
|
|
728
|
+
ts?: number;
|
|
729
|
+
readerId?: string;
|
|
730
|
+
}): RequestProxyResult<unknown, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
731
|
+
[key: string]: any;
|
|
732
|
+
data: unknown;
|
|
733
|
+
} : ResponseWrapper extends {
|
|
734
|
+
data: unknown;
|
|
735
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
736
|
+
data: unknown;
|
|
737
|
+
}>;
|
|
738
|
+
getRoomsInfo(): Promise<RoomsData & {
|
|
739
|
+
$raw: ResponseWrapper extends {
|
|
740
|
+
data: infer T;
|
|
741
|
+
} ? ResponseWrapper : ResponseWrapper extends unknown ? {
|
|
742
|
+
[i: string]: any;
|
|
743
|
+
data: (ResponseWrapper extends unknown ? {
|
|
744
|
+
[key: string]: any;
|
|
745
|
+
data: RoomsData;
|
|
746
|
+
} : ResponseWrapper extends {
|
|
747
|
+
data: RoomsData;
|
|
748
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
749
|
+
data: RoomsData;
|
|
750
|
+
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
751
|
+
[key: string]: any;
|
|
752
|
+
data: RoomsData;
|
|
753
|
+
} : ResponseWrapper extends {
|
|
754
|
+
data: RoomsData;
|
|
755
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
756
|
+
data: RoomsData;
|
|
757
|
+
}) ? T_1 extends unknown ? {
|
|
758
|
+
rooms: string[];
|
|
759
|
+
room_count: {
|
|
760
|
+
[key: string]: number;
|
|
761
|
+
};
|
|
762
|
+
objects: {
|
|
763
|
+
posts: RoomOmittedPost[];
|
|
764
|
+
notes: RoomOmittedNote[];
|
|
765
|
+
pages: RoomOmittedPage[];
|
|
766
|
+
};
|
|
767
|
+
} : T_1 : never : never;
|
|
768
|
+
} : ResponseWrapper;
|
|
769
|
+
$request: {
|
|
770
|
+
path: string;
|
|
771
|
+
method: string;
|
|
772
|
+
[k: string]: string;
|
|
773
|
+
};
|
|
774
|
+
$serialized: RoomsData;
|
|
775
|
+
}>;
|
|
776
|
+
getRecentActivities(): Promise<RecentActivities & {
|
|
777
|
+
$raw: ResponseWrapper extends {
|
|
778
|
+
data: infer T;
|
|
779
|
+
} ? ResponseWrapper : ResponseWrapper extends unknown ? {
|
|
780
|
+
[i: string]: any;
|
|
781
|
+
data: (ResponseWrapper extends unknown ? {
|
|
782
|
+
[key: string]: any;
|
|
783
|
+
data: RecentActivities;
|
|
784
|
+
} : ResponseWrapper extends {
|
|
785
|
+
data: RecentActivities;
|
|
786
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
787
|
+
data: RecentActivities;
|
|
788
|
+
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
789
|
+
[key: string]: any;
|
|
790
|
+
data: RecentActivities;
|
|
791
|
+
} : ResponseWrapper extends {
|
|
792
|
+
data: RecentActivities;
|
|
793
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
794
|
+
data: RecentActivities;
|
|
795
|
+
}) ? T_1 extends unknown ? {
|
|
796
|
+
like: RecentLike[];
|
|
797
|
+
comment: RecentComment[];
|
|
798
|
+
recent: RecentRecent[];
|
|
799
|
+
post: RecentPost[];
|
|
800
|
+
note: RecentNote[];
|
|
801
|
+
} : T_1 : never : never;
|
|
802
|
+
} : ResponseWrapper;
|
|
803
|
+
$request: {
|
|
804
|
+
path: string;
|
|
805
|
+
method: string;
|
|
806
|
+
[k: string]: string;
|
|
807
|
+
};
|
|
808
|
+
$serialized: RecentActivities;
|
|
809
|
+
}>;
|
|
810
|
+
getLastYearPublication(): Promise<LastYearPublication>;
|
|
811
|
+
}
|
|
604
812
|
|
|
605
|
-
|
|
606
|
-
user: UserModel;
|
|
607
|
-
seo: SeoOptionModel;
|
|
608
|
-
url: Url;
|
|
609
|
-
categories: CategoryModel[];
|
|
610
|
-
pageMeta: Pick<PageModel, 'title' | 'id' | 'slug' | 'order'>[] | null;
|
|
611
|
-
/**
|
|
612
|
-
* @available 4.2.2
|
|
613
|
-
*/
|
|
614
|
-
latestNoteId: {
|
|
615
|
-
id: string;
|
|
616
|
-
nid: number;
|
|
617
|
-
};
|
|
618
|
-
}
|
|
619
|
-
interface AggregateRootWithTheme<Theme = unknown> extends AggregateRoot {
|
|
620
|
-
theme?: Theme;
|
|
621
|
-
}
|
|
622
|
-
interface Url {
|
|
623
|
-
wsUrl: string;
|
|
624
|
-
serverUrl: string;
|
|
625
|
-
webUrl: string;
|
|
626
|
-
}
|
|
627
|
-
interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images'> {
|
|
628
|
-
}
|
|
629
|
-
interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'created' | 'title' | 'category' | 'images'> {
|
|
630
|
-
}
|
|
631
|
-
interface AggregateTop {
|
|
632
|
-
notes: AggregateTopNote[];
|
|
633
|
-
posts: AggregateTopPost[];
|
|
634
|
-
says: SayModel[];
|
|
635
|
-
}
|
|
636
|
-
declare enum TimelineType {
|
|
637
|
-
Post = 0,
|
|
638
|
-
Note = 1
|
|
639
|
-
}
|
|
640
|
-
interface TimelineData {
|
|
641
|
-
notes?: Pick<NoteModel, 'id' | 'nid' | 'title' | 'weather' | 'mood' | 'created' | 'modified' | 'bookmark'>[];
|
|
642
|
-
posts?: (Pick<PostModel, 'id' | 'title' | 'slug' | 'created' | 'modified' | 'category'> & {
|
|
643
|
-
url: string;
|
|
644
|
-
})[];
|
|
645
|
-
}
|
|
646
|
-
interface AggregateStat {
|
|
647
|
-
allComments: number;
|
|
648
|
-
categories: number;
|
|
649
|
-
comments: number;
|
|
650
|
-
linkApply: number;
|
|
651
|
-
links: number;
|
|
652
|
-
notes: number;
|
|
653
|
-
pages: number;
|
|
654
|
-
posts: number;
|
|
655
|
-
says: number;
|
|
656
|
-
recently: number;
|
|
657
|
-
unreadComments: number;
|
|
658
|
-
online: number;
|
|
659
|
-
todayMaxOnline: string;
|
|
660
|
-
todayOnlineTotal: string;
|
|
661
|
-
callTime: number;
|
|
662
|
-
uv: number;
|
|
663
|
-
todayIpAccessCount: number;
|
|
664
|
-
}
|
|
813
|
+
type SortOrder = 'asc' | 'desc';
|
|
665
814
|
|
|
666
815
|
declare module '@mx-space/api-client' {
|
|
667
816
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
@@ -722,15 +871,6 @@ declare class AggregateController<ResponseWrapper> implements IController {
|
|
|
722
871
|
}>;
|
|
723
872
|
}
|
|
724
873
|
|
|
725
|
-
interface AISummaryModel {
|
|
726
|
-
id: string;
|
|
727
|
-
created: string;
|
|
728
|
-
summary: string;
|
|
729
|
-
hash: string;
|
|
730
|
-
refId: string;
|
|
731
|
-
lang: string;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
874
|
declare module '@mx-space/api-client' {
|
|
735
875
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
736
876
|
ai: AIController<ResponseWrapper>;
|
|
@@ -940,39 +1080,6 @@ interface PaginationParams {
|
|
|
940
1080
|
page?: number;
|
|
941
1081
|
}
|
|
942
1082
|
|
|
943
|
-
interface CommentModel extends BaseModel {
|
|
944
|
-
refType: CollectionRefTypes;
|
|
945
|
-
ref: string;
|
|
946
|
-
state: number;
|
|
947
|
-
commentsIndex: number;
|
|
948
|
-
author: string;
|
|
949
|
-
text: string;
|
|
950
|
-
mail?: string;
|
|
951
|
-
url?: string;
|
|
952
|
-
ip?: string;
|
|
953
|
-
agent?: string;
|
|
954
|
-
key: string;
|
|
955
|
-
pin?: boolean;
|
|
956
|
-
avatar: string;
|
|
957
|
-
parent?: CommentModel | string;
|
|
958
|
-
children: CommentModel[];
|
|
959
|
-
isWhispers?: boolean;
|
|
960
|
-
location?: string;
|
|
961
|
-
source?: string;
|
|
962
|
-
}
|
|
963
|
-
interface CommentRef {
|
|
964
|
-
id: string;
|
|
965
|
-
categoryId?: string;
|
|
966
|
-
slug: string;
|
|
967
|
-
title: string;
|
|
968
|
-
category?: CategoryModel;
|
|
969
|
-
}
|
|
970
|
-
declare enum CommentState {
|
|
971
|
-
Unread = 0,
|
|
972
|
-
Read = 1,
|
|
973
|
-
Junk = 2
|
|
974
|
-
}
|
|
975
|
-
|
|
976
1083
|
interface CommentDto {
|
|
977
1084
|
author: string;
|
|
978
1085
|
text: string;
|
|
@@ -1056,28 +1163,6 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1056
1163
|
}>;
|
|
1057
1164
|
}
|
|
1058
1165
|
|
|
1059
|
-
declare enum LinkType {
|
|
1060
|
-
Friend = 0,
|
|
1061
|
-
Collection = 1
|
|
1062
|
-
}
|
|
1063
|
-
declare enum LinkState {
|
|
1064
|
-
Pass = 0,
|
|
1065
|
-
Audit = 1,
|
|
1066
|
-
Outdate = 2,
|
|
1067
|
-
Banned = 3,
|
|
1068
|
-
Reject = 4
|
|
1069
|
-
}
|
|
1070
|
-
interface LinkModel extends BaseModel {
|
|
1071
|
-
name: string;
|
|
1072
|
-
url: string;
|
|
1073
|
-
avatar: string;
|
|
1074
|
-
description?: string;
|
|
1075
|
-
type: LinkType;
|
|
1076
|
-
state: LinkState;
|
|
1077
|
-
hide: boolean;
|
|
1078
|
-
email: string;
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
1166
|
type SortOptions = {
|
|
1082
1167
|
sortBy?: string;
|
|
1083
1168
|
sortOrder?: 1 | -1 | 'asc' | 'desc';
|
|
@@ -1346,17 +1431,6 @@ declare class PostController<ResponseWrapper> implements IController {
|
|
|
1346
1431
|
}>;
|
|
1347
1432
|
}
|
|
1348
1433
|
|
|
1349
|
-
interface ProjectModel extends BaseModel {
|
|
1350
|
-
name: string;
|
|
1351
|
-
previewUrl?: string;
|
|
1352
|
-
docUrl?: string;
|
|
1353
|
-
projectUrl?: string;
|
|
1354
|
-
images?: string[];
|
|
1355
|
-
description: string;
|
|
1356
|
-
avatar?: string;
|
|
1357
|
-
text: string;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
1434
|
declare module '@mx-space/api-client' {
|
|
1361
1435
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
1362
1436
|
project: ProjectController<ResponseWrapper>;
|
|
@@ -1369,26 +1443,6 @@ declare class ProjectController<ResponseWrapper> extends BaseCrudController<Proj
|
|
|
1369
1443
|
name: string;
|
|
1370
1444
|
}
|
|
1371
1445
|
|
|
1372
|
-
declare enum RecentlyRefTypes {
|
|
1373
|
-
Post = "Post",
|
|
1374
|
-
Note = "Note",
|
|
1375
|
-
Page = "Page"
|
|
1376
|
-
}
|
|
1377
|
-
type RecentlyRefType = {
|
|
1378
|
-
title: string;
|
|
1379
|
-
url: string;
|
|
1380
|
-
};
|
|
1381
|
-
interface RecentlyModel extends BaseCommentIndexModel {
|
|
1382
|
-
content: string;
|
|
1383
|
-
ref?: RecentlyRefType & {
|
|
1384
|
-
[key: string]: any;
|
|
1385
|
-
};
|
|
1386
|
-
refId?: string;
|
|
1387
|
-
refType?: RecentlyRefTypes;
|
|
1388
|
-
up: number;
|
|
1389
|
-
down: number;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
1446
|
declare module '@mx-space/api-client' {
|
|
1393
1447
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
1394
1448
|
recently: RecentlyController<ResponseWrapper>;
|
|
@@ -1668,21 +1722,6 @@ declare class SnippetController<ResponseWrapper> implements IController {
|
|
|
1668
1722
|
}>;
|
|
1669
1723
|
}
|
|
1670
1724
|
|
|
1671
|
-
declare const SubscribePostCreateBit: number;
|
|
1672
|
-
declare const SubscribeNoteCreateBit: number;
|
|
1673
|
-
declare const SubscribeSayCreateBit: number;
|
|
1674
|
-
declare const SubscribeRecentCreateBit: number;
|
|
1675
|
-
declare const SubscribeAllBit: number;
|
|
1676
|
-
declare const SubscribeTypeToBitMap: {
|
|
1677
|
-
post_c: number;
|
|
1678
|
-
note_c: number;
|
|
1679
|
-
say_c: number;
|
|
1680
|
-
recently_c: number;
|
|
1681
|
-
all: number;
|
|
1682
|
-
};
|
|
1683
|
-
|
|
1684
|
-
type SubscribeType = keyof typeof SubscribeTypeToBitMap;
|
|
1685
|
-
|
|
1686
1725
|
declare module '@mx-space/api-client' {
|
|
1687
1726
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
1688
1727
|
subscribe: SubscribeController<ResponseWrapper>;
|
|
@@ -1833,28 +1872,10 @@ declare class UserController<ResponseWrapper> implements IController {
|
|
|
1833
1872
|
declare const allControllers: (typeof AckController | typeof ActivityController | typeof AggregateController | typeof AIController | typeof CategoryController | typeof CommentController | typeof LinkController | typeof NoteController | typeof PageController | typeof PostController | typeof ProjectController | typeof RecentlyController | typeof SayController | typeof SearchController | typeof ServerlessController | typeof SnippetController | typeof SubscribeController | typeof TopicController | typeof UserController)[];
|
|
1834
1873
|
declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate", "category", "comment", "link", "note", "page", "post", "project", "topic", "recently", "say", "search", "snippet", "serverless", "subscribe", "user", "friend", "master", "shorthand"];
|
|
1835
1874
|
|
|
1836
|
-
declare enum SnippetType {
|
|
1837
|
-
JSON = "json",
|
|
1838
|
-
Function = "function",
|
|
1839
|
-
Text = "text",
|
|
1840
|
-
YAML = "yaml"
|
|
1841
|
-
}
|
|
1842
|
-
interface SnippetModel<T = unknown> extends BaseModel {
|
|
1843
|
-
type: SnippetType;
|
|
1844
|
-
private: boolean;
|
|
1845
|
-
raw: string;
|
|
1846
|
-
name: string;
|
|
1847
|
-
reference: string;
|
|
1848
|
-
comment?: string;
|
|
1849
|
-
metatype?: string;
|
|
1850
|
-
schema?: string;
|
|
1851
|
-
data: T;
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
1875
|
/**
|
|
1855
1876
|
* A simple camelCase function that only handles strings, but not handling symbol, date, or other complex case.
|
|
1856
1877
|
* If you need to handle more complex cases, please use camelcase-keys package.
|
|
1857
1878
|
*/
|
|
1858
1879
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
1859
1880
|
|
|
1860
|
-
export { AIController, type AISummaryModel, AckController, ActivityController, type ActivityPresence, AdminExtraModel, AggregateController, type AggregateRoot, type AggregateRootWithTheme, type AggregateStat, type AggregateTop, type AggregateTopNote, type AggregateTopPost, AlgoliaSearchOptionsModel, 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 };
|
|
1881
|
+
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 };
|