@mx-space/api-client 3.0.0 → 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 +2 -9
- package/dist/index.d.cts +29 -56
- package/dist/index.d.mts +29 -56
- package/dist/index.mjs +2 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -859,15 +859,8 @@ var SearchController = class {
|
|
|
859
859
|
...options
|
|
860
860
|
} });
|
|
861
861
|
}
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
* https://www.algolia.com/doc/api-reference/api-methods/search/
|
|
865
|
-
* @param keyword
|
|
866
|
-
* @param options
|
|
867
|
-
* @returns
|
|
868
|
-
*/
|
|
869
|
-
searchByAlgolia(keyword, options) {
|
|
870
|
-
return this.proxy("algolia").get({ params: {
|
|
862
|
+
searchAll(keyword, options) {
|
|
863
|
+
return this.proxy.get({ params: {
|
|
871
864
|
keyword,
|
|
872
865
|
...options
|
|
873
866
|
} });
|
package/dist/index.d.cts
CHANGED
|
@@ -466,12 +466,6 @@ declare class BingSearchOptionsModel {
|
|
|
466
466
|
enable: boolean;
|
|
467
467
|
token?: string;
|
|
468
468
|
}
|
|
469
|
-
declare class AlgoliaSearchOptionsModel {
|
|
470
|
-
enable: boolean;
|
|
471
|
-
apiKey?: string;
|
|
472
|
-
appId?: string;
|
|
473
|
-
indexName?: string;
|
|
474
|
-
}
|
|
475
469
|
declare class AdminExtraModel {
|
|
476
470
|
background?: string;
|
|
477
471
|
gaodemapKey?: string;
|
|
@@ -491,7 +485,6 @@ interface IConfig {
|
|
|
491
485
|
commentOptions: CommentOptionsModel;
|
|
492
486
|
backupOptions: BackupOptionsModel;
|
|
493
487
|
baiduSearchOptions: BaiduSearchOptionsModel;
|
|
494
|
-
algoliaSearchOptions: AlgoliaSearchOptionsModel;
|
|
495
488
|
adminExtra: AdminExtraModel;
|
|
496
489
|
thirdPartyServiceIntegration: ThirdPartyServiceIntegrationModel;
|
|
497
490
|
}
|
|
@@ -1573,7 +1566,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1573
1566
|
name: string;
|
|
1574
1567
|
created: string;
|
|
1575
1568
|
id: string;
|
|
1576
|
-
children: Pick<PostModel, "id" | "
|
|
1569
|
+
children: Pick<PostModel, "id" | "created" | "title" | "slug" | "modified">[];
|
|
1577
1570
|
} : T_1 : never : never;
|
|
1578
1571
|
} : ResponseWrapper;
|
|
1579
1572
|
$request: {
|
|
@@ -1625,7 +1618,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1625
1618
|
};
|
|
1626
1619
|
}) ? T_1 extends unknown ? {
|
|
1627
1620
|
tag: string;
|
|
1628
|
-
data: Pick<PostModel, "category" | "id" | "
|
|
1621
|
+
data: Pick<PostModel, "category" | "id" | "created" | "title" | "slug">[];
|
|
1629
1622
|
} : T_1 : never : never;
|
|
1630
1623
|
} : ResponseWrapper;
|
|
1631
1624
|
$request: {
|
|
@@ -2446,7 +2439,13 @@ declare module '@mx-space/api-client' {
|
|
|
2446
2439
|
type SearchOption = {
|
|
2447
2440
|
orderBy?: string;
|
|
2448
2441
|
order?: number;
|
|
2449
|
-
|
|
2442
|
+
};
|
|
2443
|
+
type SearchHighlight = {
|
|
2444
|
+
keywords: string[];
|
|
2445
|
+
snippet: string | null;
|
|
2446
|
+
};
|
|
2447
|
+
type SearchResultHighlight = {
|
|
2448
|
+
highlight: SearchHighlight;
|
|
2450
2449
|
};
|
|
2451
2450
|
declare class SearchController<ResponseWrapper> implements IController {
|
|
2452
2451
|
private readonly client;
|
|
@@ -2454,66 +2453,40 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2454
2453
|
name: string;
|
|
2455
2454
|
constructor(client: HTTPClient);
|
|
2456
2455
|
get proxy(): IRequestHandler<ResponseWrapper>;
|
|
2457
|
-
search(type: 'note', keyword: string, options?:
|
|
2458
|
-
search(type: 'post', keyword: string, options?:
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
* https://www.algolia.com/doc/api-reference/api-methods/search/
|
|
2462
|
-
* @param keyword
|
|
2463
|
-
* @param options
|
|
2464
|
-
* @returns
|
|
2465
|
-
*/
|
|
2466
|
-
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "modified" | "created" | "slug"> & {
|
|
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 & {
|
|
2467
2460
|
type: "post";
|
|
2468
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2461
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
|
|
2469
2462
|
type: "note";
|
|
2470
|
-
}) | (Pick<PageModel, "id" | "
|
|
2463
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2471
2464
|
type: "page";
|
|
2472
|
-
})
|
|
2473
|
-
/**
|
|
2474
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
2475
|
-
*/
|
|
2476
|
-
raw?: any;
|
|
2477
|
-
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2465
|
+
})>, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2478
2466
|
[key: string]: any;
|
|
2479
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2467
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2480
2468
|
type: "post";
|
|
2481
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2469
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
|
|
2482
2470
|
type: "note";
|
|
2483
|
-
}) | (Pick<PageModel, "id" | "
|
|
2471
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2484
2472
|
type: "page";
|
|
2485
|
-
})
|
|
2486
|
-
/**
|
|
2487
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
2488
|
-
*/
|
|
2489
|
-
raw?: any;
|
|
2490
|
-
}, ResponseWrapper>;
|
|
2473
|
+
})>, ResponseWrapper>;
|
|
2491
2474
|
} : ResponseWrapper extends {
|
|
2492
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2475
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2493
2476
|
type: "post";
|
|
2494
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2477
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
|
|
2495
2478
|
type: "note";
|
|
2496
|
-
}) | (Pick<PageModel, "id" | "
|
|
2479
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2497
2480
|
type: "page";
|
|
2498
|
-
})
|
|
2499
|
-
/**
|
|
2500
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
2501
|
-
*/
|
|
2502
|
-
raw?: any;
|
|
2503
|
-
}, ResponseWrapper>;
|
|
2481
|
+
})>, ResponseWrapper>;
|
|
2504
2482
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2505
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2483
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2506
2484
|
type: "post";
|
|
2507
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2485
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
|
|
2508
2486
|
type: "note";
|
|
2509
|
-
}) | (Pick<PageModel, "id" | "
|
|
2487
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2510
2488
|
type: "page";
|
|
2511
|
-
})
|
|
2512
|
-
/**
|
|
2513
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
2514
|
-
*/
|
|
2515
|
-
raw?: any;
|
|
2516
|
-
}, ResponseWrapper>;
|
|
2489
|
+
})>, ResponseWrapper>;
|
|
2517
2490
|
}>;
|
|
2518
2491
|
}
|
|
2519
2492
|
//#endregion
|
|
@@ -2655,4 +2628,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
2655
2628
|
*/
|
|
2656
2629
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
2657
2630
|
//#endregion
|
|
2658
|
-
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateSiteInfo, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost,
|
|
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
|
@@ -466,12 +466,6 @@ declare class BingSearchOptionsModel {
|
|
|
466
466
|
enable: boolean;
|
|
467
467
|
token?: string;
|
|
468
468
|
}
|
|
469
|
-
declare class AlgoliaSearchOptionsModel {
|
|
470
|
-
enable: boolean;
|
|
471
|
-
apiKey?: string;
|
|
472
|
-
appId?: string;
|
|
473
|
-
indexName?: string;
|
|
474
|
-
}
|
|
475
469
|
declare class AdminExtraModel {
|
|
476
470
|
background?: string;
|
|
477
471
|
gaodemapKey?: string;
|
|
@@ -491,7 +485,6 @@ interface IConfig {
|
|
|
491
485
|
commentOptions: CommentOptionsModel;
|
|
492
486
|
backupOptions: BackupOptionsModel;
|
|
493
487
|
baiduSearchOptions: BaiduSearchOptionsModel;
|
|
494
|
-
algoliaSearchOptions: AlgoliaSearchOptionsModel;
|
|
495
488
|
adminExtra: AdminExtraModel;
|
|
496
489
|
thirdPartyServiceIntegration: ThirdPartyServiceIntegrationModel;
|
|
497
490
|
}
|
|
@@ -1573,7 +1566,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1573
1566
|
name: string;
|
|
1574
1567
|
created: string;
|
|
1575
1568
|
id: string;
|
|
1576
|
-
children: Pick<PostModel, "id" | "
|
|
1569
|
+
children: Pick<PostModel, "id" | "created" | "title" | "slug" | "modified">[];
|
|
1577
1570
|
} : T_1 : never : never;
|
|
1578
1571
|
} : ResponseWrapper;
|
|
1579
1572
|
$request: {
|
|
@@ -1625,7 +1618,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
|
|
|
1625
1618
|
};
|
|
1626
1619
|
}) ? T_1 extends unknown ? {
|
|
1627
1620
|
tag: string;
|
|
1628
|
-
data: Pick<PostModel, "category" | "id" | "
|
|
1621
|
+
data: Pick<PostModel, "category" | "id" | "created" | "title" | "slug">[];
|
|
1629
1622
|
} : T_1 : never : never;
|
|
1630
1623
|
} : ResponseWrapper;
|
|
1631
1624
|
$request: {
|
|
@@ -2446,7 +2439,13 @@ declare module '@mx-space/api-client' {
|
|
|
2446
2439
|
type SearchOption = {
|
|
2447
2440
|
orderBy?: string;
|
|
2448
2441
|
order?: number;
|
|
2449
|
-
|
|
2442
|
+
};
|
|
2443
|
+
type SearchHighlight = {
|
|
2444
|
+
keywords: string[];
|
|
2445
|
+
snippet: string | null;
|
|
2446
|
+
};
|
|
2447
|
+
type SearchResultHighlight = {
|
|
2448
|
+
highlight: SearchHighlight;
|
|
2450
2449
|
};
|
|
2451
2450
|
declare class SearchController<ResponseWrapper> implements IController {
|
|
2452
2451
|
private readonly client;
|
|
@@ -2454,66 +2453,40 @@ declare class SearchController<ResponseWrapper> implements IController {
|
|
|
2454
2453
|
name: string;
|
|
2455
2454
|
constructor(client: HTTPClient);
|
|
2456
2455
|
get proxy(): IRequestHandler<ResponseWrapper>;
|
|
2457
|
-
search(type: 'note', keyword: string, options?:
|
|
2458
|
-
search(type: 'post', keyword: string, options?:
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
* https://www.algolia.com/doc/api-reference/api-methods/search/
|
|
2462
|
-
* @param keyword
|
|
2463
|
-
* @param options
|
|
2464
|
-
* @returns
|
|
2465
|
-
*/
|
|
2466
|
-
searchByAlgolia(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "modified" | "created" | "slug"> & {
|
|
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 & {
|
|
2467
2460
|
type: "post";
|
|
2468
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2461
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
|
|
2469
2462
|
type: "note";
|
|
2470
|
-
}) | (Pick<PageModel, "id" | "
|
|
2463
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2471
2464
|
type: "page";
|
|
2472
|
-
})
|
|
2473
|
-
/**
|
|
2474
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
2475
|
-
*/
|
|
2476
|
-
raw?: any;
|
|
2477
|
-
}, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2465
|
+
})>, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
|
|
2478
2466
|
[key: string]: any;
|
|
2479
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2467
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2480
2468
|
type: "post";
|
|
2481
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2469
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
|
|
2482
2470
|
type: "note";
|
|
2483
|
-
}) | (Pick<PageModel, "id" | "
|
|
2471
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2484
2472
|
type: "page";
|
|
2485
|
-
})
|
|
2486
|
-
/**
|
|
2487
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
2488
|
-
*/
|
|
2489
|
-
raw?: any;
|
|
2490
|
-
}, ResponseWrapper>;
|
|
2473
|
+
})>, ResponseWrapper>;
|
|
2491
2474
|
} : ResponseWrapper extends {
|
|
2492
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2475
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2493
2476
|
type: "post";
|
|
2494
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2477
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
|
|
2495
2478
|
type: "note";
|
|
2496
|
-
}) | (Pick<PageModel, "id" | "
|
|
2479
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2497
2480
|
type: "page";
|
|
2498
|
-
})
|
|
2499
|
-
/**
|
|
2500
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
2501
|
-
*/
|
|
2502
|
-
raw?: any;
|
|
2503
|
-
}, ResponseWrapper>;
|
|
2481
|
+
})>, ResponseWrapper>;
|
|
2504
2482
|
} ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
|
|
2505
|
-
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "
|
|
2483
|
+
data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2506
2484
|
type: "post";
|
|
2507
|
-
}) | (Pick<NoteModel, "id" | "
|
|
2485
|
+
}) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
|
|
2508
2486
|
type: "note";
|
|
2509
|
-
}) | (Pick<PageModel, "id" | "
|
|
2487
|
+
}) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
|
|
2510
2488
|
type: "page";
|
|
2511
|
-
})
|
|
2512
|
-
/**
|
|
2513
|
-
* @see: algoliasearch <https://www.algolia.com/doc/api-reference/api-methods/search/>
|
|
2514
|
-
*/
|
|
2515
|
-
raw?: any;
|
|
2516
|
-
}, ResponseWrapper>;
|
|
2489
|
+
})>, ResponseWrapper>;
|
|
2517
2490
|
}>;
|
|
2518
2491
|
}
|
|
2519
2492
|
//#endregion
|
|
@@ -2655,4 +2628,4 @@ declare const allControllerNames: readonly ["ai", "ack", "activity", "aggregate"
|
|
|
2655
2628
|
*/
|
|
2656
2629
|
declare const camelcaseKeys: <T = any>(obj: any) => T;
|
|
2657
2630
|
//#endregion
|
|
2658
|
-
export { AIController, AIDeepReadingModel, AISummaryModel, AISummaryStreamEvent, AITranslationModel, AITranslationStreamEvent, AcademicMetadata, AckController, ActivityController, ActivityPresence, AdminExtraModel, AggregateAIConfig, AggregateController, AggregateRoot, AggregateRootWithTheme, AggregateSiteInfo, AggregateStat, AggregateTop, AggregateTopNote, AggregateTopPost,
|
|
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
|
@@ -857,15 +857,8 @@ var SearchController = class {
|
|
|
857
857
|
...options
|
|
858
858
|
} });
|
|
859
859
|
}
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
* https://www.algolia.com/doc/api-reference/api-methods/search/
|
|
863
|
-
* @param keyword
|
|
864
|
-
* @param options
|
|
865
|
-
* @returns
|
|
866
|
-
*/
|
|
867
|
-
searchByAlgolia(keyword, options) {
|
|
868
|
-
return this.proxy("algolia").get({ params: {
|
|
860
|
+
searchAll(keyword, options) {
|
|
861
|
+
return this.proxy.get({ params: {
|
|
869
862
|
keyword,
|
|
870
863
|
...options
|
|
871
864
|
} });
|