@delopay/sdk 0.27.0 → 0.28.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-U6GMDSVQ.js} +22 -25
- package/dist/chunk-U6GMDSVQ.js.map +1 -0
- package/dist/index.cjs +22 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -49
- package/dist/index.d.ts +41 -49
- package/dist/index.js +1 -1
- package/dist/internal.cjs +22 -25
- 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;
|
|
@@ -1357,7 +1355,7 @@ interface FromEmailRequest {
|
|
|
1357
1355
|
token: string;
|
|
1358
1356
|
}
|
|
1359
1357
|
/**
|
|
1360
|
-
* Purpose of a single-purpose JWT. The
|
|
1358
|
+
* Purpose of a single-purpose JWT. The API decides which purpose to issue
|
|
1361
1359
|
* next based on the user's current state (e.g. TOTP not set → `totp`, TOTP
|
|
1362
1360
|
* verified → `reset_password`).
|
|
1363
1361
|
*/
|
|
@@ -1376,13 +1374,13 @@ interface VerifyTotpRequest {
|
|
|
1376
1374
|
/** Optional query params for `GET /user/2fa/terminate`. */
|
|
1377
1375
|
interface Terminate2faQueryParams {
|
|
1378
1376
|
/**
|
|
1379
|
-
* Skip the TOTP requirement entirely. Only honored when the
|
|
1380
|
-
* `force_two_factor_auth = false`. Use sparingly
|
|
1377
|
+
* Skip the TOTP requirement entirely. Only honored when the server has
|
|
1378
|
+
* `force_two_factor_auth = false`. Use sparingly -- it weakens security.
|
|
1381
1379
|
*/
|
|
1382
1380
|
skip_two_factor_auth?: boolean;
|
|
1383
1381
|
}
|
|
1384
1382
|
/**
|
|
1385
|
-
* Optional query for `GET /user/me/login-activity`.
|
|
1383
|
+
* Optional query for `GET /user/me/login-activity`. The API clamps `limit`
|
|
1386
1384
|
* to `1..=200` (default 25) and floors `offset` at 0 (default 0).
|
|
1387
1385
|
*/
|
|
1388
1386
|
interface LoginHistoryParams {
|
|
@@ -1407,9 +1405,8 @@ interface LoginHistoryParams {
|
|
|
1407
1405
|
* `password`, `magic_link`, `sso_oidc`, `totp`, `recovery_code`.
|
|
1408
1406
|
*
|
|
1409
1407
|
* Geo fields (`country_code`, `city`, `latitude`, `longitude`) are populated
|
|
1410
|
-
* by
|
|
1411
|
-
*
|
|
1412
|
-
* GeoIP service is disabled in backend config.
|
|
1408
|
+
* by a GeoIP lookup at signin time. They stay `null` for private/loopback
|
|
1409
|
+
* IPs, when the lookup misses, or when GeoIP is not enabled.
|
|
1413
1410
|
*/
|
|
1414
1411
|
interface LoginHistoryEntry {
|
|
1415
1412
|
id: string;
|
|
@@ -1429,11 +1426,10 @@ interface LoginHistoryEntry {
|
|
|
1429
1426
|
* Response shape for `GET /user/me/login-activity`. `total_count` is the
|
|
1430
1427
|
* unpaginated row count for client-side page-count calculation.
|
|
1431
1428
|
*
|
|
1432
|
-
* When
|
|
1433
|
-
*
|
|
1434
|
-
*
|
|
1435
|
-
*
|
|
1436
|
-
* their real activity by switching back to the admin organization.
|
|
1429
|
+
* When a Delopay admin is impersonating a merchant, the API returns
|
|
1430
|
+
* `entries: []` and `total_count: 0` so the admin's IP / geo data is
|
|
1431
|
+
* not exposed inside the merchant dashboard. The admin can still see
|
|
1432
|
+
* their own activity by switching back to the admin organization.
|
|
1437
1433
|
*/
|
|
1438
1434
|
interface LoginHistoryResponse {
|
|
1439
1435
|
entries: LoginHistoryEntry[];
|
|
@@ -1877,10 +1873,9 @@ interface RegionResponse {
|
|
|
1877
1873
|
[key: string]: unknown;
|
|
1878
1874
|
}
|
|
1879
1875
|
/**
|
|
1880
|
-
* Top-level permission group
|
|
1881
|
-
*
|
|
1882
|
-
*
|
|
1883
|
-
* the caller can't perform reads this off `getRoleV3()`.
|
|
1876
|
+
* Top-level permission group recognized by the Delopay API. The
|
|
1877
|
+
* dashboard (or any client) uses these to hide UI elements for actions
|
|
1878
|
+
* the caller's role cannot perform, via `getRolePermissions()`.
|
|
1884
1879
|
*/
|
|
1885
1880
|
type ParentGroup = 'Operations' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails';
|
|
1886
1881
|
/** Two scopes — `Read` allows viewing, `Write` is required for any mutation. */
|
|
@@ -2095,8 +2090,8 @@ declare class Connectors {
|
|
|
2095
2090
|
* `POST /account/{merchantId}/connectors/webhooks/{connectorId}`
|
|
2096
2091
|
*
|
|
2097
2092
|
* @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`
|
|
2098
|
-
*
|
|
2099
|
-
* to
|
|
2093
|
+
* when omitted; pass `{ event_type: { specific_event: '…' } }` to scope
|
|
2094
|
+
* to a single event.
|
|
2100
2095
|
*/
|
|
2101
2096
|
registerWebhook(merchantId: string, connectorId: string, params?: ConnectorWebhookRegisterRequest): Promise<ConnectorWebhookRegisterResponse>;
|
|
2102
2097
|
/** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
|
|
@@ -2511,13 +2506,12 @@ declare class Payments {
|
|
|
2511
2506
|
* Retrieve a payment by its ID.
|
|
2512
2507
|
*
|
|
2513
2508
|
* @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.
|
|
2509
|
+
* @param options - Optional query flags. `force_sync` reconciles the
|
|
2510
|
+
* intent's state with the connector before returning (useful to recover
|
|
2511
|
+
* a stuck intent when a webhook was lost). `all_keys_required` forces a
|
|
2512
|
+
* connector sync even for intents in early states like
|
|
2513
|
+
* `requires_payment_method` that would otherwise return the local
|
|
2514
|
+
* snapshot. Both flags work with JWT and API-key authentication.
|
|
2521
2515
|
* @returns The payment intent.
|
|
2522
2516
|
*
|
|
2523
2517
|
* @example
|
|
@@ -3121,16 +3115,15 @@ declare class Users {
|
|
|
3121
3115
|
signIn(params: SignInRequest): Promise<AuthResponse>;
|
|
3122
3116
|
signOut(): Promise<Record<string, unknown>>;
|
|
3123
3117
|
/**
|
|
3124
|
-
* Paginated login history for the authenticated user
|
|
3125
|
-
* country / city / lat-lon (when GeoIP is enabled
|
|
3126
|
-
*
|
|
3127
|
-
*
|
|
3118
|
+
* Paginated login history for the authenticated user -- IP, User-Agent,
|
|
3119
|
+
* country / city / lat-lon (when GeoIP is enabled), success and failure
|
|
3120
|
+
* events with their reasons. Strictly scoped to the JWT subject; a user
|
|
3121
|
+
* can only see their own activity.
|
|
3128
3122
|
*
|
|
3129
3123
|
* `GET /user/me/login-activity`. Requires a logged-in JWT.
|
|
3130
3124
|
*
|
|
3131
|
-
*
|
|
3132
|
-
*
|
|
3133
|
-
* merchant dashboard.
|
|
3125
|
+
* Returns an empty page when a Delopay admin is impersonating a merchant,
|
|
3126
|
+
* so the admin's metadata is not exposed inside the merchant dashboard.
|
|
3134
3127
|
*/
|
|
3135
3128
|
listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse>;
|
|
3136
3129
|
/**
|
|
@@ -3162,15 +3155,14 @@ declare class Users {
|
|
|
3162
3155
|
update(params: UpdateUserDetailsRequest): Promise<UserResponse>;
|
|
3163
3156
|
/**
|
|
3164
3157
|
* 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
|
-
*
|
|
3170
|
-
*
|
|
3171
|
-
*
|
|
3172
|
-
*
|
|
3173
|
-
* ownership first.
|
|
3158
|
+
* (and a current 6-digit TOTP code if the user has TOTP enrolled). On
|
|
3159
|
+
* success all role assignments are removed, the user record is
|
|
3160
|
+
* deactivated, and all in-flight sessions are invalidated. The caller
|
|
3161
|
+
* should clear local credentials and route to the login page.
|
|
3162
|
+
*
|
|
3163
|
+
* Returns `InvalidDeleteOperation` when the caller is the sole
|
|
3164
|
+
* owner-level admin of an org / merchant / profile -- they must
|
|
3165
|
+
* transfer ownership first.
|
|
3174
3166
|
*/
|
|
3175
3167
|
deleteAccount(params: DeleteAccountRequest): Promise<Record<string, unknown>>;
|
|
3176
3168
|
changePassword(params: ChangePasswordRequest): Promise<UserResponse>;
|
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;
|
|
@@ -1357,7 +1355,7 @@ interface FromEmailRequest {
|
|
|
1357
1355
|
token: string;
|
|
1358
1356
|
}
|
|
1359
1357
|
/**
|
|
1360
|
-
* Purpose of a single-purpose JWT. The
|
|
1358
|
+
* Purpose of a single-purpose JWT. The API decides which purpose to issue
|
|
1361
1359
|
* next based on the user's current state (e.g. TOTP not set → `totp`, TOTP
|
|
1362
1360
|
* verified → `reset_password`).
|
|
1363
1361
|
*/
|
|
@@ -1376,13 +1374,13 @@ interface VerifyTotpRequest {
|
|
|
1376
1374
|
/** Optional query params for `GET /user/2fa/terminate`. */
|
|
1377
1375
|
interface Terminate2faQueryParams {
|
|
1378
1376
|
/**
|
|
1379
|
-
* Skip the TOTP requirement entirely. Only honored when the
|
|
1380
|
-
* `force_two_factor_auth = false`. Use sparingly
|
|
1377
|
+
* Skip the TOTP requirement entirely. Only honored when the server has
|
|
1378
|
+
* `force_two_factor_auth = false`. Use sparingly -- it weakens security.
|
|
1381
1379
|
*/
|
|
1382
1380
|
skip_two_factor_auth?: boolean;
|
|
1383
1381
|
}
|
|
1384
1382
|
/**
|
|
1385
|
-
* Optional query for `GET /user/me/login-activity`.
|
|
1383
|
+
* Optional query for `GET /user/me/login-activity`. The API clamps `limit`
|
|
1386
1384
|
* to `1..=200` (default 25) and floors `offset` at 0 (default 0).
|
|
1387
1385
|
*/
|
|
1388
1386
|
interface LoginHistoryParams {
|
|
@@ -1407,9 +1405,8 @@ interface LoginHistoryParams {
|
|
|
1407
1405
|
* `password`, `magic_link`, `sso_oidc`, `totp`, `recovery_code`.
|
|
1408
1406
|
*
|
|
1409
1407
|
* Geo fields (`country_code`, `city`, `latitude`, `longitude`) are populated
|
|
1410
|
-
* by
|
|
1411
|
-
*
|
|
1412
|
-
* GeoIP service is disabled in backend config.
|
|
1408
|
+
* by a GeoIP lookup at signin time. They stay `null` for private/loopback
|
|
1409
|
+
* IPs, when the lookup misses, or when GeoIP is not enabled.
|
|
1413
1410
|
*/
|
|
1414
1411
|
interface LoginHistoryEntry {
|
|
1415
1412
|
id: string;
|
|
@@ -1429,11 +1426,10 @@ interface LoginHistoryEntry {
|
|
|
1429
1426
|
* Response shape for `GET /user/me/login-activity`. `total_count` is the
|
|
1430
1427
|
* unpaginated row count for client-side page-count calculation.
|
|
1431
1428
|
*
|
|
1432
|
-
* When
|
|
1433
|
-
*
|
|
1434
|
-
*
|
|
1435
|
-
*
|
|
1436
|
-
* their real activity by switching back to the admin organization.
|
|
1429
|
+
* When a Delopay admin is impersonating a merchant, the API returns
|
|
1430
|
+
* `entries: []` and `total_count: 0` so the admin's IP / geo data is
|
|
1431
|
+
* not exposed inside the merchant dashboard. The admin can still see
|
|
1432
|
+
* their own activity by switching back to the admin organization.
|
|
1437
1433
|
*/
|
|
1438
1434
|
interface LoginHistoryResponse {
|
|
1439
1435
|
entries: LoginHistoryEntry[];
|
|
@@ -1877,10 +1873,9 @@ interface RegionResponse {
|
|
|
1877
1873
|
[key: string]: unknown;
|
|
1878
1874
|
}
|
|
1879
1875
|
/**
|
|
1880
|
-
* Top-level permission group
|
|
1881
|
-
*
|
|
1882
|
-
*
|
|
1883
|
-
* the caller can't perform reads this off `getRoleV3()`.
|
|
1876
|
+
* Top-level permission group recognized by the Delopay API. The
|
|
1877
|
+
* dashboard (or any client) uses these to hide UI elements for actions
|
|
1878
|
+
* the caller's role cannot perform, via `getRolePermissions()`.
|
|
1884
1879
|
*/
|
|
1885
1880
|
type ParentGroup = 'Operations' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails';
|
|
1886
1881
|
/** Two scopes — `Read` allows viewing, `Write` is required for any mutation. */
|
|
@@ -2095,8 +2090,8 @@ declare class Connectors {
|
|
|
2095
2090
|
* `POST /account/{merchantId}/connectors/webhooks/{connectorId}`
|
|
2096
2091
|
*
|
|
2097
2092
|
* @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`
|
|
2098
|
-
*
|
|
2099
|
-
* to
|
|
2093
|
+
* when omitted; pass `{ event_type: { specific_event: '…' } }` to scope
|
|
2094
|
+
* to a single event.
|
|
2100
2095
|
*/
|
|
2101
2096
|
registerWebhook(merchantId: string, connectorId: string, params?: ConnectorWebhookRegisterRequest): Promise<ConnectorWebhookRegisterResponse>;
|
|
2102
2097
|
/** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
|
|
@@ -2511,13 +2506,12 @@ declare class Payments {
|
|
|
2511
2506
|
* Retrieve a payment by its ID.
|
|
2512
2507
|
*
|
|
2513
2508
|
* @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.
|
|
2509
|
+
* @param options - Optional query flags. `force_sync` reconciles the
|
|
2510
|
+
* intent's state with the connector before returning (useful to recover
|
|
2511
|
+
* a stuck intent when a webhook was lost). `all_keys_required` forces a
|
|
2512
|
+
* connector sync even for intents in early states like
|
|
2513
|
+
* `requires_payment_method` that would otherwise return the local
|
|
2514
|
+
* snapshot. Both flags work with JWT and API-key authentication.
|
|
2521
2515
|
* @returns The payment intent.
|
|
2522
2516
|
*
|
|
2523
2517
|
* @example
|
|
@@ -3121,16 +3115,15 @@ declare class Users {
|
|
|
3121
3115
|
signIn(params: SignInRequest): Promise<AuthResponse>;
|
|
3122
3116
|
signOut(): Promise<Record<string, unknown>>;
|
|
3123
3117
|
/**
|
|
3124
|
-
* Paginated login history for the authenticated user
|
|
3125
|
-
* country / city / lat-lon (when GeoIP is enabled
|
|
3126
|
-
*
|
|
3127
|
-
*
|
|
3118
|
+
* Paginated login history for the authenticated user -- IP, User-Agent,
|
|
3119
|
+
* country / city / lat-lon (when GeoIP is enabled), success and failure
|
|
3120
|
+
* events with their reasons. Strictly scoped to the JWT subject; a user
|
|
3121
|
+
* can only see their own activity.
|
|
3128
3122
|
*
|
|
3129
3123
|
* `GET /user/me/login-activity`. Requires a logged-in JWT.
|
|
3130
3124
|
*
|
|
3131
|
-
*
|
|
3132
|
-
*
|
|
3133
|
-
* merchant dashboard.
|
|
3125
|
+
* Returns an empty page when a Delopay admin is impersonating a merchant,
|
|
3126
|
+
* so the admin's metadata is not exposed inside the merchant dashboard.
|
|
3134
3127
|
*/
|
|
3135
3128
|
listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse>;
|
|
3136
3129
|
/**
|
|
@@ -3162,15 +3155,14 @@ declare class Users {
|
|
|
3162
3155
|
update(params: UpdateUserDetailsRequest): Promise<UserResponse>;
|
|
3163
3156
|
/**
|
|
3164
3157
|
* 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
|
-
*
|
|
3170
|
-
*
|
|
3171
|
-
*
|
|
3172
|
-
*
|
|
3173
|
-
* ownership first.
|
|
3158
|
+
* (and a current 6-digit TOTP code if the user has TOTP enrolled). On
|
|
3159
|
+
* success all role assignments are removed, the user record is
|
|
3160
|
+
* deactivated, and all in-flight sessions are invalidated. The caller
|
|
3161
|
+
* should clear local credentials and route to the login page.
|
|
3162
|
+
*
|
|
3163
|
+
* Returns `InvalidDeleteOperation` when the caller is the sole
|
|
3164
|
+
* owner-level admin of an org / merchant / profile -- they must
|
|
3165
|
+
* transfer ownership first.
|
|
3174
3166
|
*/
|
|
3175
3167
|
deleteAccount(params: DeleteAccountRequest): Promise<Record<string, unknown>>;
|
|
3176
3168
|
changePassword(params: ChangePasswordRequest): Promise<UserResponse>;
|
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
|
-
*
|
|
2039
|
-
*
|
|
2040
|
-
*
|
|
2041
|
-
*
|
|
2042
|
-
* ownership first.
|
|
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.
|
|
2036
|
+
*
|
|
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 });
|