@delopay/sdk 0.96.0 → 0.97.0

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
@@ -2204,6 +2204,7 @@ var Routing = class {
2204
2204
  this.decision = new RoutingDecisionManager(request);
2205
2205
  this.surchargeRules = new SurchargeRules(request);
2206
2206
  this.checkoutThemeRules = new CheckoutThemeRules(request);
2207
+ this.checkoutThemeConversion = new CheckoutThemeConversion(request);
2207
2208
  }
2208
2209
  /**
2209
2210
  * Create a new routing algorithm.
@@ -2516,6 +2517,47 @@ var CheckoutThemeRules = class {
2516
2517
  });
2517
2518
  }
2518
2519
  };
2520
+ var CheckoutThemeConversion = class {
2521
+ constructor(request) {
2522
+ this.request = request;
2523
+ }
2524
+ /**
2525
+ * Rendered-to-paid conversion for a shop over a window.
2526
+ *
2527
+ * `GET /routing/checkout-theme/conversion`
2528
+ *
2529
+ * Requires `CheckoutBranding` read at profile scope - the same permission
2530
+ * that governs seeing how a checkout looks.
2531
+ *
2532
+ * @param params - Window (RFC3339, `start` inclusive / `end` exclusive), the
2533
+ * shop, and the dimension to group by.
2534
+ *
2535
+ * @example Which variant wins on which device, over the last 30 days.
2536
+ * ```typescript
2537
+ * const report = await delopay.routing.checkoutThemeConversion.retrieve({
2538
+ * profile_id: 'pro_...',
2539
+ * start: '2026-07-21T00:00:00Z',
2540
+ * end: '2026-08-20T00:00:00Z',
2541
+ * segment: 'device',
2542
+ * });
2543
+ *
2544
+ * for (const c of report.comparisons) {
2545
+ * if (!c.separates) continue; // "not shown to differ" - say nothing
2546
+ * console.log(`${c.variant} on ${c.segment}: ${c.higher} converts better`);
2547
+ * }
2548
+ * ```
2549
+ */
2550
+ async retrieve(params) {
2551
+ return this.request("GET", "/routing/checkout-theme/conversion", {
2552
+ query: {
2553
+ profile_id: params.profile_id,
2554
+ start: params.start,
2555
+ end: params.end,
2556
+ segment: params.segment
2557
+ }
2558
+ });
2559
+ }
2560
+ };
2519
2561
 
2520
2562
  // src/resources/search.ts
2521
2563
  var Search = class {