@delopay/sdk 0.392.0 → 0.398.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-GN6GS4V2.js → chunk-BI74VQSZ.js} +128 -2
- package/dist/chunk-BI74VQSZ.js.map +1 -0
- package/dist/{index-C3WTfnm_.d.cts → index-BH8F0vge.d.cts} +479 -8
- package/dist/{index-C3WTfnm_.d.ts → index-BH8F0vge.d.ts} +479 -8
- package/dist/index.cjs +127 -1
- 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 +237 -3
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +319 -5
- package/dist/internal.d.ts +319 -5
- package/dist/internal.js +111 -3
- package/dist/internal.js.map +1 -1
- package/package.json +17 -19
- package/dist/chunk-GN6GS4V2.js.map +0 -1
package/dist/internal.js
CHANGED
|
@@ -305,7 +305,7 @@ import {
|
|
|
305
305
|
visibleCustomFields,
|
|
306
306
|
whopAccentSwatch,
|
|
307
307
|
whopCardElement
|
|
308
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-BI74VQSZ.js";
|
|
309
309
|
|
|
310
310
|
// src/internal/resources/admin.ts
|
|
311
311
|
var Admin = class {
|
|
@@ -649,10 +649,29 @@ var AdminPortal = class {
|
|
|
649
649
|
query
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
|
+
/**
|
|
653
|
+
* Persons of every merchant account, connected accounts included, or of the
|
|
654
|
+
* one merchant named in `merchant_id`. Each row is one merchant's person
|
|
655
|
+
* and names that merchant; persons of two merchants are never merged,
|
|
656
|
+
* whatever they share. `search` is matched at every merchant listed.
|
|
657
|
+
*
|
|
658
|
+
* A `limit` outside 1 to 100, a `search` longer than 320 characters, or
|
|
659
|
+
* `sort_by: 'captured'` without a three-letter `captured_currency` is a
|
|
660
|
+
* `400`.
|
|
661
|
+
*
|
|
662
|
+
* `GET /admin-portal/persons`
|
|
663
|
+
*/
|
|
664
|
+
async listPersonsAcrossMerchants(params) {
|
|
665
|
+
if (params === void 0) {
|
|
666
|
+
return this.request("GET", "/admin-portal/persons");
|
|
667
|
+
}
|
|
668
|
+
return this.request("GET", "/admin-portal/persons", { query: params });
|
|
669
|
+
}
|
|
652
670
|
/**
|
|
653
671
|
* One page of ONE merchant's persons: the same query and response as the
|
|
654
|
-
* merchant-facing `persons.list`, admin-authenticated.
|
|
655
|
-
*
|
|
672
|
+
* merchant-facing `persons.list`, admin-authenticated. A person stays one
|
|
673
|
+
* merchant's; `listPersonsAcrossMerchants` lists several merchants' side by
|
|
674
|
+
* side.
|
|
656
675
|
*
|
|
657
676
|
* `GET /admin-portal/persons/{merchantId}`
|
|
658
677
|
*/
|
|
@@ -1192,6 +1211,31 @@ var AdminPortal = class {
|
|
|
1192
1211
|
query: params
|
|
1193
1212
|
});
|
|
1194
1213
|
}
|
|
1214
|
+
/**
|
|
1215
|
+
* How accurate buyer risk scores were in a period, against what later
|
|
1216
|
+
* happened to the payments: fraud, clean, pending and never charged, how
|
|
1217
|
+
* well the flagged bands caught the fraud, each band and signal, and the
|
|
1218
|
+
* buyers the score stopped who later paid with no fraud. Stores nothing.
|
|
1219
|
+
* `GET /admin-portal/buyer-risk/accuracy`
|
|
1220
|
+
*/
|
|
1221
|
+
async buyerRiskAccuracy(params = {}) {
|
|
1222
|
+
return this.request("GET", "/admin-portal/buyer-risk/accuracy", {
|
|
1223
|
+
query: params
|
|
1224
|
+
});
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* The payments behind one number of {@link AdminPortal.buyerRiskAccuracy}:
|
|
1228
|
+
* the payments a signal fired on, those in a band, a flagged × outcome cell,
|
|
1229
|
+
* the interventions or the false declines. Paged, sorted and searchable
|
|
1230
|
+
* like the analytics drills, and answered in the same shape, with each
|
|
1231
|
+
* row's band, score, outcome and applied action.
|
|
1232
|
+
* `GET /admin-portal/buyer-risk/accuracy/payments`
|
|
1233
|
+
*/
|
|
1234
|
+
async buyerRiskAccuracyPayments(params = {}) {
|
|
1235
|
+
return this.request("GET", "/admin-portal/buyer-risk/accuracy/payments", {
|
|
1236
|
+
query: params
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1195
1239
|
/**
|
|
1196
1240
|
* Platform billing dashboard: total balance across all ledger accounts (+
|
|
1197
1241
|
* the net change), top-ups, fees collected, and the day-by-day ledger flow.
|
|
@@ -1273,6 +1317,70 @@ var AdminPortal = class {
|
|
|
1273
1317
|
async updateUser(userId, body) {
|
|
1274
1318
|
return this.request("PATCH", `/admin-portal/users/${encodeURIComponent(userId)}`, { body });
|
|
1275
1319
|
}
|
|
1320
|
+
/**
|
|
1321
|
+
* One user's account and its health: whether it is active and verified,
|
|
1322
|
+
* whether two-factor authentication is set up, when the password last
|
|
1323
|
+
* changed, the linked single sign-on providers, the newest successful and
|
|
1324
|
+
* failed sign-in, when the user was last seen and how many sessions are
|
|
1325
|
+
* live. Lists every membership the user holds in this tenant, invitations
|
|
1326
|
+
* and expired ones included, with its role and status. Never returns a
|
|
1327
|
+
* credential. `GET /admin-portal/users/{user_id}`
|
|
1328
|
+
*
|
|
1329
|
+
* Needs an internal role holding `ProfileUserRead`, or the admin API key.
|
|
1330
|
+
* A user with no membership in this tenant is a `404`.
|
|
1331
|
+
*/
|
|
1332
|
+
async getUser(userId) {
|
|
1333
|
+
return this.request("GET", `/admin-portal/users/${encodeURIComponent(userId)}`);
|
|
1334
|
+
}
|
|
1335
|
+
/**
|
|
1336
|
+
* One user's sign-in history (successes and failures, method, address,
|
|
1337
|
+
* location and device), filtered, sorted and paged as
|
|
1338
|
+
* `users.listLoginActivity` is. Same access and `404` rule as `getUser`.
|
|
1339
|
+
* `GET /admin-portal/users/{user_id}/login-activity`
|
|
1340
|
+
*/
|
|
1341
|
+
async listUserLoginActivity(userId, params) {
|
|
1342
|
+
const path3 = `/admin-portal/users/${encodeURIComponent(userId)}/login-activity`;
|
|
1343
|
+
if (params === void 0) {
|
|
1344
|
+
return this.request("GET", path3);
|
|
1345
|
+
}
|
|
1346
|
+
return this.request("GET", path3, {
|
|
1347
|
+
query: csvQuery(params, ["event_type", "auth_method"])
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* One user's live sessions: neither signed out nor expired. `is_current`
|
|
1352
|
+
* marks the caller's own session only, when the caller looks at themselves.
|
|
1353
|
+
* Same access and `404` rule as `getUser`.
|
|
1354
|
+
* `GET /admin-portal/users/{user_id}/sessions`
|
|
1355
|
+
*/
|
|
1356
|
+
async listUserSessions(userId) {
|
|
1357
|
+
return this.request("GET", `/admin-portal/users/${encodeURIComponent(userId)}/sessions`);
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* End one session of the user: its token is refused on its next request.
|
|
1361
|
+
* Needs `UsersManage`. Recorded in the audit log. A session that has
|
|
1362
|
+
* already ended answers `revoked: false` and records nothing. A session of
|
|
1363
|
+
* another user is a `404`, as an unknown id is.
|
|
1364
|
+
* `POST /admin-portal/users/{user_id}/sessions/{session_id}/revoke`
|
|
1365
|
+
*/
|
|
1366
|
+
async revokeUserSession(userId, sessionId) {
|
|
1367
|
+
return this.request(
|
|
1368
|
+
"POST",
|
|
1369
|
+
`/admin-portal/users/${encodeURIComponent(userId)}/sessions/${encodeURIComponent(sessionId)}/revoke`
|
|
1370
|
+
);
|
|
1371
|
+
}
|
|
1372
|
+
/**
|
|
1373
|
+
* Sign the user out of every session and token, wherever they signed in.
|
|
1374
|
+
* Needs `UsersManage`. The account stays active and the user can sign in
|
|
1375
|
+
* again at once. Answers how many live sessions were ended. Recorded in the
|
|
1376
|
+
* audit log. `POST /admin-portal/users/{user_id}/sessions/revoke-all`
|
|
1377
|
+
*/
|
|
1378
|
+
async revokeAllUserSessions(userId) {
|
|
1379
|
+
return this.request(
|
|
1380
|
+
"POST",
|
|
1381
|
+
`/admin-portal/users/${encodeURIComponent(userId)}/sessions/revoke-all`
|
|
1382
|
+
);
|
|
1383
|
+
}
|
|
1276
1384
|
/**
|
|
1277
1385
|
* Which checkout payment methods a member of `merchantId` may change.
|
|
1278
1386
|
* `GET /admin-portal/accounts/{merchant_id}/members/{user_id}/method-access`
|