Skip to content

Commit 37fdfa2

Browse files
committed
chore: response types
1 parent 2d1946a commit 37fdfa2

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

templates/go/search_helpers.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ Helper: Similar to the `SaveObjects` method but requires a Push connector (https
746746
@return []BatchResponse - List of batch responses.
747747
@return error - Error if any.
748748
*/
749-
func (c *APIClient) SaveObjectsWithTransformation(indexName string, objects []map[string]any, opts ...ChunkedBatchOption) (*ingestion.WatchResponse, error) {
749+
func (c *APIClient) SaveObjectsWithTransformation(indexName string, objects []map[string]any, opts ...ChunkedBatchOption) ([]ingestion.WatchResponse, error) {
750750
if c.ingestionTransporter == nil {
751751
return nil, reportError("`region` must be provided at client instantiation before calling this method.")
752752
}
@@ -782,7 +782,7 @@ Helper: Similar to the `PartialUpdateObjects` method but requires a Push connect
782782
@return []BatchResponse - List of batch responses.
783783
@return error - Error if any.
784784
*/
785-
func (c *APIClient) PartialUpdateObjectsWithTransformation(indexName string, objects []map[string]any, opts ...PartialUpdateObjectsOption) (*ingestion.WatchResponse, error) {
785+
func (c *APIClient) PartialUpdateObjectsWithTransformation(indexName string, objects []map[string]any, opts ...PartialUpdateObjectsOption) ([]ingestion.WatchResponse, error) {
786786
if c.ingestionTransporter == nil {
787787
return nil, reportError("`region` must be provided at client instantiation before calling this method.")
788788
}

templates/java/api_helpers.mustache

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ public <T> List<BatchResponse> chunkedBatch(
665665
* @throws AlgoliaApiException When the API sends an http error code
666666
* @throws AlgoliaRuntimeException When an error occurred during the serialization
667667
*/
668-
public <T> WatchResponse saveObjectsWithTransformation(String indexName, Iterable<T> objects) {
668+
public <T> List<WatchResponse> saveObjectsWithTransformation(String indexName, Iterable<T> objects) {
669669
return saveObjectsWithTransformation(indexName, objects, null);
670670
}
671671
@@ -680,7 +680,7 @@ public <T> WatchResponse saveObjectsWithTransformation(String indexName, Iterabl
680680
* @param requestOptions The requestOptions to send along with the query, they will be merged with
681681
* the transporter requestOptions. (optional)
682682
*/
683-
public <T> WatchResponse saveObjectsWithTransformation(String indexName, Iterable<T> objects, RequestOptions requestOptions) {
683+
public <T> List<WatchResponse> saveObjectsWithTransformation(String indexName, Iterable<T> objects, RequestOptions requestOptions) {
684684
return saveObjectsWithTransformation(indexName, objects, false, requestOptions);
685685
}
686686
@@ -698,7 +698,7 @@ public <T> WatchResponse saveObjectsWithTransformation(String indexName, Iterabl
698698
* @param requestOptions The requestOptions to send along with the query, they will be merged with
699699
* the transporter requestOptions. (optional)
700700
*/
701-
public <T> WatchResponse saveObjectsWithTransformation(
701+
public <T> List<WatchResponse> saveObjectsWithTransformation(
702702
String indexName,
703703
Iterable<T> objects,
704704
boolean waitForTasks,
@@ -723,7 +723,7 @@ public <T> WatchResponse saveObjectsWithTransformation(
723723
* @param requestOptions The requestOptions to send along with the query, they will be merged with
724724
* the transporter requestOptions. (optional)
725725
*/
726-
public <T> WatchResponse saveObjectsWithTransformation(
726+
public <T> List<WatchResponse> saveObjectsWithTransformation(
727727
String indexName,
728728
Iterable<T> objects,
729729
boolean waitForTasks,
@@ -891,7 +891,7 @@ public List<BatchResponse> deleteObjects(String indexName, List<String> objectID
891891
* @param createIfNotExists To be provided if non-existing objects are passed, otherwise, the call
892892
* will fail.
893893
*/
894-
public <T> WatchResponse partialUpdateObjectsWithTransformation(String indexName, Iterable<T> objects, boolean createIfNotExists) {
894+
public <T> List<WatchResponse> partialUpdateObjectsWithTransformation(String indexName, Iterable<T> objects, boolean createIfNotExists) {
895895
return partialUpdateObjectsWithTransformation(indexName, objects, createIfNotExists, false, null);
896896
}
897897
@@ -909,7 +909,7 @@ public <T> WatchResponse partialUpdateObjectsWithTransformation(String indexName
909909
* processed, this operation may slow the total execution time of this method but is more
910910
* reliable.
911911
*/
912-
public <T> WatchResponse partialUpdateObjectsWithTransformation(
912+
public <T> List<WatchResponse> partialUpdateObjectsWithTransformation(
913913
String indexName,
914914
Iterable<T> objects,
915915
boolean createIfNotExists,
@@ -934,7 +934,7 @@ public <T> WatchResponse partialUpdateObjectsWithTransformation(
934934
* @param requestOptions The requestOptions to send along with the query, they will be merged with
935935
* the transporter requestOptions. (optional)
936936
*/
937-
public <T> WatchResponse partialUpdateObjectsWithTransformation(
937+
public <T> List<WatchResponse> partialUpdateObjectsWithTransformation(
938938
String indexName,
939939
Iterable<T> objects,
940940
boolean createIfNotExists,
@@ -962,7 +962,7 @@ public <T> WatchResponse partialUpdateObjectsWithTransformation(
962962
* @param requestOptions The requestOptions to send along with the query, they will be merged with
963963
* the transporter requestOptions. (optional)
964964
*/
965-
public <T> WatchResponse partialUpdateObjectsWithTransformation(
965+
public <T> List<WatchResponse> partialUpdateObjectsWithTransformation(
966966
String indexName,
967967
Iterable<T> objects,
968968
boolean createIfNotExists,

templates/python/search_helpers.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
wait_for_tasks: bool = False,
300300
batch_size: int = 1000,
301301
request_options: Optional[Union[dict, RequestOptions]] = None,
302-
) -> WatchResponse:
302+
) -> List[WatchResponse]:
303303
"""
304304
Helper: Similar to the `save_objects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must've been passed to the client's config at instantiation.
305305
"""
@@ -352,7 +352,7 @@
352352
wait_for_tasks: bool = False,
353353
batch_size: int = 1000,
354354
request_options: Optional[Union[dict, RequestOptions]] = None,
355-
) -> WatchResponse:
355+
) -> List[WatchResponse]:
356356
"""
357357
Helper: Similar to the `partial_update_objects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must've been passed to the client instantiation method.
358358
"""

0 commit comments

Comments
 (0)