@coasys/ad4m-connect 0.13.1-staging.3 → 0.13.1-staging.4

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/core.js CHANGED
@@ -39,7 +39,7 @@ var __async = (__this, __arguments, generator) => {
39
39
  };
40
40
 
41
41
  // ../package.json
42
- var version = "0.13.1-staging.3";
42
+ var version = "0.13.1-staging.4";
43
43
 
44
44
  // src/utils.ts
45
45
  function isEmbedded() {
@@ -429,7 +429,7 @@ var ApiClient = class {
429
429
  ws.onclose = (event) => {
430
430
  reject(event?.code === CLOSE_AUTH_FAILED ? new RpcError(401, event.reason || "token expired or revoked") : closedError(event?.code === CLOSE_TRY_AGAIN_LATER ? event.reason : void 0));
431
431
  if (event?.code === CLOSE_AUTH_FAILED && this._ws === ws) {
432
- this._failAuth(event.reason || "token expired or revoked");
432
+ this._failAuth(event.reason || "Unauthorized access: the token expired or was revoked");
433
433
  } else {
434
434
  this._onClose(ws, event?.code === CLOSE_TRY_AGAIN_LATER ? event.reason : void 0);
435
435
  }
@@ -1195,8 +1195,8 @@ var AgentClient = class {
1195
1195
  async entanglementProofPreFlight(deviceKey, deviceKeyType) {
1196
1196
  return __classPrivateFieldGet$c(this, _AgentClient_apiClient, "f").call("agent.entanglementProofPreflight", { deviceKey, deviceKeyType });
1197
1197
  }
1198
- async requestCapability(authInfo) {
1199
- return __classPrivateFieldGet$c(this, _AgentClient_apiClient, "f").call("agent.requestCapability", { authInfo });
1198
+ async requestCapability(authInfo, agent) {
1199
+ return __classPrivateFieldGet$c(this, _AgentClient_apiClient, "f").call("agent.requestCapability", agent === void 0 ? { authInfo } : { authInfo, agent });
1200
1200
  }
1201
1201
  async permitCapability(auth) {
1202
1202
  return __classPrivateFieldGet$c(this, _AgentClient_apiClient, "f").call("agent.permitCapability", { auth });
@@ -1231,6 +1231,12 @@ var AgentClient = class {
1231
1231
  async verifyEmailCode(email, code2, verificationType) {
1232
1232
  return __classPrivateFieldGet$c(this, _AgentClient_apiClient, "f").call("user.verifyEmail", { email, code: code2, verificationType });
1233
1233
  }
1234
+ async logout() {
1235
+ return __classPrivateFieldGet$c(this, _AgentClient_apiClient, "f").call("user.logout", {});
1236
+ }
1237
+ async revokeAllSessions(email) {
1238
+ return __classPrivateFieldGet$c(this, _AgentClient_apiClient, "f").call("user.revokeAllSessions", email === void 0 ? {} : { email });
1239
+ }
1234
1240
  async hostingUserInfo() {
1235
1241
  const info = (await __classPrivateFieldGet$c(this, _AgentClient_apiClient, "f").call("hosting.info", {})).userInfo ?? {
1236
1242
  email: "",