@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.
@@ -1,42 +1,42 @@
1
- var o = (g, t, e) => new Promise((n, s) => {
2
- var p = (r) => {
1
+ var r = (h, t, e) => new Promise((n, s) => {
2
+ var p = (o) => {
3
3
  try {
4
- h(e.next(r));
5
- } catch (u) {
6
- s(u);
4
+ u(e.next(o));
5
+ } catch (g) {
6
+ s(g);
7
7
  }
8
- }, i = (r) => {
8
+ }, i = (o) => {
9
9
  try {
10
- h(e.throw(r));
11
- } catch (u) {
12
- s(u);
10
+ u(e.throw(o));
11
+ } catch (g) {
12
+ s(g);
13
13
  }
14
- }, h = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(p, i);
15
- h((e = e.apply(g, t)).next());
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 T from "axios";
18
- import { BaseApi as c } from "../base/index.mjs";
19
- class m extends c {
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 : T.create(), e);
21
+ super(t != null ? t : c.create(), e);
22
22
  }
23
23
  getLoginUrl() {
24
- return o(this, null, function* () {
24
+ return r(this, null, function* () {
25
25
  return this.get("/openAddress");
26
26
  });
27
27
  }
28
28
  getToken(t, e) {
29
- return o(this, null, function* () {
29
+ return r(this, null, function* () {
30
30
  return this.get(t, e);
31
31
  });
32
32
  }
33
33
  getAIoTTokenByGTeamToken(t) {
34
- return o(this, null, function* () {
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 o(this, null, function* () {
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
- m as AuthApi
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 g from "axios";
18
- import { BaseApi as h } from "../base/index.mjs";
19
- import { m as d } from "../node_modules/@glodon-aiot/minio/dist/minio-zj.mjs";
20
- class m extends h {
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 : g.create(), t);
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
- d.initMinio({
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
- d.putObjectBuffer(e.bucket, e.fileKeys[0], p, o, (a) => {
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 w, IDatasetLevel as z, PreLabelTaskStatus as E, SubsectionStatus as G } from "./model.mjs";
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 F extends k {
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
- F as CVForceDatahubApi,
430
- w as GenerateStatus,
431
- z as IDatasetLevel,
432
- E as PreLabelTaskStatus,
433
- G as SubsectionStatus,
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
  };