@@ -1952,15 +1952,15 @@ export function createSearchClient({
1952
1952
* @param partialUpdateObject - The partialUpdateObject object.
1953
1953
* @param partialUpdateObject.indexName - The index in which to perform the request.
1954
1954
* @param partialUpdateObject.objectID - Unique identifier of an object.
1955
- * @param partialUpdateObject.attributeToUpdate - List of attributes to update.
1955
+ * @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
1956
1956
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
1957
1957
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1958
1958
*/
1959
1959
partialUpdateObject (
1960
1960
{
1961
1961
indexName,
1962
1962
objectID,
1963
- attributeToUpdate ,
1963
+ attributesToUpdate ,
1964
1964
createIfNotExists,
1965
1965
} : PartialUpdateObjectProps ,
1966
1966
requestOptions ?: RequestOptions
@@ -1977,9 +1977,9 @@ export function createSearchClient({
1977
1977
) ;
1978
1978
}
1979
1979
1980
- if ( ! attributeToUpdate ) {
1980
+ if ( ! attributesToUpdate ) {
1981
1981
throw new Error (
1982
- 'Parameter `attributeToUpdate ` is required when calling `partialUpdateObject`.'
1982
+ 'Parameter `attributesToUpdate ` is required when calling `partialUpdateObject`.'
1983
1983
) ;
1984
1984
}
1985
1985
@@ -1998,7 +1998,7 @@ export function createSearchClient({
1998
1998
path : requestPath ,
1999
1999
queryParameters,
2000
2000
headers,
2001
- data : attributeToUpdate ,
2001
+ data : attributesToUpdate ,
2002
2002
} ;
2003
2003
2004
2004
return transporter . request ( request , requestOptions ) ;
@@ -2282,15 +2282,15 @@ export function createSearchClient({
2282
2282
* @summary Save a batch of rules.
2283
2283
* @param saveRules - The saveRules object.
2284
2284
* @param saveRules.indexName - The index in which to perform the request.
2285
- * @param saveRules.rule - The rule object.
2285
+ * @param saveRules.rules - The rules object.
2286
2286
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
2287
2287
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
2288
2288
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2289
2289
*/
2290
2290
saveRules (
2291
2291
{
2292
2292
indexName,
2293
- rule ,
2293
+ rules ,
2294
2294
forwardToReplicas,
2295
2295
clearExistingRules,
2296
2296
} : SaveRulesProps ,
@@ -2302,9 +2302,9 @@ export function createSearchClient({
2302
2302
) ;
2303
2303
}
2304
2304
2305
- if ( ! rule ) {
2305
+ if ( ! rules ) {
2306
2306
throw new Error (
2307
- 'Parameter `rule ` is required when calling `saveRules`.'
2307
+ 'Parameter `rules ` is required when calling `saveRules`.'
2308
2308
) ;
2309
2309
}
2310
2310
@@ -2328,7 +2328,7 @@ export function createSearchClient({
2328
2328
path : requestPath ,
2329
2329
queryParameters,
2330
2330
headers,
2331
- data : rule ,
2331
+ data : rules ,
2332
2332
} ;
2333
2333
2334
2334
return transporter . request ( request , requestOptions ) ;
0 commit comments