@eyepop.ai/eyepop 1.0.2 → 1.0.4
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.mjs
CHANGED
|
@@ -9558,7 +9558,7 @@ if ("document" in globalThis && "implementation" in globalThis.document) {
|
|
|
9558
9558
|
} else {
|
|
9559
9559
|
resolvePath = async (source) => {
|
|
9560
9560
|
const mime = require_mime_types();
|
|
9561
|
-
const filehandle = __require("fs/promises");
|
|
9561
|
+
const filehandle = __require("node:fs/promises");
|
|
9562
9562
|
const fd = await filehandle.open(source.path, "r");
|
|
9563
9563
|
const stream = fd.createReadStream();
|
|
9564
9564
|
const mimeType = mime.lookup(source.path) || "application/octet-stream";
|
|
@@ -11010,12 +11010,13 @@ var DataEndpoint = class extends Endpoint {
|
|
|
11010
11010
|
body: JSON.stringify(prediction)
|
|
11011
11011
|
});
|
|
11012
11012
|
}
|
|
11013
|
-
async updateAutoAnnotationStatus(asset_uuid, auto_annotate, user_review) {
|
|
11013
|
+
async updateAutoAnnotationStatus(asset_uuid, auto_annotate, user_review, approved_threshold) {
|
|
11014
11014
|
const validStatuses = ["approved", "rejected", "unknown"];
|
|
11015
11015
|
if (!validStatuses.includes(user_review)) {
|
|
11016
11016
|
throw new Error("Invalid status");
|
|
11017
11017
|
}
|
|
11018
|
-
|
|
11018
|
+
const thresholdQuery = approved_threshold ? `?approved_threshold=${approved_threshold}` : "";
|
|
11019
|
+
return this.request(`/assets/${asset_uuid}/auto_annotations/${auto_annotate}/user_review/${user_review}${thresholdQuery}`, {
|
|
11019
11020
|
method: "PATCH"
|
|
11020
11021
|
});
|
|
11021
11022
|
}
|