@algolia/client-search 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.
Files changed (228) hide show
  1. package/dist/builds/browser.d.ts.map +1 -1
  2. package/dist/builds/node.d.ts.map +1 -1
  3. package/dist/client-search.cjs.js +163 -38
  4. package/dist/client-search.esm.browser.js +217 -172
  5. package/dist/client-search.esm.node.js +164 -39
  6. package/dist/client-search.umd.js +2 -2
  7. package/dist/model/acl.d.ts +3 -0
  8. package/dist/model/acl.d.ts.map +1 -1
  9. package/dist/model/action.d.ts.map +1 -1
  10. package/dist/model/addApiKeyResponse.d.ts +1 -1
  11. package/dist/model/addApiKeyResponse.d.ts.map +1 -1
  12. package/dist/model/advancedSyntaxFeatures.d.ts.map +1 -1
  13. package/dist/model/alternativesAsExact.d.ts.map +1 -1
  14. package/dist/model/anchoring.d.ts.map +1 -1
  15. package/dist/model/apiKey.d.ts.map +1 -1
  16. package/dist/model/aroundRadius.d.ts.map +1 -1
  17. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  18. package/dist/model/assignUserIdParams.d.ts.map +1 -1
  19. package/dist/model/attributeToUpdate.d.ts +3 -0
  20. package/dist/model/attributeToUpdate.d.ts.map +1 -0
  21. package/dist/model/automaticFacetFilter.d.ts.map +1 -1
  22. package/dist/model/automaticFacetFilters.d.ts.map +1 -1
  23. package/dist/model/baseGetApiKeyResponse.d.ts +11 -0
  24. package/dist/model/baseGetApiKeyResponse.d.ts.map +1 -0
  25. package/dist/model/baseIndexSettings.d.ts +4 -0
  26. package/dist/model/baseIndexSettings.d.ts.map +1 -1
  27. package/dist/model/baseSearchParams.d.ts.map +1 -1
  28. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  29. package/dist/model/baseSearchResponse.d.ts +1 -1
  30. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  31. package/dist/model/batchAssignUserIdsParams.d.ts.map +1 -1
  32. package/dist/model/batchDictionaryEntriesParams.d.ts.map +1 -1
  33. package/dist/model/batchDictionaryEntriesRequest.d.ts.map +1 -1
  34. package/dist/model/batchParams.d.ts +1 -1
  35. package/dist/model/batchParams.d.ts.map +1 -1
  36. package/dist/model/batchRequest.d.ts +2 -2
  37. package/dist/model/batchRequest.d.ts.map +1 -1
  38. package/dist/model/batchResponse.d.ts.map +1 -1
  39. package/dist/model/batchWriteParams.d.ts +1 -1
  40. package/dist/model/batchWriteParams.d.ts.map +1 -1
  41. package/dist/model/browseParams.d.ts +4 -0
  42. package/dist/model/browseParams.d.ts.map +1 -0
  43. package/dist/model/browseParamsObject.d.ts +4 -0
  44. package/dist/model/browseParamsObject.d.ts.map +1 -0
  45. package/dist/model/browseResponse.d.ts +2 -2
  46. package/dist/model/browseResponse.d.ts.map +1 -1
  47. package/dist/model/builtInOperation.d.ts.map +1 -1
  48. package/dist/model/builtInOperationType.d.ts.map +1 -1
  49. package/dist/model/clientMethodProps.d.ts +26 -14
  50. package/dist/model/clientMethodProps.d.ts.map +1 -1
  51. package/dist/model/condition.d.ts.map +1 -1
  52. package/dist/model/consequence.d.ts.map +1 -1
  53. package/dist/model/consequenceHide.d.ts.map +1 -1
  54. package/dist/model/consequenceParams.d.ts.map +1 -1
  55. package/dist/model/consequenceQuery.d.ts.map +1 -1
  56. package/dist/model/consequenceQueryObject.d.ts.map +1 -1
  57. package/dist/model/createdAtResponse.d.ts.map +1 -1
  58. package/dist/model/{baseBrowseResponse.d.ts → cursor.d.ts} +3 -3
  59. package/dist/model/cursor.d.ts.map +1 -0
  60. package/dist/model/deleteApiKeyResponse.d.ts.map +1 -1
  61. package/dist/model/deleteByParams.d.ts +27 -0
  62. package/dist/model/deleteByParams.d.ts.map +1 -0
  63. package/dist/model/deleteSourceResponse.d.ts.map +1 -1
  64. package/dist/model/deletedAtResponse.d.ts.map +1 -1
  65. package/dist/model/dictionaryAction.d.ts.map +1 -1
  66. package/dist/model/dictionaryEntry.d.ts.map +1 -1
  67. package/dist/model/dictionaryEntryState.d.ts.map +1 -1
  68. package/dist/model/dictionaryLanguage.d.ts.map +1 -1
  69. package/dist/model/dictionarySettingsParams.d.ts.map +1 -1
  70. package/dist/model/dictionaryType.d.ts.map +1 -1
  71. package/dist/model/distinct.d.ts.map +1 -1
  72. package/dist/model/edit.d.ts.map +1 -1
  73. package/dist/model/editType.d.ts.map +1 -1
  74. package/dist/model/errorBase.d.ts.map +1 -1
  75. package/dist/model/exactOnSingleWordQuery.d.ts.map +1 -1
  76. package/dist/model/facetFilters.d.ts.map +1 -1
  77. package/dist/model/facetHits.d.ts.map +1 -1
  78. package/dist/model/facetOrdering.d.ts.map +1 -1
  79. package/dist/model/facets.d.ts.map +1 -1
  80. package/dist/model/facetsStats.d.ts.map +1 -1
  81. package/dist/model/fetchedIndex.d.ts +1 -1
  82. package/dist/model/fetchedIndex.d.ts.map +1 -1
  83. package/dist/model/getApiKeyResponse.d.ts +4 -0
  84. package/dist/model/getApiKeyResponse.d.ts.map +1 -0
  85. package/dist/model/getDictionarySettingsResponse.d.ts.map +1 -1
  86. package/dist/model/getLogsResponse.d.ts.map +1 -1
  87. package/dist/model/getObjectsParams.d.ts +1 -1
  88. package/dist/model/getObjectsParams.d.ts.map +1 -1
  89. package/dist/model/getObjectsRequest.d.ts.map +1 -1
  90. package/dist/model/getObjectsResponse.d.ts.map +1 -1
  91. package/dist/model/getTaskResponse.d.ts.map +1 -1
  92. package/dist/model/getTopUserIdsResponse.d.ts.map +1 -1
  93. package/dist/model/hasPendingMappingsResponse.d.ts.map +1 -1
  94. package/dist/model/highlightResult.d.ts.map +1 -1
  95. package/dist/model/highlightResultOption.d.ts.map +1 -1
  96. package/dist/model/hit.d.ts.map +1 -1
  97. package/dist/model/ignorePlurals.d.ts.map +1 -1
  98. package/dist/model/index.d.ts +7 -6
  99. package/dist/model/index.d.ts.map +1 -1
  100. package/dist/model/indexSettings.d.ts.map +1 -1
  101. package/dist/model/indexSettingsAsSearchParams.d.ts +4 -4
  102. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  103. package/dist/model/languages.d.ts.map +1 -1
  104. package/dist/model/listApiKeysResponse.d.ts +2 -2
  105. package/dist/model/listApiKeysResponse.d.ts.map +1 -1
  106. package/dist/model/listClustersResponse.d.ts.map +1 -1
  107. package/dist/model/listIndicesResponse.d.ts.map +1 -1
  108. package/dist/model/listUserIdsResponse.d.ts.map +1 -1
  109. package/dist/model/log.d.ts.map +1 -1
  110. package/dist/model/logQuery.d.ts.map +1 -1
  111. package/dist/model/logType.d.ts.map +1 -1
  112. package/dist/model/matchLevel.d.ts.map +1 -1
  113. package/dist/model/matchedGeoLocation.d.ts.map +1 -1
  114. package/dist/model/mixedSearchFilters.d.ts.map +1 -1
  115. package/dist/model/multipleBatchRequest.d.ts +3 -3
  116. package/dist/model/multipleBatchRequest.d.ts.map +1 -1
  117. package/dist/model/multipleBatchResponse.d.ts +2 -2
  118. package/dist/model/multipleBatchResponse.d.ts.map +1 -1
  119. package/dist/model/numericFilters.d.ts.map +1 -1
  120. package/dist/model/operationIndexParams.d.ts.map +1 -1
  121. package/dist/model/operationType.d.ts.map +1 -1
  122. package/dist/model/optionalFilters.d.ts.map +1 -1
  123. package/dist/model/params.d.ts.map +1 -1
  124. package/dist/model/personalization.d.ts.map +1 -1
  125. package/dist/model/promote.d.ts.map +1 -1
  126. package/dist/model/promoteObjectID.d.ts.map +1 -1
  127. package/dist/model/promoteObjectIDs.d.ts.map +1 -1
  128. package/dist/model/queryType.d.ts.map +1 -1
  129. package/dist/model/rankingInfo.d.ts.map +1 -1
  130. package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
  131. package/dist/model/removeStopWords.d.ts.map +1 -1
  132. package/dist/model/removeUserIdResponse.d.ts.map +1 -1
  133. package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
  134. package/dist/model/renderingContent.d.ts.map +1 -1
  135. package/dist/model/replaceSourceResponse.d.ts.map +1 -1
  136. package/dist/model/rule.d.ts.map +1 -1
  137. package/dist/model/saveObjectResponse.d.ts.map +1 -1
  138. package/dist/model/saveSynonymResponse.d.ts.map +1 -1
  139. package/dist/model/scopeType.d.ts.map +1 -1
  140. package/dist/model/searchDictionaryEntriesParams.d.ts.map +1 -1
  141. package/dist/model/searchForFacetValuesRequest.d.ts.map +1 -1
  142. package/dist/model/searchForFacetValuesResponse.d.ts.map +1 -1
  143. package/dist/model/searchForFacets.d.ts.map +1 -1
  144. package/dist/model/searchForFacetsOptions.d.ts.map +1 -1
  145. package/dist/model/searchForHits.d.ts.map +1 -1
  146. package/dist/model/searchForHitsOptions.d.ts.map +1 -1
  147. package/dist/model/searchHits.d.ts.map +1 -1
  148. package/dist/model/searchMethodParams.d.ts.map +1 -1
  149. package/dist/model/searchParams.d.ts.map +1 -1
  150. package/dist/model/searchParamsObject.d.ts.map +1 -1
  151. package/dist/model/searchParamsQuery.d.ts.map +1 -1
  152. package/dist/model/searchParamsString.d.ts.map +1 -1
  153. package/dist/model/searchQuery.d.ts.map +1 -1
  154. package/dist/model/searchResponse.d.ts.map +1 -1
  155. package/dist/model/searchResponses.d.ts.map +1 -1
  156. package/dist/model/searchRulesParams.d.ts.map +1 -1
  157. package/dist/model/searchRulesResponse.d.ts.map +1 -1
  158. package/dist/model/searchStrategy.d.ts.map +1 -1
  159. package/dist/model/searchSynonymsParams.d.ts.map +1 -1
  160. package/dist/model/searchSynonymsResponse.d.ts.map +1 -1
  161. package/dist/model/searchTypeDefault.d.ts.map +1 -1
  162. package/dist/model/searchTypeFacet.d.ts.map +1 -1
  163. package/dist/model/searchUserIdsParams.d.ts.map +1 -1
  164. package/dist/model/searchUserIdsResponse.d.ts.map +1 -1
  165. package/dist/model/snippetResult.d.ts.map +1 -1
  166. package/dist/model/snippetResultOption.d.ts.map +1 -1
  167. package/dist/model/sortRemainingBy.d.ts.map +1 -1
  168. package/dist/model/source.d.ts.map +1 -1
  169. package/dist/model/standardEntries.d.ts.map +1 -1
  170. package/dist/model/synonymHit.d.ts +0 -2
  171. package/dist/model/synonymHit.d.ts.map +1 -1
  172. package/dist/model/synonymType.d.ts.map +1 -1
  173. package/dist/model/tagFilters.d.ts.map +1 -1
  174. package/dist/model/taskStatus.d.ts.map +1 -1
  175. package/dist/model/timeRange.d.ts.map +1 -1
  176. package/dist/model/typoTolerance.d.ts.map +1 -1
  177. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  178. package/dist/model/updateApiKeyResponse.d.ts +1 -1
  179. package/dist/model/updateApiKeyResponse.d.ts.map +1 -1
  180. package/dist/model/updatedAtResponse.d.ts.map +1 -1
  181. package/dist/model/updatedAtWithObjectIdResponse.d.ts.map +1 -1
  182. package/dist/model/updatedRuleResponse.d.ts.map +1 -1
  183. package/dist/model/userHighlightResult.d.ts.map +1 -1
  184. package/dist/model/userHit.d.ts.map +1 -1
  185. package/dist/model/userId.d.ts.map +1 -1
  186. package/dist/model/value.d.ts.map +1 -1
  187. package/dist/src/searchClient.d.ts +71 -24
  188. package/dist/src/searchClient.d.ts.map +1 -1
  189. package/model/acl.ts +3 -0
  190. package/model/addApiKeyResponse.ts +1 -1
  191. package/model/{attributeOrBuiltInOperation.ts → attributeToUpdate.ts} +1 -1
  192. package/model/baseGetApiKeyResponse.ts +13 -0
  193. package/model/baseIndexSettings.ts +5 -0
  194. package/model/baseSearchResponse.ts +1 -1
  195. package/model/batchParams.ts +1 -1
  196. package/model/batchRequest.ts +2 -2
  197. package/model/batchWriteParams.ts +1 -1
  198. package/model/browseParams.ts +6 -0
  199. package/model/browseParamsObject.ts +6 -0
  200. package/model/browseResponse.ts +3 -3
  201. package/model/clientMethodProps.ts +31 -19
  202. package/model/{baseBrowseResponse.ts → cursor.ts} +2 -2
  203. package/model/deleteByParams.ts +36 -0
  204. package/model/fetchedIndex.ts +1 -1
  205. package/model/{key.ts → getApiKeyResponse.ts} +2 -2
  206. package/model/getObjectsParams.ts +1 -1
  207. package/model/index.ts +7 -6
  208. package/model/indexSettingsAsSearchParams.ts +5 -5
  209. package/model/listApiKeysResponse.ts +2 -2
  210. package/model/multipleBatchRequest.ts +3 -3
  211. package/model/multipleBatchResponse.ts +2 -2
  212. package/model/synonymHit.ts +0 -3
  213. package/model/updateApiKeyResponse.ts +1 -1
  214. package/package.json +31 -13
  215. package/dist/model/attributeOrBuiltInOperation.d.ts +0 -3
  216. package/dist/model/attributeOrBuiltInOperation.d.ts.map +0 -1
  217. package/dist/model/baseBrowseResponse.d.ts.map +0 -1
  218. package/dist/model/browseRequest.d.ts +0 -11
  219. package/dist/model/browseRequest.d.ts.map +0 -1
  220. package/dist/model/createdAtObject.d.ts +0 -7
  221. package/dist/model/createdAtObject.d.ts.map +0 -1
  222. package/dist/model/key.d.ts +0 -4
  223. package/dist/model/key.d.ts.map +0 -1
  224. package/dist/model/synonymHitHighlightResult.d.ts +0 -12
  225. package/dist/model/synonymHitHighlightResult.d.ts.map +0 -1
  226. package/model/browseRequest.ts +0 -13
  227. package/model/createdAtObject.ts +0 -8
  228. package/model/synonymHitHighlightResult.ts +0 -15
@@ -1,18 +1,17 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- import type { CreateRetryablePromiseOptions } from '@algolia/client-common';
3
+ import type { CreateIterablePromise } from '@algolia/client-common';
4
4
 
5
5
  import type { ApiKey } from './apiKey';
6
6
  import type { AssignUserIdParams } from './assignUserIdParams';
7
- import type { AttributeOrBuiltInOperation } from './attributeOrBuiltInOperation';
7
+ import type { AttributeToUpdate } from './attributeToUpdate';
8
8
  import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
9
9
  import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
10
10
  import type { BatchWriteParams } from './batchWriteParams';
11
- import type { BrowseRequest } from './browseRequest';
11
+ import type { BrowseParams } from './browseParams';
12
+ import type { DeleteByParams } from './deleteByParams';
12
13
  import type { DictionaryType } from './dictionaryType';
13
- import type { GetTaskResponse } from './getTaskResponse';
14
14
  import type { IndexSettings } from './indexSettings';
15
- import type { Key } from './key';
16
15
  import type { LogType } from './logType';
17
16
  import type { OperationIndexParams } from './operationIndexParams';
18
17
  import type { Rule } from './rule';
@@ -98,7 +97,7 @@ export type BrowseProps = {
98
97
  * The index in which to perform the request.
99
98
  */
100
99
  indexName: string;
101
- browseRequest?: BrowseRequest;
100
+ browseParams?: BrowseParams;
102
101
  };
103
102
 
104
103
  /**
@@ -171,7 +170,7 @@ export type DeleteByProps = {
171
170
  * The index in which to perform the request.
172
171
  */
173
172
  indexName: string;
174
- searchParams: SearchParams;
173
+ deleteByParams: DeleteByParams;
175
174
  };
176
175
 
177
176
  /**
@@ -428,11 +427,9 @@ export type PartialUpdateObjectProps = {
428
427
  */
429
428
  objectID: string;
430
429
  /**
431
- * List of attributes to update.
430
+ * Map of attribute(s) to update.
432
431
  */
433
- attributeOrBuiltInOperation: Array<
434
- Record<string, AttributeOrBuiltInOperation>
435
- >;
432
+ attributesToUpdate: Record<string, AttributeToUpdate>;
436
433
  /**
437
434
  * Creates the record if it does not exist yet.
438
435
  */
@@ -546,7 +543,7 @@ export type SaveRulesProps = {
546
543
  * The index in which to perform the request.
547
544
  */
548
545
  indexName: string;
549
- rule: Rule[];
546
+ rules: Rule[];
550
547
  /**
551
548
  * When true, changes are also propagated to replicas of the given indexName.
552
549
  */
@@ -661,7 +658,7 @@ export type SearchRulesProps = {
661
658
  * The index in which to perform the request.
662
659
  */
663
660
  indexName: string;
664
- searchRulesParams: SearchRulesParams;
661
+ searchRulesParams?: SearchRulesParams;
665
662
  };
666
663
 
667
664
  /**
@@ -727,12 +724,27 @@ export type UpdateApiKeyProps = {
727
724
  apiKey: ApiKey;
728
725
  };
729
726
 
730
- type WaitForOptions<T> = Omit<
731
- CreateRetryablePromiseOptions<T>,
732
- 'func' | 'validate'
733
- >;
727
+ /**
728
+ * The `browseObjects`, `browseRules`, `browseSynonyms` options.
729
+ */
730
+ export type BrowseOptions<T> = Partial<
731
+ Pick<CreateIterablePromise<T>, 'validate'>
732
+ > &
733
+ Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
734
+
735
+ type WaitForOptions = Partial<{
736
+ /**
737
+ * The maximum number of retries. 50 by default.
738
+ */
739
+ maxRetries: number;
740
+
741
+ /**
742
+ * The function to decide how long to wait between retries.
743
+ */
744
+ timeout: (retryCount: number) => number;
745
+ }>;
734
746
 
735
- export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
747
+ export type WaitForTaskOptions = WaitForOptions & {
736
748
  /**
737
749
  * The `indexName` where the operation was performed.
738
750
  */
@@ -743,7 +755,7 @@ export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
743
755
  taskID: number;
744
756
  };
745
757
 
746
- export type WaitForApiKeyOptions = WaitForOptions<Key> & {
758
+ export type WaitForApiKeyOptions = WaitForOptions & {
747
759
  /**
748
760
  * The API Key.
749
761
  */
@@ -1,8 +1,8 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- export type BaseBrowseResponse = {
3
+ export type Cursor = {
4
4
  /**
5
5
  * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call.
6
6
  */
7
- cursor: string;
7
+ cursor?: string;
8
8
  };
@@ -0,0 +1,36 @@
1
+ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
+
3
+ import type { AroundRadius } from './aroundRadius';
4
+ import type { FacetFilters } from './facetFilters';
5
+ import type { NumericFilters } from './numericFilters';
6
+ import type { TagFilters } from './tagFilters';
7
+
8
+ export type DeleteByParams = {
9
+ facetFilters?: FacetFilters;
10
+
11
+ /**
12
+ * Filter the query with numeric, facet and/or tag filters.
13
+ */
14
+ filters?: string;
15
+
16
+ numericFilters?: NumericFilters;
17
+
18
+ tagFilters?: TagFilters;
19
+
20
+ /**
21
+ * Search for entries around a central geolocation, enabling a geo search within a circular area.
22
+ */
23
+ aroundLatLng?: string;
24
+
25
+ aroundRadius?: AroundRadius;
26
+
27
+ /**
28
+ * Search inside a rectangular area (in geo coordinates).
29
+ */
30
+ insideBoundingBox?: number[];
31
+
32
+ /**
33
+ * Search inside a polygon (in geo coordinates).
34
+ */
35
+ insidePolygon?: number[];
36
+ };
@@ -39,7 +39,7 @@ export type FetchedIndex = {
39
39
  /**
40
40
  * Number of pending indexing operations. This value is deprecated and should not be used.
41
41
  */
42
- numberOfPendingTask?: number;
42
+ numberOfPendingTasks: number;
43
43
 
44
44
  /**
45
45
  * A boolean which says whether the index has pending tasks. This value is deprecated and should not be used.
@@ -1,6 +1,6 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
3
  import type { ApiKey } from './apiKey';
4
- import type { CreatedAtObject } from './createdAtObject';
4
+ import type { BaseGetApiKeyResponse } from './baseGetApiKeyResponse';
5
5
 
6
- export type Key = ApiKey & CreatedAtObject;
6
+ export type GetApiKeyResponse = ApiKey & BaseGetApiKeyResponse;
@@ -6,5 +6,5 @@ import type { GetObjectsRequest } from './getObjectsRequest';
6
6
  * The `getObjects` parameters.
7
7
  */
8
8
  export type GetObjectsParams = {
9
- requests?: GetObjectsRequest[];
9
+ requests: GetObjectsRequest[];
10
10
  };
package/model/index.ts CHANGED
@@ -10,10 +10,10 @@ export * from './apiKey';
10
10
  export * from './aroundRadius';
11
11
  export * from './aroundRadiusAll';
12
12
  export * from './assignUserIdParams';
13
- export * from './attributeOrBuiltInOperation';
13
+ export * from './attributeToUpdate';
14
14
  export * from './automaticFacetFilter';
15
15
  export * from './automaticFacetFilters';
16
- export * from './baseBrowseResponse';
16
+ export * from './baseGetApiKeyResponse';
17
17
  export * from './baseIndexSettings';
18
18
  export * from './baseSearchParams';
19
19
  export * from './baseSearchParamsWithoutQuery';
@@ -25,7 +25,8 @@ export * from './batchParams';
25
25
  export * from './batchRequest';
26
26
  export * from './batchResponse';
27
27
  export * from './batchWriteParams';
28
- export * from './browseRequest';
28
+ export * from './browseParams';
29
+ export * from './browseParamsObject';
29
30
  export * from './browseResponse';
30
31
  export * from './builtInOperation';
31
32
  export * from './builtInOperationType';
@@ -35,9 +36,10 @@ export * from './consequenceHide';
35
36
  export * from './consequenceParams';
36
37
  export * from './consequenceQuery';
37
38
  export * from './consequenceQueryObject';
38
- export * from './createdAtObject';
39
39
  export * from './createdAtResponse';
40
+ export * from './cursor';
40
41
  export * from './deleteApiKeyResponse';
42
+ export * from './deleteByParams';
41
43
  export * from './deleteSourceResponse';
42
44
  export * from './deletedAtResponse';
43
45
  export * from './dictionaryAction';
@@ -57,6 +59,7 @@ export * from './facetOrdering';
57
59
  export * from './facets';
58
60
  export * from './facetsStats';
59
61
  export * from './fetchedIndex';
62
+ export * from './getApiKeyResponse';
60
63
  export * from './getDictionarySettingsResponse';
61
64
  export * from './getLogsResponse';
62
65
  export * from './getObjectsParams';
@@ -71,7 +74,6 @@ export * from './hit';
71
74
  export * from './ignorePlurals';
72
75
  export * from './indexSettings';
73
76
  export * from './indexSettingsAsSearchParams';
74
- export * from './key';
75
77
  export * from './languages';
76
78
  export * from './listApiKeysResponse';
77
79
  export * from './listClustersResponse';
@@ -137,7 +139,6 @@ export * from './sortRemainingBy';
137
139
  export * from './source';
138
140
  export * from './standardEntries';
139
141
  export * from './synonymHit';
140
- export * from './synonymHitHighlightResult';
141
142
  export * from './synonymType';
142
143
  export * from './tagFilters';
143
144
  export * from './taskStatus';
@@ -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
  */
@@ -1,10 +1,10 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- import type { Key } from './key';
3
+ import type { GetApiKeyResponse } from './getApiKeyResponse';
4
4
 
5
5
  export type ListApiKeysResponse = {
6
6
  /**
7
7
  * List of api keys.
8
8
  */
9
- keys: Key[];
9
+ keys: GetApiKeyResponse[];
10
10
  };
@@ -3,15 +3,15 @@
3
3
  import type { Action } from './action';
4
4
 
5
5
  export type MultipleBatchRequest = {
6
- action?: Action;
6
+ action: Action;
7
7
 
8
8
  /**
9
9
  * Arguments to the operation (depends on the type of the operation).
10
10
  */
11
- body?: Record<string, any>;
11
+ body: Record<string, any>;
12
12
 
13
13
  /**
14
14
  * Index to target for this operation.
15
15
  */
16
- indexName?: string;
16
+ indexName: string;
17
17
  };
@@ -4,10 +4,10 @@ export type MultipleBatchResponse = {
4
4
  /**
5
5
  * List of tasksIDs per index.
6
6
  */
7
- taskID?: Record<string, any>;
7
+ taskID: Record<string, number>;
8
8
 
9
9
  /**
10
10
  * List of objectID.
11
11
  */
12
- objectIDs?: string[];
12
+ objectIDs: string[];
13
13
  };
@@ -1,6 +1,5 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- import type { SynonymHitHighlightResult } from './synonymHitHighlightResult';
4
3
  import type { SynonymType } from './synonymType';
5
4
 
6
5
  /**
@@ -43,6 +42,4 @@ export type SynonymHit = {
43
42
  * List of query words that will match the token.
44
43
  */
45
44
  replacements?: string[];
46
-
47
- _highlightResult?: SynonymHitHighlightResult;
48
45
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  export type UpdateApiKeyResponse = {
4
4
  /**
5
- * Key string.
5
+ * The API key.
6
6
  */
7
7
  key: string;
8
8
 
package/package.json CHANGED
@@ -1,16 +1,32 @@
1
1
  {
2
2
  "name": "@algolia/client-search",
3
- "version": "5.0.0-alpha.3",
3
+ "version": "5.0.0-alpha.31",
4
4
  "description": "JavaScript client for client-search",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
7
7
  "author": "Algolia",
8
- "main": "index.js",
9
- "jsdelivr": "dist/client-search.umd.js",
10
- "unpkg": "dist/client-search.umd.js",
11
- "module": "dist/client-search.esm.node.js",
12
- "browser": "dist/client-search.umd.js",
13
- "types": "index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "node": {
11
+ "import": "./dist/client-search.esm.node.js",
12
+ "module": "./dist/client-search.esm.node.js",
13
+ "require": "./dist/client-search.cjs.js",
14
+ "default": "./dist/client-search.cjs.js"
15
+ },
16
+ "default": {
17
+ "umd": "./dist/client-search.umd.js",
18
+ "module": "./dist/client-search.esm.browser.js",
19
+ "import": "./dist/client-search.esm.browser.js",
20
+ "default": "./dist/client-search.umd.js"
21
+ }
22
+ },
23
+ "./src/*": "./src/*.ts",
24
+ "./model": "./model/index.ts"
25
+ },
26
+ "jsdelivr": "./dist/client-search.umd.js",
27
+ "unpkg": "./dist/client-search.umd.js",
28
+ "browser": "./dist/client-search.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
- "clean": "rm -rf ./dist"
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.3",
25
- "@algolia/requester-browser-xhr": "5.0.0-alpha.3",
26
- "@algolia/requester-node-http": "5.0.0-alpha.3"
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.45",
30
- "typescript": "4.7.4"
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"
@@ -1,3 +0,0 @@
1
- import type { BuiltInOperation } from './builtInOperation';
2
- export declare type AttributeOrBuiltInOperation = BuiltInOperation | string;
3
- //# sourceMappingURL=attributeOrBuiltInOperation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attributeOrBuiltInOperation.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/attributeOrBuiltInOperation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,oBAAY,2BAA2B,GAAG,gBAAgB,GAAG,MAAM,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"baseBrowseResponse.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/baseBrowseResponse.ts"],"names":[],"mappings":"AAEA,oBAAY,kBAAkB,GAAG;IAC/B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -1,11 +0,0 @@
1
- export declare type BrowseRequest = {
2
- /**
3
- * Search parameters as URL-encoded query string.
4
- */
5
- params?: string;
6
- /**
7
- * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call.
8
- */
9
- cursor?: string;
10
- };
11
- //# sourceMappingURL=browseRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browseRequest.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/browseRequest.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -1,7 +0,0 @@
1
- export declare type CreatedAtObject = {
2
- /**
3
- * Date of creation (ISO-8601 format).
4
- */
5
- createdAt: string;
6
- };
7
- //# sourceMappingURL=createdAtObject.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createdAtObject.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/createdAtObject.ts"],"names":[],"mappings":"AAEA,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { ApiKey } from './apiKey';
2
- import type { CreatedAtObject } from './createdAtObject';
3
- export declare type Key = ApiKey & CreatedAtObject;
4
- //# sourceMappingURL=key.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/key.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,oBAAY,GAAG,GAAG,MAAM,GAAG,eAAe,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { HighlightResult } from './highlightResult';
2
- /**
3
- * Highlighted results.
4
- */
5
- export declare type SynonymHitHighlightResult = {
6
- /**
7
- * Show highlighted section and words matched on a query.
8
- */
9
- type?: Record<string, HighlightResult>;
10
- synonyms?: Array<Record<string, HighlightResult>>;
11
- };
12
- //# sourceMappingURL=synonymHitHighlightResult.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synonymHitHighlightResult.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/synonymHitHighlightResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,oBAAY,yBAAyB,GAAG;IACtC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAEvC,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;CACnD,CAAC"}
@@ -1,13 +0,0 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
-
3
- export type BrowseRequest = {
4
- /**
5
- * Search parameters as URL-encoded query string.
6
- */
7
- params?: string;
8
-
9
- /**
10
- * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call.
11
- */
12
- cursor?: string;
13
- };
@@ -1,8 +0,0 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
-
3
- export type CreatedAtObject = {
4
- /**
5
- * Date of creation (ISO-8601 format).
6
- */
7
- createdAt: string;
8
- };
@@ -1,15 +0,0 @@
1
- // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
-
3
- import type { HighlightResult } from './highlightResult';
4
-
5
- /**
6
- * Highlighted results.
7
- */
8
- export type SynonymHitHighlightResult = {
9
- /**
10
- * Show highlighted section and words matched on a query.
11
- */
12
- type?: Record<string, HighlightResult>;
13
-
14
- synonyms?: Array<Record<string, HighlightResult>>;
15
- };