algoliasearch 5.39.0 → 5.40.1
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/README.md +9 -10
- package/dist/algoliasearch.umd.js +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/fetch.js.map +1 -1
- package/dist/lite/browser.d.ts +42 -42
- package/dist/lite/builds/browser.js +1 -1
- package/dist/lite/builds/browser.js.map +1 -1
- package/dist/lite/builds/browser.min.js +1 -1
- package/dist/lite/builds/browser.min.js.map +1 -1
- package/dist/lite/builds/browser.umd.js +1 -1
- package/dist/lite/builds/node.cjs +1 -1
- package/dist/lite/builds/node.cjs.map +1 -1
- package/dist/lite/builds/node.js +1 -1
- package/dist/lite/builds/node.js.map +1 -1
- package/dist/lite/node.d.cts +42 -42
- package/dist/lite/node.d.ts +42 -42
- package/dist/lite/src/liteClient.cjs +1 -1
- package/dist/lite/src/liteClient.cjs.map +1 -1
- package/dist/lite/src/liteClient.js +1 -1
- package/dist/lite/src/liteClient.js.map +1 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js.map +1 -1
- package/dist/worker.d.ts +1 -1
- package/dist/worker.js.map +1 -1
- package/package.json +22 -22
- package/dist/fetch.d.ts +0 -104
- package/dist/node.d.cts +0 -104
package/dist/fetch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../builds/fetch.ts","../builds/models.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type { ClientOptions, RequestOptions } from '@algolia/client-common';\n\nimport type { AbtestingV3Client } from '@algolia/abtesting';\nimport { abtestingV3Client } from '@algolia/abtesting';\nimport type { AbtestingClient } from '@algolia/client-abtesting';\nimport { abtestingClient } from '@algolia/client-abtesting';\nimport type { AnalyticsClient } from '@algolia/client-analytics';\nimport { analyticsClient } from '@algolia/client-analytics';\nimport type { InsightsClient } from '@algolia/client-insights';\nimport { insightsClient } from '@algolia/client-insights';\nimport type { PersonalizationClient } from '@algolia/client-personalization';\nimport { personalizationClient } from '@algolia/client-personalization';\nimport type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';\nimport { querySuggestionsClient } from '@algolia/client-query-suggestions';\nimport type { SearchClient } from '@algolia/client-search';\nimport { searchClient } from '@algolia/client-search';\nimport type { IngestionClient } from '@algolia/ingestion';\nimport { ingestionClient } from '@algolia/ingestion';\nimport type { MonitoringClient } from '@algolia/monitoring';\nimport { monitoringClient } from '@algolia/monitoring';\nimport type { RecommendClient } from '@algolia/recommend';\nimport { recommendClient } from '@algolia/recommend';\n\nimport type {\n PartialUpdateObjectsOptions,\n ReplaceAllObjectsOptions,\n ReplaceAllObjectsWithTransformationResponse,\n SaveObjectsOptions,\n} from '@algolia/client-search';\nimport type { WatchResponse } from '@algolia/ingestion';\n\nimport type {\n AbtestingRegionOptions,\n AbtestingV3RegionOptions,\n AnalyticsRegionOptions,\n IngestionRegion,\n IngestionRegionOptions,\n InitClientOptions,\n InsightsRegionOptions,\n PersonalizationRegionOptions,\n QuerySuggestionsRegionOptions,\n} from './models';\n\nexport * from './models';\n\nexport type Algoliasearch = SearchClient & {\n initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;\n initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions) => AbtestingV3Client;\n initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;\n initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;\n initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;\n initMonitoring: (initOptions?: InitClientOptions) => MonitoringClient;\n initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions) => PersonalizationClient;\n initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions) => QuerySuggestionsClient;\n initRecommend: (initOptions?: InitClientOptions) => RecommendClient;\n\n // Bridge helpers to expose along with the search endpoints at the root of the API client\n\n /**\n * 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.\n *\n * @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/).\n * @param saveObjects - The `saveObjects` object.\n * @param saveObjects.indexName - The `indexName` to save `objects` in.\n * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @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.\n * @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.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n saveObjectsWithTransformation: (\n options: SaveObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * 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.\n *\n * @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/).\n * @param partialUpdateObjects - The `partialUpdateObjects` object.\n * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.\n * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.\n * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..\n * @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.\n * @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.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n partialUpdateObjectsWithTransformation: (\n options: PartialUpdateObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * 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.\n *\n * @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.\n * @param replaceAllObjects - The `replaceAllObjects` object.\n * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.\n * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @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.\n * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].\n * @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.\n */\n replaceAllObjectsWithTransformation: (\n options: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<ReplaceAllObjectsWithTransformationResponse>;\n};\n\nexport type TransformationOptions = {\n // When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n transformation?:\n | {\n // The region of your Algolia application ID, used to target the correct hosts of the transformation service.\n region: IngestionRegion;\n }\n | undefined;\n};\n\nexport function algoliasearch(\n appId: string,\n apiKey: string,\n options?: (ClientOptions & TransformationOptions) | undefined,\n): Algoliasearch {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n const client = searchClient(appId, apiKey, options);\n\n let ingestionTransporter: IngestionClient | undefined;\n\n if (options?.transformation) {\n if (!options.transformation.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n ingestionTransporter = ingestionClient(appId, apiKey, options.transformation.region, options);\n }\n\n return {\n ...client,\n\n async saveObjectsWithTransformation(\n { indexName, objects, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n { indexName, objects, action: 'addObject', waitForTasks },\n requestOptions,\n );\n },\n\n async partialUpdateObjectsWithTransformation(\n { indexName, objects, createIfNotExists, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n {\n indexName,\n objects,\n action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate',\n waitForTasks,\n },\n requestOptions,\n );\n },\n\n async replaceAllObjectsWithTransformation(\n { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ): Promise<ReplaceAllObjectsWithTransformationResponse> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n\n if (scopes === undefined) {\n scopes = ['settings', 'rules', 'synonyms'];\n }\n\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n\n const watchResponses = await ingestionTransporter.chunkedPush(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName },\n requestOptions,\n );\n\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: 'move', destination: indexName },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID,\n });\n\n return { copyOperationResponse, watchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n\n throw error;\n }\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return client.transporter.algoliaAgent.value;\n },\n\n initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions): AbtestingClient => {\n return abtestingClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions): AbtestingV3Client => {\n return abtestingV3Client(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions): AnalyticsClient => {\n return analyticsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {\n return ingestionClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initInsights: (initOptions: InitClientOptions & InsightsRegionOptions): InsightsClient => {\n return insightsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initMonitoring: (initOptions: InitClientOptions = {}): MonitoringClient => {\n return monitoringClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n\n initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions): PersonalizationClient => {\n return personalizationClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions): QuerySuggestionsClient => {\n return querySuggestionsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initRecommend: (initOptions: InitClientOptions = {}): RecommendClient => {\n return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n };\n}\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type { Region as AbtestingV3Region, RegionOptions as AbtestingV3RegionOptions } from '@algolia/abtesting';\nimport type { Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions } from '@algolia/client-abtesting';\nimport type { Region as AnalyticsRegion, RegionOptions as AnalyticsRegionOptions } from '@algolia/client-analytics';\nimport type { Region as InsightsRegion, RegionOptions as InsightsRegionOptions } from '@algolia/client-insights';\nimport type { Region as IngestionRegion, RegionOptions as IngestionRegionOptions } from '@algolia/ingestion';\n\nimport type {\n Region as PersonalizationRegion,\n RegionOptions as PersonalizationRegionOptions,\n} from '@algolia/client-personalization';\nimport type {\n Region as QuerySuggestionsRegion,\n RegionOptions as QuerySuggestionsRegionOptions,\n} from '@algolia/client-query-suggestions';\n\nimport type { Direction } from '@algolia/client-analytics';\nimport type { ClientOptions } from '@algolia/client-common';\nimport type { EventType } from '@algolia/client-personalization';\nimport type {\n Action,\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n Banner,\n BannerImage,\n BannerImageUrl,\n BannerLink,\n BaseIndexSettings,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n MatchLevel,\n MatchedGeoLocation,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Widgets,\n} from '@algolia/client-search';\nimport { apiClientVersion } from '@algolia/client-search';\nimport type { Event, EventStatus, WatchResponse } from '@algolia/ingestion';\n\nimport type {\n ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n AddABTestsRequest,\n AddABTestsVariant,\n CustomSearchParams,\n DeleteABTestProps,\n EffectMetric,\n EmptySearchFilter,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n FilterEffects,\n GetABTestProps,\n ListABTestsProps,\n ListABTestsResponse,\n MinimumDetectableEffect,\n OutliersFilter,\n ScheduleABTestResponse,\n ScheduleABTestsRequest,\n Status,\n StopABTestProps,\n Variant,\n} from '@algolia/client-abtesting';\n\nexport * from '@algolia/abtesting';\nexport * from '@algolia/client-abtesting';\nexport * from '@algolia/client-analytics';\nexport * from '@algolia/client-insights';\nexport * from '@algolia/client-personalization';\nexport * from '@algolia/client-query-suggestions';\nexport * from '@algolia/client-search';\nexport * from '@algolia/ingestion';\nexport * from '@algolia/monitoring';\nexport * from '@algolia/recommend';\n\nexport type Region =\n | AbtestingRegion\n | AbtestingV3Region\n | AnalyticsRegion\n | IngestionRegion\n | InsightsRegion\n | PersonalizationRegion\n | QuerySuggestionsRegion;\nexport type RegionOptions =\n | AbtestingRegionOptions\n | AbtestingV3RegionOptions\n | AnalyticsRegionOptions\n | IngestionRegionOptions\n | InsightsRegionOptions\n | PersonalizationRegionOptions\n | QuerySuggestionsRegionOptions;\n\nexport type {\n AbtestingRegion,\n AbtestingRegionOptions,\n AbtestingV3Region,\n AbtestingV3RegionOptions,\n AnalyticsRegion,\n AnalyticsRegionOptions,\n EventType,\n IngestionRegion,\n IngestionRegionOptions,\n InsightsRegion,\n InsightsRegionOptions,\n PersonalizationRegion,\n PersonalizationRegionOptions,\n QuerySuggestionsRegion,\n QuerySuggestionsRegionOptions,\n Status,\n};\n\nexport type {\n ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n Action,\n AddABTestsRequest,\n AddABTestsVariant,\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n Banner,\n BannerImage,\n BannerImageUrl,\n BannerLink,\n BaseIndexSettings,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n CustomSearchParams,\n DeleteABTestProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Direction,\n Distinct,\n Edit,\n EditType,\n EffectMetric,\n EmptySearchFilter,\n ErrorBase,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n Event,\n EventStatus,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n FilterEffects,\n GetABTestProps,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n ListABTestsProps,\n ListABTestsResponse,\n MatchLevel,\n MatchedGeoLocation,\n MinimumDetectableEffect,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n OutliersFilter,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n ScheduleABTestResponse,\n ScheduleABTestsRequest,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n StopABTestProps,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Variant,\n WatchResponse,\n Widgets,\n};\n\nexport { apiClientVersion };\n\n/**\n * Options forwarded to the client initialized via the `init` method.\n */\nexport type InitClientOptions = Partial<{\n /**\n * App to target with the initialized client, defaults to the `algoliasearch` appId.\n */\n appId: string;\n /**\n * API key of the targeted app ID, defaults to the `algoliasearch` apiKey.\n */\n apiKey: string;\n options: ClientOptions;\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,SAAS,yBAAyB;AAElC,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;AAEhC,SAAS,sBAAsB;AAE/B,SAAS,6BAA6B;AAEtC,SAAS,8BAA8B;AAEvC,SAAS,oBAAoB;AAE7B,SAAS,uBAAuB;AAEhC,SAAS,wBAAwB;AAEjC,SAAS,uBAAuB;;;ACvBhC;AAAA;AAAA;AAAA;AAkJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxCA,SAAS,wBAAwB;AA+BjC,gCAAc;AACd,uCAAc;AACd,uCAAc;AACd,sCAAc;AACd,6CAAc;AACd,+CAAc;AACd,oCAAc;AACd,gCAAc;AACd,iCAAc;AACd,gCAAc;;;AD9Gd,0BAAc;AA2EP,SAAS,cACd,OACA,QACA,SACe;AACf,MAAI,CAAC,SAAS,OAAO,UAAU,UAAU;AACvC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AAEA,MAAI,CAAC,UAAU,OAAO,WAAW,UAAU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UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,eAAe,CAAC,cAAiC,CAAC,MAAuB;AACvE,aAAO,gBAAgB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,IACtG;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../builds/fetch.ts","../builds/models.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type { ClientOptions, RequestOptions } from '@algolia/client-common';\n\nimport type { AbtestingV3Client } from '@algolia/abtesting';\nimport { abtestingV3Client } from '@algolia/abtesting';\nimport type { AbtestingClient } from '@algolia/client-abtesting';\nimport { abtestingClient } from '@algolia/client-abtesting';\nimport type { AnalyticsClient } from '@algolia/client-analytics';\nimport { analyticsClient } from '@algolia/client-analytics';\nimport type { InsightsClient } from '@algolia/client-insights';\nimport { insightsClient } from '@algolia/client-insights';\nimport type { PersonalizationClient } from '@algolia/client-personalization';\nimport { personalizationClient } from '@algolia/client-personalization';\nimport type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';\nimport { querySuggestionsClient } from '@algolia/client-query-suggestions';\nimport type { SearchClient } from '@algolia/client-search';\nimport { searchClient } from '@algolia/client-search';\nimport type { IngestionClient } from '@algolia/ingestion';\nimport { ingestionClient } from '@algolia/ingestion';\nimport type { MonitoringClient } from '@algolia/monitoring';\nimport { monitoringClient } from '@algolia/monitoring';\nimport type { RecommendClient } from '@algolia/recommend';\nimport { recommendClient } from '@algolia/recommend';\n\nimport type {\n PartialUpdateObjectsOptions,\n ReplaceAllObjectsOptions,\n ReplaceAllObjectsWithTransformationResponse,\n SaveObjectsOptions,\n} from '@algolia/client-search';\nimport type { WatchResponse } from '@algolia/ingestion';\n\nimport type {\n AbtestingRegionOptions,\n AbtestingV3RegionOptions,\n AnalyticsRegionOptions,\n IngestionRegion,\n IngestionRegionOptions,\n InitClientOptions,\n InsightsRegionOptions,\n PersonalizationRegionOptions,\n QuerySuggestionsRegionOptions,\n} from './models';\n\nexport * from './models';\n\nexport type Algoliasearch = SearchClient & {\n initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;\n initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions) => AbtestingV3Client;\n initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;\n initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;\n initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;\n initMonitoring: (initOptions?: InitClientOptions) => MonitoringClient;\n initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions) => PersonalizationClient;\n initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions) => QuerySuggestionsClient;\n initRecommend: (initOptions?: InitClientOptions) => RecommendClient;\n\n // Bridge helpers to expose along with the search endpoints at the root of the API client\n\n /**\n * 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.\n *\n * @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/).\n * @param saveObjects - The `saveObjects` object.\n * @param saveObjects.indexName - The `indexName` to save `objects` in.\n * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @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.\n * @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.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n saveObjectsWithTransformation: (\n options: SaveObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * 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.\n *\n * @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/).\n * @param partialUpdateObjects - The `partialUpdateObjects` object.\n * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.\n * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.\n * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.\n * @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.\n * @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.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n partialUpdateObjectsWithTransformation: (\n options: PartialUpdateObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * 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.\n *\n * @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.\n * @param replaceAllObjects - The `replaceAllObjects` object.\n * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.\n * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @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.\n * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].\n * @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.\n */\n replaceAllObjectsWithTransformation: (\n options: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<ReplaceAllObjectsWithTransformationResponse>;\n};\n\nexport type TransformationOptions = {\n // When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n transformation?:\n | {\n // The region of your Algolia application ID, used to target the correct hosts of the transformation service.\n region: IngestionRegion;\n }\n | undefined;\n};\n\nexport function algoliasearch(\n appId: string,\n apiKey: string,\n options?: (ClientOptions & TransformationOptions) | undefined,\n): Algoliasearch {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n const client = searchClient(appId, apiKey, options);\n\n let ingestionTransporter: IngestionClient | undefined;\n\n if (options?.transformation) {\n if (!options.transformation.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n ingestionTransporter = ingestionClient(appId, apiKey, options.transformation.region, options);\n }\n\n return {\n ...client,\n\n async saveObjectsWithTransformation(\n { indexName, objects, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n { indexName, objects, action: 'addObject', waitForTasks },\n requestOptions,\n );\n },\n\n async partialUpdateObjectsWithTransformation(\n { indexName, objects, createIfNotExists, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n {\n indexName,\n objects,\n action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate',\n waitForTasks,\n },\n requestOptions,\n );\n },\n\n async replaceAllObjectsWithTransformation(\n { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ): Promise<ReplaceAllObjectsWithTransformationResponse> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n\n if (scopes === undefined) {\n scopes = ['settings', 'rules', 'synonyms'];\n }\n\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n\n const watchResponses = await ingestionTransporter.chunkedPush(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName },\n requestOptions,\n );\n\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: 'move', destination: indexName },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID,\n });\n\n return { copyOperationResponse, watchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n\n throw error;\n }\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return client.transporter.algoliaAgent.value;\n },\n\n initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions): AbtestingClient => {\n return abtestingClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions): AbtestingV3Client => {\n return abtestingV3Client(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions): AnalyticsClient => {\n return analyticsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {\n return ingestionClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initInsights: (initOptions: InitClientOptions & InsightsRegionOptions): InsightsClient => {\n return insightsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initMonitoring: (initOptions: InitClientOptions = {}): MonitoringClient => {\n return monitoringClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n\n initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions): PersonalizationClient => {\n return personalizationClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions): QuerySuggestionsClient => {\n return querySuggestionsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initRecommend: (initOptions: InitClientOptions = {}): RecommendClient => {\n return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n };\n}\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type { Region as AbtestingV3Region, RegionOptions as AbtestingV3RegionOptions } from '@algolia/abtesting';\nimport type { Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions } from '@algolia/client-abtesting';\nimport type { Region as AnalyticsRegion, RegionOptions as AnalyticsRegionOptions } from '@algolia/client-analytics';\nimport type { Region as InsightsRegion, RegionOptions as InsightsRegionOptions } from '@algolia/client-insights';\nimport type { Region as IngestionRegion, RegionOptions as IngestionRegionOptions } from '@algolia/ingestion';\n\nimport type {\n Region as PersonalizationRegion,\n RegionOptions as PersonalizationRegionOptions,\n} from '@algolia/client-personalization';\nimport type {\n Region as QuerySuggestionsRegion,\n RegionOptions as QuerySuggestionsRegionOptions,\n} from '@algolia/client-query-suggestions';\n\nimport type { Direction } from '@algolia/client-analytics';\nimport type { ClientOptions } from '@algolia/client-common';\nimport type { EventType } from '@algolia/client-personalization';\nimport type {\n Action,\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n Banner,\n BannerImage,\n BannerImageUrl,\n BannerLink,\n BaseIndexSettings,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n MatchLevel,\n MatchedGeoLocation,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Widgets,\n} from '@algolia/client-search';\nimport { apiClientVersion } from '@algolia/client-search';\nimport type { Event, EventStatus, WatchResponse } from '@algolia/ingestion';\n\nimport type {\n ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n AddABTestsRequest,\n AddABTestsVariant,\n CustomSearchParams,\n DeleteABTestProps,\n EffectMetric,\n EmptySearchFilter,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n FilterEffects,\n GetABTestProps,\n ListABTestsProps,\n ListABTestsResponse,\n MinimumDetectableEffect,\n OutliersFilter,\n ScheduleABTestResponse,\n ScheduleABTestsRequest,\n Status,\n StopABTestProps,\n Variant,\n} from '@algolia/client-abtesting';\n\nexport * from '@algolia/abtesting';\nexport * from '@algolia/client-abtesting';\nexport * from '@algolia/client-analytics';\nexport * from '@algolia/client-insights';\nexport * from '@algolia/client-personalization';\nexport * from '@algolia/client-query-suggestions';\nexport * from '@algolia/client-search';\nexport * from '@algolia/ingestion';\nexport * from '@algolia/monitoring';\nexport * from '@algolia/recommend';\n\nexport type Region =\n | AbtestingRegion\n | AbtestingV3Region\n | AnalyticsRegion\n | IngestionRegion\n | InsightsRegion\n | PersonalizationRegion\n | QuerySuggestionsRegion;\nexport type RegionOptions =\n | AbtestingRegionOptions\n | AbtestingV3RegionOptions\n | AnalyticsRegionOptions\n | IngestionRegionOptions\n | InsightsRegionOptions\n | PersonalizationRegionOptions\n | QuerySuggestionsRegionOptions;\n\nexport type {\n AbtestingRegion,\n AbtestingRegionOptions,\n AbtestingV3Region,\n AbtestingV3RegionOptions,\n AnalyticsRegion,\n AnalyticsRegionOptions,\n EventType,\n IngestionRegion,\n IngestionRegionOptions,\n InsightsRegion,\n InsightsRegionOptions,\n PersonalizationRegion,\n PersonalizationRegionOptions,\n QuerySuggestionsRegion,\n QuerySuggestionsRegionOptions,\n Status,\n};\n\nexport type {\n ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n Action,\n AddABTestsRequest,\n AddABTestsVariant,\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n Banner,\n BannerImage,\n BannerImageUrl,\n BannerLink,\n BaseIndexSettings,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n CustomSearchParams,\n DeleteABTestProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Direction,\n Distinct,\n Edit,\n EditType,\n EffectMetric,\n EmptySearchFilter,\n ErrorBase,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n Event,\n EventStatus,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n FilterEffects,\n GetABTestProps,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n ListABTestsProps,\n ListABTestsResponse,\n MatchLevel,\n MatchedGeoLocation,\n MinimumDetectableEffect,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n OutliersFilter,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n ScheduleABTestResponse,\n ScheduleABTestsRequest,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n StopABTestProps,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Variant,\n WatchResponse,\n Widgets,\n};\n\nexport { apiClientVersion };\n\n/**\n * Options forwarded to the client initialized via the `init` method.\n */\nexport type InitClientOptions = Partial<{\n /**\n * App to target with the initialized client, defaults to the `algoliasearch` appId.\n */\n appId: string;\n /**\n * API key of the targeted app ID, defaults to the `algoliasearch` apiKey.\n */\n apiKey: string;\n options: ClientOptions;\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,SAAS,yBAAyB;AAElC,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;AAEhC,SAAS,sBAAsB;AAE/B,SAAS,6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AAA,IAEA,cAAc,CAAC,gBAA2E;AACxF,aAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,gBAAgB,CAAC,cAAiC,CAAC,MAAwB;AACzE,aAAO,iBAAiB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,IACvG;AAAA,IAEA,qBAAqB,CAAC,gBAAyF;AAC7G,aAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,sBAAsB,CAAC,gBAA2F;AAChH,aAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,eAAe,CAAC,cAAiC,CAAC,MAAuB;AACvE,aAAO,gBAAgB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,IACtG;AAAA,EACF;AACF;","names":[]}
|
package/dist/lite/browser.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ type InsideBoundingBox = string | Array<Array<number>>;
|
|
|
43
43
|
type NumericFilters = Array<NumericFilters> | string;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
* Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria
|
|
46
|
+
* Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)). - Optional filters don\'t work with numeric attributes.
|
|
47
47
|
*/
|
|
48
48
|
type OptionalFilters = Array<OptionalFilters> | string;
|
|
49
49
|
|
|
@@ -63,7 +63,7 @@ type BaseRecommendSearchParams = {
|
|
|
63
63
|
*/
|
|
64
64
|
similarQuery?: string | undefined;
|
|
65
65
|
/**
|
|
66
|
-
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering
|
|
66
|
+
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
|
|
67
67
|
*/
|
|
68
68
|
filters?: string | undefined;
|
|
69
69
|
facetFilters?: FacetFilters | undefined;
|
|
@@ -118,7 +118,7 @@ type BaseRecommendSearchParams = {
|
|
|
118
118
|
*/
|
|
119
119
|
personalizationImpact?: number | undefined;
|
|
120
120
|
/**
|
|
121
|
-
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken
|
|
121
|
+
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
|
|
122
122
|
*/
|
|
123
123
|
userToken?: string | undefined;
|
|
124
124
|
/**
|
|
@@ -130,7 +130,7 @@ type BaseRecommendSearchParams = {
|
|
|
130
130
|
*/
|
|
131
131
|
synonyms?: boolean | undefined;
|
|
132
132
|
/**
|
|
133
|
-
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started
|
|
133
|
+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).
|
|
134
134
|
*/
|
|
135
135
|
clickAnalytics?: boolean | undefined;
|
|
136
136
|
/**
|
|
@@ -138,7 +138,7 @@ type BaseRecommendSearchParams = {
|
|
|
138
138
|
*/
|
|
139
139
|
analytics?: boolean | undefined;
|
|
140
140
|
/**
|
|
141
|
-
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments
|
|
141
|
+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
|
|
142
142
|
*/
|
|
143
143
|
analyticsTags?: Array<string> | undefined;
|
|
144
144
|
/**
|
|
@@ -153,11 +153,11 @@ type BaseRecommendSearchParams = {
|
|
|
153
153
|
|
|
154
154
|
type BaseIndexSettings = {
|
|
155
155
|
/**
|
|
156
|
-
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting
|
|
156
|
+
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn\'t evaluate the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
|
|
157
157
|
*/
|
|
158
158
|
attributesForFaceting?: Array<string> | undefined;
|
|
159
159
|
/**
|
|
160
|
-
* Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas
|
|
160
|
+
* Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you\'ll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don\'t increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort).
|
|
161
161
|
*/
|
|
162
162
|
replicas?: Array<string> | undefined;
|
|
163
163
|
/**
|
|
@@ -165,11 +165,11 @@ type BaseIndexSettings = {
|
|
|
165
165
|
*/
|
|
166
166
|
paginationLimitedTo?: number | undefined;
|
|
167
167
|
/**
|
|
168
|
-
* Attributes that can\'t be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data
|
|
168
|
+
* Attributes that can\'t be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data), but don\'t want to include it in the search results. Attribute names are case-sensitive.
|
|
169
169
|
*/
|
|
170
170
|
unretrievableAttributes?: Array<string> | undefined;
|
|
171
171
|
/**
|
|
172
|
-
* Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation
|
|
172
|
+
* Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation) for the specified words.
|
|
173
173
|
*/
|
|
174
174
|
disableTypoToleranceOnWords?: Array<string> | undefined;
|
|
175
175
|
/**
|
|
@@ -181,11 +181,11 @@ type BaseIndexSettings = {
|
|
|
181
181
|
*/
|
|
182
182
|
camelCaseAttributes?: Array<string> | undefined;
|
|
183
183
|
/**
|
|
184
|
-
* Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation
|
|
184
|
+
* Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation) (decompounding). Attribute names are case-sensitive. Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
|
|
185
185
|
*/
|
|
186
186
|
decompoundedAttributes?: Record<string, unknown> | undefined;
|
|
187
187
|
/**
|
|
188
|
-
* Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages
|
|
188
|
+
* Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
|
|
189
189
|
*/
|
|
190
190
|
indexLanguages?: Array<SupportedLanguage> | undefined;
|
|
191
191
|
/**
|
|
@@ -205,7 +205,7 @@ type BaseIndexSettings = {
|
|
|
205
205
|
*/
|
|
206
206
|
separatorsToIndex?: string | undefined;
|
|
207
207
|
/**
|
|
208
|
-
* Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes
|
|
208
|
+
* Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
|
|
209
209
|
*/
|
|
210
210
|
searchableAttributes?: Array<string> | undefined;
|
|
211
211
|
/**
|
|
@@ -213,7 +213,7 @@ type BaseIndexSettings = {
|
|
|
213
213
|
*/
|
|
214
214
|
userData?: any | null | undefined;
|
|
215
215
|
/**
|
|
216
|
-
* Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization
|
|
216
|
+
* Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization).
|
|
217
217
|
*/
|
|
218
218
|
customNormalization?: {
|
|
219
219
|
[key: string]: {
|
|
@@ -233,7 +233,7 @@ type BaseIndexSettings = {
|
|
|
233
233
|
*/
|
|
234
234
|
keepDiacriticsOnCharacters?: string | undefined;
|
|
235
235
|
/**
|
|
236
|
-
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking
|
|
236
|
+
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision) of your first attributes, or the other attributes will never be applied.
|
|
237
237
|
*/
|
|
238
238
|
customRanking?: Array<string> | undefined;
|
|
239
239
|
};
|
|
@@ -265,12 +265,12 @@ type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
|
|
|
265
265
|
type OptionalWords = string | Array<string>;
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
|
-
* Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching
|
|
268
|
+
* Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching).
|
|
269
269
|
*/
|
|
270
270
|
type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
|
|
271
271
|
|
|
272
272
|
/**
|
|
273
|
-
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
273
|
+
* Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) to records that match these filters.
|
|
274
274
|
*/
|
|
275
275
|
type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
|
|
276
276
|
|
|
@@ -280,7 +280,7 @@ type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
|
|
|
280
280
|
type RemoveStopWords = Array<SupportedLanguage> | boolean;
|
|
281
281
|
|
|
282
282
|
/**
|
|
283
|
-
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results
|
|
283
|
+
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results).
|
|
284
284
|
*/
|
|
285
285
|
type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional';
|
|
286
286
|
|
|
@@ -386,7 +386,7 @@ type RenderingContent = {
|
|
|
386
386
|
type TypoToleranceEnum = 'min' | 'strict' | 'true' | 'false';
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
|
-
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
389
|
+
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation) are also active.
|
|
390
390
|
*/
|
|
391
391
|
type TypoTolerance = boolean | TypoToleranceEnum;
|
|
392
392
|
|
|
@@ -396,7 +396,7 @@ type BaseRecommendIndexSettings = {
|
|
|
396
396
|
*/
|
|
397
397
|
attributesToRetrieve?: Array<string> | undefined;
|
|
398
398
|
/**
|
|
399
|
-
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria
|
|
399
|
+
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing).
|
|
400
400
|
*/
|
|
401
401
|
ranking?: Array<string> | undefined;
|
|
402
402
|
/**
|
|
@@ -404,7 +404,7 @@ type BaseRecommendIndexSettings = {
|
|
|
404
404
|
*/
|
|
405
405
|
relevancyStrictness?: number | undefined;
|
|
406
406
|
/**
|
|
407
|
-
* Attributes to highlight By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js
|
|
407
|
+
* Attributes to highlight By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js).
|
|
408
408
|
*/
|
|
409
409
|
attributesToHighlight?: Array<string> | undefined;
|
|
410
410
|
/**
|
|
@@ -441,13 +441,13 @@ type BaseRecommendIndexSettings = {
|
|
|
441
441
|
*/
|
|
442
442
|
allowTyposOnNumericTokens?: boolean | undefined;
|
|
443
443
|
/**
|
|
444
|
-
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
444
|
+
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance). Attribute names are case-sensitive Returning only exact matches can help when - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
|
|
445
445
|
*/
|
|
446
446
|
disableTypoToleranceOnAttributes?: Array<string> | undefined;
|
|
447
447
|
ignorePlurals?: IgnorePlurals | undefined;
|
|
448
448
|
removeStopWords?: RemoveStopWords | undefined;
|
|
449
449
|
/**
|
|
450
|
-
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages
|
|
450
|
+
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
|
|
451
451
|
*/
|
|
452
452
|
queryLanguages?: Array<SupportedLanguage> | undefined;
|
|
453
453
|
/**
|
|
@@ -500,7 +500,7 @@ type BaseRecommendIndexSettings = {
|
|
|
500
500
|
*/
|
|
501
501
|
maxValuesPerFacet?: number | undefined;
|
|
502
502
|
/**
|
|
503
|
-
* Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js
|
|
503
|
+
* Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js).
|
|
504
504
|
*/
|
|
505
505
|
sortFacetValuesBy?: string | undefined;
|
|
506
506
|
/**
|
|
@@ -509,7 +509,7 @@ type BaseRecommendIndexSettings = {
|
|
|
509
509
|
attributeCriteriaComputedByMinProximity?: boolean | undefined;
|
|
510
510
|
renderingContent?: RenderingContent | undefined;
|
|
511
511
|
/**
|
|
512
|
-
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
512
|
+
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
|
|
513
513
|
*/
|
|
514
514
|
enableReRanking?: boolean | undefined;
|
|
515
515
|
reRankingApplyFilter?: ReRankingApplyFilter | null | undefined;
|
|
@@ -650,7 +650,7 @@ type GetRecommendationsParams = {
|
|
|
650
650
|
*/
|
|
651
651
|
type Exhaustive = {
|
|
652
652
|
/**
|
|
653
|
-
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/
|
|
653
|
+
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
654
654
|
*/
|
|
655
655
|
facetsCount?: boolean | undefined;
|
|
656
656
|
/**
|
|
@@ -718,7 +718,7 @@ type RedirectRuleIndexMetadata = {
|
|
|
718
718
|
};
|
|
719
719
|
|
|
720
720
|
/**
|
|
721
|
-
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects
|
|
721
|
+
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects), this this parameter is for internal use only.
|
|
722
722
|
*/
|
|
723
723
|
type Redirect = {
|
|
724
724
|
index?: Array<RedirectRuleIndexMetadata> | undefined;
|
|
@@ -819,7 +819,7 @@ type BaseSearchResponse = Record<string, any> & {
|
|
|
819
819
|
*/
|
|
820
820
|
userData?: any | null | undefined;
|
|
821
821
|
/**
|
|
822
|
-
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics
|
|
822
|
+
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics).
|
|
823
823
|
*/
|
|
824
824
|
queryID?: string | undefined;
|
|
825
825
|
/**
|
|
@@ -1061,7 +1061,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
1061
1061
|
*/
|
|
1062
1062
|
similarQuery?: string | undefined;
|
|
1063
1063
|
/**
|
|
1064
|
-
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering
|
|
1064
|
+
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
|
|
1065
1065
|
*/
|
|
1066
1066
|
filters?: string | undefined;
|
|
1067
1067
|
facetFilters?: FacetFilters | undefined;
|
|
@@ -1128,7 +1128,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
1128
1128
|
*/
|
|
1129
1129
|
personalizationImpact?: number | undefined;
|
|
1130
1130
|
/**
|
|
1131
|
-
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken
|
|
1131
|
+
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
|
|
1132
1132
|
*/
|
|
1133
1133
|
userToken?: string | undefined;
|
|
1134
1134
|
/**
|
|
@@ -1140,7 +1140,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
1140
1140
|
*/
|
|
1141
1141
|
synonyms?: boolean | undefined;
|
|
1142
1142
|
/**
|
|
1143
|
-
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started
|
|
1143
|
+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).
|
|
1144
1144
|
*/
|
|
1145
1145
|
clickAnalytics?: boolean | undefined;
|
|
1146
1146
|
/**
|
|
@@ -1148,7 +1148,7 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
1148
1148
|
*/
|
|
1149
1149
|
analytics?: boolean | undefined;
|
|
1150
1150
|
/**
|
|
1151
|
-
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments
|
|
1151
|
+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
|
|
1152
1152
|
*/
|
|
1153
1153
|
analyticsTags?: Array<string> | undefined;
|
|
1154
1154
|
/**
|
|
@@ -1184,7 +1184,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
1184
1184
|
*/
|
|
1185
1185
|
attributesToRetrieve?: Array<string> | undefined;
|
|
1186
1186
|
/**
|
|
1187
|
-
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria
|
|
1187
|
+
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing).
|
|
1188
1188
|
*/
|
|
1189
1189
|
ranking?: Array<string> | undefined;
|
|
1190
1190
|
/**
|
|
@@ -1192,7 +1192,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
1192
1192
|
*/
|
|
1193
1193
|
relevancyStrictness?: number | undefined;
|
|
1194
1194
|
/**
|
|
1195
|
-
* Attributes to highlight By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js
|
|
1195
|
+
* Attributes to highlight By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js).
|
|
1196
1196
|
*/
|
|
1197
1197
|
attributesToHighlight?: Array<string> | undefined;
|
|
1198
1198
|
/**
|
|
@@ -1233,13 +1233,13 @@ type IndexSettingsAsSearchParams = {
|
|
|
1233
1233
|
*/
|
|
1234
1234
|
allowTyposOnNumericTokens?: boolean | undefined;
|
|
1235
1235
|
/**
|
|
1236
|
-
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
1236
|
+
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance). Attribute names are case-sensitive Returning only exact matches can help when - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
|
|
1237
1237
|
*/
|
|
1238
1238
|
disableTypoToleranceOnAttributes?: Array<string> | undefined;
|
|
1239
1239
|
ignorePlurals?: IgnorePlurals | undefined;
|
|
1240
1240
|
removeStopWords?: RemoveStopWords | undefined;
|
|
1241
1241
|
/**
|
|
1242
|
-
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages
|
|
1242
|
+
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
|
|
1243
1243
|
*/
|
|
1244
1244
|
queryLanguages?: Array<SupportedLanguage> | undefined;
|
|
1245
1245
|
/**
|
|
@@ -1294,7 +1294,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
1294
1294
|
*/
|
|
1295
1295
|
maxValuesPerFacet?: number | undefined;
|
|
1296
1296
|
/**
|
|
1297
|
-
* Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js
|
|
1297
|
+
* Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js).
|
|
1298
1298
|
*/
|
|
1299
1299
|
sortFacetValuesBy?: string | undefined;
|
|
1300
1300
|
/**
|
|
@@ -1303,7 +1303,7 @@ type IndexSettingsAsSearchParams = {
|
|
|
1303
1303
|
attributeCriteriaComputedByMinProximity?: boolean | undefined;
|
|
1304
1304
|
renderingContent?: RenderingContent | undefined;
|
|
1305
1305
|
/**
|
|
1306
|
-
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
1306
|
+
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
|
|
1307
1307
|
*/
|
|
1308
1308
|
enableReRanking?: boolean | undefined;
|
|
1309
1309
|
reRankingApplyFilter?: ReRankingApplyFilter | null | undefined;
|
|
@@ -1369,7 +1369,7 @@ type FacetHits = {
|
|
|
1369
1369
|
*/
|
|
1370
1370
|
highlighted: string;
|
|
1371
1371
|
/**
|
|
1372
|
-
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/
|
|
1372
|
+
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
1373
1373
|
*/
|
|
1374
1374
|
count: number;
|
|
1375
1375
|
};
|
|
@@ -1380,7 +1380,7 @@ type SearchForFacetValuesResponse = {
|
|
|
1380
1380
|
*/
|
|
1381
1381
|
facetHits: Array<FacetHits>;
|
|
1382
1382
|
/**
|
|
1383
|
-
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/
|
|
1383
|
+
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
1384
1384
|
*/
|
|
1385
1385
|
exhaustiveFacetsCount: boolean;
|
|
1386
1386
|
/**
|
|
@@ -1489,7 +1489,7 @@ type LegacySearchQuery = LegacySearchForFacets | LegacySearchForHits;
|
|
|
1489
1489
|
*/
|
|
1490
1490
|
type LegacySearchMethodProps = LegacySearchQuery[];
|
|
1491
1491
|
|
|
1492
|
-
declare const apiClientVersion = "5.
|
|
1492
|
+
declare const apiClientVersion = "5.40.1";
|
|
1493
1493
|
declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
1494
1494
|
transporter: _algolia_client_common.Transporter;
|
|
1495
1495
|
/**
|
|
@@ -1601,7 +1601,7 @@ type ApiKey = {
|
|
|
1601
1601
|
*/
|
|
1602
1602
|
maxHitsPerQuery?: number | undefined;
|
|
1603
1603
|
/**
|
|
1604
|
-
* Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken
|
|
1604
|
+
* Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there\'s no limit.
|
|
1605
1605
|
*/
|
|
1606
1606
|
maxQueriesPerIPPerHour?: number | undefined;
|
|
1607
1607
|
/**
|
|
@@ -1631,7 +1631,7 @@ type AutomaticFacetFilter = {
|
|
|
1631
1631
|
*/
|
|
1632
1632
|
score?: number | undefined;
|
|
1633
1633
|
/**
|
|
1634
|
-
* Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple
|
|
1634
|
+
* Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurrences are combined with the logical `OR` operation. If false, multiple occurrences are combined with the logical `AND` operation.
|
|
1635
1635
|
*/
|
|
1636
1636
|
disjunctive?: boolean | undefined;
|
|
1637
1637
|
};
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
// lite/src/liteClient.ts
|
|
11
11
|
import { createAuth, createTransporter, getAlgoliaAgent, shuffle } from "@algolia/client-common";
|
|
12
|
-
var apiClientVersion = "5.
|
|
12
|
+
var apiClientVersion = "5.40.1";
|
|
13
13
|
function getDefaultHosts(appId) {
|
|
14
14
|
return [
|
|
15
15
|
{
|