@eyepop.ai/eyepop 1.2.2 → 1.3.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.
@@ -8989,8 +8989,7 @@ var UploadJob = class extends AbstractJob {
8989
8989
  body: formData,
8990
8990
  signal: this._controller.signal,
8991
8991
  // @ts-ignore
8992
- "duplex": "half",
8993
- dispatcher: this._dispatcher
8992
+ duplex: "half"
8994
8993
  });
8995
8994
  this._requestLogger.debug("after POST %s with multipart body because of params");
8996
8995
  } else {
@@ -9006,8 +9005,7 @@ var UploadJob = class extends AbstractJob {
9006
9005
  body: this._uploadStream,
9007
9006
  signal: this._controller.signal,
9008
9007
  // @ts-ignore
9009
- "duplex": "half",
9010
- dispatcher: this._dispatcher
9008
+ duplex: "half"
9011
9009
  });
9012
9010
  this._requestLogger.debug("after POST %s with stream as body");
9013
9011
  }
@@ -9043,9 +9041,7 @@ var LoadFromJob = class extends AbstractJob {
9043
9041
  headers,
9044
9042
  method: "PATCH",
9045
9043
  body: JSON.stringify(body),
9046
- signal: this._controller.signal,
9047
- // @ts-ignore
9048
- dispatcher: this._dispatcher
9044
+ signal: this._controller.signal
9049
9045
  });
9050
9046
  this._requestLogger.debug("after PATCH %s with url %s as source", patchUrl, this._location);
9051
9047
  return response;
@@ -9080,9 +9076,7 @@ var LoadLiveIngressJob = class extends AbstractJob {
9080
9076
  headers,
9081
9077
  method: "PATCH",
9082
9078
  body: JSON.stringify(body),
9083
- signal: this._controller.signal,
9084
- // @ts-ignore
9085
- dispatcher: this._dispatcher
9079
+ signal: this._controller.signal
9086
9080
  });
9087
9081
  this._requestLogger.debug("after PATCH %s with url %s as source", patchUrl, this._ingressId);
9088
9082
  return response;
@@ -10943,8 +10937,8 @@ var DataEndpoint = class extends Endpoint {
10943
10937
  this._requestLogger.debug("Response - " + response.status + " " + response.statusText);
10944
10938
  return response.json();
10945
10939
  }
10946
- async listDatasets(include_hero_asset = false) {
10947
- return this.request(`/datasets?account_uuid=${this._accountId}&include_hero_asset=${include_hero_asset}`, {
10940
+ async listDatasets(include_hero_asset = false, include_stats = true) {
10941
+ return this.request(`/datasets?account_uuid=${this._accountId}&include_stats=${include_stats}`, {
10948
10942
  method: "GET"
10949
10943
  });
10950
10944
  }
@@ -10954,8 +10948,8 @@ var DataEndpoint = class extends Endpoint {
10954
10948
  body: JSON.stringify(data)
10955
10949
  });
10956
10950
  }
10957
- async getDataset(dataset_uuid, include_hero_asset = false) {
10958
- return this.request(`/datasets/${dataset_uuid}?include_hero_asset=${include_hero_asset}`, {
10951
+ async getDataset(dataset_uuid, include_hero_asset = false, include_stats = true) {
10952
+ return this.request(`/datasets/${dataset_uuid}?include_stats=${include_stats}`, {
10959
10953
  method: "GET"
10960
10954
  });
10961
10955
  }
@@ -10965,6 +10959,12 @@ var DataEndpoint = class extends Endpoint {
10965
10959
  body: JSON.stringify(data)
10966
10960
  });
10967
10961
  }
10962
+ async updateDatasetHeroAsset(dataset_uuid, update) {
10963
+ return this.request(`/datasets/${dataset_uuid}/hero_asset`, {
10964
+ method: "PATCH",
10965
+ body: JSON.stringify(update)
10966
+ });
10967
+ }
10968
10968
  async deleteDataset(dataset_uuid) {
10969
10969
  return this.request(`/datasets/${dataset_uuid}`, {
10970
10970
  method: "DELETE"
@@ -10998,6 +10998,22 @@ var DataEndpoint = class extends Endpoint {
10998
10998
  }
10999
10999
  });
11000
11000
  }
11001
+ async importAsset(dataset_uuid, dataset_version, asset_import, external_id = void 0) {
11002
+ const versionQuery = dataset_version ? `&dataset_version=${dataset_version}` : "";
11003
+ let post_path;
11004
+ if (external_id) {
11005
+ post_path = `/assets/imports?dataset_uuid=${dataset_uuid}${versionQuery}&external_id=${external_id}`;
11006
+ } else {
11007
+ post_path = `/assets/imports?dataset_uuid=${dataset_uuid}${versionQuery}`;
11008
+ }
11009
+ return this.request(post_path, {
11010
+ method: "POST",
11011
+ body: JSON.stringify(asset_import),
11012
+ headers: {
11013
+ "Content-Type": "application/json"
11014
+ }
11015
+ });
11016
+ }
11001
11017
  async listAssets(dataset_uuid, dataset_version, include_annotations = false) {
11002
11018
  const versionQuery = dataset_version ? `&dataset_version=${dataset_version}` : "";
11003
11019
  const annotationsQuery = include_annotations ? "&include_annotations=true" : "";