@mx-space/api-client 2.3.0 → 2.4.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 +10 -4
- package/dist/index.d.cts +38 -17
- package/dist/index.d.mts +38 -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;
|
|
@@ -747,7 +748,6 @@ interface CommentModel extends BaseModel {
|
|
|
747
748
|
deletedAt?: string;
|
|
748
749
|
isWhispers?: boolean;
|
|
749
750
|
location?: string;
|
|
750
|
-
source?: string;
|
|
751
751
|
readerId?: string;
|
|
752
752
|
editedAt?: string;
|
|
753
753
|
}
|
|
@@ -823,7 +823,7 @@ interface ReaderModel {
|
|
|
823
823
|
name: string;
|
|
824
824
|
handle: string;
|
|
825
825
|
image: string;
|
|
826
|
-
|
|
826
|
+
role?: 'reader' | 'owner';
|
|
827
827
|
}
|
|
828
828
|
//#endregion
|
|
829
829
|
//#region models/recently.d.ts
|
|
@@ -1563,7 +1563,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1563
1563
|
name: string;
|
|
1564
1564
|
created: string;
|
|
1565
1565
|
id: string;
|
|
1566
|
-
children: Pick<PostModel, "
|
|
1566
|
+
children: Pick<PostModel, "slug" | "id" | "created" | "title" | "modified">[];
|
|
1567
1567
|
} : T_1 : never : never;
|
|
1568
1568
|
} : ResponseWrapper;
|
|
1569
1569
|
$request: {
|
|
@@ -1615,7 +1615,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1615
1615
|
};
|
|
1616
1616
|
}) ? T_1 extends unknown ? {
|
|
1617
1617
|
tag: string;
|
|
1618
|
-
data: Pick<PostModel, "category" | "
|
|
1618
|
+
data: Pick<PostModel, "category" | "slug" | "id" | "created" | "title">[];
|
|
1619
1619
|
} : T_1 : never : never;
|
|
1620
1620
|
} : ResponseWrapper;
|
|
1621
1621
|
$request: {
|
|
@@ -1637,14 +1637,19 @@ interface PaginationParams {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
//#endregion
|
|
1639
1639
|
//#region dtos/comment.d.ts
|
|
1640
|
-
interface
|
|
1640
|
+
interface AnonymousCommentDto {
|
|
1641
1641
|
author: string;
|
|
1642
1642
|
text: string;
|
|
1643
1643
|
mail: string;
|
|
1644
1644
|
url?: string;
|
|
1645
|
-
source?: 'github' | 'google';
|
|
1646
1645
|
avatar?: string;
|
|
1646
|
+
isWhispers?: boolean;
|
|
1647
|
+
}
|
|
1648
|
+
interface ReaderCommentDto {
|
|
1649
|
+
text: string;
|
|
1650
|
+
isWhispers?: boolean;
|
|
1647
1651
|
}
|
|
1652
|
+
type CommentDto = AnonymousCommentDto | ReaderCommentDto;
|
|
1648
1653
|
//#endregion
|
|
1649
1654
|
//#region controllers/comment.d.ts
|
|
1650
1655
|
declare module '@mx-space/api-client' {
|
|
@@ -1718,7 +1723,7 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1718
1723
|
/**
|
|
1719
1724
|
* 评论
|
|
1720
1725
|
*/
|
|
1721
|
-
|
|
1726
|
+
guestComment(refId: string, data: AnonymousCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1722
1727
|
[key: string]: any;
|
|
1723
1728
|
data: CommentModel;
|
|
1724
1729
|
} : ResponseWrapper extends {
|
|
@@ -1729,7 +1734,23 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1729
1734
|
/**
|
|
1730
1735
|
* 回复评论
|
|
1731
1736
|
*/
|
|
1732
|
-
|
|
1737
|
+
guestReply(commentId: string, data: AnonymousCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1738
|
+
[key: string]: any;
|
|
1739
|
+
data: CommentModel;
|
|
1740
|
+
} : ResponseWrapper extends {
|
|
1741
|
+
data: CommentModel;
|
|
1742
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1743
|
+
data: CommentModel;
|
|
1744
|
+
}>;
|
|
1745
|
+
readerComment(refId: string, data: ReaderCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1746
|
+
[key: string]: any;
|
|
1747
|
+
data: CommentModel;
|
|
1748
|
+
} : ResponseWrapper extends {
|
|
1749
|
+
data: CommentModel;
|
|
1750
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1751
|
+
data: CommentModel;
|
|
1752
|
+
}>;
|
|
1753
|
+
readerReply(commentId: string, data: ReaderCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1733
1754
|
[key: string]: any;
|
|
1734
1755
|
data: CommentModel;
|
|
1735
1756
|
} : ResponseWrapper extends {
|
|
@@ -2432,11 +2453,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2432
2453
|
* @param options
|
|
2433
2454
|
* @returns
|
|
2434
2455
|
*/
|
|
2435
|
-
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2456
|
+
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2436
2457
|
type: "post";
|
|
2437
2458
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2438
2459
|
type: "note";
|
|
2439
|
-
}) | (Pick<PageModel, "
|
|
2460
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2440
2461
|
type: "page";
|
|
2441
2462
|
})> & {
|
|
2442
2463
|
/**
|
|
@@ -2445,11 +2466,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2445
2466
|
raw?: any;
|
|
2446
2467
|
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2447
2468
|
[key: string]: any;
|
|
2448
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2469
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2449
2470
|
type: "post";
|
|
2450
2471
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2451
2472
|
type: "note";
|
|
2452
|
-
}) | (Pick<PageModel, "
|
|
2473
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2453
2474
|
type: "page";
|
|
2454
2475
|
})> & {
|
|
2455
2476
|
/**
|
|
@@ -2458,11 +2479,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2458
2479
|
raw?: any;
|
|
2459
2480
|
}, ResponseWrapper>;
|
|
2460
2481
|
} : ResponseWrapper extends {
|
|
2461
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2482
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2462
2483
|
type: "post";
|
|
2463
2484
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2464
2485
|
type: "note";
|
|
2465
|
-
}) | (Pick<PageModel, "
|
|
2486
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2466
2487
|
type: "page";
|
|
2467
2488
|
})> & {
|
|
2468
2489
|
/**
|
|
@@ -2471,11 +2492,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2471
2492
|
raw?: any;
|
|
2472
2493
|
}, ResponseWrapper>;
|
|
2473
2494
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2474
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2495
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2475
2496
|
type: "post";
|
|
2476
2497
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2477
2498
|
type: "note";
|
|
2478
|
-
}) | (Pick<PageModel, "
|
|
2499
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2479
2500
|
type: "page";
|
|
2480
2501
|
})> & {
|
|
2481
2502
|
/**
|
|
@@ -2624,4 +2645,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
2624
2645
|
*/
|
|
2625
2646
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
2626
2647
|
//#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 };
|
|
2648
|
+
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;
|
|
@@ -747,7 +748,6 @@ interface CommentModel extends BaseModel {
|
|
|
747
748
|
deletedAt?: string;
|
|
748
749
|
isWhispers?: boolean;
|
|
749
750
|
location?: string;
|
|
750
|
-
source?: string;
|
|
751
751
|
readerId?: string;
|
|
752
752
|
editedAt?: string;
|
|
753
753
|
}
|
|
@@ -823,7 +823,7 @@ interface ReaderModel {
|
|
|
823
823
|
name: string;
|
|
824
824
|
handle: string;
|
|
825
825
|
image: string;
|
|
826
|
-
|
|
826
|
+
role?: 'reader' | 'owner';
|
|
827
827
|
}
|
|
828
828
|
//#endregion
|
|
829
829
|
//#region models/recently.d.ts
|
|
@@ -1563,7 +1563,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1563
1563
|
name: string;
|
|
1564
1564
|
created: string;
|
|
1565
1565
|
id: string;
|
|
1566
|
-
children: Pick<PostModel, "
|
|
1566
|
+
children: Pick<PostModel, "slug" | "id" | "created" | "title" | "modified">[];
|
|
1567
1567
|
} : T_1 : never : never;
|
|
1568
1568
|
} : ResponseWrapper;
|
|
1569
1569
|
$request: {
|
|
@@ -1615,7 +1615,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1615
1615
|
};
|
|
1616
1616
|
}) ? T_1 extends unknown ? {
|
|
1617
1617
|
tag: string;
|
|
1618
|
-
data: Pick<PostModel, "category" | "
|
|
1618
|
+
data: Pick<PostModel, "category" | "slug" | "id" | "created" | "title">[];
|
|
1619
1619
|
} : T_1 : never : never;
|
|
1620
1620
|
} : ResponseWrapper;
|
|
1621
1621
|
$request: {
|
|
@@ -1637,14 +1637,19 @@ interface PaginationParams {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
//#endregion
|
|
1639
1639
|
//#region dtos/comment.d.ts
|
|
1640
|
-
interface
|
|
1640
|
+
interface AnonymousCommentDto {
|
|
1641
1641
|
author: string;
|
|
1642
1642
|
text: string;
|
|
1643
1643
|
mail: string;
|
|
1644
1644
|
url?: string;
|
|
1645
|
-
source?: 'github' | 'google';
|
|
1646
1645
|
avatar?: string;
|
|
1646
|
+
isWhispers?: boolean;
|
|
1647
|
+
}
|
|
1648
|
+
interface ReaderCommentDto {
|
|
1649
|
+
text: string;
|
|
1650
|
+
isWhispers?: boolean;
|
|
1647
1651
|
}
|
|
1652
|
+
type CommentDto = AnonymousCommentDto | ReaderCommentDto;
|
|
1648
1653
|
//#endregion
|
|
1649
1654
|
//#region controllers/comment.d.ts
|
|
1650
1655
|
declare module '@mx-space/api-client' {
|
|
@@ -1718,7 +1723,7 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1718
1723
|
/**
|
|
1719
1724
|
* 评论
|
|
1720
1725
|
*/
|
|
1721
|
-
|
|
1726
|
+
guestComment(refId: string, data: AnonymousCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1722
1727
|
[key: string]: any;
|
|
1723
1728
|
data: CommentModel;
|
|
1724
1729
|
} : ResponseWrapper extends {
|
|
@@ -1729,7 +1734,23 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1729
1734
|
/**
|
|
1730
1735
|
* 回复评论
|
|
1731
1736
|
*/
|
|
1732
|
-
|
|
1737
|
+
guestReply(commentId: string, data: AnonymousCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1738
|
+
[key: string]: any;
|
|
1739
|
+
data: CommentModel;
|
|
1740
|
+
} : ResponseWrapper extends {
|
|
1741
|
+
data: CommentModel;
|
|
1742
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1743
|
+
data: CommentModel;
|
|
1744
|
+
}>;
|
|
1745
|
+
readerComment(refId: string, data: ReaderCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1746
|
+
[key: string]: any;
|
|
1747
|
+
data: CommentModel;
|
|
1748
|
+
} : ResponseWrapper extends {
|
|
1749
|
+
data: CommentModel;
|
|
1750
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1751
|
+
data: CommentModel;
|
|
1752
|
+
}>;
|
|
1753
|
+
readerReply(commentId: string, data: ReaderCommentDto): RequestProxyResult<CommentModel, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1733
1754
|
[key: string]: any;
|
|
1734
1755
|
data: CommentModel;
|
|
1735
1756
|
} : ResponseWrapper extends {
|
|
@@ -2432,11 +2453,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2432
2453
|
* @param options
|
|
2433
2454
|
* @returns
|
|
2434
2455
|
*/
|
|
2435
|
-
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2456
|
+
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2436
2457
|
type: "post";
|
|
2437
2458
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2438
2459
|
type: "note";
|
|
2439
|
-
}) | (Pick<PageModel, "
|
|
2460
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2440
2461
|
type: "page";
|
|
2441
2462
|
})> & {
|
|
2442
2463
|
/**
|
|
@@ -2445,11 +2466,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2445
2466
|
raw?: any;
|
|
2446
2467
|
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2447
2468
|
[key: string]: any;
|
|
2448
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2469
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2449
2470
|
type: "post";
|
|
2450
2471
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2451
2472
|
type: "note";
|
|
2452
|
-
}) | (Pick<PageModel, "
|
|
2473
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2453
2474
|
type: "page";
|
|
2454
2475
|
})> & {
|
|
2455
2476
|
/**
|
|
@@ -2458,11 +2479,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2458
2479
|
raw?: any;
|
|
2459
2480
|
}, ResponseWrapper>;
|
|
2460
2481
|
} : ResponseWrapper extends {
|
|
2461
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2482
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2462
2483
|
type: "post";
|
|
2463
2484
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2464
2485
|
type: "note";
|
|
2465
|
-
}) | (Pick<PageModel, "
|
|
2486
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2466
2487
|
type: "page";
|
|
2467
2488
|
})> & {
|
|
2468
2489
|
/**
|
|
@@ -2471,11 +2492,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2471
2492
|
raw?: any;
|
|
2472
2493
|
}, ResponseWrapper>;
|
|
2473
2494
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2474
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "
|
|
2495
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2475
2496
|
type: "post";
|
|
2476
2497
|
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2477
2498
|
type: "note";
|
|
2478
|
-
}) | (Pick<PageModel, "
|
|
2499
|
+
}) | (Pick<PageModel, "slug" | "id" | "created" | "title" | "modified"> & {
|
|
2479
2500
|
type: "page";
|
|
2480
2501
|
})> & {
|
|
2481
2502
|
/**
|
|
@@ -2624,4 +2645,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
2624
2645
|
*/
|
|
2625
2646
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
2626
2647
|
//#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 };
|
|
2648
|
+
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
|
|