@delopay/sdk 0.36.0 → 0.38.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-ZS7ALFE7.js → chunk-IQKFNKHU.js} +15 -43
- package/dist/{chunk-ZS7ALFE7.js.map → chunk-IQKFNKHU.js.map} +1 -1
- package/dist/index.cjs +14 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -25
- package/dist/index.d.ts +96 -25
- package/dist/index.js +1 -1
- package/dist/internal.cjs +35 -42
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +136 -13
- package/dist/internal.d.ts +136 -13
- package/dist/internal.js +22 -1
- package/dist/internal.js.map +1 -1
- package/package.json +17 -16
package/dist/index.cjs
CHANGED
|
@@ -2424,51 +2424,23 @@ var Webhooks = {
|
|
|
2424
2424
|
};
|
|
2425
2425
|
|
|
2426
2426
|
// src/resources/analytics.ts
|
|
2427
|
-
var AnalyticsDomain = class {
|
|
2428
|
-
constructor(request, domain) {
|
|
2429
|
-
this.request = request;
|
|
2430
|
-
this.domain = domain;
|
|
2431
|
-
}
|
|
2432
|
-
/** Get metrics. `POST /analytics/metrics/{domain}` */
|
|
2433
|
-
async metrics(params, scope) {
|
|
2434
|
-
const prefix = scope ? `/analytics/${scope}` : "/analytics";
|
|
2435
|
-
return this.request("POST", `${prefix}/metrics/${encodeURIComponent(this.domain)}`, {
|
|
2436
|
-
body: [params]
|
|
2437
|
-
});
|
|
2438
|
-
}
|
|
2439
|
-
/** Get filters. `POST /analytics/filters/{domain}` */
|
|
2440
|
-
async filters(params, scope) {
|
|
2441
|
-
const prefix = scope ? `/analytics/${scope}` : "/analytics";
|
|
2442
|
-
return this.request("POST", `${prefix}/filters/${encodeURIComponent(this.domain)}`, {
|
|
2443
|
-
body: params
|
|
2444
|
-
});
|
|
2445
|
-
}
|
|
2446
|
-
/** Generate report. `POST /analytics/report/{domain}` */
|
|
2447
|
-
async report(params, scope) {
|
|
2448
|
-
const prefix = scope ? `/analytics/${scope}` : "/analytics";
|
|
2449
|
-
return this.request("POST", `${prefix}/report/${encodeURIComponent(this.domain)}`, {
|
|
2450
|
-
body: params
|
|
2451
|
-
});
|
|
2452
|
-
}
|
|
2453
|
-
/** Sankey chart data. `POST /analytics/metrics/{domain}/sankey` */
|
|
2454
|
-
async sankey(params, scope) {
|
|
2455
|
-
const prefix = scope ? `/analytics/${scope}` : "/analytics";
|
|
2456
|
-
return this.request("POST", `${prefix}/metrics/${encodeURIComponent(this.domain)}/sankey`, {
|
|
2457
|
-
body: params
|
|
2458
|
-
});
|
|
2459
|
-
}
|
|
2460
|
-
};
|
|
2461
2427
|
var Analytics = class {
|
|
2462
2428
|
constructor(request) {
|
|
2463
2429
|
this.request = request;
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2430
|
+
}
|
|
2431
|
+
/**
|
|
2432
|
+
* Scoped, drill-level analytics dashboard for the authenticated merchant
|
|
2433
|
+
* (the same engine as the admin portal, pinned server-side to your own
|
|
2434
|
+
* merchant). The server ignores `merchant_id` — it always scopes to your
|
|
2435
|
+
* merchant, and to your single shop for profile-scoped users — so pass only
|
|
2436
|
+
* `project_id` / `shop_id` to drill and the window / `sections` fields.
|
|
2437
|
+
* Returns one drill level: the scope's daily series + previous window,
|
|
2438
|
+
* processor mix and direct children. `GET /analytics/scope`
|
|
2439
|
+
*/
|
|
2440
|
+
async scope(params) {
|
|
2441
|
+
return this.request("GET", "/analytics/scope", {
|
|
2442
|
+
query: params
|
|
2443
|
+
});
|
|
2472
2444
|
}
|
|
2473
2445
|
/** Global search. `POST /analytics/search` */
|
|
2474
2446
|
async search(params) {
|