@delopay/sdk 0.95.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/{chunk-6BVLBNEZ.js → chunk-JBBUTXXY.js} +70 -1
- package/dist/chunk-JBBUTXXY.js.map +1 -0
- package/dist/index.cjs +69 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +521 -1
- package/dist/index.d.ts +521 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +104 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +24 -3
- package/dist/internal.d.ts +24 -3
- package/dist/internal.js +36 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
- package/dist/chunk-6BVLBNEZ.js.map +0 -1
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 {
|
|
@@ -3331,6 +3373,33 @@ var Analytics = class {
|
|
|
3331
3373
|
query: params
|
|
3332
3374
|
});
|
|
3333
3375
|
}
|
|
3376
|
+
/**
|
|
3377
|
+
* Device analytics over the canonical client-context observation per
|
|
3378
|
+
* payment (browser/platform families, device classes and models, checkout
|
|
3379
|
+
* channel mix, time-to-pay), pinned server-side to your own merchant and
|
|
3380
|
+
* drillable via `project_id` / `shop_id` exactly like `scope`. Gated on the
|
|
3381
|
+
* client-context optimisation-use switch: when it is off the server answers
|
|
3382
|
+
* 200 with `enabled: false` and a caveat naming the switch.
|
|
3383
|
+
* `GET /analytics/devices`
|
|
3384
|
+
*/
|
|
3385
|
+
async devices(params) {
|
|
3386
|
+
return this.request("GET", "/analytics/devices", {
|
|
3387
|
+
query: params
|
|
3388
|
+
});
|
|
3389
|
+
}
|
|
3390
|
+
/**
|
|
3391
|
+
* Geo analytics over the canonical client-context observation per payment:
|
|
3392
|
+
* country totals, city bubbles (IP mode), buyer languages, buyer-local
|
|
3393
|
+
* purchase hours and the IP-vs-billing mismatch share. `mode` selects the
|
|
3394
|
+
* location claim (`ip` default, `billing`); the two are never coalesced.
|
|
3395
|
+
* Same drill, window and gating contract as `devices`.
|
|
3396
|
+
* `GET /analytics/geo`
|
|
3397
|
+
*/
|
|
3398
|
+
async geo(params) {
|
|
3399
|
+
return this.request("GET", "/analytics/geo", {
|
|
3400
|
+
query: params
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
3334
3403
|
/** Global search. `POST /analytics/search` */
|
|
3335
3404
|
async search(params) {
|
|
3336
3405
|
return this.request("POST", "/analytics/search", { body: params });
|