diff --git a/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/ABTestConfiguration.kt b/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/ABTestConfiguration.kt index 1a2d81cc..6179eda9 100644 --- a/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/ABTestConfiguration.kt +++ b/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/ABTestConfiguration.kt @@ -14,7 +14,7 @@ import kotlinx.serialization.json.* @Serializable public data class ABTestConfiguration( - @SerialName(value = "outliers") val outliers: Outliers, + @SerialName(value = "outliers") val outliers: Outliers? = null, @SerialName(value = "emptySearch") val emptySearch: EmptySearch? = null, diff --git a/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/Variant.kt b/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/Variant.kt index 35b89602..613a3f2f 100644 --- a/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/Variant.kt +++ b/client/src/commonMain/kotlin/com/algolia/client/model/abtesting/Variant.kt @@ -10,7 +10,6 @@ import kotlinx.serialization.json.* * @param addToCartCount Number of add-to-cart events for this variant. * @param clickCount Number of click events for this variant. * @param conversionCount Number of click events for this variant. - * @param description Description for this variant. * @param index Index name of the A/B test variant (case-sensitive). * @param noResultCount Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for this variant. * @param purchaseCount Number of purchase events for this variant. @@ -23,6 +22,7 @@ import kotlinx.serialization.json.* * @param clickThroughRate [Click-through rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate) for this variant. * @param conversionRate [Conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate) for this variant. * @param currencies A/B test currencies. + * @param description Description for this variant. * @param estimatedSampleSize Estimated number of searches required to achieve the desired statistical significance. The A/B test configuration must include a `mininmumDetectableEffect` setting for this number to be included in the response. * @param filterEffects * @param purchaseRate [Purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate) for this variant. @@ -40,9 +40,6 @@ public data class Variant( /** Number of click events for this variant. */ @SerialName(value = "conversionCount") val conversionCount: Int, - /** Description for this variant. */ - @SerialName(value = "description") val description: String, - /** Index name of the A/B test variant (case-sensitive). */ @SerialName(value = "index") val index: String, @@ -79,6 +76,9 @@ public data class Variant( /** A/B test currencies. */ @SerialName(value = "currencies") val currencies: Map? = null, + /** Description for this variant. */ + @SerialName(value = "description") val description: String? = null, + /** Estimated number of searches required to achieve the desired statistical significance. The A/B test configuration must include a `mininmumDetectableEffect` setting for this number to be included in the response. */ @SerialName(value = "estimatedSampleSize") val estimatedSampleSize: Int? = null, diff --git a/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsResults.kt b/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsResults.kt index 81d506cd..d4338669 100644 --- a/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsResults.kt +++ b/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsResults.kt @@ -14,6 +14,7 @@ import kotlinx.serialization.json.* * @param aroundLatLng Computed geographical location. * @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustive + * @param appliedRules Rules applied to the query. * @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response. * @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response. @@ -60,6 +61,9 @@ public data class RecommendationsResults( @SerialName(value = "exhaustive") val exhaustive: Exhaustive? = null, + /** Rules applied to the query. */ + @SerialName(value = "appliedRules") val appliedRules: List? = null, + /** See the `facetsCount` field of the `exhaustive` object in the response. */ @Deprecated(message = "This property is deprecated.") @SerialName(value = "exhaustiveFacetsCount") val exhaustiveFacetsCount: Boolean? = null, diff --git a/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseResponse.kt b/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseResponse.kt index ee461d39..fd33ffb5 100644 --- a/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseResponse.kt +++ b/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseResponse.kt @@ -16,6 +16,7 @@ import kotlinx.serialization.json.* * @param aroundLatLng Computed geographical location. * @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustive + * @param appliedRules Rules applied to the query. * @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response. * @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response. @@ -70,6 +71,9 @@ public data class BrowseResponse( @SerialName(value = "exhaustive") val exhaustive: Exhaustive? = null, + /** Rules applied to the query. */ + @SerialName(value = "appliedRules") val appliedRules: List? = null, + /** See the `facetsCount` field of the `exhaustive` object in the response. */ @Deprecated(message = "This property is deprecated.") @SerialName(value = "exhaustiveFacetsCount") val exhaustiveFacetsCount: Boolean? = null, diff --git a/client/src/commonMain/kotlin/com/algolia/client/model/search/GetApiKeyResponse.kt b/client/src/commonMain/kotlin/com/algolia/client/model/search/GetApiKeyResponse.kt index 3f3c42e9..95d06690 100644 --- a/client/src/commonMain/kotlin/com/algolia/client/model/search/GetApiKeyResponse.kt +++ b/client/src/commonMain/kotlin/com/algolia/client/model/search/GetApiKeyResponse.kt @@ -7,9 +7,9 @@ import kotlinx.serialization.json.* /** * GetApiKeyResponse * + * @param `value` API key. * @param createdAt Timestamp when the object was created, in milliseconds since the Unix epoch. * @param acl Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - * @param `value` API key. * @param description Description of an API key to help you identify this API key. * @param indexes Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". * @param maxHitsPerQuery Maximum number of results this API key can retrieve in one query. By default, there's no limit. @@ -21,15 +21,15 @@ import kotlinx.serialization.json.* @Serializable public data class GetApiKeyResponse( + /** API key. */ + @SerialName(value = "value") val `value`: String, + /** Timestamp when the object was created, in milliseconds since the Unix epoch. */ @SerialName(value = "createdAt") val createdAt: Long, /** Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). */ @SerialName(value = "acl") val acl: List, - /** API key. */ - @SerialName(value = "value") val `value`: String? = null, - /** Description of an API key to help you identify this API key. */ @SerialName(value = "description") val description: String? = null, diff --git a/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsResponse.kt b/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsResponse.kt index 0aee8291..c11dd76f 100644 --- a/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsResponse.kt +++ b/client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsResponse.kt @@ -13,5 +13,5 @@ import kotlinx.serialization.json.* public data class GetObjectsResponse( /** Retrieved records. */ - @SerialName(value = "results") val results: List, + @SerialName(value = "results") val results: List? = null, ) diff --git a/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchResponse.kt b/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchResponse.kt index c0277c4d..104bd299 100644 --- a/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchResponse.kt +++ b/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchResponse.kt @@ -19,6 +19,7 @@ import kotlinx.serialization.json.* * @param aroundLatLng Computed geographical location. * @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`. * @param exhaustive + * @param appliedRules Rules applied to the query. * @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response. * @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response. * @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response. @@ -72,6 +73,9 @@ public data class SearchResponse( val exhaustive: Exhaustive? = null, + /** Rules applied to the query. */ + val appliedRules: List? = null, + /** See the `facetsCount` field of the `exhaustive` object in the response. */ @Deprecated(message = "This property is deprecated.") val exhaustiveFacetsCount: Boolean? = null, @@ -157,6 +161,7 @@ internal object SearchResponseSerializer : KSerializer { element("aroundLatLng", isOptional = true) element("automaticRadius", isOptional = true) element("exhaustive", isOptional = true) + element>("appliedRules", isOptional = true) element("exhaustiveFacetsCount", isOptional = true) element("exhaustiveNbHits", isOptional = true) element("exhaustiveTypo", isOptional = true) @@ -195,6 +200,7 @@ internal object SearchResponseSerializer : KSerializer { aroundLatLng = tree["aroundLatLng"]?.let { input.json.decodeFromJsonElement(it) }, automaticRadius = tree["automaticRadius"]?.let { input.json.decodeFromJsonElement(it) }, exhaustive = tree["exhaustive"]?.let { input.json.decodeFromJsonElement(it) }, + appliedRules = tree["appliedRules"]?.let { input.json.decodeFromJsonElement(it) }, exhaustiveFacetsCount = tree["exhaustiveFacetsCount"]?.let { input.json.decodeFromJsonElement(it) }, exhaustiveNbHits = tree["exhaustiveNbHits"]?.let { input.json.decodeFromJsonElement(it) }, exhaustiveTypo = tree["exhaustiveTypo"]?.let { input.json.decodeFromJsonElement(it) }, @@ -234,6 +240,7 @@ internal object SearchResponseSerializer : KSerializer { value.aroundLatLng?.let { put("aroundLatLng", output.json.encodeToJsonElement(it)) } value.automaticRadius?.let { put("automaticRadius", output.json.encodeToJsonElement(it)) } value.exhaustive?.let { put("exhaustive", output.json.encodeToJsonElement(it)) } + value.appliedRules?.let { put("appliedRules", output.json.encodeToJsonElement(it)) } value.exhaustiveFacetsCount?.let { put("exhaustiveFacetsCount", output.json.encodeToJsonElement(it)) } value.exhaustiveNbHits?.let { put("exhaustiveNbHits", output.json.encodeToJsonElement(it)) } value.exhaustiveTypo?.let { put("exhaustiveTypo", output.json.encodeToJsonElement(it)) }