@delopay/sdk 0.27.0 → 0.29.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-TE4LLC2R.js → chunk-4Q3E7XLP.js} +26 -27
- package/dist/chunk-4Q3E7XLP.js.map +1 -0
- package/dist/index.cjs +25 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -49
- package/dist/index.d.ts +44 -49
- package/dist/index.js +1 -1
- package/dist/internal.cjs +25 -26
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +3 -3
- package/dist/internal.d.ts +3 -3
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-TE4LLC2R.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -12,11 +12,10 @@ type PaymentMethod = 'card' | 'card_redirect' | 'pay_later' | 'wallet' | 'bank_r
|
|
|
12
12
|
type PaymentMethodType = string;
|
|
13
13
|
type ConnectorType = 'payment_processor' | 'payment_vas' | 'fin_operations' | 'fiz_operations' | 'networks' | 'banking_entities' | 'non_banking_finance' | 'payout_processor' | 'payment_method_auth' | 'authentication_processor' | 'tax_processor' | 'billing_processor' | 'vault_processor';
|
|
14
14
|
/**
|
|
15
|
-
* Snake-case connector identifiers
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* error. Known names get IDE autocomplete.
|
|
15
|
+
* Snake-case connector identifiers recognized by the Delopay API. The
|
|
16
|
+
* trailing `string` keeps this type open: new connectors may be added
|
|
17
|
+
* to the API before the SDK is updated, so any name can be passed
|
|
18
|
+
* without a type error. Known names get IDE autocomplete.
|
|
20
19
|
*/
|
|
21
20
|
type Connector = 'aci' | 'adyen' | 'adyenplatform' | 'affirm' | 'airwallex' | 'amazonpay' | 'archipel' | 'authipay' | 'authorizedotnet' | 'bambora' | 'bamboraapac' | 'bankofamerica' | 'barclaycard' | 'billwerk' | 'bitpay' | 'blackhawknetwork' | 'bluesnap' | 'boku' | 'braintree' | 'breadpay' | 'calida' | 'cardinal' | 'cashtocode' | 'celero' | 'chargebee' | 'checkbook' | 'checkout' | 'coinbase' | 'coingate' | 'creem' | 'cryptomus' | 'cryptopay' | 'ctp_mastercard' | 'ctp_visa' | 'cybersource' | 'cybersourcedecisionmanager' | 'datatrans' | 'delopay_vault' | 'delopaythreedsserver' | 'deutschebank' | 'digitalvirgo' | 'dlocal' | 'dwolla' | 'ebanx' | 'elavon' | 'envoy' | 'facilitapay' | 'finix' | 'fiserv' | 'fiservcommercehub' | 'fiservemea' | 'fiuu' | 'flexiti' | 'forte' | 'getnet' | 'gigadat' | 'globalpay' | 'globepay' | 'gocardless' | 'gpayments' | 'helcim' | 'hipay' | 'hyperpg' | 'iatapay' | 'inespay' | 'itaubank' | 'jpmorgan' | 'klarna' | 'loonio' | 'mifinity' | 'mollie' | 'moneris' | 'multisafepay' | 'netcetera' | 'nexinets' | 'nexixpay' | 'nmi' | 'nomupay' | 'noon' | 'nordea' | 'novalnet' | 'nowpayments' | 'nuvei' | 'opennode' | 'paybox' | 'payload' | 'payme' | 'payone' | 'paypal' | 'paysafe' | 'paysepro' | 'paystack' | 'paytm' | 'payu' | 'payjustnow' | 'payjustnowinstore' | 'peachpayments' | 'phonepe' | 'placetopay' | 'plaid' | 'powertranz' | 'prophetpay' | 'rapyd' | 'razorpay' | 'recurly' | 'redsys' | 'revolv3' | 'riskified' | 'santander' | 'shift4' | 'signifyd' | 'silverflow' | 'skinsback' | 'square' | 'stax' | 'stripe' | 'stripebilling' | 'taxjar' | 'tesouro' | 'threedsecureio' | 'tokenex' | 'tokenio' | 'truelayer' | 'trustly' | 'trustpay' | 'trustpayments' | 'tsys' | 'vgs' | 'volt' | 'wellsfargo' | 'wise' | 'worldline' | 'worldpay' | 'worldpaymodular' | 'worldpayvantiv' | 'worldpayxml' | 'xendit' | 'zen' | 'zift' | 'zsl' | (string & {});
|
|
22
21
|
type DisputeStage = 'pre_dispute' | 'dispute' | 'pre_arbitration' | 'arbitration' | 'dispute_reversal';
|
|
@@ -347,8 +346,8 @@ interface PaymentListParams {
|
|
|
347
346
|
interface PaymentRetrieveOptions {
|
|
348
347
|
/** Reconcile intent state with the connector before responding. */
|
|
349
348
|
force_sync?: boolean;
|
|
350
|
-
/**
|
|
351
|
-
* `requires_payment_method`
|
|
349
|
+
/** Force a connector sync even for intents in early states like
|
|
350
|
+
* `requires_payment_method` that would otherwise return the local snapshot. */
|
|
352
351
|
all_keys_required?: boolean;
|
|
353
352
|
}
|
|
354
353
|
interface PaymentListResponse {
|
|
@@ -758,7 +757,6 @@ interface ProfileLogoUploadResponse {
|
|
|
758
757
|
* Event scope when registering a connector webhook.
|
|
759
758
|
* - `'all_events'`: wildcard registration (cheapest default).
|
|
760
759
|
* - `{ specific_event: '<EventType>' }`: register only one event type.
|
|
761
|
-
* Matches the backend's internally-tagged `ConnectorWebhookEventType`.
|
|
762
760
|
*/
|
|
763
761
|
type ConnectorWebhookEventType = 'all_events' | {
|
|
764
762
|
specific_event: string;
|
|
@@ -1335,6 +1333,7 @@ interface SwitchProfileRequest {
|
|
|
1335
1333
|
interface InviteUsersRequest {
|
|
1336
1334
|
email: string;
|
|
1337
1335
|
role_id: string;
|
|
1336
|
+
profile_ids?: string[];
|
|
1338
1337
|
}
|
|
1339
1338
|
interface InviteUsersResponse {
|
|
1340
1339
|
email: string;
|
|
@@ -1357,7 +1356,7 @@ interface FromEmailRequest {
|
|
|
1357
1356
|
token: string;
|
|
1358
1357
|
}
|
|
1359
1358
|
/**
|
|
1360
|
-
* Purpose of a single-purpose JWT. The
|
|
1359
|
+
* Purpose of a single-purpose JWT. The API decides which purpose to issue
|
|
1361
1360
|
* next based on the user's current state (e.g. TOTP not set → `totp`, TOTP
|
|
1362
1361
|
* verified → `reset_password`).
|
|
1363
1362
|
*/
|
|
@@ -1376,13 +1375,13 @@ interface VerifyTotpRequest {
|
|
|
1376
1375
|
/** Optional query params for `GET /user/2fa/terminate`. */
|
|
1377
1376
|
interface Terminate2faQueryParams {
|
|
1378
1377
|
/**
|
|
1379
|
-
* Skip the TOTP requirement entirely. Only honored when the
|
|
1380
|
-
* `force_two_factor_auth = false`. Use sparingly
|
|
1378
|
+
* Skip the TOTP requirement entirely. Only honored when the server has
|
|
1379
|
+
* `force_two_factor_auth = false`. Use sparingly -- it weakens security.
|
|
1381
1380
|
*/
|
|
1382
1381
|
skip_two_factor_auth?: boolean;
|
|
1383
1382
|
}
|
|
1384
1383
|
/**
|
|
1385
|
-
* Optional query for `GET /user/me/login-activity`.
|
|
1384
|
+
* Optional query for `GET /user/me/login-activity`. The API clamps `limit`
|
|
1386
1385
|
* to `1..=200` (default 25) and floors `offset` at 0 (default 0).
|
|
1387
1386
|
*/
|
|
1388
1387
|
interface LoginHistoryParams {
|
|
@@ -1407,9 +1406,8 @@ interface LoginHistoryParams {
|
|
|
1407
1406
|
* `password`, `magic_link`, `sso_oidc`, `totp`, `recovery_code`.
|
|
1408
1407
|
*
|
|
1409
1408
|
* Geo fields (`country_code`, `city`, `latitude`, `longitude`) are populated
|
|
1410
|
-
* by
|
|
1411
|
-
*
|
|
1412
|
-
* GeoIP service is disabled in backend config.
|
|
1409
|
+
* by a GeoIP lookup at signin time. They stay `null` for private/loopback
|
|
1410
|
+
* IPs, when the lookup misses, or when GeoIP is not enabled.
|
|
1413
1411
|
*/
|
|
1414
1412
|
interface LoginHistoryEntry {
|
|
1415
1413
|
id: string;
|
|
@@ -1429,11 +1427,10 @@ interface LoginHistoryEntry {
|
|
|
1429
1427
|
* Response shape for `GET /user/me/login-activity`. `total_count` is the
|
|
1430
1428
|
* unpaginated row count for client-side page-count calculation.
|
|
1431
1429
|
*
|
|
1432
|
-
* When
|
|
1433
|
-
*
|
|
1434
|
-
*
|
|
1435
|
-
*
|
|
1436
|
-
* their real activity by switching back to the admin organization.
|
|
1430
|
+
* When a Delopay admin is impersonating a merchant, the API returns
|
|
1431
|
+
* `entries: []` and `total_count: 0` so the admin's IP / geo data is
|
|
1432
|
+
* not exposed inside the merchant dashboard. The admin can still see
|
|
1433
|
+
* their own activity by switching back to the admin organization.
|
|
1437
1434
|
*/
|
|
1438
1435
|
interface LoginHistoryResponse {
|
|
1439
1436
|
entries: LoginHistoryEntry[];
|
|
@@ -1877,10 +1874,9 @@ interface RegionResponse {
|
|
|
1877
1874
|
[key: string]: unknown;
|
|
1878
1875
|
}
|
|
1879
1876
|
/**
|
|
1880
|
-
* Top-level permission group
|
|
1881
|
-
*
|
|
1882
|
-
*
|
|
1883
|
-
* the caller can't perform reads this off `getRoleV3()`.
|
|
1877
|
+
* Top-level permission group recognized by the Delopay API. The
|
|
1878
|
+
* dashboard (or any client) uses these to hide UI elements for actions
|
|
1879
|
+
* the caller's role cannot perform, via `getRolePermissions()`.
|
|
1884
1880
|
*/
|
|
1885
1881
|
type ParentGroup = 'Operations' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails';
|
|
1886
1882
|
/** Two scopes — `Read` allows viewing, `Write` is required for any mutation. */
|
|
@@ -2095,8 +2091,8 @@ declare class Connectors {
|
|
|
2095
2091
|
* `POST /account/{merchantId}/connectors/webhooks/{connectorId}`
|
|
2096
2092
|
*
|
|
2097
2093
|
* @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`
|
|
2098
|
-
*
|
|
2099
|
-
* to
|
|
2094
|
+
* when omitted; pass `{ event_type: { specific_event: '…' } }` to scope
|
|
2095
|
+
* to a single event.
|
|
2100
2096
|
*/
|
|
2101
2097
|
registerWebhook(merchantId: string, connectorId: string, params?: ConnectorWebhookRegisterRequest): Promise<ConnectorWebhookRegisterResponse>;
|
|
2102
2098
|
/** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
|
|
@@ -2511,13 +2507,12 @@ declare class Payments {
|
|
|
2511
2507
|
* Retrieve a payment by its ID.
|
|
2512
2508
|
*
|
|
2513
2509
|
* @param paymentId - The unique payment intent ID.
|
|
2514
|
-
* @param options - Optional query flags. `force_sync`
|
|
2515
|
-
*
|
|
2516
|
-
* stuck intent when a webhook was lost). `all_keys_required`
|
|
2517
|
-
*
|
|
2518
|
-
*
|
|
2519
|
-
*
|
|
2520
|
-
* helpers; API-key callers can use them too where the backend allows.
|
|
2510
|
+
* @param options - Optional query flags. `force_sync` reconciles the
|
|
2511
|
+
* intent's state with the connector before returning (useful to recover
|
|
2512
|
+
* a stuck intent when a webhook was lost). `all_keys_required` forces a
|
|
2513
|
+
* connector sync even for intents in early states like
|
|
2514
|
+
* `requires_payment_method` that would otherwise return the local
|
|
2515
|
+
* snapshot. Both flags work with JWT and API-key authentication.
|
|
2521
2516
|
* @returns The payment intent.
|
|
2522
2517
|
*
|
|
2523
2518
|
* @example
|
|
@@ -3121,16 +3116,15 @@ declare class Users {
|
|
|
3121
3116
|
signIn(params: SignInRequest): Promise<AuthResponse>;
|
|
3122
3117
|
signOut(): Promise<Record<string, unknown>>;
|
|
3123
3118
|
/**
|
|
3124
|
-
* Paginated login history for the authenticated user
|
|
3125
|
-
* country / city / lat-lon (when GeoIP is enabled
|
|
3126
|
-
*
|
|
3127
|
-
*
|
|
3119
|
+
* Paginated login history for the authenticated user -- IP, User-Agent,
|
|
3120
|
+
* country / city / lat-lon (when GeoIP is enabled), success and failure
|
|
3121
|
+
* events with their reasons. Strictly scoped to the JWT subject; a user
|
|
3122
|
+
* can only see their own activity.
|
|
3128
3123
|
*
|
|
3129
3124
|
* `GET /user/me/login-activity`. Requires a logged-in JWT.
|
|
3130
3125
|
*
|
|
3131
|
-
*
|
|
3132
|
-
*
|
|
3133
|
-
* merchant dashboard.
|
|
3126
|
+
* Returns an empty page when a Delopay admin is impersonating a merchant,
|
|
3127
|
+
* so the admin's metadata is not exposed inside the merchant dashboard.
|
|
3134
3128
|
*/
|
|
3135
3129
|
listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse>;
|
|
3136
3130
|
/**
|
|
@@ -3162,15 +3156,14 @@ declare class Users {
|
|
|
3162
3156
|
update(params: UpdateUserDetailsRequest): Promise<UserResponse>;
|
|
3163
3157
|
/**
|
|
3164
3158
|
* Permanently delete the caller's account. Requires a fresh password
|
|
3165
|
-
* (and a current 6-digit TOTP code if the user has TOTP enrolled).
|
|
3166
|
-
*
|
|
3167
|
-
*
|
|
3168
|
-
*
|
|
3169
|
-
* caller should clear local credentials and route to the login page.
|
|
3159
|
+
* (and a current 6-digit TOTP code if the user has TOTP enrolled). On
|
|
3160
|
+
* success all role assignments are removed, the user record is
|
|
3161
|
+
* deactivated, and all in-flight sessions are invalidated. The caller
|
|
3162
|
+
* should clear local credentials and route to the login page.
|
|
3170
3163
|
*
|
|
3171
|
-
*
|
|
3172
|
-
* owner-level admin of an org / merchant / profile
|
|
3173
|
-
* ownership first.
|
|
3164
|
+
* Returns `InvalidDeleteOperation` when the caller is the sole
|
|
3165
|
+
* owner-level admin of an org / merchant / profile -- they must
|
|
3166
|
+
* transfer ownership first.
|
|
3174
3167
|
*/
|
|
3175
3168
|
deleteAccount(params: DeleteAccountRequest): Promise<Record<string, unknown>>;
|
|
3176
3169
|
changePassword(params: ChangePasswordRequest): Promise<UserResponse>;
|
|
@@ -3276,7 +3269,9 @@ declare class Users {
|
|
|
3276
3269
|
/** Select auth method. `POST /user/auth/select` */
|
|
3277
3270
|
selectAuth(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3278
3271
|
/** List users in lineage. `GET /user/employees/list` */
|
|
3279
|
-
listUsersInLineage(
|
|
3272
|
+
listUsersInLineage(params?: {
|
|
3273
|
+
entity_type?: string;
|
|
3274
|
+
}): Promise<Record<string, unknown>[]>;
|
|
3280
3275
|
/** Resend invite. `POST /user/employees/resend-invite` */
|
|
3281
3276
|
resendInvite(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3282
3277
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -12,11 +12,10 @@ type PaymentMethod = 'card' | 'card_redirect' | 'pay_later' | 'wallet' | 'bank_r
|
|
|
12
12
|
type PaymentMethodType = string;
|
|
13
13
|
type ConnectorType = 'payment_processor' | 'payment_vas' | 'fin_operations' | 'fiz_operations' | 'networks' | 'banking_entities' | 'non_banking_finance' | 'payout_processor' | 'payment_method_auth' | 'authentication_processor' | 'tax_processor' | 'billing_processor' | 'vault_processor';
|
|
14
14
|
/**
|
|
15
|
-
* Snake-case connector identifiers
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* error. Known names get IDE autocomplete.
|
|
15
|
+
* Snake-case connector identifiers recognized by the Delopay API. The
|
|
16
|
+
* trailing `string` keeps this type open: new connectors may be added
|
|
17
|
+
* to the API before the SDK is updated, so any name can be passed
|
|
18
|
+
* without a type error. Known names get IDE autocomplete.
|
|
20
19
|
*/
|
|
21
20
|
type Connector = 'aci' | 'adyen' | 'adyenplatform' | 'affirm' | 'airwallex' | 'amazonpay' | 'archipel' | 'authipay' | 'authorizedotnet' | 'bambora' | 'bamboraapac' | 'bankofamerica' | 'barclaycard' | 'billwerk' | 'bitpay' | 'blackhawknetwork' | 'bluesnap' | 'boku' | 'braintree' | 'breadpay' | 'calida' | 'cardinal' | 'cashtocode' | 'celero' | 'chargebee' | 'checkbook' | 'checkout' | 'coinbase' | 'coingate' | 'creem' | 'cryptomus' | 'cryptopay' | 'ctp_mastercard' | 'ctp_visa' | 'cybersource' | 'cybersourcedecisionmanager' | 'datatrans' | 'delopay_vault' | 'delopaythreedsserver' | 'deutschebank' | 'digitalvirgo' | 'dlocal' | 'dwolla' | 'ebanx' | 'elavon' | 'envoy' | 'facilitapay' | 'finix' | 'fiserv' | 'fiservcommercehub' | 'fiservemea' | 'fiuu' | 'flexiti' | 'forte' | 'getnet' | 'gigadat' | 'globalpay' | 'globepay' | 'gocardless' | 'gpayments' | 'helcim' | 'hipay' | 'hyperpg' | 'iatapay' | 'inespay' | 'itaubank' | 'jpmorgan' | 'klarna' | 'loonio' | 'mifinity' | 'mollie' | 'moneris' | 'multisafepay' | 'netcetera' | 'nexinets' | 'nexixpay' | 'nmi' | 'nomupay' | 'noon' | 'nordea' | 'novalnet' | 'nowpayments' | 'nuvei' | 'opennode' | 'paybox' | 'payload' | 'payme' | 'payone' | 'paypal' | 'paysafe' | 'paysepro' | 'paystack' | 'paytm' | 'payu' | 'payjustnow' | 'payjustnowinstore' | 'peachpayments' | 'phonepe' | 'placetopay' | 'plaid' | 'powertranz' | 'prophetpay' | 'rapyd' | 'razorpay' | 'recurly' | 'redsys' | 'revolv3' | 'riskified' | 'santander' | 'shift4' | 'signifyd' | 'silverflow' | 'skinsback' | 'square' | 'stax' | 'stripe' | 'stripebilling' | 'taxjar' | 'tesouro' | 'threedsecureio' | 'tokenex' | 'tokenio' | 'truelayer' | 'trustly' | 'trustpay' | 'trustpayments' | 'tsys' | 'vgs' | 'volt' | 'wellsfargo' | 'wise' | 'worldline' | 'worldpay' | 'worldpaymodular' | 'worldpayvantiv' | 'worldpayxml' | 'xendit' | 'zen' | 'zift' | 'zsl' | (string & {});
|
|
22
21
|
type DisputeStage = 'pre_dispute' | 'dispute' | 'pre_arbitration' | 'arbitration' | 'dispute_reversal';
|
|
@@ -347,8 +346,8 @@ interface PaymentListParams {
|
|
|
347
346
|
interface PaymentRetrieveOptions {
|
|
348
347
|
/** Reconcile intent state with the connector before responding. */
|
|
349
348
|
force_sync?: boolean;
|
|
350
|
-
/**
|
|
351
|
-
* `requires_payment_method`
|
|
349
|
+
/** Force a connector sync even for intents in early states like
|
|
350
|
+
* `requires_payment_method` that would otherwise return the local snapshot. */
|
|
352
351
|
all_keys_required?: boolean;
|
|
353
352
|
}
|
|
354
353
|
interface PaymentListResponse {
|
|
@@ -758,7 +757,6 @@ interface ProfileLogoUploadResponse {
|
|
|
758
757
|
* Event scope when registering a connector webhook.
|
|
759
758
|
* - `'all_events'`: wildcard registration (cheapest default).
|
|
760
759
|
* - `{ specific_event: '<EventType>' }`: register only one event type.
|
|
761
|
-
* Matches the backend's internally-tagged `ConnectorWebhookEventType`.
|
|
762
760
|
*/
|
|
763
761
|
type ConnectorWebhookEventType = 'all_events' | {
|
|
764
762
|
specific_event: string;
|
|
@@ -1335,6 +1333,7 @@ interface SwitchProfileRequest {
|
|
|
1335
1333
|
interface InviteUsersRequest {
|
|
1336
1334
|
email: string;
|
|
1337
1335
|
role_id: string;
|
|
1336
|
+
profile_ids?: string[];
|
|
1338
1337
|
}
|
|
1339
1338
|
interface InviteUsersResponse {
|
|
1340
1339
|
email: string;
|
|
@@ -1357,7 +1356,7 @@ interface FromEmailRequest {
|
|
|
1357
1356
|
token: string;
|
|
1358
1357
|
}
|
|
1359
1358
|
/**
|
|
1360
|
-
* Purpose of a single-purpose JWT. The
|
|
1359
|
+
* Purpose of a single-purpose JWT. The API decides which purpose to issue
|
|
1361
1360
|
* next based on the user's current state (e.g. TOTP not set → `totp`, TOTP
|
|
1362
1361
|
* verified → `reset_password`).
|
|
1363
1362
|
*/
|
|
@@ -1376,13 +1375,13 @@ interface VerifyTotpRequest {
|
|
|
1376
1375
|
/** Optional query params for `GET /user/2fa/terminate`. */
|
|
1377
1376
|
interface Terminate2faQueryParams {
|
|
1378
1377
|
/**
|
|
1379
|
-
* Skip the TOTP requirement entirely. Only honored when the
|
|
1380
|
-
* `force_two_factor_auth = false`. Use sparingly
|
|
1378
|
+
* Skip the TOTP requirement entirely. Only honored when the server has
|
|
1379
|
+
* `force_two_factor_auth = false`. Use sparingly -- it weakens security.
|
|
1381
1380
|
*/
|
|
1382
1381
|
skip_two_factor_auth?: boolean;
|
|
1383
1382
|
}
|
|
1384
1383
|
/**
|
|
1385
|
-
* Optional query for `GET /user/me/login-activity`.
|
|
1384
|
+
* Optional query for `GET /user/me/login-activity`. The API clamps `limit`
|
|
1386
1385
|
* to `1..=200` (default 25) and floors `offset` at 0 (default 0).
|
|
1387
1386
|
*/
|
|
1388
1387
|
interface LoginHistoryParams {
|
|
@@ -1407,9 +1406,8 @@ interface LoginHistoryParams {
|
|
|
1407
1406
|
* `password`, `magic_link`, `sso_oidc`, `totp`, `recovery_code`.
|
|
1408
1407
|
*
|
|
1409
1408
|
* Geo fields (`country_code`, `city`, `latitude`, `longitude`) are populated
|
|
1410
|
-
* by
|
|
1411
|
-
*
|
|
1412
|
-
* GeoIP service is disabled in backend config.
|
|
1409
|
+
* by a GeoIP lookup at signin time. They stay `null` for private/loopback
|
|
1410
|
+
* IPs, when the lookup misses, or when GeoIP is not enabled.
|
|
1413
1411
|
*/
|
|
1414
1412
|
interface LoginHistoryEntry {
|
|
1415
1413
|
id: string;
|
|
@@ -1429,11 +1427,10 @@ interface LoginHistoryEntry {
|
|
|
1429
1427
|
* Response shape for `GET /user/me/login-activity`. `total_count` is the
|
|
1430
1428
|
* unpaginated row count for client-side page-count calculation.
|
|
1431
1429
|
*
|
|
1432
|
-
* When
|
|
1433
|
-
*
|
|
1434
|
-
*
|
|
1435
|
-
*
|
|
1436
|
-
* their real activity by switching back to the admin organization.
|
|
1430
|
+
* When a Delopay admin is impersonating a merchant, the API returns
|
|
1431
|
+
* `entries: []` and `total_count: 0` so the admin's IP / geo data is
|
|
1432
|
+
* not exposed inside the merchant dashboard. The admin can still see
|
|
1433
|
+
* their own activity by switching back to the admin organization.
|
|
1437
1434
|
*/
|
|
1438
1435
|
interface LoginHistoryResponse {
|
|
1439
1436
|
entries: LoginHistoryEntry[];
|
|
@@ -1877,10 +1874,9 @@ interface RegionResponse {
|
|
|
1877
1874
|
[key: string]: unknown;
|
|
1878
1875
|
}
|
|
1879
1876
|
/**
|
|
1880
|
-
* Top-level permission group
|
|
1881
|
-
*
|
|
1882
|
-
*
|
|
1883
|
-
* the caller can't perform reads this off `getRoleV3()`.
|
|
1877
|
+
* Top-level permission group recognized by the Delopay API. The
|
|
1878
|
+
* dashboard (or any client) uses these to hide UI elements for actions
|
|
1879
|
+
* the caller's role cannot perform, via `getRolePermissions()`.
|
|
1884
1880
|
*/
|
|
1885
1881
|
type ParentGroup = 'Operations' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails';
|
|
1886
1882
|
/** Two scopes — `Read` allows viewing, `Write` is required for any mutation. */
|
|
@@ -2095,8 +2091,8 @@ declare class Connectors {
|
|
|
2095
2091
|
* `POST /account/{merchantId}/connectors/webhooks/{connectorId}`
|
|
2096
2092
|
*
|
|
2097
2093
|
* @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`
|
|
2098
|
-
*
|
|
2099
|
-
* to
|
|
2094
|
+
* when omitted; pass `{ event_type: { specific_event: '…' } }` to scope
|
|
2095
|
+
* to a single event.
|
|
2100
2096
|
*/
|
|
2101
2097
|
registerWebhook(merchantId: string, connectorId: string, params?: ConnectorWebhookRegisterRequest): Promise<ConnectorWebhookRegisterResponse>;
|
|
2102
2098
|
/** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
|
|
@@ -2511,13 +2507,12 @@ declare class Payments {
|
|
|
2511
2507
|
* Retrieve a payment by its ID.
|
|
2512
2508
|
*
|
|
2513
2509
|
* @param paymentId - The unique payment intent ID.
|
|
2514
|
-
* @param options - Optional query flags. `force_sync`
|
|
2515
|
-
*
|
|
2516
|
-
* stuck intent when a webhook was lost). `all_keys_required`
|
|
2517
|
-
*
|
|
2518
|
-
*
|
|
2519
|
-
*
|
|
2520
|
-
* helpers; API-key callers can use them too where the backend allows.
|
|
2510
|
+
* @param options - Optional query flags. `force_sync` reconciles the
|
|
2511
|
+
* intent's state with the connector before returning (useful to recover
|
|
2512
|
+
* a stuck intent when a webhook was lost). `all_keys_required` forces a
|
|
2513
|
+
* connector sync even for intents in early states like
|
|
2514
|
+
* `requires_payment_method` that would otherwise return the local
|
|
2515
|
+
* snapshot. Both flags work with JWT and API-key authentication.
|
|
2521
2516
|
* @returns The payment intent.
|
|
2522
2517
|
*
|
|
2523
2518
|
* @example
|
|
@@ -3121,16 +3116,15 @@ declare class Users {
|
|
|
3121
3116
|
signIn(params: SignInRequest): Promise<AuthResponse>;
|
|
3122
3117
|
signOut(): Promise<Record<string, unknown>>;
|
|
3123
3118
|
/**
|
|
3124
|
-
* Paginated login history for the authenticated user
|
|
3125
|
-
* country / city / lat-lon (when GeoIP is enabled
|
|
3126
|
-
*
|
|
3127
|
-
*
|
|
3119
|
+
* Paginated login history for the authenticated user -- IP, User-Agent,
|
|
3120
|
+
* country / city / lat-lon (when GeoIP is enabled), success and failure
|
|
3121
|
+
* events with their reasons. Strictly scoped to the JWT subject; a user
|
|
3122
|
+
* can only see their own activity.
|
|
3128
3123
|
*
|
|
3129
3124
|
* `GET /user/me/login-activity`. Requires a logged-in JWT.
|
|
3130
3125
|
*
|
|
3131
|
-
*
|
|
3132
|
-
*
|
|
3133
|
-
* merchant dashboard.
|
|
3126
|
+
* Returns an empty page when a Delopay admin is impersonating a merchant,
|
|
3127
|
+
* so the admin's metadata is not exposed inside the merchant dashboard.
|
|
3134
3128
|
*/
|
|
3135
3129
|
listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse>;
|
|
3136
3130
|
/**
|
|
@@ -3162,15 +3156,14 @@ declare class Users {
|
|
|
3162
3156
|
update(params: UpdateUserDetailsRequest): Promise<UserResponse>;
|
|
3163
3157
|
/**
|
|
3164
3158
|
* Permanently delete the caller's account. Requires a fresh password
|
|
3165
|
-
* (and a current 6-digit TOTP code if the user has TOTP enrolled).
|
|
3166
|
-
*
|
|
3167
|
-
*
|
|
3168
|
-
*
|
|
3169
|
-
* caller should clear local credentials and route to the login page.
|
|
3159
|
+
* (and a current 6-digit TOTP code if the user has TOTP enrolled). On
|
|
3160
|
+
* success all role assignments are removed, the user record is
|
|
3161
|
+
* deactivated, and all in-flight sessions are invalidated. The caller
|
|
3162
|
+
* should clear local credentials and route to the login page.
|
|
3170
3163
|
*
|
|
3171
|
-
*
|
|
3172
|
-
* owner-level admin of an org / merchant / profile
|
|
3173
|
-
* ownership first.
|
|
3164
|
+
* Returns `InvalidDeleteOperation` when the caller is the sole
|
|
3165
|
+
* owner-level admin of an org / merchant / profile -- they must
|
|
3166
|
+
* transfer ownership first.
|
|
3174
3167
|
*/
|
|
3175
3168
|
deleteAccount(params: DeleteAccountRequest): Promise<Record<string, unknown>>;
|
|
3176
3169
|
changePassword(params: ChangePasswordRequest): Promise<UserResponse>;
|
|
@@ -3276,7 +3269,9 @@ declare class Users {
|
|
|
3276
3269
|
/** Select auth method. `POST /user/auth/select` */
|
|
3277
3270
|
selectAuth(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3278
3271
|
/** List users in lineage. `GET /user/employees/list` */
|
|
3279
|
-
listUsersInLineage(
|
|
3272
|
+
listUsersInLineage(params?: {
|
|
3273
|
+
entity_type?: string;
|
|
3274
|
+
}): Promise<Record<string, unknown>[]>;
|
|
3280
3275
|
/** Resend invite. `POST /user/employees/resend-invite` */
|
|
3281
3276
|
resendInvite(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3282
3277
|
/**
|
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
|
@@ -430,8 +430,8 @@ var Connectors = class {
|
|
|
430
430
|
* `POST /account/{merchantId}/connectors/webhooks/{connectorId}`
|
|
431
431
|
*
|
|
432
432
|
* @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`
|
|
433
|
-
*
|
|
434
|
-
* to
|
|
433
|
+
* when omitted; pass `{ event_type: { specific_event: '…' } }` to scope
|
|
434
|
+
* to a single event.
|
|
435
435
|
*/
|
|
436
436
|
async registerWebhook(merchantId, connectorId, params) {
|
|
437
437
|
const path = `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`;
|
|
@@ -1027,13 +1027,12 @@ var Payments = class {
|
|
|
1027
1027
|
* Retrieve a payment by its ID.
|
|
1028
1028
|
*
|
|
1029
1029
|
* @param paymentId - The unique payment intent ID.
|
|
1030
|
-
* @param options - Optional query flags. `force_sync`
|
|
1031
|
-
*
|
|
1032
|
-
* stuck intent when a webhook was lost). `all_keys_required`
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1036
|
-
* helpers; API-key callers can use them too where the backend allows.
|
|
1030
|
+
* @param options - Optional query flags. `force_sync` reconciles the
|
|
1031
|
+
* intent's state with the connector before returning (useful to recover
|
|
1032
|
+
* a stuck intent when a webhook was lost). `all_keys_required` forces a
|
|
1033
|
+
* connector sync even for intents in early states like
|
|
1034
|
+
* `requires_payment_method` that would otherwise return the local
|
|
1035
|
+
* snapshot. Both flags work with JWT and API-key authentication.
|
|
1037
1036
|
* @returns The payment intent.
|
|
1038
1037
|
*
|
|
1039
1038
|
* @example
|
|
@@ -1975,16 +1974,15 @@ var Users = class {
|
|
|
1975
1974
|
return this.request("POST", "/user/signout");
|
|
1976
1975
|
}
|
|
1977
1976
|
/**
|
|
1978
|
-
* Paginated login history for the authenticated user
|
|
1979
|
-
* country / city / lat-lon (when GeoIP is enabled
|
|
1980
|
-
*
|
|
1981
|
-
*
|
|
1977
|
+
* Paginated login history for the authenticated user -- IP, User-Agent,
|
|
1978
|
+
* country / city / lat-lon (when GeoIP is enabled), success and failure
|
|
1979
|
+
* events with their reasons. Strictly scoped to the JWT subject; a user
|
|
1980
|
+
* can only see their own activity.
|
|
1982
1981
|
*
|
|
1983
1982
|
* `GET /user/me/login-activity`. Requires a logged-in JWT.
|
|
1984
1983
|
*
|
|
1985
|
-
*
|
|
1986
|
-
*
|
|
1987
|
-
* merchant dashboard.
|
|
1984
|
+
* Returns an empty page when a Delopay admin is impersonating a merchant,
|
|
1985
|
+
* so the admin's metadata is not exposed inside the merchant dashboard.
|
|
1988
1986
|
*/
|
|
1989
1987
|
async listLoginActivity(params) {
|
|
1990
1988
|
if (params === void 0) {
|
|
@@ -2031,15 +2029,14 @@ var Users = class {
|
|
|
2031
2029
|
}
|
|
2032
2030
|
/**
|
|
2033
2031
|
* Permanently delete the caller's account. Requires a fresh password
|
|
2034
|
-
* (and a current 6-digit TOTP code if the user has TOTP enrolled).
|
|
2035
|
-
*
|
|
2036
|
-
*
|
|
2037
|
-
*
|
|
2038
|
-
* caller should clear local credentials and route to the login page.
|
|
2032
|
+
* (and a current 6-digit TOTP code if the user has TOTP enrolled). On
|
|
2033
|
+
* success all role assignments are removed, the user record is
|
|
2034
|
+
* deactivated, and all in-flight sessions are invalidated. The caller
|
|
2035
|
+
* should clear local credentials and route to the login page.
|
|
2039
2036
|
*
|
|
2040
|
-
*
|
|
2041
|
-
* owner-level admin of an org / merchant / profile
|
|
2042
|
-
* ownership first.
|
|
2037
|
+
* Returns `InvalidDeleteOperation` when the caller is the sole
|
|
2038
|
+
* owner-level admin of an org / merchant / profile -- they must
|
|
2039
|
+
* transfer ownership first.
|
|
2043
2040
|
*/
|
|
2044
2041
|
async deleteAccount(params) {
|
|
2045
2042
|
return this.request("DELETE", "/user/account", { body: params });
|
|
@@ -2226,8 +2223,10 @@ var Users = class {
|
|
|
2226
2223
|
return this.request("POST", "/user/auth/select", { body: params });
|
|
2227
2224
|
}
|
|
2228
2225
|
/** List users in lineage. `GET /user/employees/list` */
|
|
2229
|
-
async listUsersInLineage() {
|
|
2230
|
-
return this.request("GET", "/user/employees/list"
|
|
2226
|
+
async listUsersInLineage(params) {
|
|
2227
|
+
return this.request("GET", "/user/employees/list", {
|
|
2228
|
+
query: params
|
|
2229
|
+
});
|
|
2231
2230
|
}
|
|
2232
2231
|
/** Resend invite. `POST /user/employees/resend-invite` */
|
|
2233
2232
|
async resendInvite(params) {
|