@delopay/sdk 0.400.0 → 0.407.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/internal.js CHANGED
@@ -153,6 +153,7 @@ import {
153
153
  Subscriptions,
154
154
  Support,
155
155
  UNKNOWN_SECTION_ORDER,
156
+ VatRates,
156
157
  WCAG_AA_TEXT,
157
158
  WCAG_AA_UI,
158
159
  WHOP_ACCENT_COLORS,
@@ -306,7 +307,7 @@ import {
306
307
  visibleCustomFields,
307
308
  whopAccentSwatch,
308
309
  whopCardElement
309
- } from "./chunk-AZRXI3FB.js";
310
+ } from "./chunk-DZK6LFNW.js";
310
311
 
311
312
  // src/internal/resources/admin.ts
312
313
  var Admin = class {
@@ -1195,13 +1196,32 @@ var AdminPortal = class {
1195
1196
  });
1196
1197
  }
1197
1198
  /**
1198
- * Every shop's device intelligence account, with its assessments per environment and
1199
- * its error rate over the last `window_days` days. The error rate counts finished
1200
- * assessments: one still running and a payment naming no buyer are not errors.
1199
+ * Every shop's device intelligence account, with its merchant's and its own
1200
+ * name and its assessments per environment over the last `days` days: counts
1201
+ * and error rate, failures by reason, finished assessments per day and
1202
+ * provider, the last recorded assessment, browser payments against assessed
1203
+ * ones, and the payments held for a missing assessment. The error rate counts
1204
+ * finished assessments: one still running and a payment naming no buyer are
1205
+ * not errors.
1201
1206
  * `GET /admin-portal/device-intelligence`
1202
1207
  */
1203
- async deviceIntelligenceUsage() {
1204
- return this.request("GET", "/admin-portal/device-intelligence");
1208
+ async deviceIntelligenceUsage(params = {}) {
1209
+ return this.request("GET", "/admin-portal/device-intelligence", {
1210
+ query: params
1211
+ });
1212
+ }
1213
+ /**
1214
+ * The payments behind one number of the device intelligence overview, one
1215
+ * page at a time: the assessments it counts, the payments held for a missing
1216
+ * assessment, or the browser payments without a device signal. With the same
1217
+ * `days` a list's `total` is the count it was opened from. A row carries
1218
+ * nothing about the buyer.
1219
+ * `GET /admin-portal/device-intelligence/payments`
1220
+ */
1221
+ async deviceIntelligencePayments(params = {}) {
1222
+ return this.request("GET", "/admin-portal/device-intelligence/payments", {
1223
+ query: params
1224
+ });
1205
1225
  }
1206
1226
  /**
1207
1227
  * PSP analytics across merchants: the merchant surface's
@@ -1730,6 +1750,50 @@ var AdminPortal = class {
1730
1750
  `/admin-portal/processor-costs/${encodeURIComponent(scheduleId)}`
1731
1751
  );
1732
1752
  }
1753
+ /**
1754
+ * The platform VAT rate table, every row past and future. With `on`, only
1755
+ * the row in force on that date for each country and category.
1756
+ *
1757
+ * `GET /admin-portal/vat-rates`
1758
+ */
1759
+ async listVatRates(params) {
1760
+ return this.request("GET", "/admin-portal/vat-rates", {
1761
+ query: { country: params?.country, on: params?.on }
1762
+ });
1763
+ }
1764
+ /**
1765
+ * Add a rate for a country and category from `valid_from` on. A rate change
1766
+ * is a new row with a later `valid_from`; the earlier row keeps pricing the
1767
+ * days before it. A second row for the same country, category and date is
1768
+ * refused with `IR_38`.
1769
+ *
1770
+ * `POST /admin-portal/vat-rates`
1771
+ */
1772
+ async createVatRate(params) {
1773
+ return this.request("POST", "/admin-portal/vat-rates", { body: params });
1774
+ }
1775
+ /**
1776
+ * Change a rate's label, or the rate of a row that has not started yet. A
1777
+ * row in force (`valid_from` on or before today, UTC) keeps its rate:
1778
+ * payments were determined on it, and a new `rate_bp` is refused with
1779
+ * `DE_29` (409).
1780
+ *
1781
+ * `PUT /admin-portal/vat-rates/{rateId}`
1782
+ */
1783
+ async updateVatRate(rateId, params) {
1784
+ return this.request("PUT", `/admin-portal/vat-rates/${encodeURIComponent(rateId)}`, {
1785
+ body: params
1786
+ });
1787
+ }
1788
+ /**
1789
+ * Delete a rate that has not started yet. A row in force is refused with
1790
+ * `DE_29` (409); add a row with a later `valid_from` instead.
1791
+ *
1792
+ * `DELETE /admin-portal/vat-rates/{rateId}`
1793
+ */
1794
+ async deleteVatRate(rateId) {
1795
+ return this.request("DELETE", `/admin-portal/vat-rates/${encodeURIComponent(rateId)}`);
1796
+ }
1733
1797
  /**
1734
1798
  * One shop's statement periods, newest first. Same shape as the
1735
1799
  * merchant-facing `settlement.listPeriods`, admin-authenticated.
@@ -3187,6 +3251,7 @@ export {
3187
3251
  Subscriptions,
3188
3252
  Support,
3189
3253
  UNKNOWN_SECTION_ORDER,
3254
+ VatRates,
3190
3255
  WCAG_AA_TEXT,
3191
3256
  WCAG_AA_UI,
3192
3257
  WHOP_ACCENT_COLORS,