@thatopen/services 0.0.6 → 0.2.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.
Files changed (68) hide show
  1. package/README.md +59 -46
  2. package/dist/built-in/index.d.ts +723 -0
  3. package/dist/cli/lib/npmrc.d.ts +28 -0
  4. package/dist/cli/lib/npmrc.test.d.ts +1 -0
  5. package/dist/cli.js +103 -7
  6. package/dist/core/client.d.ts +20 -1
  7. package/dist/index.cjs.js +2 -2
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.es.js +130 -102
  10. package/dist/types/files.d.ts +6 -0
  11. package/dist/types/npm.d.ts +14 -0
  12. package/dist/vite-env.d.ts +1 -1
  13. package/docs/builtin/paths.json +22 -6
  14. package/package.json +99 -99
  15. package/resources/AGENTS.md +5 -3
  16. package/src/built-in/AppManager/example.ts +86 -86
  17. package/src/built-in/CDEManager/example.ts +214 -214
  18. package/src/built-in/CDEManager/examples/FileEditing/example.ts +226 -226
  19. package/src/built-in/CDEManager/examples/FileMoves/example.ts +186 -186
  20. package/src/built-in/CDEManager/examples/FileOperations/example.ts +295 -295
  21. package/src/built-in/CDEManager/examples/FileTransfers/example.ts +210 -210
  22. package/src/built-in/CDEManager/examples/FolderManagement/example.ts +230 -230
  23. package/src/built-in/CDEManager/examples/MetadataSchema/example.ts +230 -230
  24. package/src/built-in/CDEManager/examples/MetadataViews/example.ts +166 -166
  25. package/src/built-in/CDEManager/examples/ProjectConfig/example.ts +177 -177
  26. package/src/built-in/FileList/example.ts +107 -107
  27. package/src/built-in/TabbedNavigation/example.ts +115 -115
  28. package/src/built-in/UIManager/src/app/example.ts +99 -0
  29. package/src/built-in/UIManager/src/app/examples/AppState/example.ts +142 -0
  30. package/src/built-in/UIManager/src/app/examples/Contexts/example.ts +125 -0
  31. package/src/built-in/UIManager/src/app/examples/FloatingLayout/example.ts +92 -0
  32. package/src/built-in/UIManager/src/app/examples/Notifications/example.ts +161 -0
  33. package/src/built-in/UIManager/src/app/examples/Sidebar/example.ts +104 -0
  34. package/src/built-in/ViewportsManager/example.ts +106 -106
  35. package/src/built-in/index.ts +755 -755
  36. package/src/cli/templates/app/README.md +241 -241
  37. package/src/cli/templates/app/index.html +27 -27
  38. package/src/cli/templates/app/package.json +27 -25
  39. package/src/cli/templates/app/src/bim-components/CloudRunner/index.ts +87 -91
  40. package/src/cli/templates/app/src/bim-components/CloudRunner/src/index.ts +1 -1
  41. package/src/cli/templates/app/src/bim-components/CloudRunner/src/types.ts +5 -5
  42. package/src/cli/templates/app/src/bim-components/index.ts +1 -1
  43. package/src/cli/templates/app/src/main.ts +56 -89
  44. package/src/cli/templates/app/src/setups/cloud-runner.ts +9 -13
  45. package/src/cli/templates/app/src/setups/fragments.ts +18 -0
  46. package/src/cli/templates/app/src/setups/ifc-loader.ts +12 -0
  47. package/src/cli/templates/app/src/setups/index.ts +3 -3
  48. package/src/cli/templates/app/src/ui-components/AppPanel/index.ts +160 -0
  49. package/src/cli/templates/app/src/ui-components/index.ts +1 -2
  50. package/src/cli/templates/app/tsconfig.json +17 -16
  51. package/src/cli/templates/cloud-component/README.md +205 -205
  52. package/src/cli/templates/cloud-component/_thatopen +5 -5
  53. package/src/cli/templates/cloud-component/declarations.json +4 -4
  54. package/src/cli/templates/cloud-component/package.json +21 -21
  55. package/src/cli/templates/cloud-component/src/main.ts +70 -70
  56. package/src/cli/templates/cloud-component/tsconfig.json +16 -16
  57. package/src/cli/templates/shared/CLAUDE.md +1 -1
  58. package/src/cli/templates/shared/_gitignore +5 -4
  59. package/src/cli/templates/app/src/app.ts +0 -16
  60. package/src/cli/templates/app/src/globals.ts +0 -1
  61. package/src/cli/templates/app/src/setups/ui-manager.ts +0 -27
  62. package/src/cli/templates/app/src/setups/viewports-manager.ts +0 -22
  63. package/src/cli/templates/app/src/ui-components/app-info-section/index.ts +0 -26
  64. package/src/cli/templates/app/src/ui-components/app-info-section/src/index.ts +0 -1
  65. package/src/cli/templates/app/src/ui-components/app-info-section/src/types.ts +0 -15
  66. package/src/cli/templates/app/src/ui-components/cloud-runner-section/index.ts +0 -37
  67. package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/index.ts +0 -1
  68. package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/types.ts +0 -14
package/dist/index.es.js CHANGED
@@ -3,8 +3,8 @@ var ge = (n) => {
3
3
  throw TypeError(n);
4
4
  };
5
5
  var Ve = (n, e, t) => e in n ? Fe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
- var _ = (n, e, t) => Ve(n, typeof e != "symbol" ? e + "" : e, t), j = (n, e, t) => e.has(n) || ge("Cannot " + t);
7
- var G = (n, e, t) => (j(n, e, "read from private field"), t ? t.call(n) : e.get(n)), K = (n, e, t) => e.has(n) ? ge("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), we = (n, e, t, s) => (j(n, e, "write to private field"), s ? s.call(n, t) : e.set(n, t), t), c = (n, e, t) => (j(n, e, "access private method"), t);
6
+ var _ = (n, e, t) => Ve(n, typeof e != "symbol" ? e + "" : e, t), J = (n, e, t) => e.has(n) || ge("Cannot " + t);
7
+ var j = (n, e, t) => (J(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Y = (n, e, t) => e.has(n) ? ge("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), we = (n, e, t, s) => (J(n, e, "write to private field"), s ? s.call(n, t) : e.set(n, t), t), c = (n, e, t) => (J(n, e, "access private method"), t);
8
8
  const k = /* @__PURE__ */ Object.create(null);
9
9
  k.open = "0";
10
10
  k.close = "1";
@@ -27,27 +27,27 @@ const ee = { type: "error", data: "parser error" }, Ae = typeof Blob == "functio
27
27
  function be(n) {
28
28
  return n instanceof Uint8Array ? n : n instanceof ArrayBuffer ? new Uint8Array(n) : new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
29
29
  }
30
- let Y;
30
+ let K;
31
31
  function Me(n, e) {
32
32
  if (Ae && n.data instanceof Blob)
33
33
  return n.data.arrayBuffer().then(be).then(e);
34
34
  if (Oe && (n.data instanceof ArrayBuffer || Se(n.data)))
35
35
  return e(be(n.data));
36
36
  ue(n, !1, (t) => {
37
- Y || (Y = new TextEncoder()), e(Y.encode(t));
37
+ K || (K = new TextEncoder()), e(K.encode(t));
38
38
  });
39
39
  }
40
40
  const Ee = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", N = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
41
41
  for (let n = 0; n < Ee.length; n++)
42
42
  N[Ee.charCodeAt(n)] = n;
43
43
  const He = (n) => {
44
- let e = n.length * 0.75, t = n.length, s, r = 0, i, o, h, u;
44
+ let e = n.length * 0.75, t = n.length, s, r = 0, i, o, h, l;
45
45
  n[n.length - 1] === "=" && (e--, n[n.length - 2] === "=" && e--);
46
46
  const y = new ArrayBuffer(e), d = new Uint8Array(y);
47
47
  for (s = 0; s < t; s += 4)
48
- i = N[n.charCodeAt(s)], o = N[n.charCodeAt(s + 1)], h = N[n.charCodeAt(s + 2)], u = N[n.charCodeAt(s + 3)], d[r++] = i << 2 | o >> 4, d[r++] = (o & 15) << 4 | h >> 2, d[r++] = (h & 3) << 6 | u & 63;
48
+ i = N[n.charCodeAt(s)], o = N[n.charCodeAt(s + 1)], h = N[n.charCodeAt(s + 2)], l = N[n.charCodeAt(s + 3)], d[r++] = i << 2 | o >> 4, d[r++] = (o & 15) << 4 | h >> 2, d[r++] = (h & 3) << 6 | l & 63;
49
49
  return y;
50
- }, Je = typeof ArrayBuffer == "function", le = (n, e) => {
50
+ }, Ge = typeof ArrayBuffer == "function", le = (n, e) => {
51
51
  if (typeof n != "string")
52
52
  return {
53
53
  type: "message",
@@ -56,15 +56,15 @@ const He = (n) => {
56
56
  const t = n.charAt(0);
57
57
  return t === "b" ? {
58
58
  type: "message",
59
- data: je(n.substring(1), e)
59
+ data: Je(n.substring(1), e)
60
60
  } : q[t] ? n.length > 1 ? {
61
61
  type: q[t],
62
62
  data: n.substring(1)
63
63
  } : {
64
64
  type: q[t]
65
65
  } : ee;
66
- }, je = (n, e) => {
67
- if (Je) {
66
+ }, Je = (n, e) => {
67
+ if (Ge) {
68
68
  const t = He(n);
69
69
  return Ce(t, e);
70
70
  } else
@@ -77,7 +77,7 @@ const He = (n) => {
77
77
  default:
78
78
  return n instanceof ArrayBuffer ? n : n.buffer;
79
79
  }
80
- }, Re = "", Ge = (n, e) => {
80
+ }, Re = "", je = (n, e) => {
81
81
  const t = n.length, s = new Array(t);
82
82
  let r = 0;
83
83
  n.forEach((i, o) => {
@@ -85,7 +85,7 @@ const He = (n) => {
85
85
  s[o] = h, ++r === t && e(s.join(Re));
86
86
  });
87
87
  });
88
- }, Ke = (n, e) => {
88
+ }, Ye = (n, e) => {
89
89
  const t = n.split(Re), s = [];
90
90
  for (let r = 0; r < t.length; r++) {
91
91
  const i = le(t[r], e);
@@ -94,7 +94,7 @@ const He = (n) => {
94
94
  }
95
95
  return s;
96
96
  };
97
- function Ye() {
97
+ function Ke() {
98
98
  return new TransformStream({
99
99
  transform(n, e) {
100
100
  Me(n, (t) => {
@@ -139,17 +139,17 @@ function We(n, e) {
139
139
  if (s === 0) {
140
140
  if (P(t) < 1)
141
141
  break;
142
- const u = L(t, 1);
143
- i = (u[0] & 128) === 128, r = u[0] & 127, r < 126 ? s = 3 : r === 126 ? s = 1 : s = 2;
142
+ const l = L(t, 1);
143
+ i = (l[0] & 128) === 128, r = l[0] & 127, r < 126 ? s = 3 : r === 126 ? s = 1 : s = 2;
144
144
  } else if (s === 1) {
145
145
  if (P(t) < 2)
146
146
  break;
147
- const u = L(t, 2);
148
- r = new DataView(u.buffer, u.byteOffset, u.length).getUint16(0), s = 3;
147
+ const l = L(t, 2);
148
+ r = new DataView(l.buffer, l.byteOffset, l.length).getUint16(0), s = 3;
149
149
  } else if (s === 2) {
150
150
  if (P(t) < 8)
151
151
  break;
152
- const u = L(t, 8), y = new DataView(u.buffer, u.byteOffset, u.length), d = y.getUint32(0);
152
+ const l = L(t, 8), y = new DataView(l.buffer, l.byteOffset, l.length), d = y.getUint32(0);
153
153
  if (d > Math.pow(2, 21) - 1) {
154
154
  h.enqueue(ee);
155
155
  break;
@@ -158,8 +158,8 @@ function We(n, e) {
158
158
  } else {
159
159
  if (P(t) < r)
160
160
  break;
161
- const u = L(t, r);
162
- h.enqueue(le(i ? u : W.decode(u), e)), s = 0;
161
+ const l = L(t, r);
162
+ h.enqueue(le(i ? l : W.decode(l), e)), s = 0;
163
163
  }
164
164
  if (r === 0 || r > n) {
165
165
  h.enqueue(ee);
@@ -224,7 +224,7 @@ function Be(n, ...e) {
224
224
  return e.reduce((t, s) => (n.hasOwnProperty(s) && (t[s] = n[s]), t), {});
225
225
  }
226
226
  const Qe = b.setTimeout, Ze = b.clearTimeout;
227
- function J(n, e) {
227
+ function G(n, e) {
228
228
  e.useNativeTimers ? (n.setTimeoutFn = Qe.bind(b), n.clearTimeoutFn = Ze.bind(b)) : (n.setTimeoutFn = b.setTimeout.bind(b), n.clearTimeoutFn = b.clearTimeout.bind(b));
229
229
  }
230
230
  const et = 1.33;
@@ -267,7 +267,7 @@ class fe extends g {
267
267
  * @protected
268
268
  */
269
269
  constructor(e) {
270
- super(), this.writable = !1, J(this, e), this.opts = e, this.query = e.query, this.socket = e.socket, this.supportsBinary = !e.forceBase64;
270
+ super(), this.writable = !1, G(this, e), this.opts = e, this.query = e.query, this.socket = e.socket, this.supportsBinary = !e.forceBase64;
271
271
  }
272
272
  /**
273
273
  * Emits an error.
@@ -413,7 +413,7 @@ class ot extends fe {
413
413
  return this.onClose({ description: "transport closed by the server" }), !1;
414
414
  this.onPacket(s);
415
415
  };
416
- Ke(e, this.socket.binaryType).forEach(t), this.readyState !== "closed" && (this._polling = !1, this.emitReserved("pollComplete"), this.readyState === "open" && this._poll());
416
+ Ye(e, this.socket.binaryType).forEach(t), this.readyState !== "closed" && (this._polling = !1, this.emitReserved("pollComplete"), this.readyState === "open" && this._poll());
417
417
  }
418
418
  /**
419
419
  * For polling, send a close packet.
@@ -433,7 +433,7 @@ class ot extends fe {
433
433
  * @protected
434
434
  */
435
435
  write(e) {
436
- this.writable = !1, Ge(e, (t) => {
436
+ this.writable = !1, je(e, (t) => {
437
437
  this.doWrite(t, () => {
438
438
  this.writable = !0, this.emitReserved("drain");
439
439
  });
@@ -507,7 +507,7 @@ class v extends g {
507
507
  * @package
508
508
  */
509
509
  constructor(e, t, s) {
510
- super(), this.createRequest = e, J(this, s), this._opts = s, this._method = s.method || "GET", this._uri = t, this._data = s.data !== void 0 ? s.data : null, this._create();
510
+ super(), this.createRequest = e, G(this, s), this._opts = s, this._method = s.method || "GET", this._uri = t, this._data = s.data !== void 0 ? s.data : null, this._create();
511
511
  }
512
512
  /**
513
513
  * Creates the XHR object and sends the request.
@@ -721,11 +721,11 @@ class dt extends fe {
721
721
  this.onError("webtransport error", e);
722
722
  }), this._transport.ready.then(() => {
723
723
  this._transport.createBidirectionalStream().then((e) => {
724
- const t = We(Number.MAX_SAFE_INTEGER, this.socket.binaryType), s = e.readable.pipeThrough(t).getReader(), r = Ye();
724
+ const t = We(Number.MAX_SAFE_INTEGER, this.socket.binaryType), s = e.readable.pipeThrough(t).getReader(), r = Ke();
725
725
  r.readable.pipeTo(e.writable), this._writer = r.writable.getWriter();
726
726
  const i = () => {
727
- s.read().then(({ done: h, value: u }) => {
728
- h || (this.onPacket(u), i());
727
+ s.read().then(({ done: h, value: l }) => {
728
+ h || (this.onPacket(l), i());
729
729
  }).catch((h) => {
730
730
  });
731
731
  };
@@ -807,7 +807,7 @@ class C extends g {
807
807
  const s = te(e);
808
808
  t.hostname = s.host, t.secure = s.protocol === "https" || s.protocol === "wss", t.port = s.port, s.query && (t.query = s.query);
809
809
  } else t.host && (t.hostname = te(t.host).host);
810
- J(this, t), this.secure = t.secure != null ? t.secure : typeof location < "u" && location.protocol === "https:", t.hostname && !t.port && (t.port = this.secure ? "443" : "80"), this.hostname = t.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = t.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = [], this._transportsByName = {}, t.transports.forEach((s) => {
810
+ G(this, t), this.secure = t.secure != null ? t.secure : typeof location < "u" && location.protocol === "https:", t.hostname && !t.port && (t.port = this.secure ? "443" : "80"), this.hostname = t.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = t.port || (typeof location < "u" && location.port ? location.port : this.secure ? "443" : "80"), this.transports = [], this._transportsByName = {}, t.transports.forEach((s) => {
811
811
  const r = s.prototype.name;
812
812
  this.transports.push(r), this._transportsByName[r] = s;
813
813
  }), this.opts = Object.assign({
@@ -1109,16 +1109,16 @@ class bt extends C {
1109
1109
  function h() {
1110
1110
  o("transport closed");
1111
1111
  }
1112
- function u() {
1112
+ function l() {
1113
1113
  o("socket closed");
1114
1114
  }
1115
1115
  function y(m) {
1116
1116
  t && m.name !== t.name && i();
1117
1117
  }
1118
1118
  const d = () => {
1119
- t.removeListener("open", r), t.removeListener("error", o), t.removeListener("close", h), this.off("close", u), this.off("upgrading", y);
1119
+ t.removeListener("open", r), t.removeListener("error", o), t.removeListener("close", h), this.off("close", l), this.off("upgrading", y);
1120
1120
  };
1121
- t.once("open", r), t.once("error", o), t.once("close", h), this.once("close", u), this.once("upgrading", y), this._upgrades.indexOf("webtransport") !== -1 && e !== "webtransport" ? this.setTimeoutFn(() => {
1121
+ t.once("open", r), t.once("error", o), t.once("close", h), this.once("close", l), this.once("upgrading", y), this._upgrades.indexOf("webtransport") !== -1 && e !== "webtransport" ? this.setTimeoutFn(() => {
1122
1122
  s || t.open();
1123
1123
  }, 200) : t.open();
1124
1124
  }
@@ -1562,8 +1562,8 @@ class qe extends g {
1562
1562
  const d = this.ids++, m = t.pop();
1563
1563
  this._registerAckCallback(d, m), o.id = d;
1564
1564
  }
1565
- const h = (r = (s = this.io.engine) === null || s === void 0 ? void 0 : s.transport) === null || r === void 0 ? void 0 : r.writable, u = this.connected && !(!((i = this.io.engine) === null || i === void 0) && i._hasPingExpired());
1566
- return this.flags.volatile && !h || (u ? (this.notifyOutgoingListeners(o), this.packet(o)) : this.sendBuffer.push(o)), this.flags = {}, this;
1565
+ const h = (r = (s = this.io.engine) === null || s === void 0 ? void 0 : s.transport) === null || r === void 0 ? void 0 : r.writable, l = this.connected && !(!((i = this.io.engine) === null || i === void 0) && i._hasPingExpired());
1566
+ return this.flags.volatile && !h || (l ? (this.notifyOutgoingListeners(o), this.packet(o)) : this.sendBuffer.push(o)), this.flags = {}, this;
1567
1567
  }
1568
1568
  /**
1569
1569
  * @private
@@ -2052,7 +2052,7 @@ B.prototype.setJitter = function(n) {
2052
2052
  class ie extends g {
2053
2053
  constructor(e, t) {
2054
2054
  var s;
2055
- super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (t = e, e = void 0), t = t || {}, t.path = t.path || "/socket.io", this.opts = t, J(this, t), this.reconnection(t.reconnection !== !1), this.reconnectionAttempts(t.reconnectionAttempts || 1 / 0), this.reconnectionDelay(t.reconnectionDelay || 1e3), this.reconnectionDelayMax(t.reconnectionDelayMax || 5e3), this.randomizationFactor((s = t.randomizationFactor) !== null && s !== void 0 ? s : 0.5), this.backoff = new B({
2055
+ super(), this.nsps = {}, this.subs = [], e && typeof e == "object" && (t = e, e = void 0), t = t || {}, t.path = t.path || "/socket.io", this.opts = t, G(this, t), this.reconnection(t.reconnection !== !1), this.reconnectionAttempts(t.reconnectionAttempts || 1 / 0), this.reconnectionDelay(t.reconnectionDelay || 1e3), this.reconnectionDelayMax(t.reconnectionDelayMax || 5e3), this.randomizationFactor((s = t.randomizationFactor) !== null && s !== void 0 ? s : 0.5), this.backoff = new B({
2056
2056
  min: this.reconnectionDelay(),
2057
2057
  max: this.reconnectionDelayMax(),
2058
2058
  jitter: this.randomizationFactor()
@@ -2109,11 +2109,11 @@ class ie extends g {
2109
2109
  this.cleanup(), this._readyState = "closed", this.emitReserved("error", h), e ? e(h) : this.maybeReconnectOnOpen();
2110
2110
  }, o = E(t, "error", i);
2111
2111
  if (this._timeout !== !1) {
2112
- const h = this._timeout, u = this.setTimeoutFn(() => {
2112
+ const h = this._timeout, l = this.setTimeoutFn(() => {
2113
2113
  r(), i(new Error("timeout")), t.close();
2114
2114
  }, h);
2115
- this.opts.autoUnref && u.unref(), this.subs.push(() => {
2116
- this.clearTimeoutFn(u);
2115
+ this.opts.autoUnref && l.unref(), this.subs.push(() => {
2116
+ this.clearTimeoutFn(l);
2117
2117
  });
2118
2118
  }
2119
2119
  return this.subs.push(r), this.subs.push(o), this;
@@ -2291,8 +2291,8 @@ const x = {};
2291
2291
  function F(n, e) {
2292
2292
  typeof n == "object" && (e = n, n = void 0), e = e || {};
2293
2293
  const t = Tt(n, e.path || "/socket.io"), s = t.source, r = t.id, i = t.path, o = x[r] && i in x[r].nsps, h = e.forceNew || e["force new connection"] || e.multiplex === !1 || o;
2294
- let u;
2295
- return h ? u = new ie(s, e) : (x[r] || (x[r] = new ie(s, e)), u = x[r]), t.query && !e.query && (e.query = t.queryKey), u.socket(t.path, e);
2294
+ let l;
2295
+ return h ? l = new ie(s, e) : (x[r] || (x[r] = new ie(s, e)), l = x[r]), t.query && !e.query && (e.query = t.queryKey), l.socket(t.path, e);
2296
2296
  }
2297
2297
  Object.assign(F, {
2298
2298
  Manager: ie,
@@ -2326,8 +2326,8 @@ class Lt extends Error {
2326
2326
  this.name = "RequestError", this.status = t, this.code = i.code, this.details = i.details, this.body = r;
2327
2327
  }
2328
2328
  }
2329
- const T = "item/folder", p = "item", O = "processor", R = "hidden", X = "FILE", Q = "TOOL", Z = "APP";
2330
- var a, ae, l, S, V, M, ce, he, Ue;
2329
+ const T = "item/folder", p = "item", O = "processor", It = "npm-registry", R = "hidden", X = "FILE", Q = "TOOL", Z = "APP";
2330
+ var a, ae, u, S, V, M, ce, he, Ue;
2331
2331
  const ye = class ye {
2332
2332
  /**
2333
2333
  * Creates a new EngineServicesClient instance.
@@ -2337,7 +2337,7 @@ const ye = class ye {
2337
2337
  * @param props - Optional configuration (retry count, auth mode, etc.).
2338
2338
  */
2339
2339
  constructor(e, t, s) {
2340
- K(this, a);
2340
+ Y(this, a);
2341
2341
  _(this, "apiUrl");
2342
2342
  _(this, "accessToken");
2343
2343
  _(this, "wsUrl");
@@ -2359,8 +2359,8 @@ const ye = class ye {
2359
2359
  const { retries: r = 0, useBearer: i = !1, localServerUrl: o } = s || {};
2360
2360
  let h = t;
2361
2361
  if (h.charAt(h.length - 1) === "/" && (h = h.slice(0, -1)), this.apiUrl = `${h}/api`, this.accessToken = e, this.wsUrl = `${h}?accessToken=${e}`, this.retries = r, this.useBearer = i, this.context = { appId: "", projectId: "", accessToken: e, apiUrl: t }, o) {
2362
- let u = o;
2363
- u.charAt(u.length - 1) === "/" && (u = u.slice(0, -1)), this.localServerUrl = u;
2362
+ let l = o;
2363
+ l.charAt(l.length - 1) === "/" && (l = l.slice(0, -1)), this.localServerUrl = l;
2364
2364
  }
2365
2365
  }
2366
2366
  /**
@@ -2442,7 +2442,7 @@ const ye = class ye {
2442
2442
  * cleaning logic is applied identically.
2443
2443
  */
2444
2444
  async request(e, t, s) {
2445
- return c(this, a, l).call(this, e, t, s);
2445
+ return c(this, a, u).call(this, e, t, s);
2446
2446
  }
2447
2447
  // ─── Files ───────────────────────────────────────────────────────
2448
2448
  /**
@@ -2452,7 +2452,7 @@ const ye = class ye {
2452
2452
  */
2453
2453
  async listFiles(e) {
2454
2454
  const { folderId: t, archived: s, projectId: r } = e || {};
2455
- return t ? await c(this, a, l).call(this, "GET", `${T}/${t}/items`, { query: { itemType: X, archived: s } }) : await c(this, a, l).call(this, "GET", `${p}`, {
2455
+ return t ? await c(this, a, u).call(this, "GET", `${T}/${t}/items`, { query: { itemType: X, archived: s } }) : await c(this, a, u).call(this, "GET", `${p}`, {
2456
2456
  query: {
2457
2457
  itemType: X,
2458
2458
  archived: s,
@@ -2492,14 +2492,14 @@ const ye = class ye {
2492
2492
  * @param fileId - The file's unique identifier.
2493
2493
  */
2494
2494
  async archiveFile(e) {
2495
- return await c(this, a, l).call(this, "DELETE", `${p}/${e}`);
2495
+ return await c(this, a, u).call(this, "DELETE", `${p}/${e}`);
2496
2496
  }
2497
2497
  /**
2498
2498
  * Recovers a previously archived file.
2499
2499
  * @param fileId - The file's unique identifier.
2500
2500
  */
2501
2501
  async recoverFile(e) {
2502
- return await c(this, a, l).call(this, "PUT", `${p}/${e}/recover`);
2502
+ return await c(this, a, u).call(this, "PUT", `${p}/${e}/recover`);
2503
2503
  }
2504
2504
  /**
2505
2505
  * Downloads a file's content. Returns the raw fetch Response.
@@ -2519,7 +2519,7 @@ const ye = class ye {
2519
2519
  */
2520
2520
  async getFileVersionMetadata(e, t, s) {
2521
2521
  const { withDraft: r } = s || {};
2522
- return await c(this, a, l).call(this, "GET", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/metadata`, {
2522
+ return await c(this, a, u).call(this, "GET", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/metadata`, {
2523
2523
  query: {
2524
2524
  ...r && { withDraft: "true" }
2525
2525
  }
@@ -2532,7 +2532,7 @@ const ye = class ye {
2532
2532
  * @param metadata - Free-JSON object (max 200 fields, 50-char keys/values).
2533
2533
  */
2534
2534
  async updateFileVersionMetadata(e, t, s) {
2535
- return await c(this, a, l).call(this, "PUT", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/metadata`, {
2535
+ return await c(this, a, u).call(this, "PUT", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/metadata`, {
2536
2536
  body: JSON.stringify({ metadata: s }),
2537
2537
  contentType: "application/json"
2538
2538
  });
@@ -2543,7 +2543,7 @@ const ye = class ye {
2543
2543
  * @param versionTag - The version tag.
2544
2544
  */
2545
2545
  async deleteFileVersionMetadata(e, t) {
2546
- return await c(this, a, l).call(this, "DELETE", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/metadata`);
2546
+ return await c(this, a, u).call(this, "DELETE", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/metadata`);
2547
2547
  }
2548
2548
  // ─── Folders ─────────────────────────────────────────────────────
2549
2549
  /**
@@ -2553,7 +2553,7 @@ const ye = class ye {
2553
2553
  */
2554
2554
  async listFolders(e) {
2555
2555
  const { archived: t, parentFolderId: s, projectId: r } = e || {};
2556
- return await c(this, a, l).call(this, "GET", T, {
2556
+ return await c(this, a, u).call(this, "GET", T, {
2557
2557
  query: {
2558
2558
  parentFolderId: s,
2559
2559
  archived: t,
@@ -2566,7 +2566,7 @@ const ye = class ye {
2566
2566
  * @param folderId - The folder's unique identifier.
2567
2567
  */
2568
2568
  async getFolder(e) {
2569
- return await c(this, a, l).call(this, "GET", `${T}/${e}`);
2569
+ return await c(this, a, u).call(this, "GET", `${T}/${e}`);
2570
2570
  }
2571
2571
  /**
2572
2572
  * Creates a new folder.
@@ -2575,7 +2575,7 @@ const ye = class ye {
2575
2575
  * @returns The created folder.
2576
2576
  */
2577
2577
  async createFolder(e, t, s) {
2578
- return await c(this, a, l).call(this, "POST", T, {
2578
+ return await c(this, a, u).call(this, "POST", T, {
2579
2579
  body: JSON.stringify({
2580
2580
  name: e,
2581
2581
  ...t && { parentId: t },
@@ -2592,7 +2592,7 @@ const ye = class ye {
2592
2592
  */
2593
2593
  async updateFolder(e, t) {
2594
2594
  const { name: s } = t;
2595
- return await c(this, a, l).call(this, "PUT", `${T}/${e}`, {
2595
+ return await c(this, a, u).call(this, "PUT", `${T}/${e}`, {
2596
2596
  body: JSON.stringify({ name: s }),
2597
2597
  contentType: "application/json"
2598
2598
  });
@@ -2602,14 +2602,14 @@ const ye = class ye {
2602
2602
  * @param folderId - The folder's unique identifier.
2603
2603
  */
2604
2604
  async archiveFolder(e) {
2605
- return await c(this, a, l).call(this, "DELETE", `${T}/${e}`);
2605
+ return await c(this, a, u).call(this, "DELETE", `${T}/${e}`);
2606
2606
  }
2607
2607
  /**
2608
2608
  * Recovers a previously archived folder.
2609
2609
  * @param folderId - The folder's unique identifier.
2610
2610
  */
2611
2611
  async recoverFolder(e) {
2612
- return await c(this, a, l).call(this, "PUT", `${T}/${e}/recover`);
2612
+ return await c(this, a, u).call(this, "PUT", `${T}/${e}/recover`);
2613
2613
  }
2614
2614
  /**
2615
2615
  * Downloads an entire folder as a ZIP archive.
@@ -2627,12 +2627,12 @@ const ye = class ye {
2627
2627
  */
2628
2628
  async listComponents(e) {
2629
2629
  const { folderId: t, ShowVersions: s, projectId: r } = e || {};
2630
- return t ? await c(this, a, l).call(this, "GET", `${T}/${t}/items`, {
2630
+ return t ? await c(this, a, u).call(this, "GET", `${T}/${t}/items`, {
2631
2631
  query: {
2632
2632
  itemType: Q,
2633
2633
  ...s && { ShowVersions: s }
2634
2634
  }
2635
- }) : await c(this, a, l).call(this, "GET", `${p}`, {
2635
+ }) : await c(this, a, u).call(this, "GET", `${p}`, {
2636
2636
  query: {
2637
2637
  itemType: Q,
2638
2638
  ...s && { ShowVersions: s },
@@ -2697,14 +2697,14 @@ const ye = class ye {
2697
2697
  * @param componentId - The component's unique identifier.
2698
2698
  */
2699
2699
  async archiveComponent(e) {
2700
- return await c(this, a, l).call(this, "DELETE", `${p}/${e}`);
2700
+ return await c(this, a, u).call(this, "DELETE", `${p}/${e}`);
2701
2701
  }
2702
2702
  /**
2703
2703
  * Recovers a previously archived component.
2704
2704
  * @param componentId - The component's unique identifier.
2705
2705
  */
2706
2706
  async recoverComponent(e) {
2707
- return await c(this, a, l).call(this, "PUT", `${p}/${e}/recover`);
2707
+ return await c(this, a, u).call(this, "PUT", `${p}/${e}/recover`);
2708
2708
  }
2709
2709
  // ─── Built-in Components ─────────────────────────────────────────
2710
2710
  /**
@@ -2811,12 +2811,12 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2811
2811
  */
2812
2812
  async listApps(e) {
2813
2813
  const { folderId: t, ShowVersions: s, projectId: r } = e || {};
2814
- return t ? await c(this, a, l).call(this, "GET", `${T}/${t}/items`, {
2814
+ return t ? await c(this, a, u).call(this, "GET", `${T}/${t}/items`, {
2815
2815
  query: {
2816
2816
  itemType: Z,
2817
2817
  ...s && { ShowVersions: s }
2818
2818
  }
2819
- }) : await c(this, a, l).call(this, "GET", `${p}`, {
2819
+ }) : await c(this, a, u).call(this, "GET", `${p}`, {
2820
2820
  query: {
2821
2821
  itemType: Z,
2822
2822
  ...s && { ShowVersions: s },
@@ -2863,7 +2863,19 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2863
2863
  * @param appId - The app's unique identifier.
2864
2864
  */
2865
2865
  async archiveApp(e) {
2866
- return await c(this, a, l).call(this, "DELETE", `${p}/${e}`);
2866
+ return await c(this, a, u).call(this, "DELETE", `${p}/${e}`);
2867
+ }
2868
+ // ─── NPM Registry ────────────────────────────────────────────────
2869
+ /**
2870
+ * Fetches read-only npm credentials for the private `@thatopen` Founders
2871
+ * beta packages. Gated server-side on the token owner's membership tier:
2872
+ * FOUNDING members (and admins) get the token; everyone else gets a 403
2873
+ * (`RequestError` with `status === 403`). The returned `npmrc` is a
2874
+ * ready-to-write `.npmrc` body the CLI drops into a scaffolded project.
2875
+ * @returns The registry, scope, read-only token, and assembled `.npmrc`.
2876
+ */
2877
+ async getNpmCredentials() {
2878
+ return await c(this, a, u).call(this, "GET", `${It}/credentials`);
2867
2879
  }
2868
2880
  // ─── Execution ───────────────────────────────────────────────────
2869
2881
  /**
@@ -2893,7 +2905,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2893
2905
  }
2894
2906
  return await i.json();
2895
2907
  }
2896
- return await c(this, a, l).call(this, "POST", `${O}/${e}/execute`, {
2908
+ return await c(this, a, u).call(this, "POST", `${O}/${e}/execute`, {
2897
2909
  body: JSON.stringify(t),
2898
2910
  query: { ...s && { versionTag: s } },
2899
2911
  contentType: "application/json"
@@ -2912,7 +2924,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2912
2924
  }
2913
2925
  return await s.json();
2914
2926
  }
2915
- return await c(this, a, l).call(this, "POST", `${O}/progress/${e}/abort`);
2927
+ return await c(this, a, u).call(this, "POST", `${O}/progress/${e}/abort`);
2916
2928
  }
2917
2929
  /**
2918
2930
  * Lists all executions for a given component.
@@ -2938,7 +2950,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2938
2950
  }
2939
2951
  return await i.json();
2940
2952
  }
2941
- return await c(this, a, l).call(this, "GET", `${O}/${e}/progress`, { query: { ...t && { projectId: t } } });
2953
+ return await c(this, a, u).call(this, "GET", `${O}/${e}/progress`, { query: { ...t && { projectId: t } } });
2942
2954
  }
2943
2955
  /**
2944
2956
  * Gets details of a specific execution, including its messages.
@@ -2954,7 +2966,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2954
2966
  }
2955
2967
  return await s.json();
2956
2968
  }
2957
- return await c(this, a, l).call(this, "GET", `${O}/progress/${e}`);
2969
+ return await c(this, a, u).call(this, "GET", `${O}/progress/${e}`);
2958
2970
  }
2959
2971
  /**
2960
2972
  * Subscribes to real-time execution progress via WebSocket.
@@ -2983,7 +2995,23 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2983
2995
  */
2984
2996
  async createHiddenFile(e, t) {
2985
2997
  const s = new FormData();
2986
- return s.append("file", e), s.append("parentItemId", t), await c(this, a, l).call(this, "POST", `${p}/${R}`, {
2998
+ return s.append("file", e), s.append("parentItemId", t), await c(this, a, u).call(this, "POST", `${p}/${R}`, {
2999
+ body: s
3000
+ });
3001
+ }
3002
+ /**
3003
+ * Creates many hidden files attached to a parent item in a single request.
3004
+ * Use this instead of many `createHiddenFile` calls when uploading large sets
3005
+ * (e.g. 3D Tiles); upload in chunks of up to 100 files per call.
3006
+ * @param files - The files to upload.
3007
+ * @param parentFileId - The parent item's unique identifier.
3008
+ * @returns One result per uploaded file, in order, each with its hidden file ID.
3009
+ */
3010
+ async createHiddenFilesBatch(e, t) {
3011
+ const s = new FormData();
3012
+ for (const r of e)
3013
+ s.append("files", r);
3014
+ return s.append("parentItemId", t), await c(this, a, u).call(this, "POST", `${p}/${R}/batch`, {
2987
3015
  body: s
2988
3016
  });
2989
3017
  }
@@ -2992,14 +3020,14 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2992
3020
  * @param hiddenId - The hidden file's unique identifier.
2993
3021
  */
2994
3022
  async deleteHiddenFile(e) {
2995
- return await c(this, a, l).call(this, "DELETE", `${p}/${R}/${e}`);
3023
+ return await c(this, a, u).call(this, "DELETE", `${p}/${R}/${e}`);
2996
3024
  }
2997
3025
  /**
2998
3026
  * Gets metadata for a hidden file.
2999
3027
  * @param hiddenId - The hidden file's unique identifier.
3000
3028
  */
3001
3029
  async getHiddenFile(e) {
3002
- return await c(this, a, l).call(this, "GET", `${p}/${R}/${e}`);
3030
+ return await c(this, a, u).call(this, "GET", `${p}/${R}/${e}`);
3003
3031
  }
3004
3032
  /**
3005
3033
  * Downloads a hidden file's content. Returns the raw fetch Response.
@@ -3014,14 +3042,14 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
3014
3042
  * @returns Array of hidden file entities.
3015
3043
  */
3016
3044
  async getHiddenFilesByParent(e) {
3017
- return await c(this, a, l).call(this, "GET", `${p}/${e}/${R}`);
3045
+ return await c(this, a, u).call(this, "GET", `${p}/${e}/${R}`);
3018
3046
  }
3019
3047
  /**
3020
3048
  * Deletes all hidden files attached to a parent item.
3021
3049
  * @param parentFileId - The parent item's unique identifier.
3022
3050
  */
3023
3051
  async deleteHiddenFilesByParent(e) {
3024
- return await c(this, a, l).call(this, "DELETE", `${p}/${e}/${R}`);
3052
+ return await c(this, a, u).call(this, "DELETE", `${p}/${e}/${R}`);
3025
3053
  }
3026
3054
  // ─── Icons ───────────────────────────────────────────────────────
3027
3055
  /**
@@ -3033,7 +3061,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
3033
3061
  */
3034
3062
  async uploadItemIcon(e, t) {
3035
3063
  const s = new FormData();
3036
- return s.append("icon", t), await c(this, a, l).call(this, "PUT", `${p}/${e}/icon`, { body: s });
3064
+ return s.append("icon", t), await c(this, a, u).call(this, "PUT", `${p}/${e}/icon`, { body: s });
3037
3065
  }
3038
3066
  /**
3039
3067
  * Downloads the icon for an item as a binary stream.
@@ -3049,7 +3077,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
3049
3077
  * @returns The updated item with icon fields removed.
3050
3078
  */
3051
3079
  async removeItemIcon(e) {
3052
- return await c(this, a, l).call(this, "DELETE", `${p}/${e}/icon`);
3080
+ return await c(this, a, u).call(this, "DELETE", `${p}/${e}/icon`);
3053
3081
  }
3054
3082
  // ─── General Item Operations ─────────────────────────────────────
3055
3083
  /**
@@ -3059,7 +3087,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
3059
3087
  * @returns The updated item.
3060
3088
  */
3061
3089
  async updateItem(e, t) {
3062
- return await c(this, a, l).call(this, "PUT", `${p}/${e}`, {
3090
+ return await c(this, a, u).call(this, "PUT", `${p}/${e}`, {
3063
3091
  body: JSON.stringify(t),
3064
3092
  contentType: "application/json"
3065
3093
  });
@@ -3076,7 +3104,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
3076
3104
  */
3077
3105
  async createVersion(e, t, s, r, i) {
3078
3106
  const o = new FormData();
3079
- return o.append("file", t), o.append("versionTag", s), r && o.append("extraProps", JSON.stringify(r)), i && o.append("metadata", JSON.stringify(i)), await c(this, a, l).call(this, "POST", `${p}/${e}/version`, { body: o });
3107
+ return o.append("file", t), o.append("versionTag", s), r && o.append("extraProps", JSON.stringify(r)), i && o.append("metadata", JSON.stringify(i)), await c(this, a, u).call(this, "POST", `${p}/${e}/version`, { body: o });
3080
3108
  }
3081
3109
  /**
3082
3110
  * Lists versions of an item. Pass `archived: true` to fetch only archived
@@ -3086,7 +3114,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
3086
3114
  * @returns Array of versions, sorted by creation date descending.
3087
3115
  */
3088
3116
  async listVersions(e, t = {}) {
3089
- return await c(this, a, l).call(this, "GET", `${p}/${encodeURIComponent(e)}/versions`, { query: t });
3117
+ return await c(this, a, u).call(this, "GET", `${p}/${encodeURIComponent(e)}/versions`, { query: t });
3090
3118
  }
3091
3119
  /**
3092
3120
  * Archives a version of an item. Archived versions remain available via
@@ -3098,7 +3126,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
3098
3126
  * @returns The archived version.
3099
3127
  */
3100
3128
  async archiveVersion(e, t) {
3101
- return await c(this, a, l).call(this, "PUT", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/archive`);
3129
+ return await c(this, a, u).call(this, "PUT", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/archive`);
3102
3130
  }
3103
3131
  /**
3104
3132
  * Recovers a previously archived version, restoring it to the active list.
@@ -3107,7 +3135,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
3107
3135
  * @returns The recovered version.
3108
3136
  */
3109
3137
  async recoverVersion(e, t) {
3110
- return await c(this, a, l).call(this, "PUT", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/recover`);
3138
+ return await c(this, a, u).call(this, "PUT", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}/recover`);
3111
3139
  }
3112
3140
  /**
3113
3141
  * Permanently deletes a version, including its file in object storage.
@@ -3116,19 +3144,19 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
3116
3144
  * @param versionTag - The version's tag (e.g. "v2").
3117
3145
  */
3118
3146
  async deleteVersion(e, t) {
3119
- return await c(this, a, l).call(this, "DELETE", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}`);
3147
+ return await c(this, a, u).call(this, "DELETE", `${p}/${encodeURIComponent(e)}/version/${encodeURIComponent(t)}`);
3120
3148
  }
3121
3149
  };
3122
3150
  a = new WeakSet(), ae = function(e) {
3123
3151
  return `${this.apiUrl}/${e}`;
3124
- }, l = async function(e, t, s) {
3125
- const { body: r, query: i, contentType: o, retries: h } = s || {}, u = c(this, a, ae).call(this, t), y = c(this, a, Ue).call(this, i), d = await this.resolveAccessToken(), m = {
3152
+ }, u = async function(e, t, s) {
3153
+ const { body: r, query: i, contentType: o, retries: h } = s || {}, l = c(this, a, ae).call(this, t), y = c(this, a, Ue).call(this, i), d = await this.resolveAccessToken(), m = {
3126
3154
  ...y,
3127
3155
  ...this.useBearer ? {} : { accessToken: d }
3128
3156
  };
3129
3157
  try {
3130
3158
  const w = await fetch(
3131
- u + "?" + new URLSearchParams(m).toString(),
3159
+ l + "?" + new URLSearchParams(m).toString(),
3132
3160
  {
3133
3161
  method: e,
3134
3162
  headers: {
@@ -3152,7 +3180,7 @@ a = new WeakSet(), ae = function(e) {
3152
3180
  } catch (w) {
3153
3181
  let A = h ?? this.retries;
3154
3182
  if (A)
3155
- return A = A - 1, await c(this, a, l).call(this, e, t, {
3183
+ return A = A - 1, await c(this, a, u).call(this, e, t, {
3156
3184
  ...s,
3157
3185
  retries: A
3158
3186
  });
@@ -3181,16 +3209,16 @@ a = new WeakSet(), ae = function(e) {
3181
3209
  }
3182
3210
  });
3183
3211
  }, M = async function(e, t, s) {
3184
- const { name: r, versionTag: i, parentFolderId: o, projectId: h, file: u, metadata: y } = e, d = new FormData();
3185
- return d.append("file", u), d.append("name", r), d.append("versionTag", i), d.append("itemType", t), o && d.append("folderId", o), h && d.append("projectId", h), s && d.append("extraProps", JSON.stringify(s)), y && d.append("metadata", JSON.stringify(y)), await c(this, a, l).call(this, "POST", p, {
3212
+ const { name: r, versionTag: i, parentFolderId: o, projectId: h, file: l, metadata: y } = e, d = new FormData();
3213
+ return d.append("file", l), d.append("name", r), d.append("versionTag", i), d.append("itemType", t), o && d.append("folderId", o), h && d.append("projectId", h), s && d.append("extraProps", JSON.stringify(s)), y && d.append("metadata", JSON.stringify(y)), await c(this, a, u).call(this, "POST", p, {
3186
3214
  body: d
3187
3215
  });
3188
3216
  }, ce = async function(e, t, s) {
3189
- const { name: r, versionTag: i, parentFolderId: o, file: h, metadata: u } = t;
3217
+ const { name: r, versionTag: i, parentFolderId: o, file: h, metadata: l } = t;
3190
3218
  let y, d;
3191
3219
  if (h) {
3192
3220
  const m = new FormData();
3193
- m.append("file", h), i && m.append("versionTag", i), s && m.append("extraProps", JSON.stringify(s)), u && m.append("metadata", JSON.stringify(u)), d = await c(this, a, l).call(this, "POST", `${p}/${e}/version`, {
3221
+ m.append("file", h), i && m.append("versionTag", i), s && m.append("extraProps", JSON.stringify(s)), l && m.append("metadata", JSON.stringify(l)), d = await c(this, a, u).call(this, "POST", `${p}/${e}/version`, {
3194
3222
  body: m
3195
3223
  });
3196
3224
  }
@@ -3199,7 +3227,7 @@ a = new WeakSet(), ae = function(e) {
3199
3227
  ...r && { name: r },
3200
3228
  ...o && { folderId: o }
3201
3229
  }, w = JSON.stringify(m);
3202
- y = await c(this, a, l).call(this, "PUT", `${p}/${e}`, {
3230
+ y = await c(this, a, u).call(this, "PUT", `${p}/${e}`, {
3203
3231
  body: w,
3204
3232
  contentType: "application/json"
3205
3233
  });
@@ -3207,7 +3235,7 @@ a = new WeakSet(), ae = function(e) {
3207
3235
  return { item: y, version: d };
3208
3236
  }, he = async function(e, t) {
3209
3237
  const { showVersions: s = !1 } = t || {};
3210
- return await c(this, a, l).call(this, "GET", `${p}/${e}`, {
3238
+ return await c(this, a, u).call(this, "GET", `${p}/${e}`, {
3211
3239
  query: { showVersions: s }
3212
3240
  });
3213
3241
  }, Ue = function(e) {
@@ -3230,11 +3258,11 @@ const me = class me extends oe {
3230
3258
  */
3231
3259
  constructor(t, s, r) {
3232
3260
  super(typeof t == "string" ? t : "", s, { ...r, useBearer: !0 });
3233
- K(this, $);
3261
+ Y(this, $);
3234
3262
  typeof t == "function" && we(this, $, t);
3235
3263
  }
3236
3264
  async resolveAccessToken() {
3237
- return G(this, $) ? await G(this, $).call(this) : super.resolveAccessToken();
3265
+ return j(this, $) ? await j(this, $).call(this) : super.resolveAccessToken();
3238
3266
  }
3239
3267
  /**
3240
3268
  * Creates a client from the platform context injected into
@@ -3291,20 +3319,20 @@ const me = class me extends oe {
3291
3319
  };
3292
3320
  $ = new WeakMap();
3293
3321
  let ke = me;
3294
- const Ut = {
3322
+ const Dt = {
3295
3323
  MAX_FIELDS: 200,
3296
3324
  MAX_KEY_LENGTH: 50,
3297
3325
  MAX_VALUE_LENGTH: 50
3298
- }, Dt = { uuid: "2e32d873-02c9-421c-8743-d8a5ca6ad38a" }, Ft = { uuid: "b0b5e2a2-0b3a-4a6b-8b1c-0b1c4a6b8b1c" }, Vt = { uuid: "2c4ae432-fc24-43e9-9783-0c960c674e96" }, Mt = { uuid: "3c2a9f34-8b6c-4d1b-8f7a-1e4a5b2c9f08" }, Ht = { uuid: "234f1416-528d-452a-9cc9-a16c5239b2eb" }, Jt = { uuid: "def81d43-6b44-4f4a-9c08-7649486112a4" };
3326
+ }, Ft = { uuid: "2e32d873-02c9-421c-8743-d8a5ca6ad38a" }, Vt = { uuid: "b0b5e2a2-0b3a-4a6b-8b1c-0b1c4a6b8b1c" }, Mt = { uuid: "2c4ae432-fc24-43e9-9783-0c960c674e96" }, Ht = { uuid: "3c2a9f34-8b6c-4d1b-8f7a-1e4a5b2c9f08" }, Gt = { uuid: "234f1416-528d-452a-9cc9-a16c5239b2eb" }, Jt = { uuid: "def81d43-6b44-4f4a-9c08-7649486112a4" };
3299
3327
  export {
3300
- Dt as AppManager,
3328
+ Ft as AppManager,
3301
3329
  oe as EngineServicesClient,
3302
- Ft as FileList,
3303
- Vt as HelloWorld,
3304
- Ut as METADATA_LIMITS,
3330
+ Vt as FileList,
3331
+ Mt as HelloWorld,
3332
+ Dt as METADATA_LIMITS,
3305
3333
  ke as PlatformClient,
3306
3334
  Lt as RequestError,
3307
- Mt as TabbedNavigation,
3308
- Ht as UIManager,
3335
+ Ht as TabbedNavigation,
3336
+ Gt as UIManager,
3309
3337
  Jt as ViewportsManager
3310
3338
  };