@mx-space/api-client 1.13.1 → 1.13.2
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/ack.ts +3 -2
- package/controllers/activity.ts +2 -1
- package/controllers/aggregate.ts +3 -3
- package/controllers/ai.ts +2 -1
- package/controllers/base.ts +2 -1
- package/controllers/category.ts +6 -4
- package/controllers/comment.ts +2 -1
- package/controllers/link.ts +4 -2
- package/controllers/note.ts +2 -1
- package/controllers/page.ts +2 -1
- package/controllers/post.ts +2 -1
- package/controllers/project.ts +4 -2
- package/controllers/recently.ts +2 -1
- package/controllers/say.ts +4 -2
- package/controllers/search.ts +2 -1
- package/controllers/severless.ts +2 -1
- package/controllers/snippet.ts +2 -1
- package/controllers/subscribe.ts +2 -1
- package/controllers/topic.ts +4 -2
- package/controllers/user.ts +2 -1
- package/dist/adaptors/axios.d.cts +1 -1
- package/dist/adaptors/axios.d.ts +1 -1
- package/dist/adaptors/axios.global.js +698 -422
- package/dist/adaptors/fetch.d.cts +1 -1
- package/dist/adaptors/fetch.d.ts +1 -1
- package/dist/adaptors/umi-request.d.cts +1 -1
- package/dist/adaptors/umi-request.d.ts +1 -1
- package/dist/adaptors/umi-request.global.js +74 -123
- package/dist/index.d.cts +61 -60
- package/dist/index.d.ts +61 -60
- package/models/base.ts +1 -0
- package/models/comment.ts +2 -1
- package/package.json +3 -3
- /package/dist/{adapter-4fDtRx9o.d.cts → adapter-B8tKfr1O.d.cts} +0 -0
- /package/dist/{adapter-4fDtRx9o.d.ts → adapter-B8tKfr1O.d.ts} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RequestOptions, I as IRequestAdapter, a as IAdaptorRequestResponseType } from './adapter-
|
|
1
|
+
import { R as RequestOptions, I as IRequestAdapter, a as IAdaptorRequestResponseType } from './adapter-B8tKfr1O.cjs';
|
|
2
2
|
|
|
3
3
|
interface IController {
|
|
4
4
|
base: string;
|
|
@@ -138,6 +138,7 @@ interface Image {
|
|
|
138
138
|
type: string;
|
|
139
139
|
accent?: string;
|
|
140
140
|
src: string;
|
|
141
|
+
blurHash?: string;
|
|
141
142
|
}
|
|
142
143
|
interface Pager {
|
|
143
144
|
total: number;
|
|
@@ -388,14 +389,14 @@ declare class ActivityController<ResponseWrapper> implements IController {
|
|
|
388
389
|
data: RoomsData;
|
|
389
390
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
390
391
|
data: RoomsData;
|
|
391
|
-
}) extends infer
|
|
392
|
+
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
392
393
|
[key: string]: any;
|
|
393
394
|
data: RoomsData;
|
|
394
395
|
} : ResponseWrapper extends {
|
|
395
396
|
data: RoomsData;
|
|
396
397
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
397
398
|
data: RoomsData;
|
|
398
|
-
}) ?
|
|
399
|
+
}) ? T_1 extends unknown ? {
|
|
399
400
|
rooms: string[];
|
|
400
401
|
room_count: {
|
|
401
402
|
[key: string]: number;
|
|
@@ -405,12 +406,12 @@ declare class ActivityController<ResponseWrapper> implements IController {
|
|
|
405
406
|
notes: RoomOmittedNote[];
|
|
406
407
|
pages: RoomOmittedPage[];
|
|
407
408
|
};
|
|
408
|
-
} :
|
|
409
|
+
} : T_1 : never : never;
|
|
409
410
|
} : ResponseWrapper;
|
|
410
411
|
$request: {
|
|
411
|
-
[k: string]: string;
|
|
412
412
|
path: string;
|
|
413
413
|
method: string;
|
|
414
|
+
[k: string]: string;
|
|
414
415
|
};
|
|
415
416
|
$serialized: RoomsData;
|
|
416
417
|
}>;
|
|
@@ -426,25 +427,25 @@ declare class ActivityController<ResponseWrapper> implements IController {
|
|
|
426
427
|
data: RecentActivities;
|
|
427
428
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
428
429
|
data: RecentActivities;
|
|
429
|
-
}) extends infer
|
|
430
|
+
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
430
431
|
[key: string]: any;
|
|
431
432
|
data: RecentActivities;
|
|
432
433
|
} : ResponseWrapper extends {
|
|
433
434
|
data: RecentActivities;
|
|
434
435
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
435
436
|
data: RecentActivities;
|
|
436
|
-
}) ?
|
|
437
|
+
}) ? T_1 extends unknown ? {
|
|
437
438
|
like: RecentLike[];
|
|
438
439
|
comment: RecentComment[];
|
|
439
440
|
recent: RecentRecent[];
|
|
440
441
|
post: RecentPost[];
|
|
441
442
|
note: RecentNote[];
|
|
442
|
-
} :
|
|
443
|
+
} : T_1 : never : never;
|
|
443
444
|
} : ResponseWrapper;
|
|
444
445
|
$request: {
|
|
445
|
-
[k: string]: string;
|
|
446
446
|
path: string;
|
|
447
447
|
method: string;
|
|
448
|
+
[k: string]: string;
|
|
448
449
|
};
|
|
449
450
|
$serialized: RecentActivities;
|
|
450
451
|
}>;
|
|
@@ -776,9 +777,9 @@ declare class AIController<ResponseWrapper> implements IController {
|
|
|
776
777
|
} : T_1 : never : never;
|
|
777
778
|
} : ResponseWrapper;
|
|
778
779
|
$request: {
|
|
779
|
-
[k: string]: string;
|
|
780
780
|
path: string;
|
|
781
781
|
method: string;
|
|
782
|
+
[k: string]: string;
|
|
782
783
|
};
|
|
783
784
|
$serialized: AISummaryModel;
|
|
784
785
|
}>;
|
|
@@ -811,9 +812,9 @@ declare class AIController<ResponseWrapper> implements IController {
|
|
|
811
812
|
} : T_1 : never : never;
|
|
812
813
|
} : ResponseWrapper;
|
|
813
814
|
$request: {
|
|
814
|
-
[k: string]: string;
|
|
815
815
|
path: string;
|
|
816
816
|
method: string;
|
|
817
|
+
[k: string]: string;
|
|
817
818
|
};
|
|
818
819
|
$serialized: AISummaryModel;
|
|
819
820
|
}>;
|
|
@@ -839,7 +840,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
839
840
|
getCategoryDetail(id: string): Promise<ResponseProxyExtraRaw<CategoryWithChildrenModel>>;
|
|
840
841
|
getCategoryDetail(ids: string[]): Promise<ResponseProxyExtraRaw<Map<string, CategoryWithChildrenModel>>>;
|
|
841
842
|
getCategoryByIdOrSlug(idOrSlug: string): Promise<CategoryModel & {
|
|
842
|
-
children: Pick<PostModel, "id" | "
|
|
843
|
+
children: Pick<PostModel, "id" | "title" | "slug" | "modified" | "created">[];
|
|
843
844
|
} & {
|
|
844
845
|
$raw: ResponseWrapper extends {
|
|
845
846
|
data: infer T;
|
|
@@ -870,15 +871,15 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
870
871
|
} : T_1 : never : never;
|
|
871
872
|
} : ResponseWrapper;
|
|
872
873
|
$request: {
|
|
873
|
-
[k: string]: string;
|
|
874
874
|
path: string;
|
|
875
875
|
method: string;
|
|
876
|
+
[k: string]: string;
|
|
876
877
|
};
|
|
877
878
|
$serialized: CategoryWithChildrenModel;
|
|
878
879
|
}>;
|
|
879
880
|
getTagByName(name: string): Promise<{
|
|
880
881
|
tag: string;
|
|
881
|
-
data: Pick<PostModel,
|
|
882
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
882
883
|
} & {
|
|
883
884
|
$raw: ResponseWrapper extends {
|
|
884
885
|
data: infer T;
|
|
@@ -888,33 +889,33 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
888
889
|
[key: string]: any;
|
|
889
890
|
data: {
|
|
890
891
|
tag: string;
|
|
891
|
-
data: Pick<PostModel,
|
|
892
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
892
893
|
};
|
|
893
894
|
} : ResponseWrapper extends {
|
|
894
895
|
data: {
|
|
895
896
|
tag: string;
|
|
896
|
-
data: Pick<PostModel,
|
|
897
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
897
898
|
};
|
|
898
899
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
899
900
|
data: {
|
|
900
901
|
tag: string;
|
|
901
|
-
data: Pick<PostModel,
|
|
902
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
902
903
|
};
|
|
903
904
|
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
904
905
|
[key: string]: any;
|
|
905
906
|
data: {
|
|
906
907
|
tag: string;
|
|
907
|
-
data: Pick<PostModel,
|
|
908
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
908
909
|
};
|
|
909
910
|
} : ResponseWrapper extends {
|
|
910
911
|
data: {
|
|
911
912
|
tag: string;
|
|
912
|
-
data: Pick<PostModel,
|
|
913
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
913
914
|
};
|
|
914
915
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
915
916
|
data: {
|
|
916
917
|
tag: string;
|
|
917
|
-
data: Pick<PostModel,
|
|
918
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
918
919
|
};
|
|
919
920
|
}) ? T_1 extends unknown ? {
|
|
920
921
|
tag: string;
|
|
@@ -922,13 +923,13 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
922
923
|
} : T_1 : never : never;
|
|
923
924
|
} : ResponseWrapper;
|
|
924
925
|
$request: {
|
|
925
|
-
[k: string]: string;
|
|
926
926
|
path: string;
|
|
927
927
|
method: string;
|
|
928
|
+
[k: string]: string;
|
|
928
929
|
};
|
|
929
930
|
$serialized: {
|
|
930
931
|
tag: string;
|
|
931
|
-
data: Pick<PostModel,
|
|
932
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
932
933
|
};
|
|
933
934
|
}>;
|
|
934
935
|
}
|
|
@@ -1054,6 +1055,28 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1054
1055
|
}>;
|
|
1055
1056
|
}
|
|
1056
1057
|
|
|
1058
|
+
declare enum LinkType {
|
|
1059
|
+
Friend = 0,
|
|
1060
|
+
Collection = 1
|
|
1061
|
+
}
|
|
1062
|
+
declare enum LinkState {
|
|
1063
|
+
Pass = 0,
|
|
1064
|
+
Audit = 1,
|
|
1065
|
+
Outdate = 2,
|
|
1066
|
+
Banned = 3,
|
|
1067
|
+
Reject = 4
|
|
1068
|
+
}
|
|
1069
|
+
interface LinkModel extends BaseModel {
|
|
1070
|
+
name: string;
|
|
1071
|
+
url: string;
|
|
1072
|
+
avatar: string;
|
|
1073
|
+
description?: string;
|
|
1074
|
+
type: LinkType;
|
|
1075
|
+
state: LinkState;
|
|
1076
|
+
hide: boolean;
|
|
1077
|
+
email: string;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1057
1080
|
type SortOptions = {
|
|
1058
1081
|
sortBy?: string;
|
|
1059
1082
|
sortOrder?: 1 | -1 | 'asc' | 'desc';
|
|
@@ -1095,28 +1118,6 @@ declare abstract class BaseCrudController<T, ResponseWrapper> {
|
|
|
1095
1118
|
}>;
|
|
1096
1119
|
}
|
|
1097
1120
|
|
|
1098
|
-
declare enum LinkType {
|
|
1099
|
-
Friend = 0,
|
|
1100
|
-
Collection = 1
|
|
1101
|
-
}
|
|
1102
|
-
declare enum LinkState {
|
|
1103
|
-
Pass = 0,
|
|
1104
|
-
Audit = 1,
|
|
1105
|
-
Outdate = 2,
|
|
1106
|
-
Banned = 3,
|
|
1107
|
-
Reject = 4
|
|
1108
|
-
}
|
|
1109
|
-
interface LinkModel extends BaseModel {
|
|
1110
|
-
name: string;
|
|
1111
|
-
url: string;
|
|
1112
|
-
avatar: string;
|
|
1113
|
-
description?: string;
|
|
1114
|
-
type: LinkType;
|
|
1115
|
-
state: LinkState;
|
|
1116
|
-
hide: boolean;
|
|
1117
|
-
email: string;
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
1121
|
declare module '../core/client' {
|
|
1121
1122
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
1122
1123
|
link: LinkController<ResponseWrapper>;
|
|
@@ -1187,22 +1188,22 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
1187
1188
|
* 获取当前日记的上下各 n / 2 篇日记
|
|
1188
1189
|
*/
|
|
1189
1190
|
getMiddleList(id: string, size?: number): RequestProxyResult<{
|
|
1190
|
-
data: Pick<NoteModel,
|
|
1191
|
+
data: Pick<NoteModel, "id" | "title" | "nid" | "created" | "hide">[];
|
|
1191
1192
|
size: number;
|
|
1192
1193
|
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1193
1194
|
[key: string]: any;
|
|
1194
1195
|
data: {
|
|
1195
|
-
data: Pick<NoteModel,
|
|
1196
|
+
data: Pick<NoteModel, "id" | "title" | "nid" | "created" | "hide">[];
|
|
1196
1197
|
size: number;
|
|
1197
1198
|
};
|
|
1198
1199
|
} : ResponseWrapper extends {
|
|
1199
1200
|
data: {
|
|
1200
|
-
data: Pick<NoteModel,
|
|
1201
|
+
data: Pick<NoteModel, "id" | "title" | "nid" | "created" | "hide">[];
|
|
1201
1202
|
size: number;
|
|
1202
1203
|
};
|
|
1203
1204
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1204
1205
|
data: {
|
|
1205
|
-
data: Pick<NoteModel,
|
|
1206
|
+
data: Pick<NoteModel, "id" | "title" | "nid" | "created" | "hide">[];
|
|
1206
1207
|
size: number;
|
|
1207
1208
|
};
|
|
1208
1209
|
}>;
|
|
@@ -1571,11 +1572,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1571
1572
|
* @returns
|
|
1572
1573
|
*/
|
|
1573
1574
|
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1574
|
-
type:
|
|
1575
|
+
type: "post";
|
|
1575
1576
|
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1576
|
-
type:
|
|
1577
|
+
type: "note";
|
|
1577
1578
|
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1578
|
-
type:
|
|
1579
|
+
type: "page";
|
|
1579
1580
|
})> & {
|
|
1580
1581
|
/**
|
|
1581
1582
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
@@ -1584,11 +1585,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1584
1585
|
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1585
1586
|
[key: string]: any;
|
|
1586
1587
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1587
|
-
type:
|
|
1588
|
+
type: "post";
|
|
1588
1589
|
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1589
|
-
type:
|
|
1590
|
+
type: "note";
|
|
1590
1591
|
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1591
|
-
type:
|
|
1592
|
+
type: "page";
|
|
1592
1593
|
})> & {
|
|
1593
1594
|
/**
|
|
1594
1595
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
@@ -1597,11 +1598,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1597
1598
|
}, ResponseWrapper>;
|
|
1598
1599
|
} : ResponseWrapper extends {
|
|
1599
1600
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1600
|
-
type:
|
|
1601
|
+
type: "post";
|
|
1601
1602
|
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1602
|
-
type:
|
|
1603
|
+
type: "note";
|
|
1603
1604
|
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1604
|
-
type:
|
|
1605
|
+
type: "page";
|
|
1605
1606
|
})> & {
|
|
1606
1607
|
/**
|
|
1607
1608
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
@@ -1610,11 +1611,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1610
1611
|
}, ResponseWrapper>;
|
|
1611
1612
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1612
1613
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1613
|
-
type:
|
|
1614
|
+
type: "post";
|
|
1614
1615
|
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1615
|
-
type:
|
|
1616
|
+
type: "note";
|
|
1616
1617
|
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1617
|
-
type:
|
|
1618
|
+
type: "page";
|
|
1618
1619
|
})> & {
|
|
1619
1620
|
/**
|
|
1620
1621
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RequestOptions, I as IRequestAdapter, a as IAdaptorRequestResponseType } from './adapter-
|
|
1
|
+
import { R as RequestOptions, I as IRequestAdapter, a as IAdaptorRequestResponseType } from './adapter-B8tKfr1O.js';
|
|
2
2
|
|
|
3
3
|
interface IController {
|
|
4
4
|
base: string;
|
|
@@ -138,6 +138,7 @@ interface Image {
|
|
|
138
138
|
type: string;
|
|
139
139
|
accent?: string;
|
|
140
140
|
src: string;
|
|
141
|
+
blurHash?: string;
|
|
141
142
|
}
|
|
142
143
|
interface Pager {
|
|
143
144
|
total: number;
|
|
@@ -388,14 +389,14 @@ declare class ActivityController<ResponseWrapper> implements IController {
|
|
|
388
389
|
data: RoomsData;
|
|
389
390
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
390
391
|
data: RoomsData;
|
|
391
|
-
}) extends infer
|
|
392
|
+
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
392
393
|
[key: string]: any;
|
|
393
394
|
data: RoomsData;
|
|
394
395
|
} : ResponseWrapper extends {
|
|
395
396
|
data: RoomsData;
|
|
396
397
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
397
398
|
data: RoomsData;
|
|
398
|
-
}) ?
|
|
399
|
+
}) ? T_1 extends unknown ? {
|
|
399
400
|
rooms: string[];
|
|
400
401
|
room_count: {
|
|
401
402
|
[key: string]: number;
|
|
@@ -405,12 +406,12 @@ declare class ActivityController<ResponseWrapper> implements IController {
|
|
|
405
406
|
notes: RoomOmittedNote[];
|
|
406
407
|
pages: RoomOmittedPage[];
|
|
407
408
|
};
|
|
408
|
-
} :
|
|
409
|
+
} : T_1 : never : never;
|
|
409
410
|
} : ResponseWrapper;
|
|
410
411
|
$request: {
|
|
411
|
-
[k: string]: string;
|
|
412
412
|
path: string;
|
|
413
413
|
method: string;
|
|
414
|
+
[k: string]: string;
|
|
414
415
|
};
|
|
415
416
|
$serialized: RoomsData;
|
|
416
417
|
}>;
|
|
@@ -426,25 +427,25 @@ declare class ActivityController<ResponseWrapper> implements IController {
|
|
|
426
427
|
data: RecentActivities;
|
|
427
428
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
428
429
|
data: RecentActivities;
|
|
429
|
-
}) extends infer
|
|
430
|
+
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
430
431
|
[key: string]: any;
|
|
431
432
|
data: RecentActivities;
|
|
432
433
|
} : ResponseWrapper extends {
|
|
433
434
|
data: RecentActivities;
|
|
434
435
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
435
436
|
data: RecentActivities;
|
|
436
|
-
}) ?
|
|
437
|
+
}) ? T_1 extends unknown ? {
|
|
437
438
|
like: RecentLike[];
|
|
438
439
|
comment: RecentComment[];
|
|
439
440
|
recent: RecentRecent[];
|
|
440
441
|
post: RecentPost[];
|
|
441
442
|
note: RecentNote[];
|
|
442
|
-
} :
|
|
443
|
+
} : T_1 : never : never;
|
|
443
444
|
} : ResponseWrapper;
|
|
444
445
|
$request: {
|
|
445
|
-
[k: string]: string;
|
|
446
446
|
path: string;
|
|
447
447
|
method: string;
|
|
448
|
+
[k: string]: string;
|
|
448
449
|
};
|
|
449
450
|
$serialized: RecentActivities;
|
|
450
451
|
}>;
|
|
@@ -776,9 +777,9 @@ declare class AIController<ResponseWrapper> implements IController {
|
|
|
776
777
|
} : T_1 : never : never;
|
|
777
778
|
} : ResponseWrapper;
|
|
778
779
|
$request: {
|
|
779
|
-
[k: string]: string;
|
|
780
780
|
path: string;
|
|
781
781
|
method: string;
|
|
782
|
+
[k: string]: string;
|
|
782
783
|
};
|
|
783
784
|
$serialized: AISummaryModel;
|
|
784
785
|
}>;
|
|
@@ -811,9 +812,9 @@ declare class AIController<ResponseWrapper> implements IController {
|
|
|
811
812
|
} : T_1 : never : never;
|
|
812
813
|
} : ResponseWrapper;
|
|
813
814
|
$request: {
|
|
814
|
-
[k: string]: string;
|
|
815
815
|
path: string;
|
|
816
816
|
method: string;
|
|
817
|
+
[k: string]: string;
|
|
817
818
|
};
|
|
818
819
|
$serialized: AISummaryModel;
|
|
819
820
|
}>;
|
|
@@ -839,7 +840,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
839
840
|
getCategoryDetail(id: string): Promise<ResponseProxyExtraRaw<CategoryWithChildrenModel>>;
|
|
840
841
|
getCategoryDetail(ids: string[]): Promise<ResponseProxyExtraRaw<Map<string, CategoryWithChildrenModel>>>;
|
|
841
842
|
getCategoryByIdOrSlug(idOrSlug: string): Promise<CategoryModel & {
|
|
842
|
-
children: Pick<PostModel, "id" | "
|
|
843
|
+
children: Pick<PostModel, "id" | "title" | "slug" | "modified" | "created">[];
|
|
843
844
|
} & {
|
|
844
845
|
$raw: ResponseWrapper extends {
|
|
845
846
|
data: infer T;
|
|
@@ -870,15 +871,15 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
870
871
|
} : T_1 : never : never;
|
|
871
872
|
} : ResponseWrapper;
|
|
872
873
|
$request: {
|
|
873
|
-
[k: string]: string;
|
|
874
874
|
path: string;
|
|
875
875
|
method: string;
|
|
876
|
+
[k: string]: string;
|
|
876
877
|
};
|
|
877
878
|
$serialized: CategoryWithChildrenModel;
|
|
878
879
|
}>;
|
|
879
880
|
getTagByName(name: string): Promise<{
|
|
880
881
|
tag: string;
|
|
881
|
-
data: Pick<PostModel,
|
|
882
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
882
883
|
} & {
|
|
883
884
|
$raw: ResponseWrapper extends {
|
|
884
885
|
data: infer T;
|
|
@@ -888,33 +889,33 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
888
889
|
[key: string]: any;
|
|
889
890
|
data: {
|
|
890
891
|
tag: string;
|
|
891
|
-
data: Pick<PostModel,
|
|
892
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
892
893
|
};
|
|
893
894
|
} : ResponseWrapper extends {
|
|
894
895
|
data: {
|
|
895
896
|
tag: string;
|
|
896
|
-
data: Pick<PostModel,
|
|
897
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
897
898
|
};
|
|
898
899
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
899
900
|
data: {
|
|
900
901
|
tag: string;
|
|
901
|
-
data: Pick<PostModel,
|
|
902
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
902
903
|
};
|
|
903
904
|
}) extends infer T_1 ? T_1 extends (ResponseWrapper extends unknown ? {
|
|
904
905
|
[key: string]: any;
|
|
905
906
|
data: {
|
|
906
907
|
tag: string;
|
|
907
|
-
data: Pick<PostModel,
|
|
908
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
908
909
|
};
|
|
909
910
|
} : ResponseWrapper extends {
|
|
910
911
|
data: {
|
|
911
912
|
tag: string;
|
|
912
|
-
data: Pick<PostModel,
|
|
913
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
913
914
|
};
|
|
914
915
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
915
916
|
data: {
|
|
916
917
|
tag: string;
|
|
917
|
-
data: Pick<PostModel,
|
|
918
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
918
919
|
};
|
|
919
920
|
}) ? T_1 extends unknown ? {
|
|
920
921
|
tag: string;
|
|
@@ -922,13 +923,13 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
922
923
|
} : T_1 : never : never;
|
|
923
924
|
} : ResponseWrapper;
|
|
924
925
|
$request: {
|
|
925
|
-
[k: string]: string;
|
|
926
926
|
path: string;
|
|
927
927
|
method: string;
|
|
928
|
+
[k: string]: string;
|
|
928
929
|
};
|
|
929
930
|
$serialized: {
|
|
930
931
|
tag: string;
|
|
931
|
-
data: Pick<PostModel,
|
|
932
|
+
data: Pick<PostModel, "id" | "title" | "slug" | "category" | "created">[];
|
|
932
933
|
};
|
|
933
934
|
}>;
|
|
934
935
|
}
|
|
@@ -1054,6 +1055,28 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1054
1055
|
}>;
|
|
1055
1056
|
}
|
|
1056
1057
|
|
|
1058
|
+
declare enum LinkType {
|
|
1059
|
+
Friend = 0,
|
|
1060
|
+
Collection = 1
|
|
1061
|
+
}
|
|
1062
|
+
declare enum LinkState {
|
|
1063
|
+
Pass = 0,
|
|
1064
|
+
Audit = 1,
|
|
1065
|
+
Outdate = 2,
|
|
1066
|
+
Banned = 3,
|
|
1067
|
+
Reject = 4
|
|
1068
|
+
}
|
|
1069
|
+
interface LinkModel extends BaseModel {
|
|
1070
|
+
name: string;
|
|
1071
|
+
url: string;
|
|
1072
|
+
avatar: string;
|
|
1073
|
+
description?: string;
|
|
1074
|
+
type: LinkType;
|
|
1075
|
+
state: LinkState;
|
|
1076
|
+
hide: boolean;
|
|
1077
|
+
email: string;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1057
1080
|
type SortOptions = {
|
|
1058
1081
|
sortBy?: string;
|
|
1059
1082
|
sortOrder?: 1 | -1 | 'asc' | 'desc';
|
|
@@ -1095,28 +1118,6 @@ declare abstract class BaseCrudController<T, ResponseWrapper> {
|
|
|
1095
1118
|
}>;
|
|
1096
1119
|
}
|
|
1097
1120
|
|
|
1098
|
-
declare enum LinkType {
|
|
1099
|
-
Friend = 0,
|
|
1100
|
-
Collection = 1
|
|
1101
|
-
}
|
|
1102
|
-
declare enum LinkState {
|
|
1103
|
-
Pass = 0,
|
|
1104
|
-
Audit = 1,
|
|
1105
|
-
Outdate = 2,
|
|
1106
|
-
Banned = 3,
|
|
1107
|
-
Reject = 4
|
|
1108
|
-
}
|
|
1109
|
-
interface LinkModel extends BaseModel {
|
|
1110
|
-
name: string;
|
|
1111
|
-
url: string;
|
|
1112
|
-
avatar: string;
|
|
1113
|
-
description?: string;
|
|
1114
|
-
type: LinkType;
|
|
1115
|
-
state: LinkState;
|
|
1116
|
-
hide: boolean;
|
|
1117
|
-
email: string;
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
1121
|
declare module '@mx-space/api-client' {
|
|
1121
1122
|
interface HTTPClient<T extends IRequestAdapter = IRequestAdapter, ResponseWrapper = unknown> {
|
|
1122
1123
|
link: LinkController<ResponseWrapper>;
|
|
@@ -1187,22 +1188,22 @@ declare class NoteController<ResponseWrapper> implements IController {
|
|
|
1187
1188
|
* 获取当前日记的上下各 n / 2 篇日记
|
|
1188
1189
|
*/
|
|
1189
1190
|
getMiddleList(id: string, size?: number): RequestProxyResult<{
|
|
1190
|
-
data: Pick<NoteModel,
|
|
1191
|
+
data: Pick<NoteModel, "id" | "title" | "nid" | "created" | "hide">[];
|
|
1191
1192
|
size: number;
|
|
1192
1193
|
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1193
1194
|
[key: string]: any;
|
|
1194
1195
|
data: {
|
|
1195
|
-
data: Pick<NoteModel,
|
|
1196
|
+
data: Pick<NoteModel, "id" | "title" | "nid" | "created" | "hide">[];
|
|
1196
1197
|
size: number;
|
|
1197
1198
|
};
|
|
1198
1199
|
} : ResponseWrapper extends {
|
|
1199
1200
|
data: {
|
|
1200
|
-
data: Pick<NoteModel,
|
|
1201
|
+
data: Pick<NoteModel, "id" | "title" | "nid" | "created" | "hide">[];
|
|
1201
1202
|
size: number;
|
|
1202
1203
|
};
|
|
1203
1204
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1204
1205
|
data: {
|
|
1205
|
-
data: Pick<NoteModel,
|
|
1206
|
+
data: Pick<NoteModel, "id" | "title" | "nid" | "created" | "hide">[];
|
|
1206
1207
|
size: number;
|
|
1207
1208
|
};
|
|
1208
1209
|
}>;
|
|
@@ -1571,11 +1572,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1571
1572
|
* @returns
|
|
1572
1573
|
*/
|
|
1573
1574
|
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1574
|
-
type:
|
|
1575
|
+
type: "post";
|
|
1575
1576
|
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1576
|
-
type:
|
|
1577
|
+
type: "note";
|
|
1577
1578
|
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1578
|
-
type:
|
|
1579
|
+
type: "page";
|
|
1579
1580
|
})> & {
|
|
1580
1581
|
/**
|
|
1581
1582
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
@@ -1584,11 +1585,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1584
1585
|
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1585
1586
|
[key: string]: any;
|
|
1586
1587
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1587
|
-
type:
|
|
1588
|
+
type: "post";
|
|
1588
1589
|
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1589
|
-
type:
|
|
1590
|
+
type: "note";
|
|
1590
1591
|
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1591
|
-
type:
|
|
1592
|
+
type: "page";
|
|
1592
1593
|
})> & {
|
|
1593
1594
|
/**
|
|
1594
1595
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
@@ -1597,11 +1598,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1597
1598
|
}, ResponseWrapper>;
|
|
1598
1599
|
} : ResponseWrapper extends {
|
|
1599
1600
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1600
|
-
type:
|
|
1601
|
+
type: "post";
|
|
1601
1602
|
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1602
|
-
type:
|
|
1603
|
+
type: "note";
|
|
1603
1604
|
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1604
|
-
type:
|
|
1605
|
+
type: "page";
|
|
1605
1606
|
})> & {
|
|
1606
1607
|
/**
|
|
1607
1608
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
@@ -1610,11 +1611,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
1610
1611
|
}, ResponseWrapper>;
|
|
1611
1612
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1612
1613
|
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "id" | "category" | "created" | "modified" | "title" | "slug"> & {
|
|
1613
|
-
type:
|
|
1614
|
+
type: "post";
|
|
1614
1615
|
}) | (Pick<NoteModel, "id" | "created" | "modified" | "title" | "nid"> & {
|
|
1615
|
-
type:
|
|
1616
|
+
type: "note";
|
|
1616
1617
|
}) | (Pick<PageModel, "id" | "created" | "modified" | "title" | "slug"> & {
|
|
1617
|
-
type:
|
|
1618
|
+
type: "page";
|
|
1618
1619
|
})> & {
|
|
1619
1620
|
/**
|
|
1620
1621
|
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|