@delopay/sdk 0.312.0 → 0.318.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-FRYFAWLF.js → chunk-4QNMF3GL.js} +200 -69
- package/dist/chunk-4QNMF3GL.js.map +1 -0
- package/dist/{index-LwbpNt0g.d.cts → index-BDkbJukm.d.cts} +494 -44
- package/dist/{index-LwbpNt0g.d.ts → index-BDkbJukm.d.ts} +494 -44
- package/dist/index.cjs +199 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +273 -73
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +280 -8
- package/dist/internal.d.ts +280 -8
- package/dist/internal.js +75 -6
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-FRYFAWLF.js.map +0 -1
package/dist/internal.js
CHANGED
|
@@ -265,7 +265,7 @@ import {
|
|
|
265
265
|
visibleCustomFields,
|
|
266
266
|
whopAccentSwatch,
|
|
267
267
|
whopCardElement
|
|
268
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-4QNMF3GL.js";
|
|
269
269
|
|
|
270
270
|
// src/internal/resources/admin.ts
|
|
271
271
|
var Admin = class {
|
|
@@ -808,12 +808,13 @@ var AdminPortal = class {
|
|
|
808
808
|
return this.request("POST", "/admin-portal/analytics/exclusions/copy", { body });
|
|
809
809
|
}
|
|
810
810
|
/**
|
|
811
|
-
* Shop comparison
|
|
812
|
-
*
|
|
813
|
-
*
|
|
814
|
-
* `
|
|
811
|
+
* Shop comparison: one series per shop over one window, with whole-window
|
|
812
|
+
* and previous-window totals. With `merchant_id`, that merchant's shops;
|
|
813
|
+
* without it, the top `limit` (default 50) shops of every merchant by
|
|
814
|
+
* successful volume, the rest summed into `others`. Same contract as the
|
|
815
|
+
* merchant surface's `analytics.shops`. `GET /admin-portal/analytics/shops`
|
|
815
816
|
*/
|
|
816
|
-
async analyticsShops(params) {
|
|
817
|
+
async analyticsShops(params = {}) {
|
|
817
818
|
const query = params;
|
|
818
819
|
return this.request("GET", "/admin-portal/analytics/shops", {
|
|
819
820
|
query
|
|
@@ -1462,6 +1463,74 @@ var AdminPortal = class {
|
|
|
1462
1463
|
async getRiskBackfill(jobId) {
|
|
1463
1464
|
return this.request("GET", `/admin-portal/risk-engine/backfill/${encodeURIComponent(jobId)}`);
|
|
1464
1465
|
}
|
|
1466
|
+
/**
|
|
1467
|
+
* Where a merchant stands in the risk policy (`merchant_risk.policy`): the
|
|
1468
|
+
* policy in force, the stage, the conditions of the last evaluation with
|
|
1469
|
+
* their evidence, pending and past actions, exemptions and stage changes.
|
|
1470
|
+
*
|
|
1471
|
+
* `GET /admin-portal/accounts/{merchant_id}/risk/stage`
|
|
1472
|
+
*/
|
|
1473
|
+
async getMerchantRiskStage(merchantId) {
|
|
1474
|
+
return this.request("GET", `${adminAccount(merchantId)}/risk/stage`);
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Evaluate a merchant against its risk policy now, as the scoring pass
|
|
1478
|
+
* does, and answer where it stands afterwards. Needs `AccountManage`.
|
|
1479
|
+
*
|
|
1480
|
+
* `POST /admin-portal/accounts/{merchant_id}/risk/stage/evaluate`
|
|
1481
|
+
*/
|
|
1482
|
+
async evaluateMerchantRiskStage(merchantId) {
|
|
1483
|
+
return this.request("POST", `${adminAccount(merchantId)}/risk/stage/evaluate`, { body: {} });
|
|
1484
|
+
}
|
|
1485
|
+
/**
|
|
1486
|
+
* Apply a pending action that waits for an operator. An action already
|
|
1487
|
+
* decided, suppressed or expired is refused with `DE_19` (HTTP 409).
|
|
1488
|
+
*
|
|
1489
|
+
* `POST /admin-portal/accounts/{merchant_id}/risk/actions/{action_id}/confirm`
|
|
1490
|
+
*/
|
|
1491
|
+
async confirmMerchantRiskAction(merchantId, actionId, params = {}) {
|
|
1492
|
+
return this.request(
|
|
1493
|
+
"POST",
|
|
1494
|
+
`${adminAccount(merchantId)}/risk/actions/${encodeURIComponent(actionId)}/confirm`,
|
|
1495
|
+
{ body: params }
|
|
1496
|
+
);
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* Dismiss a pending action with a reason; it never applies. An action
|
|
1500
|
+
* already decided is refused with `DE_19` (HTTP 409).
|
|
1501
|
+
*
|
|
1502
|
+
* `POST /admin-portal/accounts/{merchant_id}/risk/actions/{action_id}/dismiss`
|
|
1503
|
+
*/
|
|
1504
|
+
async dismissMerchantRiskAction(merchantId, actionId, params) {
|
|
1505
|
+
return this.request(
|
|
1506
|
+
"POST",
|
|
1507
|
+
`${adminAccount(merchantId)}/risk/actions/${encodeURIComponent(actionId)}/dismiss`,
|
|
1508
|
+
{ body: params }
|
|
1509
|
+
);
|
|
1510
|
+
}
|
|
1511
|
+
/**
|
|
1512
|
+
* Exempt a merchant from one action for one risk dimension, until
|
|
1513
|
+
* `expires_at` or for good. An exempted action is recorded as `suppressed`
|
|
1514
|
+
* with the exemption's id; the stage itself is still entered.
|
|
1515
|
+
*
|
|
1516
|
+
* `POST /admin-portal/accounts/{merchant_id}/risk/exemptions`
|
|
1517
|
+
*/
|
|
1518
|
+
async createMerchantRiskExemption(merchantId, params) {
|
|
1519
|
+
return this.request("POST", `${adminAccount(merchantId)}/risk/exemptions`, { body: params });
|
|
1520
|
+
}
|
|
1521
|
+
/**
|
|
1522
|
+
* End an exemption now, with a reason. It no longer suppresses anything
|
|
1523
|
+
* from the next evaluation on.
|
|
1524
|
+
*
|
|
1525
|
+
* `POST /admin-portal/accounts/{merchant_id}/risk/exemptions/{exemption_id}/revoke`
|
|
1526
|
+
*/
|
|
1527
|
+
async revokeMerchantRiskExemption(merchantId, exemptionId, params) {
|
|
1528
|
+
return this.request(
|
|
1529
|
+
"POST",
|
|
1530
|
+
`${adminAccount(merchantId)}/risk/exemptions/${encodeURIComponent(exemptionId)}/revoke`,
|
|
1531
|
+
{ body: params }
|
|
1532
|
+
);
|
|
1533
|
+
}
|
|
1465
1534
|
};
|
|
1466
1535
|
function transactionListQuery(params) {
|
|
1467
1536
|
if (!params) return void 0;
|