@algolia/recommend 5.0.0-alpha.3 → 5.0.0-alpha.31
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.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +4 -4
- 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 +42 -105
- 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/baseSearchResponse.ts +1 -1
- package/model/indexSettingsAsSearchParams.ts +5 -5
- package/package.json +31 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAe5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,cAAc,UAAU,CAAC;AAEzB,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa,GACtB,eAAe,CA8BjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAW5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,cAAc,UAAU,CAAC;AAEzB,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa,GACtB,eAAe,CAwBjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advancedSyntaxFeatures.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"advancedSyntaxFeatures.d.ts","sourceRoot":"","sources":["../../model/advancedSyntaxFeatures.ts"],"names":[],"mappings":"AAEA,oBAAY,sBAAsB,GAAG,aAAa,GAAG,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alternativesAsExact.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"alternativesAsExact.d.ts","sourceRoot":"","sources":["../../model/alternativesAsExact.ts"],"names":[],"mappings":"AAEA,oBAAY,mBAAmB,GAC3B,eAAe,GACf,mBAAmB,GACnB,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aroundRadius.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"aroundRadius.d.ts","sourceRoot":"","sources":["../../model/aroundRadius.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,oBAAY,YAAY,GAAG,eAAe,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aroundRadiusAll.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"aroundRadiusAll.d.ts","sourceRoot":"","sources":["../../model/aroundRadiusAll.ts"],"names":[],"mappings":"AAEA,oBAAY,eAAe,GAAG,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseRecommendRequest.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"baseRecommendRequest.d.ts","sourceRoot":"","sources":["../../model/baseRecommendRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,oBAAY,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAErC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseRecommendationRequest.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"baseRecommendationRequest.d.ts","sourceRoot":"","sources":["../../model/baseRecommendationRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,oBAAY,yBAAyB,GAAG;IACtC,KAAK,EAAE,oBAAoB,CAAC;IAE5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseSearchParams.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"baseSearchParams.d.ts","sourceRoot":"","sources":["../../model/baseSearchParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,oBAAY,gBAAgB,GAAG,4BAA4B,GAAG,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseSearchParamsWithoutQuery.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"baseSearchParamsWithoutQuery.d.ts","sourceRoot":"","sources":["../../model/baseSearchParamsWithoutQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,oBAAY,4BAA4B,GAAG;IACzC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACpD,CAAC"}
|
|
@@ -28,7 +28,7 @@ export declare type BaseSearchResponse = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Indicate if the typo-tolerance search was exhaustive or approximate (only included when typo-tolerance is enabled).
|
|
30
30
|
*/
|
|
31
|
-
exhaustiveTypo
|
|
31
|
+
exhaustiveTypo?: boolean;
|
|
32
32
|
/**
|
|
33
33
|
* A mapping of each facet name to the corresponding facet counts.
|
|
34
34
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseSearchResponse.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"baseSearchResponse.d.ts","sourceRoot":"","sources":["../../model/baseSearchResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,oBAAY,kBAAkB,GAAG;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEhD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAE3C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE/B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseTrendingRequest.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"baseTrendingRequest.d.ts","sourceRoot":"","sources":["../../model/baseTrendingRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../model/distinct.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exactOnSingleWordQuery.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"exactOnSingleWordQuery.d.ts","sourceRoot":"","sources":["../../model/exactOnSingleWordQuery.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,sBAAsB,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facetFilters.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"facetFilters.d.ts","sourceRoot":"","sources":["../../model/facetFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,oBAAY,YAAY,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facetOrdering.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"facetOrdering.d.ts","sourceRoot":"","sources":["../../model/facetOrdering.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,oBAAY,aAAa,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facets.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"facets.d.ts","sourceRoot":"","sources":["../../model/facets.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,MAAM,GAAG;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facetsStats.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"facetsStats.d.ts","sourceRoot":"","sources":["../../model/facetsStats.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW,GAAG;IACxB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecommendationsParams.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"getRecommendationsParams.d.ts","sourceRoot":"","sources":["../../model/getRecommendationsParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE;;GAEG;AACH,oBAAY,wBAAwB,GAAG;IACrC;;OAEG;IACH,QAAQ,EAAE,sBAAsB,EAAE,CAAC;CACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecommendationsResponse.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"getRecommendationsResponse.d.ts","sourceRoot":"","sources":["../../model/getRecommendationsResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,oBAAY,0BAA0B,GAAG;IACvC,OAAO,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlightResult.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"highlightResult.d.ts","sourceRoot":"","sources":["../../model/highlightResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,oBAAY,eAAe,GAAG,qBAAqB,GAAG,qBAAqB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlightResultOption.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"highlightResultOption.d.ts","sourceRoot":"","sources":["../../model/highlightResultOption.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,oBAAY,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,UAAU,CAAC;IAEvB;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ignorePlurals.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"ignorePlurals.d.ts","sourceRoot":"","sources":["../../model/ignorePlurals.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,aAAa,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC"}
|
|
@@ -13,10 +13,6 @@ export declare type IndexSettingsAsSearchParams = {
|
|
|
13
13
|
* The complete list of attributes that will be used for faceting.
|
|
14
14
|
*/
|
|
15
15
|
attributesForFaceting?: string[];
|
|
16
|
-
/**
|
|
17
|
-
* List of attributes that can\'t be retrieved at query time.
|
|
18
|
-
*/
|
|
19
|
-
unretrievableAttributes?: string[];
|
|
20
16
|
/**
|
|
21
17
|
* This parameter controls which attributes to retrieve and which not to retrieve.
|
|
22
18
|
*/
|
|
@@ -128,6 +124,10 @@ export declare type IndexSettingsAsSearchParams = {
|
|
|
128
124
|
*/
|
|
129
125
|
advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
|
|
130
126
|
distinct?: Distinct;
|
|
127
|
+
/**
|
|
128
|
+
* Name of the de-duplication attribute to be used with the distinct feature.
|
|
129
|
+
*/
|
|
130
|
+
attributeForDistinct?: string;
|
|
131
131
|
/**
|
|
132
132
|
* Whether to take into account an index\'s synonyms for a particular search.
|
|
133
133
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexSettingsAsSearchParams.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"indexSettingsAsSearchParams.d.ts","sourceRoot":"","sources":["../../model/indexSettingsAsSearchParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,oBAAY,2BAA2B,GAAG;IACxC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjC;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;OAEG;IACH,4BAA4B,CAAC,EAAE,MAAM,EAAE,CAAC;IAExC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,iCAAiC,CAAC,EAAE,OAAO,CAAC;IAE5C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;OAEG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;OAEG;IACH,gCAAgC,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5C,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAEpC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAEhD;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpC,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAEhD;;OAEG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAE5C;;OAEG;IACH,sBAAsB,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAElD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,uCAAuC,CAAC,EAAE,OAAO,CAAC;IAElD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchLevel.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"matchLevel.d.ts","sourceRoot":"","sources":["../../model/matchLevel.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchedGeoLocation.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"matchedGeoLocation.d.ts","sourceRoot":"","sources":["../../model/matchedGeoLocation.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB,GAAG;IAC/B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixedSearchFilters.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"mixedSearchFilters.d.ts","sourceRoot":"","sources":["../../model/mixedSearchFilters.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numericFilters.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"numericFilters.d.ts","sourceRoot":"","sources":["../../model/numericFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,oBAAY,cAAc,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionalFilters.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"optionalFilters.d.ts","sourceRoot":"","sources":["../../model/optionalFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,oBAAY,eAAe,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personalization.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"personalization.d.ts","sourceRoot":"","sources":["../../model/personalization.ts"],"names":[],"mappings":"AAEA,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryType.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"queryType.d.ts","sourceRoot":"","sources":["../../model/queryType.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rankingInfo.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"rankingInfo.d.ts","sourceRoot":"","sources":["../../model/rankingInfo.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,oBAAY,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reRankingApplyFilter.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"reRankingApplyFilter.d.ts","sourceRoot":"","sources":["../../model/reRankingApplyFilter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,oBAAY,oBAAoB,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendHit.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"recommendHit.d.ts","sourceRoot":"","sources":["../../model/recommendHit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;GAEG;AACH,oBAAY,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC/C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAEnD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAE/C,YAAY,CAAC,EAAE,WAAW,CAAC;IAE3B,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendHits.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"recommendHits.d.ts","sourceRoot":"","sources":["../../model/recommendHits.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAY,aAAa,GAAG;IAC1B,IAAI,EAAE,YAAY,EAAE,CAAC;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendationModels.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"recommendationModels.d.ts","sourceRoot":"","sources":["../../model/recommendationModels.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,oBAAoB,GAAG,iBAAiB,GAAG,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendationRequest.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"recommendationRequest.d.ts","sourceRoot":"","sources":["../../model/recommendationRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAE7E,oBAAY,qBAAqB,GAAG,yBAAyB,GAC3D,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendationsRequest.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"recommendationsRequest.d.ts","sourceRoot":"","sources":["../../model/recommendationsRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,oBAAY,sBAAsB,GAAG,qBAAqB,GAAG,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendationsResponse.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"recommendationsResponse.d.ts","sourceRoot":"","sources":["../../model/recommendationsResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,oBAAY,uBAAuB,GAAG,kBAAkB,GAAG,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeStopWords.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"removeStopWords.d.ts","sourceRoot":"","sources":["../../model/removeStopWords.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,eAAe,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeWordsIfNoResults.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"removeWordsIfNoResults.d.ts","sourceRoot":"","sources":["../../model/removeWordsIfNoResults.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,sBAAsB,GAC9B,aAAa,GACb,YAAY,GACZ,WAAW,GACX,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderingContent.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"renderingContent.d.ts","sourceRoot":"","sources":["../../model/renderingContent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;GAEG;AACH,oBAAY,gBAAgB,GAAG;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchParamsObject.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"searchParamsObject.d.ts","sourceRoot":"","sources":["../../model/searchParamsObject.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,oBAAY,kBAAkB,GAAG,gBAAgB,GAAG,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchParamsQuery.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"searchParamsQuery.d.ts","sourceRoot":"","sources":["../../model/searchParamsQuery.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippetResult.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"snippetResult.d.ts","sourceRoot":"","sources":["../../model/snippetResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,oBAAY,aAAa,GAAG,mBAAmB,GAAG,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippetResultOption.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"snippetResultOption.d.ts","sourceRoot":"","sources":["../../model/snippetResultOption.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,oBAAY,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortRemainingBy.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"sortRemainingBy.d.ts","sourceRoot":"","sources":["../../model/sortRemainingBy.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagFilters.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"tagFilters.d.ts","sourceRoot":"","sources":["../../model/tagFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,oBAAY,UAAU,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trendingModels.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"trendingModels.d.ts","sourceRoot":"","sources":["../../model/trendingModels.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,cAAc,GAAG,iBAAiB,GAAG,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trendingRequest.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"trendingRequest.d.ts","sourceRoot":"","sources":["../../model/trendingRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,oBAAY,eAAe,GAAG,oBAAoB,GAAG,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typoTolerance.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"typoTolerance.d.ts","sourceRoot":"","sources":["../../model/typoTolerance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;GAEG;AACH,oBAAY,aAAa,GAAG,iBAAiB,GAAG,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typoToleranceEnum.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"typoToleranceEnum.d.ts","sourceRoot":"","sources":["../../model/typoToleranceEnum.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB,GAAG,KAAK,GAAG,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../model/value.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,oBAAY,KAAK,GAAG;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC"}
|
package/dist/recommend.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
6
6
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
7
7
|
|
|
8
8
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
9
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
9
|
+
const apiClientVersion = '5.0.0-alpha.31';
|
|
10
10
|
function getDefaultHosts(appId) {
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
@@ -60,6 +60,19 @@ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
60
60
|
});
|
|
61
61
|
return {
|
|
62
62
|
transporter,
|
|
63
|
+
/**
|
|
64
|
+
* The `appId` currently in use.
|
|
65
|
+
*/
|
|
66
|
+
appId: appIdOption,
|
|
67
|
+
/**
|
|
68
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
69
|
+
*/
|
|
70
|
+
clearCache() {
|
|
71
|
+
return Promise.all([
|
|
72
|
+
transporter.requestsCache.clear(),
|
|
73
|
+
transporter.responsesCache.clear(),
|
|
74
|
+
]).then(() => undefined);
|
|
75
|
+
},
|
|
63
76
|
/**
|
|
64
77
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
65
78
|
*/
|
|
@@ -7,31 +7,25 @@ function createAuth(appId, apiKey, authMode = 'WithinHeaders') {
|
|
|
7
7
|
headers() {
|
|
8
8
|
return authMode === 'WithinHeaders' ? credentials : {};
|
|
9
9
|
},
|
|
10
|
-
|
|
11
10
|
queryParameters() {
|
|
12
11
|
return authMode === 'WithinQueryParameters' ? credentials : {};
|
|
13
12
|
}
|
|
14
|
-
|
|
15
13
|
};
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
function createBrowserLocalStorageCache(options) {
|
|
19
|
-
let storage;
|
|
20
|
-
|
|
17
|
+
let storage;
|
|
18
|
+
// We've changed the namespace to avoid conflicts with v4, as this version is a huge breaking change
|
|
21
19
|
const namespaceKey = `algolia-client-js-${options.key}`;
|
|
22
|
-
|
|
23
20
|
function getStorage() {
|
|
24
21
|
if (storage === undefined) {
|
|
25
22
|
storage = options.localStorage || window.localStorage;
|
|
26
23
|
}
|
|
27
|
-
|
|
28
24
|
return storage;
|
|
29
25
|
}
|
|
30
|
-
|
|
31
26
|
function getNamespace() {
|
|
32
27
|
return JSON.parse(getStorage().getItem(namespaceKey) || '{}');
|
|
33
28
|
}
|
|
34
|
-
|
|
35
29
|
return {
|
|
36
30
|
get(key, defaultValue, events = {
|
|
37
31
|
miss: () => Promise.resolve()
|
|
@@ -44,7 +38,6 @@ function createBrowserLocalStorageCache(options) {
|
|
|
44
38
|
return Promise.all([value, exists || events.miss(value)]);
|
|
45
39
|
}).then(([value]) => value);
|
|
46
40
|
},
|
|
47
|
-
|
|
48
41
|
set(key, value) {
|
|
49
42
|
return Promise.resolve().then(() => {
|
|
50
43
|
const namespace = getNamespace();
|
|
@@ -53,7 +46,6 @@ function createBrowserLocalStorageCache(options) {
|
|
|
53
46
|
return value;
|
|
54
47
|
});
|
|
55
48
|
},
|
|
56
|
-
|
|
57
49
|
delete(key) {
|
|
58
50
|
return Promise.resolve().then(() => {
|
|
59
51
|
const namespace = getNamespace();
|
|
@@ -61,13 +53,11 @@ function createBrowserLocalStorageCache(options) {
|
|
|
61
53
|
getStorage().setItem(namespaceKey, JSON.stringify(namespace));
|
|
62
54
|
});
|
|
63
55
|
},
|
|
64
|
-
|
|
65
56
|
clear() {
|
|
66
57
|
return Promise.resolve().then(() => {
|
|
67
58
|
getStorage().removeItem(namespaceKey);
|
|
68
59
|
});
|
|
69
60
|
}
|
|
70
|
-
|
|
71
61
|
};
|
|
72
62
|
}
|
|
73
63
|
|
|
@@ -79,30 +69,24 @@ function createNullCache() {
|
|
|
79
69
|
const value = defaultValue();
|
|
80
70
|
return value.then(result => Promise.all([result, events.miss(result)])).then(([result]) => result);
|
|
81
71
|
},
|
|
82
|
-
|
|
83
72
|
set(_key, value) {
|
|
84
73
|
return Promise.resolve(value);
|
|
85
74
|
},
|
|
86
|
-
|
|
87
75
|
delete(_key) {
|
|
88
76
|
return Promise.resolve();
|
|
89
77
|
},
|
|
90
|
-
|
|
91
78
|
clear() {
|
|
92
79
|
return Promise.resolve();
|
|
93
80
|
}
|
|
94
|
-
|
|
95
81
|
};
|
|
96
82
|
}
|
|
97
83
|
|
|
98
84
|
function createFallbackableCache(options) {
|
|
99
85
|
const caches = [...options.caches];
|
|
100
86
|
const current = caches.shift();
|
|
101
|
-
|
|
102
87
|
if (current === undefined) {
|
|
103
88
|
return createNullCache();
|
|
104
89
|
}
|
|
105
|
-
|
|
106
90
|
return {
|
|
107
91
|
get(key, defaultValue, events = {
|
|
108
92
|
miss: () => Promise.resolve()
|
|
@@ -113,7 +97,6 @@ function createFallbackableCache(options) {
|
|
|
113
97
|
}).get(key, defaultValue, events);
|
|
114
98
|
});
|
|
115
99
|
},
|
|
116
|
-
|
|
117
100
|
set(key, value) {
|
|
118
101
|
return current.set(key, value).catch(() => {
|
|
119
102
|
return createFallbackableCache({
|
|
@@ -121,7 +104,6 @@ function createFallbackableCache(options) {
|
|
|
121
104
|
}).set(key, value);
|
|
122
105
|
});
|
|
123
106
|
},
|
|
124
|
-
|
|
125
107
|
delete(key) {
|
|
126
108
|
return current.delete(key).catch(() => {
|
|
127
109
|
return createFallbackableCache({
|
|
@@ -129,7 +111,6 @@ function createFallbackableCache(options) {
|
|
|
129
111
|
}).delete(key);
|
|
130
112
|
});
|
|
131
113
|
},
|
|
132
|
-
|
|
133
114
|
clear() {
|
|
134
115
|
return current.clear().catch(() => {
|
|
135
116
|
return createFallbackableCache({
|
|
@@ -137,7 +118,6 @@ function createFallbackableCache(options) {
|
|
|
137
118
|
}).clear();
|
|
138
119
|
});
|
|
139
120
|
}
|
|
140
|
-
|
|
141
121
|
};
|
|
142
122
|
}
|
|
143
123
|
|
|
@@ -150,30 +130,24 @@ function createMemoryCache(options = {
|
|
|
150
130
|
miss: () => Promise.resolve()
|
|
151
131
|
}) {
|
|
152
132
|
const keyAsString = JSON.stringify(key);
|
|
153
|
-
|
|
154
133
|
if (keyAsString in cache) {
|
|
155
134
|
return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]);
|
|
156
135
|
}
|
|
157
|
-
|
|
158
136
|
const promise = defaultValue();
|
|
159
137
|
return promise.then(value => events.miss(value)).then(() => promise);
|
|
160
138
|
},
|
|
161
|
-
|
|
162
139
|
set(key, value) {
|
|
163
140
|
cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;
|
|
164
141
|
return Promise.resolve(value);
|
|
165
142
|
},
|
|
166
|
-
|
|
167
143
|
delete(key) {
|
|
168
144
|
delete cache[JSON.stringify(key)];
|
|
169
145
|
return Promise.resolve();
|
|
170
146
|
},
|
|
171
|
-
|
|
172
147
|
clear() {
|
|
173
148
|
cache = {};
|
|
174
149
|
return Promise.resolve();
|
|
175
150
|
}
|
|
176
|
-
|
|
177
151
|
};
|
|
178
152
|
}
|
|
179
153
|
|
|
@@ -182,16 +156,14 @@ function createMemoryCache(options = {
|
|
|
182
156
|
const EXPIRATION_DELAY = 2 * 60 * 1000;
|
|
183
157
|
function createStatefulHost(host, status = 'up') {
|
|
184
158
|
const lastUpdate = Date.now();
|
|
185
|
-
|
|
186
159
|
function isUp() {
|
|
187
160
|
return status === 'up' || Date.now() - lastUpdate > EXPIRATION_DELAY;
|
|
188
161
|
}
|
|
189
|
-
|
|
190
162
|
function isTimedOut() {
|
|
191
163
|
return status === 'timed out' && Date.now() - lastUpdate <= EXPIRATION_DELAY;
|
|
192
164
|
}
|
|
193
|
-
|
|
194
|
-
|
|
165
|
+
return {
|
|
166
|
+
...host,
|
|
195
167
|
status,
|
|
196
168
|
lastUpdate,
|
|
197
169
|
isUp,
|
|
@@ -210,92 +182,74 @@ function _defineProperty(obj, key, value) {
|
|
|
210
182
|
} else {
|
|
211
183
|
obj[key] = value;
|
|
212
184
|
}
|
|
213
|
-
|
|
214
185
|
return obj;
|
|
215
186
|
}
|
|
216
187
|
|
|
217
188
|
class AlgoliaError extends Error {
|
|
218
189
|
constructor(message, name) {
|
|
219
190
|
super(message);
|
|
220
|
-
|
|
221
191
|
_defineProperty(this, "name", 'AlgoliaError');
|
|
222
|
-
|
|
223
192
|
if (name) {
|
|
224
193
|
this.name = name;
|
|
225
194
|
}
|
|
226
195
|
}
|
|
227
|
-
|
|
228
196
|
}
|
|
229
197
|
class ErrorWithStackTrace extends AlgoliaError {
|
|
230
198
|
constructor(message, stackTrace, name) {
|
|
231
|
-
super(message, name);
|
|
232
|
-
|
|
199
|
+
super(message, name);
|
|
200
|
+
// the array and object should be frozen to reflect the stackTrace at the time of the error
|
|
233
201
|
_defineProperty(this, "stackTrace", void 0);
|
|
234
|
-
|
|
235
202
|
this.stackTrace = stackTrace;
|
|
236
203
|
}
|
|
237
|
-
|
|
238
204
|
}
|
|
239
205
|
class RetryError extends ErrorWithStackTrace {
|
|
240
206
|
constructor(stackTrace) {
|
|
241
207
|
super('Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.', stackTrace, 'RetryError');
|
|
242
208
|
}
|
|
243
|
-
|
|
244
209
|
}
|
|
245
210
|
class ApiError extends ErrorWithStackTrace {
|
|
246
211
|
constructor(message, status, stackTrace) {
|
|
247
212
|
super(message, stackTrace, 'ApiError');
|
|
248
|
-
|
|
249
213
|
_defineProperty(this, "status", void 0);
|
|
250
|
-
|
|
251
214
|
this.status = status;
|
|
252
215
|
}
|
|
253
|
-
|
|
254
216
|
}
|
|
255
217
|
class DeserializationError extends AlgoliaError {
|
|
256
218
|
constructor(message, response) {
|
|
257
219
|
super(message, 'DeserializationError');
|
|
258
|
-
|
|
259
220
|
_defineProperty(this, "response", void 0);
|
|
260
|
-
|
|
261
221
|
this.response = response;
|
|
262
222
|
}
|
|
263
|
-
|
|
264
223
|
}
|
|
265
224
|
|
|
266
225
|
function shuffle(array) {
|
|
267
226
|
const shuffledArray = array;
|
|
268
|
-
|
|
269
227
|
for (let c = array.length - 1; c > 0; c--) {
|
|
270
228
|
const b = Math.floor(Math.random() * (c + 1));
|
|
271
229
|
const a = array[c];
|
|
272
230
|
shuffledArray[c] = array[b];
|
|
273
231
|
shuffledArray[b] = a;
|
|
274
232
|
}
|
|
275
|
-
|
|
276
233
|
return shuffledArray;
|
|
277
234
|
}
|
|
278
235
|
function serializeUrl(host, path, queryParameters) {
|
|
279
236
|
const queryParametersAsString = serializeQueryParameters(queryParameters);
|
|
280
237
|
let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`;
|
|
281
|
-
|
|
282
238
|
if (queryParametersAsString.length) {
|
|
283
239
|
url += `?${queryParametersAsString}`;
|
|
284
240
|
}
|
|
285
|
-
|
|
286
241
|
return url;
|
|
287
242
|
}
|
|
288
243
|
function serializeQueryParameters(parameters) {
|
|
289
244
|
const isObjectOrArray = value => Object.prototype.toString.call(value) === '[object Object]' || Object.prototype.toString.call(value) === '[object Array]';
|
|
290
|
-
|
|
291
|
-
return Object.keys(parameters).map(key => `${key}=${isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]}`).join('&');
|
|
245
|
+
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key])}`).join('&');
|
|
292
246
|
}
|
|
293
247
|
function serializeData(request, requestOptions) {
|
|
294
248
|
if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
|
|
295
249
|
return undefined;
|
|
296
250
|
}
|
|
297
|
-
|
|
298
|
-
|
|
251
|
+
const data = Array.isArray(request.data) ? request.data : {
|
|
252
|
+
...request.data,
|
|
299
253
|
...requestOptions.data
|
|
300
254
|
};
|
|
301
255
|
return JSON.stringify(data);
|
|
@@ -326,12 +280,11 @@ function deserializeFailure({
|
|
|
326
280
|
status
|
|
327
281
|
}, stackFrame) {
|
|
328
282
|
let message = content;
|
|
329
|
-
|
|
330
283
|
try {
|
|
331
284
|
message = JSON.parse(content).message;
|
|
332
|
-
} catch (e) {
|
|
285
|
+
} catch (e) {
|
|
286
|
+
// ..
|
|
333
287
|
}
|
|
334
|
-
|
|
335
288
|
return new ApiError(message, status, stackFrame);
|
|
336
289
|
}
|
|
337
290
|
|
|
@@ -363,9 +316,12 @@ function stackFrameWithoutCredentials(stackFrame) {
|
|
|
363
316
|
const modifiedHeaders = stackFrame.request.headers['x-algolia-api-key'] ? {
|
|
364
317
|
'x-algolia-api-key': '*****'
|
|
365
318
|
} : {};
|
|
366
|
-
return {
|
|
367
|
-
|
|
368
|
-
|
|
319
|
+
return {
|
|
320
|
+
...stackFrame,
|
|
321
|
+
request: {
|
|
322
|
+
...stackFrame.request,
|
|
323
|
+
headers: {
|
|
324
|
+
...stackFrame.request.headers,
|
|
369
325
|
...modifiedHeaders
|
|
370
326
|
}
|
|
371
327
|
}
|
|
@@ -390,13 +346,12 @@ function createTransporter({
|
|
|
390
346
|
});
|
|
391
347
|
}));
|
|
392
348
|
const hostsUp = statefulHosts.filter(host => host.isUp());
|
|
393
|
-
const hostsTimedOut = statefulHosts.filter(host => host.isTimedOut());
|
|
394
|
-
|
|
349
|
+
const hostsTimedOut = statefulHosts.filter(host => host.isTimedOut());
|
|
350
|
+
// Note, we put the hosts that previously timed out on the end of the list.
|
|
395
351
|
const hostsAvailable = [...hostsUp, ...hostsTimedOut];
|
|
396
352
|
const compatibleHostsAvailable = hostsAvailable.length > 0 ? hostsAvailable : compatibleHosts;
|
|
397
353
|
return {
|
|
398
354
|
hosts: compatibleHostsAvailable,
|
|
399
|
-
|
|
400
355
|
getTimeout(timeoutsCount, baseTimeout) {
|
|
401
356
|
/**
|
|
402
357
|
* Imagine that you have 4 hosts, if timeouts will increase
|
|
@@ -412,29 +367,28 @@ function createTransporter({
|
|
|
412
367
|
const timeoutMultiplier = hostsTimedOut.length === 0 && timeoutsCount === 0 ? 1 : hostsTimedOut.length + 3 + timeoutsCount;
|
|
413
368
|
return timeoutMultiplier * baseTimeout;
|
|
414
369
|
}
|
|
415
|
-
|
|
416
370
|
};
|
|
417
371
|
}
|
|
418
|
-
|
|
419
372
|
async function retryableRequest(request, requestOptions, isRead = true) {
|
|
420
373
|
const stackTrace = [];
|
|
421
374
|
/**
|
|
422
375
|
* First we prepare the payload that do not depend from hosts.
|
|
423
376
|
*/
|
|
424
|
-
|
|
425
377
|
const data = serializeData(request, requestOptions);
|
|
426
|
-
const headers = serializeHeaders(baseHeaders, request.headers, requestOptions.headers);
|
|
427
|
-
|
|
428
|
-
const dataQueryParameters = request.method === 'GET' ? {
|
|
378
|
+
const headers = serializeHeaders(baseHeaders, request.headers, requestOptions.headers);
|
|
379
|
+
// On `GET`, the data is proxied to query parameters.
|
|
380
|
+
const dataQueryParameters = request.method === 'GET' ? {
|
|
381
|
+
...request.data,
|
|
429
382
|
...requestOptions.data
|
|
430
383
|
} : {};
|
|
431
384
|
const queryParameters = {
|
|
432
|
-
'x-algolia-agent': algoliaAgent.value,
|
|
433
385
|
...baseQueryParameters,
|
|
434
386
|
...request.queryParameters,
|
|
435
387
|
...dataQueryParameters
|
|
436
388
|
};
|
|
437
|
-
|
|
389
|
+
if (algoliaAgent.value) {
|
|
390
|
+
queryParameters['x-algolia-agent'] = algoliaAgent.value;
|
|
391
|
+
}
|
|
438
392
|
if (requestOptions && requestOptions.queryParameters) {
|
|
439
393
|
for (const key of Object.keys(requestOptions.queryParameters)) {
|
|
440
394
|
// We want to keep `undefined` and `null` values,
|
|
@@ -447,25 +401,19 @@ function createTransporter({
|
|
|
447
401
|
}
|
|
448
402
|
}
|
|
449
403
|
}
|
|
450
|
-
|
|
451
404
|
let timeoutsCount = 0;
|
|
452
|
-
|
|
453
405
|
const retry = async (retryableHosts, getTimeout) => {
|
|
454
406
|
/**
|
|
455
407
|
* We iterate on each host, until there is no host left.
|
|
456
408
|
*/
|
|
457
409
|
const host = retryableHosts.pop();
|
|
458
|
-
|
|
459
410
|
if (host === undefined) {
|
|
460
411
|
throw new RetryError(stackTraceWithoutCredentials(stackTrace));
|
|
461
412
|
}
|
|
462
|
-
|
|
463
413
|
let responseTimeout = requestOptions.timeout;
|
|
464
|
-
|
|
465
414
|
if (responseTimeout === undefined) {
|
|
466
415
|
responseTimeout = isRead ? timeouts.read : timeouts.write;
|
|
467
416
|
}
|
|
468
|
-
|
|
469
417
|
const payload = {
|
|
470
418
|
data,
|
|
471
419
|
headers,
|
|
@@ -479,7 +427,6 @@ function createTransporter({
|
|
|
479
427
|
* can have information about onRetry and onFailure
|
|
480
428
|
* decisions.
|
|
481
429
|
*/
|
|
482
|
-
|
|
483
430
|
const pushToStackTrace = response => {
|
|
484
431
|
const stackFrame = {
|
|
485
432
|
request: payload,
|
|
@@ -490,12 +437,10 @@ function createTransporter({
|
|
|
490
437
|
stackTrace.push(stackFrame);
|
|
491
438
|
return stackFrame;
|
|
492
439
|
};
|
|
493
|
-
|
|
494
440
|
const response = await requester.send(payload);
|
|
495
|
-
|
|
496
441
|
if (isRetryable(response)) {
|
|
497
|
-
const stackFrame = pushToStackTrace(response);
|
|
498
|
-
|
|
442
|
+
const stackFrame = pushToStackTrace(response);
|
|
443
|
+
// If response is a timeout, we increase the number of timeouts so we can increase the timeout later.
|
|
499
444
|
if (response.isTimedOut) {
|
|
500
445
|
timeoutsCount++;
|
|
501
446
|
}
|
|
@@ -505,23 +450,18 @@ function createTransporter({
|
|
|
505
450
|
* when a retry error does not happen.
|
|
506
451
|
*/
|
|
507
452
|
// eslint-disable-next-line no-console -- this will be fixed by exposing a `logger` to the transporter
|
|
508
|
-
|
|
509
|
-
|
|
510
453
|
console.log('Retryable failure', stackFrameWithoutCredentials(stackFrame));
|
|
511
454
|
/**
|
|
512
455
|
* We also store the state of the host in failure cases. If the host, is
|
|
513
456
|
* down it will remain down for the next 2 minutes. In a timeout situation,
|
|
514
457
|
* this host will be added end of the list of hosts on the next request.
|
|
515
458
|
*/
|
|
516
|
-
|
|
517
459
|
await hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? 'timed out' : 'down'));
|
|
518
460
|
return retry(retryableHosts, getTimeout);
|
|
519
461
|
}
|
|
520
|
-
|
|
521
462
|
if (isSuccess(response)) {
|
|
522
463
|
return deserializeSuccess(response);
|
|
523
464
|
}
|
|
524
|
-
|
|
525
465
|
pushToStackTrace(response);
|
|
526
466
|
throw deserializeFailure(response, stackTrace);
|
|
527
467
|
};
|
|
@@ -533,20 +473,16 @@ function createTransporter({
|
|
|
533
473
|
* 2. We also get from the retryable options a timeout multiplier that is tailored
|
|
534
474
|
* for the current context.
|
|
535
475
|
*/
|
|
536
|
-
|
|
537
|
-
|
|
538
476
|
const compatibleHosts = hosts.filter(host => host.accept === 'readWrite' || (isRead ? host.accept === 'read' : host.accept === 'write'));
|
|
539
477
|
const options = await createRetryableOptions(compatibleHosts);
|
|
540
478
|
return retry([...options.hosts].reverse(), options.getTimeout);
|
|
541
479
|
}
|
|
542
|
-
|
|
543
480
|
function createRequest(request, requestOptions = {}) {
|
|
544
481
|
/**
|
|
545
482
|
* A read request is either a `GET` request, or a request that we make
|
|
546
483
|
* via the `read` transporter (e.g. `search`).
|
|
547
484
|
*/
|
|
548
485
|
const isRead = request.useReadTransporter || request.method === 'GET';
|
|
549
|
-
|
|
550
486
|
if (!isRead) {
|
|
551
487
|
/**
|
|
552
488
|
* On write requests, no cache mechanisms are applied, and we
|
|
@@ -554,7 +490,6 @@ function createTransporter({
|
|
|
554
490
|
*/
|
|
555
491
|
return retryableRequest(request, requestOptions, isRead);
|
|
556
492
|
}
|
|
557
|
-
|
|
558
493
|
const createRetryableRequest = () => {
|
|
559
494
|
/**
|
|
560
495
|
* Then, we prepare a function factory that contains the construction of
|
|
@@ -568,14 +503,11 @@ function createTransporter({
|
|
|
568
503
|
* request is "cacheable" - should be cached. Note that, once again,
|
|
569
504
|
* the user can force this option.
|
|
570
505
|
*/
|
|
571
|
-
|
|
572
|
-
|
|
573
506
|
const cacheable = requestOptions.cacheable || request.cacheable;
|
|
574
507
|
/**
|
|
575
508
|
* If is not "cacheable", we immediately trigger the retryable request, no
|
|
576
509
|
* need to check cache implementations.
|
|
577
510
|
*/
|
|
578
|
-
|
|
579
511
|
if (cacheable !== true) {
|
|
580
512
|
return createRetryableRequest();
|
|
581
513
|
}
|
|
@@ -584,8 +516,6 @@ function createTransporter({
|
|
|
584
516
|
* the cache implementations if this request is on progress or if the
|
|
585
517
|
* response already exists on the cache.
|
|
586
518
|
*/
|
|
587
|
-
|
|
588
|
-
|
|
589
519
|
const key = {
|
|
590
520
|
request,
|
|
591
521
|
requestOptions,
|
|
@@ -598,7 +528,6 @@ function createTransporter({
|
|
|
598
528
|
* With the computed key, we first ask the responses cache
|
|
599
529
|
* implementation if this request was been resolved before.
|
|
600
530
|
*/
|
|
601
|
-
|
|
602
531
|
return responsesCache.get(key, () => {
|
|
603
532
|
/**
|
|
604
533
|
* If the request has never resolved before, we actually ask if there
|
|
@@ -620,7 +549,6 @@ function createTransporter({
|
|
|
620
549
|
miss: response => responsesCache.set(key, response)
|
|
621
550
|
});
|
|
622
551
|
}
|
|
623
|
-
|
|
624
552
|
return {
|
|
625
553
|
hostsCache,
|
|
626
554
|
requester,
|
|
@@ -638,17 +566,13 @@ function createTransporter({
|
|
|
638
566
|
function createAlgoliaAgent(version) {
|
|
639
567
|
const algoliaAgent = {
|
|
640
568
|
value: `Algolia for JavaScript (${version})`,
|
|
641
|
-
|
|
642
569
|
add(options) {
|
|
643
570
|
const addedAlgoliaAgent = `; ${options.segment}${options.version !== undefined ? ` (${options.version})` : ''}`;
|
|
644
|
-
|
|
645
571
|
if (algoliaAgent.value.indexOf(addedAlgoliaAgent) === -1) {
|
|
646
572
|
algoliaAgent.value = `${algoliaAgent.value}${addedAlgoliaAgent}`;
|
|
647
573
|
}
|
|
648
|
-
|
|
649
574
|
return algoliaAgent;
|
|
650
575
|
}
|
|
651
|
-
|
|
652
576
|
};
|
|
653
577
|
return algoliaAgent;
|
|
654
578
|
}
|
|
@@ -723,7 +647,7 @@ function createXhrRequester() {
|
|
|
723
647
|
}
|
|
724
648
|
|
|
725
649
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
726
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
650
|
+
const apiClientVersion = '5.0.0-alpha.31';
|
|
727
651
|
function getDefaultHosts(appId) {
|
|
728
652
|
return [
|
|
729
653
|
{
|
|
@@ -777,6 +701,19 @@ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
777
701
|
});
|
|
778
702
|
return {
|
|
779
703
|
transporter,
|
|
704
|
+
/**
|
|
705
|
+
* The `appId` currently in use.
|
|
706
|
+
*/
|
|
707
|
+
appId: appIdOption,
|
|
708
|
+
/**
|
|
709
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
710
|
+
*/
|
|
711
|
+
clearCache() {
|
|
712
|
+
return Promise.all([
|
|
713
|
+
transporter.requestsCache.clear(),
|
|
714
|
+
transporter.responsesCache.clear(),
|
|
715
|
+
]).then(() => undefined);
|
|
716
|
+
},
|
|
780
717
|
/**
|
|
781
718
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
782
719
|
*/
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, shuffle, DEFAULT_CONNEC
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
5
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
5
|
+
const apiClientVersion = '5.0.0-alpha.31';
|
|
6
6
|
function getDefaultHosts(appId) {
|
|
7
7
|
return [
|
|
8
8
|
{
|
|
@@ -56,6 +56,19 @@ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
56
56
|
});
|
|
57
57
|
return {
|
|
58
58
|
transporter,
|
|
59
|
+
/**
|
|
60
|
+
* The `appId` currently in use.
|
|
61
|
+
*/
|
|
62
|
+
appId: appIdOption,
|
|
63
|
+
/**
|
|
64
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
65
|
+
*/
|
|
66
|
+
clearCache() {
|
|
67
|
+
return Promise.all([
|
|
68
|
+
transporter.requestsCache.clear(),
|
|
69
|
+
transporter.responsesCache.clear(),
|
|
70
|
+
]).then(() => undefined);
|
|
71
|
+
},
|
|
59
72
|
/**
|
|
60
73
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
61
74
|
*/
|
package/dist/recommend.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! recommend.umd.js | 5.0.0-alpha.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/recommend"]={})}(this,(function(e){"use strict";function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function s(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=s()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=s();return n[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=s();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function a(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,s,n={miss:()=>Promise.resolve()})=>r.get(e,s,n).catch((()=>a({caches:t}).get(e,s,n))),set:(e,s)=>r.set(e,s).catch((()=>a({caches:t}).set(e,s))),delete:e=>r.delete(e).catch((()=>a({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>a({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,a,s={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=a();return o.then((e=>s.miss(e))).then((()=>o))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const n=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class p extends u{constructor(e,t,r){super(e,r,"ApiError"),i(this,"status",void 0),this.status=t}}class d extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}function h(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let s=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(s+=`?${a}`),s}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:s,timeouts:n,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const g=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),O=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},s={};return Object.keys(a).forEach((e=>{const t=a[e];s[e.toLowerCase()]=t})),s}(r,c.headers,u.headers),b="GET"===c.method?{...c.data,...u.data}:{},P={"x-algolia-agent":s.value,...a,...c.queryParameters,...b};if(u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?P[e]=u.queryParameters[e].toString():P[e]=u.queryParameters[e];let v=0;const w=async(e,r)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>m(e)))}(g));let s=u.timeout;void 0===s&&(s=f?n.read:n.write);const b={data:y,headers:O,method:c.method,url:h(a,c.path,P),connectTimeout:r(v,n.connect),responseTimeout:r(v,s)},j=t=>{const r={request:b,response:t,host:a,triesLeft:e.length};return g.push(r),r},q=await i.send(b);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(q)){const s=j(q);return q.isTimedOut&&v++,console.log("Retryable failure",m(s)),await t.set(a,o(a,q.isTimedOut?"timed out":"down")),w(e,r)}if(function({status:e}){return 2==~~(e/100)}(q))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(q);throw j(q),function({content:e,status:t},r){let a=e;try{a=JSON.parse(e).message}catch(e){}return new p(a,t,r)}(q,g)},j=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),q=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),a=r.filter((e=>e.isUp())),s=r.filter((e=>e.isTimedOut())),n=[...a,...s];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===s.length&&0===e?1:s.length+3+e)*t}}(j);return w([...q.hosts].reverse(),q.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:s,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const s=e.useReadTransporter||"GET"===e.method;if(!s)return f(e,t,s);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function g({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}function y(e,t){if(null==e)return{};var r,a,s=function(e,t){if(null==e)return{};var r,a,s={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var O=["appId","apiKey","authMode","algoliaAgents"];function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function P(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?b(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var v="5.0.0-alpha.3";function w(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const a=Math.floor(Math.random()*(r+1)),s=e[r];t[r]=e[a],t[a]=s}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}e.apiClientVersion=v,e.recommendClient=function(e,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,r=e.apiKey,a=e.authMode,s=e.algoliaAgents,n=y(e,O),o=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(t,r,a),i=f(P(P({hosts:w(t)},n),{},{algoliaAgent:g({algoliaAgents:s,client:"Recommend",version:v}),baseHeaders:P(P({"content-type":"text/plain"},o.headers()),n.baseHeaders),baseQueryParameters:P(P({},o.queryParameters()),n.baseQueryParameters)}));return{transporter:i,get _ua(){return i.algoliaAgent.value},addAlgoliaAgent:function(e,t){i.algoliaAgent.add({segment:e,version:t})},del:function(e,t){var r=e.path,a=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `del`.");var s={method:"DELETE",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return i.request(s,t)},get:function(e,t){var r=e.path,a=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `get`.");var s={method:"GET",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return i.request(s,t)},getRecommendations:function(e,t){if(!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return i.request(r,t)},post:function(e,t){var r=e.path,a=e.parameters,s=e.body;if(!r)throw new Error("Parameter `path` is required when calling `post`.");var n={method:"POST",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:s||{}};return i.request(n,t)},put:function(e,t){var r=e.path,a=e.parameters,s=e.body;if(!r)throw new Error("Parameter `path` is required when calling `put`.");var n={method:"PUT",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:s||{}};return i.request(n,t)}}}(function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?j(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({appId:e,apiKey:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),s=a(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(s),n=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(s),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(s),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:a({caches:[r({key:"".concat(v,"-").concat(e)}),s()]})},o))}}));
|
|
1
|
+
/*! recommend.umd.js | 5.0.0-alpha.31 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/recommend"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(o)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,o={miss:()=>Promise.resolve()})=>s.get(e,a,o).catch((()=>r({caches:t}).get(e,a,o))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const n=s();return n.then((e=>a.miss(e))).then((()=>n))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r){super(e,r,"ApiError"),n(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}function h(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function p({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:p}){async function g(c,p,g=!0){const f=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,p),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,p.headers),w="GET"===c.method?{...c.data,...p.data}:{},q={...s,...c.queryParameters,...w};if(a.value&&(q["x-algolia-agent"]=a.value),p&&p.queryParameters)for(const e of Object.keys(p.queryParameters))p.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(p.queryParameters[e])?q[e]=p.queryParameters[e].toString():q[e]=p.queryParameters[e];let v=0;const b=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>m(e)))}(f));let a=p.timeout;void 0===a&&(a=g?n.read:n.write);const w={data:y,headers:P,method:c.method,url:h(s,c.path,q),connectTimeout:r(v,n.connect),responseTimeout:r(v,a)},O=t=>{const r={request:w,response:t,host:s,triesLeft:e.length};return f.push(r),r},T=await i.send(w);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(T)){const a=O(T);return T.isTimedOut&&v++,console.log("Retryable failure",m(a)),await t.set(s,o(s,T.isTimedOut?"timed out":"down")),b(e,r)}if(function({status:e}){return 2==~~(e/100)}(T))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(T);throw O(T),function({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(e){}return new l(s,t,r)}(T,f)},O=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),T=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),n=[...s,...a];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return b([...T.hosts].reverse(),T.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const o=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return p.get(n,(()=>c.get(n,(()=>c.set(n,o()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>p.set(n,e)})},requestsCache:c,responsesCache:p}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const f="5.0.0-alpha.31";function y(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1)),a=e[r];t[r]=e[s],t[s]=a}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=f,e.recommendClient=function(e,a,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),n=p({hosts:y(e),...a,algoliaAgent:g({algoliaAgents:s,client:"Recommend",version:f}),baseHeaders:{"content-type":"text/plain",...o.headers(),...a.baseHeaders},baseQueryParameters:{...o.queryParameters(),...a.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},del({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(s,r)},get({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(s,r)},getRecommendations(e,t){if(!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)},post({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(a,s)},put({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(a,s)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===o&&(clearTimeout(a),o=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(o),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(o),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`5.0.0-alpha.31-${e}`}),s()]}),...o})}}));
|
|
@@ -2,9 +2,17 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common
|
|
|
2
2
|
import type { DelProps, GetProps, PostProps, PutProps } from '../model/clientMethodProps';
|
|
3
3
|
import type { GetRecommendationsParams } from '../model/getRecommendationsParams';
|
|
4
4
|
import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
|
|
5
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
5
|
+
export declare const apiClientVersion = "5.0.0-alpha.31";
|
|
6
6
|
export declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
7
7
|
transporter: import("@algolia/client-common").Transporter;
|
|
8
|
+
/**
|
|
9
|
+
* The `appId` currently in use.
|
|
10
|
+
*/
|
|
11
|
+
appId: string;
|
|
12
|
+
/**
|
|
13
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
14
|
+
*/
|
|
15
|
+
clearCache(): Promise<void>;
|
|
8
16
|
/**
|
|
9
17
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
10
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendClient.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"recommendClient.d.ts","sourceRoot":"","sources":["../../src/recommendClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEtF,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAsCjD,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,GAAG,OAAO,EACX,EAAE,mBAAmB;;IAwBlB;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;OAMG;iDAEyB,wBAAwB,mBACjC,cAAc,GAC9B,QAAQ,0BAA0B,CAAC;IA8BtC;;;;;;;;;OASG;qCAE2B,SAAS,mBACpB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;;;;OASG;oCAE2B,QAAQ,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;EAoBlC;AAED;;GAEG;AACH,oBAAY,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -37,7 +37,7 @@ export type BaseSearchResponse = {
|
|
|
37
37
|
/**
|
|
38
38
|
* Indicate if the typo-tolerance search was exhaustive or approximate (only included when typo-tolerance is enabled).
|
|
39
39
|
*/
|
|
40
|
-
exhaustiveTypo
|
|
40
|
+
exhaustiveTypo?: boolean;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* A mapping of each facet name to the corresponding facet counts.
|
|
@@ -17,11 +17,6 @@ export type IndexSettingsAsSearchParams = {
|
|
|
17
17
|
*/
|
|
18
18
|
attributesForFaceting?: string[];
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* List of attributes that can\'t be retrieved at query time.
|
|
22
|
-
*/
|
|
23
|
-
unretrievableAttributes?: string[];
|
|
24
|
-
|
|
25
20
|
/**
|
|
26
21
|
* This parameter controls which attributes to retrieve and which not to retrieve.
|
|
27
22
|
*/
|
|
@@ -166,6 +161,11 @@ export type IndexSettingsAsSearchParams = {
|
|
|
166
161
|
|
|
167
162
|
distinct?: Distinct;
|
|
168
163
|
|
|
164
|
+
/**
|
|
165
|
+
* Name of the de-duplication attribute to be used with the distinct feature.
|
|
166
|
+
*/
|
|
167
|
+
attributeForDistinct?: string;
|
|
168
|
+
|
|
169
169
|
/**
|
|
170
170
|
* Whether to take into account an index\'s synonyms for a particular search.
|
|
171
171
|
*/
|
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.31",
|
|
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.31",
|
|
42
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.31",
|
|
43
|
+
"@algolia/requester-node-http": "5.0.0-alpha.31"
|
|
27
44
|
},
|
|
28
45
|
"devDependencies": {
|
|
29
|
-
"@types/node": "16.11.
|
|
30
|
-
"
|
|
46
|
+
"@types/node": "16.11.59",
|
|
47
|
+
"rollup": "2.79.1",
|
|
48
|
+
"typescript": "4.8.3"
|
|
31
49
|
},
|
|
32
50
|
"engines": {
|
|
33
51
|
"node": ">= 14.0.0"
|