@delopay/sdk 0.61.0 → 0.62.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
@@ -2415,6 +2415,23 @@ var Users = class {
2415
2415
  async addUser(params) {
2416
2416
  return this.request("POST", "/user/employees/add", { body: params });
2417
2417
  }
2418
+ /**
2419
+ * Impersonate one of your own team members — `POST /user/employees/impersonate`.
2420
+ *
2421
+ * Mints a session token **as** the given member, so the dashboard renders
2422
+ * exactly what they see (useful for support and role verification). The
2423
+ * caller needs the *Impersonation* permission, and the member's role must
2424
+ * rank **strictly below** the caller's (`Profile < Merchant < Organization`);
2425
+ * the server rejects self-impersonation, cross-merchant targets, and
2426
+ * equal/higher roles.
2427
+ *
2428
+ * The returned token is tab-scoped by design: open it in a fresh tab (e.g.
2429
+ * `/auth/impersonate?token=…`) rather than replacing the caller's own
2430
+ * session. No auth cookie is set on the response.
2431
+ */
2432
+ async impersonateEmployee(params) {
2433
+ return this.request("POST", "/user/employees/impersonate", { body: params });
2434
+ }
2418
2435
  async acceptInvitation(params) {
2419
2436
  return this.request("POST", "/user/employees/invite/accept", { body: params });
2420
2437
  }