@eyepop.ai/eyepop 0.18.5 → 0.18.6

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.
@@ -9,6 +9,7 @@ interface Session {
9
9
  interface SessionPlus extends Session {
10
10
  readonly baseUrl: string;
11
11
  readonly pipelineId: string;
12
+ readonly sandboxId: string | undefined;
12
13
  }
13
14
  declare enum EndpointState {
14
15
  Idle = "Idle",
@@ -185,6 +186,7 @@ declare class Endpoint {
185
186
  private _expire_token_time;
186
187
  private _baseUrl;
187
188
  private _pipelineId;
189
+ private _sandboxId;
188
190
  private _popName;
189
191
  private _pipeline;
190
192
  private _client;
@@ -9,6 +9,7 @@ interface Session {
9
9
  interface SessionPlus extends Session {
10
10
  readonly baseUrl: string;
11
11
  readonly pipelineId: string;
12
+ readonly sandboxId: string | undefined;
12
13
  }
13
14
  declare enum EndpointState {
14
15
  Idle = "Idle",
@@ -185,6 +186,7 @@ declare class Endpoint {
185
186
  private _expire_token_time;
186
187
  private _baseUrl;
187
188
  private _pipelineId;
189
+ private _sandboxId;
188
190
  private _popName;
189
191
  private _pipeline;
190
192
  private _client;
@@ -9825,6 +9825,14 @@ var Endpoint = class {
9825
9825
  this._stateChangeHandler = null;
9826
9826
  this._ingressEventHandler = null;
9827
9827
  this._ingressEventWs = null;
9828
+ this._sandboxId = null;
9829
+ const sessionAuth = options.auth;
9830
+ if (sessionAuth.session !== void 0) {
9831
+ const sessionPlus = sessionAuth.session;
9832
+ if (sessionPlus.sandboxId) {
9833
+ this._sandboxId = sessionPlus.sandboxId;
9834
+ }
9835
+ }
9828
9836
  this._limit = new Semaphore(this._options.jobQueueLength ?? 1024);
9829
9837
  let rootLogger;
9830
9838
  if (options.logger) {
@@ -9966,6 +9974,7 @@ var Endpoint = class {
9966
9974
  }
9967
9975
  this._baseUrl = null;
9968
9976
  this._pipelineId = null;
9977
+ this._sandboxId = null;
9969
9978
  }
9970
9979
  async session() {
9971
9980
  await this.currentAccessToken();
@@ -9984,7 +9993,8 @@ var Endpoint = class {
9984
9993
  accessToken: this._token,
9985
9994
  validUntil: this._expire_token_time * 1e3,
9986
9995
  baseUrl: this._baseUrl,
9987
- pipelineId: this._pipelineId
9996
+ pipelineId: this._pipelineId,
9997
+ sandboxId: this._sandboxId ?? void 0
9988
9998
  };
9989
9999
  }
9990
10000
  async liveIngress(stream) {
@@ -10369,7 +10379,12 @@ var Endpoint = class {
10369
10379
  "logging": ["out_meta"],
10370
10380
  "videoOutput": "no_output"
10371
10381
  };
10372
- const post_url = `${this._baseUrl.replace(/\/+$/, "")}/pipelines`;
10382
+ let post_url;
10383
+ if (this._sandboxId) {
10384
+ post_url = `${this._baseUrl.replace(/\/+$/, "")}/pipelines?sandboxId=${this._sandboxId}`;
10385
+ } else {
10386
+ post_url = `${this._baseUrl.replace(/\/+$/, "")}/pipelines`;
10387
+ }
10373
10388
  let headers = {
10374
10389
  "Content-Type": "application/json",
10375
10390
  "Authorization": await this.authorizationHeader()