@eyepop.ai/eyepop 1.11.6 → 1.12.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.
@@ -18,11 +18,11 @@ interface Box {
18
18
  readonly bottomRight: Point2d;
19
19
  }
20
20
  interface Roi {
21
- readonly points: Point2d[] | undefined;
22
- readonly boxes: Box[] | undefined;
21
+ readonly points?: Point2d[];
22
+ readonly boxes?: Box[];
23
23
  }
24
24
  interface SourceParams {
25
- readonly roi: Roi | undefined;
25
+ readonly roi?: Roi;
26
26
  }
27
27
  interface StreamTime {
28
28
  timestamp?: number;
@@ -455,7 +455,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
455
455
  onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
456
456
  liveIngress(stream: MediaStream): Promise<LiveMedia>;
457
457
  liveEgress(ingressId: string): Promise<LiveMedia>;
458
- process(source: Source, params?: SourceParams | undefined): Promise<ResultStream>;
458
+ process(source: Source, params?: SourceParams): Promise<ResultStream>;
459
459
  private startIngressWs;
460
460
  private uploadFile;
461
461
  private uploadStream;
@@ -506,6 +506,10 @@ interface DatasetVersion {
506
506
  asset_stats?: DatasetVersionAssetStats;
507
507
  default_source_model_uuid?: string;
508
508
  }
509
+ interface DatasetParent {
510
+ dataset_uuid: string;
511
+ dataset_version: number;
512
+ }
509
513
  interface Dataset {
510
514
  uuid: string;
511
515
  name: string;
@@ -518,6 +522,7 @@ interface Dataset {
518
522
  updated_at: Date;
519
523
  modifiable_version?: number;
520
524
  versions: DatasetVersion[];
525
+ parent?: DatasetParent;
521
526
  }
522
527
  interface DatasetCreate {
523
528
  name: string;
@@ -825,7 +830,7 @@ declare class UploadJob extends AbstractJob {
825
830
  private readonly _mimeType;
826
831
  private readonly _needsFullDuplex;
827
832
  get [Symbol.toStringTag](): string;
828
- constructor(stream: any, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
833
+ constructor(stream: ReadableStream<Uint8Array>, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
829
834
  protected onEvent(event: StreamEvent): Promise<void>;
830
835
  protected startJob(): Promise<Response>;
831
836
  }
@@ -905,4 +910,4 @@ declare namespace EyePop {
905
910
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
906
911
  }
907
912
 
908
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, 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, ExportedBy, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, 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 PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
913
+ export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, 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 DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, 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 PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
@@ -18,11 +18,11 @@ interface Box {
18
18
  readonly bottomRight: Point2d;
19
19
  }
20
20
  interface Roi {
21
- readonly points: Point2d[] | undefined;
22
- readonly boxes: Box[] | undefined;
21
+ readonly points?: Point2d[];
22
+ readonly boxes?: Box[];
23
23
  }
24
24
  interface SourceParams {
25
- readonly roi: Roi | undefined;
25
+ readonly roi?: Roi;
26
26
  }
27
27
  interface StreamTime {
28
28
  timestamp?: number;
@@ -455,7 +455,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
455
455
  onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
456
456
  liveIngress(stream: MediaStream): Promise<LiveMedia>;
457
457
  liveEgress(ingressId: string): Promise<LiveMedia>;
458
- process(source: Source, params?: SourceParams | undefined): Promise<ResultStream>;
458
+ process(source: Source, params?: SourceParams): Promise<ResultStream>;
459
459
  private startIngressWs;
460
460
  private uploadFile;
461
461
  private uploadStream;
@@ -506,6 +506,10 @@ interface DatasetVersion {
506
506
  asset_stats?: DatasetVersionAssetStats;
507
507
  default_source_model_uuid?: string;
508
508
  }
509
+ interface DatasetParent {
510
+ dataset_uuid: string;
511
+ dataset_version: number;
512
+ }
509
513
  interface Dataset {
510
514
  uuid: string;
511
515
  name: string;
@@ -518,6 +522,7 @@ interface Dataset {
518
522
  updated_at: Date;
519
523
  modifiable_version?: number;
520
524
  versions: DatasetVersion[];
525
+ parent?: DatasetParent;
521
526
  }
522
527
  interface DatasetCreate {
523
528
  name: string;
@@ -825,7 +830,7 @@ declare class UploadJob extends AbstractJob {
825
830
  private readonly _mimeType;
826
831
  private readonly _needsFullDuplex;
827
832
  get [Symbol.toStringTag](): string;
828
- constructor(stream: any, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
833
+ constructor(stream: ReadableStream<Uint8Array>, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
829
834
  protected onEvent(event: StreamEvent): Promise<void>;
830
835
  protected startJob(): Promise<Response>;
831
836
  }
@@ -905,4 +910,4 @@ declare namespace EyePop {
905
910
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
906
911
  }
907
912
 
908
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, 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, ExportedBy, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, 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 PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
913
+ export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, 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 DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, 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 PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
@@ -8987,8 +8987,9 @@ var UploadJob = class extends AbstractJob {
8987
8987
  const params = JSON.stringify(this._params);
8988
8988
  const paramBlob = new Blob([params], { type: "application/json" });
8989
8989
  const formData = new FormData();
8990
+ const fileBlob = await new Response(this._uploadStream).blob();
8990
8991
  formData.append("params", paramBlob);
8991
- formData.append("file", this._uploadStream);
8992
+ formData.append("file", fileBlob);
8992
8993
  const headers = {
8993
8994
  ...session.authenticationHeaders(),
8994
8995
  Accept: "application/jsonl"
@@ -9057,8 +9058,9 @@ var UploadJob = class extends AbstractJob {
9057
9058
  const params = JSON.stringify(this._params);
9058
9059
  const paramBlob = new Blob([params], { type: "application/json" });
9059
9060
  const formData = new FormData();
9061
+ const fileBlob = await new Response(this._uploadStream).blob();
9060
9062
  formData.append("params", paramBlob);
9061
- formData.append("file", this._uploadStream);
9063
+ formData.append("file", fileBlob);
9062
9064
  const headers = {
9063
9065
  ...session.authenticationHeaders(),
9064
9066
  Accept: "application/jsonl"
@@ -9640,7 +9642,6 @@ if ("document" in globalThis && "implementation" in globalThis.document) {
9640
9642
  }
9641
9643
  }
9642
9644
  createHttpClient = async () => {
9643
- console.debug("EyePop: creating HttpClient in browser");
9644
9645
  return new BrowserHttpClient();
9645
9646
  };
9646
9647
  } else if (typeof navigator !== "undefined" && navigator.product === "ReactNative") {
@@ -9656,7 +9657,6 @@ if ("document" in globalThis && "implementation" in globalThis.document) {
9656
9657
  }
9657
9658
  }
9658
9659
  createHttpClient = async () => {
9659
- console.debug("EyePop: creating HttpClient in ReactNative");
9660
9660
  return new ReactNativeHttpClient();
9661
9661
  };
9662
9662
  } else {
@@ -9674,7 +9674,6 @@ if ("document" in globalThis && "implementation" in globalThis.document) {
9674
9674
  }
9675
9675
  }
9676
9676
  createHttpClient = async () => {
9677
- console.debug("EyePop: creating HttpClient with undici agent in Node");
9678
9677
  const undici = require("undici");
9679
9678
  const agent = new undici.Agent({
9680
9679
  keepAliveTimeout: 1e4,
@@ -10329,7 +10328,7 @@ var WorkerEndpoint = class extends Endpoint {
10329
10328
  );
10330
10329
  return whep.start();
10331
10330
  }
10332
- async process(source, params = void 0) {
10331
+ async process(source, params) {
10333
10332
  if (source.file !== void 0) {
10334
10333
  return this.uploadFile(source, params);
10335
10334
  } else if (source.stream !== void 0) {
@@ -10383,7 +10382,7 @@ var WorkerEndpoint = class extends Endpoint {
10383
10382
  try {
10384
10383
  this.updateState();
10385
10384
  const job = new UploadJob(
10386
- source.file,
10385
+ source.file.stream(),
10387
10386
  source.file.type,
10388
10387
  params,
10389
10388
  async () => {