@delopay/sdk 0.20.1 → 0.21.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.
@@ -1901,6 +1901,35 @@ var Users = class {
1901
1901
  query: params
1902
1902
  });
1903
1903
  }
1904
+ /**
1905
+ * List the authenticated user's currently-active dashboard sessions
1906
+ * (one row per minted login JWT that hasn't been revoked or expired).
1907
+ *
1908
+ * The row matching the JWT making this call has `is_current: true`,
1909
+ * which is what lets the dashboard render a "This device" tag.
1910
+ *
1911
+ * `GET /user/me/sessions`. Requires a logged-in JWT. Returns an empty
1912
+ * list when a Delopay admin is impersonating a non-admin merchant
1913
+ * (same guard as `listLoginActivity`).
1914
+ */
1915
+ async listActiveSessions() {
1916
+ return this.request("GET", "/user/me/sessions");
1917
+ }
1918
+ /**
1919
+ * Disconnect one of the authenticated user's sessions. The matching
1920
+ * JWT is rejected on its next request — fast-path via Redis, fall back
1921
+ * to the persistent `revoked_at` column.
1922
+ *
1923
+ * Idempotent: revoking an already-revoked or unknown id returns 404,
1924
+ * which the caller can treat as success for retry purposes. Revoking
1925
+ * a session id that belongs to a different user also returns 404 —
1926
+ * the response intentionally doesn't leak whether the id exists.
1927
+ *
1928
+ * `POST /user/me/sessions/{sessionId}/revoke`.
1929
+ */
1930
+ async revokeSession(sessionId) {
1931
+ return this.request("POST", `/user/me/sessions/${encodeURIComponent(sessionId)}/revoke`);
1932
+ }
1904
1933
  async getDetails() {
1905
1934
  return this.request("GET", "/user");
1906
1935
  }
@@ -3579,4 +3608,4 @@ export {
3579
3608
  applyBrandingVariables,
3580
3609
  shadowFor
3581
3610
  };
3582
- //# sourceMappingURL=chunk-4FTI5GO7.js.map
3611
+ //# sourceMappingURL=chunk-EPZVT7EJ.js.map