@medialane/sdk 0.14.0 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -4651,14 +4651,26 @@ var ApiClient = class {
4651
4651
  * Call after onboarding when ChipiPay confirms the wallet address.
4652
4652
  * Requires Clerk JWT; no tenant API key needed.
4653
4653
  */
4654
- async upsertMyWallet(clerkToken) {
4654
+ /**
4655
+ * Frictionless wallet registration. Tenant API key only (no Clerk JWT required).
4656
+ * Idempotent — backend's ensureAccountForWallet upserts and upgrades existing
4657
+ * UNKNOWN walletType rows when a more specific value is supplied.
4658
+ */
4659
+ async registerUser(params) {
4660
+ return this.post("/v1/users/register", params);
4661
+ }
4662
+ async upsertMyWallet(clerkToken, options = {}) {
4655
4663
  const url = `${this.baseUrl.replace(/\/$/, "")}/v1/users/me`;
4656
4664
  const res = await fetch(url, {
4657
4665
  method: "POST",
4658
4666
  headers: {
4659
4667
  "Content-Type": "application/json",
4660
4668
  "Authorization": `Bearer ${clerkToken}`
4661
- }
4669
+ },
4670
+ body: JSON.stringify({
4671
+ walletType: options.walletType ?? "UNKNOWN",
4672
+ appSource: options.appSource ?? "MEDIALANE_SDK"
4673
+ })
4662
4674
  });
4663
4675
  return this.checkResponse(res);
4664
4676
  }