@delopay/sdk 0.36.0 → 0.37.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
@@ -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
- this.payments = new AnalyticsDomain(request, "payments");
2465
- this.refunds = new AnalyticsDomain(request, "refunds");
2466
- this.disputes = new AnalyticsDomain(request, "disputes");
2467
- this.authEvents = new AnalyticsDomain(request, "auth_events");
2468
- this.sdkEvents = new AnalyticsDomain(request, "sdk_events");
2469
- this.frm = new AnalyticsDomain(request, "frm");
2470
- this.apiEvents = new AnalyticsDomain(request, "api_events");
2471
- this.routing = new AnalyticsDomain(request, "routing");
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) {