@eyepop.ai/eyepop 1.6.1 → 1.7.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.
- package/dist/eyepop.index.d.mts +22 -1
- package/dist/eyepop.index.d.ts +22 -1
- package/dist/eyepop.index.js +93 -2
- package/dist/eyepop.index.js.map +1 -1
- package/dist/eyepop.index.mjs +93 -2
- package/dist/eyepop.index.mjs.map +1 -1
- package/dist/eyepop.min.js +1 -1
- package/package.json +1 -1
package/dist/eyepop.index.d.mts
CHANGED
|
@@ -406,6 +406,10 @@ interface Pop {
|
|
|
406
406
|
postTransform?: string;
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
+
interface ModelRef {
|
|
410
|
+
id: string;
|
|
411
|
+
folderUrl: string;
|
|
412
|
+
}
|
|
409
413
|
declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
410
414
|
private _baseUrl;
|
|
411
415
|
private _pipelineId;
|
|
@@ -422,6 +426,22 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
|
422
426
|
popName(): string | null;
|
|
423
427
|
pop(): Pop | null;
|
|
424
428
|
changePop(pop: Pop): Promise<void>;
|
|
429
|
+
/**
|
|
430
|
+
* @deprecated use pop() instead
|
|
431
|
+
*/
|
|
432
|
+
popComp(): string | null;
|
|
433
|
+
/**
|
|
434
|
+
* @deprecated use changePop() instead
|
|
435
|
+
*/
|
|
436
|
+
changePopComp(popComp: string, modelRefs?: ModelRef[]): Promise<void>;
|
|
437
|
+
/**
|
|
438
|
+
* @deprecated use pop() instead
|
|
439
|
+
*/
|
|
440
|
+
postTransform(): string | null;
|
|
441
|
+
/**
|
|
442
|
+
* @deprecated use changePop() instead
|
|
443
|
+
*/
|
|
444
|
+
changePostTransform(postTransform: string | null): Promise<void>;
|
|
425
445
|
popId(): string | null;
|
|
426
446
|
onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
|
|
427
447
|
liveIngress(stream: MediaStream): Promise<LiveMedia>;
|
|
@@ -460,6 +480,7 @@ interface DataSession extends Session {
|
|
|
460
480
|
interface DatasetVersionAssetStats {
|
|
461
481
|
total?: number;
|
|
462
482
|
accepted?: number;
|
|
483
|
+
rejected?: number;
|
|
463
484
|
annotated?: number;
|
|
464
485
|
auto_annotated?: number;
|
|
465
486
|
auto_annotated_approved?: number;
|
|
@@ -685,7 +706,7 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
685
706
|
private request;
|
|
686
707
|
listDatasets(include_stats?: boolean): Promise<Dataset[]>;
|
|
687
708
|
createDataset(data: DatasetCreate): Promise<Dataset>;
|
|
688
|
-
getDataset(dataset_uuid: string, include_stats?: boolean): Promise<Dataset>;
|
|
709
|
+
getDataset(dataset_uuid: string, include_stats?: boolean, dataset_version?: number, modifiable_version_only?: boolean): Promise<Dataset>;
|
|
689
710
|
updateDataset(dataset_uuid: string, data: DatasetUpdate, start_auto_annotate?: boolean): Promise<Dataset>;
|
|
690
711
|
updateDatasetHeroAsset(dataset_uuid: string, update: DatasetHeroAssetUpdate): Promise<Dataset>;
|
|
691
712
|
deleteDataset(dataset_uuid: string): Promise<void>;
|
package/dist/eyepop.index.d.ts
CHANGED
|
@@ -406,6 +406,10 @@ interface Pop {
|
|
|
406
406
|
postTransform?: string;
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
+
interface ModelRef {
|
|
410
|
+
id: string;
|
|
411
|
+
folderUrl: string;
|
|
412
|
+
}
|
|
409
413
|
declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
410
414
|
private _baseUrl;
|
|
411
415
|
private _pipelineId;
|
|
@@ -422,6 +426,22 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
|
422
426
|
popName(): string | null;
|
|
423
427
|
pop(): Pop | null;
|
|
424
428
|
changePop(pop: Pop): Promise<void>;
|
|
429
|
+
/**
|
|
430
|
+
* @deprecated use pop() instead
|
|
431
|
+
*/
|
|
432
|
+
popComp(): string | null;
|
|
433
|
+
/**
|
|
434
|
+
* @deprecated use changePop() instead
|
|
435
|
+
*/
|
|
436
|
+
changePopComp(popComp: string, modelRefs?: ModelRef[]): Promise<void>;
|
|
437
|
+
/**
|
|
438
|
+
* @deprecated use pop() instead
|
|
439
|
+
*/
|
|
440
|
+
postTransform(): string | null;
|
|
441
|
+
/**
|
|
442
|
+
* @deprecated use changePop() instead
|
|
443
|
+
*/
|
|
444
|
+
changePostTransform(postTransform: string | null): Promise<void>;
|
|
425
445
|
popId(): string | null;
|
|
426
446
|
onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
|
|
427
447
|
liveIngress(stream: MediaStream): Promise<LiveMedia>;
|
|
@@ -460,6 +480,7 @@ interface DataSession extends Session {
|
|
|
460
480
|
interface DatasetVersionAssetStats {
|
|
461
481
|
total?: number;
|
|
462
482
|
accepted?: number;
|
|
483
|
+
rejected?: number;
|
|
463
484
|
annotated?: number;
|
|
464
485
|
auto_annotated?: number;
|
|
465
486
|
auto_annotated_approved?: number;
|
|
@@ -685,7 +706,7 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
685
706
|
private request;
|
|
686
707
|
listDatasets(include_stats?: boolean): Promise<Dataset[]>;
|
|
687
708
|
createDataset(data: DatasetCreate): Promise<Dataset>;
|
|
688
|
-
getDataset(dataset_uuid: string, include_stats?: boolean): Promise<Dataset>;
|
|
709
|
+
getDataset(dataset_uuid: string, include_stats?: boolean, dataset_version?: number, modifiable_version_only?: boolean): Promise<Dataset>;
|
|
689
710
|
updateDataset(dataset_uuid: string, data: DatasetUpdate, start_auto_annotate?: boolean): Promise<Dataset>;
|
|
690
711
|
updateDatasetHeroAsset(dataset_uuid: string, update: DatasetHeroAssetUpdate): Promise<Dataset>;
|
|
691
712
|
deleteDataset(dataset_uuid: string): Promise<void>;
|
package/dist/eyepop.index.js
CHANGED
|
@@ -10269,6 +10269,95 @@ var WorkerEndpoint = class extends Endpoint {
|
|
|
10269
10269
|
this._pipeline.pop = pop;
|
|
10270
10270
|
}
|
|
10271
10271
|
}
|
|
10272
|
+
/**
|
|
10273
|
+
* @deprecated use pop() instead
|
|
10274
|
+
*/
|
|
10275
|
+
popComp() {
|
|
10276
|
+
if (this._pipeline) {
|
|
10277
|
+
return this._pipeline.inferPipeline ?? null;
|
|
10278
|
+
} else {
|
|
10279
|
+
return null;
|
|
10280
|
+
}
|
|
10281
|
+
}
|
|
10282
|
+
/**
|
|
10283
|
+
* @deprecated use changePop() instead
|
|
10284
|
+
*/
|
|
10285
|
+
async changePopComp(popComp, modelRefs = []) {
|
|
10286
|
+
const client = this._client;
|
|
10287
|
+
const baseUrl = this._baseUrl;
|
|
10288
|
+
if (!baseUrl || !client) {
|
|
10289
|
+
return Promise.reject("endpoint not connected, use connect() before changePopComp()");
|
|
10290
|
+
}
|
|
10291
|
+
const body = {
|
|
10292
|
+
"pipeline": popComp,
|
|
10293
|
+
"modelRefs": modelRefs
|
|
10294
|
+
};
|
|
10295
|
+
let response = await this.fetchWithRetry(async () => {
|
|
10296
|
+
const session = await this.session();
|
|
10297
|
+
let headers = {
|
|
10298
|
+
"Authorization": `Bearer ${session.accessToken}`,
|
|
10299
|
+
"Content-Type": "application/json"
|
|
10300
|
+
};
|
|
10301
|
+
const patch_url = `${session.baseUrl}/pipelines/${session.pipelineId}/inferencePipeline`;
|
|
10302
|
+
return client.fetch(patch_url, {
|
|
10303
|
+
method: "PATCH",
|
|
10304
|
+
body: JSON.stringify(body),
|
|
10305
|
+
headers
|
|
10306
|
+
});
|
|
10307
|
+
});
|
|
10308
|
+
if (response.status != 204) {
|
|
10309
|
+
const message = await response.text();
|
|
10310
|
+
console.error(message);
|
|
10311
|
+
return Promise.reject(`Unexpected status ${response.status}: ${message}`);
|
|
10312
|
+
}
|
|
10313
|
+
if (this._pipeline) {
|
|
10314
|
+
this._pipeline.inferPipeline = popComp;
|
|
10315
|
+
this._pipeline.modelRefs = modelRefs;
|
|
10316
|
+
}
|
|
10317
|
+
}
|
|
10318
|
+
/**
|
|
10319
|
+
* @deprecated use pop() instead
|
|
10320
|
+
*/
|
|
10321
|
+
postTransform() {
|
|
10322
|
+
if (this._pipeline) {
|
|
10323
|
+
return this._pipeline.postTransform;
|
|
10324
|
+
} else {
|
|
10325
|
+
return null;
|
|
10326
|
+
}
|
|
10327
|
+
}
|
|
10328
|
+
/**
|
|
10329
|
+
* @deprecated use changePop() instead
|
|
10330
|
+
*/
|
|
10331
|
+
async changePostTransform(postTransform) {
|
|
10332
|
+
const client = this._client;
|
|
10333
|
+
const baseUrl = this._baseUrl;
|
|
10334
|
+
if (!baseUrl || !client) {
|
|
10335
|
+
return Promise.reject("endpoint not connected, use connect() before changePopComp()");
|
|
10336
|
+
}
|
|
10337
|
+
const body = {
|
|
10338
|
+
"transform": postTransform
|
|
10339
|
+
};
|
|
10340
|
+
let response = await this.fetchWithRetry(async () => {
|
|
10341
|
+
const session = await this.session();
|
|
10342
|
+
let headers = {
|
|
10343
|
+
"Authorization": `Bearer ${session.accessToken}`,
|
|
10344
|
+
"Content-Type": "application/json"
|
|
10345
|
+
};
|
|
10346
|
+
const patch_url = `${session.baseUrl}/pipelines/${session.pipelineId}/postTransform`;
|
|
10347
|
+
return client.fetch(patch_url, {
|
|
10348
|
+
method: "PATCH",
|
|
10349
|
+
body: JSON.stringify(body),
|
|
10350
|
+
headers
|
|
10351
|
+
});
|
|
10352
|
+
});
|
|
10353
|
+
if (response.status != 204) {
|
|
10354
|
+
const message = await response.text();
|
|
10355
|
+
return Promise.reject(`Unexpected status ${response.status}: ${message}`);
|
|
10356
|
+
}
|
|
10357
|
+
if (this._pipeline) {
|
|
10358
|
+
this._pipeline.postTransform = postTransform;
|
|
10359
|
+
}
|
|
10360
|
+
}
|
|
10272
10361
|
popId() {
|
|
10273
10362
|
return this.options().popId || null;
|
|
10274
10363
|
}
|
|
@@ -11146,8 +11235,10 @@ var DataEndpoint = class extends Endpoint {
|
|
|
11146
11235
|
body: JSON.stringify(data)
|
|
11147
11236
|
});
|
|
11148
11237
|
}
|
|
11149
|
-
async getDataset(dataset_uuid, include_stats = true) {
|
|
11150
|
-
|
|
11238
|
+
async getDataset(dataset_uuid, include_stats = true, dataset_version, modifiable_version_only) {
|
|
11239
|
+
const versionQuery = dataset_version ? `&dataset_version=${dataset_version}` : "";
|
|
11240
|
+
const modifiableVersionQuery = typeof modifiable_version_only !== "undefined" ? `&modifiable_version_only=${modifiable_version_only}` : "";
|
|
11241
|
+
return this.request(`/datasets/${dataset_uuid}?include_stats=${include_stats}${versionQuery}${modifiableVersionQuery}`, {
|
|
11151
11242
|
method: "GET"
|
|
11152
11243
|
});
|
|
11153
11244
|
}
|