@algolia/recommend 5.0.0-alpha.2 → 5.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builds/browser.d.ts +2 -2
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +2 -2
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/model/advancedSyntaxFeatures.d.ts.map +1 -1
- package/dist/model/alternativesAsExact.d.ts.map +1 -1
- package/dist/model/aroundRadius.d.ts.map +1 -1
- package/dist/model/aroundRadiusAll.d.ts.map +1 -1
- package/dist/model/baseRecommendRequest.d.ts.map +1 -1
- package/dist/model/baseRecommendationRequest.d.ts.map +1 -1
- package/dist/model/baseSearchParams.d.ts.map +1 -1
- package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +1 -1
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/baseTrendingRequest.d.ts.map +1 -1
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/distinct.d.ts +5 -0
- package/dist/model/distinct.d.ts.map +1 -0
- package/dist/model/errorBase.d.ts.map +1 -1
- package/dist/model/exactOnSingleWordQuery.d.ts.map +1 -1
- package/dist/model/facetFilters.d.ts.map +1 -1
- package/dist/model/facetOrdering.d.ts.map +1 -1
- package/dist/model/facets.d.ts.map +1 -1
- package/dist/model/facetsStats.d.ts.map +1 -1
- package/dist/model/getRecommendationsParams.d.ts.map +1 -1
- package/dist/model/getRecommendationsResponse.d.ts.map +1 -1
- package/dist/model/highlightResult.d.ts.map +1 -1
- package/dist/model/highlightResultOption.d.ts.map +1 -1
- package/dist/model/ignorePlurals.d.ts.map +1 -1
- package/dist/model/index.d.ts +1 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +4 -6
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/model/matchLevel.d.ts.map +1 -1
- package/dist/model/matchedGeoLocation.d.ts.map +1 -1
- package/dist/model/mixedSearchFilters.d.ts.map +1 -1
- package/dist/model/numericFilters.d.ts.map +1 -1
- package/dist/model/optionalFilters.d.ts.map +1 -1
- package/dist/model/personalization.d.ts.map +1 -1
- package/dist/model/queryType.d.ts.map +1 -1
- package/dist/model/rankingInfo.d.ts.map +1 -1
- package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/model/recommendHit.d.ts.map +1 -1
- package/dist/model/recommendHits.d.ts.map +1 -1
- package/dist/model/recommendationModels.d.ts.map +1 -1
- package/dist/model/recommendationRequest.d.ts.map +1 -1
- package/dist/model/recommendationsRequest.d.ts.map +1 -1
- package/dist/model/recommendationsResponse.d.ts.map +1 -1
- package/dist/model/removeStopWords.d.ts.map +1 -1
- package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
- package/dist/model/renderingContent.d.ts.map +1 -1
- package/dist/model/searchParamsObject.d.ts.map +1 -1
- package/dist/model/searchParamsQuery.d.ts.map +1 -1
- package/dist/model/snippetResult.d.ts.map +1 -1
- package/dist/model/snippetResultOption.d.ts.map +1 -1
- package/dist/model/sortRemainingBy.d.ts.map +1 -1
- package/dist/model/tagFilters.d.ts.map +1 -1
- package/dist/model/trendingModels.d.ts.map +1 -1
- package/dist/model/trendingRequest.d.ts.map +1 -1
- package/dist/model/typoTolerance.d.ts.map +1 -1
- package/dist/model/typoToleranceEnum.d.ts.map +1 -1
- package/dist/model/value.d.ts.map +1 -1
- package/dist/recommend.cjs.js +14 -1
- package/dist/recommend.esm.browser.js +15 -2
- package/dist/recommend.esm.node.js +14 -1
- package/dist/recommend.umd.js +2 -2
- package/dist/src/recommendClient.d.ts +9 -1
- package/dist/src/recommendClient.d.ts.map +1 -1
- package/model/baseRecommendRequest.ts +4 -0
- package/model/baseRecommendationRequest.ts +1 -0
- package/model/baseSearchParamsWithoutQuery.ts +32 -0
- package/model/baseSearchResponse.ts +25 -1
- package/model/baseTrendingRequest.ts +2 -0
- package/model/distinct.ts +6 -0
- package/model/facetOrdering.ts +1 -0
- package/model/facetsStats.ts +3 -0
- package/model/highlightResultOption.ts +3 -0
- package/model/index.ts +1 -0
- package/model/indexSettingsAsSearchParams.ts +45 -6
- package/model/matchedGeoLocation.ts +2 -0
- package/model/personalization.ts +2 -0
- package/model/rankingInfo.ts +12 -0
- package/model/recommendHit.ts +5 -0
- package/model/snippetResultOption.ts +1 -0
- package/model/value.ts +1 -0
- package/package.json +31 -13
package/model/personalization.ts
CHANGED
package/model/rankingInfo.ts
CHANGED
|
@@ -8,44 +8,56 @@ export type RankingInfo = {
|
|
|
8
8
|
* This field is reserved for advanced usage.
|
|
9
9
|
*/
|
|
10
10
|
filters: number;
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
13
|
* Position of the most important matched attribute in the attributes to index list.
|
|
13
14
|
*/
|
|
14
15
|
firstMatchedWord: number;
|
|
16
|
+
|
|
15
17
|
/**
|
|
16
18
|
* Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
|
|
17
19
|
*/
|
|
18
20
|
geoDistance: number;
|
|
21
|
+
|
|
19
22
|
/**
|
|
20
23
|
* Precision used when computing the geo distance, in meters.
|
|
21
24
|
*/
|
|
22
25
|
geoPrecision?: number;
|
|
26
|
+
|
|
23
27
|
matchedGeoLocation?: MatchedGeoLocation;
|
|
28
|
+
|
|
24
29
|
personalization?: Personalization;
|
|
30
|
+
|
|
25
31
|
/**
|
|
26
32
|
* Number of exactly matched words.
|
|
27
33
|
*/
|
|
28
34
|
nbExactWords: number;
|
|
35
|
+
|
|
29
36
|
/**
|
|
30
37
|
* Number of typos encountered when matching the record.
|
|
31
38
|
*/
|
|
32
39
|
nbTypos: number;
|
|
40
|
+
|
|
33
41
|
/**
|
|
34
42
|
* Present and set to true if a Rule promoted the hit.
|
|
35
43
|
*/
|
|
36
44
|
promoted: boolean;
|
|
45
|
+
|
|
37
46
|
/**
|
|
38
47
|
* When the query contains more than one word, the sum of the distances between matched words (in meters).
|
|
39
48
|
*/
|
|
40
49
|
proximityDistance?: number;
|
|
50
|
+
|
|
41
51
|
/**
|
|
42
52
|
* Custom ranking for the object, expressed as a single integer value.
|
|
43
53
|
*/
|
|
44
54
|
userScore: number;
|
|
55
|
+
|
|
45
56
|
/**
|
|
46
57
|
* Number of matched words, including prefixes and typos.
|
|
47
58
|
*/
|
|
48
59
|
words: number;
|
|
60
|
+
|
|
49
61
|
/**
|
|
50
62
|
* Wether the record are promoted by the re-ranking strategy.
|
|
51
63
|
*/
|
package/model/recommendHit.ts
CHANGED
|
@@ -12,16 +12,21 @@ export type RecommendHit = Record<string, any> & {
|
|
|
12
12
|
* Unique identifier of the object.
|
|
13
13
|
*/
|
|
14
14
|
objectID: string;
|
|
15
|
+
|
|
15
16
|
/**
|
|
16
17
|
* Show highlighted section and words matched on a query.
|
|
17
18
|
*/
|
|
18
19
|
_highlightResult?: Record<string, HighlightResult>;
|
|
20
|
+
|
|
19
21
|
/**
|
|
20
22
|
* Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
|
|
21
23
|
*/
|
|
22
24
|
_snippetResult?: Record<string, SnippetResult>;
|
|
25
|
+
|
|
23
26
|
_rankingInfo?: RankingInfo;
|
|
27
|
+
|
|
24
28
|
_distinctSeqID?: number;
|
|
29
|
+
|
|
25
30
|
/**
|
|
26
31
|
* The recommendation score.
|
|
27
32
|
*/
|
package/model/value.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/recommend",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.20",
|
|
4
4
|
"description": "JavaScript client for recommend",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Algolia",
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"node": {
|
|
11
|
+
"import": "./dist/recommend.esm.node.js",
|
|
12
|
+
"module": "./dist/recommend.esm.node.js",
|
|
13
|
+
"require": "./dist/recommend.cjs.js",
|
|
14
|
+
"default": "./dist/recommend.cjs.js"
|
|
15
|
+
},
|
|
16
|
+
"default": {
|
|
17
|
+
"umd": "./dist/recommend.umd.js",
|
|
18
|
+
"module": "./dist/recommend.esm.browser.js",
|
|
19
|
+
"import": "./dist/recommend.esm.browser.js",
|
|
20
|
+
"default": "./dist/recommend.umd.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"./src/*": "./src/*.ts",
|
|
24
|
+
"./model": "./model/index.ts"
|
|
25
|
+
},
|
|
26
|
+
"jsdelivr": "./dist/recommend.umd.js",
|
|
27
|
+
"unpkg": "./dist/recommend.umd.js",
|
|
28
|
+
"browser": "./dist/recommend.umd.js",
|
|
29
|
+
"types": "./index.d.ts",
|
|
14
30
|
"files": [
|
|
15
31
|
"dist",
|
|
16
32
|
"model",
|
|
@@ -18,16 +34,18 @@
|
|
|
18
34
|
"index.d.ts"
|
|
19
35
|
],
|
|
20
36
|
"scripts": {
|
|
21
|
-
"
|
|
37
|
+
"build": "yarn clean && rollup --config",
|
|
38
|
+
"clean": "rm -rf ./dist || true"
|
|
22
39
|
},
|
|
23
40
|
"dependencies": {
|
|
24
|
-
"@algolia/client-common": "5.0.0-alpha.
|
|
25
|
-
"@algolia/requester-browser-xhr": "5.0.0-alpha.
|
|
26
|
-
"@algolia/requester-node-http": "5.0.0-alpha.
|
|
41
|
+
"@algolia/client-common": "5.0.0-alpha.20",
|
|
42
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.20",
|
|
43
|
+
"@algolia/requester-node-http": "5.0.0-alpha.20"
|
|
27
44
|
},
|
|
28
45
|
"devDependencies": {
|
|
29
|
-
"@types/node": "16.11.
|
|
30
|
-
"
|
|
46
|
+
"@types/node": "16.11.58",
|
|
47
|
+
"rollup": "2.79.0",
|
|
48
|
+
"typescript": "4.8.3"
|
|
31
49
|
},
|
|
32
50
|
"engines": {
|
|
33
51
|
"node": ">= 14.0.0"
|