@delopay/sdk 0.96.0 → 0.98.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/internal.cjs CHANGED
@@ -2216,6 +2216,7 @@ var Routing = class {
2216
2216
  this.decision = new RoutingDecisionManager(request);
2217
2217
  this.surchargeRules = new SurchargeRules(request);
2218
2218
  this.checkoutThemeRules = new CheckoutThemeRules(request);
2219
+ this.checkoutThemeConversion = new CheckoutThemeConversion(request);
2219
2220
  }
2220
2221
  /**
2221
2222
  * Create a new routing algorithm.
@@ -2528,6 +2529,47 @@ var CheckoutThemeRules = class {
2528
2529
  });
2529
2530
  }
2530
2531
  };
2532
+ var CheckoutThemeConversion = class {
2533
+ constructor(request) {
2534
+ this.request = request;
2535
+ }
2536
+ /**
2537
+ * Rendered-to-paid conversion for a shop over a window.
2538
+ *
2539
+ * `GET /routing/checkout-theme/conversion`
2540
+ *
2541
+ * Requires `CheckoutBranding` read at profile scope - the same permission
2542
+ * that governs seeing how a checkout looks.
2543
+ *
2544
+ * @param params - Window (RFC3339, `start` inclusive / `end` exclusive), the
2545
+ * shop, and the dimension to group by.
2546
+ *
2547
+ * @example Which variant wins on which device, over the last 30 days.
2548
+ * ```typescript
2549
+ * const report = await delopay.routing.checkoutThemeConversion.retrieve({
2550
+ * profile_id: 'pro_...',
2551
+ * start: '2026-07-21T00:00:00Z',
2552
+ * end: '2026-08-20T00:00:00Z',
2553
+ * segment: 'device',
2554
+ * });
2555
+ *
2556
+ * for (const c of report.comparisons) {
2557
+ * if (!c.separates) continue; // "not shown to differ" - say nothing
2558
+ * console.log(`${c.variant} on ${c.segment}: ${c.higher} converts better`);
2559
+ * }
2560
+ * ```
2561
+ */
2562
+ async retrieve(params) {
2563
+ return this.request("GET", "/routing/checkout-theme/conversion", {
2564
+ query: {
2565
+ profile_id: params.profile_id,
2566
+ start: params.start,
2567
+ end: params.end,
2568
+ segment: params.segment
2569
+ }
2570
+ });
2571
+ }
2572
+ };
2531
2573
 
2532
2574
  // src/resources/search.ts
2533
2575
  var Search = class {