diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdParams.java similarity index 79% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdParams.java index 0ea72ab932..33f6d0cc78 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/AssignUserIdParams.java @@ -3,13 +3,13 @@ import com.google.gson.annotations.SerializedName; import java.util.Objects; -/** Assign userID object. */ -public class AssignUserIdObject { +/** Assign userID parameters. */ +public class AssignUserIdParams { @SerializedName("cluster") private String cluster; - public AssignUserIdObject cluster(String cluster) { + public AssignUserIdParams cluster(String cluster) { this.cluster = cluster; return this; } @@ -36,8 +36,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssignUserIdObject assignUserIdObject = (AssignUserIdObject) o; - return Objects.equals(this.cluster, assignUserIdObject.cluster); + AssignUserIdParams assignUserIdParams = (AssignUserIdParams) o; + return Objects.equals(this.cluster, assignUserIdParams.cluster); } @Override @@ -48,7 +48,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AssignUserIdObject {\n"); + sb.append("class AssignUserIdParams {\n"); sb.append(" cluster: ").append(toIndentedString(cluster)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsParams.java similarity index 77% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsParams.java index 43bdef7e6c..d2c89235a9 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchAssignUserIdsParams.java @@ -5,8 +5,8 @@ import java.util.List; import java.util.Objects; -/** Assign userID object. */ -public class BatchAssignUserIdsObject { +/** Assign userID parameters. */ +public class BatchAssignUserIdsParams { @SerializedName("cluster") private String cluster; @@ -14,7 +14,7 @@ public class BatchAssignUserIdsObject { @SerializedName("users") private List users = new ArrayList<>(); - public BatchAssignUserIdsObject cluster(String cluster) { + public BatchAssignUserIdsParams cluster(String cluster) { this.cluster = cluster; return this; } @@ -33,12 +33,12 @@ public void setCluster(String cluster) { this.cluster = cluster; } - public BatchAssignUserIdsObject users(List users) { + public BatchAssignUserIdsParams users(List users) { this.users = users; return this; } - public BatchAssignUserIdsObject addUsersItem(String usersItem) { + public BatchAssignUserIdsParams addUsersItem(String usersItem) { this.users.add(usersItem); return this; } @@ -65,10 +65,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - BatchAssignUserIdsObject batchAssignUserIdsObject = (BatchAssignUserIdsObject) o; + BatchAssignUserIdsParams batchAssignUserIdsParams = (BatchAssignUserIdsParams) o; return ( - Objects.equals(this.cluster, batchAssignUserIdsObject.cluster) && - Objects.equals(this.users, batchAssignUserIdsObject.users) + Objects.equals(this.cluster, batchAssignUserIdsParams.cluster) && + Objects.equals(this.users, batchAssignUserIdsParams.users) ); } @@ -80,7 +80,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class BatchAssignUserIdsObject {\n"); + sb.append("class BatchAssignUserIdsParams {\n"); sb.append(" cluster: ").append(toIndentedString(cluster)).append("\n"); sb.append(" users: ").append(toIndentedString(users)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchParams.java similarity index 80% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchParams.java index ac4c63d6b8..eaff3a9760 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchParams.java @@ -5,18 +5,18 @@ import java.util.List; import java.util.Objects; -/** The `batch` requests. */ -public class BatchObject { +/** The `multipleBatch` parameters. */ +public class BatchParams { @SerializedName("requests") private List requests = null; - public BatchObject requests(List requests) { + public BatchParams requests(List requests) { this.requests = requests; return this; } - public BatchObject addRequestsItem(Operation requestsItem) { + public BatchParams addRequestsItem(Operation requestsItem) { if (this.requests == null) { this.requests = new ArrayList<>(); } @@ -46,8 +46,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - BatchObject batchObject = (BatchObject) o; - return Objects.equals(this.requests, batchObject.requests); + BatchParams batchParams = (BatchParams) o; + return Objects.equals(this.requests, batchParams.requests); } @Override @@ -58,7 +58,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class BatchObject {\n"); + sb.append("class BatchParams {\n"); sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteParams.java similarity index 79% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteParams.java index fd863d5d6f..3eace6978b 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BatchWriteParams.java @@ -5,18 +5,18 @@ import java.util.List; import java.util.Objects; -/** The `batch` requests. */ -public class BatchWriteObject { +/** The `batch` parameters. */ +public class BatchWriteParams { @SerializedName("requests") private List requests = null; - public BatchWriteObject requests(List requests) { + public BatchWriteParams requests(List requests) { this.requests = requests; return this; } - public BatchWriteObject addRequestsItem(Operation requestsItem) { + public BatchWriteParams addRequestsItem(Operation requestsItem) { if (this.requests == null) { this.requests = new ArrayList<>(); } @@ -46,8 +46,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - BatchWriteObject batchWriteObject = (BatchWriteObject) o; - return Objects.equals(this.requests, batchWriteObject.requests); + BatchWriteParams batchWriteParams = (BatchWriteParams) o; + return Objects.equals(this.requests, batchWriteParams.requests); } @Override @@ -58,7 +58,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class BatchWriteObject {\n"); + sb.append("class BatchWriteParams {\n"); sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseResponse.java index 24fbf7ce8f..17d13c58f0 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseResponse.java @@ -83,7 +83,7 @@ public class BrowseResponse { private Object userData = new Object(); @SerializedName("hits") - private List hits = new ArrayList<>(); + private List hits = new ArrayList<>(); @SerializedName("cursor") private String cursor; @@ -576,12 +576,12 @@ public void setUserData(Object userData) { this.userData = userData; } - public BrowseResponse hits(List hits) { + public BrowseResponse hits(List hits) { this.hits = hits; return this; } - public BrowseResponse addHitsItem(Record hitsItem) { + public BrowseResponse addHitsItem(Hit hitsItem) { this.hits.add(hitsItem); return this; } @@ -592,11 +592,11 @@ public BrowseResponse addHitsItem(Record hitsItem) { * @return hits */ @javax.annotation.Nonnull - public List getHits() { + public List getHits() { return hits; } - public void setHits(List hits) { + public void setHits(List hits) { this.hits = hits; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsParams.java similarity index 69% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsParams.java index bc8facb4ae..f6808cb8f0 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/GetObjectsParams.java @@ -5,19 +5,19 @@ import java.util.List; import java.util.Objects; -/** The `getObjects` requests. */ -public class GetObjectsObject { +/** The `getObjects` parameters. */ +public class GetObjectsParams { @SerializedName("requests") - private List requests = null; + private List requests = null; - public GetObjectsObject requests(List requests) { + public GetObjectsParams requests(List requests) { this.requests = requests; return this; } - public GetObjectsObject addRequestsItem( - MultipleGetObjectsObject requestsItem + public GetObjectsParams addRequestsItem( + MultipleGetObjectsParams requestsItem ) { if (this.requests == null) { this.requests = new ArrayList<>(); @@ -32,11 +32,11 @@ public GetObjectsObject addRequestsItem( * @return requests */ @javax.annotation.Nullable - public List getRequests() { + public List getRequests() { return requests; } - public void setRequests(List requests) { + public void setRequests(List requests) { this.requests = requests; } @@ -48,8 +48,8 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - GetObjectsObject getObjectsObject = (GetObjectsObject) o; - return Objects.equals(this.requests, getObjectsObject.requests); + GetObjectsParams getObjectsParams = (GetObjectsParams) o; + return Objects.equals(this.requests, getObjectsParams.requests); } @Override @@ -60,7 +60,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class GetObjectsObject {\n"); + sb.append("class GetObjectsParams {\n"); sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Record.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Hit.java similarity index 82% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Record.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Hit.java index e8519379cf..5b6f67f71f 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Record.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Hit.java @@ -4,8 +4,8 @@ import java.util.HashMap; import java.util.Objects; -/** A single record. */ -public class Record extends HashMap { +/** A single hit. */ +public class Hit extends HashMap { @SerializedName("objectID") private String objectID; @@ -22,7 +22,7 @@ public class Record extends HashMap { @SerializedName("_distinctSeqID") private Integer distinctSeqID; - public Record objectID(String objectID) { + public Hit objectID(String objectID) { this.objectID = objectID; return this; } @@ -41,7 +41,7 @@ public void setObjectID(String objectID) { this.objectID = objectID; } - public Record highlightResult(HighlightResult highlightResult) { + public Hit highlightResult(HighlightResult highlightResult) { this.highlightResult = highlightResult; return this; } @@ -60,7 +60,7 @@ public void setHighlightResult(HighlightResult highlightResult) { this.highlightResult = highlightResult; } - public Record snippetResult(SnippetResult snippetResult) { + public Hit snippetResult(SnippetResult snippetResult) { this.snippetResult = snippetResult; return this; } @@ -79,7 +79,7 @@ public void setSnippetResult(SnippetResult snippetResult) { this.snippetResult = snippetResult; } - public Record rankingInfo(RankingInfo rankingInfo) { + public Hit rankingInfo(RankingInfo rankingInfo) { this.rankingInfo = rankingInfo; return this; } @@ -98,7 +98,7 @@ public void setRankingInfo(RankingInfo rankingInfo) { this.rankingInfo = rankingInfo; } - public Record distinctSeqID(Integer distinctSeqID) { + public Hit distinctSeqID(Integer distinctSeqID) { this.distinctSeqID = distinctSeqID; return this; } @@ -125,13 +125,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Record record = (Record) o; + Hit hit = (Hit) o; return ( - Objects.equals(this.objectID, record.objectID) && - Objects.equals(this.highlightResult, record.highlightResult) && - Objects.equals(this.snippetResult, record.snippetResult) && - Objects.equals(this.rankingInfo, record.rankingInfo) && - Objects.equals(this.distinctSeqID, record.distinctSeqID) && + Objects.equals(this.objectID, hit.objectID) && + Objects.equals(this.highlightResult, hit.highlightResult) && + Objects.equals(this.snippetResult, hit.snippetResult) && + Objects.equals(this.rankingInfo, hit.rankingInfo) && + Objects.equals(this.distinctSeqID, hit.distinctSeqID) && super.equals(o) ); } @@ -151,7 +151,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Record {\n"); + sb.append("class Hit {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" objectID: ").append(toIndentedString(objectID)).append("\n"); sb diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Index.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Indice.java similarity index 83% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Index.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Indice.java index 9c3eb8dcbb..ed64c6978e 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Index.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Indice.java @@ -5,8 +5,8 @@ import java.util.List; import java.util.Objects; -/** Index */ -public class Index { +/** Indice */ +public class Indice { @SerializedName("name") private String name; @@ -41,7 +41,7 @@ public class Index { @SerializedName("replicas") private List replicas = null; - public Index name(String name) { + public Indice name(String name) { this.name = name; return this; } @@ -60,7 +60,7 @@ public void setName(String name) { this.name = name; } - public Index createdAt(String createdAt) { + public Indice createdAt(String createdAt) { this.createdAt = createdAt; return this; } @@ -79,7 +79,7 @@ public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } - public Index updatedAt(String updatedAt) { + public Indice updatedAt(String updatedAt) { this.updatedAt = updatedAt; return this; } @@ -98,7 +98,7 @@ public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } - public Index entries(Integer entries) { + public Indice entries(Integer entries) { this.entries = entries; return this; } @@ -117,7 +117,7 @@ public void setEntries(Integer entries) { this.entries = entries; } - public Index dataSize(Integer dataSize) { + public Indice dataSize(Integer dataSize) { this.dataSize = dataSize; return this; } @@ -136,7 +136,7 @@ public void setDataSize(Integer dataSize) { this.dataSize = dataSize; } - public Index fileSize(Integer fileSize) { + public Indice fileSize(Integer fileSize) { this.fileSize = fileSize; return this; } @@ -155,7 +155,7 @@ public void setFileSize(Integer fileSize) { this.fileSize = fileSize; } - public Index lastBuildTimeS(Integer lastBuildTimeS) { + public Indice lastBuildTimeS(Integer lastBuildTimeS) { this.lastBuildTimeS = lastBuildTimeS; return this; } @@ -174,7 +174,7 @@ public void setLastBuildTimeS(Integer lastBuildTimeS) { this.lastBuildTimeS = lastBuildTimeS; } - public Index numberOfPendingTask(Integer numberOfPendingTask) { + public Indice numberOfPendingTask(Integer numberOfPendingTask) { this.numberOfPendingTask = numberOfPendingTask; return this; } @@ -193,7 +193,7 @@ public void setNumberOfPendingTask(Integer numberOfPendingTask) { this.numberOfPendingTask = numberOfPendingTask; } - public Index pendingTask(Boolean pendingTask) { + public Indice pendingTask(Boolean pendingTask) { this.pendingTask = pendingTask; return this; } @@ -213,7 +213,7 @@ public void setPendingTask(Boolean pendingTask) { this.pendingTask = pendingTask; } - public Index primary(String primary) { + public Indice primary(String primary) { this.primary = primary; return this; } @@ -232,12 +232,12 @@ public void setPrimary(String primary) { this.primary = primary; } - public Index replicas(List replicas) { + public Indice replicas(List replicas) { this.replicas = replicas; return this; } - public Index addReplicasItem(String replicasItem) { + public Indice addReplicasItem(String replicasItem) { if (this.replicas == null) { this.replicas = new ArrayList<>(); } @@ -268,19 +268,19 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Index index = (Index) o; + Indice indice = (Indice) o; return ( - Objects.equals(this.name, index.name) && - Objects.equals(this.createdAt, index.createdAt) && - Objects.equals(this.updatedAt, index.updatedAt) && - Objects.equals(this.entries, index.entries) && - Objects.equals(this.dataSize, index.dataSize) && - Objects.equals(this.fileSize, index.fileSize) && - Objects.equals(this.lastBuildTimeS, index.lastBuildTimeS) && - Objects.equals(this.numberOfPendingTask, index.numberOfPendingTask) && - Objects.equals(this.pendingTask, index.pendingTask) && - Objects.equals(this.primary, index.primary) && - Objects.equals(this.replicas, index.replicas) + Objects.equals(this.name, indice.name) && + Objects.equals(this.createdAt, indice.createdAt) && + Objects.equals(this.updatedAt, indice.updatedAt) && + Objects.equals(this.entries, indice.entries) && + Objects.equals(this.dataSize, indice.dataSize) && + Objects.equals(this.fileSize, indice.fileSize) && + Objects.equals(this.lastBuildTimeS, indice.lastBuildTimeS) && + Objects.equals(this.numberOfPendingTask, indice.numberOfPendingTask) && + Objects.equals(this.pendingTask, indice.pendingTask) && + Objects.equals(this.primary, indice.primary) && + Objects.equals(this.replicas, indice.replicas) ); } @@ -304,7 +304,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Index {\n"); + sb.append("class Indice {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb .append(" createdAt: ") diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/KeyObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Key.java similarity index 85% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/KeyObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Key.java index c73e7725fd..5b61171f8c 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/KeyObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/Key.java @@ -10,8 +10,8 @@ import java.util.List; import java.util.Objects; -/** KeyObject */ -public class KeyObject { +/** Key */ +public class Key { /** Gets or Sets acl */ @JsonAdapter(AclEnum.Adapter.class) @@ -111,12 +111,12 @@ public AclEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("createdAt") private String createdAt; - public KeyObject acl(List acl) { + public Key acl(List acl) { this.acl = acl; return this; } - public KeyObject addAclItem(AclEnum aclItem) { + public Key addAclItem(AclEnum aclItem) { this.acl.add(aclItem); return this; } @@ -135,7 +135,7 @@ public void setAcl(List acl) { this.acl = acl; } - public KeyObject description(String description) { + public Key description(String description) { this.description = description; return this; } @@ -155,12 +155,12 @@ public void setDescription(String description) { this.description = description; } - public KeyObject indexes(List indexes) { + public Key indexes(List indexes) { this.indexes = indexes; return this; } - public KeyObject addIndexesItem(String indexesItem) { + public Key addIndexesItem(String indexesItem) { if (this.indexes == null) { this.indexes = new ArrayList<>(); } @@ -183,7 +183,7 @@ public void setIndexes(List indexes) { this.indexes = indexes; } - public KeyObject maxHitsPerQuery(Integer maxHitsPerQuery) { + public Key maxHitsPerQuery(Integer maxHitsPerQuery) { this.maxHitsPerQuery = maxHitsPerQuery; return this; } @@ -202,7 +202,7 @@ public void setMaxHitsPerQuery(Integer maxHitsPerQuery) { this.maxHitsPerQuery = maxHitsPerQuery; } - public KeyObject maxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour) { + public Key maxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour) { this.maxQueriesPerIPPerHour = maxQueriesPerIPPerHour; return this; } @@ -221,7 +221,7 @@ public void setMaxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour) { this.maxQueriesPerIPPerHour = maxQueriesPerIPPerHour; } - public KeyObject queryParameters(String queryParameters) { + public Key queryParameters(String queryParameters) { this.queryParameters = queryParameters; return this; } @@ -241,12 +241,12 @@ public void setQueryParameters(String queryParameters) { this.queryParameters = queryParameters; } - public KeyObject referers(List referers) { + public Key referers(List referers) { this.referers = referers; return this; } - public KeyObject addReferersItem(String referersItem) { + public Key addReferersItem(String referersItem) { if (this.referers == null) { this.referers = new ArrayList<>(); } @@ -268,7 +268,7 @@ public void setReferers(List referers) { this.referers = referers; } - public KeyObject validity(Integer validity) { + public Key validity(Integer validity) { this.validity = validity; return this; } @@ -288,7 +288,7 @@ public void setValidity(Integer validity) { this.validity = validity; } - public KeyObject createdAt(String createdAt) { + public Key createdAt(String createdAt) { this.createdAt = createdAt; return this; } @@ -315,20 +315,17 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - KeyObject keyObject = (KeyObject) o; + Key key = (Key) o; return ( - Objects.equals(this.acl, keyObject.acl) && - Objects.equals(this.description, keyObject.description) && - Objects.equals(this.indexes, keyObject.indexes) && - Objects.equals(this.maxHitsPerQuery, keyObject.maxHitsPerQuery) && - Objects.equals( - this.maxQueriesPerIPPerHour, - keyObject.maxQueriesPerIPPerHour - ) && - Objects.equals(this.queryParameters, keyObject.queryParameters) && - Objects.equals(this.referers, keyObject.referers) && - Objects.equals(this.validity, keyObject.validity) && - Objects.equals(this.createdAt, keyObject.createdAt) + Objects.equals(this.acl, key.acl) && + Objects.equals(this.description, key.description) && + Objects.equals(this.indexes, key.indexes) && + Objects.equals(this.maxHitsPerQuery, key.maxHitsPerQuery) && + Objects.equals(this.maxQueriesPerIPPerHour, key.maxQueriesPerIPPerHour) && + Objects.equals(this.queryParameters, key.queryParameters) && + Objects.equals(this.referers, key.referers) && + Objects.equals(this.validity, key.validity) && + Objects.equals(this.createdAt, key.createdAt) ); } @@ -350,7 +347,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class KeyObject {\n"); + sb.append("class Key {\n"); sb.append(" acl: ").append(toIndentedString(acl)).append("\n"); sb .append(" description: ") diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListApiKeysResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListApiKeysResponse.java index 891fb52a7f..f85539f5e1 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListApiKeysResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListApiKeysResponse.java @@ -9,14 +9,14 @@ public class ListApiKeysResponse { @SerializedName("keys") - private List keys = new ArrayList<>(); + private List keys = new ArrayList<>(); - public ListApiKeysResponse keys(List keys) { + public ListApiKeysResponse keys(List keys) { this.keys = keys; return this; } - public ListApiKeysResponse addKeysItem(KeyObject keysItem) { + public ListApiKeysResponse addKeysItem(Key keysItem) { this.keys.add(keysItem); return this; } @@ -27,11 +27,11 @@ public ListApiKeysResponse addKeysItem(KeyObject keysItem) { * @return keys */ @javax.annotation.Nonnull - public List getKeys() { + public List getKeys() { return keys; } - public void setKeys(List keys) { + public void setKeys(List keys) { this.keys = keys; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListIndicesResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListIndicesResponse.java index 6ac495195b..0f4edc5901 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListIndicesResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/ListIndicesResponse.java @@ -9,17 +9,17 @@ public class ListIndicesResponse { @SerializedName("items") - private List items = null; + private List items = null; @SerializedName("nbPages") private Integer nbPages; - public ListIndicesResponse items(List items) { + public ListIndicesResponse items(List items) { this.items = items; return this; } - public ListIndicesResponse addItemsItem(Index itemsItem) { + public ListIndicesResponse addItemsItem(Indice itemsItem) { if (this.items == null) { this.items = new ArrayList<>(); } @@ -33,11 +33,11 @@ public ListIndicesResponse addItemsItem(Index itemsItem) { * @return items */ @javax.annotation.Nullable - public List getItems() { + public List getItems() { return items; } - public void setItems(List items) { + public void setItems(List items) { this.items = items; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsParams.java similarity index 81% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsParams.java index 38036f35ee..329bb9f116 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleGetObjectsParams.java @@ -5,8 +5,8 @@ import java.util.List; import java.util.Objects; -/** GetObject operation on an index. */ -public class MultipleGetObjectsObject { +/** getObjects operation on an index. */ +public class MultipleGetObjectsParams { @SerializedName("attributesToRetrieve") private List attributesToRetrieve = null; @@ -17,14 +17,14 @@ public class MultipleGetObjectsObject { @SerializedName("indexName") private String indexName; - public MultipleGetObjectsObject attributesToRetrieve( + public MultipleGetObjectsParams attributesToRetrieve( List attributesToRetrieve ) { this.attributesToRetrieve = attributesToRetrieve; return this; } - public MultipleGetObjectsObject addAttributesToRetrieveItem( + public MultipleGetObjectsParams addAttributesToRetrieveItem( String attributesToRetrieveItem ) { if (this.attributesToRetrieve == null) { @@ -48,7 +48,7 @@ public void setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; } - public MultipleGetObjectsObject objectID(String objectID) { + public MultipleGetObjectsParams objectID(String objectID) { this.objectID = objectID; return this; } @@ -67,7 +67,7 @@ public void setObjectID(String objectID) { this.objectID = objectID; } - public MultipleGetObjectsObject indexName(String indexName) { + public MultipleGetObjectsParams indexName(String indexName) { this.indexName = indexName; return this; } @@ -94,14 +94,14 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MultipleGetObjectsObject multipleGetObjectsObject = (MultipleGetObjectsObject) o; + MultipleGetObjectsParams multipleGetObjectsParams = (MultipleGetObjectsParams) o; return ( Objects.equals( this.attributesToRetrieve, - multipleGetObjectsObject.attributesToRetrieve + multipleGetObjectsParams.attributesToRetrieve ) && - Objects.equals(this.objectID, multipleGetObjectsObject.objectID) && - Objects.equals(this.indexName, multipleGetObjectsObject.indexName) + Objects.equals(this.objectID, multipleGetObjectsParams.objectID) && + Objects.equals(this.indexName, multipleGetObjectsParams.indexName) ); } @@ -113,7 +113,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class MultipleGetObjectsObject {\n"); + sb.append("class MultipleGetObjectsParams {\n"); sb .append(" attributesToRetrieve: ") .append(toIndentedString(attributesToRetrieve)) diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesParams.java similarity index 86% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesParams.java index bd51900540..8279ff9d02 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/MultipleQueriesParams.java @@ -10,8 +10,8 @@ import java.util.List; import java.util.Objects; -/** MultipleQueriesObject */ -public class MultipleQueriesObject { +/** MultipleQueriesParams */ +public class MultipleQueriesParams { @SerializedName("requests") private List requests = new ArrayList<>(); @@ -68,12 +68,12 @@ public StrategyEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("strategy") private StrategyEnum strategy; - public MultipleQueriesObject requests(List requests) { + public MultipleQueriesParams requests(List requests) { this.requests = requests; return this; } - public MultipleQueriesObject addRequestsItem(MultipleQueries requestsItem) { + public MultipleQueriesParams addRequestsItem(MultipleQueries requestsItem) { this.requests.add(requestsItem); return this; } @@ -92,7 +92,7 @@ public void setRequests(List requests) { this.requests = requests; } - public MultipleQueriesObject strategy(StrategyEnum strategy) { + public MultipleQueriesParams strategy(StrategyEnum strategy) { this.strategy = strategy; return this; } @@ -119,10 +119,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MultipleQueriesObject multipleQueriesObject = (MultipleQueriesObject) o; + MultipleQueriesParams multipleQueriesParams = (MultipleQueriesParams) o; return ( - Objects.equals(this.requests, multipleQueriesObject.requests) && - Objects.equals(this.strategy, multipleQueriesObject.strategy) + Objects.equals(this.requests, multipleQueriesParams.requests) && + Objects.equals(this.strategy, multipleQueriesParams.strategy) ); } @@ -134,7 +134,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class MultipleQueriesObject {\n"); + sb.append("class MultipleQueriesParams {\n"); sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); sb.append("}"); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexParams.java similarity index 88% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexParams.java index da459c5352..32c97d1262 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/OperationIndexParams.java @@ -10,8 +10,8 @@ import java.util.List; import java.util.Objects; -/** OperationIndexObject */ -public class OperationIndexObject { +/** OperationIndexParams */ +public class OperationIndexParams { /** Type of operation to perform (move or copy). */ @JsonAdapter(OperationEnum.Adapter.class) @@ -123,7 +123,7 @@ public ScopeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("scope") private List scope = null; - public OperationIndexObject operation(OperationEnum operation) { + public OperationIndexParams operation(OperationEnum operation) { this.operation = operation; return this; } @@ -142,7 +142,7 @@ public void setOperation(OperationEnum operation) { this.operation = operation; } - public OperationIndexObject destination(String destination) { + public OperationIndexParams destination(String destination) { this.destination = destination; return this; } @@ -161,12 +161,12 @@ public void setDestination(String destination) { this.destination = destination; } - public OperationIndexObject scope(List scope) { + public OperationIndexParams scope(List scope) { this.scope = scope; return this; } - public OperationIndexObject addScopeItem(ScopeEnum scopeItem) { + public OperationIndexParams addScopeItem(ScopeEnum scopeItem) { if (this.scope == null) { this.scope = new ArrayList<>(); } @@ -197,11 +197,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OperationIndexObject operationIndexObject = (OperationIndexObject) o; + OperationIndexParams operationIndexParams = (OperationIndexParams) o; return ( - Objects.equals(this.operation, operationIndexObject.operation) && - Objects.equals(this.destination, operationIndexObject.destination) && - Objects.equals(this.scope, operationIndexObject.scope) + Objects.equals(this.operation, operationIndexParams.operation) && + Objects.equals(this.destination, operationIndexParams.destination) && + Objects.equals(this.scope, operationIndexParams.scope) ); } @@ -213,7 +213,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OperationIndexObject {\n"); + sb.append("class OperationIndexParams {\n"); sb .append(" operation: ") .append(toIndentedString(operation)) diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchHits.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchHits.java index f9aa717162..54993308f9 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchHits.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchHits.java @@ -9,14 +9,14 @@ public class SearchHits { @SerializedName("hits") - private List hits = null; + private List hits = null; - public SearchHits hits(List hits) { + public SearchHits hits(List hits) { this.hits = hits; return this; } - public SearchHits addHitsItem(Record hitsItem) { + public SearchHits addHitsItem(Hit hitsItem) { if (this.hits == null) { this.hits = new ArrayList<>(); } @@ -30,11 +30,11 @@ public SearchHits addHitsItem(Record hitsItem) { * @return hits */ @javax.annotation.Nullable - public List getHits() { + public List getHits() { return hits; } - public void setHits(List hits) { + public void setHits(List hits) { this.hits = hits; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchResponse.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchResponse.java index ee4a0177ef..d4df3467a4 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchResponse.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchResponse.java @@ -83,7 +83,7 @@ public class SearchResponse { private Object userData = new Object(); @SerializedName("hits") - private List hits = new ArrayList<>(); + private List hits = new ArrayList<>(); public SearchResponse abTestID(Integer abTestID) { this.abTestID = abTestID; @@ -573,12 +573,12 @@ public void setUserData(Object userData) { this.userData = userData; } - public SearchResponse hits(List hits) { + public SearchResponse hits(List hits) { this.hits = hits; return this; } - public SearchResponse addHitsItem(Record hitsItem) { + public SearchResponse addHitsItem(Hit hitsItem) { this.hits.add(hitsItem); return this; } @@ -589,11 +589,11 @@ public SearchResponse addHitsItem(Record hitsItem) { * @return hits */ @javax.annotation.Nonnull - public List getHits() { + public List getHits() { return hits; } - public void setHits(List hits) { + public void setHits(List hits) { this.hits = hits; } diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsObject.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsParams.java similarity index 80% rename from clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsObject.java rename to clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsParams.java index b5dde1ccbd..b86938a2df 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsObject.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/SearchUserIdsParams.java @@ -4,7 +4,7 @@ import java.util.Objects; /** OK */ -public class SearchUserIdsObject { +public class SearchUserIdsParams { @SerializedName("query") private String query; @@ -18,7 +18,7 @@ public class SearchUserIdsObject { @SerializedName("hitsPerPage") private Integer hitsPerPage = 20; - public SearchUserIdsObject query(String query) { + public SearchUserIdsParams query(String query) { this.query = query; return this; } @@ -38,7 +38,7 @@ public void setQuery(String query) { this.query = query; } - public SearchUserIdsObject clusterName(String clusterName) { + public SearchUserIdsParams clusterName(String clusterName) { this.clusterName = clusterName; return this; } @@ -57,7 +57,7 @@ public void setClusterName(String clusterName) { this.clusterName = clusterName; } - public SearchUserIdsObject page(Integer page) { + public SearchUserIdsParams page(Integer page) { this.page = page; return this; } @@ -76,7 +76,7 @@ public void setPage(Integer page) { this.page = page; } - public SearchUserIdsObject hitsPerPage(Integer hitsPerPage) { + public SearchUserIdsParams hitsPerPage(Integer hitsPerPage) { this.hitsPerPage = hitsPerPage; return this; } @@ -103,12 +103,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SearchUserIdsObject searchUserIdsObject = (SearchUserIdsObject) o; + SearchUserIdsParams searchUserIdsParams = (SearchUserIdsParams) o; return ( - Objects.equals(this.query, searchUserIdsObject.query) && - Objects.equals(this.clusterName, searchUserIdsObject.clusterName) && - Objects.equals(this.page, searchUserIdsObject.page) && - Objects.equals(this.hitsPerPage, searchUserIdsObject.hitsPerPage) + Objects.equals(this.query, searchUserIdsParams.query) && + Objects.equals(this.clusterName, searchUserIdsParams.clusterName) && + Objects.equals(this.page, searchUserIdsParams.page) && + Objects.equals(this.hitsPerPage, searchUserIdsParams.hitsPerPage) ); } @@ -120,7 +120,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SearchUserIdsObject {\n"); + sb.append("class SearchUserIdsParams {\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb .append(" clusterName: ") diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java index 39d51cceed..c1322fd8be 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/search/SearchApi.java @@ -7,12 +7,12 @@ import com.algolia.Pair; import com.algolia.model.AddApiKeyResponse; import com.algolia.model.ApiKey; -import com.algolia.model.AssignUserIdObject; -import com.algolia.model.BatchAssignUserIdsObject; +import com.algolia.model.AssignUserIdParams; +import com.algolia.model.BatchAssignUserIdsParams; import com.algolia.model.BatchDictionaryEntries; -import com.algolia.model.BatchObject; +import com.algolia.model.BatchParams; import com.algolia.model.BatchResponse; -import com.algolia.model.BatchWriteObject; +import com.algolia.model.BatchWriteParams; import com.algolia.model.BrowseRequest; import com.algolia.model.BrowseResponse; import com.algolia.model.CreatedAtResponse; @@ -22,22 +22,22 @@ import com.algolia.model.DictionarySettingsRequest; import com.algolia.model.GetDictionarySettingsResponse; import com.algolia.model.GetLogsResponse; -import com.algolia.model.GetObjectsObject; +import com.algolia.model.GetObjectsParams; import com.algolia.model.GetObjectsResponse; import com.algolia.model.GetTaskResponse; import com.algolia.model.GetTopUserIdsResponse; import com.algolia.model.IndexSettings; -import com.algolia.model.KeyObject; +import com.algolia.model.Key; import com.algolia.model.Languages; import com.algolia.model.ListApiKeysResponse; import com.algolia.model.ListClustersResponse; import com.algolia.model.ListIndicesResponse; import com.algolia.model.ListUserIdsResponse; import com.algolia.model.MultipleBatchResponse; -import com.algolia.model.MultipleQueriesObject; +import com.algolia.model.MultipleQueriesParams; import com.algolia.model.MultipleQueriesResponse; import com.algolia.model.OneOfstringbuiltInOperation; -import com.algolia.model.OperationIndexObject; +import com.algolia.model.OperationIndexParams; import com.algolia.model.RemoveUserIdResponse; import com.algolia.model.ReplaceSourceResponse; import com.algolia.model.Rule; @@ -51,7 +51,7 @@ import com.algolia.model.SearchRulesParams; import com.algolia.model.SearchRulesResponse; import com.algolia.model.SearchSynonymsResponse; -import com.algolia.model.SearchUserIdsObject; +import com.algolia.model.SearchUserIdsParams; import com.algolia.model.SearchUserIdsResponse; import com.algolia.model.Source; import com.algolia.model.SynonymHit; @@ -370,17 +370,17 @@ public Call appendSourceAsync( * Build call for assignUserId * * @param xAlgoliaUserID userID to assign. (required) - * @param assignUserIdObject (required) + * @param assignUserIdParams (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object */ private Call assignUserIdCall( String xAlgoliaUserID, - AssignUserIdObject assignUserIdObject, + AssignUserIdParams assignUserIdParams, final ApiCallback _callback ) throws ApiException { - Object bodyObj = assignUserIdObject; + Object bodyObj = assignUserIdParams; // create path and map variables String path = "/1/clusters/mapping"; @@ -410,7 +410,7 @@ private Call assignUserIdCall( @SuppressWarnings("rawtypes") private Call assignUserIdValidateBeforeCall( String xAlgoliaUserID, - AssignUserIdObject assignUserIdObject, + AssignUserIdParams assignUserIdParams, final ApiCallback _callback ) throws ApiException { // verify the required parameter 'xAlgoliaUserID' is set @@ -420,14 +420,14 @@ private Call assignUserIdValidateBeforeCall( ); } - // verify the required parameter 'assignUserIdObject' is set - if (assignUserIdObject == null) { + // verify the required parameter 'assignUserIdParams' is set + if (assignUserIdParams == null) { throw new ApiException( - "Missing the required parameter 'assignUserIdObject' when calling assignUserId(Async)" + "Missing the required parameter 'assignUserIdParams' when calling assignUserId(Async)" ); } - return assignUserIdCall(xAlgoliaUserID, assignUserIdObject, _callback); + return assignUserIdCall(xAlgoliaUserID, assignUserIdParams, _callback); } /** @@ -437,18 +437,18 @@ private Call assignUserIdValidateBeforeCall( * is directly usable. * * @param xAlgoliaUserID userID to assign. (required) - * @param assignUserIdObject (required) + * @param assignUserIdParams (required) * @return CreatedAtResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body */ public CreatedAtResponse assignUserId( String xAlgoliaUserID, - AssignUserIdObject assignUserIdObject + AssignUserIdParams assignUserIdParams ) throws ApiException { Call call = assignUserIdValidateBeforeCall( xAlgoliaUserID, - assignUserIdObject, + assignUserIdParams, null ); Type returnType = new TypeToken() {}.getType(); @@ -463,19 +463,19 @@ public CreatedAtResponse assignUserId( * userID is directly usable. * * @param xAlgoliaUserID userID to assign. (required) - * @param assignUserIdObject (required) + * @param assignUserIdParams (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public Call assignUserIdAsync( String xAlgoliaUserID, - AssignUserIdObject assignUserIdObject, + AssignUserIdParams assignUserIdParams, final ApiCallback _callback ) throws ApiException { Call call = assignUserIdValidateBeforeCall( xAlgoliaUserID, - assignUserIdObject, + assignUserIdParams, _callback ); Type returnType = new TypeToken() {}.getType(); @@ -487,17 +487,17 @@ public Call assignUserIdAsync( * Build call for batch * * @param indexName The index in which to perform the request. (required) - * @param batchWriteObject (required) + * @param batchWriteParams (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object */ private Call batchCall( String indexName, - BatchWriteObject batchWriteObject, + BatchWriteParams batchWriteParams, final ApiCallback _callback ) throws ApiException { - Object bodyObj = batchWriteObject; + Object bodyObj = batchWriteParams; // create path and map variables String path = @@ -525,7 +525,7 @@ private Call batchCall( @SuppressWarnings("rawtypes") private Call batchValidateBeforeCall( String indexName, - BatchWriteObject batchWriteObject, + BatchWriteParams batchWriteParams, final ApiCallback _callback ) throws ApiException { // verify the required parameter 'indexName' is set @@ -535,30 +535,30 @@ private Call batchValidateBeforeCall( ); } - // verify the required parameter 'batchWriteObject' is set - if (batchWriteObject == null) { + // verify the required parameter 'batchWriteParams' is set + if (batchWriteParams == null) { throw new ApiException( - "Missing the required parameter 'batchWriteObject' when calling batch(Async)" + "Missing the required parameter 'batchWriteParams' when calling batch(Async)" ); } - return batchCall(indexName, batchWriteObject, _callback); + return batchCall(indexName, batchWriteParams, _callback); } /** * Performs multiple write operations in a single API call. * * @param indexName The index in which to perform the request. (required) - * @param batchWriteObject (required) + * @param batchWriteParams (required) * @return BatchResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body */ public BatchResponse batch( String indexName, - BatchWriteObject batchWriteObject + BatchWriteParams batchWriteParams ) throws ApiException { - Call call = batchValidateBeforeCall(indexName, batchWriteObject, null); + Call call = batchValidateBeforeCall(indexName, batchWriteParams, null); Type returnType = new TypeToken() {}.getType(); ApiResponse res = this.execute(call, returnType); return res.getData(); @@ -568,17 +568,17 @@ public BatchResponse batch( * (asynchronously) Performs multiple write operations in a single API call. * * @param indexName The index in which to perform the request. (required) - * @param batchWriteObject (required) + * @param batchWriteParams (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public Call batchAsync( String indexName, - BatchWriteObject batchWriteObject, + BatchWriteParams batchWriteParams, final ApiCallback _callback ) throws ApiException { - Call call = batchValidateBeforeCall(indexName, batchWriteObject, _callback); + Call call = batchValidateBeforeCall(indexName, batchWriteParams, _callback); Type returnType = new TypeToken() {}.getType(); this.executeAsync(call, returnType, _callback); return call; @@ -588,17 +588,17 @@ public Call batchAsync( * Build call for batchAssignUserIds * * @param xAlgoliaUserID userID to assign. (required) - * @param batchAssignUserIdsObject (required) + * @param batchAssignUserIdsParams (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object */ private Call batchAssignUserIdsCall( String xAlgoliaUserID, - BatchAssignUserIdsObject batchAssignUserIdsObject, + BatchAssignUserIdsParams batchAssignUserIdsParams, final ApiCallback _callback ) throws ApiException { - Object bodyObj = batchAssignUserIdsObject; + Object bodyObj = batchAssignUserIdsParams; // create path and map variables String path = "/1/clusters/mapping/batch"; @@ -628,7 +628,7 @@ private Call batchAssignUserIdsCall( @SuppressWarnings("rawtypes") private Call batchAssignUserIdsValidateBeforeCall( String xAlgoliaUserID, - BatchAssignUserIdsObject batchAssignUserIdsObject, + BatchAssignUserIdsParams batchAssignUserIdsParams, final ApiCallback _callback ) throws ApiException { // verify the required parameter 'xAlgoliaUserID' is set @@ -638,17 +638,17 @@ private Call batchAssignUserIdsValidateBeforeCall( ); } - // verify the required parameter 'batchAssignUserIdsObject' is set - if (batchAssignUserIdsObject == null) { + // verify the required parameter 'batchAssignUserIdsParams' is set + if (batchAssignUserIdsParams == null) { throw new ApiException( - "Missing the required parameter 'batchAssignUserIdsObject' when calling" + + "Missing the required parameter 'batchAssignUserIdsParams' when calling" + " batchAssignUserIds(Async)" ); } return batchAssignUserIdsCall( xAlgoliaUserID, - batchAssignUserIdsObject, + batchAssignUserIdsParams, _callback ); } @@ -659,18 +659,18 @@ private Call batchAssignUserIdsValidateBeforeCall( * usable. * * @param xAlgoliaUserID userID to assign. (required) - * @param batchAssignUserIdsObject (required) + * @param batchAssignUserIdsParams (required) * @return CreatedAtResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body */ public CreatedAtResponse batchAssignUserIds( String xAlgoliaUserID, - BatchAssignUserIdsObject batchAssignUserIdsObject + BatchAssignUserIdsParams batchAssignUserIdsParams ) throws ApiException { Call call = batchAssignUserIdsValidateBeforeCall( xAlgoliaUserID, - batchAssignUserIdsObject, + batchAssignUserIdsParams, null ); Type returnType = new TypeToken() {}.getType(); @@ -684,19 +684,19 @@ public CreatedAtResponse batchAssignUserIds( * are directly usable. * * @param xAlgoliaUserID userID to assign. (required) - * @param batchAssignUserIdsObject (required) + * @param batchAssignUserIdsParams (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public Call batchAssignUserIdsAsync( String xAlgoliaUserID, - BatchAssignUserIdsObject batchAssignUserIdsObject, + BatchAssignUserIdsParams batchAssignUserIdsParams, final ApiCallback _callback ) throws ApiException { Call call = batchAssignUserIdsValidateBeforeCall( xAlgoliaUserID, - batchAssignUserIdsObject, + batchAssignUserIdsParams, _callback ); Type returnType = new TypeToken() {}.getType(); @@ -2152,14 +2152,14 @@ private Call getApiKeyValidateBeforeCall( * Get the permissions of an API key. * * @param key API Key string. (required) - * @return KeyObject + * @return Key * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body */ - public KeyObject getApiKey(String key) throws ApiException { + public Key getApiKey(String key) throws ApiException { Call call = getApiKeyValidateBeforeCall(key, null); - Type returnType = new TypeToken() {}.getType(); - ApiResponse res = this.execute(call, returnType); + Type returnType = new TypeToken() {}.getType(); + ApiResponse res = this.execute(call, returnType); return res.getData(); } @@ -2171,12 +2171,10 @@ public KeyObject getApiKey(String key) throws ApiException { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call getApiKeyAsync( - String key, - final ApiCallback _callback - ) throws ApiException { + public Call getApiKeyAsync(String key, final ApiCallback _callback) + throws ApiException { Call call = getApiKeyValidateBeforeCall(key, _callback); - Type returnType = new TypeToken() {}.getType(); + Type returnType = new TypeToken() {}.getType(); this.executeAsync(call, returnType, _callback); return call; } @@ -2590,16 +2588,16 @@ public Call getObjectAsync( /** * Build call for getObjects * - * @param getObjectsObject (required) + * @param getObjectsParams (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object */ private Call getObjectsCall( - GetObjectsObject getObjectsObject, + GetObjectsParams getObjectsParams, final ApiCallback _callback ) throws ApiException { - Object bodyObj = getObjectsObject; + Object bodyObj = getObjectsParams; // create path and map variables String path = "/1/indexes/*/objects"; @@ -2622,30 +2620,30 @@ private Call getObjectsCall( @SuppressWarnings("rawtypes") private Call getObjectsValidateBeforeCall( - GetObjectsObject getObjectsObject, + GetObjectsParams getObjectsParams, final ApiCallback _callback ) throws ApiException { - // verify the required parameter 'getObjectsObject' is set - if (getObjectsObject == null) { + // verify the required parameter 'getObjectsParams' is set + if (getObjectsParams == null) { throw new ApiException( - "Missing the required parameter 'getObjectsObject' when calling getObjects(Async)" + "Missing the required parameter 'getObjectsParams' when calling getObjects(Async)" ); } - return getObjectsCall(getObjectsObject, _callback); + return getObjectsCall(getObjectsParams, _callback); } /** * Retrieve one or more objects, potentially from different indices, in a single API call. * - * @param getObjectsObject (required) + * @param getObjectsParams (required) * @return GetObjectsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body */ - public GetObjectsResponse getObjects(GetObjectsObject getObjectsObject) + public GetObjectsResponse getObjects(GetObjectsParams getObjectsParams) throws ApiException { - Call call = getObjectsValidateBeforeCall(getObjectsObject, null); + Call call = getObjectsValidateBeforeCall(getObjectsParams, null); Type returnType = new TypeToken() {}.getType(); ApiResponse res = this.execute(call, returnType); return res.getData(); @@ -2655,16 +2653,16 @@ public GetObjectsResponse getObjects(GetObjectsObject getObjectsObject) * (asynchronously) Retrieve one or more objects, potentially from different indices, in a single * API call. * - * @param getObjectsObject (required) + * @param getObjectsParams (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public Call getObjectsAsync( - GetObjectsObject getObjectsObject, + GetObjectsParams getObjectsParams, final ApiCallback _callback ) throws ApiException { - Call call = getObjectsValidateBeforeCall(getObjectsObject, _callback); + Call call = getObjectsValidateBeforeCall(getObjectsParams, _callback); Type returnType = new TypeToken() {}.getType(); this.executeAsync(call, returnType, _callback); return call; @@ -3693,16 +3691,16 @@ public Call listUserIdsAsync( /** * Build call for multipleBatch * - * @param batchObject (required) + * @param batchParams (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object */ private Call multipleBatchCall( - BatchObject batchObject, + BatchParams batchParams, final ApiCallback _callback ) throws ApiException { - Object bodyObj = batchObject; + Object bodyObj = batchParams; // create path and map variables String path = "/1/indexes/*/batch"; @@ -3725,31 +3723,31 @@ private Call multipleBatchCall( @SuppressWarnings("rawtypes") private Call multipleBatchValidateBeforeCall( - BatchObject batchObject, + BatchParams batchParams, final ApiCallback _callback ) throws ApiException { - // verify the required parameter 'batchObject' is set - if (batchObject == null) { + // verify the required parameter 'batchParams' is set + if (batchParams == null) { throw new ApiException( - "Missing the required parameter 'batchObject' when calling multipleBatch(Async)" + "Missing the required parameter 'batchParams' when calling multipleBatch(Async)" ); } - return multipleBatchCall(batchObject, _callback); + return multipleBatchCall(batchParams, _callback); } /** * Perform multiple write operations, potentially targeting multiple indices, in a single API * call. * - * @param batchObject (required) + * @param batchParams (required) * @return MultipleBatchResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body */ - public MultipleBatchResponse multipleBatch(BatchObject batchObject) + public MultipleBatchResponse multipleBatch(BatchParams batchParams) throws ApiException { - Call call = multipleBatchValidateBeforeCall(batchObject, null); + Call call = multipleBatchValidateBeforeCall(batchParams, null); Type returnType = new TypeToken() {}.getType(); ApiResponse res = this.execute(call, returnType); return res.getData(); @@ -3759,16 +3757,16 @@ public MultipleBatchResponse multipleBatch(BatchObject batchObject) * (asynchronously) Perform multiple write operations, potentially targeting multiple indices, in * a single API call. * - * @param batchObject (required) + * @param batchParams (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public Call multipleBatchAsync( - BatchObject batchObject, + BatchParams batchParams, final ApiCallback _callback ) throws ApiException { - Call call = multipleBatchValidateBeforeCall(batchObject, _callback); + Call call = multipleBatchValidateBeforeCall(batchParams, _callback); Type returnType = new TypeToken() {}.getType(); this.executeAsync(call, returnType, _callback); return call; @@ -3777,16 +3775,16 @@ public Call multipleBatchAsync( /** * Build call for multipleQueries * - * @param multipleQueriesObject (required) + * @param multipleQueriesParams (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object */ private Call multipleQueriesCall( - MultipleQueriesObject multipleQueriesObject, + MultipleQueriesParams multipleQueriesParams, final ApiCallback _callback ) throws ApiException { - Object bodyObj = multipleQueriesObject; + Object bodyObj = multipleQueriesParams; // create path and map variables String path = "/1/indexes/*/queries"; @@ -3809,32 +3807,32 @@ private Call multipleQueriesCall( @SuppressWarnings("rawtypes") private Call multipleQueriesValidateBeforeCall( - MultipleQueriesObject multipleQueriesObject, + MultipleQueriesParams multipleQueriesParams, final ApiCallback _callback ) throws ApiException { - // verify the required parameter 'multipleQueriesObject' is set - if (multipleQueriesObject == null) { + // verify the required parameter 'multipleQueriesParams' is set + if (multipleQueriesParams == null) { throw new ApiException( - "Missing the required parameter 'multipleQueriesObject' when calling" + + "Missing the required parameter 'multipleQueriesParams' when calling" + " multipleQueries(Async)" ); } - return multipleQueriesCall(multipleQueriesObject, _callback); + return multipleQueriesCall(multipleQueriesParams, _callback); } /** * Get search results for the given requests. * - * @param multipleQueriesObject (required) + * @param multipleQueriesParams (required) * @return MultipleQueriesResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body */ public MultipleQueriesResponse multipleQueries( - MultipleQueriesObject multipleQueriesObject + MultipleQueriesParams multipleQueriesParams ) throws ApiException { - Call call = multipleQueriesValidateBeforeCall(multipleQueriesObject, null); + Call call = multipleQueriesValidateBeforeCall(multipleQueriesParams, null); Type returnType = new TypeToken() {}.getType(); ApiResponse res = this.execute(call, returnType); return res.getData(); @@ -3843,17 +3841,17 @@ public MultipleQueriesResponse multipleQueries( /** * (asynchronously) Get search results for the given requests. * - * @param multipleQueriesObject (required) + * @param multipleQueriesParams (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public Call multipleQueriesAsync( - MultipleQueriesObject multipleQueriesObject, + MultipleQueriesParams multipleQueriesParams, final ApiCallback _callback ) throws ApiException { Call call = multipleQueriesValidateBeforeCall( - multipleQueriesObject, + multipleQueriesParams, _callback ); Type returnType = new TypeToken() {}.getType(); @@ -3865,17 +3863,17 @@ public Call multipleQueriesAsync( * Build call for operationIndex * * @param indexName The index in which to perform the request. (required) - * @param operationIndexObject (required) + * @param operationIndexParams (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object */ private Call operationIndexCall( String indexName, - OperationIndexObject operationIndexObject, + OperationIndexParams operationIndexParams, final ApiCallback _callback ) throws ApiException { - Object bodyObj = operationIndexObject; + Object bodyObj = operationIndexParams; // create path and map variables String path = @@ -3903,7 +3901,7 @@ private Call operationIndexCall( @SuppressWarnings("rawtypes") private Call operationIndexValidateBeforeCall( String indexName, - OperationIndexObject operationIndexObject, + OperationIndexParams operationIndexParams, final ApiCallback _callback ) throws ApiException { // verify the required parameter 'indexName' is set @@ -3913,33 +3911,33 @@ private Call operationIndexValidateBeforeCall( ); } - // verify the required parameter 'operationIndexObject' is set - if (operationIndexObject == null) { + // verify the required parameter 'operationIndexParams' is set + if (operationIndexParams == null) { throw new ApiException( - "Missing the required parameter 'operationIndexObject' when calling" + + "Missing the required parameter 'operationIndexParams' when calling" + " operationIndex(Async)" ); } - return operationIndexCall(indexName, operationIndexObject, _callback); + return operationIndexCall(indexName, operationIndexParams, _callback); } /** * Peforms a copy or a move operation on a index. * * @param indexName The index in which to perform the request. (required) - * @param operationIndexObject (required) + * @param operationIndexParams (required) * @return UpdatedAtResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body */ public UpdatedAtResponse operationIndex( String indexName, - OperationIndexObject operationIndexObject + OperationIndexParams operationIndexParams ) throws ApiException { Call call = operationIndexValidateBeforeCall( indexName, - operationIndexObject, + operationIndexParams, null ); Type returnType = new TypeToken() {}.getType(); @@ -3951,19 +3949,19 @@ public UpdatedAtResponse operationIndex( * (asynchronously) Peforms a copy or a move operation on a index. * * @param indexName The index in which to perform the request. (required) - * @param operationIndexObject (required) + * @param operationIndexParams (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public Call operationIndexAsync( String indexName, - OperationIndexObject operationIndexObject, + OperationIndexParams operationIndexParams, final ApiCallback _callback ) throws ApiException { Call call = operationIndexValidateBeforeCall( indexName, - operationIndexObject, + operationIndexParams, _callback ); Type returnType = new TypeToken() {}.getType(); @@ -4388,7 +4386,7 @@ public Call restoreApiKeyAsync( * Build call for saveObject * * @param indexName The index in which to perform the request. (required) - * @param body The Algolia object. (required) + * @param body The Algolia record. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4450,7 +4448,7 @@ private Call saveObjectValidateBeforeCall( * Add an object to the index, automatically assigning it an object ID. * * @param indexName The index in which to perform the request. (required) - * @param body The Algolia object. (required) + * @param body The Algolia record. (required) * @return SaveObjectResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -4467,7 +4465,7 @@ public SaveObjectResponse saveObject(String indexName, Object body) * (asynchronously) Add an object to the index, automatically assigning it an object ID. * * @param indexName The index in which to perform the request. (required) - * @param body The Algolia object. (required) + * @param body The Algolia record. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5559,16 +5557,16 @@ public Call searchSynonymsAsync( /** * Build call for searchUserIds * - * @param searchUserIdsObject (required) + * @param searchUserIdsParams (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object */ private Call searchUserIdsCall( - SearchUserIdsObject searchUserIdsObject, + SearchUserIdsParams searchUserIdsParams, final ApiCallback _callback ) throws ApiException { - Object bodyObj = searchUserIdsObject; + Object bodyObj = searchUserIdsParams; // create path and map variables String path = "/1/clusters/mapping/search"; @@ -5591,17 +5589,17 @@ private Call searchUserIdsCall( @SuppressWarnings("rawtypes") private Call searchUserIdsValidateBeforeCall( - SearchUserIdsObject searchUserIdsObject, + SearchUserIdsParams searchUserIdsParams, final ApiCallback _callback ) throws ApiException { - // verify the required parameter 'searchUserIdsObject' is set - if (searchUserIdsObject == null) { + // verify the required parameter 'searchUserIdsParams' is set + if (searchUserIdsParams == null) { throw new ApiException( - "Missing the required parameter 'searchUserIdsObject' when calling searchUserIds(Async)" + "Missing the required parameter 'searchUserIdsParams' when calling searchUserIds(Async)" ); } - return searchUserIdsCall(searchUserIdsObject, _callback); + return searchUserIdsCall(searchUserIdsParams, _callback); } /** @@ -5613,15 +5611,15 @@ private Call searchUserIdsValidateBeforeCall( * outdated value until the next rebuild of the mapping, which takes place every 12h. Upon * success, the response is 200 OK and contains the following userIDs data. * - * @param searchUserIdsObject (required) + * @param searchUserIdsParams (required) * @return SearchUserIdsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body */ public SearchUserIdsResponse searchUserIds( - SearchUserIdsObject searchUserIdsObject + SearchUserIdsParams searchUserIdsParams ) throws ApiException { - Call call = searchUserIdsValidateBeforeCall(searchUserIdsObject, null); + Call call = searchUserIdsValidateBeforeCall(searchUserIdsParams, null); Type returnType = new TypeToken() {}.getType(); ApiResponse res = this.execute(call, returnType); return res.getData(); @@ -5636,16 +5634,16 @@ public SearchUserIdsResponse searchUserIds( * search will report an outdated value until the next rebuild of the mapping, which takes place * every 12h. Upon success, the response is 200 OK and contains the following userIDs data. * - * @param searchUserIdsObject (required) + * @param searchUserIdsParams (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public Call searchUserIdsAsync( - SearchUserIdsObject searchUserIdsObject, + SearchUserIdsParams searchUserIdsParams, final ApiCallback _callback ) throws ApiException { - Call call = searchUserIdsValidateBeforeCall(searchUserIdsObject, _callback); + Call call = searchUserIdsValidateBeforeCall(searchUserIdsParams, _callback); Type returnType = new TypeToken() {}.getType(); this.executeAsync(call, returnType, _callback); return call; diff --git a/clients/algoliasearch-client-javascript/client-abtesting/src/abtestingApi.ts b/clients/algoliasearch-client-javascript/client-abtesting/src/abtestingApi.ts index 448a23cf87..fbbdec0e20 100644 --- a/clients/algoliasearch-client-javascript/client-abtesting/src/abtestingApi.ts +++ b/clients/algoliasearch-client-javascript/client-abtesting/src/abtestingApi.ts @@ -100,34 +100,25 @@ export class AbtestingApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (addABTestsRequest === null || addABTestsRequest === undefined) { + if (!addABTestsRequest) { throw new Error( - 'Required parameter addABTestsRequest was null or undefined when calling addABTests.' + 'Parameter `addABTestsRequest` is required when calling `addABTests`.' ); } - if ( - addABTestsRequest.name === null || - addABTestsRequest.name === undefined - ) { + if (!addABTestsRequest.name) { throw new Error( - 'Required parameter addABTestsRequest.name was null or undefined when calling addABTests.' + 'Parameter `addABTestsRequest.name` is required when calling `addABTests`.' ); } - if ( - addABTestsRequest.variant === null || - addABTestsRequest.variant === undefined - ) { + if (!addABTestsRequest.variant) { throw new Error( - 'Required parameter addABTestsRequest.variant was null or undefined when calling addABTests.' + 'Parameter `addABTestsRequest.variant` is required when calling `addABTests`.' ); } - if ( - addABTestsRequest.endAt === null || - addABTestsRequest.endAt === undefined - ) { + if (!addABTestsRequest.endAt) { throw new Error( - 'Required parameter addABTestsRequest.endAt was null or undefined when calling addABTests.' + 'Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.' ); } @@ -159,9 +150,9 @@ export class AbtestingApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (id === null || id === undefined) { + if (!id) { throw new Error( - 'Required parameter id was null or undefined when calling deleteABTest.' + 'Parameter `id` is required when calling `deleteABTest`.' ); } @@ -192,10 +183,8 @@ export class AbtestingApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getABTest.' - ); + if (!id) { + throw new Error('Parameter `id` is required when calling `getABTest`.'); } const request: Request = { @@ -261,10 +250,8 @@ export class AbtestingApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling stopABTest.' - ); + if (!id) { + throw new Error('Parameter `id` is required when calling `stopABTest`.'); } const request: Request = { diff --git a/clients/algoliasearch-client-javascript/client-analytics/src/analyticsApi.ts b/clients/algoliasearch-client-javascript/client-analytics/src/analyticsApi.ts index 722c9bc070..b813696d30 100644 --- a/clients/algoliasearch-client-javascript/client-analytics/src/analyticsApi.ts +++ b/clients/algoliasearch-client-javascript/client-analytics/src/analyticsApi.ts @@ -124,9 +124,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getAverageClickPosition.' + 'Parameter `index` is required when calling `getAverageClickPosition`.' ); } @@ -178,9 +178,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getClickPositions.' + 'Parameter `index` is required when calling `getClickPositions`.' ); } @@ -232,9 +232,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getClickThroughRate.' + 'Parameter `index` is required when calling `getClickThroughRate`.' ); } @@ -286,9 +286,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getConversationRate.' + 'Parameter `index` is required when calling `getConversationRate`.' ); } @@ -340,9 +340,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getNoClickRate.' + 'Parameter `index` is required when calling `getNoClickRate`.' ); } @@ -394,9 +394,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getNoResultsRate.' + 'Parameter `index` is required when calling `getNoResultsRate`.' ); } @@ -448,9 +448,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getSearchesCount.' + 'Parameter `index` is required when calling `getSearchesCount`.' ); } @@ -506,9 +506,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getSearchesNoClicks.' + 'Parameter `index` is required when calling `getSearchesNoClicks`.' ); } @@ -572,9 +572,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getSearchesNoResults.' + 'Parameter `index` is required when calling `getSearchesNoResults`.' ); } @@ -626,9 +626,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getStatus.' + 'Parameter `index` is required when calling `getStatus`.' ); } @@ -672,9 +672,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getTopCountries.' + 'Parameter `index` is required when calling `getTopCountries`.' ); } @@ -740,9 +740,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getTopFilterAttributes.' + 'Parameter `index` is required when calling `getTopFilterAttributes`.' ); } @@ -817,15 +817,15 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (attribute === null || attribute === undefined) { + if (!attribute) { throw new Error( - 'Required parameter attribute was null or undefined when calling getTopFilterForAttribute.' + 'Parameter `attribute` is required when calling `getTopFilterForAttribute`.' ); } - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getTopFilterForAttribute.' + 'Parameter `index` is required when calling `getTopFilterForAttribute`.' ); } @@ -895,9 +895,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getTopFiltersNoResults.' + 'Parameter `index` is required when calling `getTopFiltersNoResults`.' ); } @@ -971,9 +971,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getTopHits.' + 'Parameter `index` is required when calling `getTopHits`.' ); } @@ -1053,9 +1053,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getTopSearches.' + 'Parameter `index` is required when calling `getTopSearches`.' ); } @@ -1127,9 +1127,9 @@ export class AnalyticsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (index === null || index === undefined) { + if (!index) { throw new Error( - 'Required parameter index was null or undefined when calling getUsersCount.' + 'Parameter `index` is required when calling `getUsersCount`.' ); } diff --git a/clients/algoliasearch-client-javascript/client-insights/src/insightsApi.ts b/clients/algoliasearch-client-javascript/client-insights/src/insightsApi.ts index 12da0deac7..7b80fc359c 100644 --- a/clients/algoliasearch-client-javascript/client-insights/src/insightsApi.ts +++ b/clients/algoliasearch-client-javascript/client-insights/src/insightsApi.ts @@ -93,15 +93,15 @@ export class InsightsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (insightEvents === null || insightEvents === undefined) { + if (!insightEvents) { throw new Error( - 'Required parameter insightEvents was null or undefined when calling pushEvents.' + 'Parameter `insightEvents` is required when calling `pushEvents`.' ); } - if (insightEvents.events === null || insightEvents.events === undefined) { + if (!insightEvents.events) { throw new Error( - 'Required parameter insightEvents.events was null or undefined when calling pushEvents.' + 'Parameter `insightEvents.events` is required when calling `pushEvents`.' ); } diff --git a/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts b/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyParams.ts similarity index 91% rename from clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts rename to clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyParams.ts index db6606a01d..0bcbab7e6e 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyObject.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/model/personalizationStrategyParams.ts @@ -1,7 +1,7 @@ import type { EventScoring } from './eventScoring'; import type { FacetScoring } from './facetScoring'; -export type PersonalizationStrategyObject = { +export type PersonalizationStrategyParams = { /** * Scores associated with the events. */ diff --git a/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts b/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts index 9243485e36..6ee3d2aaac 100644 --- a/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts +++ b/clients/algoliasearch-client-javascript/client-personalization/src/personalizationApi.ts @@ -1,6 +1,6 @@ import type { DeleteUserProfileResponse } from '../model/deleteUserProfileResponse'; import type { GetUserTokenResponse } from '../model/getUserTokenResponse'; -import type { PersonalizationStrategyObject } from '../model/personalizationStrategyObject'; +import type { PersonalizationStrategyParams } from '../model/personalizationStrategyParams'; import type { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse'; import { Transporter } from '../utils/Transporter'; import type { Requester } from '../utils/requester/Requester'; @@ -106,9 +106,9 @@ export class PersonalizationApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (userToken === null || userToken === undefined) { + if (!userToken) { throw new Error( - 'Required parameter userToken was null or undefined when calling deleteUserProfile.' + 'Parameter `userToken` is required when calling `deleteUserProfile`.' ); } @@ -129,7 +129,7 @@ export class PersonalizationApi { * * @summary Get the current personalization strategy. */ - getPersonalizationStrategy(): Promise { + getPersonalizationStrategy(): Promise { const path = '/1/strategies/personalization'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; @@ -163,9 +163,9 @@ export class PersonalizationApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (userToken === null || userToken === undefined) { + if (!userToken) { throw new Error( - 'Required parameter userToken was null or undefined when calling getUserTokenProfile.' + 'Parameter `userToken` is required when calling `getUserTokenProfile`.' ); } @@ -185,53 +185,41 @@ export class PersonalizationApi { * A strategy defines the events and facets that impact user profiles and personalized search results. * * @summary Set a new personalization strategy. - * @param personalizationStrategyObject - The personalizationStrategyObject object. + * @param personalizationStrategyParams - The personalizationStrategyParams object. */ setPersonalizationStrategy( - personalizationStrategyObject: PersonalizationStrategyObject + personalizationStrategyParams: PersonalizationStrategyParams ): Promise { const path = '/1/strategies/personalization'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if ( - personalizationStrategyObject === null || - personalizationStrategyObject === undefined - ) { + if (!personalizationStrategyParams) { throw new Error( - 'Required parameter personalizationStrategyObject was null or undefined when calling setPersonalizationStrategy.' + 'Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.' ); } - if ( - personalizationStrategyObject.eventScoring === null || - personalizationStrategyObject.eventScoring === undefined - ) { + if (!personalizationStrategyParams.eventScoring) { throw new Error( - 'Required parameter personalizationStrategyObject.eventScoring was null or undefined when calling setPersonalizationStrategy.' + 'Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.' ); } - if ( - personalizationStrategyObject.facetScoring === null || - personalizationStrategyObject.facetScoring === undefined - ) { + if (!personalizationStrategyParams.facetScoring) { throw new Error( - 'Required parameter personalizationStrategyObject.facetScoring was null or undefined when calling setPersonalizationStrategy.' + 'Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.' ); } - if ( - personalizationStrategyObject.personalizationImpact === null || - personalizationStrategyObject.personalizationImpact === undefined - ) { + if (!personalizationStrategyParams.personalizationImpact) { throw new Error( - 'Required parameter personalizationStrategyObject.personalizationImpact was null or undefined when calling setPersonalizationStrategy.' + 'Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.' ); } const request: Request = { method: 'POST', path, - data: personalizationStrategyObject, + data: personalizationStrategyParams, }; const requestOptions: RequestOptions = { diff --git a/clients/algoliasearch-client-javascript/client-query-suggestions/model/querySuggestionsIndex.ts b/clients/algoliasearch-client-javascript/client-query-suggestions/model/querySuggestionsIndex.ts index 7169be6b83..74ce2d5475 100644 --- a/clients/algoliasearch-client-javascript/client-query-suggestions/model/querySuggestionsIndex.ts +++ b/clients/algoliasearch-client-javascript/client-query-suggestions/model/querySuggestionsIndex.ts @@ -1,4 +1,4 @@ -import type { SourceIndexWithReplicas } from './sourceIndexWithReplicas'; +import type { SourceIndiceWithReplicas } from './sourceIndiceWithReplicas'; export type QuerySuggestionsIndex = { /** @@ -8,7 +8,7 @@ export type QuerySuggestionsIndex = { /** * List of source indices used to generate a Query Suggestions index. */ - sourceIndices: SourceIndexWithReplicas[]; + sourceIndices: SourceIndiceWithReplicas[]; /** * De-duplicate singular and plural suggestions. For example, let\'s say your index contains English content, and that two suggestions “shoe” and “shoes” end up in your Query Suggestions index. If the English language is configured, only the most popular of those two suggestions would remain. */ diff --git a/clients/algoliasearch-client-javascript/client-query-suggestions/model/sourceIndexWithReplicas.ts b/clients/algoliasearch-client-javascript/client-query-suggestions/model/sourceIndiceWithReplicas.ts similarity index 89% rename from clients/algoliasearch-client-javascript/client-query-suggestions/model/sourceIndexWithReplicas.ts rename to clients/algoliasearch-client-javascript/client-query-suggestions/model/sourceIndiceWithReplicas.ts index fae244578d..0c3601e84a 100644 --- a/clients/algoliasearch-client-javascript/client-query-suggestions/model/sourceIndexWithReplicas.ts +++ b/clients/algoliasearch-client-javascript/client-query-suggestions/model/sourceIndiceWithReplicas.ts @@ -1,14 +1,17 @@ import type { SourceIndexExternal } from './sourceIndexExternal'; -export type SourceIndexWithReplicas = { - /** - * Source index name. - */ - indexName: string; +/** + * Source indice with replicas used to generate a Query Suggestions index. + */ +export type SourceIndiceWithReplicas = { /** * True if the Query Suggestions index is a replicas. */ replicas: boolean; + /** + * Source index name. + */ + indexName: string; /** * List of analytics tags to filter the popular searches per tag. */ diff --git a/clients/algoliasearch-client-javascript/client-query-suggestions/src/querySuggestionsApi.ts b/clients/algoliasearch-client-javascript/client-query-suggestions/src/querySuggestionsApi.ts index f6274e4cd8..ea0c3c9e10 100644 --- a/clients/algoliasearch-client-javascript/client-query-suggestions/src/querySuggestionsApi.ts +++ b/clients/algoliasearch-client-javascript/client-query-suggestions/src/querySuggestionsApi.ts @@ -104,12 +104,9 @@ export class QuerySuggestionsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if ( - querySuggestionsIndexWithIndexParam === null || - querySuggestionsIndexWithIndexParam === undefined - ) { + if (!querySuggestionsIndexWithIndexParam) { throw new Error( - 'Required parameter querySuggestionsIndexWithIndexParam was null or undefined when calling createConfig.' + 'Parameter `querySuggestionsIndexWithIndexParam` is required when calling `createConfig`.' ); } @@ -141,9 +138,9 @@ export class QuerySuggestionsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling deleteConfig.' + 'Parameter `indexName` is required when calling `deleteConfig`.' ); } @@ -196,9 +193,9 @@ export class QuerySuggestionsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling getConfig.' + 'Parameter `indexName` is required when calling `getConfig`.' ); } @@ -229,9 +226,9 @@ export class QuerySuggestionsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling getConfigStatus.' + 'Parameter `indexName` is required when calling `getConfigStatus`.' ); } @@ -262,9 +259,9 @@ export class QuerySuggestionsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling getLogFile.' + 'Parameter `indexName` is required when calling `getLogFile`.' ); } @@ -299,27 +296,21 @@ export class QuerySuggestionsApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling updateConfig.' + 'Parameter `indexName` is required when calling `updateConfig`.' ); } - if ( - querySuggestionsIndexParam === null || - querySuggestionsIndexParam === undefined - ) { + if (!querySuggestionsIndexParam) { throw new Error( - 'Required parameter querySuggestionsIndexParam was null or undefined when calling updateConfig.' + 'Parameter `querySuggestionsIndexParam` is required when calling `updateConfig`.' ); } - if ( - querySuggestionsIndexParam.sourceIndices === null || - querySuggestionsIndexParam.sourceIndices === undefined - ) { + if (!querySuggestionsIndexParam.sourceIndices) { throw new Error( - 'Required parameter querySuggestionsIndexParam.sourceIndices was null or undefined when calling updateConfig.' + 'Parameter `querySuggestionsIndexParam.sourceIndices` is required when calling `updateConfig`.' ); } diff --git a/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdParams.ts similarity index 51% rename from clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/assignUserIdParams.ts index e35c3cf793..638f8f37d3 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/assignUserIdObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/assignUserIdParams.ts @@ -1,7 +1,7 @@ /** - * Assign userID object. + * Assign userID parameters. */ -export type AssignUserIdObject = { +export type AssignUserIdParams = { /** * Name of the cluster. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsObject.ts b/clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsParams.ts similarity index 70% rename from clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsParams.ts index c970da8ab5..96a6c0756a 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/batchAssignUserIdsParams.ts @@ -1,7 +1,7 @@ /** - * Assign userID object. + * Assign userID parameters. */ -export type BatchAssignUserIdsObject = { +export type BatchAssignUserIdsParams = { /** * Name of the cluster. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/batchWriteObject.ts b/clients/algoliasearch-client-javascript/client-search/model/batchParams.ts similarity index 57% rename from clients/algoliasearch-client-javascript/client-search/model/batchWriteObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/batchParams.ts index 081757516d..c0c9a64003 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/batchWriteObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/batchParams.ts @@ -1,8 +1,8 @@ import type { Operation } from './operation'; /** - * The `batch` requests. + * The `multipleBatch` parameters. */ -export type BatchWriteObject = { +export type BatchParams = { requests?: Operation[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/batchObject.ts b/clients/algoliasearch-client-javascript/client-search/model/batchWriteParams.ts similarity index 58% rename from clients/algoliasearch-client-javascript/client-search/model/batchObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/batchWriteParams.ts index 1c300f8e76..60cd949a70 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/batchObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/batchWriteParams.ts @@ -1,8 +1,8 @@ import type { Operation } from './operation'; /** - * The `batch` requests. + * The `batch` parameters. */ -export type BatchObject = { +export type BatchWriteParams = { requests?: Operation[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/getObjectsObject.ts b/clients/algoliasearch-client-javascript/client-search/model/getObjectsObject.ts deleted file mode 100644 index 05457b9fb8..0000000000 --- a/clients/algoliasearch-client-javascript/client-search/model/getObjectsObject.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { MultipleGetObjectsObject } from './multipleGetObjectsObject'; - -/** - * The `getObjects` requests. - */ -export type GetObjectsObject = { - requests?: MultipleGetObjectsObject[]; -}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/getObjectsParams.ts b/clients/algoliasearch-client-javascript/client-search/model/getObjectsParams.ts new file mode 100644 index 0000000000..439032130c --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/getObjectsParams.ts @@ -0,0 +1,8 @@ +import type { MultipleGetObjectsParams } from './multipleGetObjectsParams'; + +/** + * The `getObjects` parameters. + */ +export type GetObjectsParams = { + requests?: MultipleGetObjectsParams[]; +}; diff --git a/clients/algoliasearch-client-javascript/client-search/model/record.ts b/clients/algoliasearch-client-javascript/client-search/model/hit.ts similarity index 89% rename from clients/algoliasearch-client-javascript/client-search/model/record.ts rename to clients/algoliasearch-client-javascript/client-search/model/hit.ts index 2085ca9824..54c8913308 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/record.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/hit.ts @@ -3,9 +3,9 @@ import type { RankingInfo } from './rankingInfo'; import type { SnippetResult } from './snippetResult'; /** - * A single record. + * A single hit. */ -export type Record = { +export type Hit = { /** * Unique identifier of the object. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/index.ts b/clients/algoliasearch-client-javascript/client-search/model/indice.ts similarity index 97% rename from clients/algoliasearch-client-javascript/client-search/model/index.ts rename to clients/algoliasearch-client-javascript/client-search/model/indice.ts index 98ecf4686e..b5c963c297 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/index.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/indice.ts @@ -1,4 +1,4 @@ -export type Index = { +export type Indice = { /** * Index name. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/keyObject.ts b/clients/algoliasearch-client-javascript/client-search/model/key.ts similarity index 66% rename from clients/algoliasearch-client-javascript/client-search/model/keyObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/key.ts index 6eaf9302c1..d85de7bdd2 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/keyObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/key.ts @@ -1,4 +1,4 @@ import type { ApiKey } from './apiKey'; import type { CreatedAtObject } from './createdAtObject'; -export type KeyObject = ApiKey & CreatedAtObject; +export type Key = ApiKey & CreatedAtObject; diff --git a/clients/algoliasearch-client-javascript/client-search/model/listApiKeysResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/listApiKeysResponse.ts index 1efa12e293..4a3b978db4 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/listApiKeysResponse.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/listApiKeysResponse.ts @@ -1,8 +1,8 @@ -import type { KeyObject } from './keyObject'; +import type { Key } from './key'; export type ListApiKeysResponse = { /** * List of api keys. */ - keys: KeyObject[]; + keys: Key[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/listIndicesResponse.ts b/clients/algoliasearch-client-javascript/client-search/model/listIndicesResponse.ts index 20328d99d5..c89d4922ff 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/listIndicesResponse.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/listIndicesResponse.ts @@ -1,10 +1,10 @@ -import type { Index } from './index'; +import type { Indice } from './indice'; export type ListIndicesResponse = { /** * List of the fetched indices. */ - items?: Index[]; + items?: Indice[]; /** * Number of pages. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/multipleGetObjectsObject.ts b/clients/algoliasearch-client-javascript/client-search/model/multipleGetObjectsParams.ts similarity index 79% rename from clients/algoliasearch-client-javascript/client-search/model/multipleGetObjectsObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/multipleGetObjectsParams.ts index ae4e152653..0779eac6d1 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/multipleGetObjectsObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/multipleGetObjectsParams.ts @@ -1,7 +1,7 @@ /** - * GetObject operation on an index. + * GetObjects operation on an index. */ -export type MultipleGetObjectsObject = { +export type MultipleGetObjectsParams = { /** * List of attributes to retrieve. By default, all retrievable attributes are returned. */ diff --git a/clients/algoliasearch-client-javascript/client-search/model/multipleQueriesObject.ts b/clients/algoliasearch-client-javascript/client-search/model/multipleQueriesObject.ts deleted file mode 100644 index cf2d35ac7d..0000000000 --- a/clients/algoliasearch-client-javascript/client-search/model/multipleQueriesObject.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { MultipleQueries } from './multipleQueries'; - -export type MultipleQueriesObject = { - requests: MultipleQueries[]; - strategy?: MultipleQueriesObjectStrategy; -}; - -export type MultipleQueriesObjectStrategy = 'none' | 'stopIfEnoughMatches'; diff --git a/clients/algoliasearch-client-javascript/client-search/model/multipleQueriesParams.ts b/clients/algoliasearch-client-javascript/client-search/model/multipleQueriesParams.ts new file mode 100644 index 0000000000..dbbd88f4b2 --- /dev/null +++ b/clients/algoliasearch-client-javascript/client-search/model/multipleQueriesParams.ts @@ -0,0 +1,8 @@ +import type { MultipleQueries } from './multipleQueries'; + +export type MultipleQueriesParams = { + requests: MultipleQueries[]; + strategy?: MultipleQueriesParamsStrategy; +}; + +export type MultipleQueriesParamsStrategy = 'none' | 'stopIfEnoughMatches'; diff --git a/clients/algoliasearch-client-javascript/client-search/model/operationIndexObject.ts b/clients/algoliasearch-client-javascript/client-search/model/operationIndexParams.ts similarity index 52% rename from clients/algoliasearch-client-javascript/client-search/model/operationIndexObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/operationIndexParams.ts index c7a19c0c6b..ca5bc708bf 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/operationIndexObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/operationIndexParams.ts @@ -1,8 +1,8 @@ -export type OperationIndexObject = { +export type OperationIndexParams = { /** * Type of operation to perform (move or copy). */ - operation: OperationIndexObjectOperation; + operation: OperationIndexParamsOperation; /** * The Algolia index name. */ @@ -10,9 +10,9 @@ export type OperationIndexObject = { /** * Scope of the data to copy. When absent, a full copy is performed. When present, only the selected scopes are copied. */ - scope?: OperationIndexObjectScope[]; + scope?: OperationIndexParamsScope[]; }; -export type OperationIndexObjectOperation = 'copy' | 'move'; +export type OperationIndexParamsOperation = 'copy' | 'move'; -export type OperationIndexObjectScope = 'rules' | 'settings' | 'synonyms'; +export type OperationIndexParamsScope = 'rules' | 'settings' | 'synonyms'; diff --git a/clients/algoliasearch-client-javascript/client-search/model/searchHits.ts b/clients/algoliasearch-client-javascript/client-search/model/searchHits.ts index 5085b178c8..ca99c320ef 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/searchHits.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/searchHits.ts @@ -1,5 +1,5 @@ -import type { Record } from './record'; +import type { Hit } from './hit'; export type SearchHits = { - hits?: Record[]; + hits?: Hit[]; }; diff --git a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsParams.ts similarity index 90% rename from clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts rename to clients/algoliasearch-client-javascript/client-search/model/searchUserIdsParams.ts index c0f5a2c483..6611c71619 100644 --- a/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsObject.ts +++ b/clients/algoliasearch-client-javascript/client-search/model/searchUserIdsParams.ts @@ -1,7 +1,7 @@ /** * OK. */ -export type SearchUserIdsObject = { +export type SearchUserIdsParams = { /** * Query to search. The search is a prefix search with typoTolerance. Use empty query to retrieve all users. */ diff --git a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts index 3f47b6c14d..ce3d371c92 100644 --- a/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts +++ b/clients/algoliasearch-client-javascript/client-search/src/searchApi.ts @@ -1,11 +1,11 @@ import type { AddApiKeyResponse } from '../model/addApiKeyResponse'; import type { ApiKey } from '../model/apiKey'; -import type { AssignUserIdObject } from '../model/assignUserIdObject'; -import type { BatchAssignUserIdsObject } from '../model/batchAssignUserIdsObject'; +import type { AssignUserIdParams } from '../model/assignUserIdParams'; +import type { BatchAssignUserIdsParams } from '../model/batchAssignUserIdsParams'; import type { BatchDictionaryEntries } from '../model/batchDictionaryEntries'; -import type { BatchObject } from '../model/batchObject'; +import type { BatchParams } from '../model/batchParams'; import type { BatchResponse } from '../model/batchResponse'; -import type { BatchWriteObject } from '../model/batchWriteObject'; +import type { BatchWriteParams } from '../model/batchWriteParams'; import type { BrowseRequest } from '../model/browseRequest'; import type { BrowseResponse } from '../model/browseResponse'; import type { BuiltInOperation } from '../model/builtInOperation'; @@ -16,21 +16,21 @@ import type { DeletedAtResponse } from '../model/deletedAtResponse'; import type { DictionarySettingsRequest } from '../model/dictionarySettingsRequest'; import type { GetDictionarySettingsResponse } from '../model/getDictionarySettingsResponse'; import type { GetLogsResponse } from '../model/getLogsResponse'; -import type { GetObjectsObject } from '../model/getObjectsObject'; +import type { GetObjectsParams } from '../model/getObjectsParams'; import type { GetObjectsResponse } from '../model/getObjectsResponse'; import type { GetTaskResponse } from '../model/getTaskResponse'; import type { GetTopUserIdsResponse } from '../model/getTopUserIdsResponse'; import type { IndexSettings } from '../model/indexSettings'; -import type { KeyObject } from '../model/keyObject'; +import type { Key } from '../model/key'; import type { Languages } from '../model/languages'; import type { ListApiKeysResponse } from '../model/listApiKeysResponse'; import type { ListClustersResponse } from '../model/listClustersResponse'; import type { ListIndicesResponse } from '../model/listIndicesResponse'; import type { ListUserIdsResponse } from '../model/listUserIdsResponse'; import type { MultipleBatchResponse } from '../model/multipleBatchResponse'; -import type { MultipleQueriesObject } from '../model/multipleQueriesObject'; +import type { MultipleQueriesParams } from '../model/multipleQueriesParams'; import type { MultipleQueriesResponse } from '../model/multipleQueriesResponse'; -import type { OperationIndexObject } from '../model/operationIndexObject'; +import type { OperationIndexParams } from '../model/operationIndexParams'; import type { RemoveUserIdResponse } from '../model/removeUserIdResponse'; import type { ReplaceSourceResponse } from '../model/replaceSourceResponse'; import type { Rule } from '../model/rule'; @@ -44,7 +44,7 @@ import type { SearchResponse } from '../model/searchResponse'; import type { SearchRulesParams } from '../model/searchRulesParams'; import type { SearchRulesResponse } from '../model/searchRulesResponse'; import type { SearchSynonymsResponse } from '../model/searchSynonymsResponse'; -import type { SearchUserIdsObject } from '../model/searchUserIdsObject'; +import type { SearchUserIdsParams } from '../model/searchUserIdsParams'; import type { SearchUserIdsResponse } from '../model/searchUserIdsResponse'; import type { Source } from '../model/source'; import type { SynonymHit } from '../model/synonymHit'; @@ -168,15 +168,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (apiKey === null || apiKey === undefined) { + if (!apiKey) { throw new Error( - 'Required parameter apiKey was null or undefined when calling addApiKey.' + 'Parameter `apiKey` is required when calling `addApiKey`.' ); } - if (apiKey.acl === null || apiKey.acl === undefined) { + if (!apiKey.acl) { throw new Error( - 'Required parameter apiKey.acl was null or undefined when calling addApiKey.' + 'Parameter `apiKey.acl` is required when calling `addApiKey`.' ); } @@ -213,21 +213,21 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling addOrUpdateObject.' + 'Parameter `indexName` is required when calling `addOrUpdateObject`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling addOrUpdateObject.' + 'Parameter `objectID` is required when calling `addOrUpdateObject`.' ); } - if (body === null || body === undefined) { + if (!body) { throw new Error( - 'Required parameter body was null or undefined when calling addOrUpdateObject.' + 'Parameter `body` is required when calling `addOrUpdateObject`.' ); } @@ -255,9 +255,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (source === null || source === undefined) { + if (!source) { throw new Error( - 'Required parameter source was null or undefined when calling appendSource.' + 'Parameter `source` is required when calling `appendSource`.' ); } @@ -280,34 +280,31 @@ export class SearchApi { * @summary Assign or Move userID. * @param assignUserId - The assignUserId object. * @param assignUserId.xAlgoliaUserID - UserID to assign. - * @param assignUserId.assignUserIdObject - The assignUserIdObject object. + * @param assignUserId.assignUserIdParams - The assignUserIdParams object. */ assignUserId({ xAlgoliaUserID, - assignUserIdObject, + assignUserIdParams, }: AssignUserIdProps): Promise { const path = '/1/clusters/mapping'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (xAlgoliaUserID === null || xAlgoliaUserID === undefined) { + if (!xAlgoliaUserID) { throw new Error( - 'Required parameter xAlgoliaUserID was null or undefined when calling assignUserId.' + 'Parameter `xAlgoliaUserID` is required when calling `assignUserId`.' ); } - if (assignUserIdObject === null || assignUserIdObject === undefined) { + if (!assignUserIdParams) { throw new Error( - 'Required parameter assignUserIdObject was null or undefined when calling assignUserId.' + 'Parameter `assignUserIdParams` is required when calling `assignUserId`.' ); } - if ( - assignUserIdObject.cluster === null || - assignUserIdObject.cluster === undefined - ) { + if (!assignUserIdParams.cluster) { throw new Error( - 'Required parameter assignUserIdObject.cluster was null or undefined when calling assignUserId.' + 'Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.' ); } @@ -318,7 +315,7 @@ export class SearchApi { const request: Request = { method: 'POST', path, - data: assignUserIdObject, + data: assignUserIdParams, }; const requestOptions: RequestOptions = { @@ -334,9 +331,9 @@ export class SearchApi { * @summary Performs multiple write operations in a single API call. * @param batch - The batch object. * @param batch.indexName - The index in which to perform the request. - * @param batch.batchWriteObject - The batchWriteObject object. + * @param batch.batchWriteParams - The batchWriteParams object. */ - batch({ indexName, batchWriteObject }: BatchProps): Promise { + batch({ indexName, batchWriteParams }: BatchProps): Promise { const path = '/1/indexes/{indexName}/batch'.replace( '{indexName}', encodeURIComponent(String(indexName)) @@ -344,22 +341,22 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling batch.' + 'Parameter `indexName` is required when calling `batch`.' ); } - if (batchWriteObject === null || batchWriteObject === undefined) { + if (!batchWriteParams) { throw new Error( - 'Required parameter batchWriteObject was null or undefined when calling batch.' + 'Parameter `batchWriteParams` is required when calling `batch`.' ); } const request: Request = { method: 'POST', path, - data: batchWriteObject, + data: batchWriteParams, }; const requestOptions: RequestOptions = { @@ -375,45 +372,36 @@ export class SearchApi { * @summary Batch assign userIDs. * @param batchAssignUserIds - The batchAssignUserIds object. * @param batchAssignUserIds.xAlgoliaUserID - UserID to assign. - * @param batchAssignUserIds.batchAssignUserIdsObject - The batchAssignUserIdsObject object. + * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object. */ batchAssignUserIds({ xAlgoliaUserID, - batchAssignUserIdsObject, + batchAssignUserIdsParams, }: BatchAssignUserIdsProps): Promise { const path = '/1/clusters/mapping/batch'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (xAlgoliaUserID === null || xAlgoliaUserID === undefined) { + if (!xAlgoliaUserID) { throw new Error( - 'Required parameter xAlgoliaUserID was null or undefined when calling batchAssignUserIds.' + 'Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.' ); } - if ( - batchAssignUserIdsObject === null || - batchAssignUserIdsObject === undefined - ) { + if (!batchAssignUserIdsParams) { throw new Error( - 'Required parameter batchAssignUserIdsObject was null or undefined when calling batchAssignUserIds.' + 'Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.' ); } - if ( - batchAssignUserIdsObject.cluster === null || - batchAssignUserIdsObject.cluster === undefined - ) { + if (!batchAssignUserIdsParams.cluster) { throw new Error( - 'Required parameter batchAssignUserIdsObject.cluster was null or undefined when calling batchAssignUserIds.' + 'Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.' ); } - if ( - batchAssignUserIdsObject.users === null || - batchAssignUserIdsObject.users === undefined - ) { + if (!batchAssignUserIdsParams.users) { throw new Error( - 'Required parameter batchAssignUserIdsObject.users was null or undefined when calling batchAssignUserIds.' + 'Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.' ); } @@ -424,7 +412,7 @@ export class SearchApi { const request: Request = { method: 'POST', path, - data: batchAssignUserIdsObject, + data: batchAssignUserIdsParams, }; const requestOptions: RequestOptions = { @@ -453,27 +441,21 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (dictionaryName === null || dictionaryName === undefined) { + if (!dictionaryName) { throw new Error( - 'Required parameter dictionaryName was null or undefined when calling batchDictionaryEntries.' + 'Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.' ); } - if ( - batchDictionaryEntries === null || - batchDictionaryEntries === undefined - ) { + if (!batchDictionaryEntries) { throw new Error( - 'Required parameter batchDictionaryEntries was null or undefined when calling batchDictionaryEntries.' + 'Parameter `batchDictionaryEntries` is required when calling `batchDictionaryEntries`.' ); } - if ( - batchDictionaryEntries.requests === null || - batchDictionaryEntries.requests === undefined - ) { + if (!batchDictionaryEntries.requests) { throw new Error( - 'Required parameter batchDictionaryEntries.requests was null or undefined when calling batchDictionaryEntries.' + 'Parameter `batchDictionaryEntries.requests` is required when calling `batchDictionaryEntries`.' ); } @@ -513,15 +495,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling batchRules.' + 'Parameter `indexName` is required when calling `batchRules`.' ); } - if (rule === null || rule === undefined) { + if (!rule) { throw new Error( - 'Required parameter rule was null or undefined when calling batchRules.' + 'Parameter `rule` is required when calling `batchRules`.' ); } @@ -562,9 +544,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling browse.' + 'Parameter `indexName` is required when calling `browse`.' ); } @@ -600,9 +582,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling clearAllSynonyms.' + 'Parameter `indexName` is required when calling `clearAllSynonyms`.' ); } @@ -637,9 +619,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling clearObjects.' + 'Parameter `indexName` is required when calling `clearObjects`.' ); } @@ -674,9 +656,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling clearRules.' + 'Parameter `indexName` is required when calling `clearRules`.' ); } @@ -711,9 +693,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (key === null || key === undefined) { + if (!key) { throw new Error( - 'Required parameter key was null or undefined when calling deleteApiKey.' + 'Parameter `key` is required when calling `deleteApiKey`.' ); } @@ -748,15 +730,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling deleteBy.' + 'Parameter `indexName` is required when calling `deleteBy`.' ); } - if (searchParams === null || searchParams === undefined) { + if (!searchParams) { throw new Error( - 'Required parameter searchParams was null or undefined when calling deleteBy.' + 'Parameter `searchParams` is required when calling `deleteBy`.' ); } @@ -788,9 +770,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling deleteIndex.' + 'Parameter `indexName` is required when calling `deleteIndex`.' ); } @@ -824,15 +806,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling deleteObject.' + 'Parameter `indexName` is required when calling `deleteObject`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling deleteObject.' + 'Parameter `objectID` is required when calling `deleteObject`.' ); } @@ -868,15 +850,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling deleteRule.' + 'Parameter `indexName` is required when calling `deleteRule`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling deleteRule.' + 'Parameter `objectID` is required when calling `deleteRule`.' ); } @@ -911,9 +893,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (source === null || source === undefined) { + if (!source) { throw new Error( - 'Required parameter source was null or undefined when calling deleteSource.' + 'Parameter `source` is required when calling `deleteSource`.' ); } @@ -949,15 +931,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling deleteSynonym.' + 'Parameter `indexName` is required when calling `deleteSynonym`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling deleteSynonym.' + 'Parameter `objectID` is required when calling `deleteSynonym`.' ); } @@ -984,7 +966,7 @@ export class SearchApi { * @param getApiKey - The getApiKey object. * @param getApiKey.key - API Key string. */ - getApiKey({ key }: GetApiKeyProps): Promise { + getApiKey({ key }: GetApiKeyProps): Promise { const path = '/1/keys/{key}'.replace( '{key}', encodeURIComponent(String(key)) @@ -992,10 +974,8 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (key === null || key === undefined) { - throw new Error( - 'Required parameter key was null or undefined when calling getApiKey.' - ); + if (!key) { + throw new Error('Parameter `key` is required when calling `getApiKey`.'); } const request: Request = { @@ -1122,15 +1102,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling getObject.' + 'Parameter `indexName` is required when calling `getObject`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling getObject.' + 'Parameter `objectID` is required when calling `getObject`.' ); } @@ -1154,23 +1134,23 @@ export class SearchApi { * Retrieve one or more objects, potentially from different indices, in a single API call. * * @summary Retrieve one or more objects. - * @param getObjectsObject - The getObjectsObject object. + * @param getObjectsParams - The getObjectsParams object. */ - getObjects(getObjectsObject: GetObjectsObject): Promise { + getObjects(getObjectsParams: GetObjectsParams): Promise { const path = '/1/indexes/*/objects'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (getObjectsObject === null || getObjectsObject === undefined) { + if (!getObjectsParams) { throw new Error( - 'Required parameter getObjectsObject was null or undefined when calling getObjects.' + 'Parameter `getObjectsParams` is required when calling `getObjects`.' ); } const request: Request = { method: 'POST', path, - data: getObjectsObject, + data: getObjectsParams, }; const requestOptions: RequestOptions = { @@ -1195,15 +1175,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling getRule.' + 'Parameter `indexName` is required when calling `getRule`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling getRule.' + 'Parameter `objectID` is required when calling `getRule`.' ); } @@ -1234,9 +1214,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling getSettings.' + 'Parameter `indexName` is required when calling `getSettings`.' ); } @@ -1289,15 +1269,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling getSynonym.' + 'Parameter `indexName` is required when calling `getSynonym`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling getSynonym.' + 'Parameter `objectID` is required when calling `getSynonym`.' ); } @@ -1328,16 +1308,14 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling getTask.' + 'Parameter `indexName` is required when calling `getTask`.' ); } - if (taskID === null || taskID === undefined) { - throw new Error( - 'Required parameter taskID was null or undefined when calling getTask.' - ); + if (!taskID) { + throw new Error('Parameter `taskID` is required when calling `getTask`.'); } const request: Request = { @@ -1389,9 +1367,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (userID === null || userID === undefined) { + if (!userID) { throw new Error( - 'Required parameter userID was null or undefined when calling getUserId.' + 'Parameter `userID` is required when calling `getUserId`.' ); } @@ -1549,23 +1527,23 @@ export class SearchApi { * Perform multiple write operations, potentially targeting multiple indices, in a single API call. * * @summary Perform multiple write operations. - * @param batchObject - The batchObject object. + * @param batchParams - The batchParams object. */ - multipleBatch(batchObject: BatchObject): Promise { + multipleBatch(batchParams: BatchParams): Promise { const path = '/1/indexes/*/batch'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (batchObject === null || batchObject === undefined) { + if (!batchParams) { throw new Error( - 'Required parameter batchObject was null or undefined when calling multipleBatch.' + 'Parameter `batchParams` is required when calling `multipleBatch`.' ); } const request: Request = { method: 'POST', path, - data: batchObject, + data: batchParams, }; const requestOptions: RequestOptions = { @@ -1579,34 +1557,31 @@ export class SearchApi { * Get search results for the given requests. * * @summary Get search results for the given requests. - * @param multipleQueriesObject - The multipleQueriesObject object. + * @param multipleQueriesParams - The multipleQueriesParams object. */ multipleQueries( - multipleQueriesObject: MultipleQueriesObject + multipleQueriesParams: MultipleQueriesParams ): Promise { const path = '/1/indexes/*/queries'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (multipleQueriesObject === null || multipleQueriesObject === undefined) { + if (!multipleQueriesParams) { throw new Error( - 'Required parameter multipleQueriesObject was null or undefined when calling multipleQueries.' + 'Parameter `multipleQueriesParams` is required when calling `multipleQueries`.' ); } - if ( - multipleQueriesObject.requests === null || - multipleQueriesObject.requests === undefined - ) { + if (!multipleQueriesParams.requests) { throw new Error( - 'Required parameter multipleQueriesObject.requests was null or undefined when calling multipleQueries.' + 'Parameter `multipleQueriesParams.requests` is required when calling `multipleQueries`.' ); } const request: Request = { method: 'POST', path, - data: multipleQueriesObject, + data: multipleQueriesParams, }; const requestOptions: RequestOptions = { @@ -1622,11 +1597,11 @@ export class SearchApi { * @summary Copy/move index. * @param operationIndex - The operationIndex object. * @param operationIndex.indexName - The index in which to perform the request. - * @param operationIndex.operationIndexObject - The operationIndexObject object. + * @param operationIndex.operationIndexParams - The operationIndexParams object. */ operationIndex({ indexName, - operationIndexObject, + operationIndexParams, }: OperationIndexProps): Promise { const path = '/1/indexes/{indexName}/operation'.replace( '{indexName}', @@ -1635,39 +1610,33 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling operationIndex.' + 'Parameter `indexName` is required when calling `operationIndex`.' ); } - if (operationIndexObject === null || operationIndexObject === undefined) { + if (!operationIndexParams) { throw new Error( - 'Required parameter operationIndexObject was null or undefined when calling operationIndex.' + 'Parameter `operationIndexParams` is required when calling `operationIndex`.' ); } - if ( - operationIndexObject.operation === null || - operationIndexObject.operation === undefined - ) { + if (!operationIndexParams.operation) { throw new Error( - 'Required parameter operationIndexObject.operation was null or undefined when calling operationIndex.' + 'Parameter `operationIndexParams.operation` is required when calling `operationIndex`.' ); } - if ( - operationIndexObject.destination === null || - operationIndexObject.destination === undefined - ) { + if (!operationIndexParams.destination) { throw new Error( - 'Required parameter operationIndexObject.destination was null or undefined when calling operationIndex.' + 'Parameter `operationIndexParams.destination` is required when calling `operationIndex`.' ); } const request: Request = { method: 'POST', path, - data: operationIndexObject, + data: operationIndexParams, }; const requestOptions: RequestOptions = { @@ -1699,24 +1668,21 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling partialUpdateObject.' + 'Parameter `indexName` is required when calling `partialUpdateObject`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling partialUpdateObject.' + 'Parameter `objectID` is required when calling `partialUpdateObject`.' ); } - if ( - stringBuiltInOperation === null || - stringBuiltInOperation === undefined - ) { + if (!stringBuiltInOperation) { throw new Error( - 'Required parameter stringBuiltInOperation was null or undefined when calling partialUpdateObject.' + 'Parameter `stringBuiltInOperation` is required when calling `partialUpdateObject`.' ); } @@ -1752,9 +1718,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (userID === null || userID === undefined) { + if (!userID) { throw new Error( - 'Required parameter userID was null or undefined when calling removeUserId.' + 'Parameter `userID` is required when calling `removeUserId`.' ); } @@ -1784,9 +1750,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (source === null || source === undefined) { + if (!source) { throw new Error( - 'Required parameter source was null or undefined when calling replaceSources.' + 'Parameter `source` is required when calling `replaceSources`.' ); } @@ -1818,9 +1784,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (key === null || key === undefined) { + if (!key) { throw new Error( - 'Required parameter key was null or undefined when calling restoreApiKey.' + 'Parameter `key` is required when calling `restoreApiKey`.' ); } @@ -1842,7 +1808,7 @@ export class SearchApi { * @summary Add an object to the index. * @param saveObject - The saveObject object. * @param saveObject.indexName - The index in which to perform the request. - * @param saveObject.body - The Algolia object. + * @param saveObject.body - The Algolia record. */ saveObject({ indexName, @@ -1855,15 +1821,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling saveObject.' + 'Parameter `indexName` is required when calling `saveObject`.' ); } - if (body === null || body === undefined) { + if (!body) { throw new Error( - 'Required parameter body was null or undefined when calling saveObject.' + 'Parameter `body` is required when calling `saveObject`.' ); } @@ -1902,32 +1868,30 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling saveRule.' + 'Parameter `indexName` is required when calling `saveRule`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling saveRule.' + 'Parameter `objectID` is required when calling `saveRule`.' ); } - if (rule === null || rule === undefined) { - throw new Error( - 'Required parameter rule was null or undefined when calling saveRule.' - ); + if (!rule) { + throw new Error('Parameter `rule` is required when calling `saveRule`.'); } - if (rule.objectID === null || rule.objectID === undefined) { + if (!rule.objectID) { throw new Error( - 'Required parameter rule.objectID was null or undefined when calling saveRule.' + 'Parameter `rule.objectID` is required when calling `saveRule`.' ); } - if (rule.consequence === null || rule.consequence === undefined) { + if (!rule.consequence) { throw new Error( - 'Required parameter rule.consequence was null or undefined when calling saveRule.' + 'Parameter `rule.consequence` is required when calling `saveRule`.' ); } @@ -1970,32 +1934,32 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling saveSynonym.' + 'Parameter `indexName` is required when calling `saveSynonym`.' ); } - if (objectID === null || objectID === undefined) { + if (!objectID) { throw new Error( - 'Required parameter objectID was null or undefined when calling saveSynonym.' + 'Parameter `objectID` is required when calling `saveSynonym`.' ); } - if (synonymHit === null || synonymHit === undefined) { + if (!synonymHit) { throw new Error( - 'Required parameter synonymHit was null or undefined when calling saveSynonym.' + 'Parameter `synonymHit` is required when calling `saveSynonym`.' ); } - if (synonymHit.objectID === null || synonymHit.objectID === undefined) { + if (!synonymHit.objectID) { throw new Error( - 'Required parameter synonymHit.objectID was null or undefined when calling saveSynonym.' + 'Parameter `synonymHit.objectID` is required when calling `saveSynonym`.' ); } - if (synonymHit.type === null || synonymHit.type === undefined) { + if (!synonymHit.type) { throw new Error( - 'Required parameter synonymHit.type was null or undefined when calling saveSynonym.' + 'Parameter `synonymHit.type` is required when calling `saveSynonym`.' ); } @@ -2039,15 +2003,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling saveSynonyms.' + 'Parameter `indexName` is required when calling `saveSynonyms`.' ); } - if (synonymHit === null || synonymHit === undefined) { + if (!synonymHit) { throw new Error( - 'Required parameter synonymHit was null or undefined when calling saveSynonyms.' + 'Parameter `synonymHit` is required when calling `saveSynonyms`.' ); } @@ -2089,15 +2053,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling search.' + 'Parameter `indexName` is required when calling `search`.' ); } - if (searchParams === null || searchParams === undefined) { + if (!searchParams) { throw new Error( - 'Required parameter searchParams was null or undefined when calling search.' + 'Parameter `searchParams` is required when calling `search`.' ); } @@ -2133,27 +2097,21 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (dictionaryName === null || dictionaryName === undefined) { + if (!dictionaryName) { throw new Error( - 'Required parameter dictionaryName was null or undefined when calling searchDictionaryEntries.' + 'Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.' ); } - if ( - searchDictionaryEntries === null || - searchDictionaryEntries === undefined - ) { + if (!searchDictionaryEntries) { throw new Error( - 'Required parameter searchDictionaryEntries was null or undefined when calling searchDictionaryEntries.' + 'Parameter `searchDictionaryEntries` is required when calling `searchDictionaryEntries`.' ); } - if ( - searchDictionaryEntries.query === null || - searchDictionaryEntries.query === undefined - ) { + if (!searchDictionaryEntries.query) { throw new Error( - 'Required parameter searchDictionaryEntries.query was null or undefined when calling searchDictionaryEntries.' + 'Parameter `searchDictionaryEntries.query` is required when calling `searchDictionaryEntries`.' ); } @@ -2190,15 +2148,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling searchForFacetValues.' + 'Parameter `indexName` is required when calling `searchForFacetValues`.' ); } - if (facetName === null || facetName === undefined) { + if (!facetName) { throw new Error( - 'Required parameter facetName was null or undefined when calling searchForFacetValues.' + 'Parameter `facetName` is required when calling `searchForFacetValues`.' ); } @@ -2234,15 +2192,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling searchRules.' + 'Parameter `indexName` is required when calling `searchRules`.' ); } - if (searchRulesParams === null || searchRulesParams === undefined) { + if (!searchRulesParams) { throw new Error( - 'Required parameter searchRulesParams was null or undefined when calling searchRules.' + 'Parameter `searchRulesParams` is required when calling `searchRules`.' ); } @@ -2284,9 +2242,9 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling searchSynonyms.' + 'Parameter `indexName` is required when calling `searchSynonyms`.' ); } @@ -2322,34 +2280,31 @@ export class SearchApi { * Search for userIDs. The data returned will usually be a few seconds behind real time, because userID usage may take up to a few seconds propagate to the different clusters. To keep updates moving quickly, the index of userIDs isn\'t built synchronously with the mapping. Instead, the index is built once every 12h, at the same time as the update of userID usage. For example, when you perform a modification like adding or moving a userID, the search will report an outdated value until the next rebuild of the mapping, which takes place every 12h. Upon success, the response is 200 OK and contains the following userIDs data. * * @summary Search userID. - * @param searchUserIdsObject - The searchUserIdsObject object. + * @param searchUserIdsParams - The searchUserIdsParams object. */ searchUserIds( - searchUserIdsObject: SearchUserIdsObject + searchUserIdsParams: SearchUserIdsParams ): Promise { const path = '/1/clusters/mapping/search'; const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (searchUserIdsObject === null || searchUserIdsObject === undefined) { + if (!searchUserIdsParams) { throw new Error( - 'Required parameter searchUserIdsObject was null or undefined when calling searchUserIds.' + 'Parameter `searchUserIdsParams` is required when calling `searchUserIds`.' ); } - if ( - searchUserIdsObject.query === null || - searchUserIdsObject.query === undefined - ) { + if (!searchUserIdsParams.query) { throw new Error( - 'Required parameter searchUserIdsObject.query was null or undefined when calling searchUserIds.' + 'Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.' ); } const request: Request = { method: 'POST', path, - data: searchUserIdsObject, + data: searchUserIdsParams, }; const requestOptions: RequestOptions = { @@ -2372,21 +2327,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if ( - dictionarySettingsRequest === null || - dictionarySettingsRequest === undefined - ) { + if (!dictionarySettingsRequest) { throw new Error( - 'Required parameter dictionarySettingsRequest was null or undefined when calling setDictionarySettings.' + 'Parameter `dictionarySettingsRequest` is required when calling `setDictionarySettings`.' ); } - if ( - dictionarySettingsRequest.disableStandardEntries === null || - dictionarySettingsRequest.disableStandardEntries === undefined - ) { + if (!dictionarySettingsRequest.disableStandardEntries) { throw new Error( - 'Required parameter dictionarySettingsRequest.disableStandardEntries was null or undefined when calling setDictionarySettings.' + 'Parameter `dictionarySettingsRequest.disableStandardEntries` is required when calling `setDictionarySettings`.' ); } @@ -2424,15 +2373,15 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (indexName === null || indexName === undefined) { + if (!indexName) { throw new Error( - 'Required parameter indexName was null or undefined when calling setSettings.' + 'Parameter `indexName` is required when calling `setSettings`.' ); } - if (indexSettings === null || indexSettings === undefined) { + if (!indexSettings) { throw new Error( - 'Required parameter indexSettings was null or undefined when calling setSettings.' + 'Parameter `indexSettings` is required when calling `setSettings`.' ); } @@ -2472,21 +2421,21 @@ export class SearchApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (key === null || key === undefined) { + if (!key) { throw new Error( - 'Required parameter key was null or undefined when calling updateApiKey.' + 'Parameter `key` is required when calling `updateApiKey`.' ); } - if (apiKey === null || apiKey === undefined) { + if (!apiKey) { throw new Error( - 'Required parameter apiKey was null or undefined when calling updateApiKey.' + 'Parameter `apiKey` is required when calling `updateApiKey`.' ); } - if (apiKey.acl === null || apiKey.acl === undefined) { + if (!apiKey.acl) { throw new Error( - 'Required parameter apiKey.acl was null or undefined when calling updateApiKey.' + 'Parameter `apiKey.acl` is required when calling `updateApiKey`.' ); } @@ -2525,7 +2474,7 @@ export type AssignUserIdProps = { * UserID to assign. */ xAlgoliaUserID: string; - assignUserIdObject: AssignUserIdObject; + assignUserIdParams: AssignUserIdParams; }; export type BatchProps = { @@ -2533,7 +2482,7 @@ export type BatchProps = { * The index in which to perform the request. */ indexName: string; - batchWriteObject: BatchWriteObject; + batchWriteParams: BatchWriteParams; }; export type BatchAssignUserIdsProps = { @@ -2541,7 +2490,7 @@ export type BatchAssignUserIdsProps = { * UserID to assign. */ xAlgoliaUserID: string; - batchAssignUserIdsObject: BatchAssignUserIdsObject; + batchAssignUserIdsParams: BatchAssignUserIdsParams; }; export type BatchDictionaryEntriesProps = { @@ -2793,7 +2742,7 @@ export type OperationIndexProps = { * The index in which to perform the request. */ indexName: string; - operationIndexObject: OperationIndexObject; + operationIndexParams: OperationIndexParams; }; export type PartialUpdateObjectProps = { @@ -2842,7 +2791,7 @@ export type SaveObjectProps = { */ indexName: string; /** - * The Algolia object. + * The Algolia record. */ body: Record; }; diff --git a/clients/algoliasearch-client-javascript/recommend/model/recommendRecord.ts b/clients/algoliasearch-client-javascript/recommend/model/recommendHit.ts similarity index 88% rename from clients/algoliasearch-client-javascript/recommend/model/recommendRecord.ts rename to clients/algoliasearch-client-javascript/recommend/model/recommendHit.ts index a3d3e7601e..188522c9c5 100644 --- a/clients/algoliasearch-client-javascript/recommend/model/recommendRecord.ts +++ b/clients/algoliasearch-client-javascript/recommend/model/recommendHit.ts @@ -3,9 +3,9 @@ import type { RankingInfo } from './rankingInfo'; import type { SnippetResult } from './snippetResult'; /** - * A Recommend record. + * A Recommend hit. */ -export type RecommendRecord = { +export type RecommendHit = { /** * Unique identifier of the object. */ diff --git a/clients/algoliasearch-client-javascript/recommend/model/recommendHits.ts b/clients/algoliasearch-client-javascript/recommend/model/recommendHits.ts index 81d48c4a82..e584f40fc0 100644 --- a/clients/algoliasearch-client-javascript/recommend/model/recommendHits.ts +++ b/clients/algoliasearch-client-javascript/recommend/model/recommendHits.ts @@ -1,5 +1,5 @@ -import type { RecommendRecord } from './recommendRecord'; +import type { RecommendHit } from './recommendHit'; export type RecommendHits = { - hits?: RecommendRecord[]; + hits?: RecommendHit[]; }; diff --git a/clients/algoliasearch-client-javascript/recommend/src/recommendApi.ts b/clients/algoliasearch-client-javascript/recommend/src/recommendApi.ts index e542d41916..c711728eb9 100644 --- a/clients/algoliasearch-client-javascript/recommend/src/recommendApi.ts +++ b/clients/algoliasearch-client-javascript/recommend/src/recommendApi.ts @@ -117,18 +117,15 @@ export class RecommendApi { const headers: Headers = { Accept: 'application/json' }; const queryParameters: Record = {}; - if (getRecommendations === null || getRecommendations === undefined) { + if (!getRecommendations) { throw new Error( - 'Required parameter getRecommendations was null or undefined when calling getRecommendations.' + 'Parameter `getRecommendations` is required when calling `getRecommendations`.' ); } - if ( - getRecommendations.requests === null || - getRecommendations.requests === undefined - ) { + if (!getRecommendations.requests) { throw new Error( - 'Required parameter getRecommendations.requests was null or undefined when calling getRecommendations.' + 'Parameter `getRecommendations.requests` is required when calling `getRecommendations`.' ); } diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml index 47932173f1..fc6a62157a 100644 --- a/specs/common/schemas/IndexSettings.yml +++ b/specs/common/schemas/IndexSettings.yml @@ -66,9 +66,7 @@ baseIndexSettings: description: List of numeric attributes that can be used as numerical filters. default: [] userData: - type: object - description: Lets you store custom data in your indices. - default: {} + $ref: '#/userData' indexSettingsAsSearchParams: type: object @@ -306,3 +304,8 @@ hitsPerPage: type: integer description: Set the number of hits per page. default: 20 + +userData: + type: object + description: Lets you store custom data in your indices. + default: {} diff --git a/specs/personalization/common/schemas/personalizationStrategy.yml b/specs/personalization/common/schemas/personalizationStrategy.yml index f772c1342b..219dbabb86 100644 --- a/specs/personalization/common/schemas/personalizationStrategy.yml +++ b/specs/personalization/common/schemas/personalizationStrategy.yml @@ -1,4 +1,4 @@ -personalizationStrategyObject: +personalizationStrategyParams: type: object additionalProperties: false required: @@ -20,7 +20,7 @@ personalizationStrategyObject: type: integer description: 'The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled).' -# props +# misc score: type: integer description: The score for the event. diff --git a/specs/personalization/paths/personalizationStrategy.yml b/specs/personalization/paths/personalizationStrategy.yml index f41b66e22d..c1eee12383 100644 --- a/specs/personalization/paths/personalizationStrategy.yml +++ b/specs/personalization/paths/personalizationStrategy.yml @@ -9,7 +9,7 @@ post: content: application/json: schema: - $ref: '../common/schemas/personalizationStrategy.yml#/personalizationStrategyObject' + $ref: '../common/schemas/personalizationStrategy.yml#/personalizationStrategyParams' responses: '200': description: OK @@ -45,7 +45,7 @@ get: content: application/json: schema: - $ref: '../common/schemas/personalizationStrategy.yml#/personalizationStrategyObject' + $ref: '../common/schemas/personalizationStrategy.yml#/personalizationStrategyParams' '400': $ref: ../../common/responses/BadRequest.yml '402': diff --git a/specs/query-suggestions/common/parameters.yml b/specs/query-suggestions/common/parameters.yml index eed470b9b3..a60aa6f940 100644 --- a/specs/query-suggestions/common/parameters.yml +++ b/specs/query-suggestions/common/parameters.yml @@ -5,40 +5,19 @@ SourceIndex: - indexName properties: indexName: - type: string - description: Source index name. + $ref: '#/indexName' analyticsTags: - type: array - items: - type: string - default: [] - description: List of analytics tags to filter the popular searches per tag. + $ref: '#/analyticsTags' facets: - type: array - items: - type: object - default: [] - description: List of facets to define as categories for the query suggestions. + $ref: '#/facets' minHits: - type: integer - description: Minimum number of hits (e.g., matching records in the source index) to generate a suggestions. + $ref: '#/minHits' minLetters: - type: integer - description: Minimum number of required letters for a suggestion to remain. + $ref: '#/minLetters' generate: - type: array - items: - type: array - items: - type: string - default: [] - description: List of facet attributes used to generate Query Suggestions. The resulting suggestions are every combination of the facets in the nested list (e.g., (facetA and facetB) and facetC). - example: [[facetA, facetB], [facetC]] + $ref: '#/generate' external: - type: array - items: - $ref: '#/SourceIndexExternal' - description: List of external indices to use to generate custom Query Suggestions. + $ref: '#/external' SourceIndexExternal: type: object @@ -91,3 +70,45 @@ QuerySuggestionsIndexWithIndexParam: indexName: type: string description: Index name to target. + +indexName: + type: string + description: Source index name. + +analyticsTags: + type: array + items: + type: string + default: [] + description: List of analytics tags to filter the popular searches per tag. + +facets: + type: array + items: + type: object + default: [] + description: List of facets to define as categories for the query suggestions. + +minHits: + type: integer + description: Minimum number of hits (e.g., matching records in the source index) to generate a suggestions. + +minLetters: + type: integer + description: Minimum number of required letters for a suggestion to remain. + +generate: + type: array + items: + type: array + items: + type: string + default: [] + description: List of facet attributes used to generate Query Suggestions. The resulting suggestions are every combination of the facets in the nested list (e.g., (facetA and facetB) and facetC). + example: [[facetA, facetB], [facetC]] + +external: + type: array + items: + $ref: '#/SourceIndexExternal' + description: List of external indices to use to generate custom Query Suggestions. diff --git a/specs/query-suggestions/common/schemas/QuerySuggestionsIndex.yml b/specs/query-suggestions/common/schemas/QuerySuggestionsIndex.yml index 07ca544d67..c5751d173c 100644 --- a/specs/query-suggestions/common/schemas/QuerySuggestionsIndex.yml +++ b/specs/query-suggestions/common/schemas/QuerySuggestionsIndex.yml @@ -23,12 +23,19 @@ QuerySuggestionsIndex: type: string description: List of words and patterns to exclude from the Query Suggestions index. -SourceIndexWithReplicas: +SourceIndicesWithReplicas: + type: array + description: List of source indices used to generate a Query Suggestions index. + items: + $ref: '#/SourceIndiceWithReplicas' + +SourceIndiceWithReplicas: type: object additionalProperties: false + description: Source indice with replicas used to generate a Query Suggestions index. required: - - indexName - replicas + - indexName - analyticsTags - facets - minHits @@ -36,26 +43,20 @@ SourceIndexWithReplicas: - generate - external properties: - indexName: - $ref: ../parameters.yml#/SourceIndex/properties/indexName replicas: type: boolean description: true if the Query Suggestions index is a replicas. + indexName: + $ref: '../parameters.yml#/indexName' analyticsTags: - $ref: ../parameters.yml#/SourceIndex/properties/analyticsTags + $ref: '../parameters.yml#/analyticsTags' facets: - $ref: ../parameters.yml#/SourceIndex/properties/facets + $ref: '../parameters.yml#/facets' minHits: - $ref: ../parameters.yml#/SourceIndex/properties/minHits + $ref: '../parameters.yml#/minHits' minLetters: - $ref: ../parameters.yml#/SourceIndex/properties/minLetters + $ref: '../parameters.yml#/minLetters' generate: - $ref: ../parameters.yml#/SourceIndex/properties/generate + $ref: '../parameters.yml#/generate' external: - $ref: ../parameters.yml#/SourceIndex/properties/external - -SourceIndicesWithReplicas: - type: array - items: - $ref: '#/SourceIndexWithReplicas' - description: List of source indices used to generate a Query Suggestions index. + $ref: '../parameters.yml#/external' diff --git a/specs/recommend/common/schemas/RecommendationsResponse.yml b/specs/recommend/common/schemas/RecommendationsResponse.yml index ec55b1bd71..ea8d118251 100644 --- a/specs/recommend/common/schemas/RecommendationsResponse.yml +++ b/specs/recommend/common/schemas/RecommendationsResponse.yml @@ -10,11 +10,11 @@ recommendHits: hits: type: array items: - $ref: '#/recommendRecord' + $ref: '#/recommendHit' -recommendRecord: +recommendHit: type: object - description: A Recommend record. + description: A Recommend hit. additionalProperties: true required: - objectID @@ -23,13 +23,13 @@ recommendRecord: objectID: $ref: '../../../common/parameters.yml#/objectID' _highlightResult: - $ref: '../../../search/common/schemas/Record.yml#/highlightResult' + $ref: '../../../search/common/schemas/Hit.yml#/highlightResult' _snippetResult: - $ref: '../../../search/common/schemas/Record.yml#/snippetResult' + $ref: '../../../search/common/schemas/Hit.yml#/snippetResult' _rankingInfo: - $ref: '../../../search/common/schemas/Record.yml#/rankingInfo' + $ref: '../../../search/common/schemas/Hit.yml#/rankingInfo' _distinctSeqID: - $ref: '../../../search/common/schemas/Record.yml#/record/properties/_distinctSeqID' + $ref: '../../../search/common/schemas/Hit.yml#/_distinctSeqID' _score: type: number format: double diff --git a/specs/search/common/parameters.yml b/specs/search/common/parameters.yml index d2c1fd7bae..c86539a4d0 100644 --- a/specs/search/common/parameters.yml +++ b/specs/search/common/parameters.yml @@ -31,3 +31,5 @@ UserIDInPath: userID: type: string pattern: '^[a-zA-Z0-9 \-*.]+$' + description: userID of the user. + example: user1 diff --git a/specs/search/common/schemas/Record.yml b/specs/search/common/schemas/Hit.yml similarity index 96% rename from specs/search/common/schemas/Record.yml rename to specs/search/common/schemas/Hit.yml index 022da56133..819041769a 100644 --- a/specs/search/common/schemas/Record.yml +++ b/specs/search/common/schemas/Hit.yml @@ -1,6 +1,6 @@ -record: +hit: type: object - description: A single record. + description: A single hit. additionalProperties: true required: - objectID @@ -14,9 +14,12 @@ record: _rankingInfo: $ref: '#/rankingInfo' _distinctSeqID: - type: integer + $ref: '#/_distinctSeqID' # Props +_distinctSeqID: + type: integer + highlightResult: type: object description: Highlighted attributes. diff --git a/specs/search/common/schemas/SearchResponse.yml b/specs/search/common/schemas/SearchResponse.yml index a673723bae..3acd1a8c0c 100644 --- a/specs/search/common/schemas/SearchResponse.yml +++ b/specs/search/common/schemas/SearchResponse.yml @@ -25,7 +25,7 @@ searchHits: hits: type: array items: - $ref: 'Record.yml#/record' + $ref: 'Hit.yml#/hit' baseSearchResponse: type: object @@ -134,7 +134,7 @@ baseSearchResponse: type: string description: Actual host name of the server that processed the request. userData: - $ref: '../../../common/schemas/IndexSettings.yml#/baseIndexSettings/properties/userData' + $ref: '../../../common/schemas/IndexSettings.yml#/userData' nbHits: type: integer diff --git a/specs/search/common/schemas/UserId.yml b/specs/search/common/schemas/UserId.yml index ab9e8e2442..9d175bb290 100644 --- a/specs/search/common/schemas/UserId.yml +++ b/specs/search/common/schemas/UserId.yml @@ -4,9 +4,7 @@ userId: description: A userID. properties: userID: - type: string - description: userID of the user. - example: user1 + $ref: '../../common/parameters.yml#/userID' clusterName: type: string description: Cluster on which the user is assigned. diff --git a/specs/search/common/schemas/listIndicesResponse.yml b/specs/search/common/schemas/listIndicesResponse.yml index 347386605c..f28c0163e8 100644 --- a/specs/search/common/schemas/listIndicesResponse.yml +++ b/specs/search/common/schemas/listIndicesResponse.yml @@ -6,13 +6,13 @@ listIndicesResponse: type: array description: List of the fetched indices. items: - $ref: '#/index' + $ref: '#/indice' nbPages: type: integer description: Number of pages. example: 100 -index: +indice: type: object additionalProperties: false properties: diff --git a/specs/search/paths/keys/common/schemas.yml b/specs/search/paths/keys/common/schemas.yml index db5070043a..50d93846e9 100644 --- a/specs/search/paths/keys/common/schemas.yml +++ b/specs/search/paths/keys/common/schemas.yml @@ -72,7 +72,7 @@ createdAtObject: createdAt: $ref: '../../../../common/parameters.yml#/createdAt' -keyObject: +key: allOf: - $ref: '#/apiKey' - $ref: '#/createdAtObject' diff --git a/specs/search/paths/keys/key.yml b/specs/search/paths/keys/key.yml index 18679d4102..12840f84f4 100644 --- a/specs/search/paths/keys/key.yml +++ b/specs/search/paths/keys/key.yml @@ -52,7 +52,7 @@ get: content: application/json: schema: - $ref: 'common/schemas.yml#/keyObject' + $ref: 'common/schemas.yml#/key' '400': $ref: ../../../common/responses/BadRequest.yml '402': diff --git a/specs/search/paths/keys/keys.yml b/specs/search/paths/keys/keys.yml index bc10b68b22..60d29a7a1a 100644 --- a/specs/search/paths/keys/keys.yml +++ b/specs/search/paths/keys/keys.yml @@ -48,7 +48,7 @@ get: type: array description: List of api keys. items: - $ref: 'common/schemas.yml#/keyObject' + $ref: 'common/schemas.yml#/key' '400': $ref: ../../../common/responses/BadRequest.yml '402': diff --git a/specs/search/paths/manage_indices/operationIndex.yml b/specs/search/paths/manage_indices/operationIndex.yml index cf44603afa..c75539ca6f 100644 --- a/specs/search/paths/manage_indices/operationIndex.yml +++ b/specs/search/paths/manage_indices/operationIndex.yml @@ -11,7 +11,7 @@ post: content: application/json: schema: - title: operationIndexObject + title: operationIndexParams type: object additionalProperties: false properties: diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index 68620b8296..568e65bc35 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -16,9 +16,9 @@ post: content: application/json: schema: - title: batchAssignUserIdsObject + title: batchAssignUserIdsParams type: object - description: Assign userID object. + description: Assign userID parameters. additionalProperties: false properties: cluster: diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index 05a886bddd..53e06e6961 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -16,7 +16,7 @@ post: content: application/json: schema: - title: searchUserIdsObject + title: searchUserIdsParams type: object description: OK additionalProperties: false @@ -49,7 +49,7 @@ post: type: object properties: userID: - $ref: '../../common/schemas/UserId.yml#/userId/properties/userID' + $ref: '../../common/parameters.yml#/userID' clusterName: $ref: '../../common/schemas/Cluster.yml#/clusterName' nbRecords: @@ -63,9 +63,9 @@ post: type: object properties: userID: - $ref: '../../common/schemas/Record.yml#/highlightResult' + $ref: '../../common/schemas/Hit.yml#/highlightResult' clusterName: - $ref: '../../common/schemas/Record.yml#/highlightResult' + $ref: '../../common/schemas/Hit.yml#/highlightResult' required: - userID - clusterName diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index 6cf1388a91..3909f26232 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -18,9 +18,9 @@ post: content: application/json: schema: - title: assignUserIdObject + title: assignUserIdParams type: object - description: Assign userID object. + description: Assign userID parameters. additionalProperties: false properties: cluster: diff --git a/specs/search/paths/objects/batch.yml b/specs/search/paths/objects/batch.yml index 36c5caac7a..d892d04bb4 100644 --- a/specs/search/paths/objects/batch.yml +++ b/specs/search/paths/objects/batch.yml @@ -11,8 +11,8 @@ post: content: application/json: schema: - title: batchWriteObject - description: The `batch` requests. + title: batchWriteParams + description: The `batch` parameters. type: object additionalProperties: false properties: diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml index 44cd60e7af..98f458a75e 100644 --- a/specs/search/paths/objects/multipleBatch.yml +++ b/specs/search/paths/objects/multipleBatch.yml @@ -9,8 +9,8 @@ post: content: application/json: schema: - title: batchObject - description: The `batch` requests. + title: batchParams + description: The `multipleBatch` parameters. type: object additionalProperties: false properties: diff --git a/specs/search/paths/objects/multipleGetObjects.yml b/specs/search/paths/objects/multipleGetObjects.yml index 50337fe665..70cecc66c3 100644 --- a/specs/search/paths/objects/multipleGetObjects.yml +++ b/specs/search/paths/objects/multipleGetObjects.yml @@ -10,16 +10,16 @@ post: content: application/json: schema: - title: getObjectsObject - description: The `getObjects` requests. + title: getObjectsParams + description: The `getObjects` parameters. type: object additionalProperties: false properties: requests: type: array items: - description: GetObject operation on an index. - title: multipleGetObjectsObject + description: getObjects operation on an index. + title: multipleGetObjectsParams type: object additionalProperties: false required: diff --git a/specs/search/paths/objects/objects.yml b/specs/search/paths/objects/objects.yml index fc75d97bfc..28db949949 100644 --- a/specs/search/paths/objects/objects.yml +++ b/specs/search/paths/objects/objects.yml @@ -8,7 +8,7 @@ post: - $ref: '../../../common/parameters.yml#/IndexName' requestBody: required: true - description: The Algolia object. + description: The Algolia record. content: application/json: schema: diff --git a/specs/search/paths/search/multipleQueries.yml b/specs/search/paths/search/multipleQueries.yml index fd98a49f84..b008b5c469 100644 --- a/specs/search/paths/search/multipleQueries.yml +++ b/specs/search/paths/search/multipleQueries.yml @@ -10,7 +10,7 @@ post: content: application/json: schema: - title: multipleQueriesObject + title: multipleQueriesParams type: object additionalProperties: false properties: diff --git a/specs/search/paths/search/searchForFacetValues.yml b/specs/search/paths/search/searchForFacetValues.yml index 26dd0bc509..cf05495fca 100644 --- a/specs/search/paths/search/searchForFacetValues.yml +++ b/specs/search/paths/search/searchForFacetValues.yml @@ -54,7 +54,7 @@ post: description: Raw value of the facet. type: string highlighted: - $ref: '../../common/schemas/Record.yml#/highlightedValue' + $ref: '../../common/schemas/Hit.yml#/highlightedValue' count: description: How many objects contain this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the counts may not be exhaustive. type: integer diff --git a/specs/search/paths/synonyms/common/schemas.yml b/specs/search/paths/synonyms/common/schemas.yml index ff1ce5dde5..182e27a255 100644 --- a/specs/search/paths/synonyms/common/schemas.yml +++ b/specs/search/paths/synonyms/common/schemas.yml @@ -52,11 +52,11 @@ synonymHit: additionalProperties: false properties: type: - $ref: '../../../common/schemas/Record.yml#/highlightResult' + $ref: '../../../common/schemas/Hit.yml#/highlightResult' synonyms: type: array items: - $ref: '../../../common/schemas/Record.yml#/highlightResult' + $ref: '../../../common/schemas/Hit.yml#/highlightResult' required: - objectID - type diff --git a/templates/javascript/api-single.mustache b/templates/javascript/api-single.mustache index 7f6bdf6503..6fb1cd3ea3 100644 --- a/templates/javascript/api-single.mustache +++ b/templates/javascript/api-single.mustache @@ -225,14 +225,14 @@ export class {{classname}} { {{#allParams}} {{#required}} - if ({{paramName}} === null || {{paramName}} === undefined) { - throw new Error('Required parameter {{paramName}} was null or undefined when calling {{nickname}}.'); + if ({{#isBoolean}}{{paramName}} === null || {{paramName}} === undefined{{/isBoolean}}{{^isBoolean}}!{{paramName}}{{/isBoolean}}) { + throw new Error('Parameter `{{paramName}}` is required when calling `{{nickname}}`.'); } {{#vars}} {{#required}} - if ({{paramName}}.{{baseName}} === null || {{paramName}}.{{baseName}} === undefined) { - throw new Error('Required parameter {{paramName}}.{{baseName}} was null or undefined when calling {{nickname}}.'); + if ({{#isBoolean}}{{paramName}}.{{baseName}} === null || {{paramName}}.{{baseName}} === undefined{{/isBoolean}}{{^isBoolean}}!{{paramName}}.{{baseName}}{{/isBoolean}}) { + throw new Error('Parameter `{{paramName}}.{{baseName}}` is required when calling `{{nickname}}`.'); } {{/required}} {{/vars}} diff --git a/tests/CTS/methods/requests/search/assignUserId.json b/tests/CTS/methods/requests/search/assignUserId.json index a69387cc0e..7abfe64b6c 100644 --- a/tests/CTS/methods/requests/search/assignUserId.json +++ b/tests/CTS/methods/requests/search/assignUserId.json @@ -3,7 +3,7 @@ "method": "assignUserId", "parameters": { "xAlgoliaUserID": "userID", - "assignUserIdObject": { + "assignUserIdParams": { "cluster": "theCluster" } }, diff --git a/tests/CTS/methods/requests/search/batch.json b/tests/CTS/methods/requests/search/batch.json index 54d6e4d655..11ee7c29d3 100644 --- a/tests/CTS/methods/requests/search/batch.json +++ b/tests/CTS/methods/requests/search/batch.json @@ -3,7 +3,7 @@ "method": "batch", "parameters": { "indexName": "theIndexName", - "batchWriteObject": { + "batchWriteParams": { "requests": [ { "action": "delete", diff --git a/tests/CTS/methods/requests/search/batchAssignUserIds.json b/tests/CTS/methods/requests/search/batchAssignUserIds.json index 04c450d380..725a393163 100644 --- a/tests/CTS/methods/requests/search/batchAssignUserIds.json +++ b/tests/CTS/methods/requests/search/batchAssignUserIds.json @@ -3,7 +3,7 @@ "method": "batchAssignUserIds", "parameters": { "xAlgoliaUserID": "userID", - "batchAssignUserIdsObject": { + "batchAssignUserIdsParams": { "cluster": "theCluster", "users": ["user1", "user2"] } diff --git a/tests/CTS/methods/requests/search/operationIndex.json b/tests/CTS/methods/requests/search/operationIndex.json index 456820aaa6..c36627df26 100644 --- a/tests/CTS/methods/requests/search/operationIndex.json +++ b/tests/CTS/methods/requests/search/operationIndex.json @@ -3,7 +3,7 @@ "method": "operationIndex", "parameters": { "indexName": "theIndexName", - "operationIndexObject": { + "operationIndexParams": { "operation": "copy", "destination": "dest", "scope": ["rules", "settings"] diff --git a/tests/output/javascript/tests/methods/requests/search.test.ts b/tests/output/javascript/tests/methods/requests/search.test.ts index 27f845a6cf..128f50211d 100644 --- a/tests/output/javascript/tests/methods/requests/search.test.ts +++ b/tests/output/javascript/tests/methods/requests/search.test.ts @@ -65,7 +65,7 @@ describe('assignUserId', () => { test('assignUserId', async () => { const req = (await client.assignUserId({ xAlgoliaUserID: 'userID', - assignUserIdObject: { cluster: 'theCluster' }, + assignUserIdParams: { cluster: 'theCluster' }, })) as unknown as EchoResponse; expect(req.path).toEqual('/1/clusters/mapping'); @@ -79,7 +79,7 @@ describe('batch', () => { test('batch', async () => { const req = (await client.batch({ indexName: 'theIndexName', - batchWriteObject: { + batchWriteParams: { requests: [ { action: 'delete', @@ -109,7 +109,7 @@ describe('batchAssignUserIds', () => { test('batchAssignUserIds', async () => { const req = (await client.batchAssignUserIds({ xAlgoliaUserID: 'userID', - batchAssignUserIdsObject: { + batchAssignUserIdsParams: { cluster: 'theCluster', users: ['user1', 'user2'], }, @@ -735,7 +735,7 @@ describe('operationIndex', () => { test('operationIndex', async () => { const req = (await client.operationIndex({ indexName: 'theIndexName', - operationIndexObject: { + operationIndexParams: { operation: 'copy', destination: 'dest', scope: ['rules', 'settings'],