Skip to content

Commit

Permalink
fix(specs): multiple clients fixes (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3971

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
  • Loading branch information
algolia-bot committed Oct 16, 2024
1 parent 47b034b commit b7e2110
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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,

Expand Down Expand Up @@ -79,6 +76,9 @@ public data class Variant(
/** A/B test currencies. */
@SerialName(value = "currencies") val currencies: Map<kotlin.String, Currency>? = 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,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<JsonObject>? = 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<JsonObject>? = 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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<Acl>,

/** 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,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ import kotlinx.serialization.json.*
public data class GetObjectsResponse(

/** Retrieved records. */
@SerialName(value = "results") val results: List<JsonObject>,
@SerialName(value = "results") val results: List<JsonObject>? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -72,6 +73,9 @@ public data class SearchResponse(

val exhaustive: Exhaustive? = null,

/** Rules applied to the query. */
val appliedRules: List<JsonObject>? = null,

/** See the `facetsCount` field of the `exhaustive` object in the response. */
@Deprecated(message = "This property is deprecated.")
val exhaustiveFacetsCount: Boolean? = null,
Expand Down Expand Up @@ -157,6 +161,7 @@ internal object SearchResponseSerializer : KSerializer<SearchResponse> {
element<String>("aroundLatLng", isOptional = true)
element<String>("automaticRadius", isOptional = true)
element<Exhaustive>("exhaustive", isOptional = true)
element<List<JsonObject>>("appliedRules", isOptional = true)
element<Boolean>("exhaustiveFacetsCount", isOptional = true)
element<Boolean>("exhaustiveNbHits", isOptional = true)
element<Boolean>("exhaustiveTypo", isOptional = true)
Expand Down Expand Up @@ -195,6 +200,7 @@ internal object SearchResponseSerializer : KSerializer<SearchResponse> {
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) },
Expand Down Expand Up @@ -234,6 +240,7 @@ internal object SearchResponseSerializer : KSerializer<SearchResponse> {
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)) }
Expand Down

0 comments on commit b7e2110

Please sign in to comment.