@opencloud-eu/web-client 7.1.2 → 7.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.
@@ -1,12 +1,23 @@
1
- import { n as e, r as t, t as n } from "./axios-idnwLrbl.js";
2
- import { n as r } from "./dist-DXLl1XQj.js";
3
- import { u as i } from "./toString-DIrlTUQN.js";
4
- import { E as a, K as o, N as s, P as c, Q as l, W as u, Z as d, _ as f, f as p, q as m } from "./helpers-B_uB5urn.js";
5
- import { a as h, i as g, n as _, r as v, t as y } from "./ocs-VeFt8RO1.js";
1
+ import { n as e, r as t, t as n } from "./axios-Dwm7CNmg.js";
2
+ import { n as r } from "./dist-B2vdwwII.js";
3
+ import { t as i } from "./urlJoin-_pUL1TUx.js";
4
+ import { E as a, G as o, K as s, M as c, N as l, U as u, _ as d, f } from "./helpers-BMMUdKkY.js";
5
+ import { a as p, i as m, n as h, r as g, t as _ } from "./ocs-BwWCZeaA.js";
6
6
  //#region src/utils/encodePath.ts
7
- var b = (e) => encodeURIComponent(e).split("%2F").join("/");
7
+ var v = (e) => encodeURIComponent(e).split("%2F").join("/"), y = class extends Error {
8
+ response;
9
+ statusCode;
10
+ constructor(e, t, n = null) {
11
+ super(e), this.response = t, this.statusCode = n;
12
+ }
13
+ }, b = class extends y {
14
+ errorCode;
15
+ constructor(e, t, n, r = null) {
16
+ super(e, n, r), this.errorCode = t;
17
+ }
18
+ };
8
19
  //#endregion
9
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/util.js
20
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.0/node_modules/fast-xml-builder/src/util.js
10
21
  function x(e) {
11
22
  return String(e).replace(/--/g, "- -").replace(/--/g, "- -").replace(/-$/, "- ");
12
23
  }
@@ -17,7 +28,7 @@ function C(e) {
17
28
  return String(e).replace(/"/g, """).replace(/'/g, "'");
18
29
  }
19
30
  //#endregion
20
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/orderedJs2Xml.js
31
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.0/node_modules/fast-xml-builder/src/orderedJs2Xml.js
21
32
  var ee = "\n";
22
33
  function te(e, t) {
23
34
  if (!Array.isArray(e) || e.length === 0) return "1.0";
@@ -32,7 +43,7 @@ function te(e, t) {
32
43
  return "1.0";
33
44
  }
34
45
  function ne(e, t, n, r, i) {
35
- return !n.sanitizeName || h(e, { xmlVersion: i }) ? e : n.sanitizeName(e, {
46
+ return !n.sanitizeName || i(e) ? e : n.sanitizeName(e, {
36
47
  isAttribute: t,
37
48
  matcher: r.readOnly()
38
49
  });
@@ -43,9 +54,9 @@ function re(e, t) {
43
54
  let r = [];
44
55
  if (t.stopNodes && Array.isArray(t.stopNodes)) for (let e = 0; e < t.stopNodes.length; e++) {
45
56
  let n = t.stopNodes[e];
46
- typeof n == "string" ? r.push(new g(n)) : n instanceof g && r.push(n);
57
+ typeof n == "string" ? r.push(new m(n)) : n instanceof m && r.push(n);
47
58
  }
48
- let i = te(e, t), a = new v();
59
+ let i = p("qName", { xmlVersion: te(e, t) }), a = new g();
49
60
  return ie(e, t, n, a, r, i);
50
61
  }
51
62
  function ie(e, t, n, r, i, a) {
@@ -153,14 +164,14 @@ function ce(e, t) {
153
164
  return e;
154
165
  }
155
166
  //#endregion
156
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/ignoreAttributes.js
167
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.0/node_modules/fast-xml-builder/src/ignoreAttributes.js
157
168
  function le(e) {
158
169
  return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
159
170
  for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
160
171
  } : () => !1;
161
172
  }
162
173
  //#endregion
163
- //#region ../../node_modules/.pnpm/fast-xml-builder@1.2.0/node_modules/fast-xml-builder/src/fxb.js
174
+ //#region ../../node_modules/.pnpm/fast-xml-builder@1.3.0/node_modules/fast-xml-builder/src/fxb.js
164
175
  var ue = {
165
176
  attributeNamePrefix: "@_",
166
177
  attributesGroupName: !1,
@@ -213,7 +224,7 @@ var ue = {
213
224
  function D(e) {
214
225
  if (this.options = Object.assign({}, ue, e), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let e = 0; e < this.options.stopNodes.length; e++) {
215
226
  let t = this.options.stopNodes[e];
216
- typeof t == "string" ? this.stopNodeExpressions.push(new g(t)) : t instanceof g && this.stopNodeExpressions.push(t);
227
+ typeof t == "string" ? this.stopNodeExpressions.push(new m(t)) : t instanceof m && this.stopNodeExpressions.push(t);
217
228
  }
218
229
  this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
219
230
  return !1;
@@ -234,7 +245,7 @@ function de(e, t) {
234
245
  return "1.0";
235
246
  }
236
247
  function fe(e, t, n, r, i) {
237
- return !n.sanitizeName || h(e, { xmlVersion: i }) ? e : n.sanitizeName(e, {
248
+ return !n.sanitizeName || i(e) ? e : n.sanitizeName(e, {
238
249
  isAttribute: t,
239
250
  matcher: r.readOnly()
240
251
  });
@@ -243,7 +254,7 @@ D.prototype.build = function(e) {
243
254
  if (this.options.preserveOrder) return re(e, this.options);
244
255
  {
245
256
  Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e });
246
- let t = new v(), n = de(e, this.options);
257
+ let t = new g(), n = p("qName", { xmlVersion: de(e, this.options) });
247
258
  return this.j2x(e, 0, t, n).val;
248
259
  }
249
260
  }, D.prototype.j2x = function(e, t, n, r) {
@@ -364,14 +375,14 @@ D.prototype.extractAttributes = function(e) {
364
375
  for (let e in n) {
365
376
  if (!Object.prototype.hasOwnProperty.call(n, e)) continue;
366
377
  let r = e.startsWith(this.options.attributeNamePrefix) ? e.substring(this.options.attributeNamePrefix.length) : e, i = n[e];
367
- i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + i + "\"";
378
+ i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + C(i) + "\"";
368
379
  }
369
380
  } else for (let n in e) {
370
381
  if (!Object.prototype.hasOwnProperty.call(e, n)) continue;
371
382
  let r = this.isAttribute(n);
372
383
  if (r) {
373
384
  let i = e[n];
374
- i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + i + "\"";
385
+ i === !0 && this.options.suppressBooleanAttributes ? t += " " + r : t += " " + r + "=\"" + C(i) + "\"";
375
386
  }
376
387
  }
377
388
  return t;
@@ -380,7 +391,7 @@ D.prototype.extractAttributes = function(e) {
380
391
  if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
381
392
  {
382
393
  let i = "</" + t + this.tagEndChar, a = "";
383
- return t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(r) + "<" + t + n + a + ">" + e + i : this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `<!--${e}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
394
+ return t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(r) + "<" + t + n + a + ">" + e + i : this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `<!--${x(e)}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
384
395
  }
385
396
  }, D.prototype.closeTag = function(e) {
386
397
  let t = "";
@@ -415,7 +426,7 @@ function he(e) {
415
426
  return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
416
427
  }
417
428
  //#endregion
418
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
429
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
419
430
  var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
420
431
  if (n !== void 0) return i(e.webDavPath, n);
421
432
  if (t !== void 0) {
@@ -467,7 +478,7 @@ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
467
478
  };
468
479
  } catch (e) {
469
480
  let { message: t, response: n } = e;
470
- throw new l(t, n, n.status);
481
+ throw new y(t, n, n.status);
471
482
  }
472
483
  } }), be = (e, t) => ({ async getFileInfo(t, n, r) {
473
484
  return (await e.listFiles(t, n, {
@@ -475,34 +486,34 @@ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
475
486
  ...r
476
487
  })).resource;
477
488
  } }), xe = (e, t, n, { axiosClient: r, baseUrl: a }) => ({
478
- async getFileUrl(o, s, { disposition: c = "attachment", version: l = null, username: u = "", ...d }) {
479
- if (c === "inline") {
480
- let e = await t.getFileContents(o, s, {
489
+ async getFileUrl(o, c, { disposition: l = "attachment", version: u = null, username: d = "", ...f }) {
490
+ if (l === "inline") {
491
+ let e = await t.getFileContents(o, c, {
481
492
  responseType: "blob",
482
- ...d
493
+ ...f
483
494
  });
484
495
  return URL.createObjectURL(e.body);
485
496
  }
486
- if (l) {
487
- if (!u) throw Error("username is required for URL signing");
488
- let t = e.getFileUrl(i("meta", s.fileId, "v", l));
489
- return await y(a, r).signUrl(t, u);
497
+ if (u) {
498
+ if (!d) throw Error("username is required for URL signing");
499
+ let t = e.getFileUrl(i("meta", c.fileId, "v", u));
500
+ return await _(a, r).signUrl(t, d);
490
501
  }
491
- if (s.downloadURL) return s.downloadURL;
492
- let { downloadURL: f } = await n.getFileInfo(o, s, { davProperties: [m.DownloadURL] });
493
- return f;
502
+ if (c.downloadURL) return c.downloadURL;
503
+ let { downloadURL: p } = await n.getFileInfo(o, c, { davProperties: [s.DownloadURL] });
504
+ return p;
494
505
  },
495
506
  revokeUrl: (e) => {
496
507
  e && e.startsWith("blob:") && URL.revokeObjectURL(e);
497
508
  }
498
509
  }), Se = (e, t) => ({ getPublicFileUrl(t, n) {
499
510
  return e.getFileUrl(i("public-files", n));
500
- } }), Ce = (e, t, n) => ({ async listFiles(n, { path: r, fileId: l } = {}, { depth: u = 1, davProperties: d, isTrash: h = !1, ...g } = {}) {
511
+ } }), Ce = (e, t, n) => ({ async listFiles(n, { path: r, fileId: u } = {}, { depth: p = 1, davProperties: m, isTrash: h = !1, ...g } = {}) {
501
512
  let _;
502
513
  if (a(n)) {
503
514
  _ = await e.propfind(i(n.webDavPath, r), {
504
- depth: u,
505
- properties: d || o.PublicLink,
515
+ depth: p,
516
+ properties: m || o.PublicLink,
506
517
  ...g
507
518
  }), _.forEach((e) => {
508
519
  e.filename = e.filename.split("/").slice(1).join("/");
@@ -510,7 +521,7 @@ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
510
521
  e.filename = e.filename.split("/").slice(2).join("/");
511
522
  });
512
523
  let t = n.driveAlias.startsWith("ocm/") ? "ocm" : "public-link";
513
- if ((!r || r === "/") && u > 0 && t === "ocm" && _[0].props[m.PublicLinkItemType] === "file" && (_ = [{
524
+ if ((!r || r === "/") && p > 0 && t === "ocm" && _[0].props[s.PublicLinkItemType] === "file" && (_ = [{
514
525
  basename: n.fileId,
515
526
  type: "directory",
516
527
  filename: "",
@@ -518,49 +529,49 @@ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
518
529
  }, ..._]), !r) {
519
530
  let [r, ...i] = _;
520
531
  return {
521
- resource: p({
532
+ resource: f({
522
533
  ...r,
523
534
  id: n.id,
524
535
  driveAlias: n.driveAlias,
525
536
  webDavPath: n.webDavPath,
526
537
  publicLinkType: t
527
538
  }),
528
- children: i.map((t) => c(t, e.extraProps))
539
+ children: i.map((t) => l(t, e.extraProps))
529
540
  };
530
541
  }
531
- let a = _.map((t) => c(t, e.extraProps));
542
+ let a = _.map((t) => l(t, e.extraProps));
532
543
  return {
533
544
  resource: a[0],
534
545
  children: a.slice(1)
535
546
  };
536
547
  }
537
548
  let v = async () => {
538
- let e = await t.getPathForFileId(l);
549
+ let e = await t.getPathForFileId(u);
539
550
  return this.listFiles(n, { path: e }, {
540
- depth: u,
541
- davProperties: d
551
+ depth: p,
552
+ davProperties: m
542
553
  });
543
554
  };
544
555
  try {
545
556
  let t = "";
546
- if (t = h ? f(n.id) : O(n, {
547
- fileId: l,
557
+ if (t = h ? d(n.id) : O(n, {
558
+ fileId: u,
548
559
  path: r
549
560
  }), _ = await e.propfind(t, {
550
- depth: u,
551
- properties: d || o.Default,
561
+ depth: p,
562
+ properties: m || o.Default,
552
563
  ...g
553
564
  }), h) return {
554
- resource: c(_[0], e.extraProps),
555
- children: _.slice(1).map(s)
565
+ resource: l(_[0], e.extraProps),
566
+ children: _.slice(1).map(c)
556
567
  };
557
- let i = _.map((t) => c(t, e.extraProps)), a = l === n.id;
558
- return l && !a && i[0].fileId && l !== i[0].fileId ? v() : {
568
+ let i = _.map((t) => l(t, e.extraProps)), a = u === n.id;
569
+ return u && !a && i[0].fileId && u !== i[0].fileId ? v() : {
559
570
  resource: i[0],
560
571
  children: i.slice(1)
561
572
  };
562
573
  } catch (e) {
563
- if (e.statusCode === 404 && l) return v();
574
+ if (e.statusCode === 404 && u) return v();
564
575
  throw e;
565
576
  }
566
577
  } }), we = (e, t) => ({ moveFiles(t, { path: n, fileId: r }, i, { path: a, parentFolderId: o, name: s }, { overwrite: c, ...l } = {}) {
@@ -608,27 +619,27 @@ var ge = D, O = (e, { fileId: t, path: n, name: r }) => {
608
619
  }), l = i("meta", n, "v", o, { leadingSlash: !0 }), u = i("files", c, { leadingSlash: !0 });
609
620
  return e.copy(l, u, s);
610
621
  } }), ke = (e, t) => ({ clearTrashBin(t, { id: n, ...r } = {}) {
611
- let a = f(t.id);
622
+ let a = d(t.id);
612
623
  return n && (a = i(a, n)), e.delete(a, r);
613
624
  } }), Ae = (e, t) => ({ async search(t, { davProperties: n = o.Default, searchLimit: r, ...i }) {
614
- let { range: a, results: s } = await e.report("/spaces/", {
625
+ let { range: a, results: c } = await e.report("/spaces/", {
615
626
  pattern: t,
616
627
  limit: r,
617
628
  properties: n,
618
629
  ...i
619
630
  });
620
631
  return {
621
- resources: s.map((t) => ({
622
- ...c(t, e.extraProps),
623
- highlights: t.props[m.Highlights] || ""
632
+ resources: c.map((t) => ({
633
+ ...l(t, e.extraProps),
634
+ highlights: t.props[s.Highlights] || ""
624
635
  })).filter((e, t, n) => n.findIndex((t) => t.id === e.id) === t),
625
636
  totalResults: a ? parseInt(a?.split("/")[1]) : null
626
637
  };
627
638
  } }), je = (e, t) => ({ async getPathForFileId(t, n = {}) {
628
639
  return (await e.propfind(i("meta", t, { leadingSlash: !0 }), {
629
- properties: [m.MetaPathForUser],
640
+ properties: [s.MetaPathForUser],
630
641
  ...n
631
- }))[0].props[m.MetaPathForUser];
642
+ }))[0].props[s.MetaPathForUser];
632
643
  } });
633
644
  //#endregion
634
645
  //#region ../../node_modules/.pnpm/webdav@5.9.0/node_modules/webdav/dist/web/index.js
@@ -1751,13 +1762,13 @@ var St = k(285), Ct = (e) => {
1751
1762
  }, Ot = function(e) {
1752
1763
  let { windowsPathsNoEscape: t = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1753
1764
  return t ? e.replace(/\[([^\/\\])\]/g, "$1") : e.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
1754
- }, kt = new Set([
1765
+ }, kt = /* @__PURE__ */ new Set([
1755
1766
  "!",
1756
1767
  "?",
1757
1768
  "+",
1758
1769
  "*",
1759
1770
  "@"
1760
- ]), At = (e) => kt.has(e), jt = "(?!\\.)", Mt = new Set(["[", "."]), Nt = new Set(["..", "."]), Pt = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), Ft = "[^/]", It = "[^/]*?", Lt = "[^/]+?", Rt = class e {
1771
+ ]), At = (e) => kt.has(e), jt = "(?!\\.)", Mt = /* @__PURE__ */ new Set(["[", "."]), Nt = /* @__PURE__ */ new Set(["..", "."]), Pt = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), Ft = "[^/]", It = "[^/]*?", Lt = "[^/]+?", Rt = class e {
1761
1772
  type;
1762
1773
  #e;
1763
1774
  #t;
@@ -4222,20 +4233,20 @@ function mi(e) {
4222
4233
  };
4223
4234
  }
4224
4235
  //#endregion
4225
- //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/stringify.js
4236
+ //#region ../../node_modules/.pnpm/uuid@14.0.1/node_modules/uuid/dist/stringify.js
4226
4237
  var $ = [];
4227
4238
  for (let e = 0; e < 256; ++e) $.push((e + 256).toString(16).slice(1));
4228
4239
  function hi(e, t = 0) {
4229
4240
  return ($[e[t + 0]] + $[e[t + 1]] + $[e[t + 2]] + $[e[t + 3]] + "-" + $[e[t + 4]] + $[e[t + 5]] + "-" + $[e[t + 6]] + $[e[t + 7]] + "-" + $[e[t + 8]] + $[e[t + 9]] + "-" + $[e[t + 10]] + $[e[t + 11]] + $[e[t + 12]] + $[e[t + 13]] + $[e[t + 14]] + $[e[t + 15]]).toLowerCase();
4230
4241
  }
4231
4242
  //#endregion
4232
- //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/rng.js
4233
- var gi = new Uint8Array(16);
4243
+ //#region ../../node_modules/.pnpm/uuid@14.0.1/node_modules/uuid/dist/rng.js
4244
+ var gi = /* @__PURE__ */ new Uint8Array(16);
4234
4245
  function _i() {
4235
4246
  return crypto.getRandomValues(gi);
4236
4247
  }
4237
4248
  //#endregion
4238
- //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v4.js
4249
+ //#region ../../node_modules/.pnpm/uuid@14.0.1/node_modules/uuid/dist/v4.js
4239
4250
  function vi(e, t, n) {
4240
4251
  return !t && !e && crypto.randomUUID ? crypto.randomUUID() : yi(e, t, n);
4241
4252
  }
@@ -4255,8 +4266,10 @@ function yi(e, t, n) {
4255
4266
  var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includes(e) ? [e, n || ""] : [o.DavNamespace.includes(e) ? `d:${e}` : `oc:${e}`, n || ""])), xi = (e = [], { pattern: t, filterRules: n, limit: r = 0, extraProps: i = [] }) => {
4256
4267
  let a = "d:propfind";
4257
4268
  t && (a = "oc:search-files"), n && (a = "oc:filter-files");
4258
- let o = bi(e.reduce((e, t) => Object.assign(e, { [t]: null }), {}), i), s = { [a]: {
4259
- "d:prop": o,
4269
+ let o = e.reduce((e, t) => Object.assign(e, { [t]: null }), {});
4270
+ for (let e of i) e in o || (o[e] = null);
4271
+ let s = bi(o, i), c = { [a]: {
4272
+ "d:prop": s,
4260
4273
  "@@xmlns:d": "DAV:",
4261
4274
  "@@xmlns:oc": "http://owncloud.org/ns",
4262
4275
  ...t && { "oc:search": {
@@ -4270,7 +4283,7 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4270
4283
  ignoreAttributes: !1,
4271
4284
  attributeNamePrefix: "@@",
4272
4285
  suppressEmptyNode: !0
4273
- }).build(s);
4286
+ }).build(c);
4274
4287
  }, Si = (e) => {
4275
4288
  let t = { "d:propertyupdate": {
4276
4289
  "d:set": { "d:prop": bi(e, []) },
@@ -4302,7 +4315,7 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4302
4315
  return r.props.name && (r.props.name = r.props.name.toString()), r;
4303
4316
  });
4304
4317
  }, Ti = (e) => {
4305
- let t = new _(), n = {
4318
+ let t = new h(), n = {
4306
4319
  message: "Unknown error",
4307
4320
  errorCode: void 0
4308
4321
  };
@@ -4364,7 +4377,7 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4364
4377
  };
4365
4378
  }
4366
4379
  copy(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4367
- let o = i(this.davPath, b(t));
4380
+ let o = i(this.davPath, v(t));
4368
4381
  return this.request(e, {
4369
4382
  method: u.copy,
4370
4383
  headers: {
@@ -4376,7 +4389,7 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4376
4389
  });
4377
4390
  }
4378
4391
  move(e, t, { overwrite: n = !1, headers: r = {}, ...a } = {}) {
4379
- let o = i(this.davPath, b(t));
4392
+ let o = i(this.davPath, v(t));
4380
4393
  return this.request(e, {
4381
4394
  method: u.move,
4382
4395
  headers: {
@@ -4412,7 +4425,7 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4412
4425
  });
4413
4426
  }
4414
4427
  getFileUrl(e) {
4415
- return i(this.davPath, b(e));
4428
+ return i(this.davPath, v(e));
4416
4429
  }
4417
4430
  buildHeaders(e = {}) {
4418
4431
  return {
@@ -4424,7 +4437,7 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4424
4437
  };
4425
4438
  }
4426
4439
  async request(e, t) {
4427
- let n = i(this.davPath, b(e), { leadingSlash: !0 }), r = {
4440
+ let n = i(this.davPath, v(e), { leadingSlash: !0 }), r = {
4428
4441
  ...t,
4429
4442
  url: n,
4430
4443
  headers: this.buildHeaders(t.headers || {})
@@ -4438,14 +4451,14 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4438
4451
  };
4439
4452
  } catch (e) {
4440
4453
  let { response: t } = e, n = Ti(await t.text());
4441
- throw new d(n.message, n.errorCode, t, t.status);
4454
+ throw new b(n.message, n.errorCode, t, t.status);
4442
4455
  }
4443
4456
  }
4444
4457
  }, Di = (e, t) => ({ async listFileVersions(t, n = {}) {
4445
4458
  let [r, ...a] = await e.propfind(i("meta", t, "v", { leadingSlash: !0 }), n);
4446
- return a.map((t) => c(t, e.extraProps));
4459
+ return a.map((t) => l(t, e.extraProps));
4447
4460
  } }), Oi = (e, t) => ({ setFavorite(t, { path: n }, r, a = {}) {
4448
- let o = { [m.IsFavorite]: r ? "true" : "false" };
4461
+ let o = { [s.IsFavorite]: r ? "true" : "false" };
4449
4462
  return e.propPatch(i(t.webDavPath, n), o, a);
4450
4463
  } }), ki = (e, t) => {
4451
4464
  let r = n.create();
@@ -4483,4 +4496,4 @@ var bi = (e, t) => Object.fromEntries(Object.entries(e).map(([e, n]) => t.includ
4483
4496
  };
4484
4497
  };
4485
4498
  //#endregion
4486
- export { b as n, ki as t };
4499
+ export { v as i, b as n, y as r, ki as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencloud-eu/web-client",
3
- "version": "7.1.2",
3
+ "version": "7.2.0",
4
4
  "description": "OpenCloud web client",
5
5
  "license": "AGPL-3.0",
6
6
  "private": false,
@@ -35,6 +35,10 @@
35
35
  "default": "./dist/web-client/ocs.js",
36
36
  "types": "./dist/src/ocs/index.d.ts"
37
37
  },
38
+ "./ox": {
39
+ "default": "./dist/web-client/ox.js",
40
+ "types": "./dist/src/ox/index.d.ts"
41
+ },
38
42
  "./sse": {
39
43
  "default": "./dist/web-client/sse.js",
40
44
  "types": "./dist/src/sse/index.d.ts"
@@ -56,13 +60,13 @@
56
60
  "zod": "^4.3.6"
57
61
  },
58
62
  "devDependencies": {
59
- "@types/luxon": "3.7.1",
63
+ "@types/luxon": "3.7.2",
60
64
  "@types/node": "^25.5.0",
61
65
  "vite": "^8.0.3",
62
66
  "vite-plugin-node-polyfills": "0.28.0"
63
67
  },
64
68
  "scripts": {
65
- "generate-openapi": "rm -rf src/graph/generated && docker run --rm -v \"${PWD}/src/graph:/local\" openapitools/openapi-generator-cli generate -i https://raw.githubusercontent.com/opencloud-eu/libre-graph-api/main/api/openapi-spec/v1.0.yaml -g typescript-axios -o /local/generated",
69
+ "generate-openapi": "rm -rf src/graph/generated && docker run --rm -v \"${PWD}/src/graph:/local\" openapitools/openapi-generator-cli:v7.23.0 generate -i https://raw.githubusercontent.com/opencloud-eu/libre-graph-api/main/api/openapi-spec/v1.0.yaml -g typescript-axios -o /local/generated",
66
70
  "vite": "vite",
67
71
  "build": "vite build && vue-tsc --project tsconfig.build.json",
68
72
  "check:types": "vue-tsc --declaration --noEmit --project tsconfig.build.json"