@eyepop.ai/eyepop 1.2.2 → 1.2.3

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.
@@ -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" : "";