Skip to content

Commit 314994a

Browse files
algolia-botben-kalmusClaraMuller
committed
feat(specs): add compositions deduplication setting (generated)
algolia/api-clients-automation#5418 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Ben Kalmus <[email protected]> Co-authored-by: Clara Muller <[email protected]>
1 parent e12fe0b commit 314994a

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */
2+
package com.algolia.client.model.composition
3+
4+
import kotlinx.serialization.*
5+
6+
/**
7+
* Deduplication positioning configures how a duplicate result should be resolved between an injected item and main search results. Current configuration supports: - 'highest': always select the item in the highest position, and remove duplicates that appear lower in the results. - 'highestInjected': duplicate result will be moved to its highest possible injected position, but not higher. If a duplicate appears higher in main search results, it will be removed to stay it's intended group position (which could be lower than main).
8+
*/
9+
@Serializable
10+
public enum class DedupPositioning(public val value: kotlin.String) {
11+
12+
@SerialName(value = "highest")
13+
Highest("highest"),
14+
15+
@SerialName(value = "highestInjected")
16+
HighestInjected("highestInjected");
17+
18+
override fun toString(): kotlin.String = value
19+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/** Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. */
2+
package com.algolia.client.model.composition
3+
4+
import kotlinx.serialization.*
5+
import kotlinx.serialization.json.*
6+
7+
/**
8+
* Deduplication configures the methods used to resolve duplicate items between main search results and injected group results.
9+
*
10+
* @param positioning
11+
*/
12+
@Serializable
13+
public data class Deduplication(
14+
15+
@SerialName(value = "positioning") val positioning: DedupPositioning,
16+
)

client/src/commonMain/kotlin/com/algolia/client/model/composition/Injection.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import kotlinx.serialization.json.*
99
*
1010
* @param main
1111
* @param injectedItems list of injected items of the current Composition.
12+
* @param deduplication
1213
*/
1314
@Serializable
1415
public data class Injection(
@@ -17,4 +18,6 @@ public data class Injection(
1718

1819
/** list of injected items of the current Composition. */
1920
@SerialName(value = "injectedItems") val injectedItems: List<InjectedItem>? = null,
21+
22+
@SerialName(value = "deduplication") val deduplication: Deduplication? = null,
2023
)

0 commit comments

Comments
 (0)