@eyepop.ai/eyepop 1.0.3 → 1.1.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
CHANGED
|
@@ -445,6 +445,7 @@ interface DataOptions extends Options {
|
|
|
445
445
|
*/
|
|
446
446
|
accountId?: string | undefined;
|
|
447
447
|
disableWs?: boolean | undefined;
|
|
448
|
+
useCookie?: boolean | undefined;
|
|
448
449
|
}
|
|
449
450
|
|
|
450
451
|
interface DataSession extends Session {
|
|
@@ -518,6 +519,7 @@ interface AutoAnnotateParams {
|
|
|
518
519
|
interface Annotation {
|
|
519
520
|
type: AnnotationType;
|
|
520
521
|
user_review: UserReview;
|
|
522
|
+
approved_threshold?: number;
|
|
521
523
|
auto_annotate?: string;
|
|
522
524
|
auto_annotate_params?: AutoAnnotateParams;
|
|
523
525
|
uncertainty_score?: number;
|
|
@@ -629,7 +631,7 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
629
631
|
deleteAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number): Promise<void>;
|
|
630
632
|
resurrectAsset(asset_uuid: string, dataset_uuid: string, from_dataset_version: number, into_dataset_version?: number): Promise<void>;
|
|
631
633
|
updateAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, prediction?: Prediction$1): Promise<void>;
|
|
632
|
-
updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview): Promise<void>;
|
|
634
|
+
updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview, approved_threshold?: number): Promise<void>;
|
|
633
635
|
downloadAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode): Promise<Blob>;
|
|
634
636
|
previewAutoAnnotateAsset(asset_uuid: string, auto_annotate: string, auto_annotate_params?: AutoAnnotateParams): Promise<Annotation>;
|
|
635
637
|
listModels(): Promise<Model[]>;
|
package/dist/eyepop.index.d.ts
CHANGED
|
@@ -445,6 +445,7 @@ interface DataOptions extends Options {
|
|
|
445
445
|
*/
|
|
446
446
|
accountId?: string | undefined;
|
|
447
447
|
disableWs?: boolean | undefined;
|
|
448
|
+
useCookie?: boolean | undefined;
|
|
448
449
|
}
|
|
449
450
|
|
|
450
451
|
interface DataSession extends Session {
|
|
@@ -518,6 +519,7 @@ interface AutoAnnotateParams {
|
|
|
518
519
|
interface Annotation {
|
|
519
520
|
type: AnnotationType;
|
|
520
521
|
user_review: UserReview;
|
|
522
|
+
approved_threshold?: number;
|
|
521
523
|
auto_annotate?: string;
|
|
522
524
|
auto_annotate_params?: AutoAnnotateParams;
|
|
523
525
|
uncertainty_score?: number;
|
|
@@ -629,7 +631,7 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
629
631
|
deleteAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number): Promise<void>;
|
|
630
632
|
resurrectAsset(asset_uuid: string, dataset_uuid: string, from_dataset_version: number, into_dataset_version?: number): Promise<void>;
|
|
631
633
|
updateAssetGroundTruth(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, prediction?: Prediction$1): Promise<void>;
|
|
632
|
-
updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview): Promise<void>;
|
|
634
|
+
updateAutoAnnotationStatus(asset_uuid: string, auto_annotate: string, user_review: UserReview, approved_threshold?: number): Promise<void>;
|
|
633
635
|
downloadAsset(asset_uuid: string, dataset_uuid?: string, dataset_version?: number, transcode_mode?: TranscodeMode): Promise<Blob>;
|
|
634
636
|
previewAutoAnnotateAsset(asset_uuid: string, auto_annotate: string, auto_annotate_params?: AutoAnnotateParams): Promise<Annotation>;
|
|
635
637
|
listModels(): Promise<Model[]>;
|
package/dist/eyepop.index.js
CHANGED
|
@@ -10870,6 +10870,21 @@ var DataEndpoint = class extends Endpoint {
|
|
|
10870
10870
|
} else {
|
|
10871
10871
|
await this.reconnect_ws();
|
|
10872
10872
|
}
|
|
10873
|
+
if (this.options().useCookie) {
|
|
10874
|
+
const client = this._client;
|
|
10875
|
+
const url = urlJoin(this._baseUrl, "security", "check?set_cookie=true");
|
|
10876
|
+
const headers2 = {
|
|
10877
|
+
"Authorization": await this.authorizationHeader()
|
|
10878
|
+
};
|
|
10879
|
+
response = await client.fetch(url, {
|
|
10880
|
+
headers: headers2
|
|
10881
|
+
});
|
|
10882
|
+
if (response.status != 204) {
|
|
10883
|
+
this.updateState("Error" /* Error */);
|
|
10884
|
+
const message = await response.text();
|
|
10885
|
+
return Promise.reject(`Unexpected status ${response.status}: ${message}`);
|
|
10886
|
+
}
|
|
10887
|
+
}
|
|
10873
10888
|
this.updateState();
|
|
10874
10889
|
return Promise.resolve(this);
|
|
10875
10890
|
}
|
|
@@ -10942,6 +10957,9 @@ var DataEndpoint = class extends Endpoint {
|
|
|
10942
10957
|
if (!baseUrl || !client) {
|
|
10943
10958
|
return Promise.reject("endpoint not connected");
|
|
10944
10959
|
}
|
|
10960
|
+
if (!disableAuth && this.options().useCookie) {
|
|
10961
|
+
disableAuth = true;
|
|
10962
|
+
}
|
|
10945
10963
|
let response = await this.fetchWithRetry(async () => {
|
|
10946
10964
|
const session = await this.session();
|
|
10947
10965
|
const headers = {
|
|
@@ -11066,12 +11084,13 @@ var DataEndpoint = class extends Endpoint {
|
|
|
11066
11084
|
body: JSON.stringify(prediction)
|
|
11067
11085
|
});
|
|
11068
11086
|
}
|
|
11069
|
-
async updateAutoAnnotationStatus(asset_uuid, auto_annotate, user_review) {
|
|
11087
|
+
async updateAutoAnnotationStatus(asset_uuid, auto_annotate, user_review, approved_threshold) {
|
|
11070
11088
|
const validStatuses = ["approved", "rejected", "unknown"];
|
|
11071
11089
|
if (!validStatuses.includes(user_review)) {
|
|
11072
11090
|
throw new Error("Invalid status");
|
|
11073
11091
|
}
|
|
11074
|
-
|
|
11092
|
+
const thresholdQuery = approved_threshold ? `?approved_threshold=${approved_threshold}` : "";
|
|
11093
|
+
return this.request(`/assets/${asset_uuid}/auto_annotations/${auto_annotate}/user_review/${user_review}${thresholdQuery}`, {
|
|
11075
11094
|
method: "PATCH"
|
|
11076
11095
|
});
|
|
11077
11096
|
}
|
|
@@ -11328,7 +11347,7 @@ var EyePop;
|
|
|
11328
11347
|
domain: "dev-eyepop.us.auth0.com",
|
|
11329
11348
|
clientId: "jktx3YO2UnbkNPvr05PQWf26t1kNTJyg",
|
|
11330
11349
|
audience: "https://dev-app.eyepop.ai",
|
|
11331
|
-
scope: "admin:clouds"
|
|
11350
|
+
scope: "admin:clouds access:inference-api access:datasets"
|
|
11332
11351
|
}
|
|
11333
11352
|
};
|
|
11334
11353
|
} else {
|
|
@@ -11337,7 +11356,7 @@ var EyePop;
|
|
|
11337
11356
|
domain: "eyepop.us.auth0.com",
|
|
11338
11357
|
clientId: "Lb9ubA9Hf3jlaqWLUx8XgA0zvotgViCl",
|
|
11339
11358
|
audience: "https://api.eyepop.ai",
|
|
11340
|
-
scope: "admin:clouds"
|
|
11359
|
+
scope: "admin:clouds access:inference-api access:datasets"
|
|
11341
11360
|
}
|
|
11342
11361
|
};
|
|
11343
11362
|
}
|