@algolia/recommend 5.0.0-alpha.5 → 5.0.0-alpha.50
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 +1 -1
- package/dist/recommend.esm.browser.js +60 -110
- package/dist/recommend.esm.node.js +1 -1
- package/dist/recommend.umd.js +2 -2
- package/dist/src/recommendClient.d.ts +1 -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.50';
|
|
10
10
|
function getDefaultHosts(appId) {
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
@@ -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,
|
|
@@ -200,6 +172,7 @@ function createStatefulHost(host, status = 'up') {
|
|
|
200
172
|
}
|
|
201
173
|
|
|
202
174
|
function _defineProperty(obj, key, value) {
|
|
175
|
+
key = _toPropertyKey(key);
|
|
203
176
|
if (key in obj) {
|
|
204
177
|
Object.defineProperty(obj, key, {
|
|
205
178
|
value: value,
|
|
@@ -210,92 +183,96 @@ function _defineProperty(obj, key, value) {
|
|
|
210
183
|
} else {
|
|
211
184
|
obj[key] = value;
|
|
212
185
|
}
|
|
213
|
-
|
|
214
186
|
return obj;
|
|
215
187
|
}
|
|
188
|
+
function _toPrimitive(input, hint) {
|
|
189
|
+
if (typeof input !== "object" || input === null) return input;
|
|
190
|
+
var prim = input[Symbol.toPrimitive];
|
|
191
|
+
if (prim !== undefined) {
|
|
192
|
+
var res = prim.call(input, hint || "default");
|
|
193
|
+
if (typeof res !== "object") return res;
|
|
194
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
195
|
+
}
|
|
196
|
+
return (hint === "string" ? String : Number)(input);
|
|
197
|
+
}
|
|
198
|
+
function _toPropertyKey(arg) {
|
|
199
|
+
var key = _toPrimitive(arg, "string");
|
|
200
|
+
return typeof key === "symbol" ? key : String(key);
|
|
201
|
+
}
|
|
216
202
|
|
|
217
203
|
class AlgoliaError extends Error {
|
|
218
204
|
constructor(message, name) {
|
|
219
205
|
super(message);
|
|
220
|
-
|
|
221
206
|
_defineProperty(this, "name", 'AlgoliaError');
|
|
222
|
-
|
|
223
207
|
if (name) {
|
|
224
208
|
this.name = name;
|
|
225
209
|
}
|
|
226
210
|
}
|
|
227
|
-
|
|
228
211
|
}
|
|
229
212
|
class ErrorWithStackTrace extends AlgoliaError {
|
|
230
213
|
constructor(message, stackTrace, name) {
|
|
231
|
-
super(message, name);
|
|
232
|
-
|
|
214
|
+
super(message, name);
|
|
215
|
+
// the array and object should be frozen to reflect the stackTrace at the time of the error
|
|
233
216
|
_defineProperty(this, "stackTrace", void 0);
|
|
234
|
-
|
|
235
217
|
this.stackTrace = stackTrace;
|
|
236
218
|
}
|
|
237
|
-
|
|
238
219
|
}
|
|
239
220
|
class RetryError extends ErrorWithStackTrace {
|
|
240
221
|
constructor(stackTrace) {
|
|
241
222
|
super('Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.', stackTrace, 'RetryError');
|
|
242
223
|
}
|
|
243
|
-
|
|
244
224
|
}
|
|
245
225
|
class ApiError extends ErrorWithStackTrace {
|
|
246
|
-
constructor(message, status, stackTrace) {
|
|
247
|
-
super(message, stackTrace,
|
|
248
|
-
|
|
226
|
+
constructor(message, status, stackTrace, name = 'ApiError') {
|
|
227
|
+
super(message, stackTrace, name);
|
|
249
228
|
_defineProperty(this, "status", void 0);
|
|
250
|
-
|
|
251
229
|
this.status = status;
|
|
252
230
|
}
|
|
253
|
-
|
|
254
231
|
}
|
|
255
232
|
class DeserializationError extends AlgoliaError {
|
|
256
233
|
constructor(message, response) {
|
|
257
234
|
super(message, 'DeserializationError');
|
|
258
|
-
|
|
259
235
|
_defineProperty(this, "response", void 0);
|
|
260
|
-
|
|
261
236
|
this.response = response;
|
|
262
237
|
}
|
|
263
|
-
|
|
238
|
+
}
|
|
239
|
+
// DetailedApiError is only used by the ingestion client to return more informative error, other clients will use ApiClient.
|
|
240
|
+
class DetailedApiError extends ApiError {
|
|
241
|
+
constructor(message, status, error, stackTrace) {
|
|
242
|
+
super(message, status, stackTrace, 'DetailedApiError');
|
|
243
|
+
_defineProperty(this, "error", void 0);
|
|
244
|
+
this.error = error;
|
|
245
|
+
}
|
|
264
246
|
}
|
|
265
247
|
|
|
266
248
|
function shuffle(array) {
|
|
267
249
|
const shuffledArray = array;
|
|
268
|
-
|
|
269
250
|
for (let c = array.length - 1; c > 0; c--) {
|
|
270
251
|
const b = Math.floor(Math.random() * (c + 1));
|
|
271
252
|
const a = array[c];
|
|
272
253
|
shuffledArray[c] = array[b];
|
|
273
254
|
shuffledArray[b] = a;
|
|
274
255
|
}
|
|
275
|
-
|
|
276
256
|
return shuffledArray;
|
|
277
257
|
}
|
|
278
258
|
function serializeUrl(host, path, queryParameters) {
|
|
279
259
|
const queryParametersAsString = serializeQueryParameters(queryParameters);
|
|
280
260
|
let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.substr(1) : path}`;
|
|
281
|
-
|
|
282
261
|
if (queryParametersAsString.length) {
|
|
283
262
|
url += `?${queryParametersAsString}`;
|
|
284
263
|
}
|
|
285
|
-
|
|
286
264
|
return url;
|
|
287
265
|
}
|
|
288
266
|
function serializeQueryParameters(parameters) {
|
|
289
267
|
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('&');
|
|
268
|
+
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key])}`).join('&');
|
|
292
269
|
}
|
|
293
270
|
function serializeData(request, requestOptions) {
|
|
294
271
|
if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
|
|
295
272
|
return undefined;
|
|
296
273
|
}
|
|
297
|
-
|
|
298
|
-
|
|
274
|
+
const data = Array.isArray(request.data) ? request.data : {
|
|
275
|
+
...request.data,
|
|
299
276
|
...requestOptions.data
|
|
300
277
|
};
|
|
301
278
|
return JSON.stringify(data);
|
|
@@ -325,14 +302,16 @@ function deserializeFailure({
|
|
|
325
302
|
content,
|
|
326
303
|
status
|
|
327
304
|
}, stackFrame) {
|
|
328
|
-
let message = content;
|
|
329
|
-
|
|
330
305
|
try {
|
|
331
|
-
|
|
332
|
-
|
|
306
|
+
const parsed = JSON.parse(content);
|
|
307
|
+
if ('error' in parsed) {
|
|
308
|
+
return new DetailedApiError(parsed.message, status, parsed.error, stackFrame);
|
|
309
|
+
}
|
|
310
|
+
return new ApiError(parsed.message, status, stackFrame);
|
|
311
|
+
} catch (e) {
|
|
312
|
+
// ..
|
|
333
313
|
}
|
|
334
|
-
|
|
335
|
-
return new ApiError(message, status, stackFrame);
|
|
314
|
+
return new ApiError(content, status, stackFrame);
|
|
336
315
|
}
|
|
337
316
|
|
|
338
317
|
function isNetworkError({
|
|
@@ -363,9 +342,12 @@ function stackFrameWithoutCredentials(stackFrame) {
|
|
|
363
342
|
const modifiedHeaders = stackFrame.request.headers['x-algolia-api-key'] ? {
|
|
364
343
|
'x-algolia-api-key': '*****'
|
|
365
344
|
} : {};
|
|
366
|
-
return {
|
|
367
|
-
|
|
368
|
-
|
|
345
|
+
return {
|
|
346
|
+
...stackFrame,
|
|
347
|
+
request: {
|
|
348
|
+
...stackFrame.request,
|
|
349
|
+
headers: {
|
|
350
|
+
...stackFrame.request.headers,
|
|
369
351
|
...modifiedHeaders
|
|
370
352
|
}
|
|
371
353
|
}
|
|
@@ -390,13 +372,12 @@ function createTransporter({
|
|
|
390
372
|
});
|
|
391
373
|
}));
|
|
392
374
|
const hostsUp = statefulHosts.filter(host => host.isUp());
|
|
393
|
-
const hostsTimedOut = statefulHosts.filter(host => host.isTimedOut());
|
|
394
|
-
|
|
375
|
+
const hostsTimedOut = statefulHosts.filter(host => host.isTimedOut());
|
|
376
|
+
// Note, we put the hosts that previously timed out on the end of the list.
|
|
395
377
|
const hostsAvailable = [...hostsUp, ...hostsTimedOut];
|
|
396
378
|
const compatibleHostsAvailable = hostsAvailable.length > 0 ? hostsAvailable : compatibleHosts;
|
|
397
379
|
return {
|
|
398
380
|
hosts: compatibleHostsAvailable,
|
|
399
|
-
|
|
400
381
|
getTimeout(timeoutsCount, baseTimeout) {
|
|
401
382
|
/**
|
|
402
383
|
* Imagine that you have 4 hosts, if timeouts will increase
|
|
@@ -412,29 +393,28 @@ function createTransporter({
|
|
|
412
393
|
const timeoutMultiplier = hostsTimedOut.length === 0 && timeoutsCount === 0 ? 1 : hostsTimedOut.length + 3 + timeoutsCount;
|
|
413
394
|
return timeoutMultiplier * baseTimeout;
|
|
414
395
|
}
|
|
415
|
-
|
|
416
396
|
};
|
|
417
397
|
}
|
|
418
|
-
|
|
419
398
|
async function retryableRequest(request, requestOptions, isRead = true) {
|
|
420
399
|
const stackTrace = [];
|
|
421
400
|
/**
|
|
422
401
|
* First we prepare the payload that do not depend from hosts.
|
|
423
402
|
*/
|
|
424
|
-
|
|
425
403
|
const data = serializeData(request, requestOptions);
|
|
426
|
-
const headers = serializeHeaders(baseHeaders, request.headers, requestOptions.headers);
|
|
427
|
-
|
|
428
|
-
const dataQueryParameters = request.method === 'GET' ? {
|
|
404
|
+
const headers = serializeHeaders(baseHeaders, request.headers, requestOptions.headers);
|
|
405
|
+
// On `GET`, the data is proxied to query parameters.
|
|
406
|
+
const dataQueryParameters = request.method === 'GET' ? {
|
|
407
|
+
...request.data,
|
|
429
408
|
...requestOptions.data
|
|
430
409
|
} : {};
|
|
431
410
|
const queryParameters = {
|
|
432
|
-
'x-algolia-agent': algoliaAgent.value,
|
|
433
411
|
...baseQueryParameters,
|
|
434
412
|
...request.queryParameters,
|
|
435
413
|
...dataQueryParameters
|
|
436
414
|
};
|
|
437
|
-
|
|
415
|
+
if (algoliaAgent.value) {
|
|
416
|
+
queryParameters['x-algolia-agent'] = algoliaAgent.value;
|
|
417
|
+
}
|
|
438
418
|
if (requestOptions && requestOptions.queryParameters) {
|
|
439
419
|
for (const key of Object.keys(requestOptions.queryParameters)) {
|
|
440
420
|
// We want to keep `undefined` and `null` values,
|
|
@@ -447,25 +427,19 @@ function createTransporter({
|
|
|
447
427
|
}
|
|
448
428
|
}
|
|
449
429
|
}
|
|
450
|
-
|
|
451
430
|
let timeoutsCount = 0;
|
|
452
|
-
|
|
453
431
|
const retry = async (retryableHosts, getTimeout) => {
|
|
454
432
|
/**
|
|
455
433
|
* We iterate on each host, until there is no host left.
|
|
456
434
|
*/
|
|
457
435
|
const host = retryableHosts.pop();
|
|
458
|
-
|
|
459
436
|
if (host === undefined) {
|
|
460
437
|
throw new RetryError(stackTraceWithoutCredentials(stackTrace));
|
|
461
438
|
}
|
|
462
|
-
|
|
463
439
|
let responseTimeout = requestOptions.timeout;
|
|
464
|
-
|
|
465
440
|
if (responseTimeout === undefined) {
|
|
466
441
|
responseTimeout = isRead ? timeouts.read : timeouts.write;
|
|
467
442
|
}
|
|
468
|
-
|
|
469
443
|
const payload = {
|
|
470
444
|
data,
|
|
471
445
|
headers,
|
|
@@ -479,7 +453,6 @@ function createTransporter({
|
|
|
479
453
|
* can have information about onRetry and onFailure
|
|
480
454
|
* decisions.
|
|
481
455
|
*/
|
|
482
|
-
|
|
483
456
|
const pushToStackTrace = response => {
|
|
484
457
|
const stackFrame = {
|
|
485
458
|
request: payload,
|
|
@@ -490,12 +463,10 @@ function createTransporter({
|
|
|
490
463
|
stackTrace.push(stackFrame);
|
|
491
464
|
return stackFrame;
|
|
492
465
|
};
|
|
493
|
-
|
|
494
466
|
const response = await requester.send(payload);
|
|
495
|
-
|
|
496
467
|
if (isRetryable(response)) {
|
|
497
|
-
const stackFrame = pushToStackTrace(response);
|
|
498
|
-
|
|
468
|
+
const stackFrame = pushToStackTrace(response);
|
|
469
|
+
// If response is a timeout, we increase the number of timeouts so we can increase the timeout later.
|
|
499
470
|
if (response.isTimedOut) {
|
|
500
471
|
timeoutsCount++;
|
|
501
472
|
}
|
|
@@ -505,23 +476,18 @@ function createTransporter({
|
|
|
505
476
|
* when a retry error does not happen.
|
|
506
477
|
*/
|
|
507
478
|
// eslint-disable-next-line no-console -- this will be fixed by exposing a `logger` to the transporter
|
|
508
|
-
|
|
509
|
-
|
|
510
479
|
console.log('Retryable failure', stackFrameWithoutCredentials(stackFrame));
|
|
511
480
|
/**
|
|
512
481
|
* We also store the state of the host in failure cases. If the host, is
|
|
513
482
|
* down it will remain down for the next 2 minutes. In a timeout situation,
|
|
514
483
|
* this host will be added end of the list of hosts on the next request.
|
|
515
484
|
*/
|
|
516
|
-
|
|
517
485
|
await hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? 'timed out' : 'down'));
|
|
518
486
|
return retry(retryableHosts, getTimeout);
|
|
519
487
|
}
|
|
520
|
-
|
|
521
488
|
if (isSuccess(response)) {
|
|
522
489
|
return deserializeSuccess(response);
|
|
523
490
|
}
|
|
524
|
-
|
|
525
491
|
pushToStackTrace(response);
|
|
526
492
|
throw deserializeFailure(response, stackTrace);
|
|
527
493
|
};
|
|
@@ -533,20 +499,16 @@ function createTransporter({
|
|
|
533
499
|
* 2. We also get from the retryable options a timeout multiplier that is tailored
|
|
534
500
|
* for the current context.
|
|
535
501
|
*/
|
|
536
|
-
|
|
537
|
-
|
|
538
502
|
const compatibleHosts = hosts.filter(host => host.accept === 'readWrite' || (isRead ? host.accept === 'read' : host.accept === 'write'));
|
|
539
503
|
const options = await createRetryableOptions(compatibleHosts);
|
|
540
504
|
return retry([...options.hosts].reverse(), options.getTimeout);
|
|
541
505
|
}
|
|
542
|
-
|
|
543
506
|
function createRequest(request, requestOptions = {}) {
|
|
544
507
|
/**
|
|
545
508
|
* A read request is either a `GET` request, or a request that we make
|
|
546
509
|
* via the `read` transporter (e.g. `search`).
|
|
547
510
|
*/
|
|
548
511
|
const isRead = request.useReadTransporter || request.method === 'GET';
|
|
549
|
-
|
|
550
512
|
if (!isRead) {
|
|
551
513
|
/**
|
|
552
514
|
* On write requests, no cache mechanisms are applied, and we
|
|
@@ -554,7 +516,6 @@ function createTransporter({
|
|
|
554
516
|
*/
|
|
555
517
|
return retryableRequest(request, requestOptions, isRead);
|
|
556
518
|
}
|
|
557
|
-
|
|
558
519
|
const createRetryableRequest = () => {
|
|
559
520
|
/**
|
|
560
521
|
* Then, we prepare a function factory that contains the construction of
|
|
@@ -568,14 +529,11 @@ function createTransporter({
|
|
|
568
529
|
* request is "cacheable" - should be cached. Note that, once again,
|
|
569
530
|
* the user can force this option.
|
|
570
531
|
*/
|
|
571
|
-
|
|
572
|
-
|
|
573
532
|
const cacheable = requestOptions.cacheable || request.cacheable;
|
|
574
533
|
/**
|
|
575
534
|
* If is not "cacheable", we immediately trigger the retryable request, no
|
|
576
535
|
* need to check cache implementations.
|
|
577
536
|
*/
|
|
578
|
-
|
|
579
537
|
if (cacheable !== true) {
|
|
580
538
|
return createRetryableRequest();
|
|
581
539
|
}
|
|
@@ -584,8 +542,6 @@ function createTransporter({
|
|
|
584
542
|
* the cache implementations if this request is on progress or if the
|
|
585
543
|
* response already exists on the cache.
|
|
586
544
|
*/
|
|
587
|
-
|
|
588
|
-
|
|
589
545
|
const key = {
|
|
590
546
|
request,
|
|
591
547
|
requestOptions,
|
|
@@ -598,7 +554,6 @@ function createTransporter({
|
|
|
598
554
|
* With the computed key, we first ask the responses cache
|
|
599
555
|
* implementation if this request was been resolved before.
|
|
600
556
|
*/
|
|
601
|
-
|
|
602
557
|
return responsesCache.get(key, () => {
|
|
603
558
|
/**
|
|
604
559
|
* If the request has never resolved before, we actually ask if there
|
|
@@ -620,7 +575,6 @@ function createTransporter({
|
|
|
620
575
|
miss: response => responsesCache.set(key, response)
|
|
621
576
|
});
|
|
622
577
|
}
|
|
623
|
-
|
|
624
578
|
return {
|
|
625
579
|
hostsCache,
|
|
626
580
|
requester,
|
|
@@ -638,17 +592,13 @@ function createTransporter({
|
|
|
638
592
|
function createAlgoliaAgent(version) {
|
|
639
593
|
const algoliaAgent = {
|
|
640
594
|
value: `Algolia for JavaScript (${version})`,
|
|
641
|
-
|
|
642
595
|
add(options) {
|
|
643
596
|
const addedAlgoliaAgent = `; ${options.segment}${options.version !== undefined ? ` (${options.version})` : ''}`;
|
|
644
|
-
|
|
645
597
|
if (algoliaAgent.value.indexOf(addedAlgoliaAgent) === -1) {
|
|
646
598
|
algoliaAgent.value = `${algoliaAgent.value}${addedAlgoliaAgent}`;
|
|
647
599
|
}
|
|
648
|
-
|
|
649
600
|
return algoliaAgent;
|
|
650
601
|
}
|
|
651
|
-
|
|
652
602
|
};
|
|
653
603
|
return algoliaAgent;
|
|
654
604
|
}
|
|
@@ -723,7 +673,7 @@ function createXhrRequester() {
|
|
|
723
673
|
}
|
|
724
674
|
|
|
725
675
|
// 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.
|
|
676
|
+
const apiClientVersion = '5.0.0-alpha.50';
|
|
727
677
|
function getDefaultHosts(appId) {
|
|
728
678
|
return [
|
|
729
679
|
{
|
|
@@ -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.50';
|
|
6
6
|
function getDefaultHosts(appId) {
|
|
7
7
|
return [
|
|
8
8
|
{
|
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 h extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}function d(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:d(a,c.path,P),connectTimeout:r(v,n.connect),responseTimeout:r(v,s)},q=t=>{const r={request:b,response:t,host:a,triesLeft:e.length};return g.push(r),r},j=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)}(j)){const s=q(j);return j.isTimedOut&&v++,console.log("Retryable failure",m(s)),await t.set(a,o(a,j.isTimedOut?"timed out":"down")),w(e,r)}if(function({status:e}){return 2==~~(e/100)}(j))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(j);throw q(j),function({content:e,status:t},r){let a=e;try{a=JSON.parse(e).message}catch(e){}return new p(a,t,r)}(j,g)},q=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),j=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}}(q);return w([...j.hosts].reverse(),j.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.5";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 q(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,appId:t,clearCache:function(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((function(){}))},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?q(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):q(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.50 | © 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=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(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,s="ApiError"){super(e,r,s),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}}class m extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),n(this,"error",void 0),this.error=r}}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 p(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 g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:g}){async function f(c,g,f=!0){const y=[],P=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,g),v=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,g.headers),w="GET"===c.method?{...c.data,...g.data}:{},b={...s,...c.queryParameters,...w};if(a.value&&(b["x-algolia-agent"]=a.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?b[e]=g.queryParameters[e].toString():b[e]=g.queryParameters[e];let q=0;const O=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=g.timeout;void 0===a&&(a=f?n.read:n.write);const w={data:P,headers:v,method:c.method,url:h(s,c.path,b),connectTimeout:r(q,n.connect),responseTimeout:r(q,a)},T=t=>{const r={request:w,response:t,host:s,triesLeft:e.length};return y.push(r),r},S=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)}(S)){const a=T(S);return S.isTimedOut&&q++,console.log("Retryable failure",p(a)),await t.set(s,o(s,S.isTimedOut?"timed out":"down")),O(e,r)}if(function({status:e}){return 2==~~(e/100)}(S))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(S);throw T(S),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new m(s.message,t,s.error,r):new l(s.message,t,r)}catch(e){}return new l(e,t,r)}(S,y)},T=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),S=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}}(T);return O([...S.hosts].reverse(),S.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 f(e,t,a);const o=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return g.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=>g.set(n,e)})},requestsCache:c,responsesCache:g}}function f({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 y="5.0.0-alpha.50";function P(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=y,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=g({hosts:P(e),...a,algoliaAgent:f({algoliaAgents:s,client:"Recommend",version:y}),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.50-${e}`}),s()]}),...o})}}));
|
|
@@ -2,7 +2,7 @@ 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.50";
|
|
6
6
|
export declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
7
7
|
transporter: import("@algolia/client-common").Transporter;
|
|
8
8
|
/**
|
|
@@ -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.50",
|
|
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.50",
|
|
42
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.50",
|
|
43
|
+
"@algolia/requester-node-http": "5.0.0-alpha.50"
|
|
27
44
|
},
|
|
28
45
|
"devDependencies": {
|
|
29
|
-
"@types/node": "16.
|
|
30
|
-
"
|
|
46
|
+
"@types/node": "16.18.12",
|
|
47
|
+
"rollup": "2.79.1",
|
|
48
|
+
"typescript": "4.8.3"
|
|
31
49
|
},
|
|
32
50
|
"engines": {
|
|
33
51
|
"node": ">= 14.0.0"
|