@delopay/sdk 0.12.0 → 0.13.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.d.cts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/internal.cjs +30 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +51 -1
- package/dist/internal.d.ts +51 -1
- package/dist/internal.js +30 -0
- package/dist/internal.js.map +1 -1
- package/package.json +16 -16
package/dist/index.d.cts
CHANGED
|
@@ -1378,6 +1378,13 @@ interface ProfileCreateRequest {
|
|
|
1378
1378
|
redirect_to_merchant_with_http_post?: boolean | null;
|
|
1379
1379
|
webhook_details?: Record<string, unknown> | null;
|
|
1380
1380
|
metadata?: Record<string, unknown> | null;
|
|
1381
|
+
/**
|
|
1382
|
+
* Origins permitted to embed this profile's hosted checkout in an
|
|
1383
|
+
* iframe. Each entry is a full origin (`scheme://host[:port]`, no
|
|
1384
|
+
* path). Empty/null defaults to same-origin only — strict
|
|
1385
|
+
* clickjacking defense.
|
|
1386
|
+
*/
|
|
1387
|
+
iframe_allowed_origins?: string[] | null;
|
|
1381
1388
|
}
|
|
1382
1389
|
interface ProfileUpdateRequest {
|
|
1383
1390
|
profile_name?: string | null;
|
|
@@ -1388,6 +1395,11 @@ interface ProfileUpdateRequest {
|
|
|
1388
1395
|
webhook_details?: Record<string, unknown> | null;
|
|
1389
1396
|
metadata?: Record<string, unknown> | null;
|
|
1390
1397
|
payment_link_config?: BusinessPaymentLinkConfig | null;
|
|
1398
|
+
/**
|
|
1399
|
+
* Origins permitted to embed this profile's hosted checkout in an
|
|
1400
|
+
* iframe. See {@link ProfileCreateRequest.iframe_allowed_origins}.
|
|
1401
|
+
*/
|
|
1402
|
+
iframe_allowed_origins?: string[] | null;
|
|
1391
1403
|
}
|
|
1392
1404
|
interface ProfileResponse {
|
|
1393
1405
|
merchant_id: string;
|
|
@@ -1406,6 +1418,11 @@ interface ProfileResponse {
|
|
|
1406
1418
|
payment_response_hash_key?: string | null;
|
|
1407
1419
|
webhook_details?: Record<string, unknown> | null;
|
|
1408
1420
|
metadata?: Record<string, unknown> | null;
|
|
1421
|
+
/**
|
|
1422
|
+
* Origins permitted to embed this profile's hosted checkout in an
|
|
1423
|
+
* iframe. See {@link ProfileCreateRequest.iframe_allowed_origins}.
|
|
1424
|
+
*/
|
|
1425
|
+
iframe_allowed_origins?: string[] | null;
|
|
1409
1426
|
[key: string]: unknown;
|
|
1410
1427
|
}
|
|
1411
1428
|
type BlocklistAddRequest = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1378,6 +1378,13 @@ interface ProfileCreateRequest {
|
|
|
1378
1378
|
redirect_to_merchant_with_http_post?: boolean | null;
|
|
1379
1379
|
webhook_details?: Record<string, unknown> | null;
|
|
1380
1380
|
metadata?: Record<string, unknown> | null;
|
|
1381
|
+
/**
|
|
1382
|
+
* Origins permitted to embed this profile's hosted checkout in an
|
|
1383
|
+
* iframe. Each entry is a full origin (`scheme://host[:port]`, no
|
|
1384
|
+
* path). Empty/null defaults to same-origin only — strict
|
|
1385
|
+
* clickjacking defense.
|
|
1386
|
+
*/
|
|
1387
|
+
iframe_allowed_origins?: string[] | null;
|
|
1381
1388
|
}
|
|
1382
1389
|
interface ProfileUpdateRequest {
|
|
1383
1390
|
profile_name?: string | null;
|
|
@@ -1388,6 +1395,11 @@ interface ProfileUpdateRequest {
|
|
|
1388
1395
|
webhook_details?: Record<string, unknown> | null;
|
|
1389
1396
|
metadata?: Record<string, unknown> | null;
|
|
1390
1397
|
payment_link_config?: BusinessPaymentLinkConfig | null;
|
|
1398
|
+
/**
|
|
1399
|
+
* Origins permitted to embed this profile's hosted checkout in an
|
|
1400
|
+
* iframe. See {@link ProfileCreateRequest.iframe_allowed_origins}.
|
|
1401
|
+
*/
|
|
1402
|
+
iframe_allowed_origins?: string[] | null;
|
|
1391
1403
|
}
|
|
1392
1404
|
interface ProfileResponse {
|
|
1393
1405
|
merchant_id: string;
|
|
@@ -1406,6 +1418,11 @@ interface ProfileResponse {
|
|
|
1406
1418
|
payment_response_hash_key?: string | null;
|
|
1407
1419
|
webhook_details?: Record<string, unknown> | null;
|
|
1408
1420
|
metadata?: Record<string, unknown> | null;
|
|
1421
|
+
/**
|
|
1422
|
+
* Origins permitted to embed this profile's hosted checkout in an
|
|
1423
|
+
* iframe. See {@link ProfileCreateRequest.iframe_allowed_origins}.
|
|
1424
|
+
*/
|
|
1425
|
+
iframe_allowed_origins?: string[] | null;
|
|
1409
1426
|
[key: string]: unknown;
|
|
1410
1427
|
}
|
|
1411
1428
|
type BlocklistAddRequest = {
|
package/dist/internal.cjs
CHANGED
|
@@ -3005,6 +3005,36 @@ var AdminPortal = class {
|
|
|
3005
3005
|
async deleteAccount(merchantId) {
|
|
3006
3006
|
return this.request("DELETE", `/admin-portal/accounts/${encodeURIComponent(merchantId)}`);
|
|
3007
3007
|
}
|
|
3008
|
+
/**
|
|
3009
|
+
* Create a brand-new user attached to the given merchant. The user is
|
|
3010
|
+
* marked `is_verified = true` so the admin can hand off credentials
|
|
3011
|
+
* immediately — no email round-trip is sent.
|
|
3012
|
+
*/
|
|
3013
|
+
async createUserForMerchant(customerId, body) {
|
|
3014
|
+
return this.request(
|
|
3015
|
+
"POST",
|
|
3016
|
+
`/admin-portal/customers/${encodeURIComponent(customerId)}/users`,
|
|
3017
|
+
{ body }
|
|
3018
|
+
);
|
|
3019
|
+
}
|
|
3020
|
+
/**
|
|
3021
|
+
* Edit a user record. Any subset of fields may be supplied. `role_id`
|
|
3022
|
+
* requires `merchant_id`. `password` triggers a password reset (validated
|
|
3023
|
+
* against signup policy + JWT blacklist). `reset_2fa` clears TOTP state
|
|
3024
|
+
* so the user re-enrolls on next login. `is_active` supports both
|
|
3025
|
+
* directions: false soft-disables, true reactivates a soft-disabled user.
|
|
3026
|
+
*/
|
|
3027
|
+
async updateUser(userId, body) {
|
|
3028
|
+
return this.request("PATCH", `/admin-portal/users/${encodeURIComponent(userId)}`, { body });
|
|
3029
|
+
}
|
|
3030
|
+
/**
|
|
3031
|
+
* Soft-delete a user globally: deactivates the row, blacklists existing
|
|
3032
|
+
* JWTs, and wipes credentials. Distinct from `deleteUserRole`, which
|
|
3033
|
+
* removes a single role binding while leaving the user signed-in elsewhere.
|
|
3034
|
+
*/
|
|
3035
|
+
async deleteUser(userId) {
|
|
3036
|
+
return this.request("DELETE", `/admin-portal/users/${encodeURIComponent(userId)}`);
|
|
3037
|
+
}
|
|
3008
3038
|
};
|
|
3009
3039
|
|
|
3010
3040
|
// src/internal/resources/auditLogs.ts
|