Skip to content

Commit b7e2110

Browse files
committed
fix(specs): multiple clients fixes (generated)
algolia/api-clients-automation#3971 Co-authored-by: algolia-bot <[email protected]>
1 parent 47b034b commit b7e2110

File tree

7 files changed

+25
-10
lines changed

7 files changed

+25
-10
lines changed

client/src/commonMain/kotlin/com/algolia/client/model/abtesting/ABTestConfiguration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import kotlinx.serialization.json.*
1414
@Serializable
1515
public data class ABTestConfiguration(
1616

17-
@SerialName(value = "outliers") val outliers: Outliers,
17+
@SerialName(value = "outliers") val outliers: Outliers? = null,
1818

1919
@SerialName(value = "emptySearch") val emptySearch: EmptySearch? = null,
2020

client/src/commonMain/kotlin/com/algolia/client/model/abtesting/Variant.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import kotlinx.serialization.json.*
1010
* @param addToCartCount Number of add-to-cart events for this variant.
1111
* @param clickCount Number of click events for this variant.
1212
* @param conversionCount Number of click events for this variant.
13-
* @param description Description for this variant.
1413
* @param index Index name of the A/B test variant (case-sensitive).
1514
* @param noResultCount Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for this variant.
1615
* @param purchaseCount Number of purchase events for this variant.
@@ -23,6 +22,7 @@ import kotlinx.serialization.json.*
2322
* @param clickThroughRate [Click-through rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate) for this variant.
2423
* @param conversionRate [Conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate) for this variant.
2524
* @param currencies A/B test currencies.
25+
* @param description Description for this variant.
2626
* @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.
2727
* @param filterEffects
2828
* @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(
4040
/** Number of click events for this variant. */
4141
@SerialName(value = "conversionCount") val conversionCount: Int,
4242

43-
/** Description for this variant. */
44-
@SerialName(value = "description") val description: String,
45-
4643
/** Index name of the A/B test variant (case-sensitive). */
4744
@SerialName(value = "index") val index: String,
4845

@@ -79,6 +76,9 @@ public data class Variant(
7976
/** A/B test currencies. */
8077
@SerialName(value = "currencies") val currencies: Map<kotlin.String, Currency>? = null,
8178

79+
/** Description for this variant. */
80+
@SerialName(value = "description") val description: String? = null,
81+
8282
/** 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. */
8383
@SerialName(value = "estimatedSampleSize") val estimatedSampleSize: Int? = null,
8484

client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendationsResults.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import kotlinx.serialization.json.*
1414
* @param aroundLatLng Computed geographical location.
1515
* @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`.
1616
* @param exhaustive
17+
* @param appliedRules Rules applied to the query.
1718
* @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response.
1819
* @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response.
1920
* @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response.
@@ -60,6 +61,9 @@ public data class RecommendationsResults(
6061

6162
@SerialName(value = "exhaustive") val exhaustive: Exhaustive? = null,
6263

64+
/** Rules applied to the query. */
65+
@SerialName(value = "appliedRules") val appliedRules: List<JsonObject>? = null,
66+
6367
/** See the `facetsCount` field of the `exhaustive` object in the response. */
6468
@Deprecated(message = "This property is deprecated.")
6569
@SerialName(value = "exhaustiveFacetsCount") val exhaustiveFacetsCount: Boolean? = null,

client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseResponse.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import kotlinx.serialization.json.*
1616
* @param aroundLatLng Computed geographical location.
1717
* @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`.
1818
* @param exhaustive
19+
* @param appliedRules Rules applied to the query.
1920
* @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response.
2021
* @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response.
2122
* @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response.
@@ -70,6 +71,9 @@ public data class BrowseResponse(
7071

7172
@SerialName(value = "exhaustive") val exhaustive: Exhaustive? = null,
7273

74+
/** Rules applied to the query. */
75+
@SerialName(value = "appliedRules") val appliedRules: List<JsonObject>? = null,
76+
7377
/** See the `facetsCount` field of the `exhaustive` object in the response. */
7478
@Deprecated(message = "This property is deprecated.")
7579
@SerialName(value = "exhaustiveFacetsCount") val exhaustiveFacetsCount: Boolean? = null,

client/src/commonMain/kotlin/com/algolia/client/model/search/GetApiKeyResponse.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import kotlinx.serialization.json.*
77
/**
88
* GetApiKeyResponse
99
*
10+
* @param `value` API key.
1011
* @param createdAt Timestamp when the object was created, in milliseconds since the Unix epoch.
1112
* @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).
12-
* @param `value` API key.
1313
* @param description Description of an API key to help you identify this API key.
1414
* @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_\".
1515
* @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.*
2121
@Serializable
2222
public data class GetApiKeyResponse(
2323

24+
/** API key. */
25+
@SerialName(value = "value") val `value`: String,
26+
2427
/** Timestamp when the object was created, in milliseconds since the Unix epoch. */
2528
@SerialName(value = "createdAt") val createdAt: Long,
2629

2730
/** 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). */
2831
@SerialName(value = "acl") val acl: List<Acl>,
2932

30-
/** API key. */
31-
@SerialName(value = "value") val `value`: String? = null,
32-
3333
/** Description of an API key to help you identify this API key. */
3434
@SerialName(value = "description") val description: String? = null,
3535

client/src/commonMain/kotlin/com/algolia/client/model/search/GetObjectsResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ import kotlinx.serialization.json.*
1313
public data class GetObjectsResponse(
1414

1515
/** Retrieved records. */
16-
@SerialName(value = "results") val results: List<JsonObject>,
16+
@SerialName(value = "results") val results: List<JsonObject>? = null,
1717
)

client/src/commonMain/kotlin/com/algolia/client/model/search/SearchResponse.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import kotlinx.serialization.json.*
1919
* @param aroundLatLng Computed geographical location.
2020
* @param automaticRadius Distance from a central coordinate provided by `aroundLatLng`.
2121
* @param exhaustive
22+
* @param appliedRules Rules applied to the query.
2223
* @param exhaustiveFacetsCount See the `facetsCount` field of the `exhaustive` object in the response.
2324
* @param exhaustiveNbHits See the `nbHits` field of the `exhaustive` object in the response.
2425
* @param exhaustiveTypo See the `typo` field of the `exhaustive` object in the response.
@@ -72,6 +73,9 @@ public data class SearchResponse(
7273

7374
val exhaustive: Exhaustive? = null,
7475

76+
/** Rules applied to the query. */
77+
val appliedRules: List<JsonObject>? = null,
78+
7579
/** See the `facetsCount` field of the `exhaustive` object in the response. */
7680
@Deprecated(message = "This property is deprecated.")
7781
val exhaustiveFacetsCount: Boolean? = null,
@@ -157,6 +161,7 @@ internal object SearchResponseSerializer : KSerializer<SearchResponse> {
157161
element<String>("aroundLatLng", isOptional = true)
158162
element<String>("automaticRadius", isOptional = true)
159163
element<Exhaustive>("exhaustive", isOptional = true)
164+
element<List<JsonObject>>("appliedRules", isOptional = true)
160165
element<Boolean>("exhaustiveFacetsCount", isOptional = true)
161166
element<Boolean>("exhaustiveNbHits", isOptional = true)
162167
element<Boolean>("exhaustiveTypo", isOptional = true)
@@ -195,6 +200,7 @@ internal object SearchResponseSerializer : KSerializer<SearchResponse> {
195200
aroundLatLng = tree["aroundLatLng"]?.let { input.json.decodeFromJsonElement(it) },
196201
automaticRadius = tree["automaticRadius"]?.let { input.json.decodeFromJsonElement(it) },
197202
exhaustive = tree["exhaustive"]?.let { input.json.decodeFromJsonElement(it) },
203+
appliedRules = tree["appliedRules"]?.let { input.json.decodeFromJsonElement(it) },
198204
exhaustiveFacetsCount = tree["exhaustiveFacetsCount"]?.let { input.json.decodeFromJsonElement(it) },
199205
exhaustiveNbHits = tree["exhaustiveNbHits"]?.let { input.json.decodeFromJsonElement(it) },
200206
exhaustiveTypo = tree["exhaustiveTypo"]?.let { input.json.decodeFromJsonElement(it) },
@@ -234,6 +240,7 @@ internal object SearchResponseSerializer : KSerializer<SearchResponse> {
234240
value.aroundLatLng?.let { put("aroundLatLng", output.json.encodeToJsonElement(it)) }
235241
value.automaticRadius?.let { put("automaticRadius", output.json.encodeToJsonElement(it)) }
236242
value.exhaustive?.let { put("exhaustive", output.json.encodeToJsonElement(it)) }
243+
value.appliedRules?.let { put("appliedRules", output.json.encodeToJsonElement(it)) }
237244
value.exhaustiveFacetsCount?.let { put("exhaustiveFacetsCount", output.json.encodeToJsonElement(it)) }
238245
value.exhaustiveNbHits?.let { put("exhaustiveNbHits", output.json.encodeToJsonElement(it)) }
239246
value.exhaustiveTypo?.let { put("exhaustiveTypo", output.json.encodeToJsonElement(it)) }

0 commit comments

Comments
 (0)