@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.
@@ -2355,51 +2355,23 @@ var Webhooks = {
2355
2355
  };
2356
2356
 
2357
2357
  // src/resources/analytics.ts
2358
- var AnalyticsDomain = class {
2359
- constructor(request, domain) {
2360
- this.request = request;
2361
- this.domain = domain;
2362
- }
2363
- /** Get metrics. `POST /analytics/metrics/{domain}` */
2364
- async metrics(params, scope) {
2365
- const prefix = scope ? `/analytics/${scope}` : "/analytics";
2366
- return this.request("POST", `${prefix}/metrics/${encodeURIComponent(this.domain)}`, {
2367
- body: [params]
2368
- });
2369
- }
2370
- /** Get filters. `POST /analytics/filters/{domain}` */
2371
- async filters(params, scope) {
2372
- const prefix = scope ? `/analytics/${scope}` : "/analytics";
2373
- return this.request("POST", `${prefix}/filters/${encodeURIComponent(this.domain)}`, {
2374
- body: params
2375
- });
2376
- }
2377
- /** Generate report. `POST /analytics/report/{domain}` */
2378
- async report(params, scope) {
2379
- const prefix = scope ? `/analytics/${scope}` : "/analytics";
2380
- return this.request("POST", `${prefix}/report/${encodeURIComponent(this.domain)}`, {
2381
- body: params
2382
- });
2383
- }
2384
- /** Sankey chart data. `POST /analytics/metrics/{domain}/sankey` */
2385
- async sankey(params, scope) {
2386
- const prefix = scope ? `/analytics/${scope}` : "/analytics";
2387
- return this.request("POST", `${prefix}/metrics/${encodeURIComponent(this.domain)}/sankey`, {
2388
- body: params
2389
- });
2390
- }
2391
- };
2392
2358
  var Analytics = class {
2393
2359
  constructor(request) {
2394
2360
  this.request = request;
2395
- this.payments = new AnalyticsDomain(request, "payments");
2396
- this.refunds = new AnalyticsDomain(request, "refunds");
2397
- this.disputes = new AnalyticsDomain(request, "disputes");
2398
- this.authEvents = new AnalyticsDomain(request, "auth_events");
2399
- this.sdkEvents = new AnalyticsDomain(request, "sdk_events");
2400
- this.frm = new AnalyticsDomain(request, "frm");
2401
- this.apiEvents = new AnalyticsDomain(request, "api_events");
2402
- this.routing = new AnalyticsDomain(request, "routing");
2361
+ }
2362
+ /**
2363
+ * Scoped, drill-level analytics dashboard for the authenticated merchant
2364
+ * (the same engine as the admin portal, pinned server-side to your own
2365
+ * merchant). The server ignores `merchant_id` — it always scopes to your
2366
+ * merchant, and to your single shop for profile-scoped users — so pass only
2367
+ * `project_id` / `shop_id` to drill and the window / `sections` fields.
2368
+ * Returns one drill level: the scope's daily series + previous window,
2369
+ * processor mix and direct children. `GET /analytics/scope`
2370
+ */
2371
+ async scope(params) {
2372
+ return this.request("GET", "/analytics/scope", {
2373
+ query: params
2374
+ });
2403
2375
  }
2404
2376
  /** Global search. `POST /analytics/search` */
2405
2377
  async search(params) {
@@ -3803,4 +3775,4 @@ export {
3803
3775
  applyBrandingVariables,
3804
3776
  shadowFor
3805
3777
  };
3806
- //# sourceMappingURL=chunk-ZS7ALFE7.js.map
3778
+ //# sourceMappingURL=chunk-IQKFNKHU.js.map