@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/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;
@@ -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 backend decides which purpose to issue
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 backend has
1380
- * `force_two_factor_auth = false`. Use sparingly it weakens security.
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`. Backend clamps `limit`
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 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.
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 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.
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 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()`.
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
- * on the backend when omitted; pass `{ event_type: { specific_event: '…' } }`
2099
- * to scope to a single event.
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` 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.
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 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.
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
- * 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.
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). 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.
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
- * Refuses (`InvalidDeleteOperation`) when the caller is the sole
3172
- * owner-level admin of an org / merchant / profile they must transfer
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(): Promise<Record<string, unknown>[]>;
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, 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;
@@ -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 backend decides which purpose to issue
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 backend has
1380
- * `force_two_factor_auth = false`. Use sparingly it weakens security.
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`. Backend clamps `limit`
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 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.
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 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.
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 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()`.
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
- * on the backend when omitted; pass `{ event_type: { specific_event: '…' } }`
2099
- * to scope to a single event.
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` 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.
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 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.
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
- * 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.
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). 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.
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
- * Refuses (`InvalidDeleteOperation`) when the caller is the sole
3172
- * owner-level admin of an org / merchant / profile they must transfer
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(): Promise<Record<string, unknown>[]>;
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
@@ -41,7 +41,7 @@ import {
41
41
  shadowFor,
42
42
  surfacePadValue,
43
43
  verticalGapValue
44
- } from "./chunk-TE4LLC2R.js";
44
+ } from "./chunk-4Q3E7XLP.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.
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
- * Refuses (`InvalidDeleteOperation`) when the caller is the sole
2041
- * owner-level admin of an org / merchant / profile they must transfer
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) {