@delopay/sdk 0.23.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.
package/dist/index.cjs CHANGED
@@ -2026,6 +2026,21 @@ var Users = class {
2026
2026
  async update(params) {
2027
2027
  return this.request("POST", "/user/update", { body: params });
2028
2028
  }
2029
+ /**
2030
+ * Permanently delete the caller's account. Requires a fresh password
2031
+ * (and a current 6-digit TOTP code if the user has TOTP enrolled). The
2032
+ * backend hard-deletes every `user_roles` row for the caller and soft-
2033
+ * deletes the user record itself (`is_active = false`, password / TOTP
2034
+ * wiped). On success all in-flight sessions are blacklisted, so the
2035
+ * caller should clear local credentials and route to the login page.
2036
+ *
2037
+ * Refuses (`InvalidDeleteOperation`) when the caller is the sole
2038
+ * owner-level admin of an org / merchant / profile — they must transfer
2039
+ * ownership first.
2040
+ */
2041
+ async deleteAccount(params) {
2042
+ return this.request("DELETE", "/user/account", { body: params });
2043
+ }
2029
2044
  async changePassword(params) {
2030
2045
  return this.request("POST", "/user/change_password", { body: params });
2031
2046
  }