Skip to content

Commit edbc056

Browse files
chore: generated code for commit 005f9ed3. [skip ci]
algolia/api-clients-automation@005f9ed Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent c401e34 commit edbc056

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

packages/client-search/model/clientMethodProps.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,9 @@ export type PartialUpdateObjectProps = {
426426
*/
427427
objectID: string;
428428
/**
429-
* List of attributes to update.
429+
* Map of attribute(s) to update.
430430
*/
431-
attributeToUpdate: Array<Record<string, AttributeToUpdate>>;
431+
attributesToUpdate: Record<string, AttributeToUpdate>;
432432
/**
433433
* Creates the record if it does not exist yet.
434434
*/
@@ -542,7 +542,7 @@ export type SaveRulesProps = {
542542
* The index in which to perform the request.
543543
*/
544544
indexName: string;
545-
rule: Rule[];
545+
rules: Rule[];
546546
/**
547547
* When true, changes are also propagated to replicas of the given indexName.
548548
*/

packages/client-search/src/searchClient.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,15 +1952,15 @@ export function createSearchClient({
19521952
* @param partialUpdateObject - The partialUpdateObject object.
19531953
* @param partialUpdateObject.indexName - The index in which to perform the request.
19541954
* @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.
19561956
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
19571957
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
19581958
*/
19591959
partialUpdateObject(
19601960
{
19611961
indexName,
19621962
objectID,
1963-
attributeToUpdate,
1963+
attributesToUpdate,
19641964
createIfNotExists,
19651965
}: PartialUpdateObjectProps,
19661966
requestOptions?: RequestOptions
@@ -1977,9 +1977,9 @@ export function createSearchClient({
19771977
);
19781978
}
19791979

1980-
if (!attributeToUpdate) {
1980+
if (!attributesToUpdate) {
19811981
throw new Error(
1982-
'Parameter `attributeToUpdate` is required when calling `partialUpdateObject`.'
1982+
'Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.'
19831983
);
19841984
}
19851985

@@ -1998,7 +1998,7 @@ export function createSearchClient({
19981998
path: requestPath,
19991999
queryParameters,
20002000
headers,
2001-
data: attributeToUpdate,
2001+
data: attributesToUpdate,
20022002
};
20032003

20042004
return transporter.request(request, requestOptions);
@@ -2282,15 +2282,15 @@ export function createSearchClient({
22822282
* @summary Save a batch of rules.
22832283
* @param saveRules - The saveRules object.
22842284
* @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.
22862286
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
22872287
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
22882288
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
22892289
*/
22902290
saveRules(
22912291
{
22922292
indexName,
2293-
rule,
2293+
rules,
22942294
forwardToReplicas,
22952295
clearExistingRules,
22962296
}: SaveRulesProps,
@@ -2302,9 +2302,9 @@ export function createSearchClient({
23022302
);
23032303
}
23042304

2305-
if (!rule) {
2305+
if (!rules) {
23062306
throw new Error(
2307-
'Parameter `rule` is required when calling `saveRules`.'
2307+
'Parameter `rules` is required when calling `saveRules`.'
23082308
);
23092309
}
23102310

@@ -2328,7 +2328,7 @@ export function createSearchClient({
23282328
path: requestPath,
23292329
queryParameters,
23302330
headers,
2331-
data: rule,
2331+
data: rules,
23322332
};
23332333

23342334
return transporter.request(request, requestOptions);

0 commit comments

Comments
 (0)