@mx-space/api-client 2.1.2 → 2.2.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 +7 -2
- package/dist/index.d.cts +56 -24
- package/dist/index.d.mts +56 -24
- package/dist/index.mjs +7 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -422,6 +422,9 @@ var CommentController = class {
|
|
|
422
422
|
size: size || 10
|
|
423
423
|
} });
|
|
424
424
|
}
|
|
425
|
+
getThreadReplies(rootCommentId, params = {}) {
|
|
426
|
+
return this.proxy.thread(rootCommentId).get({ params });
|
|
427
|
+
}
|
|
425
428
|
/**
|
|
426
429
|
* 评论
|
|
427
430
|
*/
|
|
@@ -538,14 +541,16 @@ var NoteController = class {
|
|
|
538
541
|
* 日记列表分页
|
|
539
542
|
*/
|
|
540
543
|
getList(page = 1, perPage = 10, options = {}) {
|
|
541
|
-
const { select, sortBy, sortOrder, year } = options;
|
|
544
|
+
const { select, sortBy, sortOrder, year, lang, withSummary } = options;
|
|
542
545
|
return this.proxy.get({ params: {
|
|
543
546
|
page,
|
|
544
547
|
size: perPage,
|
|
545
548
|
select: select?.join(" "),
|
|
546
549
|
sortBy,
|
|
547
550
|
sortOrder,
|
|
548
|
-
year
|
|
551
|
+
year,
|
|
552
|
+
lang,
|
|
553
|
+
withSummary: withSummary ? "1" : void 0
|
|
549
554
|
} });
|
|
550
555
|
}
|
|
551
556
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -731,24 +731,44 @@ interface CommentModel extends BaseModel {
|
|
|
731
731
|
refType: CollectionRefTypes;
|
|
732
732
|
ref: string;
|
|
733
733
|
state: number;
|
|
734
|
-
commentsIndex: number;
|
|
735
734
|
author: string;
|
|
736
735
|
text: string;
|
|
737
736
|
mail?: string;
|
|
738
737
|
url?: string;
|
|
739
738
|
ip?: string;
|
|
740
739
|
agent?: string;
|
|
741
|
-
key: string;
|
|
742
740
|
pin?: boolean;
|
|
743
741
|
avatar: string;
|
|
744
|
-
|
|
745
|
-
|
|
742
|
+
parentCommentId?: string | null;
|
|
743
|
+
rootCommentId?: string | null;
|
|
744
|
+
replyCount?: number;
|
|
745
|
+
latestReplyAt?: string | null;
|
|
746
|
+
isDeleted?: boolean;
|
|
747
|
+
deletedAt?: string;
|
|
746
748
|
isWhispers?: boolean;
|
|
747
749
|
location?: string;
|
|
748
750
|
source?: string;
|
|
749
751
|
readerId?: string;
|
|
750
752
|
editedAt?: string;
|
|
751
753
|
}
|
|
754
|
+
interface CommentReplyWindow {
|
|
755
|
+
total: number;
|
|
756
|
+
returned: number;
|
|
757
|
+
threshold: number;
|
|
758
|
+
hasHidden: boolean;
|
|
759
|
+
hiddenCount: number;
|
|
760
|
+
nextCursor?: string;
|
|
761
|
+
}
|
|
762
|
+
interface CommentThreadItem extends CommentModel {
|
|
763
|
+
replies: CommentModel[];
|
|
764
|
+
replyWindow: CommentReplyWindow;
|
|
765
|
+
}
|
|
766
|
+
interface CommentThreadReplies {
|
|
767
|
+
replies: CommentModel[];
|
|
768
|
+
nextCursor?: string;
|
|
769
|
+
remaining: number;
|
|
770
|
+
done: boolean;
|
|
771
|
+
}
|
|
752
772
|
interface CommentRef {
|
|
753
773
|
id: string;
|
|
754
774
|
categoryId?: string;
|
|
@@ -1477,7 +1497,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1477
1497
|
name: string;
|
|
1478
1498
|
created: string;
|
|
1479
1499
|
id: string;
|
|
1480
|
-
children: Pick<PostModel, "id" | "
|
|
1500
|
+
children: Pick<PostModel, "id" | "created" | "title" | "slug" | "modified">[];
|
|
1481
1501
|
} : T_1 : never : never;
|
|
1482
1502
|
} : ResponseWrapper;
|
|
1483
1503
|
$request: {
|
|
@@ -1529,7 +1549,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1529
1549
|
};
|
|
1530
1550
|
}) ? T_1 extends unknown ? {
|
|
1531
1551
|
tag: string;
|
|
1532
|
-
data: Pick<PostModel, "category" | "id" | "
|
|
1552
|
+
data: Pick<PostModel, "category" | "id" | "created" | "title" | "slug">[];
|
|
1533
1553
|
} : T_1 : never : never;
|
|
1534
1554
|
} : ResponseWrapper;
|
|
1535
1555
|
$request: {
|
|
@@ -1595,30 +1615,40 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1595
1615
|
* 获取文章的评论列表
|
|
1596
1616
|
* @param refId 文章 Id
|
|
1597
1617
|
*/
|
|
1598
|
-
getByRefId(refId: string, pagination?: PaginationParams): RequestProxyResult<PaginateResult<
|
|
1618
|
+
getByRefId(refId: string, pagination?: PaginationParams): RequestProxyResult<PaginateResult<CommentThreadItem & {
|
|
1599
1619
|
ref: string;
|
|
1600
1620
|
}> & {
|
|
1601
1621
|
readers: Record<string, ReaderModel>;
|
|
1602
1622
|
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1603
1623
|
[key: string]: any;
|
|
1604
|
-
data: PaginateResult<
|
|
1624
|
+
data: PaginateResult<CommentThreadItem & {
|
|
1605
1625
|
ref: string;
|
|
1606
1626
|
}> & {
|
|
1607
1627
|
readers: Record<string, ReaderModel>;
|
|
1608
1628
|
};
|
|
1609
1629
|
} : ResponseWrapper extends {
|
|
1610
|
-
data: PaginateResult<
|
|
1630
|
+
data: PaginateResult<CommentThreadItem & {
|
|
1611
1631
|
ref: string;
|
|
1612
1632
|
}> & {
|
|
1613
1633
|
readers: Record<string, ReaderModel>;
|
|
1614
1634
|
};
|
|
1615
1635
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1616
|
-
data: PaginateResult<
|
|
1636
|
+
data: PaginateResult<CommentThreadItem & {
|
|
1617
1637
|
ref: string;
|
|
1618
1638
|
}> & {
|
|
1619
1639
|
readers: Record<string, ReaderModel>;
|
|
1620
1640
|
};
|
|
1621
1641
|
}>;
|
|
1642
|
+
getThreadReplies(rootCommentId: string, params?: PaginationParams & {
|
|
1643
|
+
cursor?: string;
|
|
1644
|
+
}): RequestProxyResult<CommentThreadReplies, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1645
|
+
[key: string]: any;
|
|
1646
|
+
data: CommentThreadReplies;
|
|
1647
|
+
} : ResponseWrapper extends {
|
|
1648
|
+
data: CommentThreadReplies;
|
|
1649
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1650
|
+
data: CommentThreadReplies;
|
|
1651
|
+
}>;
|
|
1622
1652
|
/**
|
|
1623
1653
|
* 评论
|
|
1624
1654
|
*/
|
|
@@ -1714,6 +1744,8 @@ type NoteListOptions = {
|
|
|
1714
1744
|
year?: number;
|
|
1715
1745
|
sortBy?: 'weather' | 'mood' | 'title' | 'created' | 'modified';
|
|
1716
1746
|
sortOrder?: 1 | -1;
|
|
1747
|
+
lang?: string;
|
|
1748
|
+
withSummary?: boolean;
|
|
1717
1749
|
};
|
|
1718
1750
|
type NoteByNidOptions = {
|
|
1719
1751
|
password?: string;
|
|
@@ -1728,7 +1760,7 @@ type NoteMiddleListOptions = {
|
|
|
1728
1760
|
type NoteTopicListOptions = SortOptions & {
|
|
1729
1761
|
lang?: string;
|
|
1730
1762
|
};
|
|
1731
|
-
type NoteTimelineItem = Pick<NoteModel, 'id' | 'title' | 'nid' | 'created' | 'isPublished'> & {
|
|
1763
|
+
type NoteTimelineItem = Pick<NoteModel, 'id' | 'title' | 'nid' | 'slug' | 'created' | 'isPublished'> & {
|
|
1732
1764
|
isTranslated?: boolean;
|
|
1733
1765
|
translationMeta?: TranslationMeta;
|
|
1734
1766
|
};
|
|
@@ -2334,11 +2366,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2334
2366
|
* @param options
|
|
2335
2367
|
* @returns
|
|
2336
2368
|
*/
|
|
2337
|
-
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2369
|
+
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2338
2370
|
type: "post";
|
|
2339
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2371
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2340
2372
|
type: "note";
|
|
2341
|
-
}) | (Pick<PageModel, "id" | "
|
|
2373
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2342
2374
|
type: "page";
|
|
2343
2375
|
})> & {
|
|
2344
2376
|
/**
|
|
@@ -2347,11 +2379,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2347
2379
|
raw?: any;
|
|
2348
2380
|
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2349
2381
|
[key: string]: any;
|
|
2350
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2382
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2351
2383
|
type: "post";
|
|
2352
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2384
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2353
2385
|
type: "note";
|
|
2354
|
-
}) | (Pick<PageModel, "id" | "
|
|
2386
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2355
2387
|
type: "page";
|
|
2356
2388
|
})> & {
|
|
2357
2389
|
/**
|
|
@@ -2360,11 +2392,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2360
2392
|
raw?: any;
|
|
2361
2393
|
}, ResponseWrapper>;
|
|
2362
2394
|
} : ResponseWrapper extends {
|
|
2363
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2395
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2364
2396
|
type: "post";
|
|
2365
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2397
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2366
2398
|
type: "note";
|
|
2367
|
-
}) | (Pick<PageModel, "id" | "
|
|
2399
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2368
2400
|
type: "page";
|
|
2369
2401
|
})> & {
|
|
2370
2402
|
/**
|
|
@@ -2373,11 +2405,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2373
2405
|
raw?: any;
|
|
2374
2406
|
}, ResponseWrapper>;
|
|
2375
2407
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2376
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2408
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2377
2409
|
type: "post";
|
|
2378
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2410
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2379
2411
|
type: "note";
|
|
2380
|
-
}) | (Pick<PageModel, "id" | "
|
|
2412
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2381
2413
|
type: "page";
|
|
2382
2414
|
})> & {
|
|
2383
2415
|
/**
|
|
@@ -2526,4 +2558,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
2526
2558
|
*/
|
|
2527
2559
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
2528
2560
|
//#endregion
|
|
2529
|
-
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentState, Coordinate, Count, EnumPageType, type HTTPClient, IConfig, IConfigKeys, type IRequestAdapter, Image, LastYearPublication, LatestCombinedItem, LatestData, LatestNoteItem, LatestPostItem, LinkController, LinkModel, LinkState, LinkType, MailOptionsModel, ModelWithLiked, ModelWithTranslation, 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, RecentlyModel, RecentlyRefType, RecentlyRefTypes, 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 };
|
|
2561
|
+
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentReplyWindow, CommentState, CommentThreadItem, CommentThreadReplies, Coordinate, Count, EnumPageType, type HTTPClient, IConfig, IConfigKeys, type IRequestAdapter, Image, LastYearPublication, LatestCombinedItem, LatestData, LatestNoteItem, LatestPostItem, LinkController, LinkModel, LinkState, LinkType, MailOptionsModel, ModelWithLiked, ModelWithTranslation, 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, RecentlyModel, RecentlyRefType, RecentlyRefTypes, 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
|
@@ -731,24 +731,44 @@ interface CommentModel extends BaseModel {
|
|
|
731
731
|
refType: CollectionRefTypes;
|
|
732
732
|
ref: string;
|
|
733
733
|
state: number;
|
|
734
|
-
commentsIndex: number;
|
|
735
734
|
author: string;
|
|
736
735
|
text: string;
|
|
737
736
|
mail?: string;
|
|
738
737
|
url?: string;
|
|
739
738
|
ip?: string;
|
|
740
739
|
agent?: string;
|
|
741
|
-
key: string;
|
|
742
740
|
pin?: boolean;
|
|
743
741
|
avatar: string;
|
|
744
|
-
|
|
745
|
-
|
|
742
|
+
parentCommentId?: string | null;
|
|
743
|
+
rootCommentId?: string | null;
|
|
744
|
+
replyCount?: number;
|
|
745
|
+
latestReplyAt?: string | null;
|
|
746
|
+
isDeleted?: boolean;
|
|
747
|
+
deletedAt?: string;
|
|
746
748
|
isWhispers?: boolean;
|
|
747
749
|
location?: string;
|
|
748
750
|
source?: string;
|
|
749
751
|
readerId?: string;
|
|
750
752
|
editedAt?: string;
|
|
751
753
|
}
|
|
754
|
+
interface CommentReplyWindow {
|
|
755
|
+
total: number;
|
|
756
|
+
returned: number;
|
|
757
|
+
threshold: number;
|
|
758
|
+
hasHidden: boolean;
|
|
759
|
+
hiddenCount: number;
|
|
760
|
+
nextCursor?: string;
|
|
761
|
+
}
|
|
762
|
+
interface CommentThreadItem extends CommentModel {
|
|
763
|
+
replies: CommentModel[];
|
|
764
|
+
replyWindow: CommentReplyWindow;
|
|
765
|
+
}
|
|
766
|
+
interface CommentThreadReplies {
|
|
767
|
+
replies: CommentModel[];
|
|
768
|
+
nextCursor?: string;
|
|
769
|
+
remaining: number;
|
|
770
|
+
done: boolean;
|
|
771
|
+
}
|
|
752
772
|
interface CommentRef {
|
|
753
773
|
id: string;
|
|
754
774
|
categoryId?: string;
|
|
@@ -1477,7 +1497,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1477
1497
|
name: string;
|
|
1478
1498
|
created: string;
|
|
1479
1499
|
id: string;
|
|
1480
|
-
children: Pick<PostModel, "id" | "
|
|
1500
|
+
children: Pick<PostModel, "id" | "created" | "title" | "slug" | "modified">[];
|
|
1481
1501
|
} : T_1 : never : never;
|
|
1482
1502
|
} : ResponseWrapper;
|
|
1483
1503
|
$request: {
|
|
@@ -1529,7 +1549,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1529
1549
|
};
|
|
1530
1550
|
}) ? T_1 extends unknown ? {
|
|
1531
1551
|
tag: string;
|
|
1532
|
-
data: Pick<PostModel, "category" | "id" | "
|
|
1552
|
+
data: Pick<PostModel, "category" | "id" | "created" | "title" | "slug">[];
|
|
1533
1553
|
} : T_1 : never : never;
|
|
1534
1554
|
} : ResponseWrapper;
|
|
1535
1555
|
$request: {
|
|
@@ -1595,30 +1615,40 @@ declare class CommentController<ResponseWrapper> implements IController {
|
|
|
1595
1615
|
* 获取文章的评论列表
|
|
1596
1616
|
* @param refId 文章 Id
|
|
1597
1617
|
*/
|
|
1598
|
-
getByRefId(refId: string, pagination?: PaginationParams): RequestProxyResult<PaginateResult<
|
|
1618
|
+
getByRefId(refId: string, pagination?: PaginationParams): RequestProxyResult<PaginateResult<CommentThreadItem & {
|
|
1599
1619
|
ref: string;
|
|
1600
1620
|
}> & {
|
|
1601
1621
|
readers: Record<string, ReaderModel>;
|
|
1602
1622
|
}, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1603
1623
|
[key: string]: any;
|
|
1604
|
-
data: PaginateResult<
|
|
1624
|
+
data: PaginateResult<CommentThreadItem & {
|
|
1605
1625
|
ref: string;
|
|
1606
1626
|
}> & {
|
|
1607
1627
|
readers: Record<string, ReaderModel>;
|
|
1608
1628
|
};
|
|
1609
1629
|
} : ResponseWrapper extends {
|
|
1610
|
-
data: PaginateResult<
|
|
1630
|
+
data: PaginateResult<CommentThreadItem & {
|
|
1611
1631
|
ref: string;
|
|
1612
1632
|
}> & {
|
|
1613
1633
|
readers: Record<string, ReaderModel>;
|
|
1614
1634
|
};
|
|
1615
1635
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1616
|
-
data: PaginateResult<
|
|
1636
|
+
data: PaginateResult<CommentThreadItem & {
|
|
1617
1637
|
ref: string;
|
|
1618
1638
|
}> & {
|
|
1619
1639
|
readers: Record<string, ReaderModel>;
|
|
1620
1640
|
};
|
|
1621
1641
|
}>;
|
|
1642
|
+
getThreadReplies(rootCommentId: string, params?: PaginationParams & {
|
|
1643
|
+
cursor?: string;
|
|
1644
|
+
}): RequestProxyResult<CommentThreadReplies, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
1645
|
+
[key: string]: any;
|
|
1646
|
+
data: CommentThreadReplies;
|
|
1647
|
+
} : ResponseWrapper extends {
|
|
1648
|
+
data: CommentThreadReplies;
|
|
1649
|
+
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
1650
|
+
data: CommentThreadReplies;
|
|
1651
|
+
}>;
|
|
1622
1652
|
/**
|
|
1623
1653
|
* 评论
|
|
1624
1654
|
*/
|
|
@@ -1714,6 +1744,8 @@ type NoteListOptions = {
|
|
|
1714
1744
|
year?: number;
|
|
1715
1745
|
sortBy?: 'weather' | 'mood' | 'title' | 'created' | 'modified';
|
|
1716
1746
|
sortOrder?: 1 | -1;
|
|
1747
|
+
lang?: string;
|
|
1748
|
+
withSummary?: boolean;
|
|
1717
1749
|
};
|
|
1718
1750
|
type NoteByNidOptions = {
|
|
1719
1751
|
password?: string;
|
|
@@ -1728,7 +1760,7 @@ type NoteMiddleListOptions = {
|
|
|
1728
1760
|
type NoteTopicListOptions = SortOptions & {
|
|
1729
1761
|
lang?: string;
|
|
1730
1762
|
};
|
|
1731
|
-
type NoteTimelineItem = Pick<NoteModel, 'id' | 'title' | 'nid' | 'created' | 'isPublished'> & {
|
|
1763
|
+
type NoteTimelineItem = Pick<NoteModel, 'id' | 'title' | 'nid' | 'slug' | 'created' | 'isPublished'> & {
|
|
1732
1764
|
isTranslated?: boolean;
|
|
1733
1765
|
translationMeta?: TranslationMeta;
|
|
1734
1766
|
};
|
|
@@ -2334,11 +2366,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2334
2366
|
* @param options
|
|
2335
2367
|
* @returns
|
|
2336
2368
|
*/
|
|
2337
|
-
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2369
|
+
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2338
2370
|
type: "post";
|
|
2339
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2371
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2340
2372
|
type: "note";
|
|
2341
|
-
}) | (Pick<PageModel, "id" | "
|
|
2373
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2342
2374
|
type: "page";
|
|
2343
2375
|
})> & {
|
|
2344
2376
|
/**
|
|
@@ -2347,11 +2379,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2347
2379
|
raw?: any;
|
|
2348
2380
|
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2349
2381
|
[key: string]: any;
|
|
2350
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2382
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2351
2383
|
type: "post";
|
|
2352
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2384
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2353
2385
|
type: "note";
|
|
2354
|
-
}) | (Pick<PageModel, "id" | "
|
|
2386
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2355
2387
|
type: "page";
|
|
2356
2388
|
})> & {
|
|
2357
2389
|
/**
|
|
@@ -2360,11 +2392,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2360
2392
|
raw?: any;
|
|
2361
2393
|
}, ResponseWrapper>;
|
|
2362
2394
|
} : ResponseWrapper extends {
|
|
2363
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2395
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2364
2396
|
type: "post";
|
|
2365
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2397
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2366
2398
|
type: "note";
|
|
2367
|
-
}) | (Pick<PageModel, "id" | "
|
|
2399
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2368
2400
|
type: "page";
|
|
2369
2401
|
})> & {
|
|
2370
2402
|
/**
|
|
@@ -2373,11 +2405,11 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2373
2405
|
raw?: any;
|
|
2374
2406
|
}, ResponseWrapper>;
|
|
2375
2407
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2376
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2408
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2377
2409
|
type: "post";
|
|
2378
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2410
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & {
|
|
2379
2411
|
type: "note";
|
|
2380
|
-
}) | (Pick<PageModel, "id" | "
|
|
2412
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & {
|
|
2381
2413
|
type: "page";
|
|
2382
2414
|
})> & {
|
|
2383
2415
|
/**
|
|
@@ -2526,4 +2558,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
2526
2558
|
*/
|
|
2527
2559
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
2528
2560
|
//#endregion
|
|
2529
|
-
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentState, Coordinate, Count, EnumPageType, type HTTPClient, IConfig, IConfigKeys, type IRequestAdapter, Image, LastYearPublication, LatestCombinedItem, LatestData, LatestNoteItem, LatestPostItem, LinkController, LinkModel, LinkState, LinkType, MailOptionsModel, ModelWithLiked, ModelWithTranslation, 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, RecentlyModel, RecentlyRefType, RecentlyRefTypes, 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 };
|
|
2561
|
+
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AlgoliaSearchOptionsModel, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, CategoryController, CategoryEntries, CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentReplyWindow, CommentState, CommentThreadItem, CommentThreadReplies, Coordinate, Count, EnumPageType, type HTTPClient, IConfig, IConfigKeys, type IRequestAdapter, Image, LastYearPublication, LatestCombinedItem, LatestData, LatestNoteItem, LatestPostItem, LinkController, LinkModel, LinkState, LinkType, MailOptionsModel, ModelWithLiked, ModelWithTranslation, 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, RecentlyModel, RecentlyRefType, RecentlyRefTypes, 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
|
@@ -420,6 +420,9 @@ var CommentController = class {
|
|
|
420
420
|
size: size || 10
|
|
421
421
|
} });
|
|
422
422
|
}
|
|
423
|
+
getThreadReplies(rootCommentId, params = {}) {
|
|
424
|
+
return this.proxy.thread(rootCommentId).get({ params });
|
|
425
|
+
}
|
|
423
426
|
/**
|
|
424
427
|
* 评论
|
|
425
428
|
*/
|
|
@@ -536,14 +539,16 @@ var NoteController = class {
|
|
|
536
539
|
* 日记列表分页
|
|
537
540
|
*/
|
|
538
541
|
getList(page = 1, perPage = 10, options = {}) {
|
|
539
|
-
const { select, sortBy, sortOrder, year } = options;
|
|
542
|
+
const { select, sortBy, sortOrder, year, lang, withSummary } = options;
|
|
540
543
|
return this.proxy.get({ params: {
|
|
541
544
|
page,
|
|
542
545
|
size: perPage,
|
|
543
546
|
select: select?.join(" "),
|
|
544
547
|
sortBy,
|
|
545
548
|
sortOrder,
|
|
546
|
-
year
|
|
549
|
+
year,
|
|
550
|
+
lang,
|
|
551
|
+
withSummary: withSummary ? "1" : void 0
|
|
547
552
|
} });
|
|
548
553
|
}
|
|
549
554
|
/**
|