algoliasearch
- Version 5.42.0
- Published
- 1.6 MB
- 14 dependencies
- MIT license
Install
npm i algoliasearchyarn add algoliasearchpnpm add algoliasearchOverview
A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.
Index
Functions
function algoliasearch
algoliasearch: (    appId: string,    apiKey: string,    options?: (ClientOptions & TransformationOptions) | undefined) => Algoliasearch;Type Aliases
type Algoliasearch
type Algoliasearch = SearchClient & {    initAbtesting: (        initOptions: InitClientOptions & RegionOptions$1    ) => AbtestingClient;    initAbtestingV3: (        initOptions: InitClientOptions & RegionOptions$2    ) => AbtestingV3Client;    initAnalytics: (        initOptions: InitClientOptions & RegionOptions$3    ) => AnalyticsClient;    initIngestion: (        initOptions: InitClientOptions & RegionOptions$4    ) => IngestionClient;    initInsights: (        initOptions: InitClientOptions & RegionOptions$5    ) => InsightsClient;    initMonitoring: (initOptions?: InitClientOptions) => MonitoringClient;    initPersonalization: (        initOptions: InitClientOptions & RegionOptions$6    ) => PersonalizationClient;    initQuerySuggestions: (        initOptions: InitClientOptions & RegionOptions$7    ) => QuerySuggestionsClient;    initRecommend: (initOptions?: InitClientOptions) => RecommendClient;    /**     * Helper: Similar to the `saveObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.     *     * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup using the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).     * @param saveObjects - The `saveObjects` object.     * @param saveObjects.indexName - The `indexName` to save `objects` in.     * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.     * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.     * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.     * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.     */    saveObjectsWithTransformation: (        options: SaveObjectsOptions,        requestOptions?: RequestOptions | undefined    ) => Promise<Array<WatchResponse>>;    /**     * Helper: Similar to the `partialUpdateObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.     *     * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).     * @param partialUpdateObjects - The `partialUpdateObjects` object.     * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.     * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.     * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.     * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.     * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.     * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.     */    partialUpdateObjectsWithTransformation: (        options: PartialUpdateObjectsOptions,        requestOptions?: RequestOptions | undefined    ) => Promise<Array<WatchResponse>>;    /**     * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.     *     * @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data.     * @param replaceAllObjects - The `replaceAllObjects` object.     * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.     * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.     * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.     * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].     * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions.     */    replaceAllObjectsWithTransformation: (        options: ReplaceAllObjectsOptions,        requestOptions?: RequestOptions | undefined    ) => Promise<ReplaceAllObjectsWithTransformationResponse>;};type InitClientOptions
type InitClientOptions = Partial<{    /**     * App to target with the initialized client, defaults to the `algoliasearch` appId.     */    appId: string;    /**     * API key of the targeted app ID, defaults to the `algoliasearch` apiKey.     */    apiKey: string;    options: ClientOptions;}>;- Options forwarded to the client initialized via the - initmethod.
type Region
type Region =    | Region$1    | Region$2    | Region$3    | Region$4    | Region$5    | Region$6    | Region$7;type RegionOptions
type RegionOptions =    | RegionOptions$1    | RegionOptions$2    | RegionOptions$3    | RegionOptions$4    | RegionOptions$5    | RegionOptions$6    | RegionOptions$7;type TransformationOptions
type TransformationOptions = {    transformation?:        | {              region: Region$4;          }        | undefined;};Package Files (2)
Dependencies (14)
- @algolia/abtesting
- @algolia/client-abtesting
- @algolia/client-analytics
- @algolia/client-common
- @algolia/client-insights
- @algolia/client-personalization
- @algolia/client-query-suggestions
- @algolia/client-search
- @algolia/ingestion
- @algolia/monitoring
- @algolia/recommend
- @algolia/requester-browser-xhr
- @algolia/requester-fetch
- @algolia/requester-node-http
Dev Dependencies (11)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/algoliasearch.
- Markdown[](https://www.jsdocs.io/package/algoliasearch)
- HTML<a href="https://www.jsdocs.io/package/algoliasearch"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
 Package analyzed in 3831 ms.
- Missing or incorrect documentation? Open an issue for this package.
