@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.cjs CHANGED
@@ -419,8 +419,8 @@ var Connectors = class {
419
419
  * `POST /account/{merchantId}/connectors/webhooks/{connectorId}`
420
420
  *
421
421
  * @param params - Optional event scope. Defaults to `{ event_type: 'all_events' }`
422
- * on the backend when omitted; pass `{ event_type: { specific_event: '…' } }`
423
- * to scope to a single event.
422
+ * when omitted; pass `{ event_type: { specific_event: '…' } }` to scope
423
+ * to a single event.
424
424
  */
425
425
  async registerWebhook(merchantId, connectorId, params) {
426
426
  const path = `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`;
@@ -1016,13 +1016,12 @@ var Payments = class {
1016
1016
  * Retrieve a payment by its ID.
1017
1017
  *
1018
1018
  * @param paymentId - The unique payment intent ID.
1019
- * @param options - Optional query flags. `force_sync` asks the backend to
1020
- * reconcile state with the connector before returning (used to recover a
1021
- * stuck intent when a webhook was lost). `all_keys_required` lifts the
1022
- * backend's `should_call_connector` gate so a `requires_payment_method`
1023
- * intent can still trigger a sync — without it the backend short-circuits
1024
- * and returns the local snapshot. Both flags are JWT-authenticated dashboard
1025
- * helpers; API-key callers can use them too where the backend allows.
1019
+ * @param options - Optional query flags. `force_sync` reconciles the
1020
+ * intent's state with the connector before returning (useful to recover
1021
+ * a stuck intent when a webhook was lost). `all_keys_required` forces a
1022
+ * connector sync even for intents in early states like
1023
+ * `requires_payment_method` that would otherwise return the local
1024
+ * snapshot. Both flags work with JWT and API-key authentication.
1026
1025
  * @returns The payment intent.
1027
1026
  *
1028
1027
  * @example
@@ -1964,16 +1963,15 @@ var Users = class {
1964
1963
  return this.request("POST", "/user/signout");
1965
1964
  }
1966
1965
  /**
1967
- * Paginated login history for the authenticated user IP, User-Agent,
1968
- * country / city / lat-lon (when GeoIP is enabled in backend), success
1969
- * and failure events with their reasons. Strictly scoped to the JWT
1970
- * subject; a user can only see their own activity.
1966
+ * Paginated login history for the authenticated user -- IP, User-Agent,
1967
+ * country / city / lat-lon (when GeoIP is enabled), success and failure
1968
+ * events with their reasons. Strictly scoped to the JWT subject; a user
1969
+ * can only see their own activity.
1971
1970
  *
1972
1971
  * `GET /user/me/login-activity`. Requires a logged-in JWT.
1973
1972
  *
1974
- * The backend returns an empty page when a Delopay admin is impersonating
1975
- * a non-admin merchant, so the admin's metadata never renders inside the
1976
- * merchant dashboard.
1973
+ * Returns an empty page when a Delopay admin is impersonating a merchant,
1974
+ * so the admin's metadata is not exposed inside the merchant dashboard.
1977
1975
  */
1978
1976
  async listLoginActivity(params) {
1979
1977
  if (params === void 0) {
@@ -2020,15 +2018,14 @@ var Users = class {
2020
2018
  }
2021
2019
  /**
2022
2020
  * Permanently delete the caller's account. Requires a fresh password
2023
- * (and a current 6-digit TOTP code if the user has TOTP enrolled). The
2024
- * backend hard-deletes every `user_roles` row for the caller and soft-
2025
- * deletes the user record itself (`is_active = false`, password / TOTP
2026
- * wiped). On success all in-flight sessions are blacklisted, so the
2027
- * caller should clear local credentials and route to the login page.
2021
+ * (and a current 6-digit TOTP code if the user has TOTP enrolled). On
2022
+ * success all role assignments are removed, the user record is
2023
+ * deactivated, and all in-flight sessions are invalidated. The caller
2024
+ * should clear local credentials and route to the login page.
2028
2025
  *
2029
- * Refuses (`InvalidDeleteOperation`) when the caller is the sole
2030
- * owner-level admin of an org / merchant / profile they must transfer
2031
- * ownership first.
2026
+ * Returns `InvalidDeleteOperation` when the caller is the sole
2027
+ * owner-level admin of an org / merchant / profile -- they must
2028
+ * transfer ownership first.
2032
2029
  */
2033
2030
  async deleteAccount(params) {
2034
2031
  return this.request("DELETE", "/user/account", { body: params });
@@ -2215,8 +2212,10 @@ var Users = class {
2215
2212
  return this.request("POST", "/user/auth/select", { body: params });
2216
2213
  }
2217
2214
  /** List users in lineage. `GET /user/employees/list` */
2218
- async listUsersInLineage() {
2219
- return this.request("GET", "/user/employees/list");
2215
+ async listUsersInLineage(params) {
2216
+ return this.request("GET", "/user/employees/list", {
2217
+ query: params
2218
+ });
2220
2219
  }
2221
2220
  /** Resend invite. `POST /user/employees/resend-invite` */
2222
2221
  async resendInvite(params) {