@mx-space/api-client 2.4.2 → 3.1.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
@@ -187,6 +187,9 @@ var AggregateController = class {
187
187
  getAggregateData(theme) {
188
188
  return this.proxy.get({ params: { theme } });
189
189
  }
190
+ getSiteMetadata() {
191
+ return this.proxy.site.get();
192
+ }
190
193
  /**
191
194
  * 获取最新发布的内容
192
195
  */
@@ -856,15 +859,8 @@ var SearchController = class {
856
859
  ...options
857
860
  } });
858
861
  }
859
- /**
860
- * algolya 搜索
861
- * https://www.algolia.com/doc/api-reference/api-methods/search/
862
- * @param keyword
863
- * @param options
864
- * @returns
865
- */
866
- searchByAlgolia(keyword, options) {
867
- return this.proxy("algolia").get({ params: {
862
+ searchAll(keyword, options) {
863
+ return this.proxy.get({ params: {
868
864
  keyword,
869
865
  ...options
870
866
  } });
package/dist/index.d.cts CHANGED
@@ -207,7 +207,7 @@ type PostModel = TextBaseModel & {
207
207
  slug: string;
208
208
  categoryId: string;
209
209
  images: Image[];
210
- category: CategoryModel;
210
+ category: CategoryModel$1;
211
211
  pin?: string | null;
212
212
  pinOrder?: number;
213
213
  related?: Pick<PostModel, 'id' | 'category' | 'categoryId' | 'created' | 'modified' | 'title' | 'slug' | 'summary'>[];
@@ -218,13 +218,13 @@ declare enum CategoryType {
218
218
  Category = 0,
219
219
  Tag = 1
220
220
  }
221
- interface CategoryModel extends BaseModel {
221
+ interface CategoryModel$1 extends BaseModel {
222
222
  type: CategoryType;
223
223
  count: number;
224
224
  slug: string;
225
225
  name: string;
226
226
  }
227
- type CategoryWithChildrenModel = CategoryModel & {
227
+ type CategoryWithChildrenModel = CategoryModel$1 & {
228
228
  children: Pick<PostModel, 'id' | 'title' | 'slug' | 'modified' | 'created'>[];
229
229
  };
230
230
  type CategoryEntries = {
@@ -263,7 +263,7 @@ interface RoomOmittedPost {
263
263
  slug: string;
264
264
  title: string;
265
265
  categoryId: string;
266
- category: CategoryModel;
266
+ category: CategoryModel$1;
267
267
  id: string;
268
268
  created: string;
269
269
  }
@@ -402,21 +402,6 @@ interface NoteWrappedWithLikedAndTranslationPayload {
402
402
  prev?: Partial<NoteModel>;
403
403
  }
404
404
  //#endregion
405
- //#region models/page.d.ts
406
- declare enum EnumPageType {
407
- 'md' = "md",
408
- 'html' = "html",
409
- 'frame' = "frame"
410
- }
411
- type PageModel = TextBaseModel & {
412
- created: string;
413
- slug: string;
414
- subtitle?: string;
415
- order?: number;
416
- type?: EnumPageType;
417
- options?: object;
418
- };
419
- //#endregion
420
405
  //#region models/say.d.ts
421
406
  interface SayModel extends BaseModel {
422
407
  text: string;
@@ -429,6 +414,7 @@ declare class SeoOptionModel {
429
414
  title: string;
430
415
  description: string;
431
416
  icon?: string;
417
+ iconDark?: string;
432
418
  keywords?: string[];
433
419
  }
434
420
  declare class UrlOptionModel {
@@ -459,6 +445,7 @@ declare class MailOptionsModel {
459
445
  }
460
446
  declare class CommentOptionsModel {
461
447
  antiSpam: boolean;
448
+ disableComment: boolean;
462
449
  allowGuestComment: boolean;
463
450
  spamKeywords?: string[];
464
451
  blockIps?: string[];
@@ -479,12 +466,6 @@ declare class BingSearchOptionsModel {
479
466
  enable: boolean;
480
467
  token?: string;
481
468
  }
482
- declare class AlgoliaSearchOptionsModel {
483
- enable: boolean;
484
- apiKey?: string;
485
- appId?: string;
486
- indexName?: string;
487
- }
488
469
  declare class AdminExtraModel {
489
470
  background?: string;
490
471
  gaodemapKey?: string;
@@ -504,7 +485,6 @@ interface IConfig {
504
485
  commentOptions: CommentOptionsModel;
505
486
  backupOptions: BackupOptionsModel;
506
487
  baiduSearchOptions: BaiduSearchOptionsModel;
507
- algoliaSearchOptions: AlgoliaSearchOptionsModel;
508
488
  adminExtra: AdminExtraModel;
509
489
  thirdPartyServiceIntegration: ThirdPartyServiceIntegrationModel;
510
490
  }
@@ -586,8 +566,6 @@ interface AggregateRoot {
586
566
  seo: SeoOptionModel;
587
567
  url: Url;
588
568
  commentOptions?: Pick<CommentOptionsModel, 'disableComment' | 'allowGuestComment'>;
589
- categories: CategoryModel[];
590
- pageMeta: Pick<PageModel, 'title' | 'id' | 'slug' | 'order'>[] | null;
591
569
  /**
592
570
  * @available 4.2.2
593
571
  */
@@ -603,13 +581,18 @@ interface AggregateRoot {
603
581
  interface AggregateRootWithTheme<Theme = unknown> extends AggregateRoot {
604
582
  theme?: Theme;
605
583
  }
584
+ interface AggregateSiteInfo {
585
+ user: Pick<UserModel, 'id' | 'name' | 'socialIds'>;
586
+ seo: SeoOptionModel;
587
+ url: Pick<Url, 'webUrl'>;
588
+ }
606
589
  interface Url {
607
590
  wsUrl: string;
608
591
  serverUrl: string;
609
592
  webUrl: string;
610
593
  }
611
- interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images'> {}
612
- interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'created' | 'title' | 'category' | 'images'> {}
594
+ interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images' | 'mood' | 'weather'> {}
595
+ interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'created' | 'title' | 'category' | 'images' | 'summary'> {}
613
596
  interface AggregateTop {
614
597
  notes: AggregateTopNote[];
615
598
  posts: AggregateTopPost[];
@@ -677,6 +660,7 @@ interface AITranslationModel {
677
660
  sourceLang: string;
678
661
  title: string;
679
662
  text: string;
663
+ subtitle?: string;
680
664
  summary?: string;
681
665
  tags?: string[];
682
666
  aiModel?: string;
@@ -749,6 +733,7 @@ interface CommentModel extends BaseModel {
749
733
  deletedAt?: string;
750
734
  isWhispers?: boolean;
751
735
  location?: string;
736
+ authProvider?: string;
752
737
  readerId?: string;
753
738
  editedAt?: string;
754
739
  }
@@ -775,7 +760,7 @@ interface CommentRef {
775
760
  categoryId?: string;
776
761
  slug: string;
777
762
  title: string;
778
- category?: CategoryModel;
763
+ category?: CategoryModel$1;
779
764
  }
780
765
  declare enum CommentState {
781
766
  Unread = 0,
@@ -806,6 +791,21 @@ interface LinkModel extends BaseModel {
806
791
  email: string;
807
792
  }
808
793
  //#endregion
794
+ //#region models/page.d.ts
795
+ declare enum EnumPageType {
796
+ 'md' = "md",
797
+ 'html' = "html",
798
+ 'frame' = "frame"
799
+ }
800
+ type PageModel = TextBaseModel & {
801
+ created: string;
802
+ slug: string;
803
+ subtitle?: string;
804
+ order?: number;
805
+ type?: EnumPageType;
806
+ options?: object;
807
+ };
808
+ //#endregion
809
809
  //#region models/project.d.ts
810
810
  interface ProjectModel extends BaseModel {
811
811
  name: string;
@@ -1120,6 +1120,7 @@ declare class AggregateController<ResponseWrapper> implements IController {
1120
1120
  * 获取聚合数据
1121
1121
  */
1122
1122
  getAggregateData<Theme>(theme?: string): RequestProxyResult<AggregateRootWithTheme<Theme>, ResponseWrapper>;
1123
+ getSiteMetadata(): RequestProxyResult<AggregateSiteInfo, ResponseWrapper>;
1123
1124
  /**
1124
1125
  * 获取最新发布的内容
1125
1126
  */
@@ -1345,6 +1346,7 @@ declare class AIController<ResponseWrapper> implements IController {
1345
1346
  source_lang: string;
1346
1347
  title: string;
1347
1348
  text: string;
1349
+ subtitle?: string | undefined;
1348
1350
  summary?: string | undefined;
1349
1351
  tags?: string[] | undefined;
1350
1352
  ai_model?: string | undefined;
@@ -1529,14 +1531,14 @@ declare class CategoryController<ResponseWrapper> implements IController {
1529
1531
  constructor(client: HTTPClient);
1530
1532
  get proxy(): IRequestHandler<ResponseWrapper>;
1531
1533
  getAllCategories(): RequestProxyResult<{
1532
- data: CategoryModel[];
1534
+ data: CategoryModel$1[];
1533
1535
  }, ResponseWrapper>;
1534
1536
  getAllTags(): RequestProxyResult<{
1535
1537
  data: TagModel[];
1536
1538
  }, ResponseWrapper>;
1537
1539
  getCategoryDetail(id: string): Promise<ResponseProxyExtraRaw<CategoryWithChildrenModel>>;
1538
1540
  getCategoryDetail(ids: string[]): Promise<ResponseProxyExtraRaw<Map<string, CategoryWithChildrenModel>>>;
1539
- getCategoryByIdOrSlug(idOrSlug: string): Promise<CategoryModel & {
1541
+ getCategoryByIdOrSlug(idOrSlug: string): Promise<CategoryModel$1 & {
1540
1542
  children: Pick<PostModel, "id" | "title" | "slug" | "modified" | "created">[];
1541
1543
  } & {
1542
1544
  $raw: ResponseWrapper extends {
@@ -1564,7 +1566,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
1564
1566
  name: string;
1565
1567
  created: string;
1566
1568
  id: string;
1567
- children: Pick<PostModel, "id" | "title" | "slug" | "modified" | "created">[];
1569
+ children: Pick<PostModel, "id" | "created" | "title" | "slug" | "modified">[];
1568
1570
  } : T_1 : never : never;
1569
1571
  } : ResponseWrapper;
1570
1572
  $request: {
@@ -1616,7 +1618,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
1616
1618
  };
1617
1619
  }) ? T_1 extends unknown ? {
1618
1620
  tag: string;
1619
- data: Pick<PostModel, "category" | "id" | "title" | "slug" | "created">[];
1621
+ data: Pick<PostModel, "category" | "id" | "created" | "title" | "slug">[];
1620
1622
  } : T_1 : never : never;
1621
1623
  } : ResponseWrapper;
1622
1624
  $request: {
@@ -2437,7 +2439,13 @@ declare module '@mx-space/api-client' {
2437
2439
  type SearchOption = {
2438
2440
  orderBy?: string;
2439
2441
  order?: number;
2440
- rawAlgolia?: boolean;
2442
+ };
2443
+ type SearchHighlight = {
2444
+ keywords: string[];
2445
+ snippet: string | null;
2446
+ };
2447
+ type SearchResultHighlight = {
2448
+ highlight: SearchHighlight;
2441
2449
  };
2442
2450
  declare class SearchController<ResponseWrapper> implements IController {
2443
2451
  private readonly client;
@@ -2445,66 +2453,40 @@ declare class SearchController<ResponseWrapper> implements IController {
2445
2453
  name: string;
2446
2454
  constructor(client: HTTPClient);
2447
2455
  get proxy(): IRequestHandler<ResponseWrapper>;
2448
- search(type: 'note', keyword: string, options?: Omit<SearchOption, 'rawAlgolia'>): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, 'modified' | 'id' | 'title' | 'created' | 'nid'>>, ResponseWrapper>>;
2449
- search(type: 'post', keyword: string, options?: Omit<SearchOption, 'rawAlgolia'>): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, 'modified' | 'id' | 'title' | 'created' | 'slug' | 'category'>>, ResponseWrapper>>;
2450
- /**
2451
- * algolya 搜索
2452
- * https://www.algolia.com/doc/api-reference/api-methods/search/
2453
- * @param keyword
2454
- * @param options
2455
- * @returns
2456
- */
2457
- searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & {
2456
+ search(type: 'note', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, 'modified' | 'id' | 'title' | 'created' | 'nid'> & SearchResultHighlight>, ResponseWrapper>>;
2457
+ search(type: 'post', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, 'modified' | 'id' | 'title' | 'created' | 'slug' | 'category'> & SearchResultHighlight>, ResponseWrapper>>;
2458
+ search(type: 'page', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PageModel, 'modified' | 'id' | 'title' | 'created' | 'slug'> & SearchResultHighlight>, ResponseWrapper>>;
2459
+ searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2458
2460
  type: "post";
2459
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & {
2461
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2460
2462
  type: "note";
2461
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & {
2463
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2462
2464
  type: "page";
2463
- })> & {
2464
- /**
2465
- * @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
2466
- */
2467
- raw?: any;
2468
- }, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
2465
+ })>, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
2469
2466
  [key: string]: any;
2470
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & {
2467
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2471
2468
  type: "post";
2472
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & {
2469
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2473
2470
  type: "note";
2474
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & {
2471
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2475
2472
  type: "page";
2476
- })> & {
2477
- /**
2478
- * @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
2479
- */
2480
- raw?: any;
2481
- }, ResponseWrapper>;
2473
+ })>, ResponseWrapper>;
2482
2474
  } : ResponseWrapper extends {
2483
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & {
2475
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2484
2476
  type: "post";
2485
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & {
2477
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2486
2478
  type: "note";
2487
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & {
2479
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2488
2480
  type: "page";
2489
- })> & {
2490
- /**
2491
- * @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
2492
- */
2493
- raw?: any;
2494
- }, ResponseWrapper>;
2481
+ })>, ResponseWrapper>;
2495
2482
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2496
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & {
2483
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2497
2484
  type: "post";
2498
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & {
2485
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2499
2486
  type: "note";
2500
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & {
2487
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2501
2488
  type: "page";
2502
- })> & {
2503
- /**
2504
- * @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
2505
- */
2506
- raw?: any;
2507
- }, ResponseWrapper>;
2489
+ })>, ResponseWrapper>;
2508
2490
  }>;
2509
2491
  }
2510
2492
  //#endregion
@@ -2646,4 +2628,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
2646
2628
  */
2647
2629
  declare const camelcaseKeys: <T = any>(obj: any) => T;
2648
2630
  //#endregion
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 };
2631
+ export { AIController, AIDeepReadingModel, 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, 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, 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
@@ -207,7 +207,7 @@ type PostModel = TextBaseModel & {
207
207
  slug: string;
208
208
  categoryId: string;
209
209
  images: Image[];
210
- category: CategoryModel;
210
+ category: CategoryModel$1;
211
211
  pin?: string | null;
212
212
  pinOrder?: number;
213
213
  related?: Pick<PostModel, 'id' | 'category' | 'categoryId' | 'created' | 'modified' | 'title' | 'slug' | 'summary'>[];
@@ -218,13 +218,13 @@ declare enum CategoryType {
218
218
  Category = 0,
219
219
  Tag = 1
220
220
  }
221
- interface CategoryModel extends BaseModel {
221
+ interface CategoryModel$1 extends BaseModel {
222
222
  type: CategoryType;
223
223
  count: number;
224
224
  slug: string;
225
225
  name: string;
226
226
  }
227
- type CategoryWithChildrenModel = CategoryModel & {
227
+ type CategoryWithChildrenModel = CategoryModel$1 & {
228
228
  children: Pick<PostModel, 'id' | 'title' | 'slug' | 'modified' | 'created'>[];
229
229
  };
230
230
  type CategoryEntries = {
@@ -263,7 +263,7 @@ interface RoomOmittedPost {
263
263
  slug: string;
264
264
  title: string;
265
265
  categoryId: string;
266
- category: CategoryModel;
266
+ category: CategoryModel$1;
267
267
  id: string;
268
268
  created: string;
269
269
  }
@@ -402,21 +402,6 @@ interface NoteWrappedWithLikedAndTranslationPayload {
402
402
  prev?: Partial<NoteModel>;
403
403
  }
404
404
  //#endregion
405
- //#region models/page.d.ts
406
- declare enum EnumPageType {
407
- 'md' = "md",
408
- 'html' = "html",
409
- 'frame' = "frame"
410
- }
411
- type PageModel = TextBaseModel & {
412
- created: string;
413
- slug: string;
414
- subtitle?: string;
415
- order?: number;
416
- type?: EnumPageType;
417
- options?: object;
418
- };
419
- //#endregion
420
405
  //#region models/say.d.ts
421
406
  interface SayModel extends BaseModel {
422
407
  text: string;
@@ -429,6 +414,7 @@ declare class SeoOptionModel {
429
414
  title: string;
430
415
  description: string;
431
416
  icon?: string;
417
+ iconDark?: string;
432
418
  keywords?: string[];
433
419
  }
434
420
  declare class UrlOptionModel {
@@ -459,6 +445,7 @@ declare class MailOptionsModel {
459
445
  }
460
446
  declare class CommentOptionsModel {
461
447
  antiSpam: boolean;
448
+ disableComment: boolean;
462
449
  allowGuestComment: boolean;
463
450
  spamKeywords?: string[];
464
451
  blockIps?: string[];
@@ -479,12 +466,6 @@ declare class BingSearchOptionsModel {
479
466
  enable: boolean;
480
467
  token?: string;
481
468
  }
482
- declare class AlgoliaSearchOptionsModel {
483
- enable: boolean;
484
- apiKey?: string;
485
- appId?: string;
486
- indexName?: string;
487
- }
488
469
  declare class AdminExtraModel {
489
470
  background?: string;
490
471
  gaodemapKey?: string;
@@ -504,7 +485,6 @@ interface IConfig {
504
485
  commentOptions: CommentOptionsModel;
505
486
  backupOptions: BackupOptionsModel;
506
487
  baiduSearchOptions: BaiduSearchOptionsModel;
507
- algoliaSearchOptions: AlgoliaSearchOptionsModel;
508
488
  adminExtra: AdminExtraModel;
509
489
  thirdPartyServiceIntegration: ThirdPartyServiceIntegrationModel;
510
490
  }
@@ -586,8 +566,6 @@ interface AggregateRoot {
586
566
  seo: SeoOptionModel;
587
567
  url: Url;
588
568
  commentOptions?: Pick<CommentOptionsModel, 'disableComment' | 'allowGuestComment'>;
589
- categories: CategoryModel[];
590
- pageMeta: Pick<PageModel, 'title' | 'id' | 'slug' | 'order'>[] | null;
591
569
  /**
592
570
  * @available 4.2.2
593
571
  */
@@ -603,13 +581,18 @@ interface AggregateRoot {
603
581
  interface AggregateRootWithTheme<Theme = unknown> extends AggregateRoot {
604
582
  theme?: Theme;
605
583
  }
584
+ interface AggregateSiteInfo {
585
+ user: Pick<UserModel, 'id' | 'name' | 'socialIds'>;
586
+ seo: SeoOptionModel;
587
+ url: Pick<Url, 'webUrl'>;
588
+ }
606
589
  interface Url {
607
590
  wsUrl: string;
608
591
  serverUrl: string;
609
592
  webUrl: string;
610
593
  }
611
- interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images'> {}
612
- interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'created' | 'title' | 'category' | 'images'> {}
594
+ interface AggregateTopNote extends Pick<NoteModel, 'id' | 'title' | 'created' | 'nid' | 'images' | 'mood' | 'weather'> {}
595
+ interface AggregateTopPost extends Pick<PostModel, 'id' | 'slug' | 'created' | 'title' | 'category' | 'images' | 'summary'> {}
613
596
  interface AggregateTop {
614
597
  notes: AggregateTopNote[];
615
598
  posts: AggregateTopPost[];
@@ -677,6 +660,7 @@ interface AITranslationModel {
677
660
  sourceLang: string;
678
661
  title: string;
679
662
  text: string;
663
+ subtitle?: string;
680
664
  summary?: string;
681
665
  tags?: string[];
682
666
  aiModel?: string;
@@ -749,6 +733,7 @@ interface CommentModel extends BaseModel {
749
733
  deletedAt?: string;
750
734
  isWhispers?: boolean;
751
735
  location?: string;
736
+ authProvider?: string;
752
737
  readerId?: string;
753
738
  editedAt?: string;
754
739
  }
@@ -775,7 +760,7 @@ interface CommentRef {
775
760
  categoryId?: string;
776
761
  slug: string;
777
762
  title: string;
778
- category?: CategoryModel;
763
+ category?: CategoryModel$1;
779
764
  }
780
765
  declare enum CommentState {
781
766
  Unread = 0,
@@ -806,6 +791,21 @@ interface LinkModel extends BaseModel {
806
791
  email: string;
807
792
  }
808
793
  //#endregion
794
+ //#region models/page.d.ts
795
+ declare enum EnumPageType {
796
+ 'md' = "md",
797
+ 'html' = "html",
798
+ 'frame' = "frame"
799
+ }
800
+ type PageModel = TextBaseModel & {
801
+ created: string;
802
+ slug: string;
803
+ subtitle?: string;
804
+ order?: number;
805
+ type?: EnumPageType;
806
+ options?: object;
807
+ };
808
+ //#endregion
809
809
  //#region models/project.d.ts
810
810
  interface ProjectModel extends BaseModel {
811
811
  name: string;
@@ -1120,6 +1120,7 @@ declare class AggregateController<ResponseWrapper> implements IController {
1120
1120
  * 获取聚合数据
1121
1121
  */
1122
1122
  getAggregateData<Theme>(theme?: string): RequestProxyResult<AggregateRootWithTheme<Theme>, ResponseWrapper>;
1123
+ getSiteMetadata(): RequestProxyResult<AggregateSiteInfo, ResponseWrapper>;
1123
1124
  /**
1124
1125
  * 获取最新发布的内容
1125
1126
  */
@@ -1345,6 +1346,7 @@ declare class AIController<ResponseWrapper> implements IController {
1345
1346
  source_lang: string;
1346
1347
  title: string;
1347
1348
  text: string;
1349
+ subtitle?: string | undefined;
1348
1350
  summary?: string | undefined;
1349
1351
  tags?: string[] | undefined;
1350
1352
  ai_model?: string | undefined;
@@ -1529,14 +1531,14 @@ declare class CategoryController<ResponseWrapper> implements IController {
1529
1531
  constructor(client: HTTPClient);
1530
1532
  get proxy(): IRequestHandler<ResponseWrapper>;
1531
1533
  getAllCategories(): RequestProxyResult<{
1532
- data: CategoryModel[];
1534
+ data: CategoryModel$1[];
1533
1535
  }, ResponseWrapper>;
1534
1536
  getAllTags(): RequestProxyResult<{
1535
1537
  data: TagModel[];
1536
1538
  }, ResponseWrapper>;
1537
1539
  getCategoryDetail(id: string): Promise<ResponseProxyExtraRaw<CategoryWithChildrenModel>>;
1538
1540
  getCategoryDetail(ids: string[]): Promise<ResponseProxyExtraRaw<Map<string, CategoryWithChildrenModel>>>;
1539
- getCategoryByIdOrSlug(idOrSlug: string): Promise<CategoryModel & {
1541
+ getCategoryByIdOrSlug(idOrSlug: string): Promise<CategoryModel$1 & {
1540
1542
  children: Pick<PostModel, "id" | "title" | "slug" | "modified" | "created">[];
1541
1543
  } & {
1542
1544
  $raw: ResponseWrapper extends {
@@ -1564,7 +1566,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
1564
1566
  name: string;
1565
1567
  created: string;
1566
1568
  id: string;
1567
- children: Pick<PostModel, "id" | "title" | "slug" | "modified" | "created">[];
1569
+ children: Pick<PostModel, "id" | "created" | "title" | "slug" | "modified">[];
1568
1570
  } : T_1 : never : never;
1569
1571
  } : ResponseWrapper;
1570
1572
  $request: {
@@ -1616,7 +1618,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
1616
1618
  };
1617
1619
  }) ? T_1 extends unknown ? {
1618
1620
  tag: string;
1619
- data: Pick<PostModel, "category" | "id" | "title" | "slug" | "created">[];
1621
+ data: Pick<PostModel, "category" | "id" | "created" | "title" | "slug">[];
1620
1622
  } : T_1 : never : never;
1621
1623
  } : ResponseWrapper;
1622
1624
  $request: {
@@ -2437,7 +2439,13 @@ declare module '@mx-space/api-client' {
2437
2439
  type SearchOption = {
2438
2440
  orderBy?: string;
2439
2441
  order?: number;
2440
- rawAlgolia?: boolean;
2442
+ };
2443
+ type SearchHighlight = {
2444
+ keywords: string[];
2445
+ snippet: string | null;
2446
+ };
2447
+ type SearchResultHighlight = {
2448
+ highlight: SearchHighlight;
2441
2449
  };
2442
2450
  declare class SearchController<ResponseWrapper> implements IController {
2443
2451
  private readonly client;
@@ -2445,66 +2453,40 @@ declare class SearchController<ResponseWrapper> implements IController {
2445
2453
  name: string;
2446
2454
  constructor(client: HTTPClient);
2447
2455
  get proxy(): IRequestHandler<ResponseWrapper>;
2448
- search(type: 'note', keyword: string, options?: Omit<SearchOption, 'rawAlgolia'>): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, 'modified' | 'id' | 'title' | 'created' | 'nid'>>, ResponseWrapper>>;
2449
- search(type: 'post', keyword: string, options?: Omit<SearchOption, 'rawAlgolia'>): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, 'modified' | 'id' | 'title' | 'created' | 'slug' | 'category'>>, ResponseWrapper>>;
2450
- /**
2451
- * algolya 搜索
2452
- * https://www.algolia.com/doc/api-reference/api-methods/search/
2453
- * @param keyword
2454
- * @param options
2455
- * @returns
2456
- */
2457
- searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & {
2456
+ search(type: 'note', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, 'modified' | 'id' | 'title' | 'created' | 'nid'> & SearchResultHighlight>, ResponseWrapper>>;
2457
+ search(type: 'post', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, 'modified' | 'id' | 'title' | 'created' | 'slug' | 'category'> & SearchResultHighlight>, ResponseWrapper>>;
2458
+ search(type: 'page', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PageModel, 'modified' | 'id' | 'title' | 'created' | 'slug'> & SearchResultHighlight>, ResponseWrapper>>;
2459
+ searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2458
2460
  type: "post";
2459
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & {
2461
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2460
2462
  type: "note";
2461
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & {
2463
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2462
2464
  type: "page";
2463
- })> & {
2464
- /**
2465
- * @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
2466
- */
2467
- raw?: any;
2468
- }, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
2465
+ })>, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
2469
2466
  [key: string]: any;
2470
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & {
2467
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2471
2468
  type: "post";
2472
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & {
2469
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2473
2470
  type: "note";
2474
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & {
2471
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2475
2472
  type: "page";
2476
- })> & {
2477
- /**
2478
- * @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
2479
- */
2480
- raw?: any;
2481
- }, ResponseWrapper>;
2473
+ })>, ResponseWrapper>;
2482
2474
  } : ResponseWrapper extends {
2483
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & {
2475
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2484
2476
  type: "post";
2485
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & {
2477
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2486
2478
  type: "note";
2487
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & {
2479
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2488
2480
  type: "page";
2489
- })> & {
2490
- /**
2491
- * @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
2492
- */
2493
- raw?: any;
2494
- }, ResponseWrapper>;
2481
+ })>, ResponseWrapper>;
2495
2482
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2496
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & {
2483
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2497
2484
  type: "post";
2498
- }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & {
2485
+ }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2499
2486
  type: "note";
2500
- }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & {
2487
+ }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2501
2488
  type: "page";
2502
- })> & {
2503
- /**
2504
- * @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
2505
- */
2506
- raw?: any;
2507
- }, ResponseWrapper>;
2489
+ })>, ResponseWrapper>;
2508
2490
  }>;
2509
2491
  }
2510
2492
  //#endregion
@@ -2646,4 +2628,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
2646
2628
  */
2647
2629
  declare const camelcaseKeys: <T = any>(obj: any) => T;
2648
2630
  //#endregion
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 };
2631
+ export { AIController, AIDeepReadingModel, 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, 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, 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
@@ -185,6 +185,9 @@ var AggregateController = class {
185
185
  getAggregateData(theme) {
186
186
  return this.proxy.get({ params: { theme } });
187
187
  }
188
+ getSiteMetadata() {
189
+ return this.proxy.site.get();
190
+ }
188
191
  /**
189
192
  * 获取最新发布的内容
190
193
  */
@@ -854,15 +857,8 @@ var SearchController = class {
854
857
  ...options
855
858
  } });
856
859
  }
857
- /**
858
- * algolya 搜索
859
- * https://www.algolia.com/doc/api-reference/api-methods/search/
860
- * @param keyword
861
- * @param options
862
- * @returns
863
- */
864
- searchByAlgolia(keyword, options) {
865
- return this.proxy("algolia").get({ params: {
860
+ searchAll(keyword, options) {
861
+ return this.proxy.get({ params: {
866
862
  keyword,
867
863
  ...options
868
864
  } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/api-client",
3
- "version": "2.4.2",
3
+ "version": "3.1.0",
4
4
  "description": "A api client for mx-space server@next",
5
5
  "type": "module",
6
6
  "engines": {