import { ABTest } from '@algolia/client-analytics'; import { AddABTestResponse } from '@algolia/client-analytics'; import { AddApiKeyOptions } from '@algolia/client-search'; import { AddApiKeyResponse } from '@algolia/client-search'; import { AnalyticsClient as AnalyticsClient_2 } from '@algolia/client-analytics'; import { AnalyticsClientOptions } from '@algolia/client-analytics'; import { ApiKeyACLType } from '@algolia/client-search'; import { AssignUserIDResponse } from '@algolia/client-search'; import { AssignUserIDsResponse } from '@algolia/client-search'; import { BatchRequest } from '@algolia/client-search'; import { BatchResponse } from '@algolia/client-search'; import { BrowseOptions } from '@algolia/client-search'; import { ChunkedBatchResponse } from '@algolia/client-search'; import { ChunkOptions } from '@algolia/client-search'; import { ClearRulesOptions } from '@algolia/client-search'; import { ClearSynonymsOptions } from '@algolia/client-search'; import { ClientTransporterOptions } from '@algolia/client-common'; import { CopyIndexOptions } from '@algolia/client-search'; import { DeleteABTestResponse } from '@algolia/client-analytics'; import { DeleteApiKeyResponse } from '@algolia/client-search'; import { DeleteByFiltersOptions } from '@algolia/client-search'; import { DeleteResponse } from '@algolia/client-search'; import { DeleteSynonymOptions } from '@algolia/client-search'; import { Destroyable } from '@algolia/requester-common'; import { DictionaryEntriesOptions } from '@algolia/client-search'; import { DictionaryEntriesResponse } from '@algolia/client-search'; import { DictionaryEntry } from '@algolia/client-search'; import { DictionaryName } from '@algolia/client-search'; import { DictionarySettings } from '@algolia/client-search'; import { FindAnswersOptions } from '@algolia/client-search'; import { FindAnswersResponse } from '@algolia/client-search'; import { FindObjectOptions } from '@algolia/client-search'; import { FindObjectResponse } from '@algolia/client-search'; import { GetABTestResponse } from '@algolia/client-analytics'; import { GetABTestsOptions } from '@algolia/client-analytics'; import { GetABTestsResponse } from '@algolia/client-analytics'; import { GetApiKeyResponse } from '@algolia/client-search'; import { GetDictionarySettingsResponse } from '@algolia/client-search'; import { GetLogsResponse } from '@algolia/client-search'; import { GetObjectOptions } from '@algolia/client-search'; import { GetObjectsOptions } from '@algolia/client-search'; import { GetObjectsResponse } from '@algolia/client-search'; import { GetPersonalizationStrategyResponse } from '@algolia/client-personalization'; import { GetTopUserIDsResponse } from '@algolia/client-search'; import { HasPendingMappingsOptions } from '@algolia/client-search'; import { HasPendingMappingsResponse } from '@algolia/client-search'; import { IndexOperationResponse } from '@algolia/client-search'; import { ListApiKeysResponse } from '@algolia/client-search'; import { ListClustersResponse } from '@algolia/client-search'; import { ListIndicesResponse } from '@algolia/client-search'; import { ListUserIDsOptions } from '@algolia/client-search'; import { ListUserIDsResponse } from '@algolia/client-search'; import { MultipleBatchRequest } from '@algolia/client-search'; import { MultipleBatchResponse } from '@algolia/client-search'; import { MultipleGetObject } from '@algolia/client-search'; import { MultipleGetObjectsResponse } from '@algolia/client-search'; import { MultipleQueriesOptions } from '@algolia/client-search'; import { MultipleQueriesQuery } from '@algolia/client-search'; import { MultipleQueriesResponse } from '@algolia/client-search'; import { ObjectWithObjectID } from '@algolia/client-search'; import { PartialUpdateObjectResponse } from '@algolia/client-search'; import { PartialUpdateObjectsOptions } from '@algolia/client-search'; import { PersonalizationClient as PersonalizationClient_2 } from '@algolia/client-personalization'; import { PersonalizationClientOptions } from '@algolia/client-personalization'; import { PersonalizationStrategy } from '@algolia/client-personalization'; import { RemoveUserIDResponse } from '@algolia/client-search'; import { ReplaceAllObjectsOptions } from '@algolia/client-search'; import { Request } from '@algolia/transporter'; import { RequestOptions } from '@algolia/transporter'; import { RestoreApiKeyResponse } from '@algolia/client-search'; import { Rule } from '@algolia/client-search'; import { SaveObjectResponse } from '@algolia/client-search'; import { SaveObjectsOptions } from '@algolia/client-search'; import { SaveRuleResponse } from '@algolia/client-search'; import { SaveRulesOptions } from '@algolia/client-search'; import { SaveRulesResponse } from '@algolia/client-search'; import { SaveSynonymResponse } from '@algolia/client-search'; import { SaveSynonymsOptions } from '@algolia/client-search'; import { SaveSynonymsResponse } from '@algolia/client-search'; import { SearchClient as SearchClient_2 } from '@algolia/client-search'; import { SearchClientOptions } from '@algolia/client-search'; import { SearchDictionaryEntriesResponse } from '@algolia/client-search'; import { SearchForFacetValuesQueryParams } from '@algolia/client-search'; import { SearchForFacetValuesResponse } from '@algolia/client-search'; import { SearchIndex as SearchIndex_2 } from '@algolia/client-search'; import { SearchOptions } from '@algolia/client-search'; import { SearchResponse } from '@algolia/client-search'; import { SearchRulesOptions } from '@algolia/client-search'; import { SearchSynonymsOptions } from '@algolia/client-search'; import { SearchSynonymsResponse } from '@algolia/client-search'; import { SearchUserIDsOptions } from '@algolia/client-search'; import { SearchUserIDsResponse } from '@algolia/client-search'; import { SecuredApiKeyRestrictions } from '@algolia/client-search'; import { SetPersonalizationStrategyResponse } from '@algolia/client-personalization'; import { SetSettingsResponse } from '@algolia/client-search'; import { Settings } from '@algolia/client-search'; import { StopABTestResponse } from '@algolia/client-analytics'; import { Synonym } from '@algolia/client-search'; import { TaskStatusResponse } from '@algolia/client-search'; import { UpdateApiKeyOptions } from '@algolia/client-search'; import { UpdateApiKeyResponse } from '@algolia/client-search'; import { UserIDResponse } from '@algolia/client-search'; import { WaitablePromise } from '@algolia/client-common'; declare function algoliasearch(appId: string, apiKey: string, options?: AlgoliaSearchOptions): SearchClient; declare namespace algoliasearch { var version: string; } export default algoliasearch; export declare type AlgoliaSearchOptions = Partial & WithoutCredentials; export declare type AnalyticsClient = AnalyticsClient_2 & { readonly addABTest: (abTest: ABTest, requestOptions?: RequestOptions) => Readonly>; readonly getABTest: (abTestID: number, requestOptions?: RequestOptions) => Readonly>; readonly getABTests: (requestOptions?: RequestOptions & GetABTestsOptions) => Readonly>; readonly stopABTest: (abTestID: number, requestOptions?: RequestOptions) => Readonly>; readonly deleteABTest: (abTestID: number, requestOptions?: RequestOptions) => Readonly>; }; declare type Credentials = { readonly appId: string; readonly apiKey: string; }; export declare type InitAnalyticsOptions = Partial & OptionalCredentials; export declare type InitPersonalizationOptions = Partial & OptionalCredentials; /** * @deprecated Use `InitPersonalizationOptions` instead. */ export declare type InitRecommendationOptions = InitPersonalizationOptions; export declare type OptionalCredentials = Omit & Pick, keyof Credentials>; export declare type PersonalizationClient = PersonalizationClient_2 & { readonly getPersonalizationStrategy: (requestOptions?: RequestOptions) => Readonly>; readonly setPersonalizationStrategy: (personalizationStrategy: PersonalizationStrategy, requestOptions?: RequestOptions) => Readonly>; }; /** * @deprecated Use `PersonalizationClient` instead. */ export declare type RecommendationClient = PersonalizationClient; export declare type SearchClient = SearchClient_2 & { readonly initIndex: (indexName: string) => SearchIndex; readonly search: (queries: readonly MultipleQueriesQuery[], requestOptions?: RequestOptions & MultipleQueriesOptions) => Readonly>>; readonly searchForFacetValues: (queries: ReadonlyArray<{ readonly indexName: string; readonly params: SearchForFacetValuesQueryParams & SearchOptions; }>, requestOptions?: RequestOptions) => Readonly>; readonly multipleBatch: (requests: readonly MultipleBatchRequest[], requestOptions?: RequestOptions) => Readonly>; readonly multipleGetObjects: (requests: readonly MultipleGetObject[], requestOptions?: RequestOptions) => Readonly>>; readonly multipleQueries: (queries: readonly MultipleQueriesQuery[], requestOptions?: RequestOptions & MultipleQueriesOptions) => Readonly>>; readonly copyIndex: (from: string, to: string, requestOptions?: CopyIndexOptions & RequestOptions) => Readonly>; readonly copySettings: (from: string, to: string, requestOptions?: RequestOptions) => Readonly>; readonly copyRules: (from: string, to: string, requestOptions?: RequestOptions) => Readonly>; readonly copySynonyms: (from: string, to: string, requestOptions?: RequestOptions) => Readonly>; readonly moveIndex: (from: string, to: string, requestOptions?: RequestOptions) => Readonly>; readonly listIndices: (requestOptions?: RequestOptions) => Readonly>; readonly getLogs: (requestOptions?: RequestOptions) => Readonly>; readonly listClusters: (requestOptions?: RequestOptions) => Readonly>; readonly multipleSearchForFacetValues: (queries: ReadonlyArray<{ readonly indexName: string; readonly params: SearchForFacetValuesQueryParams & SearchOptions; }>, requestOptions?: RequestOptions) => Readonly>; readonly getApiKey: (apiKey: string, requestOptions?: RequestOptions) => Readonly>; readonly addApiKey: (acl: readonly ApiKeyACLType[], requestOptions?: AddApiKeyOptions & Pick>) => Readonly>; readonly listApiKeys: (requestOptions?: RequestOptions) => Readonly>; readonly updateApiKey: (apiKey: string, requestOptions?: UpdateApiKeyOptions & Pick>) => Readonly>; readonly deleteApiKey: (apiKey: string, requestOptions?: RequestOptions) => Readonly>; readonly restoreApiKey: (apiKey: string, requestOptions?: RequestOptions) => Readonly>; readonly assignUserID: (userID: string, clusterName: string, requestOptions?: RequestOptions) => Readonly>; readonly assignUserIDs: (userIDs: readonly string[], clusterName: string, requestOptions?: RequestOptions) => Readonly>; readonly getUserID: (userID: string, requestOptions?: RequestOptions) => Readonly>; readonly searchUserIDs: (query: string, requestOptions?: SearchUserIDsOptions & RequestOptions) => Readonly>; readonly listUserIDs: (requestOptions?: ListUserIDsOptions & RequestOptions) => Readonly>; readonly getTopUserIDs: (requestOptions?: RequestOptions) => Readonly>; readonly removeUserID: (userID: string, requestOptions?: RequestOptions) => Readonly>; readonly hasPendingMappings: (requestOptions?: HasPendingMappingsOptions & RequestOptions) => Readonly>; readonly generateSecuredApiKey: (parentApiKey: string, restrictions: SecuredApiKeyRestrictions) => string; readonly getSecuredApiKeyRemainingValidity: (securedApiKey: string) => number; readonly clearDictionaryEntries: (dictionary: DictionaryName, requestOptions?: RequestOptions & DictionaryEntriesOptions) => Readonly>; readonly deleteDictionaryEntries: (dictionary: DictionaryName, objectIDs: readonly string[], requestOptions?: RequestOptions & DictionaryEntriesOptions) => Readonly>; readonly replaceDictionaryEntries: (dictionary: DictionaryName, entries: readonly DictionaryEntry[], requestOptions?: RequestOptions & DictionaryEntriesOptions) => Readonly>; readonly saveDictionaryEntries: (dictionary: DictionaryName, entries: readonly DictionaryEntry[], requestOptions?: RequestOptions & DictionaryEntriesOptions) => Readonly>; readonly searchDictionaryEntries: (dictionary: DictionaryName, query: string, requestOptions?: RequestOptions) => Readonly>; readonly getDictionarySettings: (requestOptions?: RequestOptions) => Readonly>; readonly setDictionarySettings: (settings: DictionarySettings, requestOptions?: RequestOptions) => Readonly>; readonly getAppTask: (taskID: number, requestOptions?: RequestOptions) => Readonly>; readonly customRequest: (request: Request, requestOptions?: RequestOptions) => Readonly>; readonly initAnalytics: (options?: InitAnalyticsOptions) => AnalyticsClient; readonly initPersonalization: (options?: InitPersonalizationOptions) => PersonalizationClient; /** * @deprecated Use `initPersonalization` instead. */ readonly initRecommendation: (options?: InitPersonalizationOptions) => PersonalizationClient; } & Destroyable; export declare type SearchIndex = SearchIndex_2 & { readonly search: (query: string, requestOptions?: RequestOptions & SearchOptions) => Readonly>>; readonly searchForFacetValues: (facetName: string, facetQuery: string, requestOptions?: RequestOptions & SearchOptions) => Readonly>; readonly findAnswers: (query: string, queryLanguages: readonly string[], requestOptions?: RequestOptions & FindAnswersOptions) => Readonly>>; readonly batch: (requests: readonly BatchRequest[], requestOptions?: RequestOptions) => Readonly>; readonly delete: (requestOptions?: RequestOptions) => Readonly>; readonly getObject: (objectID: string, requestOptions?: RequestOptions & GetObjectOptions) => Readonly>; readonly getObjects: (objectIDs: readonly string[], requestOptions?: RequestOptions & GetObjectsOptions) => Readonly>>; readonly saveObject: (object: Readonly>, requestOptions?: RequestOptions & ChunkOptions & SaveObjectsOptions) => Readonly>; readonly saveObjects: (objects: ReadonlyArray>>, requestOptions?: RequestOptions & ChunkOptions & SaveObjectsOptions) => Readonly>; readonly waitTask: (taskID: number, requestOptions?: RequestOptions) => Readonly>; readonly setSettings: (settings: Settings, requestOptions?: RequestOptions) => Readonly>; readonly getSettings: (requestOptions?: RequestOptions) => Readonly>; readonly partialUpdateObject: (object: Record, requestOptions?: RequestOptions & ChunkOptions & PartialUpdateObjectsOptions) => Readonly>; readonly partialUpdateObjects: (objects: ReadonlyArray>, requestOptions?: RequestOptions & ChunkOptions & PartialUpdateObjectsOptions) => Readonly>; readonly deleteObject: (objectID: string, requestOptions?: RequestOptions) => Readonly>; readonly deleteObjects: (objectIDs: readonly string[], requestOptions?: RequestOptions & ChunkOptions) => Readonly>; readonly deleteBy: (filters: DeleteByFiltersOptions, requestOptions?: RequestOptions) => Readonly>; readonly clearObjects: (requestOptions?: RequestOptions) => Readonly>; readonly browseObjects: (requestOptions?: SearchOptions & BrowseOptions & RequestOptions) => Readonly>; readonly getObjectPosition: (searchResponse: SearchResponse<{}>, objectID: string) => number; readonly findObject: (callback: (object: TObject & ObjectWithObjectID) => boolean, requestOptions?: FindObjectOptions & RequestOptions) => Readonly>>; readonly exists: (requestOptions?: RequestOptions) => Readonly>; readonly saveSynonym: (synonym: Synonym, requestOptions?: RequestOptions & SaveSynonymsOptions) => Readonly>; readonly saveSynonyms: (synonyms: readonly Synonym[], requestOptions?: SaveSynonymsOptions & RequestOptions) => Readonly>; readonly getSynonym: (objectID: string, requestOptions?: RequestOptions) => Readonly>; readonly searchSynonyms: (query: string, requestOptions?: SearchSynonymsOptions & RequestOptions) => Readonly>; readonly browseSynonyms: (requestOptions?: SearchSynonymsOptions & BrowseOptions & RequestOptions) => Readonly>; readonly deleteSynonym: (objectID: string, requestOptions?: DeleteSynonymOptions & RequestOptions) => Readonly>; readonly clearSynonyms: (requestOptions?: ClearSynonymsOptions & RequestOptions) => Readonly>; readonly replaceAllObjects: (objects: ReadonlyArray>>, requestOptions?: ReplaceAllObjectsOptions & ChunkOptions & SaveObjectsOptions & RequestOptions) => Readonly>; readonly replaceAllSynonyms: (synonyms: readonly Synonym[], requestOptions?: RequestOptions & Pick>) => Readonly>; readonly searchRules: (query: string, requestOptions?: RequestOptions & SearchRulesOptions) => Readonly>>; readonly getRule: (objectID: string, requestOptions?: RequestOptions) => Readonly>; readonly deleteRule: (objectID: string, requestOptions?: RequestOptions) => Readonly>; readonly saveRule: (rule: Rule, requestOptions?: RequestOptions & SaveRulesOptions) => Readonly>; readonly saveRules: (rules: readonly Rule[], requestOptions?: RequestOptions & SaveRulesOptions) => Readonly>; readonly replaceAllRules: (rules: readonly Rule[], requestOptions?: RequestOptions & SaveRulesOptions) => Readonly>; readonly browseRules: (requestOptions?: SearchRulesOptions & BrowseOptions & RequestOptions) => Readonly>; readonly clearRules: (requestOptions?: RequestOptions & ClearRulesOptions) => Readonly>; }; export declare type WithoutCredentials = Omit; export { }