@opencloud-eu/web-client 8.0.0 → 8.1.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,58 +1,58 @@
1
- import { t as e } from "./axios-ULsDSF3p.js";
2
- import { Ht as t, Ln as n, M as r, Nn as i, O as a, Qt as o, Rt as s, S as c, Tn as l, _n as u, b as d, c as f, cn as p, fn as m, g as h, i as g, in as _, kn as v, mt as y, t as b, ut as x, xn as S } from "./generated-CkfYRFme.js";
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
3
  import { t as C } from "./urlJoin-_pUL1TUx.js";
4
- import { m as w, r as T, t as E } from "./helpers-C_9em2wB.js";
4
+ import { m as w, r as T, t as E } from "./helpers-CrYtf7Ol.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
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 r = S(t, t.basePath, e), a = n(t, t.basePath, e), o = p(t, t.basePath, e), c = s(t, t.basePath, e), u = l(t, t.basePath, e), d = i(t, t.basePath, e);
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);
8
8
  return {
9
- async getUser(e, t, n) {
10
- let { data: i } = await r.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, 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([
11
11
  "drive",
12
12
  "memberOf",
13
13
  "appRoleAssignments"
14
- ]), n);
14
+ ]), r);
15
15
  return i;
16
16
  },
17
17
  async createUser(e, t) {
18
- let { data: n } = await a.createUser(e, t);
18
+ let { data: n } = await i.createUser(e, t);
19
19
  return n;
20
20
  },
21
- async editUser(e, t, n) {
22
- let { data: i } = await r.updateUser(e, t, n);
21
+ async editUser(e, t, r) {
22
+ let { data: i } = await n.updateUser(e, t, r);
23
23
  return i;
24
24
  },
25
- async deleteUser(e, t, n) {
26
- await r.deleteUser(e, t, n);
25
+ async deleteUser(e, t, r) {
26
+ await n.deleteUser(e, t, r);
27
27
  },
28
28
  async listUsers(e, 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);
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);
30
30
  return n;
31
31
  },
32
32
  async getMe(e, t) {
33
- let { data: n } = await o.getOwnUser(e?.expand ? /* @__PURE__ */ new Set([...e.expand]) : /* @__PURE__ */ new Set(["memberOf"]), t);
33
+ let { data: n } = await a.getOwnUser(e?.expand ? /* @__PURE__ */ new Set([...e.expand]) : /* @__PURE__ */ new Set(["memberOf"]), t);
34
34
  return n;
35
35
  },
36
36
  async editMe(e, t) {
37
- let { data: n } = await o.updateOwnUser(e, t);
37
+ let { data: n } = await a.updateOwnUser(e, t);
38
38
  return n;
39
39
  },
40
40
  async changeOwnPassword(e, t) {
41
- await c.changeOwnPassword(e, t);
41
+ await o.changeOwnPassword(e, t);
42
42
  },
43
- async exportPersonalData(e, t, n) {
44
- await r.exportPersonalData(e, t, n);
43
+ async exportPersonalData(e, t, r) {
44
+ await n.exportPersonalData(e, t, r);
45
45
  },
46
46
  async createUserAppRoleAssignment(e, t, n) {
47
- let { data: r } = await u.userCreateAppRoleAssignments(e, t, n);
47
+ let { data: r } = await l.userCreateAppRoleAssignments(e, t, n);
48
48
  return r;
49
49
  },
50
50
  async sendActivityNotification(e, t, n) {
51
- await d.sendActivityNotification(e, t, n);
51
+ await u.sendActivityNotification(e, t, n);
52
52
  }
53
53
  };
54
54
  }, W = ({ axiosClient: e, config: t }) => {
55
- let n = x(t, t.basePath, e), r = y(t, t.basePath, e);
55
+ let n = g(t, t.basePath, e), r = b(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);
@@ -81,7 +81,7 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
81
81
  }
82
82
  };
83
83
  }, G = ({ axiosClient: e, config: t }) => {
84
- let n = f(t, t.basePath, e);
84
+ let n = l(t, t.basePath, e);
85
85
  return {
86
86
  async getApplication(e, t) {
87
87
  let { data: r } = await n.getApplication(e, t);
@@ -92,132 +92,132 @@ 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: t }) => {
96
- let n = d(t, t.basePath, e), r = new o(t, t.basePath, e), i = new c(t, t.basePath, e);
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);
97
97
  return {
98
- async getDrive(e, t, r) {
99
- let { data: i } = await n.getDrive(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, r);
98
+ async getDrive(e, t, n) {
99
+ let { data: i } = await r.getDrive(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, n);
100
100
  return w({
101
101
  ...i,
102
102
  serverUrl: K(i)
103
103
  });
104
104
  },
105
105
  async createDrive(e, t) {
106
- let { data: r } = await n.createDrive(e, t);
106
+ let { data: n } = await r.createDrive(e, t);
107
107
  return w({
108
- ...r,
109
- serverUrl: K(r)
108
+ ...n,
109
+ serverUrl: K(n)
110
110
  });
111
111
  },
112
- async updateDrive(e, t, r) {
113
- let { data: i } = await n.updateDrive(e, t, r);
112
+ async updateDrive(e, t, n) {
113
+ let { data: i } = await r.updateDrive(e, t, n);
114
114
  return w({
115
115
  ...i,
116
116
  serverUrl: K(i)
117
117
  });
118
118
  },
119
- async disableDrive(e, t, r) {
120
- await n.deleteDrive(e, t, r);
119
+ async disableDrive(e, t, n) {
120
+ await r.deleteDrive(e, t, n);
121
121
  },
122
- async deleteDrive(e, t, r) {
123
- await n.deleteDrive(e, t, {
124
- ...r,
122
+ async deleteDrive(e, t, n) {
123
+ await r.deleteDrive(e, t, {
124
+ ...n,
125
125
  headers: {
126
- ...r?.headers,
126
+ ...n?.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 r.listMyDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, 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
133
  return n.map((e) => w({
134
134
  ...e,
135
135
  serverUrl: K(e)
136
136
  }));
137
137
  },
138
138
  async listAllDrives(e, t) {
139
- let { data: { value: n } } = await i.listAllDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, 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
140
  return n.map((e) => w({
141
141
  ...e,
142
142
  serverUrl: K(e)
143
143
  }));
144
144
  }
145
145
  };
146
- }, J = ({ axiosClient: e, config: n }) => {
147
- let i = h(n, n.basePath, e), a = r(n, n.basePath, e), o = t(n, n.basePath, e);
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);
148
148
  return {
149
- async getDriveItem(e, t, n) {
150
- let { data: r } = await i.getDriveItem(e, t, void 0, n);
151
- return r;
149
+ async getDriveItem(e, t, r) {
150
+ let { data: i } = await n.getDriveItem(e, t, void 0, void 0, r);
151
+ return i;
152
152
  },
153
153
  async createDriveItem(e, t, n) {
154
- let { data: r } = await a.createDriveItem(e, null, null, t, n);
155
- return r;
154
+ let { data: i } = await r.createDriveItem(e, null, null, t, n);
155
+ return i;
156
156
  },
157
- async updateDriveItem(e, t, n, r) {
158
- let { data: a } = await i.updateDriveItem(e, t, n, r);
157
+ async updateDriveItem(e, t, r, i) {
158
+ let { data: a } = await n.updateDriveItem(e, t, r, i);
159
159
  return a;
160
160
  },
161
- async deleteDriveItem(e, t, n) {
162
- await i.deleteDriveItem(e, t, n);
161
+ async deleteDriveItem(e, t, r) {
162
+ await n.deleteDriveItem(e, t, r);
163
163
  },
164
164
  async followDriveItem(e, t) {
165
- let { data: n } = await o.followDriveItem(e, t);
165
+ let { data: n } = await i.followDriveItem(e, t);
166
166
  return n;
167
167
  },
168
168
  async unfollowDriveItem(e, t) {
169
- await o.unfollowDriveItem(e, t);
169
+ await i.unfollowDriveItem(e, t);
170
170
  },
171
171
  async listSharedByMe(e, t) {
172
- let { data: n } = await o.listSharedByMe(e?.expand, t);
172
+ let { data: n } = await i.listSharedByMe(e?.expand, t);
173
173
  return n?.value || [];
174
174
  },
175
175
  async listSharedWithMe(e, t) {
176
- let { data: n } = await o.listSharedWithMe(e?.expand, t);
176
+ let { data: n } = await i.listSharedWithMe(e?.expand, t);
177
177
  return n?.value || [];
178
178
  }
179
179
  };
180
180
  }, Y = ({ axiosClient: e, config: t }) => {
181
- let n = u(t, t.basePath, e);
181
+ let r = n(t, t.basePath, e);
182
182
  return {
183
183
  async listTags(e) {
184
- let { data: { value: t } } = await n.getTags(e);
184
+ let { data: { value: t } } = await r.getTags(e);
185
185
  return t || [];
186
186
  },
187
187
  async assignTags(e, t) {
188
- await n.assignTags(e, t);
188
+ await r.assignTags(e, t);
189
189
  },
190
190
  async unassignTags(e, t) {
191
- await n.unassignTags(e, t);
191
+ await r.unassignTags(e, t);
192
192
  }
193
193
  };
194
194
  }, X = ({ axiosClient: e, config: t }) => {
195
- let n = g(t, t.basePath, e);
195
+ let n = d(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
200
  }, Z = ({ axiosClient: e, config: t }) => {
201
- let n = r(t, t.basePath, e), i = m(t, t.basePath, e), o = a(t, t.basePath, e);
201
+ let n = o(t, t.basePath, e), r = y(t, t.basePath, e), i = m(t, t.basePath, e);
202
202
  return {
203
- async getPermission(e, t, n, r, i) {
204
- let { data: a } = await o.getPermission(e, t, n, i);
205
- return a.link ? T({
206
- graphPermission: a,
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,
207
207
  resourceId: t
208
208
  }) : E({
209
- graphPermission: a,
209
+ graphPermission: o,
210
210
  resourceId: t,
211
211
  graphRoles: r || {}
212
212
  });
213
213
  },
214
- async listPermissions(e, t, r, i, a) {
214
+ async listPermissions(e, t, r, a, o) {
215
215
  let s;
216
216
  if (e === t) {
217
- let { data: t } = await n.listPermissionsSpaceRoot(e, i?.filter, i?.select ? /* @__PURE__ */ new Set([...i.select]) : null, i?.count, i?.top || 0, a);
217
+ let { data: t } = await n.listPermissionsSpaceRoot(e, a?.filter, a?.select ? /* @__PURE__ */ new Set([...a.select]) : null, a?.count, a?.top || 0, o);
218
218
  s = t;
219
219
  } else {
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);
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);
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"];
@@ -235,13 +235,13 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
235
235
  count: d
236
236
  };
237
237
  },
238
- async updatePermission(e, t, r, i, a, s) {
238
+ async updatePermission(e, t, r, a, o, s) {
239
239
  let c;
240
240
  if (e === t) {
241
- let { data: t } = await n.updatePermissionSpaceRoot(e, r, i, s);
241
+ let { data: t } = await n.updatePermissionSpaceRoot(e, r, a, s);
242
242
  c = t;
243
243
  } else {
244
- let { data: n } = await o.updatePermission(e, t, r, i, s);
244
+ let { data: n } = await i.updatePermission(e, t, r, a, s);
245
245
  c = n;
246
246
  }
247
247
  return c.link ? T({
@@ -250,53 +250,53 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
250
250
  }) : E({
251
251
  graphPermission: c,
252
252
  resourceId: t,
253
- graphRoles: a || {}
253
+ graphRoles: o || {}
254
254
  });
255
255
  },
256
- async deletePermission(e, t, r, i) {
256
+ async deletePermission(e, t, r, a) {
257
257
  if (e === t) {
258
- await n.deletePermissionSpaceRoot(e, r, i);
258
+ await n.deletePermissionSpaceRoot(e, r, a);
259
259
  return;
260
260
  }
261
- await o.deletePermission(e, t, r, i);
261
+ await i.deletePermission(e, t, r, a);
262
262
  },
263
- async createInvite(e, t, r, i, a) {
263
+ async createInvite(e, t, r, a, o) {
264
264
  let s;
265
265
  if (e === t) {
266
- let { data: t } = await n.inviteSpaceRoot(e, r, a);
266
+ let { data: t } = await n.inviteSpaceRoot(e, r, o);
267
267
  s = t.value?.[0];
268
268
  } else {
269
- let { data: n } = await o.invite(e, t, r, a);
269
+ let { data: n } = await i.invite(e, t, r, o);
270
270
  s = n.value?.[0];
271
271
  }
272
272
  if (!s) throw Error("no permission returned");
273
273
  return E({
274
274
  graphPermission: s,
275
275
  resourceId: t,
276
- graphRoles: i || {}
276
+ graphRoles: a || {}
277
277
  });
278
278
  },
279
- async createLink(e, t, r, i) {
280
- let a;
279
+ async createLink(e, t, r, a) {
280
+ let o;
281
281
  if (e === t) {
282
- let { data: t } = await n.createLinkSpaceRoot(e, r, i);
283
- a = t;
282
+ let { data: t } = await n.createLinkSpaceRoot(e, r, a);
283
+ o = t;
284
284
  } else {
285
- let { data: n } = await o.createLink(e, t, r, i);
286
- a = n;
285
+ let { data: n } = await i.createLink(e, t, r, a);
286
+ o = n;
287
287
  }
288
288
  return T({
289
- graphPermission: a,
289
+ graphPermission: o,
290
290
  resourceId: t
291
291
  });
292
292
  },
293
- async setPermissionPassword(e, t, r, i, a) {
293
+ async setPermissionPassword(e, t, r, a, o) {
294
294
  let s;
295
295
  if (e === t) {
296
- let { data: t } = await n.setPermissionPasswordSpaceRoot(e, r, i, a);
296
+ let { data: t } = await n.setPermissionPasswordSpaceRoot(e, r, a, o);
297
297
  s = t;
298
298
  } else {
299
- let { data: n } = await o.setPermissionPassword(e, t, r, i, a);
299
+ let { data: n } = await i.setPermissionPassword(e, t, r, a, o);
300
300
  s = n;
301
301
  }
302
302
  return T({
@@ -305,12 +305,12 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
305
305
  });
306
306
  },
307
307
  async listRoleDefinitions(e) {
308
- let { data: t } = await i.listPermissionRoleDefinitions(e);
308
+ let { data: t } = await r.listPermissionRoleDefinitions(e);
309
309
  return t;
310
310
  }
311
311
  };
312
312
  }, Q = ({ axiosClient: e, config: t }) => {
313
- let n = _(t, t.basePath, e), r = v(t, t.basePath, e);
313
+ let n = v(t, t.basePath, e), r = i(t, t.basePath, e);
314
314
  return {
315
315
  async getOwnUserPhoto(e) {
316
316
  let { data: t } = await n.getOwnUserPhoto(e);
@@ -332,7 +332,7 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
332
332
  }, $ = (e, t) => {
333
333
  let n = new URL(e);
334
334
  n.pathname = [...n.pathname.split("/"), "graph"].filter(Boolean).join("/");
335
- let r = new b({ basePath: n.href });
335
+ let r = new _({ basePath: n.href });
336
336
  return {
337
337
  activities: X({
338
338
  axiosClient: t,
@@ -1,6 +1,6 @@
1
- import { a as e, i as t, n, r } from "./axios-ULsDSF3p.js";
1
+ import { a as e, i as t, n, r } from "./axios-CiL7Z3dm.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-DfgrQ1mh.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";
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("/");
@@ -1453,7 +1453,7 @@ function Dn({ graphPermission: e, resourceId: t, indirect: n = !1 }) {
1453
1453
  };
1454
1454
  }
1455
1455
  function $({ link: e, grantedToV2: t }) {
1456
- return e ? q.link.value : t?.group ? q.group.value : t?.user?.["@libre.graph.userType"] === "Federated" ? q.remote.value : q.user.value;
1456
+ return e ? q.link.value : t?.group ? q.group.value : t?.user?.["@libre.graph.userType"] === "Guest" ? q.guest.value : t?.user?.["@libre.graph.userType"] === "Federated" ? q.remote.value : q.user.value;
1457
1457
  }
1458
1458
  //#endregion
1459
1459
  export { q as A, Zt as B, un as C, ln as D, dn as E, H as F, h as G, Xt as H, $t as I, p as J, re as K, V as L, rn as M, nn as N, sn as O, z as P, en as R, an as S, cn as T, g as U, tn as V, ne as W, f as Y, X as _, Cn as a, pn as b, yn as c, Q as d, hn as f, Y as g, _n as h, Tn as i, W as j, K as k, xn as l, Z as m, wn as n, Sn as o, gn as p, b as q, Dn as r, bn as s, En as t, vn as u, fn as v, J as w, on as x, mn as y, B as z };