@eyepop.ai/eyepop 0.18.7 → 0.19.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.
@@ -9837,6 +9837,13 @@ var Endpoint = class {
9837
9837
  return null;
9838
9838
  }
9839
9839
  }
9840
+ postTransform() {
9841
+ if (this._pipeline) {
9842
+ return this._pipeline.postTransform;
9843
+ } else {
9844
+ return null;
9845
+ }
9846
+ }
9840
9847
  async changePopComp(popComp) {
9841
9848
  const client = this._client;
9842
9849
  const baseUrl = this._baseUrl;
@@ -9867,6 +9874,36 @@ var Endpoint = class {
9867
9874
  this._pipeline.inferPipeline = popComp;
9868
9875
  }
9869
9876
  }
9877
+ async changePostTransform(postTransform) {
9878
+ const client = this._client;
9879
+ const baseUrl = this._baseUrl;
9880
+ if (!baseUrl || !client) {
9881
+ return Promise.reject("endpoint not connected, use connect() before changePopComp()");
9882
+ }
9883
+ const body = {
9884
+ "transform": postTransform
9885
+ };
9886
+ let response = await this.fetchWithRetry(async () => {
9887
+ const session = await this.session();
9888
+ let headers = {
9889
+ "Authorization": `Bearer ${session.accessToken}`,
9890
+ "Content-Type": "application/json"
9891
+ };
9892
+ const patch_url = `${session.baseUrl}/pipelines/${session.pipelineId}/postTransform`;
9893
+ return client.fetch(patch_url, {
9894
+ method: "PATCH",
9895
+ body: JSON.stringify(body),
9896
+ headers
9897
+ });
9898
+ });
9899
+ if (response.status != 204) {
9900
+ const message = await response.text();
9901
+ return Promise.reject(`Unexpected status ${response.status}: ${message}`);
9902
+ }
9903
+ if (this._pipeline) {
9904
+ this._pipeline.postTransform = postTransform;
9905
+ }
9906
+ }
9870
9907
  popId() {
9871
9908
  return this._options.popId || null;
9872
9909
  }
@@ -10339,10 +10376,19 @@ var Endpoint = class {
10339
10376
  } else {
10340
10377
  pipeline = "identity";
10341
10378
  }
10379
+ let postTransform;
10380
+ if (this._pipeline && this._pipeline.postTransform) {
10381
+ postTransform = this._pipeline.postTransform;
10382
+ } else {
10383
+ postTransform = null;
10384
+ }
10342
10385
  const body = {
10343
10386
  "inferPipelineDef": {
10344
10387
  "pipeline": pipeline
10345
10388
  },
10389
+ "postTransformDef": {
10390
+ "transform": postTransform
10391
+ },
10346
10392
  "source": {
10347
10393
  "sourceType": "NONE"
10348
10394
  },