@delopay/sdk 0.104.0 → 0.105.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
@@ -3594,6 +3594,44 @@ var Analytics = class {
3594
3594
  query: params
3595
3595
  });
3596
3596
  }
3597
+ /**
3598
+ * Subscription analytics over `subscription` and `invoice`: estimated
3599
+ * recurring volume, the invoice funnel, movement (new / expansion /
3600
+ * contraction / churn), both processor axes, plan mix and the breakdown one
3601
+ * level below the scope. Pinned server-side to your own merchant and
3602
+ * drillable via `project_id` / `shop_id` exactly like `scope`.
3603
+ *
3604
+ * Half the figures are **stocks** — a snapshot at the window's end rather
3605
+ * than a sum over it — so `est_monthly_volume_usd` and `active` can match
3606
+ * across a 7-day and a 30-day window while `billed_volume_usd` does not.
3607
+ * Day granularity only. `GET /analytics/subscriptions`
3608
+ */
3609
+ async subscriptions(params) {
3610
+ return this.request("GET", "/analytics/subscriptions", {
3611
+ query: params
3612
+ });
3613
+ }
3614
+ /**
3615
+ * The billing cycles behind one clicked element of the subscription
3616
+ * dashboard: an invoice outcome, a processor slice on either axis, a plan
3617
+ * row, a subscription status, a movement component, a series bucket or a
3618
+ * breakdown row. Same window/scope/filter contract as `subscriptions`; 50
3619
+ * rows per page (`offset` for the next), newest first, with the full match
3620
+ * count alongside.
3621
+ *
3622
+ * A cycle that never reached a payment is listed too — that is what "still
3623
+ * unpaid" means — and carries its invoice id as `payment_id` with
3624
+ * `invoice_id` set to the same value, so you can always tell which you got.
3625
+ * `GET /analytics/subscriptions/list`
3626
+ */
3627
+ async subscriptionsList(params) {
3628
+ return this.request("GET", "/analytics/subscriptions/list", {
3629
+ // A discriminated union carries no index signature, so the widening
3630
+ // goes via `unknown` — the union is the point, and the query builder
3631
+ // only ever reads own enumerable keys.
3632
+ query: params
3633
+ });
3634
+ }
3597
3635
  /** Global search. `POST /analytics/search` */
3598
3636
  async search(params) {
3599
3637
  return this.request("POST", "/analytics/search", { body: params });