@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.
@@ -493,6 +493,13 @@ interface DatasetUpdate {
493
493
  auto_annotates?: string[];
494
494
  auto_annotate_params?: AutoAnnotateParams;
495
495
  }
496
+ interface DatasetHeroAssetUpdate {
497
+ uuid: string;
498
+ }
499
+ interface AssetImport {
500
+ url: string;
501
+ ground_truth?: Prediction;
502
+ }
496
503
  declare enum AssetStatus {
497
504
  rejected = "rejected",
498
505
  upload_in_progress = "upload_in_progress",
@@ -568,6 +575,7 @@ interface Model {
568
575
  description?: string;
569
576
  type: ModelType;
570
577
  status: ModelStatus;
578
+ status_message?: string;
571
579
  metrics?: ModelMetrics;
572
580
  account_uuid: string;
573
581
  created_at: Date;
@@ -577,12 +585,11 @@ interface Model {
577
585
  }
578
586
  interface ModelCreate {
579
587
  name: string;
580
- description?: string;
581
- type: ModelType;
588
+ description: string;
582
589
  }
583
590
  interface ModelUpdate {
584
591
  name: string;
585
- description?: string;
592
+ description: string;
586
593
  }
587
594
  declare enum ModelTrainingStage {
588
595
  waiting = "waiting",
@@ -644,14 +651,18 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
644
651
  private reconnect_ws;
645
652
  private options;
646
653
  private request;
647
- listDatasets(include_hero_asset?: boolean): Promise<Dataset[]>;
654
+ listDatasets(
655
+ /** @deprecated */ include_hero_asset?: boolean, include_stats?: boolean): Promise<Dataset[]>;
648
656
  createDataset(data: DatasetCreate): Promise<Dataset>;
649
- getDataset(dataset_uuid: string, include_hero_asset?: boolean): Promise<Dataset>;
657
+ getDataset(dataset_uuid: string,
658
+ /** @deprecated */ include_hero_asset?: boolean, include_stats?: boolean): Promise<Dataset>;
650
659
  updateDataset(dataset_uuid: string, data: DatasetUpdate): Promise<Dataset>;
660
+ updateDatasetHeroAsset(dataset_uuid: string, update: DatasetHeroAssetUpdate): Promise<Dataset>;
651
661
  deleteDataset(dataset_uuid: string): Promise<void>;
652
662
  freezeDatasetVersion(dataset_uuid: string, dataset_version?: number): Promise<Dataset>;
653
663
  deleteDatasetVersion(dataset_uuid: string, dataset_version: number): Promise<Dataset>;
654
664
  uploadAsset(dataset_uuid: string, dataset_version: number | undefined, blob: Blob, external_id?: string | undefined): Promise<Asset>;
665
+ importAsset(dataset_uuid: string, dataset_version: number | undefined, asset_import: AssetImport, external_id?: string | undefined): Promise<Asset>;
655
666
  listAssets(dataset_uuid: string, dataset_version?: number, include_annotations?: boolean): Promise<Asset[]>;
656
667
  getAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, include_annotations?: boolean): Promise<Asset>;
657
668
  deleteAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number): Promise<void>;
@@ -796,4 +807,4 @@ declare namespace EyePop {
796
807
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
797
808
  }
798
809
 
799
- export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
810
+ export { AbstractJob, type Annotation, AnnotationType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
@@ -493,6 +493,13 @@ interface DatasetUpdate {
493
493
  auto_annotates?: string[];
494
494
  auto_annotate_params?: AutoAnnotateParams;
495
495
  }
496
+ interface DatasetHeroAssetUpdate {
497
+ uuid: string;
498
+ }
499
+ interface AssetImport {
500
+ url: string;
501
+ ground_truth?: Prediction;
502
+ }
496
503
  declare enum AssetStatus {
497
504
  rejected = "rejected",
498
505
  upload_in_progress = "upload_in_progress",
@@ -568,6 +575,7 @@ interface Model {
568
575
  description?: string;
569
576
  type: ModelType;
570
577
  status: ModelStatus;
578
+ status_message?: string;
571
579
  metrics?: ModelMetrics;
572
580
  account_uuid: string;
573
581
  created_at: Date;
@@ -577,12 +585,11 @@ interface Model {
577
585
  }
578
586
  interface ModelCreate {
579
587
  name: string;
580
- description?: string;
581
- type: ModelType;
588
+ description: string;
582
589
  }
583
590
  interface ModelUpdate {
584
591
  name: string;
585
- description?: string;
592
+ description: string;
586
593
  }
587
594
  declare enum ModelTrainingStage {
588
595
  waiting = "waiting",
@@ -644,14 +651,18 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
644
651
  private reconnect_ws;
645
652
  private options;
646
653
  private request;
647
- listDatasets(include_hero_asset?: boolean): Promise<Dataset[]>;
654
+ listDatasets(
655
+ /** @deprecated */ include_hero_asset?: boolean, include_stats?: boolean): Promise<Dataset[]>;
648
656
  createDataset(data: DatasetCreate): Promise<Dataset>;
649
- getDataset(dataset_uuid: string, include_hero_asset?: boolean): Promise<Dataset>;
657
+ getDataset(dataset_uuid: string,
658
+ /** @deprecated */ include_hero_asset?: boolean, include_stats?: boolean): Promise<Dataset>;
650
659
  updateDataset(dataset_uuid: string, data: DatasetUpdate): Promise<Dataset>;
660
+ updateDatasetHeroAsset(dataset_uuid: string, update: DatasetHeroAssetUpdate): Promise<Dataset>;
651
661
  deleteDataset(dataset_uuid: string): Promise<void>;
652
662
  freezeDatasetVersion(dataset_uuid: string, dataset_version?: number): Promise<Dataset>;
653
663
  deleteDatasetVersion(dataset_uuid: string, dataset_version: number): Promise<Dataset>;
654
664
  uploadAsset(dataset_uuid: string, dataset_version: number | undefined, blob: Blob, external_id?: string | undefined): Promise<Asset>;
665
+ importAsset(dataset_uuid: string, dataset_version: number | undefined, asset_import: AssetImport, external_id?: string | undefined): Promise<Asset>;
655
666
  listAssets(dataset_uuid: string, dataset_version?: number, include_annotations?: boolean): Promise<Asset[]>;
656
667
  getAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, include_annotations?: boolean): Promise<Asset>;
657
668
  deleteAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number): Promise<void>;
@@ -796,4 +807,4 @@ declare namespace EyePop {
796
807
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
797
808
  }
798
809
 
799
- export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
810
+ export { AbstractJob, type Annotation, AnnotationType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, type ModelTrainingProgress, ModelTrainingStage, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
@@ -9046,8 +9046,7 @@ var UploadJob = class extends AbstractJob {
9046
9046
  body: formData,
9047
9047
  signal: this._controller.signal,
9048
9048
  // @ts-ignore
9049
- "duplex": "half",
9050
- dispatcher: this._dispatcher
9049
+ duplex: "half"
9051
9050
  });
9052
9051
  this._requestLogger.debug("after POST %s with multipart body because of params");
9053
9052
  } else {
@@ -9063,8 +9062,7 @@ var UploadJob = class extends AbstractJob {
9063
9062
  body: this._uploadStream,
9064
9063
  signal: this._controller.signal,
9065
9064
  // @ts-ignore
9066
- "duplex": "half",
9067
- dispatcher: this._dispatcher
9065
+ duplex: "half"
9068
9066
  });
9069
9067
  this._requestLogger.debug("after POST %s with stream as body");
9070
9068
  }
@@ -9100,9 +9098,7 @@ var LoadFromJob = class extends AbstractJob {
9100
9098
  headers,
9101
9099
  method: "PATCH",
9102
9100
  body: JSON.stringify(body),
9103
- signal: this._controller.signal,
9104
- // @ts-ignore
9105
- dispatcher: this._dispatcher
9101
+ signal: this._controller.signal
9106
9102
  });
9107
9103
  this._requestLogger.debug("after PATCH %s with url %s as source", patchUrl, this._location);
9108
9104
  return response;
@@ -9137,9 +9133,7 @@ var LoadLiveIngressJob = class extends AbstractJob {
9137
9133
  headers,
9138
9134
  method: "PATCH",
9139
9135
  body: JSON.stringify(body),
9140
- signal: this._controller.signal,
9141
- // @ts-ignore
9142
- dispatcher: this._dispatcher
9136
+ signal: this._controller.signal
9143
9137
  });
9144
9138
  this._requestLogger.debug("after PATCH %s with url %s as source", patchUrl, this._ingressId);
9145
9139
  return response;
@@ -11000,8 +10994,8 @@ var DataEndpoint = class extends Endpoint {
11000
10994
  this._requestLogger.debug("Response - " + response.status + " " + response.statusText);
11001
10995
  return response.json();
11002
10996
  }
11003
- async listDatasets(include_hero_asset = false) {
11004
- return this.request(`/datasets?account_uuid=${this._accountId}&include_hero_asset=${include_hero_asset}`, {
10997
+ async listDatasets(include_hero_asset = false, include_stats = true) {
10998
+ return this.request(`/datasets?account_uuid=${this._accountId}&include_stats=${include_stats}`, {
11005
10999
  method: "GET"
11006
11000
  });
11007
11001
  }
@@ -11011,8 +11005,8 @@ var DataEndpoint = class extends Endpoint {
11011
11005
  body: JSON.stringify(data)
11012
11006
  });
11013
11007
  }
11014
- async getDataset(dataset_uuid, include_hero_asset = false) {
11015
- return this.request(`/datasets/${dataset_uuid}?include_hero_asset=${include_hero_asset}`, {
11008
+ async getDataset(dataset_uuid, include_hero_asset = false, include_stats = true) {
11009
+ return this.request(`/datasets/${dataset_uuid}?include_stats=${include_stats}`, {
11016
11010
  method: "GET"
11017
11011
  });
11018
11012
  }
@@ -11022,6 +11016,12 @@ var DataEndpoint = class extends Endpoint {
11022
11016
  body: JSON.stringify(data)
11023
11017
  });
11024
11018
  }
11019
+ async updateDatasetHeroAsset(dataset_uuid, update) {
11020
+ return this.request(`/datasets/${dataset_uuid}/hero_asset`, {
11021
+ method: "PATCH",
11022
+ body: JSON.stringify(update)
11023
+ });
11024
+ }
11025
11025
  async deleteDataset(dataset_uuid) {
11026
11026
  return this.request(`/datasets/${dataset_uuid}`, {
11027
11027
  method: "DELETE"
@@ -11055,6 +11055,22 @@ var DataEndpoint = class extends Endpoint {
11055
11055
  }
11056
11056
  });
11057
11057
  }
11058
+ async importAsset(dataset_uuid, dataset_version, asset_import, external_id = void 0) {
11059
+ const versionQuery = dataset_version ? `&dataset_version=${dataset_version}` : "";
11060
+ let post_path;
11061
+ if (external_id) {
11062
+ post_path = `/assets/imports?dataset_uuid=${dataset_uuid}${versionQuery}&external_id=${external_id}`;
11063
+ } else {
11064
+ post_path = `/assets/imports?dataset_uuid=${dataset_uuid}${versionQuery}`;
11065
+ }
11066
+ return this.request(post_path, {
11067
+ method: "POST",
11068
+ body: JSON.stringify(asset_import),
11069
+ headers: {
11070
+ "Content-Type": "application/json"
11071
+ }
11072
+ });
11073
+ }
11058
11074
  async listAssets(dataset_uuid, dataset_version, include_annotations = false) {
11059
11075
  const versionQuery = dataset_version ? `&dataset_version=${dataset_version}` : "";
11060
11076
  const annotationsQuery = include_annotations ? "&include_annotations=true" : "";