@mx-space/api-client 3.7.1 → 3.8.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 CHANGED
@@ -491,6 +491,21 @@ var CommentController = class {
491
491
  readerReply(commentId, data) {
492
492
  return this.proxy.reader.reply(commentId).post({ data });
493
493
  }
494
+ /**
495
+ * 取评论图片上传之公开配置(启用状态、限额、MIME 白名单等)
496
+ */
497
+ getUploadConfig() {
498
+ return this.proxy.uploads.config.get();
499
+ }
500
+ /**
501
+ * 已登录读者上传评论图片
502
+ * @param file - 浏览器 File / Blob 或 node 之 Buffer 包装
503
+ */
504
+ uploadImage(file) {
505
+ const form = new FormData();
506
+ form.append("file", file);
507
+ return this.proxy.uploads.post({ data: form });
508
+ }
494
509
  };
495
510
  //#endregion
496
511
  //#region controllers/base.ts
package/dist/index.d.cts CHANGED
@@ -1789,6 +1789,20 @@ interface ReaderCommentDto {
1789
1789
  isWhispers?: boolean;
1790
1790
  }
1791
1791
  type CommentDto = AnonymousCommentDto | ReaderCommentDto;
1792
+ interface CommentUploadConfigDto {
1793
+ enable: boolean;
1794
+ singleFileSizeMB: number;
1795
+ commentImageMaxCount: number;
1796
+ mimeWhitelist: string[];
1797
+ pendingTtlMinutes: number;
1798
+ }
1799
+ interface CommentUploadResultDto {
1800
+ url: string;
1801
+ fileName: string;
1802
+ byteSize: number;
1803
+ mimeType: string;
1804
+ expireAt: string;
1805
+ }
1792
1806
  //#endregion
1793
1807
  //#region controllers/comment.d.ts
1794
1808
  declare module '@mx-space/api-client' {
@@ -1900,6 +1914,29 @@ declare class CommentController<ResponseWrapper> implements IController {
1900
1914
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
1901
1915
  data: CommentModel;
1902
1916
  }>;
1917
+ /**
1918
+ * 取评论图片上传之公开配置(启用状态、限额、MIME 白名单等)
1919
+ */
1920
+ getUploadConfig(): RequestProxyResult<CommentUploadConfigDto, ResponseWrapper, ResponseWrapper extends unknown ? {
1921
+ [key: string]: any;
1922
+ data: CommentUploadConfigDto;
1923
+ } : ResponseWrapper extends {
1924
+ data: CommentUploadConfigDto;
1925
+ } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
1926
+ data: CommentUploadConfigDto;
1927
+ }>;
1928
+ /**
1929
+ * 已登录读者上传评论图片
1930
+ * @param file - 浏览器 File / Blob 或 node 之 Buffer 包装
1931
+ */
1932
+ uploadImage(file: File | Blob): RequestProxyResult<CommentUploadResultDto, ResponseWrapper, ResponseWrapper extends unknown ? {
1933
+ [key: string]: any;
1934
+ data: CommentUploadResultDto;
1935
+ } : ResponseWrapper extends {
1936
+ data: CommentUploadResultDto;
1937
+ } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
1938
+ data: CommentUploadResultDto;
1939
+ }>;
1903
1940
  }
1904
1941
  //#endregion
1905
1942
  //#region controllers/base.d.ts
@@ -2615,35 +2652,35 @@ declare class SearchController<ResponseWrapper> implements IController {
2615
2652
  search(type: 'note', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, 'modified' | 'id' | 'title' | 'created' | 'nid'> & SearchResultHighlight>, ResponseWrapper>>;
2616
2653
  search(type: 'post', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, 'modified' | 'id' | 'title' | 'created' | 'slug' | 'category'> & SearchResultHighlight>, ResponseWrapper>>;
2617
2654
  search(type: 'page', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PageModel, 'modified' | 'id' | 'title' | 'created' | 'slug'> & SearchResultHighlight>, ResponseWrapper>>;
2618
- searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2655
+ searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2619
2656
  type: "post";
2620
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2657
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2621
2658
  type: "note";
2622
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2659
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2623
2660
  type: "page";
2624
2661
  })>, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
2625
2662
  [key: string]: any;
2626
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2663
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2627
2664
  type: "post";
2628
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2665
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2629
2666
  type: "note";
2630
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2667
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2631
2668
  type: "page";
2632
2669
  })>, ResponseWrapper>;
2633
2670
  } : ResponseWrapper extends {
2634
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2671
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2635
2672
  type: "post";
2636
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2673
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2637
2674
  type: "note";
2638
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2675
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2639
2676
  type: "page";
2640
2677
  })>, ResponseWrapper>;
2641
2678
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2642
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2679
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2643
2680
  type: "post";
2644
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2681
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2645
2682
  type: "note";
2646
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2683
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2647
2684
  type: "page";
2648
2685
  })>, ResponseWrapper>;
2649
2686
  }>;
@@ -2787,4 +2824,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
2787
2824
  */
2788
2825
  declare const camelcaseKeys: <T = any>(obj: any) => T;
2789
2826
  //#endregion
2790
- export { AIController, AIDeepReadingModel, AIInsightsModel, AIInsightsStreamEvent, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateSiteInfo, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AnonymousCommentDto, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, BookMetadata, CategoryChildPost, CategoryController, CategoryEntries, CategoryModel$1 as 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, TagDetailPost, TagModel, TextBaseModel, TextBaseModelLexical, TextBaseModelMarkdown, ThirdPartyServiceIntegrationModel, TimelineData, TimelineType, TopicController, TopicModel, TranslationMeta, Url, UrlOptionModel, UserController, UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
2827
+ export { AIController, AIDeepReadingModel, AIInsightsModel, AIInsightsStreamEvent, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateSiteInfo, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AnonymousCommentDto, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, BookMetadata, CategoryChildPost, CategoryController, CategoryEntries, CategoryModel$1 as CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CodeMetadata, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentReplyWindow, CommentState, CommentThreadItem, CommentThreadReplies, CommentUploadConfigDto, CommentUploadResultDto, 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, TagDetailPost, 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
@@ -1789,6 +1789,20 @@ interface ReaderCommentDto {
1789
1789
  isWhispers?: boolean;
1790
1790
  }
1791
1791
  type CommentDto = AnonymousCommentDto | ReaderCommentDto;
1792
+ interface CommentUploadConfigDto {
1793
+ enable: boolean;
1794
+ singleFileSizeMB: number;
1795
+ commentImageMaxCount: number;
1796
+ mimeWhitelist: string[];
1797
+ pendingTtlMinutes: number;
1798
+ }
1799
+ interface CommentUploadResultDto {
1800
+ url: string;
1801
+ fileName: string;
1802
+ byteSize: number;
1803
+ mimeType: string;
1804
+ expireAt: string;
1805
+ }
1792
1806
  //#endregion
1793
1807
  //#region controllers/comment.d.ts
1794
1808
  declare module '@mx-space/api-client' {
@@ -1900,6 +1914,29 @@ declare class CommentController<ResponseWrapper> implements IController {
1900
1914
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
1901
1915
  data: CommentModel;
1902
1916
  }>;
1917
+ /**
1918
+ * 取评论图片上传之公开配置(启用状态、限额、MIME 白名单等)
1919
+ */
1920
+ getUploadConfig(): RequestProxyResult<CommentUploadConfigDto, ResponseWrapper, ResponseWrapper extends unknown ? {
1921
+ [key: string]: any;
1922
+ data: CommentUploadConfigDto;
1923
+ } : ResponseWrapper extends {
1924
+ data: CommentUploadConfigDto;
1925
+ } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
1926
+ data: CommentUploadConfigDto;
1927
+ }>;
1928
+ /**
1929
+ * 已登录读者上传评论图片
1930
+ * @param file - 浏览器 File / Blob 或 node 之 Buffer 包装
1931
+ */
1932
+ uploadImage(file: File | Blob): RequestProxyResult<CommentUploadResultDto, ResponseWrapper, ResponseWrapper extends unknown ? {
1933
+ [key: string]: any;
1934
+ data: CommentUploadResultDto;
1935
+ } : ResponseWrapper extends {
1936
+ data: CommentUploadResultDto;
1937
+ } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
1938
+ data: CommentUploadResultDto;
1939
+ }>;
1903
1940
  }
1904
1941
  //#endregion
1905
1942
  //#region controllers/base.d.ts
@@ -2615,35 +2652,35 @@ declare class SearchController<ResponseWrapper> implements IController {
2615
2652
  search(type: 'note', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, 'modified' | 'id' | 'title' | 'created' | 'nid'> & SearchResultHighlight>, ResponseWrapper>>;
2616
2653
  search(type: 'post', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, 'modified' | 'id' | 'title' | 'created' | 'slug' | 'category'> & SearchResultHighlight>, ResponseWrapper>>;
2617
2654
  search(type: 'page', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PageModel, 'modified' | 'id' | 'title' | 'created' | 'slug'> & SearchResultHighlight>, ResponseWrapper>>;
2618
- searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2655
+ searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2619
2656
  type: "post";
2620
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2657
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2621
2658
  type: "note";
2622
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2659
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2623
2660
  type: "page";
2624
2661
  })>, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
2625
2662
  [key: string]: any;
2626
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2663
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2627
2664
  type: "post";
2628
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2665
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2629
2666
  type: "note";
2630
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2667
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2631
2668
  type: "page";
2632
2669
  })>, ResponseWrapper>;
2633
2670
  } : ResponseWrapper extends {
2634
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2671
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2635
2672
  type: "post";
2636
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2673
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2637
2674
  type: "note";
2638
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2675
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2639
2676
  type: "page";
2640
2677
  })>, ResponseWrapper>;
2641
2678
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2642
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2679
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2643
2680
  type: "post";
2644
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2681
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2645
2682
  type: "note";
2646
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2683
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2647
2684
  type: "page";
2648
2685
  })>, ResponseWrapper>;
2649
2686
  }>;
@@ -2787,4 +2824,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
2787
2824
  */
2788
2825
  declare const camelcaseKeys: <T = any>(obj: any) => T;
2789
2826
  //#endregion
2790
- export { AIController, AIDeepReadingModel, AIInsightsModel, AIInsightsStreamEvent, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateSiteInfo, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AnonymousCommentDto, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, BookMetadata, CategoryChildPost, CategoryController, CategoryEntries, CategoryModel$1 as 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, TagDetailPost, TagModel, TextBaseModel, TextBaseModelLexical, TextBaseModelMarkdown, ThirdPartyServiceIntegrationModel, TimelineData, TimelineType, TopicController, TopicModel, TranslationMeta, Url, UrlOptionModel, UserController, UserModel, allControllerNames, allControllers, createClient, createClient as default, camelcaseKeys as simpleCamelcaseKeys };
2827
+ export { AIController, AIDeepReadingModel, AIInsightsModel, AIInsightsStreamEvent, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateSiteInfo, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost, AnonymousCommentDto, AuthUser, BackupOptionsModel, BaiduSearchOptionsModel, BaseCommentIndexModel, BaseModel, BetterAuthSession, BetterAuthSessionResult, BetterAuthSignInResult, BetterAuthUser, BetterAuthUserRole, BingSearchOptionsModel, BookMetadata, CategoryChildPost, CategoryController, CategoryEntries, CategoryModel$1 as CategoryModel, CategoryType, CategoryWithChildrenModel, CheckLoggedResult, CodeMetadata, CollectionRefTypes, CommentController, CommentDto, CommentModel, CommentOptionsModel, CommentRef, CommentReplyWindow, CommentState, CommentThreadItem, CommentThreadReplies, CommentUploadConfigDto, CommentUploadResultDto, 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, TagDetailPost, 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
@@ -487,6 +487,21 @@ var CommentController = class {
487
487
  readerReply(commentId, data) {
488
488
  return this.proxy.reader.reply(commentId).post({ data });
489
489
  }
490
+ /**
491
+ * 取评论图片上传之公开配置(启用状态、限额、MIME 白名单等)
492
+ */
493
+ getUploadConfig() {
494
+ return this.proxy.uploads.config.get();
495
+ }
496
+ /**
497
+ * 已登录读者上传评论图片
498
+ * @param file - 浏览器 File / Blob 或 node 之 Buffer 包装
499
+ */
500
+ uploadImage(file) {
501
+ const form = new FormData();
502
+ form.append("file", file);
503
+ return this.proxy.uploads.post({ data: form });
504
+ }
490
505
  };
491
506
  //#endregion
492
507
  //#region controllers/base.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/api-client",
3
- "version": "3.7.1",
3
+ "version": "3.8.0",
4
4
  "description": "A api client for mx-space server@next",
5
5
  "type": "module",
6
6
  "engines": {