@glodon-aiot/apis 3.2.2-beta.3 → 3.2.2-beta.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/es/aecpilot/index.mjs +114 -102
- package/dist/es/aecpilotui/index.mjs +29 -29
- package/dist/es/agentcliui/index.mjs +29 -29
- package/dist/es/auth/index.mjs +25 -20
- package/dist/es/cvforce/index.mjs +7 -7
- package/dist/es/cvforce-datahub/index.mjs +7 -11
- package/dist/lib/index.js +3 -120
- package/dist/src/aecpilot/model.d.ts +6 -1
- package/dist/src/auth/index.d.ts +1 -0
- package/dist/src/base/index.d.ts +1 -1
- package/dist/src/cvforce/model.d.ts +1 -0
- package/dist/src/cvforce-datahub/index.d.ts +9 -9
- package/dist/src/index.d.ts +2 -1
- package/dist/src/pluginmgr/index.d.ts +1 -1
- package/package.json +8 -4
- package/dist/es/_virtual/_commonjsHelpers.mjs +0 -4
- package/dist/es/_virtual/minio-zj.mjs +0 -4
- package/dist/es/node_modules/@glodon-aiot/minio/dist/minio-zj.mjs +0 -26485
- package/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +0 -6
- package/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +0 -10
- package/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +0 -9
- package/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +0 -19
package/dist/es/auth/index.mjs
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
var
|
|
2
|
-
var p = (
|
|
1
|
+
var r = (h, t, e) => new Promise((n, s) => {
|
|
2
|
+
var p = (o) => {
|
|
3
3
|
try {
|
|
4
|
-
|
|
5
|
-
} catch (
|
|
6
|
-
s(
|
|
4
|
+
u(e.next(o));
|
|
5
|
+
} catch (g) {
|
|
6
|
+
s(g);
|
|
7
7
|
}
|
|
8
|
-
}, i = (
|
|
8
|
+
}, i = (o) => {
|
|
9
9
|
try {
|
|
10
|
-
|
|
11
|
-
} catch (
|
|
12
|
-
s(
|
|
10
|
+
u(e.throw(o));
|
|
11
|
+
} catch (g) {
|
|
12
|
+
s(g);
|
|
13
13
|
}
|
|
14
|
-
},
|
|
15
|
-
|
|
14
|
+
}, u = (o) => o.done ? n(o.value) : Promise.resolve(o.value).then(p, i);
|
|
15
|
+
u((e = e.apply(h, t)).next());
|
|
16
16
|
});
|
|
17
|
-
import
|
|
18
|
-
import { BaseApi as
|
|
19
|
-
class
|
|
17
|
+
import c from "axios";
|
|
18
|
+
import { BaseApi as l } from "../base/index.mjs";
|
|
19
|
+
class y extends l {
|
|
20
20
|
constructor(t, e) {
|
|
21
|
-
super(t != null ? t :
|
|
21
|
+
super(t != null ? t : c.create(), e);
|
|
22
22
|
}
|
|
23
23
|
getLoginUrl() {
|
|
24
|
-
return
|
|
24
|
+
return r(this, null, function* () {
|
|
25
25
|
return this.get("/openAddress");
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
getToken(t, e) {
|
|
29
|
-
return
|
|
29
|
+
return r(this, null, function* () {
|
|
30
30
|
return this.get(t, e);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
getAIoTTokenByGTeamToken(t) {
|
|
34
|
-
return
|
|
34
|
+
return r(this, null, function* () {
|
|
35
35
|
return this.post("/validate/glodonCloud", t).then((e) => e.accessToken);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
postRefreshToken(t, e, n, s = "3600", p) {
|
|
39
|
-
return
|
|
39
|
+
return r(this, null, function* () {
|
|
40
40
|
return this.post("/refresh-token", {
|
|
41
41
|
oldToken: t,
|
|
42
42
|
tenant: e,
|
|
@@ -46,7 +46,12 @@ class m extends c {
|
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
+
logout() {
|
|
50
|
+
return r(this, null, function* () {
|
|
51
|
+
return this.post("/logout", {});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
49
54
|
}
|
|
50
55
|
export {
|
|
51
|
-
|
|
56
|
+
y as AuthApi
|
|
52
57
|
};
|
|
@@ -14,12 +14,12 @@ var s = (l, e, t) => new Promise((n, i) => {
|
|
|
14
14
|
}, p = (o) => o.done ? n(o.value) : Promise.resolve(o.value).then(r, c);
|
|
15
15
|
p((t = t.apply(l, e)).next());
|
|
16
16
|
});
|
|
17
|
-
import
|
|
18
|
-
import { BaseApi as
|
|
19
|
-
import {
|
|
20
|
-
class m extends
|
|
17
|
+
import d from "axios";
|
|
18
|
+
import { BaseApi as g } from "../base/index.mjs";
|
|
19
|
+
import { initMinio as h, putObjectBuffer as u } from "@glodon-aiot/minio";
|
|
20
|
+
class m extends g {
|
|
21
21
|
constructor(e, t) {
|
|
22
|
-
super(e != null ? e :
|
|
22
|
+
super(e != null ? e : d.create(), t);
|
|
23
23
|
}
|
|
24
24
|
getKnowledge(e, t) {
|
|
25
25
|
return s(this, null, function* () {
|
|
@@ -206,7 +206,7 @@ class m extends h {
|
|
|
206
206
|
return new Promise((n, i) => {
|
|
207
207
|
const r = new FileReader();
|
|
208
208
|
r.readAsArrayBuffer(t), r.onload = (c) => {
|
|
209
|
-
|
|
209
|
+
h({
|
|
210
210
|
endPoint: e.endpoints[0],
|
|
211
211
|
useSSL: e.useSSL,
|
|
212
212
|
accessKey: e.accessKey,
|
|
@@ -215,7 +215,7 @@ class m extends h {
|
|
|
215
215
|
const p = Buffer.from(c.target.result), o = {
|
|
216
216
|
"Content-Type": "application/octet-stream"
|
|
217
217
|
};
|
|
218
|
-
|
|
218
|
+
u(e.bucket, e.fileKeys[0], p, o, (a) => {
|
|
219
219
|
if (a)
|
|
220
220
|
throw console.error(a), Error(a);
|
|
221
221
|
n(e.fileKeys[0]);
|
|
@@ -28,14 +28,10 @@ var a = (n, s, t) => new Promise((e, r) => {
|
|
|
28
28
|
});
|
|
29
29
|
import L from "axios";
|
|
30
30
|
import { UploadZipsStatus as u } from "./model.mjs";
|
|
31
|
-
import { GenerateStatus as
|
|
31
|
+
import { GenerateStatus as A, IDatasetLevel as F, PreLabelTaskStatus as N, SubsectionStatus as Z } from "./model.mjs";
|
|
32
32
|
import { BaseApi as k } from "../base/index.mjs";
|
|
33
|
-
import "../node_modules/@glodon-aiot/minio/dist/minio-zj.mjs";
|
|
34
|
-
import "dayjs";
|
|
35
|
-
import "../agentcliui/index.mjs";
|
|
36
|
-
import "../aecpilotui/index.mjs";
|
|
37
33
|
import { getUuid as T } from "../utils/index.mjs";
|
|
38
|
-
class
|
|
34
|
+
class x extends k {
|
|
39
35
|
constructor(s, t) {
|
|
40
36
|
super(s != null ? s : L.create(), t);
|
|
41
37
|
}
|
|
@@ -426,10 +422,10 @@ class F extends k {
|
|
|
426
422
|
}
|
|
427
423
|
}
|
|
428
424
|
export {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
425
|
+
x as CVForceDatahubApi,
|
|
426
|
+
A as GenerateStatus,
|
|
427
|
+
F as IDatasetLevel,
|
|
428
|
+
N as PreLabelTaskStatus,
|
|
429
|
+
Z as SubsectionStatus,
|
|
434
430
|
u as UploadZipsStatus
|
|
435
431
|
};
|