devstar插件
This commit is contained in:
60
node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.d.ts
generated
vendored
Normal file
60
node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.d.ts
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
import * as ClientSearch from '@algolia/client-search';
|
||||
import type * as AlgoliaSearch from 'algoliasearch/lite';
|
||||
declare type AnyToUnknown<TSubject> = (0 extends 1 & TSubject ? true : false) extends true ? unknown : TSubject;
|
||||
declare type SearchClientShape = {
|
||||
search: unknown;
|
||||
};
|
||||
declare type ClientLiteV5 = AnyToUnknown<
|
||||
/** @ts-ignore */
|
||||
ReturnType<typeof AlgoliaSearch.liteClient>>;
|
||||
declare type ClientSearchV5 = AnyToUnknown<
|
||||
/** @ts-ignore */
|
||||
ReturnType<typeof ClientSearch.searchClient>>;
|
||||
declare type ClientV5 = ClientLiteV5 extends SearchClientShape ? ClientLiteV5 : ClientSearchV5 extends SearchClientShape ? ClientSearchV5 : unknown;
|
||||
declare type PickForClient<TMapping extends {
|
||||
v4: unknown;
|
||||
v5: unknown;
|
||||
}> = ClientV5 extends SearchClientShape ? TMapping['v5'] : TMapping['v4'];
|
||||
export declare type SearchClient = PickForClient<{
|
||||
/** @ts-ignore */
|
||||
v4: AlgoliaSearch.SearchClient;
|
||||
/** @ts-ignore */
|
||||
v5: ClientV5;
|
||||
}>;
|
||||
export declare type MultipleQueriesQuery = PickForClient<{
|
||||
/** @ts-ignore */
|
||||
v4: ClientSearch.MultipleQueriesQuery;
|
||||
/** @ts-ignore */
|
||||
v5: AlgoliaSearch.LegacySearchMethodProps[number];
|
||||
}>;
|
||||
export declare type SearchForFacetValuesResponse = PickForClient<{
|
||||
/** @ts-ignore */
|
||||
v4: ClientSearch.SearchForFacetValuesResponse;
|
||||
/** @ts-ignore */
|
||||
v5: AlgoliaSearch.SearchForFacetValuesResponse;
|
||||
}>;
|
||||
export declare type SearchResponse<THit> = PickForClient<{
|
||||
/** @ts-ignore */
|
||||
v4: ClientSearch.SearchResponse<THit>;
|
||||
/** @ts-ignore */
|
||||
v5: AlgoliaSearch.SearchResponse<THit>;
|
||||
}>;
|
||||
export declare type HighlightResult<THit> = PickForClient<{
|
||||
/** @ts-ignore */
|
||||
v4: ClientSearch.HighlightResult<THit>;
|
||||
/** @ts-ignore */
|
||||
v5: AlgoliaSearch.HighlightResult;
|
||||
}>;
|
||||
export declare type SnippetResult<THit> = PickForClient<{
|
||||
/** @ts-ignore */
|
||||
v4: ClientSearch.SnippetResult<THit>;
|
||||
/** @ts-ignore */
|
||||
v5: AlgoliaSearch.SnippetResult;
|
||||
}>;
|
||||
export declare type FacetHit = PickForClient<{
|
||||
/** @ts-ignore */
|
||||
v4: ClientSearch.FacetHit;
|
||||
/** @ts-ignore */
|
||||
v5: AlgoliaSearch.FacetHits;
|
||||
}>;
|
||||
export {};
|
1
node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.js
generated
vendored
Normal file
1
node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/algoliasearch.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
90
node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.d.ts
generated
vendored
Normal file
90
node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.d.ts
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
import type { SearchResponse } from '../SearchResponse';
|
||||
import { UserAgent } from '../UserAgent';
|
||||
import { MultipleQueriesQuery, SearchClient, SearchForFacetValuesResponse } from './algoliasearch';
|
||||
export interface SearchParams {
|
||||
/**
|
||||
* The initialized Algolia search client.
|
||||
*/
|
||||
searchClient: SearchClient;
|
||||
/**
|
||||
* A list of queries to execute.
|
||||
*/
|
||||
queries: MultipleQueriesQuery[];
|
||||
/**
|
||||
* A list of user agents to add to the search client.
|
||||
*
|
||||
* This is useful to track usage of an integration.
|
||||
*/
|
||||
userAgents?: UserAgent[];
|
||||
}
|
||||
export declare type Fetcher = <TRecord>({ searchClient, queries, userAgents, }: SearchParams) => Promise<Array<SearchForFacetValuesResponse | SearchResponse<TRecord>>>;
|
||||
declare type FacetHit = {
|
||||
label: string;
|
||||
count: number;
|
||||
_highlightResult: {
|
||||
label: {
|
||||
value: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export declare type FetcherParams = Pick<Parameters<Fetcher>[0], 'searchClient' | 'queries'>;
|
||||
export declare type RequesterParams<THit> = {
|
||||
transformResponse(response: TransformResponseParams<THit>): TransformedRequesterResponse<THit>;
|
||||
};
|
||||
declare type TransformResponseParams<THit> = {
|
||||
results: Array<SearchResponse<THit> | SearchForFacetValuesResponse>;
|
||||
hits: Array<SearchResponse<THit>['hits']>;
|
||||
facetHits: FacetHit[][];
|
||||
};
|
||||
export declare type TransformedRequesterResponse<THit> = Array<SearchResponse<THit>['hits']> | SearchResponse<THit>['hits'] | FacetHit[][] | FacetHit[];
|
||||
export declare type TransformResponse<THit> = (response: TransformResponseParams<THit>) => TransformedRequesterResponse<THit>;
|
||||
declare type FetcherParamsQuery<THit> = {
|
||||
query: MultipleQueriesQuery;
|
||||
sourceId: string;
|
||||
transformResponse: TransformResponse<THit>;
|
||||
};
|
||||
export declare type ExecuteParams<THit> = {
|
||||
searchClient: SearchClient;
|
||||
requests: Array<FetcherParamsQuery<THit>>;
|
||||
};
|
||||
export declare type Execute<THit> = (params: ExecuteParams<THit>) => Promise<ExecuteResponse<THit>>;
|
||||
export declare type ExecuteResponse<THit> = Array<{
|
||||
items: SearchResponse<THit> | SearchForFacetValuesResponse;
|
||||
sourceId: string;
|
||||
transformResponse: TransformResponse<THit>;
|
||||
}>;
|
||||
export declare type RequestParams<THit> = FetcherParams & {
|
||||
/**
|
||||
* The function to transform the Algolia response before passing it to the Autocomplete state. You have access to the full Algolia results, as well as the pre-computed hits and facet hits.
|
||||
*
|
||||
* This is useful to manipulate the hits, or store data from the results in the [context](https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/context/).
|
||||
*/
|
||||
transformResponse?: TransformResponse<THit>;
|
||||
};
|
||||
export declare type RequesterDescription<THit> = {
|
||||
/**
|
||||
* The search client used for this request. Multiple queries with the same client are batched (if `requesterId` is also the same).
|
||||
*/
|
||||
searchClient: SearchClient;
|
||||
/**
|
||||
* Identifies requesters to confirm their queries should be batched.
|
||||
* This ensures that requesters with the same client but different
|
||||
* post-processing functions don't get batched.
|
||||
* When falsy, batching is disabled.
|
||||
* For example, the Algolia requesters use "algolia".
|
||||
*/
|
||||
requesterId?: string;
|
||||
/**
|
||||
* The search parameters used for this query.
|
||||
*/
|
||||
queries: MultipleQueriesQuery[];
|
||||
/**
|
||||
* Transforms the response of this search before returning it to the caller.
|
||||
*/
|
||||
transformResponse: TransformResponse<THit>;
|
||||
/**
|
||||
* Post-processing function for multi-queries.
|
||||
*/
|
||||
execute: Execute<THit>;
|
||||
};
|
||||
export {};
|
1
node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.js
generated
vendored
Normal file
1
node_modules/@algolia/autocomplete-shared/dist/esm/preset-algolia/createRequester.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
Reference in New Issue
Block a user