@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/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, mirroring the backend `Connector`
16
- * enum in `crates/common_enums/src/connector_enums.rs`. The trailing
17
- * `string` keeps it open: new connectors land in the backend before the
18
- * SDK is regenerated, so consumers can pass any name without a type
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
- /** Bypass the backend's `should_call_connector` gate so even a
351
- * `requires_payment_method` intent triggers a sync. */
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 backend decides which purpose to issue
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 backend has
1380
- * `force_two_factor_auth = false`. Use sparingly it weakens security.
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`. Backend clamps `limit`
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 an offline MaxMind GeoLite2-City lookup at signin time. They stay
1411
- * `null` for private/loopback IPs, when the lookup misses, or when the
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 the authenticated user is a Delopay admin currently impersonating
1433
- * a non-admin merchant via `switch_merchant_for_user_in_org`, the backend
1434
- * returns `entries: []` and `total_count: 0` so the admin's IP / geo
1435
- * doesn't render inside the merchant dashboard. The admin can still see
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 recognised by the backend. Matches the
1881
- * `ParentGroup` enum in the Delopay backend keep in lock-step.
1882
- * The dashboard / any client that wants to hide buttons for actions
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
- * on the backend when omitted; pass `{ event_type: { specific_event: '…' } }`
2099
- * to scope to a single event.
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` asks the backend to
2515
- * reconcile state with the connector before returning (used to recover a
2516
- * stuck intent when a webhook was lost). `all_keys_required` lifts the
2517
- * backend's `should_call_connector` gate so a `requires_payment_method`
2518
- * intent can still trigger a sync — without it the backend short-circuits
2519
- * and returns the local snapshot. Both flags are JWT-authenticated dashboard
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 IP, User-Agent,
3125
- * country / city / lat-lon (when GeoIP is enabled in backend), success
3126
- * and failure events with their reasons. Strictly scoped to the JWT
3127
- * subject; a user can only see their own activity.
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
- * The backend returns an empty page when a Delopay admin is impersonating
3132
- * a non-admin merchant, so the admin's metadata never renders inside the
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). The
3166
- * backend hard-deletes every `user_roles` row for the caller and soft-
3167
- * deletes the user record itself (`is_active = false`, password / TOTP
3168
- * wiped). On success all in-flight sessions are blacklisted, so the
3169
- * caller should clear local credentials and route to the login page.
3170
- *
3171
- * Refuses (`InvalidDeleteOperation`) when the caller is the sole
3172
- * owner-level admin of an org / merchant / profile — they must transfer
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, mirroring the backend `Connector`
16
- * enum in `crates/common_enums/src/connector_enums.rs`. The trailing
17
- * `string` keeps it open: new connectors land in the backend before the
18
- * SDK is regenerated, so consumers can pass any name without a type
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
- /** Bypass the backend's `should_call_connector` gate so even a
351
- * `requires_payment_method` intent triggers a sync. */
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 backend decides which purpose to issue
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 backend has
1380
- * `force_two_factor_auth = false`. Use sparingly it weakens security.
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`. Backend clamps `limit`
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 an offline MaxMind GeoLite2-City lookup at signin time. They stay
1411
- * `null` for private/loopback IPs, when the lookup misses, or when the
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 the authenticated user is a Delopay admin currently impersonating
1433
- * a non-admin merchant via `switch_merchant_for_user_in_org`, the backend
1434
- * returns `entries: []` and `total_count: 0` so the admin's IP / geo
1435
- * doesn't render inside the merchant dashboard. The admin can still see
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 recognised by the backend. Matches the
1881
- * `ParentGroup` enum in the Delopay backend keep in lock-step.
1882
- * The dashboard / any client that wants to hide buttons for actions
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
- * on the backend when omitted; pass `{ event_type: { specific_event: '…' } }`
2099
- * to scope to a single event.
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` asks the backend to
2515
- * reconcile state with the connector before returning (used to recover a
2516
- * stuck intent when a webhook was lost). `all_keys_required` lifts the
2517
- * backend's `should_call_connector` gate so a `requires_payment_method`
2518
- * intent can still trigger a sync — without it the backend short-circuits
2519
- * and returns the local snapshot. Both flags are JWT-authenticated dashboard
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 IP, User-Agent,
3125
- * country / city / lat-lon (when GeoIP is enabled in backend), success
3126
- * and failure events with their reasons. Strictly scoped to the JWT
3127
- * subject; a user can only see their own activity.
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
- * The backend returns an empty page when a Delopay admin is impersonating
3132
- * a non-admin merchant, so the admin's metadata never renders inside the
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). The
3166
- * backend hard-deletes every `user_roles` row for the caller and soft-
3167
- * deletes the user record itself (`is_active = false`, password / TOTP
3168
- * wiped). On success all in-flight sessions are blacklisted, so the
3169
- * caller should clear local credentials and route to the login page.
3170
- *
3171
- * Refuses (`InvalidDeleteOperation`) when the caller is the sole
3172
- * owner-level admin of an org / merchant / profile — they must transfer
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
@@ -41,7 +41,7 @@ import {
41
41
  shadowFor,
42
42
  surfacePadValue,
43
43
  verticalGapValue
44
- } from "./chunk-TE4LLC2R.js";
44
+ } from "./chunk-U6GMDSVQ.js";
45
45
  export {
46
46
  Analytics,
47
47
  AnalyticsDashboard,
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
- * on the backend when omitted; pass `{ event_type: { specific_event: '…' } }`
434
- * to scope to a single event.
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` asks the backend to
1031
- * reconcile state with the connector before returning (used to recover a
1032
- * stuck intent when a webhook was lost). `all_keys_required` lifts the
1033
- * backend's `should_call_connector` gate so a `requires_payment_method`
1034
- * intent can still trigger a sync — without it the backend short-circuits
1035
- * and returns the local snapshot. Both flags are JWT-authenticated dashboard
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 IP, User-Agent,
1979
- * country / city / lat-lon (when GeoIP is enabled in backend), success
1980
- * and failure events with their reasons. Strictly scoped to the JWT
1981
- * subject; a user can only see their own activity.
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
- * The backend returns an empty page when a Delopay admin is impersonating
1986
- * a non-admin merchant, so the admin's metadata never renders inside the
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). The
2035
- * backend hard-deletes every `user_roles` row for the caller and soft-
2036
- * deletes the user record itself (`is_active = false`, password / TOTP
2037
- * wiped). On success all in-flight sessions are blacklisted, so the
2038
- * caller should clear local credentials and route to the login page.
2039
- *
2040
- * Refuses (`InvalidDeleteOperation`) when the caller is the sole
2041
- * owner-level admin of an org / merchant / profile — they must transfer
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 });