@opencloud-eu/web-client 7.2.0 → 7.4.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,54 +1,57 @@
1
- import { $t as e, Nt as t, O as n, Ut as r, Yt as i, bn as a, c as o, cn as s, f as c, fn as l, g as u, gn as d, i as f, kt as p, rn as m, rt as h, st as g, t as _, v, w as y, wn as b } from "./generated-CDEuOcXT.js";
2
- import { t as x } from "./urlJoin-_pUL1TUx.js";
3
- import { m as S, r as C, t as w } from "./helpers-BMMUdKkY.js";
1
+ import { Ht as e, Ln as t, M as n, Nn as r, O as i, Qt as a, Rt as o, S as s, Tn as c, _n as l, b as u, c as d, cn as f, fn as p, g as m, i as h, in as g, kn as _, mt as v, t as y, ut as b, xn as x } from "./generated-CSkivkhn.js";
2
+ import { t as S } from "./urlJoin-_pUL1TUx.js";
3
+ import { m as C, r as w, t as T } from "./helpers-hr58GB0t.js";
4
4
  //#region src/graph/users/users.ts
5
- var T = ({ axiosClient: t, config: n }) => {
6
- let r = l(n, n.basePath, t), i = b(n, n.basePath, t), a = e(n, n.basePath, t), o = p(n, n.basePath, t), s = d(n, n.basePath, t);
5
+ var E = ({ axiosClient: e, config: n }) => {
6
+ let i = x(n, n.basePath, e), a = t(n, n.basePath, e), s = f(n, n.basePath, e), l = o(n, n.basePath, e), u = c(n, n.basePath, e), d = r(n, n.basePath, e);
7
7
  return {
8
8
  async getUser(e, t, n) {
9
- 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
+ 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([
10
10
  "drive",
11
11
  "memberOf",
12
12
  "appRoleAssignments"
13
13
  ]), n);
14
- return i;
14
+ return r;
15
15
  },
16
16
  async createUser(e, t) {
17
- let { data: n } = await i.createUser(e, t);
17
+ let { data: n } = await a.createUser(e, t);
18
18
  return n;
19
19
  },
20
20
  async editUser(e, t, n) {
21
- let { data: i } = await r.updateUser(e, t, n);
22
- return i;
21
+ let { data: r } = await i.updateUser(e, t, n);
22
+ return r;
23
23
  },
24
24
  async deleteUser(e, t, n) {
25
- await r.deleteUser(e, t, n);
25
+ await i.deleteUser(e, t, n);
26
26
  },
27
27
  async listUsers(e, t) {
28
- 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);
28
+ 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
29
  return n;
30
30
  },
31
31
  async getMe(e, t) {
32
- let { data: n } = await a.getOwnUser(e?.expand ? /* @__PURE__ */ new Set([...e.expand]) : /* @__PURE__ */ new Set(["memberOf"]), t);
32
+ let { data: n } = await s.getOwnUser(e?.expand ? /* @__PURE__ */ new Set([...e.expand]) : /* @__PURE__ */ new Set(["memberOf"]), t);
33
33
  return n;
34
34
  },
35
35
  async editMe(e, t) {
36
- let { data: n } = await a.updateOwnUser(e, t);
36
+ let { data: n } = await s.updateOwnUser(e, t);
37
37
  return n;
38
38
  },
39
39
  async changeOwnPassword(e, t) {
40
- await o.changeOwnPassword(e, t);
40
+ await l.changeOwnPassword(e, t);
41
41
  },
42
42
  async exportPersonalData(e, t, n) {
43
- await r.exportPersonalData(e, t, n);
43
+ await i.exportPersonalData(e, t, n);
44
44
  },
45
45
  async createUserAppRoleAssignment(e, t, n) {
46
- let { data: r } = await s.userCreateAppRoleAssignments(e, t, n);
46
+ let { data: r } = await u.userCreateAppRoleAssignments(e, t, n);
47
47
  return r;
48
+ },
49
+ async sendActivityNotification(e, t, n) {
50
+ await d.sendActivityNotification(e, t, n);
48
51
  }
49
52
  };
50
- }, E = ({ axiosClient: e, config: t }) => {
51
- let n = h(t, t.basePath, e), r = g(t, t.basePath, e);
53
+ }, D = ({ axiosClient: e, config: t }) => {
54
+ let n = b(t, t.basePath, e), r = v(t, t.basePath, e);
52
55
  return {
53
56
  async getGroup(e, t, r) {
54
57
  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);
@@ -70,14 +73,14 @@ var T = ({ axiosClient: t, config: n }) => {
70
73
  return n;
71
74
  },
72
75
  async addMember(e, r, i) {
73
- await n.addMember(e, { "@odata.id": x(t.basePath, "v1.0", "users", r) }, i);
76
+ await n.addMember(e, { "@odata.id": S(t.basePath, "v1.0", "users", r) }, i);
74
77
  },
75
78
  async deleteMember(e, t, r, i) {
76
79
  await n.deleteMember(e, t, r, i);
77
80
  }
78
81
  };
79
- }, D = ({ axiosClient: e, config: t }) => {
80
- let n = o(t, t.basePath, e);
82
+ }, O = ({ axiosClient: e, config: t }) => {
83
+ let n = d(t, t.basePath, e);
81
84
  return {
82
85
  async getApplication(e, t) {
83
86
  let { data: r } = await n.getApplication(e, t);
@@ -88,28 +91,28 @@ var T = ({ axiosClient: t, config: n }) => {
88
91
  return t || [];
89
92
  }
90
93
  };
91
- }, O = (e) => new URL(e.webUrl).origin, k = ({ axiosClient: e, config: t }) => {
92
- let n = u(t, t.basePath, e), i = new r(t, t.basePath, e), a = new v(t, t.basePath, e);
94
+ }, k = (e) => new URL(e.webUrl).origin, A = ({ axiosClient: e, config: t }) => {
95
+ let n = u(t, t.basePath, e), r = new a(t, t.basePath, e), i = new s(t, t.basePath, e);
93
96
  return {
94
97
  async getDrive(e, t, r) {
95
98
  let { data: i } = await n.getDrive(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, r);
96
- return S({
99
+ return C({
97
100
  ...i,
98
- serverUrl: O(i)
101
+ serverUrl: k(i)
99
102
  });
100
103
  },
101
104
  async createDrive(e, t) {
102
105
  let { data: r } = await n.createDrive(e, t);
103
- return S({
106
+ return C({
104
107
  ...r,
105
- serverUrl: O(r)
108
+ serverUrl: k(r)
106
109
  });
107
110
  },
108
111
  async updateDrive(e, t, r) {
109
112
  let { data: i } = await n.updateDrive(e, t, r);
110
- return S({
113
+ return C({
111
114
  ...i,
112
- serverUrl: O(i)
115
+ serverUrl: k(i)
113
116
  });
114
117
  },
115
118
  async disableDrive(e, t, r) {
@@ -125,29 +128,29 @@ var T = ({ axiosClient: t, config: n }) => {
125
128
  });
126
129
  },
127
130
  async listMyDrives(e, t) {
128
- let { data: { value: n } } = await i.listMyDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, t);
129
- return n.map((e) => S({
131
+ let { data: { value: n } } = await r.listMyDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, t);
132
+ return n.map((e) => C({
130
133
  ...e,
131
- serverUrl: O(e)
134
+ serverUrl: k(e)
132
135
  }));
133
136
  },
134
137
  async listAllDrives(e, t) {
135
- let { data: { value: n } } = await a.listAllDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, t);
136
- return n.map((e) => S({
138
+ let { data: { value: n } } = await i.listAllDrivesBeta(e?.orderBy, e?.filter, e?.expand, e?.select ? /* @__PURE__ */ new Set([...e.select]) : null, t);
139
+ return n.map((e) => C({
137
140
  ...e,
138
- serverUrl: O(e)
141
+ serverUrl: k(e)
139
142
  }));
140
143
  }
141
144
  };
142
- }, A = ({ axiosClient: e, config: r }) => {
143
- let i = c(r, r.basePath, e), a = n(r, r.basePath, e), o = t(r, r.basePath, e);
145
+ }, j = ({ axiosClient: t, config: r }) => {
146
+ let i = m(r, r.basePath, t), a = n(r, r.basePath, t), o = e(r, r.basePath, t);
144
147
  return {
145
148
  async getDriveItem(e, t, n) {
146
149
  let { data: r } = await i.getDriveItem(e, t, void 0, n);
147
150
  return r;
148
151
  },
149
152
  async createDriveItem(e, t, n) {
150
- let { data: r } = await a.createDriveItem(e, t, n);
153
+ let { data: r } = await a.createDriveItem(e, null, null, t, n);
151
154
  return r;
152
155
  },
153
156
  async updateDriveItem(e, t, n, r) {
@@ -173,8 +176,8 @@ var T = ({ axiosClient: t, config: n }) => {
173
176
  return n?.value || [];
174
177
  }
175
178
  };
176
- }, j = ({ axiosClient: e, config: t }) => {
177
- let n = s(t, t.basePath, e);
179
+ }, M = ({ axiosClient: e, config: t }) => {
180
+ let n = l(t, t.basePath, e);
178
181
  return {
179
182
  async listTags(e) {
180
183
  let { data: { value: t } } = await n.getTags(e);
@@ -187,41 +190,41 @@ var T = ({ axiosClient: t, config: n }) => {
187
190
  await n.unassignTags(e, t);
188
191
  }
189
192
  };
190
- }, M = ({ axiosClient: e, config: t }) => {
191
- let n = f(t, t.basePath, e);
193
+ }, N = ({ axiosClient: e, config: t }) => {
194
+ let n = h(t, t.basePath, e);
192
195
  return { async listActivities(e, t) {
193
196
  let { data: { value: r } } = await n.getActivities(e, t);
194
197
  return r || [];
195
198
  } };
196
- }, N = ({ axiosClient: e, config: t }) => {
197
- let r = n(t, t.basePath, e), i = m(t, t.basePath, e), a = y(t, t.basePath, e);
199
+ }, P = ({ axiosClient: e, config: t }) => {
200
+ let r = n(t, t.basePath, e), a = p(t, t.basePath, e), o = i(t, t.basePath, e);
198
201
  return {
199
202
  async getPermission(e, t, n, r, i) {
200
- let { data: o } = await a.getPermission(e, t, n, i);
201
- return o.link ? C({
202
- graphPermission: o,
203
+ let { data: a } = await o.getPermission(e, t, n, i);
204
+ return a.link ? w({
205
+ graphPermission: a,
203
206
  resourceId: t
204
- }) : w({
205
- graphPermission: o,
207
+ }) : T({
208
+ graphPermission: a,
206
209
  resourceId: t,
207
210
  graphRoles: r || {}
208
211
  });
209
212
  },
210
- async listPermissions(e, t, n, i, o) {
213
+ async listPermissions(e, t, n, i, a) {
211
214
  let s;
212
215
  if (e === t) {
213
- let { data: t } = await r.listPermissionsSpaceRoot(e, i?.filter, i?.select ? /* @__PURE__ */ new Set([...i.select]) : null, i?.count, i?.top || 0, o);
216
+ let { data: t } = await r.listPermissionsSpaceRoot(e, i?.filter, i?.select ? /* @__PURE__ */ new Set([...i.select]) : null, i?.count, i?.top || 0, a);
214
217
  s = t;
215
218
  } else {
216
- let { data: n } = await a.listPermissions(e, t, i?.filter, i?.select ? /* @__PURE__ */ new Set([...i.select]) : null, i?.count, i?.top || 0, o);
219
+ let { data: n } = await o.listPermissions(e, t, i?.filter, i?.select ? /* @__PURE__ */ new Set([...i.select]) : null, i?.count, i?.top || 0, a);
217
220
  s = n;
218
221
  }
219
222
  let c = s.value || [], l = s["@libre.graph.permissions.actions.allowedValues"], u = s["@libre.graph.permissions.roles.allowedValues"], d = s["@odata.count"];
220
223
  return {
221
- shares: c.map((e) => e.link ? C({
224
+ shares: c.map((e) => e.link ? w({
222
225
  graphPermission: e,
223
226
  resourceId: t
224
- }) : w({
227
+ }) : T({
225
228
  graphPermission: e,
226
229
  resourceId: t,
227
230
  graphRoles: n || {}
@@ -231,22 +234,22 @@ var T = ({ axiosClient: t, config: n }) => {
231
234
  count: d
232
235
  };
233
236
  },
234
- async updatePermission(e, t, n, i, o, s) {
237
+ async updatePermission(e, t, n, i, a, s) {
235
238
  let c;
236
239
  if (e === t) {
237
240
  let { data: t } = await r.updatePermissionSpaceRoot(e, n, i, s);
238
241
  c = t;
239
242
  } else {
240
- let { data: r } = await a.updatePermission(e, t, n, i, s);
243
+ let { data: r } = await o.updatePermission(e, t, n, i, s);
241
244
  c = r;
242
245
  }
243
- return c.link ? C({
246
+ return c.link ? w({
244
247
  graphPermission: c,
245
248
  resourceId: t
246
- }) : w({
249
+ }) : T({
247
250
  graphPermission: c,
248
251
  resourceId: t,
249
- graphRoles: o || {}
252
+ graphRoles: a || {}
250
253
  });
251
254
  },
252
255
  async deletePermission(e, t, n, i) {
@@ -254,59 +257,59 @@ var T = ({ axiosClient: t, config: n }) => {
254
257
  await r.deletePermissionSpaceRoot(e, n, i);
255
258
  return;
256
259
  }
257
- await a.deletePermission(e, t, n, i);
260
+ await o.deletePermission(e, t, n, i);
258
261
  },
259
- async createInvite(e, t, n, i, o) {
262
+ async createInvite(e, t, n, i, a) {
260
263
  let s;
261
264
  if (e === t) {
262
- let { data: t } = await r.inviteSpaceRoot(e, n, o);
265
+ let { data: t } = await r.inviteSpaceRoot(e, n, a);
263
266
  s = t.value?.[0];
264
267
  } else {
265
- let { data: r } = await a.invite(e, t, n, o);
268
+ let { data: r } = await o.invite(e, t, n, a);
266
269
  s = r.value?.[0];
267
270
  }
268
271
  if (!s) throw Error("no permission returned");
269
- return w({
272
+ return T({
270
273
  graphPermission: s,
271
274
  resourceId: t,
272
275
  graphRoles: i || {}
273
276
  });
274
277
  },
275
278
  async createLink(e, t, n, i) {
276
- let o;
279
+ let a;
277
280
  if (e === t) {
278
281
  let { data: t } = await r.createLinkSpaceRoot(e, n, i);
279
- o = t;
282
+ a = t;
280
283
  } else {
281
- let { data: r } = await a.createLink(e, t, n, i);
282
- o = r;
284
+ let { data: r } = await o.createLink(e, t, n, i);
285
+ a = r;
283
286
  }
284
- return C({
285
- graphPermission: o,
287
+ return w({
288
+ graphPermission: a,
286
289
  resourceId: t
287
290
  });
288
291
  },
289
- async setPermissionPassword(e, t, n, i, o) {
292
+ async setPermissionPassword(e, t, n, i, a) {
290
293
  let s;
291
294
  if (e === t) {
292
- let { data: t } = await r.setPermissionPasswordSpaceRoot(e, n, i, o);
295
+ let { data: t } = await r.setPermissionPasswordSpaceRoot(e, n, i, a);
293
296
  s = t;
294
297
  } else {
295
- let { data: r } = await a.setPermissionPassword(e, t, n, i, o);
298
+ let { data: r } = await o.setPermissionPassword(e, t, n, i, a);
296
299
  s = r;
297
300
  }
298
- return C({
301
+ return w({
299
302
  graphPermission: s,
300
303
  resourceId: t
301
304
  });
302
305
  },
303
306
  async listRoleDefinitions(e) {
304
- let { data: t } = await i.listPermissionRoleDefinitions(e);
307
+ let { data: t } = await a.listPermissionRoleDefinitions(e);
305
308
  return t;
306
309
  }
307
310
  };
308
- }, P = ({ axiosClient: e, config: t }) => {
309
- let n = i(t, t.basePath, e), r = a(t, t.basePath, e);
311
+ }, F = ({ axiosClient: e, config: t }) => {
312
+ let n = g(t, t.basePath, e), r = _(t, t.basePath, e);
310
313
  return {
311
314
  async getOwnUserPhoto(e) {
312
315
  let { data: t } = await n.getOwnUserPhoto(e);
@@ -325,48 +328,48 @@ var T = ({ axiosClient: t, config: n }) => {
325
328
  return n;
326
329
  }
327
330
  };
328
- }, F = (e, t) => {
331
+ }, I = (e, t) => {
329
332
  let n = new URL(e);
330
333
  n.pathname = [...n.pathname.split("/"), "graph"].filter(Boolean).join("/");
331
- let r = new _({ basePath: n.href });
334
+ let r = new y({ basePath: n.href });
332
335
  return {
333
- activities: M({
336
+ activities: N({
334
337
  axiosClient: t,
335
338
  config: r
336
339
  }),
337
- applications: D({
340
+ applications: O({
338
341
  axiosClient: t,
339
342
  config: r
340
343
  }),
341
- tags: j({
344
+ tags: M({
342
345
  axiosClient: t,
343
346
  config: r
344
347
  }),
345
- drives: k({
348
+ drives: A({
346
349
  axiosClient: t,
347
350
  config: r
348
351
  }),
349
- driveItems: A({
352
+ driveItems: j({
350
353
  axiosClient: t,
351
354
  config: r
352
355
  }),
353
- users: T({
356
+ users: E({
354
357
  axiosClient: t,
355
358
  config: r
356
359
  }),
357
- groups: E({
360
+ groups: D({
358
361
  axiosClient: t,
359
362
  config: r
360
363
  }),
361
- permissions: N({
364
+ permissions: P({
362
365
  axiosClient: t,
363
366
  config: r
364
367
  }),
365
- photos: P({
368
+ photos: F({
366
369
  axiosClient: t,
367
370
  config: r
368
371
  })
369
372
  };
370
373
  };
371
374
  //#endregion
372
- export { F as t };
375
+ export { I as t };