Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.convert.sdk.core.model.generated.ConfigExperienceSettings
import com.convert.sdk.core.model.generated.ExperienceStatuses
import com.convert.sdk.core.model.generated.ExperienceTypes
import com.convert.sdk.core.model.generated.ExperienceVariationConfig
import com.convert.sdk.core.model.generated.MultipageExperiencePage
import com.convert.sdk.core.model.generated.RuleObject

import kotlinx.serialization.Serializable
Expand Down Expand Up @@ -83,7 +84,7 @@ data class ConfigExperience (

/* Only for multipage experience type */
@SerialName(value = "multipage_pages")
val multipagePages: kotlin.collections.List<kotlinx.serialization.json.JsonElement>? = null,
val multipagePages: kotlin.collections.List<MultipageExperiencePage>? = null,

@Serializable(with = ExperienceStatusesNullableSerializer::class) @SerialName(value = "status")
val status: ExperienceStatuses? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data class ExperienceChangeCustomCodeDataUpdate (


@SerialName(value = "data")
val `data`: ExperienceChangeCustomCodeDataBaseAllOfData,
val `data`: ExperienceChangeCustomCodeDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data class ExperienceChangeCustomCodeDataUpdateNoId (


@SerialName(value = "data")
val `data`: ExperienceChangeCustomCodeDataBaseAllOfData,
val `data`: ExperienceChangeCustomCodeDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data class ExperienceChangeDefaultCodeDataUpdate (


@SerialName(value = "data")
val `data`: ExperienceChangeDefaultCodeDataBaseAllOfData,
val `data`: ExperienceChangeDefaultCodeDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data class ExperienceChangeDefaultCodeDataUpdateNoId (


@SerialName(value = "data")
val `data`: ExperienceChangeDefaultCodeDataBaseAllOfData,
val `data`: ExperienceChangeDefaultCodeDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data class ExperienceChangeDefaultCodeMultipageDataUpdate (


@SerialName(value = "data")
val `data`: ExperienceChangeDefaultCodeMultipageDataBaseAllOfData,
val `data`: ExperienceChangeDefaultCodeMultipageDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data class ExperienceChangeDefaultCodeMultipageDataUpdateNoId (


@SerialName(value = "data")
val `data`: ExperienceChangeDefaultCodeMultipageDataBaseAllOfData,
val `data`: ExperienceChangeDefaultCodeMultipageDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data class ExperienceChangeDefaultRedirectDataUpdate (


@SerialName(value = "data")
val `data`: ExperienceChangeDefaultRedirectDataBaseAllOfData,
val `data`: ExperienceChangeDefaultRedirectDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data class ExperienceChangeDefaultRedirectDataUpdateNoId (


@SerialName(value = "data")
val `data`: ExperienceChangeDefaultRedirectDataBaseAllOfData,
val `data`: ExperienceChangeDefaultRedirectDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data class ExperienceChangeFullStackFeatureUpdate (


@SerialName(value = "data")
val `data`: ExperienceChangeFullStackFeatureBaseAllOfData,
val `data`: ExperienceChangeFullStackFeatureBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data class ExperienceChangeFullStackFeatureUpdateNoId (


@SerialName(value = "data")
val `data`: ExperienceChangeFullStackFeatureBaseAllOfData,
val `data`: ExperienceChangeFullStackFeatureBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data class ExperienceChangeRichStructureDataUpdate (


@Contextual @SerialName(value = "data")
val `data`: ExperienceChangeRichStructureDataBaseAllOfData,
val `data`: ExperienceChangeRichStructureDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data class ExperienceChangeRichStructureDataUpdateNoId (


@Contextual @SerialName(value = "data")
val `data`: ExperienceChangeRichStructureDataBaseAllOfData,
val `data`: ExperienceChangeRichStructureDataBaseAllOfData? = null,

/* A server-generated hash that represents the object's state at the time of retrieval. When included in an update request, the operation will only succeed if the object hasn't been modified since this key was obtained. If another update has occurred in the meantime, the request will fail with a conflict error, requiring you to fetch the latest version and retry your update with the new concurrency_key. This implements optimistic concurrency control to prevent lost updates in concurrent scenarios. */
@SerialName(value = "concurrency_key")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// This file is auto-generated by openapi-generator — do not edit. Regenerate via `yarn generateKotlinTypes` in the backend/apiDoc/serving directory, then sync.
/**
*
* Please note:
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit this file manually.
*
*/

@file:Suppress(
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
)

package com.convert.sdk.core.model.generated

import com.convert.sdk.core.model.generated.ExperienceKeyBucketedMatchRuleAllOfMatching
import com.convert.sdk.core.model.generated.ExperienceKeyBucketedMatchRulesTypes

import kotlinx.serialization.Serializable
import kotlinx.serialization.SerialName
import kotlinx.serialization.Contextual

/**
*
*
* @param ruleType
* @param `value` The value used to match against 'rule_type' using 'matching'
* @param matching
*/
@Serializable

data class ExperienceKeyBucketedMatchRule (

@Contextual @SerialName(value = "rule_type")
val ruleType: ExperienceKeyBucketedMatchRulesTypes,

/* The value used to match against 'rule_type' using 'matching' */
@SerialName(value = "value")
val `value`: kotlin.String? = null,

@SerialName(value = "matching")
val matching: ExperienceKeyBucketedMatchRuleAllOfMatching? = null

) {


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// This file is auto-generated by openapi-generator — do not edit. Regenerate via `yarn generateKotlinTypes` in the backend/apiDoc/serving directory, then sync.
/**
*
* Please note:
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit this file manually.
*
*/

@file:Suppress(
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
)

package com.convert.sdk.core.model.generated

import com.convert.sdk.core.model.generated.ChoiceMatchingOptions

import kotlinx.serialization.Serializable
import kotlinx.serialization.SerialName
import kotlinx.serialization.Contextual

/**
*
*
* @param negated If `true`, the logical result of the match is inverted. For example, if `match_type` is 'contains' and `value` is 'apple', `negated: true` means the rule matches if the attribute *does not* contain 'apple'.
* @param matchType
*/
@Serializable

data class ExperienceKeyBucketedMatchRuleAllOfMatching (

/* If `true`, the logical result of the match is inverted. For example, if `match_type` is 'contains' and `value` is 'apple', `negated: true` means the rule matches if the attribute *does not* contain 'apple'. */
@SerialName(value = "negated")
val negated: kotlin.Boolean? = null,

@Serializable(with = ChoiceMatchingOptionsNullableSerializer::class) @SerialName(value = "match_type")
val matchType: ChoiceMatchingOptions? = null

) {


}

Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,15 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
* Account billing status
*
*
* Values: PAID,TRIAL,TRIAL_EXPIRED,CANCELED,PAUSED
* Values: BUCKETED_INTO_EXPERIENCE_KEY
*/
@Serializable
enum class PlanStatus(val value: kotlin.String) {
enum class ExperienceKeyBucketedMatchRulesTypes(val value: kotlin.String) {

@SerialName(value = "paid")
PAID("paid"),

@SerialName(value = "trial")
TRIAL("trial"),

@SerialName(value = "trialExpired")
TRIAL_EXPIRED("trialExpired"),

@SerialName(value = "canceled")
CANCELED("canceled"),

@SerialName(value = "paused")
PAUSED("paused");
@SerialName(value = "bucketed_into_experience_key")
BUCKETED_INTO_EXPERIENCE_KEY("bucketed_into_experience_key");

/**
* Override [toString()] to avoid using the enum variable name as the value, and instead use
Expand All @@ -56,12 +44,12 @@ enum class PlanStatus(val value: kotlin.String) {
/**
* Converts the provided [data] to a [String] on success, null otherwise.
*/
fun encode(data: kotlin.Any?): kotlin.String? = if (data is PlanStatus) "$data" else null
fun encode(data: kotlin.Any?): kotlin.String? = if (data is ExperienceKeyBucketedMatchRulesTypes) "$data" else null

/**
* Returns a valid [PlanStatus] for [data], null otherwise.
* Returns a valid [ExperienceKeyBucketedMatchRulesTypes] for [data], null otherwise.
*/
fun decode(data: kotlin.Any?): PlanStatus? = data?.let {
fun decode(data: kotlin.Any?): ExperienceKeyBucketedMatchRulesTypes? = data?.let {
val normalizedData = "$it".lowercase()
values().firstOrNull { value ->
it == value || normalizedData == "$value".lowercase()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import kotlinx.serialization.json.JsonNull
import kotlinx.serialization.json.JsonPrimitive

/**
* KSerializer<Products?> that decodes unknown wire values to null
* KSerializer<ExperienceKeyBucketedMatchRulesTypes?> that decodes unknown wire values to null
* instead of throwing SerializationException. Auto-generated by
* patchKotlinGeneratorBugs.js Rule 9 from `@Serializable enum class
* Products`. Closes the F-170 crash class (unknown enum value
* ExperienceKeyBucketedMatchRulesTypes`. Closes the F-170 crash class (unknown enum value
* in CDN payload bricks the SDK).
*
* Wired via property-level `@Serializable(with = ProductsNullableSerializer::class)`
* on every `val <p>: Products?` declaration in any generated
* Wired via property-level `@Serializable(with = ExperienceKeyBucketedMatchRulesTypesNullableSerializer::class)`
* on every `val <p>: ExperienceKeyBucketedMatchRulesTypes?` declaration in any generated
* class file (Rule 9 sweep). NO SerializersModule registration
* needed — compile-time per-property binding is type-safe.
*
Expand All @@ -32,11 +32,11 @@ import kotlinx.serialization.json.JsonPrimitive
* Do not edit.
*/
@OptIn(ExperimentalSerializationApi::class)
internal object ProductsNullableSerializer : KSerializer<Products?> {
private val backing = Products.serializer()
internal object ExperienceKeyBucketedMatchRulesTypesNullableSerializer : KSerializer<ExperienceKeyBucketedMatchRulesTypes?> {
private val backing = ExperienceKeyBucketedMatchRulesTypes.serializer()
override val descriptor: SerialDescriptor = backing.descriptor.nullable

override fun deserialize(decoder: Decoder): Products? {
override fun deserialize(decoder: Decoder): ExperienceKeyBucketedMatchRulesTypes? {
val jsonDecoder = decoder as? JsonDecoder
?: return try { backing.deserialize(decoder) } catch (e: SerializationException) { null }
val element = jsonDecoder.decodeJsonElement()
Expand All @@ -50,10 +50,10 @@ internal object ProductsNullableSerializer : KSerializer<Products?> {
// openapi-generator's kotlinx_serialization output emits both
// shapes; Percentiles is the BigDecimal-valued case in the
// current spec.
return Products.entries.firstOrNull { it.value.toString() == content }
return ExperienceKeyBucketedMatchRulesTypes.entries.firstOrNull { it.value.toString() == content }
}

override fun serialize(encoder: Encoder, value: Products?) {
override fun serialize(encoder: Encoder, value: ExperienceKeyBucketedMatchRulesTypes?) {
if (value == null) {
val jsonEncoder = encoder as? JsonEncoder
if (jsonEncoder != null) jsonEncoder.encodeJsonElement(JsonNull) else encoder.encodeNull()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import kotlinx.serialization.Contextual
*
* @param enabled If true, integration with Google Analytics is enabled for this project or experience, allowing experiment data to be sent to GA.
* @param autoRevenueTracking Attempt to pull revenue data from Google Analytics Revenue Tracking code.
* @param trackFirstExposureOnly When enabled, the experience_impression event is sent only the first time a visitor is exposed to an experience, instead of on every subsequent qualifying page view. Opt-in and disabled by default.
* @param type
* @param propertyUA The Universal Analytics Property ID (e.g., \"UA-XXXXXXXX-Y\") to which Convert experiment data will be sent.
* @param measurementId The GA4 Measurement ID (e.g., \"G-XXXXXXXXXX\") for the data stream where Convert experiment data will be sent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ package com.convert.sdk.core.model.generated
import com.convert.sdk.core.model.generated.NumericOutlierMinMax
import com.convert.sdk.core.model.generated.NumericOutlierNone
import com.convert.sdk.core.model.generated.NumericOutlierPercentile
import com.convert.sdk.core.model.generated.NumericOutlierPercentileAllOfMax
import com.convert.sdk.core.model.generated.NumericOutlierPercentileAllOfMin
import com.convert.sdk.core.model.generated.Percentiles

import kotlinx.serialization.Serializable
import kotlinx.serialization.SerialName
Expand All @@ -30,8 +29,8 @@ import kotlinx.serialization.Contextual
*
*
* @param detectionType
* @param min
* @param max
* @param min Minimum percentile value for the outlier detection; values outside this percentile are considered outliers
* @param max Maximum percentile value for the outlier detection; values outside this percentile are considered outliers
*/
@OptIn(kotlinx.serialization.ExperimentalSerializationApi::class)
@kotlinx.serialization.Serializable
Expand Down
Loading
Loading