@opencloud-eu/web-client 8.1.0 → 8.2.1

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 (32) hide show
  1. package/dist/{axios-CiL7Z3dm.js → axios-DRPhbClr.js} +13 -49
  2. package/dist/{dist-p2k0FYjB.js → dist-CHy-DaIN.js} +1 -1
  3. package/dist/{generated-5SvS30Rr.js → generated-4nR8KA38.js} +435 -267
  4. package/dist/{graph-u53S3WT9.js → graph-CwVan2Jp.js} +148 -123
  5. package/dist/{helpers-CrYtf7Ol.js → helpers-Bh5xR_vg.js} +45 -36
  6. package/dist/{ocs-CDSkdguM.js → ocs-Dfdjrujs.js} +407 -432
  7. package/dist/{schemas-BlxXwTjV.js → schemas-rdabTCJb.js} +1014 -1008
  8. package/dist/src/errors.d.ts +2 -1
  9. package/dist/src/graph/generated/api.d.ts +527 -0
  10. package/dist/src/graph/guestLinks/guestLinks.d.ts +3 -0
  11. package/dist/src/graph/guestLinks/index.d.ts +2 -0
  12. package/dist/src/graph/guestLinks/types.d.ts +13 -0
  13. package/dist/src/graph/index.d.ts +3 -0
  14. package/dist/src/graph/types.d.ts +1 -0
  15. package/dist/src/helpers/resource/types.d.ts +2 -1
  16. package/dist/src/helpers/share/types.d.ts +3 -0
  17. package/dist/src/helpers/space/functions.d.ts +2 -2
  18. package/dist/src/ocs/capabilities.d.ts +1 -0
  19. package/dist/src/webdav/client/dav.d.ts +3 -1
  20. package/dist/src/webdav/client/parsers.d.ts +1 -0
  21. package/dist/src/webdav/constants/dav.d.ts +5 -1
  22. package/dist/src/webdav/index.d.ts +1 -1
  23. package/dist/{toString-CVetDRwx.js → toString-uorCN9F3.js} +1 -1
  24. package/dist/web-client/graph/generated.js +1 -2
  25. package/dist/web-client/graph.js +1 -2
  26. package/dist/web-client/ocs.js +1 -2
  27. package/dist/web-client/ox.js +1 -1
  28. package/dist/web-client/sse.js +1 -1
  29. package/dist/web-client/webdav.js +2 -2
  30. package/dist/web-client.js +4 -4
  31. package/dist/{webdav-BdeuuZHv.js → webdav-DrQsSfxZ.js} +95 -86
  32. package/package.json +1 -3
@@ -1,58 +1,58 @@
1
- import { t as e } from "./axios-CiL7Z3dm.js";
2
- import { C as t, Cn as n, Dn as r, Fn as i, Jt as a, N as o, Un as s, Wt as c, c as l, g as u, i as d, in as f, jn as p, k as m, mn as h, mt as g, t as _, un as v, vn as y, vt as b, x, zn as S } from "./generated-5SvS30Rr.js";
3
- import { t as C } from "./urlJoin-_pUL1TUx.js";
4
- import { m as w, r as T, t as E } from "./helpers-CrYtf7Ol.js";
1
+ import { t as e } from "./axios-DRPhbClr.js";
2
+ import { $n as t, A as n, Gn as r, Ln as i, P as a, S as o, Tn as s, Vn as c, Xt as l, Yn as u, _ as d, bn as f, c as p, en as m, gn as h, ht as g, i as _, rr as v, t as y, un as b, w as x, wt as S, yt as C } from "./generated-4nR8KA38.js";
3
+ import { t as w } from "./urlJoin-_pUL1TUx.js";
4
+ import { m as T, r as E, t as D } from "./helpers-Bh5xR_vg.js";
5
5
  //#region ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@7.2.0__supports-color@7.2.0/node_modules/axios/index.js
6
- var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, VERSION: j, all: M, Cancel: N, isAxiosError: P, spread: F, toFormData: I, AxiosHeaders: L, HttpStatusCode: R, formToJSON: z, getAdapter: B, mergeConfig: V, create: H } = e, U = ({ axiosClient: e, config: t }) => {
7
- let n = r(t, t.basePath, e), i = s(t, t.basePath, e), a = h(t, t.basePath, e), o = c(t, t.basePath, e), l = p(t, t.basePath, e), u = S(t, t.basePath, e);
6
+ var { Axios: ee, AxiosError: O, CanceledError: k, isCancel: A, CancelToken: j, VERSION: M, all: N, Cancel: P, isAxiosError: F, spread: I, toFormData: te, AxiosHeaders: L, HttpStatusCode: ne, formToJSON: re, getAdapter: R, mergeConfig: z, create: B } = e, V = ({ axiosClient: e, config: n }) => {
7
+ let i = c(n, n.basePath, e), a = v(n, n.basePath, e), o = f(n, n.basePath, e), s = l(n, n.basePath, e), u = r(n, n.basePath, e), d = t(n, n.basePath, e);
8
8
  return {
9
- async getUser(e, t, r) {
10
- let { data: i } = await n.getUser(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, t?.expand ? /* @__PURE__ */ new Set([...t.expand]) : /* @__PURE__ */ new Set([
9
+ async getUser(e, t, n) {
10
+ let { data: r } = await i.getUser(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, t?.expand ? /* @__PURE__ */ new Set([...t.expand]) : /* @__PURE__ */ new Set([
11
11
  "drive",
12
12
  "memberOf",
13
13
  "appRoleAssignments"
14
- ]), r);
15
- return i;
14
+ ]), n);
15
+ return r;
16
16
  },
17
17
  async createUser(e, t) {
18
- let { data: n } = await i.createUser(e, t);
18
+ let { data: n } = await a.createUser(e, t);
19
19
  return n;
20
20
  },
21
- async editUser(e, t, r) {
22
- let { data: i } = await n.updateUser(e, t, r);
23
- return i;
21
+ async editUser(e, t, n) {
22
+ let { data: r } = await i.updateUser(e, t, n);
23
+ return r;
24
24
  },
25
- async deleteUser(e, t, r) {
26
- await n.deleteUser(e, t, r);
25
+ async deleteUser(e, t, n) {
26
+ await i.deleteUser(e, t, n);
27
27
  },
28
28
  async listUsers(e, t) {
29
- let { data: { value: n } } = await i.listUsers(e?.search, e?.filter, e?.orderBy ? /* @__PURE__ */ new Set([...e.orderBy]) : null, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, e?.expand ? /* @__PURE__ */ new Set([...e.expand]) : null, t);
29
+ let { data: { value: n } } = await a.listUsers(e?.search, e?.filter, e?.orderBy ? /* @__PURE__ */ new Set([...e.orderBy]) : null, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, e?.expand ? /* @__PURE__ */ new Set([...e.expand]) : null, t);
30
30
  return n;
31
31
  },
32
32
  async getMe(e, t) {
33
- let { data: n } = await a.getOwnUser(e?.expand ? /* @__PURE__ */ new Set([...e.expand]) : /* @__PURE__ */ new Set(["memberOf"]), t);
33
+ let { data: n } = await o.getOwnUser(e?.expand ? /* @__PURE__ */ new Set([...e.expand]) : null, t);
34
34
  return n;
35
35
  },
36
36
  async editMe(e, t) {
37
- let { data: n } = await a.updateOwnUser(e, t);
37
+ let { data: n } = await o.updateOwnUser(e, t);
38
38
  return n;
39
39
  },
40
40
  async changeOwnPassword(e, t) {
41
- await o.changeOwnPassword(e, t);
41
+ await s.changeOwnPassword(e, t);
42
42
  },
43
- async exportPersonalData(e, t, r) {
44
- await n.exportPersonalData(e, t, r);
43
+ async exportPersonalData(e, t, n) {
44
+ await i.exportPersonalData(e, t, n);
45
45
  },
46
46
  async createUserAppRoleAssignment(e, t, n) {
47
- let { data: r } = await l.userCreateAppRoleAssignments(e, t, n);
47
+ let { data: r } = await u.userCreateAppRoleAssignments(e, t, n);
48
48
  return r;
49
49
  },
50
50
  async sendActivityNotification(e, t, n) {
51
- await u.sendActivityNotification(e, t, n);
51
+ await d.sendActivityNotification(e, t, n);
52
52
  }
53
53
  };
54
- }, W = ({ axiosClient: e, config: t }) => {
55
- let n = g(t, t.basePath, e), r = b(t, t.basePath, e);
54
+ }, H = ({ axiosClient: e, config: t }) => {
55
+ let n = g(t, t.basePath, e), r = C(t, t.basePath, e);
56
56
  return {
57
57
  async getGroup(e, t, r) {
58
58
  let { data: i } = await n.getGroup(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, t?.expand ? /* @__PURE__ */ new Set([...t.expand]) : /* @__PURE__ */ new Set(["members"]), r);
@@ -74,14 +74,14 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
74
74
  return n;
75
75
  },
76
76
  async addMember(e, r, i) {
77
- await n.addMember(e, { "@odata.id": C(t.basePath, "v1.0", "users", r) }, i);
77
+ await n.addMember(e, { "@odata.id": w(t.basePath, "v1.0", "users", r) }, i);
78
78
  },
79
79
  async deleteMember(e, t, r, i) {
80
80
  await n.deleteMember(e, t, r, i);
81
81
  }
82
82
  };
83
- }, G = ({ axiosClient: e, config: t }) => {
84
- let n = l(t, t.basePath, e);
83
+ }, U = ({ axiosClient: e, config: t }) => {
84
+ let n = p(t, t.basePath, e);
85
85
  return {
86
86
  async getApplication(e, t) {
87
87
  let { data: r } = await n.getApplication(e, t);
@@ -92,59 +92,59 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
92
92
  return t || [];
93
93
  }
94
94
  };
95
- }, K = (e) => new URL(e.webUrl).origin, q = ({ axiosClient: e, config: n }) => {
96
- let r = x(n, n.basePath, e), i = new f(n, n.basePath, e), a = new t(n, n.basePath, e);
95
+ }, W = (e) => new URL(e.webUrl).origin, G = ({ axiosClient: e, config: t }) => {
96
+ let n = o(t, t.basePath, e), r = new b(t, t.basePath, e), i = new x(t, t.basePath, e);
97
97
  return {
98
- async getDrive(e, t, n) {
99
- let { data: i } = await r.getDrive(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, n);
100
- return w({
98
+ async getDrive(e, t, r) {
99
+ let { data: i } = await n.getDrive(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, r);
100
+ return T({
101
101
  ...i,
102
- serverUrl: K(i)
102
+ serverUrl: W(i)
103
103
  });
104
104
  },
105
105
  async createDrive(e, t) {
106
- let { data: n } = await r.createDrive(e, t);
107
- return w({
108
- ...n,
109
- serverUrl: K(n)
106
+ let { data: r } = await n.createDrive(e, t);
107
+ return T({
108
+ ...r,
109
+ serverUrl: W(r)
110
110
  });
111
111
  },
112
- async updateDrive(e, t, n) {
113
- let { data: i } = await r.updateDrive(e, t, n);
114
- return w({
112
+ async updateDrive(e, t, r) {
113
+ let { data: i } = await n.updateDrive(e, t, r);
114
+ return T({
115
115
  ...i,
116
- serverUrl: K(i)
116
+ serverUrl: W(i)
117
117
  });
118
118
  },
119
- async disableDrive(e, t, n) {
120
- await r.deleteDrive(e, t, n);
119
+ async disableDrive(e, t, r) {
120
+ await n.deleteDrive(e, t, r);
121
121
  },
122
- async deleteDrive(e, t, n) {
123
- await r.deleteDrive(e, t, {
124
- ...n,
122
+ async deleteDrive(e, t, r) {
123
+ await n.deleteDrive(e, t, {
124
+ ...r,
125
125
  headers: {
126
- ...n?.headers,
126
+ ...r?.headers,
127
127
  common: new L({ Purge: "T" })
128
128
  }
129
129
  });
130
130
  },
131
131
  async listMyDrives(e, t) {
132
- let { data: { value: n } } = await i.listMyDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, t);
133
- return n.map((e) => w({
132
+ let { data: { value: n } } = await r.listMyDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, t);
133
+ return n.map((e) => T({
134
134
  ...e,
135
- serverUrl: K(e)
135
+ serverUrl: W(e)
136
136
  }));
137
137
  },
138
138
  async listAllDrives(e, t) {
139
- let { data: { value: n } } = await a.listAllDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, t);
140
- return n.map((e) => w({
139
+ let { data: { value: n } } = await i.listAllDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, t);
140
+ return n.map((e) => T({
141
141
  ...e,
142
- serverUrl: K(e)
142
+ serverUrl: W(e)
143
143
  }));
144
144
  }
145
145
  };
146
- }, J = ({ axiosClient: e, config: t }) => {
147
- let n = u(t, t.basePath, e), r = o(t, t.basePath, e), i = a(t, t.basePath, e);
146
+ }, K = ({ axiosClient: e, config: t }) => {
147
+ let n = d(t, t.basePath, e), r = a(t, t.basePath, e), i = m(t, t.basePath, e);
148
148
  return {
149
149
  async getDriveItem(e, t, r) {
150
150
  let { data: i } = await n.getDriveItem(e, t, void 0, void 0, r);
@@ -177,140 +177,136 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
177
177
  return n?.value || [];
178
178
  }
179
179
  };
180
- }, Y = ({ axiosClient: e, config: t }) => {
181
- let r = n(t, t.basePath, e);
180
+ }, q = ({ axiosClient: e, config: t }) => {
181
+ let n = i(t, t.basePath, e);
182
182
  return {
183
183
  async listTags(e) {
184
- let { data: { value: t } } = await r.getTags(e);
184
+ let { data: { value: t } } = await n.getTags(e);
185
185
  return t || [];
186
186
  },
187
187
  async assignTags(e, t) {
188
- await r.assignTags(e, t);
188
+ await n.assignTags(e, t);
189
189
  },
190
190
  async unassignTags(e, t) {
191
- await r.unassignTags(e, t);
191
+ await n.unassignTags(e, t);
192
192
  }
193
193
  };
194
- }, X = ({ axiosClient: e, config: t }) => {
195
- let n = d(t, t.basePath, e);
194
+ }, J = ({ axiosClient: e, config: t }) => {
195
+ let n = _(t, t.basePath, e);
196
196
  return { async listActivities(e, t) {
197
197
  let { data: { value: r } } = await n.getActivities(e, t);
198
198
  return r || [];
199
199
  } };
200
- }, Z = ({ axiosClient: e, config: t }) => {
201
- let n = o(t, t.basePath, e), r = y(t, t.basePath, e), i = m(t, t.basePath, e);
200
+ }, Y = ({ axiosClient: e, config: t }) => {
201
+ let r = a(t, t.basePath, e), i = s(t, t.basePath, e), o = n(t, t.basePath, e);
202
202
  return {
203
- async getPermission(e, t, n, r, a) {
204
- let { data: o } = await i.getPermission(e, t, n, a);
205
- return o.link ? T({
206
- graphPermission: o,
203
+ async getPermission(e, t, n, r, i) {
204
+ let { data: a } = await o.getPermission(e, t, n, i);
205
+ return a.link ? E({
206
+ graphPermission: a,
207
207
  resourceId: t
208
- }) : E({
209
- graphPermission: o,
208
+ }) : D({
209
+ graphPermission: a,
210
210
  resourceId: t,
211
211
  graphRoles: r || {}
212
212
  });
213
213
  },
214
- async listPermissions(e, t, r, a, o) {
214
+ async listPermissions(e, t, n, i, a) {
215
215
  let s;
216
216
  if (e === t) {
217
- let { data: t } = await n.listPermissionsSpaceRoot(e, a?.filter, a?.select ? /* @__PURE__ */ new Set([...a.select]) : null, a?.count, a?.top || 0, o);
217
+ let { data: t } = await r.listPermissionsSpaceRoot(e, i?.filter, i?.select ? /* @__PURE__ */ new Set([...i.select]) : null, i?.count, i?.top || 0, a);
218
218
  s = t;
219
219
  } else {
220
- let { data: n } = await i.listPermissions(e, t, a?.filter, a?.select ? /* @__PURE__ */ new Set([...a.select]) : null, a?.count, a?.top || 0, o);
220
+ let { data: n } = await o.listPermissions(e, t, i?.filter, i?.select ? /* @__PURE__ */ new Set([...i.select]) : null, i?.count, i?.top || 0, a);
221
221
  s = n;
222
222
  }
223
223
  let c = s.value || [], l = s["@libre.graph.permissions.actions.allowedValues"], u = s["@libre.graph.permissions.roles.allowedValues"], d = s["@odata.count"];
224
224
  return {
225
- shares: c.map((e) => e.link ? T({
225
+ shares: c.map((e) => e.link ? E({
226
226
  graphPermission: e,
227
227
  resourceId: t
228
- }) : E({
228
+ }) : D({
229
229
  graphPermission: e,
230
230
  resourceId: t,
231
- graphRoles: r || {}
231
+ graphRoles: n || {}
232
232
  })),
233
233
  allowedActions: l,
234
234
  allowedRoles: u,
235
235
  count: d
236
236
  };
237
237
  },
238
- async updatePermission(e, t, r, a, o, s) {
238
+ async updatePermission(e, t, n, i, a, s) {
239
239
  let c;
240
240
  if (e === t) {
241
- let { data: t } = await n.updatePermissionSpaceRoot(e, r, a, s);
241
+ let { data: t } = await r.updatePermissionSpaceRoot(e, n, i, s);
242
242
  c = t;
243
243
  } else {
244
- let { data: n } = await i.updatePermission(e, t, r, a, s);
245
- c = n;
244
+ let { data: r } = await o.updatePermission(e, t, n, i, s);
245
+ c = r;
246
246
  }
247
- return c.link ? T({
247
+ return c.link ? E({
248
248
  graphPermission: c,
249
249
  resourceId: t
250
- }) : E({
250
+ }) : D({
251
251
  graphPermission: c,
252
252
  resourceId: t,
253
- graphRoles: o || {}
253
+ graphRoles: a || {}
254
254
  });
255
255
  },
256
- async deletePermission(e, t, r, a) {
257
- if (e === t) {
258
- await n.deletePermissionSpaceRoot(e, r, a);
259
- return;
260
- }
261
- await i.deletePermission(e, t, r, a);
256
+ async deletePermission(e, t, n, i) {
257
+ e === t ? await r.deletePermissionSpaceRoot(e, n, i) : await o.deletePermission(e, t, n, i);
262
258
  },
263
- async createInvite(e, t, r, a, o) {
259
+ async createInvite(e, t, n, i, a) {
264
260
  let s;
265
261
  if (e === t) {
266
- let { data: t } = await n.inviteSpaceRoot(e, r, o);
262
+ let { data: t } = await r.inviteSpaceRoot(e, n, a);
267
263
  s = t.value?.[0];
268
264
  } else {
269
- let { data: n } = await i.invite(e, t, r, o);
270
- s = n.value?.[0];
265
+ let { data: r } = await o.invite(e, t, n, a);
266
+ s = r.value?.[0];
271
267
  }
272
268
  if (!s) throw Error("no permission returned");
273
- return E({
269
+ return D({
274
270
  graphPermission: s,
275
271
  resourceId: t,
276
- graphRoles: a || {}
272
+ graphRoles: i || {}
277
273
  });
278
274
  },
279
- async createLink(e, t, r, a) {
280
- let o;
275
+ async createLink(e, t, n, i) {
276
+ let a;
281
277
  if (e === t) {
282
- let { data: t } = await n.createLinkSpaceRoot(e, r, a);
283
- o = t;
278
+ let { data: t } = await r.createLinkSpaceRoot(e, n, i);
279
+ a = t;
284
280
  } else {
285
- let { data: n } = await i.createLink(e, t, r, a);
286
- o = n;
281
+ let { data: r } = await o.createLink(e, t, n, i);
282
+ a = r;
287
283
  }
288
- return T({
289
- graphPermission: o,
284
+ return E({
285
+ graphPermission: a,
290
286
  resourceId: t
291
287
  });
292
288
  },
293
- async setPermissionPassword(e, t, r, a, o) {
289
+ async setPermissionPassword(e, t, n, i, a) {
294
290
  let s;
295
291
  if (e === t) {
296
- let { data: t } = await n.setPermissionPasswordSpaceRoot(e, r, a, o);
292
+ let { data: t } = await r.setPermissionPasswordSpaceRoot(e, n, i, a);
297
293
  s = t;
298
294
  } else {
299
- let { data: n } = await i.setPermissionPassword(e, t, r, a, o);
300
- s = n;
295
+ let { data: r } = await o.setPermissionPassword(e, t, n, i, a);
296
+ s = r;
301
297
  }
302
- return T({
298
+ return E({
303
299
  graphPermission: s,
304
300
  resourceId: t
305
301
  });
306
302
  },
307
303
  async listRoleDefinitions(e) {
308
- let { data: t } = await r.listPermissionRoleDefinitions(e);
304
+ let { data: t } = await i.listPermissionRoleDefinitions(e);
309
305
  return t;
310
306
  }
311
307
  };
312
- }, Q = ({ axiosClient: e, config: t }) => {
313
- let n = v(t, t.basePath, e), r = i(t, t.basePath, e);
308
+ }, X = ({ axiosClient: e, config: t }) => {
309
+ let n = h(t, t.basePath, e), r = u(t, t.basePath, e);
314
310
  return {
315
311
  async getOwnUserPhoto(e) {
316
312
  let { data: t } = await n.getOwnUserPhoto(e);
@@ -329,44 +325,73 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
329
325
  return n;
330
326
  }
331
327
  };
328
+ };
329
+ //#endregion
330
+ //#region src/graph/guestLinks/guestLinks.ts
331
+ function Z({ data: e, headers: t }) {
332
+ return {
333
+ ...e,
334
+ serverDateTime: t?.date
335
+ };
336
+ }
337
+ var Q = ({ axiosClient: e, config: t }) => {
338
+ let n = S(t, t.basePath, e);
339
+ return {
340
+ async verifyGuestLinkToken(e, t) {
341
+ return Z(await n.verifyGuestLinkToken({ token: e }, t));
342
+ },
343
+ async verifyGuestLinkPin({ pin: e, permissionId: t }, r) {
344
+ return Z(await n.verifyGuestLinkPin("", {
345
+ pin: e,
346
+ permissionId: t
347
+ }, r));
348
+ },
349
+ async renewGuestLink(e, t) {
350
+ await n.renewGuestLink({ permissionId: e }, t);
351
+ }
352
+ };
332
353
  }, $ = (e, t) => {
333
354
  let n = new URL(e);
334
355
  n.pathname = [...n.pathname.split("/"), "graph"].filter(Boolean).join("/");
335
- let r = new _({ basePath: n.href });
356
+ let r = new y({ basePath: n.href });
336
357
  return {
337
- activities: X({
358
+ activities: J({
359
+ axiosClient: t,
360
+ config: r
361
+ }),
362
+ applications: U({
338
363
  axiosClient: t,
339
364
  config: r
340
365
  }),
341
- applications: G({
366
+ tags: q({
342
367
  axiosClient: t,
343
368
  config: r
344
369
  }),
345
- tags: Y({
370
+ drives: G({
346
371
  axiosClient: t,
347
372
  config: r
348
373
  }),
349
- drives: q({
374
+ driveItems: K({
350
375
  axiosClient: t,
351
376
  config: r
352
377
  }),
353
- driveItems: J({
378
+ users: V({
354
379
  axiosClient: t,
355
380
  config: r
356
381
  }),
357
- users: U({
382
+ groups: H({
358
383
  axiosClient: t,
359
384
  config: r
360
385
  }),
361
- groups: W({
386
+ permissions: Y({
362
387
  axiosClient: t,
363
388
  config: r
364
389
  }),
365
- permissions: Z({
390
+ photos: X({
366
391
  axiosClient: t,
367
392
  config: r
368
393
  }),
369
- photos: Q({
394
+ guestLinks: Q({
370
395
  axiosClient: t,
371
396
  config: r
372
397
  })
@@ -1,6 +1,6 @@
1
- import { a as e, i as t, n, r } from "./axios-CiL7Z3dm.js";
1
+ import { a as e, i as t, n, r } from "./axios-DRPhbClr.js";
2
2
  import { t as i } from "./urlJoin-_pUL1TUx.js";
3
- import { c as a, i as o, l as s, n as c, o as l, r as u, t as d } from "./toString-CVetDRwx.js";
3
+ import { c as a, i as o, l as s, n as c, o as l, r as u, t as d } from "./toString-uorCN9F3.js";
4
4
  //#region src/helpers/publicLink/functions.ts
5
5
  function f(e, t = "") {
6
6
  return `/public-files/${e}/${t}`.split("/").filter(Boolean).join("/");
@@ -139,9 +139,7 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
139
139
  n = s + 1;
140
140
  break;
141
141
  }
142
- continue;
143
- }
144
- r === -1 && (a = !1, r = s + 1), c === 46 ? t === -1 ? t = s : o !== 1 && (o = 1) : t !== -1 && (o = -1);
142
+ } else r === -1 && (a = !1, r = s + 1), c === 46 ? t === -1 ? t = s : o !== 1 && (o = 1) : t !== -1 && (o = -1);
145
143
  }
146
144
  return t === -1 || r === -1 || o === 0 || o === 1 && t === r - 1 && t === n + 1 ? "" : e.slice(t, r);
147
145
  },
@@ -161,16 +159,12 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
161
159
  if (e.length === 0) return t;
162
160
  var n = e.charCodeAt(0), r = n === 47, a;
163
161
  r ? (t.root = "/", a = 1) : a = 0;
164
- for (var o = -1, s = 0, c = -1, l = !0, u = e.length - 1, d = 0; u >= a; --u) {
165
- if (n = e.charCodeAt(u), n === 47) {
166
- if (!l) {
167
- s = u + 1;
168
- break;
169
- }
170
- continue;
162
+ for (var o = -1, s = 0, c = -1, l = !0, u = e.length - 1, d = 0; u >= a; --u) if (n = e.charCodeAt(u), n === 47) {
163
+ if (!l) {
164
+ s = u + 1;
165
+ break;
171
166
  }
172
- c === -1 && (l = !1, c = u + 1), n === 46 ? o === -1 ? o = u : d !== 1 && (d = 1) : o !== -1 && (d = -1);
173
- }
167
+ } else c === -1 && (l = !1, c = u + 1), n === 46 ? o === -1 ? o = u : d !== 1 && (d = 1) : o !== -1 && (d = -1);
174
168
  return o === -1 || c === -1 || d === 0 || d === 1 && o === c - 1 && o === s + 1 ? c !== -1 && (t.base = t.name = s === 0 && r ? e.slice(1, c) : e.slice(s, c)) : (s === 0 && r ? (t.name = e.slice(1, o), t.base = e.slice(1, c)) : (t.name = e.slice(s, o), t.base = e.slice(s, c)), t.ext = e.slice(o, c)), s > 0 ? t.dir = e.slice(0, s - 1) : r && (t.dir = "/"), t;
175
169
  },
176
170
  sep: "/",
@@ -229,6 +223,10 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
229
223
  value: "motion-photo",
230
224
  type: null
231
225
  },
226
+ LivePhoto: {
227
+ value: "live-photo",
228
+ type: null
229
+ },
232
230
  ETag: v("getetag"),
233
231
  MimeType: v("getcontenttype"),
234
232
  ResourceType: ((e) => _(e))("resourcetype"),
@@ -292,6 +290,7 @@ var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
292
290
  b.Image,
293
291
  b.Photo,
294
292
  b.MotionPhoto,
293
+ b.LivePhoto,
295
294
  b.HasPreview
296
295
  ];
297
296
  static PublicLink = e.Default.concat([
@@ -945,6 +944,7 @@ function nn(e, t = []) {
945
944
  image: U(e.props[b.Image]),
946
945
  photo: U(e.props[b.Photo]),
947
946
  motionPhoto: U(e.props[b.MotionPhoto]),
947
+ livePhoto: U(e.props[b.LivePhoto]),
948
948
  extraProps: f,
949
949
  hasPreview: () => e.props[b.HasPreview] === 1,
950
950
  canUpload: function() {
@@ -1118,12 +1118,21 @@ function fn(e, t) {
1118
1118
  function pn(e) {
1119
1119
  return e.permissions.includes(W.deletePermissions);
1120
1120
  }
1121
- var mn = (e, t) => e.root.permissions?.filter((e) => {
1122
- let n = [];
1123
- e["@libre.graph.permissions.actions"] && (n = e["@libre.graph.permissions.actions"]);
1124
- let r = t[e.roles?.[0]];
1125
- return r && !n.length && (n = r.rolePermissions.find(({ condition: e }) => e === "exists @Resource.Root")?.allowedResourceActions || []), n.includes(W.deletePermissions);
1126
- });
1121
+ var mn = (e, t) => {
1122
+ let n = e.root.permissions?.filter((e) => {
1123
+ let n = [];
1124
+ e["@libre.graph.permissions.actions"] && (n = e["@libre.graph.permissions.actions"]);
1125
+ let r = t[e.roles?.[0]];
1126
+ return r && !n.length && (n = r.rolePermissions.find(({ condition: e }) => e === "exists @Resource.Root")?.allowedResourceActions || []), n.includes(W.deletePermissions);
1127
+ });
1128
+ function r({ grantedToV2: e }) {
1129
+ return e?.user?.displayName || e?.group?.displayName || "";
1130
+ }
1131
+ return n?.sort((e, t) => r(e).localeCompare(r(t), void 0, {
1132
+ sensitivity: "base",
1133
+ numeric: !0
1134
+ }) || (e.id || "").localeCompare(t.id || ""));
1135
+ };
1127
1136
  function hn(e) {
1128
1137
  let t = e.publicLinkPassword, n = e.props?.[b.FileId], r = e.props?.[b.PublicLinkItemType], i = e.props?.[b.PublicLinkPermission], a = e.props?.[b.PublicLinkExpiration], o = e.props?.[b.PublicLinkShareDate], s = e.props?.[b.PublicLinkShareOwner], c = e.publicLinkType, l, u;
1129
1138
  return c === "ocm" ? (l = `ocm/${e.id}`, u = p(e.id)) : (l = `public/${e.id}`, u = f(e.id)), Object.assign(Z({
@@ -1197,7 +1206,7 @@ function Z(e) {
1197
1206
  return !0;
1198
1207
  },
1199
1208
  canBeDeleted: function({ ability: e } = {}) {
1200
- return this.disabled ? e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions) : !1;
1209
+ return this.disabled ? !!e?.can("delete-all", "Drive") : !1;
1201
1210
  },
1202
1211
  canRename: function({ ability: e } = {}) {
1203
1212
  return e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions);
@@ -1205,8 +1214,8 @@ function Z(e) {
1205
1214
  canEditDescription: function({ ability: e } = {}) {
1206
1215
  return this.isInVault ? !1 : e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions);
1207
1216
  },
1208
- canRestore: function({ ability: e } = {}) {
1209
- return this.disabled ? e?.can("update-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions) : !1;
1217
+ canRestore: function() {
1218
+ return !!this.disabled;
1210
1219
  },
1211
1220
  canDisable: function({ ability: e } = {}) {
1212
1221
  return this.disabled ? !1 : e?.can("delete-all", "Drive") ? !0 : this.graphPermissions?.includes(W.deletePermissions);
@@ -1259,7 +1268,7 @@ function Z(e) {
1259
1268
  return i(c, e);
1260
1269
  },
1261
1270
  isOwner(e) {
1262
- return e?.id === this.owner?.id;
1271
+ return !!e?.id && e.id === this.owner?.id;
1263
1272
  }
1264
1273
  };
1265
1274
  return Object.defineProperty(l, "nodeId", { get() {
@@ -1281,10 +1290,10 @@ function _n(e) {
1281
1290
  }
1282
1291
  //#endregion
1283
1292
  //#region src/helpers/share/functions.ts
1284
- var Q = (e) => Object.hasOwn(e, "sharedWith"), vn = (e) => Q(e) && e.outgoing, yn = (e) => Q(e) && !e.outgoing, bn = (e) => Object.hasOwn(e, "role"), xn = (e) => !Object.hasOwn(e, "role"), Sn = ({ driveItem: e, graphRoles: t }) => e.remoteItem?.permissions.reduce((e, n) => (n.roles?.forEach((n) => {
1293
+ var Q = (e) => Object.hasOwn(e, "sharedWith"), vn = (e) => Q(e) && e.outgoing, yn = (e) => Q(e) && !e.outgoing, bn = (e) => Object.hasOwn(e, "role"), xn = (e) => !Object.hasOwn(e, "role"), Sn = ({ driveItem: e, graphRoles: t }) => (e.remoteItem?.permissions.reduce((e, n) => (n.roles?.forEach((n) => {
1285
1294
  let r = t[n];
1286
1295
  r && !e.some(({ id: e }) => e === r.id) && e.push(r);
1287
- }), e), []), Cn = ({ driveItem: e, shareRoles: t }) => {
1296
+ }), e), []))?.sort((e, t) => (t["@libre.graph.weight"] || 0) - (e["@libre.graph.weight"] || 0)), Cn = ({ driveItem: e, shareRoles: t }) => {
1288
1297
  if (!t.length) {
1289
1298
  let t = e.remoteItem?.permissions.reduce((e, t) => {
1290
1299
  let n = t["@libre.graph.permissions.actions"];
@@ -1345,7 +1354,7 @@ function wn({ driveItem: e, graphRoles: t, serverUrl: n }) {
1345
1354
  hasPreview: () => !!e.thumbnails,
1346
1355
  canRename: () => e["@client.synchronize"],
1347
1356
  canDownload: () => u.includes(W.readContent),
1348
- canUpload: () => u.includes(W.createUpload),
1357
+ canUpload: () => !!e.folder && u.includes(W.createUpload),
1349
1358
  canCreate: () => u.includes(W.createChildren),
1350
1359
  canBeDeleted: () => u.includes(W.deleteStandard),
1351
1360
  canEditTags: () => u.includes(W.createUpload),
@@ -1359,10 +1368,10 @@ function wn({ driveItem: e, graphRoles: t, serverUrl: n }) {
1359
1368
  return d.extension = H(d), d;
1360
1369
  }
1361
1370
  function Tn({ driveItem: e, user: t, serverUrl: n }) {
1362
- let r = B(e.id), a = i(e.parentReference.path, e.name), o = {
1371
+ let r = B(e.id), a = !!e.root, o = a || !!e.folder, s = a ? "/" : i(e.parentReference.path, e.name), c = {
1363
1372
  id: e.id,
1364
1373
  driveId: e.parentReference?.driveId,
1365
- path: a,
1374
+ path: s,
1366
1375
  name: e.name,
1367
1376
  fileId: e.id,
1368
1377
  size: e.size,
@@ -1370,7 +1379,7 @@ function Tn({ driveItem: e, user: t, serverUrl: n }) {
1370
1379
  parentFolderId: e.parentReference?.id,
1371
1380
  sdate: e.permissions[0].createdDateTime,
1372
1381
  tags: [],
1373
- webDavPath: Y(r, a),
1382
+ webDavPath: Y(r, s),
1374
1383
  sharedBy: [{
1375
1384
  id: t.id,
1376
1385
  displayName: t.displayName
@@ -1392,26 +1401,26 @@ function Tn({ driveItem: e, user: t, serverUrl: n }) {
1392
1401
  };
1393
1402
  }),
1394
1403
  shareTypes: e.permissions.map($),
1395
- isFolder: !!e.folder,
1396
- type: e.folder ? "folder" : "file",
1404
+ isFolder: o,
1405
+ type: o ? "folder" : "file",
1397
1406
  mimeType: e.file?.mimeType || "httpd/unix-directory",
1398
1407
  outgoing: !0,
1399
1408
  privateLink: i(n, "f", e.id),
1400
1409
  hasPreview: () => !!e.thumbnails,
1401
- canRename: () => !0,
1410
+ canRename: () => !a,
1402
1411
  canDownload: () => !0,
1403
1412
  canUpload: () => !0,
1404
1413
  canCreate: () => !0,
1405
- canBeDeleted: () => !0,
1414
+ canBeDeleted: () => !a,
1406
1415
  canEditTags: () => !0,
1407
- canListVersions: () => !e.folder,
1416
+ canListVersions: () => !o,
1408
1417
  isMounted: () => !1,
1409
1418
  isShareRoot: () => !1,
1410
1419
  isReceivedShare: () => !0,
1411
1420
  canShare: () => !0,
1412
1421
  getDomSelector: () => z(e.id)
1413
1422
  };
1414
- return o.extension = H(o), o;
1423
+ return c.extension = H(c), c;
1415
1424
  }
1416
1425
  function En({ graphPermission: e, graphRoles: t, resourceId: n, indirect: r = !1 }) {
1417
1426
  let i = t[e.roles?.[0]], a = e.invitation?.invitedBy?.user;