SIGN IN SIGN UP

Rework CheckpointParams into a Builder with a Kotlin DSL (#4085)

### Description

Reworks `CheckpointParams` (all `@InternalRevenueCatAPI`) from Map /
vararg-Pair constructors into a Builder with a Kotlin DSL on top:

```kotlin
val params = CheckpointParams {
    customVariables {
        "goal" to "lose_weight"
        "step" to 3
        "premium" to true
    }
}
```

It additionally adds the infix `to` operators with overloads for the
accepted types, to make the API nicer to use

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Internal checkpoint API reshaping with preserved validation and
downstream behavior; no auth or payment logic changes.
> 
> **Overview**
> **`CheckpointParams`** no longer exposes map or vararg-`Pair`
constructors. Instances are built via **`CheckpointParams.Builder`**, a
top-level **`CheckpointParams { }`** DSL, and
**`CustomVariablesBuilder`** with fluent **`add(...)`** overloads (Java)
and infix **`"key" to value`** for primitives and
**`CustomVariableValue`** (Kotlin). A compile-time
**`@Deprecated(ERROR)`** `to(Any?)` overload blocks silent misuse of
Kotlin’s **`Pair`** `to` operator.
> 
> Default empty params in **`CheckpointsManager`** use
**`CheckpointParams {}`** instead of **`CheckpointParams()`**. Sample
apps and api-tester call sites are migrated to the DSL; unit tests cover
builder/DSL parity, duplicate keys, and replacing **`customVariables`**
blocks.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
49fb3d32f63036afd403763ea944b4fc40ded33f. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
T
Toni Rico committed
864d116b2ffa836953cfa5d2b914dbd433b624b9
Parent: 3304a16
Committed by GitHub <noreply@github.com> on 8/26/2026, 3:50:58 PM