@delopay/sdk 0.5.1 → 0.7.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-NKSNI5HS.js +2817 -0
- package/dist/chunk-NKSNI5HS.js.map +1 -0
- package/dist/index.cjs +6 -278
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -412
- package/dist/index.d.ts +12 -412
- package/dist/index.js +15 -3070
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +3102 -0
- package/dist/internal.cjs.map +1 -0
- package/dist/internal.d.cts +398 -0
- package/dist/internal.d.ts +398 -0
- package/dist/internal.js +269 -0
- package/dist/internal.js.map +1 -0
- package/package.json +11 -1
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,6 @@ type EventType = 'payment_succeeded' | 'payment_failed' | 'payment_processing' |
|
|
|
26
26
|
type EventClass = 'payments' | 'refunds' | 'disputes' | 'mandates' | 'payouts' | 'subscriptions';
|
|
27
27
|
type WebhookDeliveryAttempt = 'initial_attempt' | 'automatic_retry' | 'manual_retry';
|
|
28
28
|
type BlocklistDataKind = 'payment_method' | 'card_bin' | 'extended_card_bin';
|
|
29
|
-
type GsmDecision = 'retry' | 'do_default';
|
|
30
29
|
type RelayType = 'refund' | 'capture' | 'incremental_authorization' | 'void';
|
|
31
30
|
type RelayStatus = 'created' | 'pending' | 'success' | 'failure';
|
|
32
31
|
type ThreeDSDecision = 'no_three_ds' | 'challenge_requested' | 'challenge_preferred' | 'three_ds_exemption_requested_tra' | 'three_ds_exemption_requested_low_value' | 'issuer_three_ds_exemption_requested';
|
|
@@ -1110,7 +1109,7 @@ interface FromEmailRequest {
|
|
|
1110
1109
|
* next based on the user's current state (e.g. TOTP not set → `totp`, TOTP
|
|
1111
1110
|
* verified → `reset_password`).
|
|
1112
1111
|
*/
|
|
1113
|
-
type TokenPurpose = 'totp' | 'reset_password' | 'sso' | '
|
|
1112
|
+
type TokenPurpose = 'totp' | 'reset_password' | 'sso' | 'verify_email' | string;
|
|
1114
1113
|
/** Response shape from endpoints that issue a new single-purpose token. */
|
|
1115
1114
|
interface TokenResponse {
|
|
1116
1115
|
/** Signed JWT — pass as `Authorization: Bearer <token>` on the next call. */
|
|
@@ -1143,188 +1142,9 @@ interface PhoneOtpVerifyRequest {
|
|
|
1143
1142
|
interface PhoneOtpVerifyResponse {
|
|
1144
1143
|
verified: boolean;
|
|
1145
1144
|
}
|
|
1146
|
-
type DashboardMetadataResponse = Record<string, unknown>;
|
|
1147
1145
|
interface UpdateUserDetailsRequest {
|
|
1148
1146
|
name?: string | null;
|
|
1149
1147
|
}
|
|
1150
|
-
interface AdminSignInRequest {
|
|
1151
|
-
email: string;
|
|
1152
|
-
password: string;
|
|
1153
|
-
}
|
|
1154
|
-
/**
|
|
1155
|
-
* Response returned by admin signup/signin endpoints.
|
|
1156
|
-
*
|
|
1157
|
-
* The admin flow is passwordless-after-signup: the endpoint triggers an
|
|
1158
|
-
* email (confirmation or sign-in link) and `is_email_sent` indicates whether
|
|
1159
|
-
* delivery was attempted successfully.
|
|
1160
|
-
*/
|
|
1161
|
-
interface AuthorizeResponse {
|
|
1162
|
-
is_email_sent: boolean;
|
|
1163
|
-
}
|
|
1164
|
-
/** Create a new internal DeloPay admin user. Requires the server admin API key. */
|
|
1165
|
-
interface CreateInternalUserRequest {
|
|
1166
|
-
name: string;
|
|
1167
|
-
email: string;
|
|
1168
|
-
password: string;
|
|
1169
|
-
/** Predefined internal role id (e.g. `internal_view_only`). Cannot be `internal_admin`. */
|
|
1170
|
-
role_id: string;
|
|
1171
|
-
}
|
|
1172
|
-
/** Create a new tenant-level admin user. Requires the server admin API key. */
|
|
1173
|
-
interface CreateTenantUserRequest {
|
|
1174
|
-
name: string;
|
|
1175
|
-
email: string;
|
|
1176
|
-
password: string;
|
|
1177
|
-
}
|
|
1178
|
-
/** Bootstrap a new merchant: creates user, merchant account, project, profile, and API keys in one call. */
|
|
1179
|
-
interface OnboardMerchantRequest {
|
|
1180
|
-
email: string;
|
|
1181
|
-
name: string;
|
|
1182
|
-
password: string;
|
|
1183
|
-
company_name: string;
|
|
1184
|
-
}
|
|
1185
|
-
/** All identifiers and keys produced by the onboard flow. */
|
|
1186
|
-
interface OnboardMerchantResponse {
|
|
1187
|
-
merchant_id: string;
|
|
1188
|
-
user_id: string;
|
|
1189
|
-
user_email: string;
|
|
1190
|
-
project_id: string;
|
|
1191
|
-
profile_id: string;
|
|
1192
|
-
/** Secret API key (sk_…). Show once; store securely. */
|
|
1193
|
-
api_key: string;
|
|
1194
|
-
/** Publishable key (pk_…) for client-side SDKs. */
|
|
1195
|
-
publishable_key: string;
|
|
1196
|
-
}
|
|
1197
|
-
/** Toggle public signup on or off at runtime. */
|
|
1198
|
-
interface SignupToggleRequest {
|
|
1199
|
-
enabled: boolean;
|
|
1200
|
-
}
|
|
1201
|
-
/** Current public-signup status. */
|
|
1202
|
-
interface SignupToggleResponse {
|
|
1203
|
-
signup_enabled: boolean;
|
|
1204
|
-
}
|
|
1205
|
-
interface AdminCustomerListParams {
|
|
1206
|
-
search?: string | null;
|
|
1207
|
-
is_active?: boolean | null;
|
|
1208
|
-
offset?: number | null;
|
|
1209
|
-
limit?: number | null;
|
|
1210
|
-
}
|
|
1211
|
-
interface CustomerSummary {
|
|
1212
|
-
customer_id: string;
|
|
1213
|
-
organization_id: string;
|
|
1214
|
-
shop_count: number;
|
|
1215
|
-
is_active: boolean;
|
|
1216
|
-
created_at: string;
|
|
1217
|
-
customer_name?: string | null;
|
|
1218
|
-
email?: string | null;
|
|
1219
|
-
}
|
|
1220
|
-
interface AdminCustomerListResponse {
|
|
1221
|
-
customers: CustomerSummary[];
|
|
1222
|
-
total_count: number;
|
|
1223
|
-
offset: number;
|
|
1224
|
-
limit: number;
|
|
1225
|
-
}
|
|
1226
|
-
interface CustomerUser {
|
|
1227
|
-
user_id: string;
|
|
1228
|
-
email?: string | null;
|
|
1229
|
-
name?: string | null;
|
|
1230
|
-
role_id?: string | null;
|
|
1231
|
-
is_active: boolean;
|
|
1232
|
-
created_at: string;
|
|
1233
|
-
}
|
|
1234
|
-
interface AdminCustomerDetail {
|
|
1235
|
-
customer_id: string;
|
|
1236
|
-
organization_id: string;
|
|
1237
|
-
employee_count: number;
|
|
1238
|
-
total_transactions: number;
|
|
1239
|
-
total_volume: number;
|
|
1240
|
-
created_at: string;
|
|
1241
|
-
customer_name?: string | null;
|
|
1242
|
-
projects: ProjectResponse[];
|
|
1243
|
-
shops: ShopResponse[];
|
|
1244
|
-
users: CustomerUser[];
|
|
1245
|
-
}
|
|
1246
|
-
interface AdminTransactionListParams {
|
|
1247
|
-
merchant_id?: string | null;
|
|
1248
|
-
shop_id?: string | null;
|
|
1249
|
-
status?: string | null;
|
|
1250
|
-
start_date?: string | null;
|
|
1251
|
-
end_date?: string | null;
|
|
1252
|
-
offset?: number | null;
|
|
1253
|
-
limit?: number | null;
|
|
1254
|
-
}
|
|
1255
|
-
interface AdminTransactionListResponse {
|
|
1256
|
-
data: PaymentResponse[];
|
|
1257
|
-
total_count?: number | null;
|
|
1258
|
-
}
|
|
1259
|
-
interface AdminAnalyticsRequest {
|
|
1260
|
-
start_date?: string | null;
|
|
1261
|
-
end_date?: string | null;
|
|
1262
|
-
}
|
|
1263
|
-
interface OverviewStat {
|
|
1264
|
-
label: string;
|
|
1265
|
-
value: number;
|
|
1266
|
-
change_percent: number;
|
|
1267
|
-
}
|
|
1268
|
-
interface OverviewStatsResponse {
|
|
1269
|
-
total_accounts: OverviewStat;
|
|
1270
|
-
total_admins: OverviewStat;
|
|
1271
|
-
audit_events: OverviewStat;
|
|
1272
|
-
}
|
|
1273
|
-
interface PlatformAnalyticsResponse {
|
|
1274
|
-
total_customers: number;
|
|
1275
|
-
total_shops: number;
|
|
1276
|
-
total_transactions: number;
|
|
1277
|
-
total_volume: number;
|
|
1278
|
-
total_fees_collected: number;
|
|
1279
|
-
period_start: string;
|
|
1280
|
-
period_end: string;
|
|
1281
|
-
}
|
|
1282
|
-
interface PaymentAnalyticsRequest {
|
|
1283
|
-
period?: number | null;
|
|
1284
|
-
currency?: string | null;
|
|
1285
|
-
}
|
|
1286
|
-
interface PaymentStat {
|
|
1287
|
-
label: string;
|
|
1288
|
-
value: number;
|
|
1289
|
-
change_percent: number;
|
|
1290
|
-
}
|
|
1291
|
-
interface PaymentAnalyticsResponse {
|
|
1292
|
-
total_volume: PaymentStat;
|
|
1293
|
-
success_rate: PaymentStat;
|
|
1294
|
-
transactions: PaymentStat;
|
|
1295
|
-
avg_transaction: PaymentStat;
|
|
1296
|
-
currency: string;
|
|
1297
|
-
period_days: number;
|
|
1298
|
-
}
|
|
1299
|
-
interface AuditLogListParams {
|
|
1300
|
-
user_id?: string | null;
|
|
1301
|
-
merchant_id?: string | null;
|
|
1302
|
-
profile_id?: string | null;
|
|
1303
|
-
action?: string | null;
|
|
1304
|
-
entity_type?: string | null;
|
|
1305
|
-
start_date?: string | null;
|
|
1306
|
-
end_date?: string | null;
|
|
1307
|
-
offset?: number | null;
|
|
1308
|
-
limit?: number | null;
|
|
1309
|
-
}
|
|
1310
|
-
interface AuditLogResponse {
|
|
1311
|
-
id: string;
|
|
1312
|
-
user_id: string;
|
|
1313
|
-
action: string;
|
|
1314
|
-
entity_type: string;
|
|
1315
|
-
created_at: string;
|
|
1316
|
-
merchant_id?: string | null;
|
|
1317
|
-
profile_id?: string | null;
|
|
1318
|
-
entity_id?: string | null;
|
|
1319
|
-
details?: unknown | null;
|
|
1320
|
-
ip_address?: string | null;
|
|
1321
|
-
}
|
|
1322
|
-
interface AuditLogListResponse {
|
|
1323
|
-
entries: AuditLogResponse[];
|
|
1324
|
-
total_count: number;
|
|
1325
|
-
offset: number;
|
|
1326
|
-
limit: number;
|
|
1327
|
-
}
|
|
1328
1148
|
interface MerchantAccountCreateRequest {
|
|
1329
1149
|
merchant_id: string;
|
|
1330
1150
|
merchant_name?: string | null;
|
|
@@ -1485,19 +1305,6 @@ interface AuthenticationResponse {
|
|
|
1485
1305
|
return_url?: string | null;
|
|
1486
1306
|
[key: string]: unknown;
|
|
1487
1307
|
}
|
|
1488
|
-
interface CardIssuerCreateRequest {
|
|
1489
|
-
issuer_name: string;
|
|
1490
|
-
}
|
|
1491
|
-
interface CardIssuerUpdateRequest {
|
|
1492
|
-
issuer_name: string;
|
|
1493
|
-
}
|
|
1494
|
-
interface CardIssuerResponse {
|
|
1495
|
-
id: string;
|
|
1496
|
-
issuer_name: string;
|
|
1497
|
-
}
|
|
1498
|
-
interface CardIssuerListResponse {
|
|
1499
|
-
issuers: CardIssuerResponse[];
|
|
1500
|
-
}
|
|
1501
1308
|
interface StripeConnectAccountRequest {
|
|
1502
1309
|
merchant_id: string;
|
|
1503
1310
|
profile_id: string;
|
|
@@ -1569,49 +1376,6 @@ interface EventDeliveryAttemptResponse {
|
|
|
1569
1376
|
response_body?: string | null;
|
|
1570
1377
|
error_message?: string | null;
|
|
1571
1378
|
}
|
|
1572
|
-
interface GsmRuleCreateRequest {
|
|
1573
|
-
connector: string;
|
|
1574
|
-
flow: string;
|
|
1575
|
-
sub_flow: string;
|
|
1576
|
-
code: string;
|
|
1577
|
-
message: string;
|
|
1578
|
-
status: string;
|
|
1579
|
-
decision: GsmDecision;
|
|
1580
|
-
step_up_possible: boolean;
|
|
1581
|
-
clear_pan_possible: boolean;
|
|
1582
|
-
router_error?: string | null;
|
|
1583
|
-
unified_code?: string | null;
|
|
1584
|
-
unified_message?: string | null;
|
|
1585
|
-
}
|
|
1586
|
-
interface GsmRuleUpdateRequest {
|
|
1587
|
-
connector: string;
|
|
1588
|
-
flow: string;
|
|
1589
|
-
sub_flow: string;
|
|
1590
|
-
code: string;
|
|
1591
|
-
message: string;
|
|
1592
|
-
status?: string | null;
|
|
1593
|
-
router_error?: string | null;
|
|
1594
|
-
decision?: GsmDecision | null;
|
|
1595
|
-
step_up_possible?: boolean | null;
|
|
1596
|
-
unified_code?: string | null;
|
|
1597
|
-
unified_message?: string | null;
|
|
1598
|
-
}
|
|
1599
|
-
interface GsmRuleResponse {
|
|
1600
|
-
connector: string;
|
|
1601
|
-
flow: string;
|
|
1602
|
-
sub_flow: string;
|
|
1603
|
-
code: string;
|
|
1604
|
-
message: string;
|
|
1605
|
-
status: string;
|
|
1606
|
-
decision: GsmDecision;
|
|
1607
|
-
step_up_possible: boolean;
|
|
1608
|
-
clear_pan_possible: boolean;
|
|
1609
|
-
feature: string;
|
|
1610
|
-
feature_data: unknown;
|
|
1611
|
-
router_error?: string | null;
|
|
1612
|
-
unified_code?: string | null;
|
|
1613
|
-
unified_message?: string | null;
|
|
1614
|
-
}
|
|
1615
1379
|
interface PollStatusResponse {
|
|
1616
1380
|
poll_id: string;
|
|
1617
1381
|
status: PollStatus;
|
|
@@ -1738,57 +1502,6 @@ interface RegionResponse {
|
|
|
1738
1502
|
[key: string]: unknown;
|
|
1739
1503
|
}
|
|
1740
1504
|
|
|
1741
|
-
declare class Admin {
|
|
1742
|
-
private readonly request;
|
|
1743
|
-
constructor(request: RequestFn);
|
|
1744
|
-
signIn(params: AdminSignInRequest): Promise<AuthResponse>;
|
|
1745
|
-
createInternalUser(params: CreateInternalUserRequest): Promise<AuthorizeResponse>;
|
|
1746
|
-
createTenant(params: CreateTenantUserRequest): Promise<AuthorizeResponse>;
|
|
1747
|
-
/**
|
|
1748
|
-
* Create a new merchant admin user and merchant account atomically.
|
|
1749
|
-
*
|
|
1750
|
-
* This is the correct endpoint for bootstrapping the first admin user in a
|
|
1751
|
-
* fresh deployment — `internal_signup`/`tenant_signup` both require
|
|
1752
|
-
* pre-existing merchant records that don't exist on a clean database.
|
|
1753
|
-
*
|
|
1754
|
-
* `POST /admin/signup_with_merchant_id`
|
|
1755
|
-
*/
|
|
1756
|
-
signupWithMerchantId(params: SignUpWithMerchantIdRequest): Promise<AuthorizeResponse>;
|
|
1757
|
-
/** Toggle public signup on/off. `POST /admin/settings/signup` */
|
|
1758
|
-
setSignupSettings(params: SignupToggleRequest): Promise<SignupToggleResponse>;
|
|
1759
|
-
/** Read current public-signup status. `GET /admin/settings/signup` */
|
|
1760
|
-
getSignupSettings(): Promise<SignupToggleResponse>;
|
|
1761
|
-
/** Full merchant bootstrap — user + merchant + project + profile + keys. `POST /admin/onboard_merchant` */
|
|
1762
|
-
onboardMerchant(params: OnboardMerchantRequest): Promise<OnboardMerchantResponse>;
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
declare class AdminPortal {
|
|
1766
|
-
private readonly request;
|
|
1767
|
-
constructor(request: RequestFn);
|
|
1768
|
-
listCustomers(params?: AdminCustomerListParams): Promise<AdminCustomerListResponse>;
|
|
1769
|
-
getCustomer(customerId: string): Promise<AdminCustomerDetail>;
|
|
1770
|
-
listTransactions(params?: AdminTransactionListParams): Promise<AdminTransactionListResponse>;
|
|
1771
|
-
analytics(params: AdminAnalyticsRequest): Promise<PlatformAnalyticsResponse>;
|
|
1772
|
-
overviewStats(): Promise<OverviewStatsResponse>;
|
|
1773
|
-
paymentAnalytics(params: PaymentAnalyticsRequest): Promise<PaymentAnalyticsResponse>;
|
|
1774
|
-
/**
|
|
1775
|
-
* Retrieve a merchant account via the admin portal. Unlike
|
|
1776
|
-
* `merchantAccounts.retrieve`, this route accepts an admin JWT (or admin API
|
|
1777
|
-
* key) and does not require the JWT to be scoped to the target merchant.
|
|
1778
|
-
*/
|
|
1779
|
-
retrieveAccount(merchantId: string): Promise<MerchantAccountResponse>;
|
|
1780
|
-
/**
|
|
1781
|
-
* Update a merchant account via the admin portal. Authenticated via admin JWT
|
|
1782
|
-
* or admin API key.
|
|
1783
|
-
*/
|
|
1784
|
-
updateAccount(merchantId: string, params: MerchantAccountUpdateRequest): Promise<MerchantAccountResponse>;
|
|
1785
|
-
/**
|
|
1786
|
-
* Delete a merchant account via the admin portal. Authenticated via admin JWT
|
|
1787
|
-
* or admin API key.
|
|
1788
|
-
*/
|
|
1789
|
-
deleteAccount(merchantId: string): Promise<MerchantAccountResponse>;
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
1505
|
/** Create and manage API keys for a merchant account. */
|
|
1793
1506
|
declare class ApiKeys {
|
|
1794
1507
|
private readonly request;
|
|
@@ -1840,13 +1553,6 @@ declare class ApiKeys {
|
|
|
1840
1553
|
list(merchantId: string): Promise<ApiKeyResponse[]>;
|
|
1841
1554
|
}
|
|
1842
1555
|
|
|
1843
|
-
declare class AuditLogs {
|
|
1844
|
-
private readonly request;
|
|
1845
|
-
constructor(request: RequestFn);
|
|
1846
|
-
list(params?: AuditLogListParams): Promise<AuditLogListResponse>;
|
|
1847
|
-
retrieve(logId: string): Promise<AuditLogResponse>;
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
1556
|
declare class Authentication {
|
|
1851
1557
|
private readonly request;
|
|
1852
1558
|
constructor(request: RequestFn);
|
|
@@ -1997,14 +1703,6 @@ declare class Blocklist {
|
|
|
1997
1703
|
toggle(params: BlocklistToggleParams): Promise<Record<string, unknown>>;
|
|
1998
1704
|
}
|
|
1999
1705
|
|
|
2000
|
-
declare class CardIssuers {
|
|
2001
|
-
private readonly request;
|
|
2002
|
-
constructor(request: RequestFn);
|
|
2003
|
-
create(params: CardIssuerCreateRequest): Promise<CardIssuerResponse>;
|
|
2004
|
-
update(issuerId: string, params: CardIssuerUpdateRequest): Promise<CardIssuerResponse>;
|
|
2005
|
-
list(): Promise<CardIssuerListResponse>;
|
|
2006
|
-
}
|
|
2007
|
-
|
|
2008
1706
|
declare class Connectors {
|
|
2009
1707
|
private readonly request;
|
|
2010
1708
|
constructor(request: RequestFn);
|
|
@@ -2203,107 +1901,41 @@ declare class Events {
|
|
|
2203
1901
|
}
|
|
2204
1902
|
|
|
2205
1903
|
/**
|
|
2206
|
-
*
|
|
2207
|
-
*
|
|
1904
|
+
* Merchant-scoped fee schedules. Each schedule optionally targets a
|
|
1905
|
+
* specific shop (via `shop_id`). Merchants can CRUD their own fee
|
|
1906
|
+
* overrides; platform-wide fee programs are administered by Delopay and
|
|
1907
|
+
* not exposed here.
|
|
2208
1908
|
*/
|
|
2209
|
-
declare class
|
|
2210
|
-
private readonly request;
|
|
2211
|
-
constructor(request: RequestFn);
|
|
2212
|
-
/**
|
|
2213
|
-
* Create a new platform fee schedule for a merchant (admin only).
|
|
2214
|
-
*
|
|
2215
|
-
* @param params - Fee schedule parameters (percentage, flat fee, min/max).
|
|
2216
|
-
* @param merchantId - The merchant account to attach the schedule to.
|
|
2217
|
-
* @returns The created fee schedule.
|
|
2218
|
-
*/
|
|
2219
|
-
create(params: FeeScheduleCreateRequest, merchantId: string): Promise<FeeScheduleResponse>;
|
|
2220
|
-
/**
|
|
2221
|
-
* List all platform fee schedules for a merchant (admin only).
|
|
2222
|
-
*
|
|
2223
|
-
* @param merchantId - The merchant account ID.
|
|
2224
|
-
* @returns Array of fee schedules.
|
|
2225
|
-
*/
|
|
2226
|
-
list(merchantId: string): Promise<FeeScheduleResponse[]>;
|
|
2227
|
-
/**
|
|
2228
|
-
* Retrieve a single fee schedule by ID (admin only).
|
|
2229
|
-
*
|
|
2230
|
-
* @param feeId - The fee schedule ID.
|
|
2231
|
-
* @returns The fee schedule.
|
|
2232
|
-
*/
|
|
2233
|
-
retrieve(feeId: string): Promise<FeeScheduleResponse>;
|
|
2234
|
-
/**
|
|
2235
|
-
* Update a fee schedule (admin only).
|
|
2236
|
-
*
|
|
2237
|
-
* @param feeId - The fee schedule ID to update.
|
|
2238
|
-
* @param params - Fields to update.
|
|
2239
|
-
* @returns The updated fee schedule.
|
|
2240
|
-
*/
|
|
2241
|
-
update(feeId: string, params: FeeScheduleUpdateRequest): Promise<FeeScheduleResponse>;
|
|
2242
|
-
/**
|
|
2243
|
-
* Delete a fee schedule (admin only).
|
|
2244
|
-
*
|
|
2245
|
-
* @param feeId - The fee schedule ID to delete.
|
|
2246
|
-
* @returns The deleted fee schedule.
|
|
2247
|
-
*/
|
|
2248
|
-
delete(feeId: string): Promise<FeeScheduleResponse>;
|
|
2249
|
-
}
|
|
2250
|
-
/** Per-shop merchant fee schedule overrides (merchant-scoped). */
|
|
2251
|
-
declare class MerchantFees {
|
|
1909
|
+
declare class Fees {
|
|
2252
1910
|
private readonly request;
|
|
2253
1911
|
constructor(request: RequestFn);
|
|
2254
1912
|
/**
|
|
2255
|
-
* Create a merchant-scoped fee schedule
|
|
1913
|
+
* Create a merchant-scoped fee schedule (optionally per-shop).
|
|
2256
1914
|
*
|
|
2257
1915
|
* @param params - Fee schedule parameters.
|
|
2258
1916
|
* @param merchantId - The merchant account ID.
|
|
2259
|
-
* @returns The created fee schedule.
|
|
2260
1917
|
*/
|
|
2261
1918
|
create(params: FeeScheduleCreateRequest, merchantId: string): Promise<FeeScheduleResponse>;
|
|
2262
1919
|
/**
|
|
2263
|
-
* List merchant
|
|
1920
|
+
* List the merchant's own fee schedules.
|
|
2264
1921
|
*
|
|
2265
1922
|
* @param merchantId - The merchant account ID.
|
|
2266
|
-
* @returns Array of fee schedules.
|
|
2267
1923
|
*/
|
|
2268
1924
|
list(merchantId: string): Promise<FeeScheduleResponse[]>;
|
|
2269
1925
|
/**
|
|
2270
1926
|
* Update a merchant-scoped fee schedule.
|
|
2271
1927
|
*
|
|
2272
|
-
* @param feeId - The fee schedule ID
|
|
1928
|
+
* @param feeId - The fee schedule ID.
|
|
2273
1929
|
* @param params - Fields to update.
|
|
2274
|
-
* @returns The updated fee schedule.
|
|
2275
1930
|
*/
|
|
2276
1931
|
update(feeId: string, params: FeeScheduleUpdateRequest): Promise<FeeScheduleResponse>;
|
|
2277
1932
|
/**
|
|
2278
1933
|
* Delete a merchant-scoped fee schedule.
|
|
2279
1934
|
*
|
|
2280
|
-
* @param feeId - The fee schedule ID
|
|
2281
|
-
* @returns The deleted fee schedule.
|
|
1935
|
+
* @param feeId - The fee schedule ID.
|
|
2282
1936
|
*/
|
|
2283
1937
|
delete(feeId: string): Promise<FeeScheduleResponse>;
|
|
2284
1938
|
}
|
|
2285
|
-
/**
|
|
2286
|
-
* Manage Delopay platform fee schedules.
|
|
2287
|
-
*
|
|
2288
|
-
* - `fees.platform` — admin-only CRUD for per-merchant fee schedules.
|
|
2289
|
-
* - `fees.merchant` — merchant-scoped per-shop fee schedule overrides.
|
|
2290
|
-
*/
|
|
2291
|
-
declare class Fees {
|
|
2292
|
-
/** Admin-managed platform fee schedules. */
|
|
2293
|
-
readonly platform: PlatformFees;
|
|
2294
|
-
/** Merchant-managed per-shop fee schedule overrides. */
|
|
2295
|
-
readonly merchant: MerchantFees;
|
|
2296
|
-
constructor(request: RequestFn);
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
declare class Gsm {
|
|
2300
|
-
private readonly request;
|
|
2301
|
-
constructor(request: RequestFn);
|
|
2302
|
-
create(params: GsmRuleCreateRequest): Promise<GsmRuleResponse>;
|
|
2303
|
-
retrieve(params: Record<string, unknown>): Promise<GsmRuleResponse>;
|
|
2304
|
-
update(params: GsmRuleUpdateRequest): Promise<GsmRuleResponse>;
|
|
2305
|
-
delete(params: Record<string, unknown>): Promise<GsmRuleResponse>;
|
|
2306
|
-
}
|
|
2307
1939
|
|
|
2308
1940
|
/** View and revoke recurring payment mandates. */
|
|
2309
1941
|
declare class Mandates {
|
|
@@ -3039,8 +2671,7 @@ declare class Users {
|
|
|
3039
2671
|
* `generateRecoveryCodes`, `terminate2fa`) and setting it on the client
|
|
3040
2672
|
* via `setJwtToken` before calling this method. `body.token` must still
|
|
3041
2673
|
* be the original `EmailToken` from the reset-link URL — the handler
|
|
3042
|
-
* decodes it a second time to find the user
|
|
3043
|
-
* (`delopay-backend/crates/router/src/core/user.rs:687`).
|
|
2674
|
+
* decodes it a second time to find the user.
|
|
3044
2675
|
*/
|
|
3045
2676
|
resetPassword(params: ResetPasswordRequest): Promise<Record<string, unknown>>;
|
|
3046
2677
|
/**
|
|
@@ -3087,8 +2718,6 @@ declare class Users {
|
|
|
3087
2718
|
listUserRoles(params?: Record<string, unknown>): Promise<Record<string, unknown>[]>;
|
|
3088
2719
|
updateUserRole(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3089
2720
|
deleteUserRole(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3090
|
-
getDashboardMetadata(params?: Record<string, unknown>): Promise<DashboardMetadataResponse>;
|
|
3091
|
-
setDashboardMetadata(params: Record<string, unknown>): Promise<DashboardMetadataResponse>;
|
|
3092
2721
|
/** Sign in (v2). `POST /user/v2/signin` */
|
|
3093
2722
|
signInV2(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3094
2723
|
/** Sign in via OIDC. `POST /user/oidc` */
|
|
@@ -3136,8 +2765,6 @@ declare class Users {
|
|
|
3136
2765
|
acceptInvitationV2(params: Record<string, unknown>): Promise<AuthResponse>;
|
|
3137
2766
|
/** Resend invite. `POST /user/user/resend_invite` */
|
|
3138
2767
|
resendInvite(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3139
|
-
/** Clone connector. `POST /user/clone_connector` */
|
|
3140
|
-
cloneConnector(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3141
2768
|
/** Get role (v2). `GET /user/role/v2` */
|
|
3142
2769
|
getRoleV2(): Promise<Record<string, unknown>>;
|
|
3143
2770
|
/** Get role (v3). `GET /user/role/v3` */
|
|
@@ -3221,13 +2848,6 @@ declare class AnalyticsDashboard {
|
|
|
3221
2848
|
generate(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3222
2849
|
}
|
|
3223
2850
|
|
|
3224
|
-
declare class Cache {
|
|
3225
|
-
private readonly request;
|
|
3226
|
-
constructor(request: RequestFn);
|
|
3227
|
-
/** Invalidate a cache entry by key. `POST /cache/invalidate/{key}` */
|
|
3228
|
-
invalidate(key: string): Promise<Record<string, unknown>>;
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3231
2851
|
declare class Cards {
|
|
3232
2852
|
private readonly request;
|
|
3233
2853
|
constructor(request: RequestFn);
|
|
@@ -3239,19 +2859,6 @@ declare class Cards {
|
|
|
3239
2859
|
retrieve(bin: string): Promise<Record<string, unknown>>;
|
|
3240
2860
|
}
|
|
3241
2861
|
|
|
3242
|
-
declare class Configs {
|
|
3243
|
-
private readonly request;
|
|
3244
|
-
constructor(request: RequestFn);
|
|
3245
|
-
/** Create a config. `POST /configs` */
|
|
3246
|
-
create(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3247
|
-
/** Retrieve a config by key. `GET /configs/{key}` */
|
|
3248
|
-
retrieve(key: string): Promise<Record<string, unknown>>;
|
|
3249
|
-
/** Update a config. `PUT /configs/{key}` */
|
|
3250
|
-
update(key: string, params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3251
|
-
/** Delete a config. `DELETE /configs/{key}` */
|
|
3252
|
-
delete(key: string): Promise<Record<string, unknown>>;
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
2862
|
declare class Export {
|
|
3256
2863
|
private readonly request;
|
|
3257
2864
|
constructor(request: RequestFn);
|
|
@@ -3427,15 +3034,10 @@ declare class Delopay {
|
|
|
3427
3034
|
readonly authentication: Authentication;
|
|
3428
3035
|
readonly verification: Verification;
|
|
3429
3036
|
readonly users: Users;
|
|
3430
|
-
readonly admin: Admin;
|
|
3431
|
-
readonly adminPortal: AdminPortal;
|
|
3432
3037
|
readonly apiKeys: ApiKeys;
|
|
3433
|
-
readonly auditLogs: AuditLogs;
|
|
3434
3038
|
readonly billing: Billing;
|
|
3435
3039
|
readonly blocklist: Blocklist;
|
|
3436
|
-
readonly cardIssuers: CardIssuers;
|
|
3437
3040
|
readonly fees: Fees;
|
|
3438
|
-
readonly gsm: Gsm;
|
|
3439
3041
|
readonly merchantAccounts: MerchantAccounts;
|
|
3440
3042
|
readonly projects: Projects;
|
|
3441
3043
|
readonly relay: Relay;
|
|
@@ -3450,8 +3052,6 @@ declare class Delopay {
|
|
|
3450
3052
|
readonly analyticsDashboard: AnalyticsDashboard;
|
|
3451
3053
|
readonly featureMatrix: FeatureMatrix;
|
|
3452
3054
|
readonly cards: Cards;
|
|
3453
|
-
readonly configs: Configs;
|
|
3454
|
-
readonly cache: Cache;
|
|
3455
3055
|
/**
|
|
3456
3056
|
* Create a new Delopay client.
|
|
3457
3057
|
*
|
|
@@ -3623,4 +3223,4 @@ declare const Webhooks: {
|
|
|
3623
3223
|
verify(rawBody: string, signatureHeader: string, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
|
|
3624
3224
|
};
|
|
3625
3225
|
|
|
3626
|
-
export { type Address, type AddressDetails, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type
|
|
3226
|
+
export { type Address, type AddressDetails, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, Forex, type ForgotPasswordRequest, type FromEmailRequest, type GatewayConnectRequest, type GatewayResponse, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LedgerEntry, type LedgerListParams, type LedgerResponse, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutingConfigCreateRequest, type RoutingConfigResponse, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type UpdateUserDetailsRequest, type UserResponse, type VerifyOptions, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks };
|