@eyepop.ai/eyepop 1.0.4 → 1.1.1

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.
@@ -445,6 +445,7 @@ interface DataOptions extends Options {
445
445
  */
446
446
  accountId?: string | undefined;
447
447
  disableWs?: boolean | undefined;
448
+ useCookie?: boolean | undefined;
448
449
  }
449
450
 
450
451
  interface DataSession extends Session {
@@ -445,6 +445,7 @@ interface DataOptions extends Options {
445
445
  */
446
446
  accountId?: string | undefined;
447
447
  disableWs?: boolean | undefined;
448
+ useCookie?: boolean | undefined;
448
449
  }
449
450
 
450
451
  interface DataSession extends Session {
@@ -10870,6 +10870,21 @@ var DataEndpoint = class extends Endpoint {
10870
10870
  } else {
10871
10871
  await this.reconnect_ws();
10872
10872
  }
10873
+ if (this.options().useCookie) {
10874
+ const client = this._client;
10875
+ const url = urlJoin(this._baseUrl, "security", "check?set_cookie=true");
10876
+ const headers2 = {
10877
+ "Authorization": await this.authorizationHeader()
10878
+ };
10879
+ response = await client.fetch(url, {
10880
+ headers: headers2
10881
+ });
10882
+ if (response.status != 204) {
10883
+ this.updateState("Error" /* Error */);
10884
+ const message = await response.text();
10885
+ return Promise.reject(`Unexpected status ${response.status}: ${message}`);
10886
+ }
10887
+ }
10873
10888
  this.updateState();
10874
10889
  return Promise.resolve(this);
10875
10890
  }
@@ -11329,7 +11344,7 @@ var EyePop;
11329
11344
  domain: "dev-eyepop.us.auth0.com",
11330
11345
  clientId: "jktx3YO2UnbkNPvr05PQWf26t1kNTJyg",
11331
11346
  audience: "https://dev-app.eyepop.ai",
11332
- scope: "admin:clouds"
11347
+ scope: "admin:clouds access:inference-api access:datasets"
11333
11348
  }
11334
11349
  };
11335
11350
  } else {
@@ -11338,7 +11353,7 @@ var EyePop;
11338
11353
  domain: "eyepop.us.auth0.com",
11339
11354
  clientId: "Lb9ubA9Hf3jlaqWLUx8XgA0zvotgViCl",
11340
11355
  audience: "https://api.eyepop.ai",
11341
- scope: "admin:clouds"
11356
+ scope: "admin:clouds access:inference-api access:datasets"
11342
11357
  }
11343
11358
  };
11344
11359
  }