@delopay/sdk 0.22.0 → 0.24.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.
@@ -1959,6 +1959,21 @@ var Users = class {
1959
1959
  async update(params) {
1960
1960
  return this.request("POST", "/user/update", { body: params });
1961
1961
  }
1962
+ /**
1963
+ * Permanently delete the caller's account. Requires a fresh password
1964
+ * (and a current 6-digit TOTP code if the user has TOTP enrolled). The
1965
+ * backend hard-deletes every `user_roles` row for the caller and soft-
1966
+ * deletes the user record itself (`is_active = false`, password / TOTP
1967
+ * wiped). On success all in-flight sessions are blacklisted, so the
1968
+ * caller should clear local credentials and route to the login page.
1969
+ *
1970
+ * Refuses (`InvalidDeleteOperation`) when the caller is the sole
1971
+ * owner-level admin of an org / merchant / profile — they must transfer
1972
+ * ownership first.
1973
+ */
1974
+ async deleteAccount(params) {
1975
+ return this.request("DELETE", "/user/account", { body: params });
1976
+ }
1962
1977
  async changePassword(params) {
1963
1978
  return this.request("POST", "/user/change_password", { body: params });
1964
1979
  }
@@ -2019,6 +2034,19 @@ var Users = class {
2019
2034
  async acceptInvitation(params) {
2020
2035
  return this.request("POST", "/user/user/invite/accept", { body: params });
2021
2036
  }
2037
+ /**
2038
+ * Accept an invitation via the email-link flow.
2039
+ *
2040
+ * Caller must already hold a `SinglePurposeToken` with
2041
+ * `purpose: accept_invitation_from_email` (obtained via `fromEmail` + any
2042
+ * required TOTP step) and have set it on the client via `setJwtToken`.
2043
+ * `body.token` must still be the original `EmailToken` from the
2044
+ * invite-link URL — the handler decodes it a second time to find the
2045
+ * invitee and the entity lineage.
2046
+ */
2047
+ async acceptInviteFromEmail(params) {
2048
+ return this.request("POST", "/user/accept_invite_from_email", { body: params });
2049
+ }
2022
2050
  /**
2023
2051
  * Start TOTP setup (or no-op if already set).
2024
2052
  *
@@ -3633,4 +3661,4 @@ export {
3633
3661
  applyBrandingVariables,
3634
3662
  shadowFor
3635
3663
  };
3636
- //# sourceMappingURL=chunk-4PBWNLYU.js.map
3664
+ //# sourceMappingURL=chunk-64E3LG2C.js.map