@mx-space/api-client 2.3.0 → 2.4.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/dist/index.cjs +10 -4
- package/dist/index.d.cts +39 -17
- package/dist/index.d.mts +39 -17
- package/dist/index.mjs +10 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -428,14 +428,20 @@ var CommentController = class {
|
|
|
428
428
|
/**
|
|
429
429
|
* 评论
|
|
430
430
|
*/
|
|
431
|
-
|
|
432
|
-
return this.proxy(refId).post({ data });
|
|
431
|
+
guestComment(refId, data) {
|
|
432
|
+
return this.proxy.guest(refId).post({ data });
|
|
433
433
|
}
|
|
434
434
|
/**
|
|
435
435
|
* 回复评论
|
|
436
436
|
*/
|
|
437
|
-
|
|
438
|
-
return this.proxy.reply(commentId).post({ data });
|
|
437
|
+
guestReply(commentId, data) {
|
|
438
|
+
return this.proxy.guest.reply(commentId).post({ data });
|
|
439
|
+
}
|
|
440
|
+
readerComment(refId, data) {
|
|
441
|
+
return this.proxy.reader(refId).post({ data });
|
|
442
|
+
}
|
|
443
|
+
readerReply(commentId, data) {
|
|
444
|
+
return this.proxy.reader.reply(commentId).post({ data });
|
|
439
445
|
}
|
|
440
446
|
};
|
|
441
447
|
|
package/dist/index.d.cts
CHANGED
|
@@ -459,6 +459,7 @@ declare class MailOptionsModel {
|
|
|
459
459
|
}
|
|
460
460
|
declare class CommentOptionsModel {
|
|
461
461
|
antiSpam: boolean;
|
|
462
|
+
allowGuestComment: boolean;
|
|
462
463
|
spamKeywords?: string[];
|
|
463
464
|
blockIps?: string[];
|
|
464
465
|
disableNoChinese?: boolean;
|
|
@@ -584,6 +585,7 @@ interface AggregateRoot {
|
|
|
584
585
|
user: UserModel;
|
|
585
586
|
seo: SeoOptionModel;
|
|
586
587
|
url: Url;
|
|
588
|
+
commentOptions?: Pick<CommentOptionsModel, 'disableComment' | 'allowGuestComment'>;
|
|
587
589
|
categories: CategoryModel[];
|
|
588
590
|
pageMeta: Pick<PageModel, 'title' | 'id' | 'slug' | 'order'>[] | null;
|
|
589
591
|
/**
|
|
@@ -747,7 +749,6 @@ interface CommentModel extends BaseModel {
|
|
|
747
749
|
deletedAt?: string;
|
|
748
750
|
isWhispers?: boolean;
|
|
749
751
|
location?: string;
|
|
750
|
-
source?: string;
|
|
751
752
|
readerId?: string;
|
|
752
753
|
editedAt?: string;
|
|
753
754
|
}
|
|
@@ -823,7 +824,7 @@ interface ReaderModel {
|
|
|
823
824
|
name: string;
|
|
824
825
|
handle: string;
|
|
825
826
|
image: string;
|
|
826
|
-
|
|
827
|
+
role?: 'reader' | 'owner';
|
|
827
828
|
}
|
|
828
829
|
//#endregion
|
|
829
830
|
//#region models/recently.d.ts
|
|
@@ -1563,7 +1564,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1563
1564
|
name: string;
|
|
1564
1565
|
created: string;
|
|
1565
1566
|
id: string;
|
|
1566
|
-
children: Pick<PostModel, "
|
|
1567
|
+
children: Pick<PostModel, "slug" | "id" | "created" | "title" | "modified">[];
|
|
1567
1568
|
} : T_1 : never : never;
|
|
1568
1569
|
} : ResponseWrapper;
|
|
1569
1570
|
$request: {
|
|
@@ -1615,7 +1616,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1615
1616
|
};
|
|
1616
1617
|
}) ? T_1 extends unknown ? {
|
|
1617
1618
|
tag: string;
|
|
1618
|
-
data: Pick<PostModel, "category" | "
|
|
1619
|
+
data: Pick<PostModel, "category" | "slug" | "id" | "created" | "title">[];
|
|
1619
1620
|
} : T_1 : never : never;
|
|
1620
1621
|
} : ResponseWrapper;
|
|
1621
1622
|
$request: {
|
|
@@ -1637,14 +1638,19 @@ interface PaginationParams {
|
|
|
1637
1638
|
}
|
|
1638
1639
|
//#endregion
|
|
1639
1640
|
//#region dtos/comment.d.ts
|
|
1640
|
-
interface
|
|
1641
|
+
interface AnonymousCommentDto {
|
|
1641
1642
|
author: string;
|
|
1642
1643
|
text: string;
|
|
1643
1644
|
mail: string;
|
|
1644
1645
|
url?: string;
|
|
1645
|
-
source?: 'github' | 'google';
|
|
1646
1646
|
avatar?: string;
|
|
1647
|
+
isWhispers?: boolean;
|
|
1648
|
+
}
|
|
1649
|
+
interface ReaderCommentDto {
|
|
1650
|
+
text: string;
|
|
1651
|
+
isWhispers?: boolean;
|
|
1647
1652
|
}
|
|
1653
|
+
type CommentDto = AnonymousCommentDto | ReaderCommentDto;
|
|
1648
1654
|
//#endregion
|
|
1649
1655
|
//#region controllers/comment.d.ts
|
|
1650
1656
|
declare module '@mx-space/api-client' {
|
|
@@ -1718,7 +1724,7 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1718
1724
|
/**
|
|
1719
1725
|
* 评论
|
|
1720
1726
|
*/
|
|
1721
|
-
|
|
1727
|
+
guestComment(refId: string, data: AnonymousCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1722
1728
|
[key: string]: any;
|
|
1723
1729
|
data: CommentModel;
|
|
1724
1730
|
} : ResponseWrapper extends {
|
|
@@ -1729,7 +1735,23 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1729
1735
|
/**
|
|
1730
1736
|
* 回复评论
|
|
1731
1737
|
*/
|
|
1732
|
-
|
|
1738
|
+
guestReply(commentId: string, data: AnonymousCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1739
|
+
[key: string]: any;
|
|
1740
|
+
data: CommentModel;
|
|
1741
|
+
} : ResponseWrapper extends {
|
|
1742
|
+
data: CommentModel;
|
|
1743
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1744
|
+
data: CommentModel;
|
|
1745
|
+
}>;
|
|
1746
|
+
readerComment(refId: string, data: ReaderCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1747
|
+
[key: string]: any;
|
|
1748
|
+
data: CommentModel;
|
|
1749
|
+
} : ResponseWrapper extends {
|
|
1750
|
+
data: CommentModel;
|
|
1751
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1752
|
+
data: CommentModel;
|
|
1753
|
+
}>;
|
|
1754
|
+
readerReply(commentId: string, data: ReaderCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1733
1755
|
[key: string]: any;
|
|
1734
1756
|
data: CommentModel;
|
|
1735
1757
|
} : ResponseWrapper extends {
|
|
@@ -2432,11 +2454,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2432
2454
|
* @param options
|
|
2433
2455
|
* @returns
|
|
2434
2456
|
*/
|
|
2435
|
-
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2457
|
+
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2436
2458
|
type: "post";
|
|
2437
2459
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2438
2460
|
type: "note";
|
|
2439
|
-
}) | (Pick<PageModel, "
|
|
2461
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2440
2462
|
type: "page";
|
|
2441
2463
|
})> & {
|
|
2442
2464
|
/**
|
|
@@ -2445,11 +2467,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2445
2467
|
raw?: any;
|
|
2446
2468
|
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2447
2469
|
[key: string]: any;
|
|
2448
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2470
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2449
2471
|
type: "post";
|
|
2450
2472
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2451
2473
|
type: "note";
|
|
2452
|
-
}) | (Pick<PageModel, "
|
|
2474
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2453
2475
|
type: "page";
|
|
2454
2476
|
})> & {
|
|
2455
2477
|
/**
|
|
@@ -2458,11 +2480,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2458
2480
|
raw?: any;
|
|
2459
2481
|
}, ResponseWrapper>;
|
|
2460
2482
|
} : ResponseWrapper extends {
|
|
2461
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2483
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2462
2484
|
type: "post";
|
|
2463
2485
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2464
2486
|
type: "note";
|
|
2465
|
-
}) | (Pick<PageModel, "
|
|
2487
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2466
2488
|
type: "page";
|
|
2467
2489
|
})> & {
|
|
2468
2490
|
/**
|
|
@@ -2471,11 +2493,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2471
2493
|
raw?: any;
|
|
2472
2494
|
}, ResponseWrapper>;
|
|
2473
2495
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2474
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2496
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2475
2497
|
type: "post";
|
|
2476
2498
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2477
2499
|
type: "note";
|
|
2478
|
-
}) | (Pick<PageModel, "
|
|
2500
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2479
2501
|
type: "page";
|
|
2480
2502
|
})> & {
|
|
2481
2503
|
/**
|
|
@@ -2624,4 +2646,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
2624
2646
|
*/
|
|
2625
2647
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
2626
2648
|
//#endregion
|
|
2627
|
-
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, BookMetadata, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CodeMetadata, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentReplyWindow, CommentState, CommentThreadItem, CommentThreadReplies, Coordinate, Count, 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, Pager, PaginateResult, PostController, type PostListItem, type PostListOptions, PostModel, ProjectController, ProjectModel, 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, TagModel, TextBaseModel, TextBaseModelLexical, TextBaseModelMarkdown, ThirdPartyServiceIntegrationModel, TimelineData, TimelineType, TopicController, TopicModel, TranslationMeta, Url, UrlOptionModel, UserController, UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
|
2649
|
+
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, AnonymousCommentDto, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, BookMetadata, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CodeMetadata, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentReplyWindow, CommentState, CommentThreadItem, CommentThreadReplies, Coordinate, Count, 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, Pager, PaginateResult, PostController, type PostListItem, type PostListOptions, PostModel, 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, TagModel, TextBaseModel, TextBaseModelLexical, TextBaseModelMarkdown, ThirdPartyServiceIntegrationModel, TimelineData, TimelineType, TopicController, TopicModel, TranslationMeta, Url, UrlOptionModel, UserController, UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
package/dist/index.d.mts
CHANGED
|
@@ -459,6 +459,7 @@ declare class MailOptionsModel {
|
|
|
459
459
|
}
|
|
460
460
|
declare class CommentOptionsModel {
|
|
461
461
|
antiSpam: boolean;
|
|
462
|
+
allowGuestComment: boolean;
|
|
462
463
|
spamKeywords?: string[];
|
|
463
464
|
blockIps?: string[];
|
|
464
465
|
disableNoChinese?: boolean;
|
|
@@ -584,6 +585,7 @@ interface AggregateRoot {
|
|
|
584
585
|
user: UserModel;
|
|
585
586
|
seo: SeoOptionModel;
|
|
586
587
|
url: Url;
|
|
588
|
+
commentOptions?: Pick<CommentOptionsModel, 'disableComment' | 'allowGuestComment'>;
|
|
587
589
|
categories: CategoryModel[];
|
|
588
590
|
pageMeta: Pick<PageModel, 'title' | 'id' | 'slug' | 'order'>[] | null;
|
|
589
591
|
/**
|
|
@@ -747,7 +749,6 @@ interface CommentModel extends BaseModel {
|
|
|
747
749
|
deletedAt?: string;
|
|
748
750
|
isWhispers?: boolean;
|
|
749
751
|
location?: string;
|
|
750
|
-
source?: string;
|
|
751
752
|
readerId?: string;
|
|
752
753
|
editedAt?: string;
|
|
753
754
|
}
|
|
@@ -823,7 +824,7 @@ interface ReaderModel {
|
|
|
823
824
|
name: string;
|
|
824
825
|
handle: string;
|
|
825
826
|
image: string;
|
|
826
|
-
|
|
827
|
+
role?: 'reader' | 'owner';
|
|
827
828
|
}
|
|
828
829
|
//#endregion
|
|
829
830
|
//#region models/recently.d.ts
|
|
@@ -1563,7 +1564,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1563
1564
|
name: string;
|
|
1564
1565
|
created: string;
|
|
1565
1566
|
id: string;
|
|
1566
|
-
children: Pick<PostModel, "
|
|
1567
|
+
children: Pick<PostModel, "slug" | "id" | "created" | "title" | "modified">[];
|
|
1567
1568
|
} : T_1 : never : never;
|
|
1568
1569
|
} : ResponseWrapper;
|
|
1569
1570
|
$request: {
|
|
@@ -1615,7 +1616,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1615
1616
|
};
|
|
1616
1617
|
}) ? T_1 extends unknown ? {
|
|
1617
1618
|
tag: string;
|
|
1618
|
-
data: Pick<PostModel, "category" | "
|
|
1619
|
+
data: Pick<PostModel, "category" | "slug" | "id" | "created" | "title">[];
|
|
1619
1620
|
} : T_1 : never : never;
|
|
1620
1621
|
} : ResponseWrapper;
|
|
1621
1622
|
$request: {
|
|
@@ -1637,14 +1638,19 @@ interface PaginationParams {
|
|
|
1637
1638
|
}
|
|
1638
1639
|
//#endregion
|
|
1639
1640
|
//#region dtos/comment.d.ts
|
|
1640
|
-
interface
|
|
1641
|
+
interface AnonymousCommentDto {
|
|
1641
1642
|
author: string;
|
|
1642
1643
|
text: string;
|
|
1643
1644
|
mail: string;
|
|
1644
1645
|
url?: string;
|
|
1645
|
-
source?: 'github' | 'google';
|
|
1646
1646
|
avatar?: string;
|
|
1647
|
+
isWhispers?: boolean;
|
|
1648
|
+
}
|
|
1649
|
+
interface ReaderCommentDto {
|
|
1650
|
+
text: string;
|
|
1651
|
+
isWhispers?: boolean;
|
|
1647
1652
|
}
|
|
1653
|
+
type CommentDto = AnonymousCommentDto | ReaderCommentDto;
|
|
1648
1654
|
//#endregion
|
|
1649
1655
|
//#region controllers/comment.d.ts
|
|
1650
1656
|
declare module '@mx-space/api-client' {
|
|
@@ -1718,7 +1724,7 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1718
1724
|
/**
|
|
1719
1725
|
* 评论
|
|
1720
1726
|
*/
|
|
1721
|
-
|
|
1727
|
+
guestComment(refId: string, data: AnonymousCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1722
1728
|
[key: string]: any;
|
|
1723
1729
|
data: CommentModel;
|
|
1724
1730
|
} : ResponseWrapper extends {
|
|
@@ -1729,7 +1735,23 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1729
1735
|
/**
|
|
1730
1736
|
* 回复评论
|
|
1731
1737
|
*/
|
|
1732
|
-
|
|
1738
|
+
guestReply(commentId: string, data: AnonymousCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1739
|
+
[key: string]: any;
|
|
1740
|
+
data: CommentModel;
|
|
1741
|
+
} : ResponseWrapper extends {
|
|
1742
|
+
data: CommentModel;
|
|
1743
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1744
|
+
data: CommentModel;
|
|
1745
|
+
}>;
|
|
1746
|
+
readerComment(refId: string, data: ReaderCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1747
|
+
[key: string]: any;
|
|
1748
|
+
data: CommentModel;
|
|
1749
|
+
} : ResponseWrapper extends {
|
|
1750
|
+
data: CommentModel;
|
|
1751
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1752
|
+
data: CommentModel;
|
|
1753
|
+
}>;
|
|
1754
|
+
readerReply(commentId: string, data: ReaderCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1733
1755
|
[key: string]: any;
|
|
1734
1756
|
data: CommentModel;
|
|
1735
1757
|
} : ResponseWrapper extends {
|
|
@@ -2432,11 +2454,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2432
2454
|
* @param options
|
|
2433
2455
|
* @returns
|
|
2434
2456
|
*/
|
|
2435
|
-
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2457
|
+
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2436
2458
|
type: "post";
|
|
2437
2459
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2438
2460
|
type: "note";
|
|
2439
|
-
}) | (Pick<PageModel, "
|
|
2461
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2440
2462
|
type: "page";
|
|
2441
2463
|
})> & {
|
|
2442
2464
|
/**
|
|
@@ -2445,11 +2467,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2445
2467
|
raw?: any;
|
|
2446
2468
|
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2447
2469
|
[key: string]: any;
|
|
2448
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2470
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2449
2471
|
type: "post";
|
|
2450
2472
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2451
2473
|
type: "note";
|
|
2452
|
-
}) | (Pick<PageModel, "
|
|
2474
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2453
2475
|
type: "page";
|
|
2454
2476
|
})> & {
|
|
2455
2477
|
/**
|
|
@@ -2458,11 +2480,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2458
2480
|
raw?: any;
|
|
2459
2481
|
}, ResponseWrapper>;
|
|
2460
2482
|
} : ResponseWrapper extends {
|
|
2461
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2483
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2462
2484
|
type: "post";
|
|
2463
2485
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2464
2486
|
type: "note";
|
|
2465
|
-
}) | (Pick<PageModel, "
|
|
2487
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2466
2488
|
type: "page";
|
|
2467
2489
|
})> & {
|
|
2468
2490
|
/**
|
|
@@ -2471,11 +2493,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2471
2493
|
raw?: any;
|
|
2472
2494
|
}, ResponseWrapper>;
|
|
2473
2495
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2474
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2496
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2475
2497
|
type: "post";
|
|
2476
2498
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2477
2499
|
type: "note";
|
|
2478
|
-
}) | (Pick<PageModel, "
|
|
2500
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2479
2501
|
type: "page";
|
|
2480
2502
|
})> & {
|
|
2481
2503
|
/**
|
|
@@ -2624,4 +2646,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
2624
2646
|
*/
|
|
2625
2647
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
2626
2648
|
//#endregion
|
|
2627
|
-
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, BookMetadata, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CodeMetadata, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentReplyWindow, CommentState, CommentThreadItem, CommentThreadReplies, Coordinate, Count, 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, Pager, PaginateResult, PostController, type PostListItem, type PostListOptions, PostModel, ProjectController, ProjectModel, 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, TagModel, TextBaseModel, TextBaseModelLexical, TextBaseModelMarkdown, ThirdPartyServiceIntegrationModel, TimelineData, TimelineType, TopicController, TopicModel, TranslationMeta, Url, UrlOptionModel, UserController, UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
|
2649
|
+
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, AnonymousCommentDto, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, BookMetadata, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CodeMetadata, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentReplyWindow, CommentState, CommentThreadItem, CommentThreadReplies, Coordinate, Count, 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, Pager, PaginateResult, PostController, type PostListItem, type PostListOptions, PostModel, 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, TagModel, TextBaseModel, TextBaseModelLexical, TextBaseModelMarkdown, ThirdPartyServiceIntegrationModel, TimelineData, TimelineType, TopicController, TopicModel, TranslationMeta, Url, UrlOptionModel, UserController, UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
|
package/dist/index.mjs
CHANGED
|
@@ -426,14 +426,20 @@ var CommentController = class {
|
|
|
426
426
|
/**
|
|
427
427
|
* 评论
|
|
428
428
|
*/
|
|
429
|
-
|
|
430
|
-
return this.proxy(refId).post({ data });
|
|
429
|
+
guestComment(refId, data) {
|
|
430
|
+
return this.proxy.guest(refId).post({ data });
|
|
431
431
|
}
|
|
432
432
|
/**
|
|
433
433
|
* 回复评论
|
|
434
434
|
*/
|
|
435
|
-
|
|
436
|
-
return this.proxy.reply(commentId).post({ data });
|
|
435
|
+
guestReply(commentId, data) {
|
|
436
|
+
return this.proxy.guest.reply(commentId).post({ data });
|
|
437
|
+
}
|
|
438
|
+
readerComment(refId, data) {
|
|
439
|
+
return this.proxy.reader(refId).post({ data });
|
|
440
|
+
}
|
|
441
|
+
readerReply(commentId, data) {
|
|
442
|
+
return this.proxy.reader.reply(commentId).post({ data });
|
|
437
443
|
}
|
|
438
444
|
};
|
|
439
445
|
|