@opencloud-eu/web-client 3.1.0 → 4.0.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 (41) hide show
  1. package/dist/functions-DP8s29Wg.cjs +1 -0
  2. package/dist/functions-DnZZKUk0.js +1183 -0
  3. package/dist/index-BIL0cW_q.js +1755 -0
  4. package/dist/index-CcmRJ1qB.cjs +1 -0
  5. package/dist/index-CiqYiARd.js +688 -0
  6. package/dist/index-DAa_DzDf.cjs +6 -0
  7. package/dist/{index-C6VnMvgz.cjs → index-D_NPkUGY.cjs} +1 -1
  8. package/dist/{index-Pl8khka8.js → index-JHVTaNRI.js} +2 -2
  9. package/dist/index-YVg9jNP5.cjs +16 -0
  10. package/dist/{index-DRNBPoWu.js → index-bmR3iLuG.js} +1934 -1953
  11. package/dist/src/graph/driveItems/types.d.ts +6 -2
  12. package/dist/src/graph/drives/types.d.ts +9 -2
  13. package/dist/src/graph/generated/api.d.ts +174 -107
  14. package/dist/src/helpers/resource/types.d.ts +1 -0
  15. package/dist/src/helpers/share/constants.d.ts +0 -1
  16. package/dist/src/helpers/space/types.d.ts +1 -0
  17. package/dist/src/ocs/capabilities.d.ts +1 -0
  18. package/dist/src/webdav/constants/dav.d.ts +1 -0
  19. package/dist/toString-CgHWCW2N.cjs +1 -0
  20. package/dist/{toString-Cn0xCZ28.js → toString-XlfBosfh.js} +4 -4
  21. package/dist/web-client/graph/generated.cjs +1 -1
  22. package/dist/web-client/graph/generated.js +2038 -2099
  23. package/dist/web-client/graph.cjs +1 -1
  24. package/dist/web-client/graph.js +1 -1
  25. package/dist/web-client/ocs.cjs +12 -12
  26. package/dist/web-client/ocs.js +1889 -1857
  27. package/dist/web-client/sse.cjs +2 -2
  28. package/dist/web-client/sse.js +95 -105
  29. package/dist/web-client/webdav.cjs +1 -1
  30. package/dist/web-client/webdav.js +3 -3
  31. package/dist/web-client.cjs +1 -1
  32. package/dist/web-client.js +82 -82
  33. package/package.json +3 -3
  34. package/dist/functions-BCZphZWf.cjs +0 -1
  35. package/dist/functions-gLZtPuF8.js +0 -1177
  36. package/dist/index-B0DQP5k7.cjs +0 -1
  37. package/dist/index-BTGj2rHD.js +0 -1705
  38. package/dist/index-C-U4KVPG.cjs +0 -6
  39. package/dist/index-D5plj7J1.cjs +0 -16
  40. package/dist/index-kED1r0rQ.js +0 -693
  41. package/dist/toString-hHr716Th.cjs +0 -1
@@ -1,693 +0,0 @@
1
- import { UserApiFactory as x, UsersApiFactory as z, MeUserApiFactory as O, MeChangepasswordApiFactory as W, UserAppRoleAssignmentApiFactory as j, GroupApiFactory as H, GroupsApiFactory as Y, ApplicationsApiFactory as _, DrivesApiFactory as J, MeDrivesApi as Q, DrivesGetDrivesApi as Z, DriveItemApiFactory as $, DrivesRootApiFactory as T, MeDriveApiFactory as K, TagsApiFactory as X, ActivitiesApiFactory as V, RoleManagementApiFactory as C, DrivesPermissionsApiFactory as q, MePhotoApiFactory as I, UserPhotoApiFactory as ee, Configuration as ae } from "./web-client/graph/generated.js";
2
- import { u as f, g as re, r as te } from "./toString-Cn0xCZ28.js";
3
- import { D as se, E as ne, F as ce, d as k, n as m, o as M, h as G, e as B, G as p, u as A } from "./functions-gLZtPuF8.js";
4
- const ie = ({ axiosClient: e, config: n }) => {
5
- const i = x(n, n.basePath, e), l = z(n, n.basePath, e), c = O(n, n.basePath, e), a = W(
6
- n,
7
- n.basePath,
8
- e
9
- ), s = j(
10
- n,
11
- n.basePath,
12
- e
13
- );
14
- return {
15
- async getUser(r, t, u) {
16
- const { data: d } = await i.getUser(
17
- r,
18
- t != null && t.select ? /* @__PURE__ */ new Set([...t.select]) : null,
19
- t != null && t.expand ? /* @__PURE__ */ new Set([...t.expand]) : /* @__PURE__ */ new Set(["drive", "memberOf", "appRoleAssignments"]),
20
- u
21
- );
22
- return d;
23
- },
24
- async createUser(r, t) {
25
- const { data: u } = await l.createUser(r, t);
26
- return u;
27
- },
28
- async editUser(r, t, u) {
29
- const { data: d } = await i.updateUser(r, t, u);
30
- return d;
31
- },
32
- async deleteUser(r, t, u) {
33
- await i.deleteUser(r, t, u);
34
- },
35
- async listUsers(r, t) {
36
- const {
37
- data: { value: u }
38
- } = await l.listUsers(
39
- r == null ? void 0 : r.search,
40
- r == null ? void 0 : r.filter,
41
- r != null && r.orderBy ? /* @__PURE__ */ new Set([...r.orderBy]) : null,
42
- r != null && r.select ? /* @__PURE__ */ new Set([...r.select]) : null,
43
- r != null && r.expand ? /* @__PURE__ */ new Set([...r.expand]) : null,
44
- t
45
- );
46
- return u;
47
- },
48
- async getMe(r, t) {
49
- const { data: u } = await c.getOwnUser(
50
- r != null && r.expand ? /* @__PURE__ */ new Set([...r.expand]) : /* @__PURE__ */ new Set(["memberOf"]),
51
- t
52
- );
53
- return u;
54
- },
55
- async editMe(r, t) {
56
- const { data: u } = await c.updateOwnUser(r, t);
57
- return u;
58
- },
59
- async changeOwnPassword(r, t) {
60
- await a.changeOwnPassword(r, t);
61
- },
62
- async exportPersonalData(r, t, u) {
63
- await i.exportPersonalData(r, t, u);
64
- },
65
- async createUserAppRoleAssignment(r, t, u) {
66
- const { data: d } = await s.userCreateAppRoleAssignments(
67
- r,
68
- t,
69
- u
70
- );
71
- return d;
72
- }
73
- };
74
- }, le = ({ axiosClient: e, config: n }) => {
75
- const i = H(n, n.basePath, e), l = Y(n, n.basePath, e);
76
- return {
77
- async getGroup(c, a, s) {
78
- const { data: r } = await i.getGroup(
79
- c,
80
- a != null && a.select ? /* @__PURE__ */ new Set([...a.select]) : null,
81
- a != null && a.expand ? /* @__PURE__ */ new Set([...a.expand]) : /* @__PURE__ */ new Set(["members"]),
82
- s
83
- );
84
- return r;
85
- },
86
- async createGroup(c, a) {
87
- const { data: s } = await l.createGroup(c, a);
88
- return s;
89
- },
90
- async editGroup(c, a, s) {
91
- const { data: r } = await i.updateGroup(c, a, s);
92
- return r;
93
- },
94
- async deleteGroup(c, a, s) {
95
- await i.deleteGroup(c, a, s);
96
- },
97
- async listGroups(c, a) {
98
- const {
99
- data: { value: s }
100
- } = await l.listGroups(
101
- c == null ? void 0 : c.search,
102
- c != null && c.orderBy ? /* @__PURE__ */ new Set([...c.orderBy]) : null,
103
- c != null && c.select ? /* @__PURE__ */ new Set([...c.select]) : null,
104
- c != null && c.expand ? /* @__PURE__ */ new Set([...c.expand]) : null,
105
- a
106
- );
107
- return s;
108
- },
109
- async addMember(c, a, s) {
110
- await i.addMember(
111
- c,
112
- { "@odata.id": f(n.basePath, "v1.0", "users", a) },
113
- s
114
- );
115
- },
116
- async deleteMember(c, a, s, r) {
117
- await i.deleteMember(c, a, s, r);
118
- }
119
- };
120
- }, ue = ({
121
- axiosClient: e,
122
- config: n
123
- }) => {
124
- const i = _(n, n.basePath, e);
125
- return {
126
- async getApplication(l, c) {
127
- const { data: a } = await i.getApplication(l, c);
128
- return a;
129
- },
130
- async listApplications(l) {
131
- const {
132
- data: { value: c }
133
- } = await i.listApplications(l);
134
- return c || [];
135
- }
136
- };
137
- };
138
- function de() {
139
- }
140
- var U = re(te, "Set");
141
- function N(e) {
142
- var n = -1, i = Array(e.size);
143
- return e.forEach(function(l) {
144
- i[++n] = l;
145
- }), i;
146
- }
147
- var he = 1 / 0, ye = U && 1 / N(new U([, -0]))[1] == he ? function(e) {
148
- return new U(e);
149
- } : de, oe = 200;
150
- function we(e, n, i) {
151
- var l = -1, c = ne, a = e.length, s = !0, r = [], t = r;
152
- if (a >= oe) {
153
- var u = ye(e);
154
- if (u)
155
- return N(u);
156
- s = !1, c = ce, t = new se();
157
- } else
158
- t = r;
159
- e:
160
- for (; ++l < a; ) {
161
- var d = e[l], h = d;
162
- if (d = d !== 0 ? d : 0, s && h === h) {
163
- for (var o = t.length; o--; )
164
- if (t[o] === h)
165
- continue e;
166
- r.push(d);
167
- } else c(t, h, i) || (t !== r && t.push(h), r.push(d));
168
- }
169
- return r;
170
- }
171
- function me(e) {
172
- return e && e.length ? we(e) : [];
173
- }
174
- const E = (e) => Object.hasOwn(e, "sharedWith"), Ue = (e) => E(e) && e.outgoing, Te = (e) => E(e) && !e.outgoing, ke = (e) => Object.hasOwn(e, "role"), Me = (e) => !Object.hasOwn(e, "role"), pe = ({
175
- driveItem: e,
176
- graphRoles: n
177
- }) => {
178
- var i;
179
- return (i = e.remoteItem) == null ? void 0 : i.permissions.reduce((l, c) => {
180
- var a;
181
- return (a = c.roles) == null || a.forEach((s) => {
182
- const r = n[s];
183
- r && !l.some(({ id: t }) => t === r.id) && l.push(r);
184
- }), l;
185
- }, []);
186
- }, Ae = ({
187
- driveItem: e,
188
- shareRoles: n
189
- }) => {
190
- var l;
191
- if (!n.length) {
192
- const c = (l = e.remoteItem) == null ? void 0 : l.permissions.reduce(
193
- (a, s) => {
194
- const r = s["@libre.graph.permissions.actions"];
195
- return r && a.push(...r), a;
196
- },
197
- []
198
- );
199
- return [...new Set(c)];
200
- }
201
- const i = n.reduce((c, a) => (a.rolePermissions.forEach((s) => {
202
- c.push(...s.allowedResourceActions);
203
- }), c), []);
204
- return [...new Set(i)];
205
- };
206
- function Ge({
207
- driveItem: e,
208
- graphRoles: n,
209
- serverUrl: i
210
- }) {
211
- var o, w, b, v;
212
- const l = e.name || e.remoteItem.name, c = k(e.remoteItem.id), a = e.remoteItem.permissions.map((y) => {
213
- const { grantedToV2: S } = y;
214
- return {
215
- ...S.group || S.user,
216
- shareType: g(y)
217
- };
218
- }), s = e.remoteItem.permissions.reduce((y, S) => {
219
- const R = S.invitation.invitedBy.user;
220
- return y.some(({ id: L }) => L === R.id) || y.push(R), y;
221
- }, []);
222
- let r = me(e.remoteItem.permissions.map(g));
223
- s.some((y) => y["@libre.graph.userType"] === "Federated") && (r = [m.remote.value]);
224
- const u = pe({ driveItem: e, graphRoles: n }), d = Ae({ driveItem: e, shareRoles: u }), h = {
225
- id: e.id,
226
- remoteItemId: e.remoteItem.id,
227
- driveId: (o = e.parentReference) == null ? void 0 : o.driveId,
228
- path: "/",
229
- name: l,
230
- fileId: e.remoteItem.id,
231
- size: e.size,
232
- storageId: c,
233
- parentFolderId: (w = e.parentReference) == null ? void 0 : w.id,
234
- sdate: e.remoteItem.permissions[0].createdDateTime,
235
- tags: [],
236
- webDavPath: M(e.remoteItem.id, "/"),
237
- sharedBy: s,
238
- owner: (b = e.remoteItem.createdBy) == null ? void 0 : b.user,
239
- sharedWith: a,
240
- shareTypes: r,
241
- isFolder: !!e.folder,
242
- type: e.folder ? "folder" : "file",
243
- mimeType: ((v = e.file) == null ? void 0 : v.mimeType) || "httpd/unix-directory",
244
- mdate: e.lastModifiedDateTime ? new Date(e.lastModifiedDateTime).toUTCString() : void 0,
245
- syncEnabled: e["@client.synchronize"],
246
- hidden: e["@UI.Hidden"],
247
- shareRoles: u,
248
- sharePermissions: d,
249
- outgoing: !1,
250
- privateLink: f(i, "f", e.remoteItem.id),
251
- canRename: () => e["@client.synchronize"],
252
- canDownload: () => d.includes(p.readContent),
253
- canUpload: () => d.includes(p.createUpload),
254
- canCreate: () => d.includes(p.createChildren),
255
- canBeDeleted: () => d.includes(p.deleteStandard),
256
- canEditTags: () => d.includes(p.createChildren),
257
- isMounted: () => !1,
258
- isReceivedShare: () => !0,
259
- canShare: () => !1,
260
- canDeny: () => !1,
261
- getDomSelector: () => B(e.id)
262
- };
263
- return h.extension = G(h), h;
264
- }
265
- function Be({
266
- driveItem: e,
267
- user: n,
268
- serverUrl: i
269
- }) {
270
- var s, r, t;
271
- const l = k(e.id), c = f(e.parentReference.path, e.name), a = {
272
- id: e.id,
273
- driveId: (s = e.parentReference) == null ? void 0 : s.driveId,
274
- path: c,
275
- name: e.name,
276
- fileId: e.id,
277
- size: e.size,
278
- storageId: l,
279
- parentFolderId: (r = e.parentReference) == null ? void 0 : r.id,
280
- sdate: e.permissions[0].createdDateTime,
281
- tags: [],
282
- webDavPath: M(l, c),
283
- sharedBy: [{ id: n.id, displayName: n.displayName }],
284
- owner: { id: n.id, displayName: n.displayName },
285
- sharedWith: e.permissions.map((u) => {
286
- if (u.link)
287
- return {
288
- id: u.id,
289
- displayName: u.link["@libre.graph.displayName"],
290
- shareType: m.link.value
291
- };
292
- const d = g(u);
293
- return { ...u.grantedToV2.user || u.grantedToV2.group, shareType: d };
294
- }),
295
- shareTypes: e.permissions.map(g),
296
- isFolder: !!e.folder,
297
- type: e.folder ? "folder" : "file",
298
- mimeType: ((t = e.file) == null ? void 0 : t.mimeType) || "httpd/unix-directory",
299
- outgoing: !0,
300
- privateLink: f(i, "f", e.id),
301
- canRename: () => !0,
302
- canDownload: () => !0,
303
- canUpload: () => !0,
304
- canCreate: () => !0,
305
- canBeDeleted: () => !0,
306
- canEditTags: () => !0,
307
- isMounted: () => !1,
308
- isReceivedShare: () => !0,
309
- canShare: () => !0,
310
- canDeny: () => !0,
311
- getDomSelector: () => B(e.id)
312
- };
313
- return a.extension = G(a), a;
314
- }
315
- function F({
316
- graphPermission: e,
317
- graphRoles: n,
318
- resourceId: i,
319
- indirect: l = !1
320
- }) {
321
- var s, r, t;
322
- const c = n[(s = e.roles) == null ? void 0 : s[0]], a = (t = (r = e.invitation) == null ? void 0 : r.invitedBy) == null ? void 0 : t.user;
323
- return {
324
- id: e.id,
325
- resourceId: i,
326
- indirect: l,
327
- shareType: g(e),
328
- role: c,
329
- sharedBy: { id: a == null ? void 0 : a.id, displayName: a == null ? void 0 : a.displayName },
330
- sharedWith: e.grantedToV2.user || e.grantedToV2.group,
331
- permissions: e["@libre.graph.permissions.actions"] ? e["@libre.graph.permissions.actions"] : c.rolePermissions.flatMap((u) => u.allowedResourceActions),
332
- createdDateTime: e.createdDateTime,
333
- expirationDateTime: e.expirationDateTime
334
- };
335
- }
336
- function D({
337
- graphPermission: e,
338
- resourceId: n,
339
- indirect: i = !1
340
- }) {
341
- var c, a;
342
- const l = (a = (c = e.invitation) == null ? void 0 : c.invitedBy) == null ? void 0 : a.user;
343
- return {
344
- id: e.id,
345
- resourceId: n,
346
- indirect: i,
347
- shareType: m.link.value,
348
- sharedBy: { id: l == null ? void 0 : l.id, displayName: l == null ? void 0 : l.displayName },
349
- hasPassword: e.hasPassword,
350
- createdDateTime: e.createdDateTime,
351
- expirationDateTime: e.expirationDateTime,
352
- displayName: e.link["@libre.graph.displayName"],
353
- isQuickLink: e.link["@libre.graph.quickLink"],
354
- type: e.link.type,
355
- webUrl: e.link.webUrl,
356
- preventsDownload: e.link.preventsDownload
357
- };
358
- }
359
- function g({ link: e, grantedToV2: n }) {
360
- var i;
361
- return e ? m.link.value : n != null && n.group ? m.group.value : ((i = n == null ? void 0 : n.user) == null ? void 0 : i["@libre.graph.userType"]) === "Federated" ? m.remote.value : m.user.value;
362
- }
363
- const P = (e) => new URL(e.webUrl).origin, De = ({ axiosClient: e, config: n }) => {
364
- const i = J(n, n.basePath, e), l = new Q(n, n.basePath, e), c = new Z(n, n.basePath, e);
365
- return {
366
- async getDrive(a, s) {
367
- const { data: r } = await i.getDrive(a, s);
368
- return A({ ...r, serverUrl: P(r) });
369
- },
370
- async createDrive(a, s) {
371
- const { data: r } = await i.createDrive(a, s);
372
- return A({ ...r, serverUrl: P(r) });
373
- },
374
- async updateDrive(a, s, r) {
375
- const { data: t } = await i.updateDrive(a, s, r);
376
- return A({ ...t, serverUrl: P(t) });
377
- },
378
- async disableDrive(a, s, r) {
379
- await i.deleteDrive(a, s, r);
380
- },
381
- async deleteDrive(a, s, r) {
382
- await i.deleteDrive(a, s, {
383
- headers: {
384
- ...(r == null ? void 0 : r.headers) && r.headers || {},
385
- Purge: "T"
386
- },
387
- ...r && { requestOptions: r } || {}
388
- });
389
- },
390
- async listMyDrives(a, s) {
391
- const {
392
- data: { value: r }
393
- } = await l.listMyDrivesBeta(
394
- a == null ? void 0 : a.orderBy,
395
- a == null ? void 0 : a.filter,
396
- a == null ? void 0 : a.expand,
397
- s
398
- );
399
- return r.map((t) => A({ ...t, serverUrl: P(t) }));
400
- },
401
- async listAllDrives(a, s) {
402
- const {
403
- data: { value: r }
404
- } = await c.listAllDrivesBeta(
405
- a == null ? void 0 : a.orderBy,
406
- a == null ? void 0 : a.filter,
407
- a == null ? void 0 : a.expand,
408
- s
409
- );
410
- return r.map((t) => A({ ...t, serverUrl: P(t) }));
411
- }
412
- };
413
- }, Pe = ({
414
- axiosClient: e,
415
- config: n
416
- }) => {
417
- const i = $(n, n.basePath, e), l = T(n, n.basePath, e), c = K(n, n.basePath, e);
418
- return {
419
- async getDriveItem(a, s, r) {
420
- const { data: t } = await i.getDriveItem(a, s, r);
421
- return t;
422
- },
423
- async createDriveItem(a, s, r) {
424
- const { data: t } = await l.createDriveItem(
425
- a,
426
- s,
427
- r
428
- );
429
- return t;
430
- },
431
- async updateDriveItem(a, s, r, t) {
432
- const { data: u } = await i.updateDriveItem(
433
- a,
434
- s,
435
- r,
436
- t
437
- );
438
- return u;
439
- },
440
- async deleteDriveItem(a, s, r) {
441
- await i.deleteDriveItem(a, s, r);
442
- },
443
- async listSharedByMe(a) {
444
- const { data: s } = await c.listSharedByMe(a);
445
- return (s == null ? void 0 : s.value) || [];
446
- },
447
- async listSharedWithMe(a) {
448
- const { data: s } = await c.listSharedWithMe(a);
449
- return (s == null ? void 0 : s.value) || [];
450
- }
451
- };
452
- }, ge = ({ axiosClient: e, config: n }) => {
453
- const i = X(n, n.basePath, e);
454
- return {
455
- async listTags(l) {
456
- const {
457
- data: { value: c }
458
- } = await i.getTags(l);
459
- return c || [];
460
- },
461
- async assignTags(l, c) {
462
- await i.assignTags(l, c);
463
- },
464
- async unassignTags(l, c) {
465
- await i.unassignTags(l, c);
466
- }
467
- };
468
- }, be = ({
469
- axiosClient: e,
470
- config: n
471
- }) => {
472
- const i = V(n, n.basePath, e);
473
- return {
474
- async listActivities(l, c) {
475
- const {
476
- data: { value: a }
477
- } = await i.getActivities(l, c);
478
- return a || [];
479
- }
480
- };
481
- }, Se = ({
482
- axiosClient: e,
483
- config: n
484
- }) => {
485
- const i = T(n, n.basePath, e), l = C(n, n.basePath, e), c = q(
486
- n,
487
- n.basePath,
488
- e
489
- );
490
- return {
491
- async getPermission(a, s, r, t, u) {
492
- const { data: d } = await c.getPermission(
493
- a,
494
- s,
495
- r,
496
- u
497
- );
498
- return d.link ? D({ graphPermission: d, resourceId: s }) : F({
499
- graphPermission: d,
500
- resourceId: s,
501
- graphRoles: t || {}
502
- });
503
- },
504
- async listPermissions(a, s, r, t, u) {
505
- let d;
506
- if (a === s) {
507
- const { data: y } = await i.listPermissionsSpaceRoot(
508
- a,
509
- t == null ? void 0 : t.filter,
510
- t != null && t.select ? /* @__PURE__ */ new Set([...t.select]) : null,
511
- t == null ? void 0 : t.count,
512
- (t == null ? void 0 : t.top) || 0,
513
- u
514
- );
515
- d = y;
516
- } else {
517
- const { data: y } = await c.listPermissions(
518
- a,
519
- s,
520
- t == null ? void 0 : t.filter,
521
- t != null && t.select ? /* @__PURE__ */ new Set([...t.select]) : null,
522
- t == null ? void 0 : t.count,
523
- (t == null ? void 0 : t.top) || 0,
524
- u
525
- );
526
- d = y;
527
- }
528
- const h = d.value || [], o = d["@libre.graph.permissions.actions.allowedValues"], w = d["@libre.graph.permissions.roles.allowedValues"], b = d["@odata.count"];
529
- return { shares: h.map((y) => y.link ? D({ graphPermission: y, resourceId: s }) : F({
530
- graphPermission: y,
531
- resourceId: s,
532
- graphRoles: r || {}
533
- })), allowedActions: o, allowedRoles: w, count: b };
534
- },
535
- async updatePermission(a, s, r, t, u, d) {
536
- let h;
537
- if (a === s) {
538
- const { data: o } = await i.updatePermissionSpaceRoot(
539
- a,
540
- r,
541
- t,
542
- d
543
- );
544
- h = o;
545
- } else {
546
- const { data: o } = await c.updatePermission(
547
- a,
548
- s,
549
- r,
550
- t,
551
- d
552
- );
553
- h = o;
554
- }
555
- return h.link ? D({ graphPermission: h, resourceId: s }) : F({
556
- graphPermission: h,
557
- resourceId: s,
558
- graphRoles: u || {}
559
- });
560
- },
561
- async deletePermission(a, s, r, t) {
562
- if (a === s) {
563
- await i.deletePermissionSpaceRoot(a, r, t);
564
- return;
565
- }
566
- await c.deletePermission(a, s, r, t);
567
- },
568
- async createInvite(a, s, r, t, u) {
569
- var h, o;
570
- let d;
571
- if (a === s) {
572
- const { data: w } = await i.inviteSpaceRoot(
573
- a,
574
- r,
575
- u
576
- );
577
- d = (h = w.value) == null ? void 0 : h[0];
578
- } else {
579
- const { data: w } = await c.invite(
580
- a,
581
- s,
582
- r,
583
- u
584
- );
585
- d = (o = w.value) == null ? void 0 : o[0];
586
- }
587
- if (!d)
588
- throw new Error("no permission returned");
589
- return F({
590
- graphPermission: d,
591
- resourceId: s,
592
- graphRoles: t || {}
593
- });
594
- },
595
- async createLink(a, s, r, t) {
596
- let u;
597
- if (a === s) {
598
- const { data: d } = await i.createLinkSpaceRoot(
599
- a,
600
- r,
601
- t
602
- );
603
- u = d;
604
- } else {
605
- const { data: d } = await c.createLink(
606
- a,
607
- s,
608
- r,
609
- t
610
- );
611
- u = d;
612
- }
613
- return D({ graphPermission: u, resourceId: s });
614
- },
615
- async setPermissionPassword(a, s, r, t, u) {
616
- let d;
617
- if (a === s) {
618
- const { data: h } = await i.setPermissionPasswordSpaceRoot(
619
- a,
620
- r,
621
- t,
622
- u
623
- );
624
- d = h;
625
- } else {
626
- const { data: h } = await c.setPermissionPassword(
627
- a,
628
- s,
629
- r,
630
- t,
631
- u
632
- );
633
- d = h;
634
- }
635
- return D({ graphPermission: d, resourceId: s });
636
- },
637
- async listRoleDefinitions(a) {
638
- const { data: s } = await l.listPermissionRoleDefinitions(a);
639
- return s;
640
- }
641
- };
642
- }, Fe = ({ axiosClient: e, config: n }) => {
643
- const i = I(n, n.basePath, e), l = ee(n, n.basePath, e);
644
- return {
645
- async getOwnUserPhoto(c) {
646
- const { data: a } = await i.getOwnUserPhoto(c);
647
- return a;
648
- },
649
- async deleteOwnUserPhoto(c) {
650
- const { data: a } = await i.deleteOwnUserPhoto(c);
651
- return a;
652
- },
653
- async updateOwnUserPhotoPatch(c, a) {
654
- const { data: s } = await i.updateOwnUserPhotoPatch(c, a);
655
- return s;
656
- },
657
- async getUserPhoto(c, a) {
658
- const { data: s } = await l.getUserPhoto(c, a);
659
- return s;
660
- }
661
- };
662
- }, Ne = (e, n) => {
663
- const i = new URL(e);
664
- i.pathname = [...i.pathname.split("/"), "graph"].filter(Boolean).join("/");
665
- const l = new ae({
666
- basePath: i.href
667
- });
668
- return {
669
- activities: be({ axiosClient: n, config: l }),
670
- applications: ue({ axiosClient: n, config: l }),
671
- tags: ge({ axiosClient: n, config: l }),
672
- drives: De({ axiosClient: n, config: l }),
673
- driveItems: Pe({ axiosClient: n, config: l }),
674
- users: ie({ axiosClient: n, config: l }),
675
- groups: le({ axiosClient: n, config: l }),
676
- permissions: Se({ axiosClient: n, config: l }),
677
- photos: Fe({ axiosClient: n, config: l })
678
- };
679
- };
680
- export {
681
- Ue as a,
682
- Te as b,
683
- ke as c,
684
- Me as d,
685
- pe as e,
686
- Ae as f,
687
- Ne as g,
688
- Ge as h,
689
- E as i,
690
- Be as j,
691
- F as k,
692
- D as l
693
- };
@@ -1 +0,0 @@
1
- "use strict";const h=require("./index-C6VnMvgz.cjs"),M=/^(\w+:\/\/[^/?]+)?(.*?)$/,N=t=>t.filter(e=>typeof e=="string"||typeof e=="number").map(e=>`${e}`).filter(e=>e),G=t=>{const e=t.join("/"),[,r="",n=""]=e.match(M)||[];return{prefix:r,pathname:{parts:n.split("/").filter(a=>a!==""),hasLeading:/^\/+/.test(n),hasTrailing:/\/+$/.test(n)}}},L=(t,e)=>{const{prefix:r,pathname:n}=t,{parts:a,hasLeading:b,hasTrailing:H}=n,{leadingSlash:v,trailingSlash:j}=e,S=v===!0||v==="keep"&&b,I=j===!0||j==="keep"&&H;let o=r;return a.length>0&&((o||S)&&(o+="/"),o+=a.join("/")),I&&(o+="/"),!o&&S&&(o+="/"),o},R=(...t)=>{const e=t[t.length-1];let r;e&&typeof e=="object"&&(r=e,t=t.slice(0,-1)),r={leadingSlash:!0,trailingSlash:!1,...r},t=N(t);const n=G(t);return L(n,r)};var U=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var q=typeof h.global=="object"&&h.global&&h.global.Object===Object&&h.global,K=typeof self=="object"&&self&&self.Object===Object&&self,p=q||K||Function("return this")(),s=p.Symbol,P=Object.prototype,V=P.hasOwnProperty,B=P.toString,u=s?s.toStringTag:void 0;function Q(t){var e=V.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch{}var a=B.call(t);return n&&(e?t[u]=r:delete t[u]),a}var W=Object.prototype,X=W.toString;function Y(t){return X.call(t)}var Z="[object Null]",k="[object Undefined]",m=s?s.toStringTag:void 0;function C(t){return t==null?t===void 0?k:Z:m&&m in Object(t)?Q(t):Y(t)}function $(t){return t!=null&&typeof t=="object"}var tt="[object Symbol]";function x(t){return typeof t=="symbol"||$(t)&&C(t)==tt}function z(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}var F=Array.isArray,O=s?s.prototype:void 0,T=O?O.toString:void 0;function D(t){if(typeof t=="string")return t;if(F(t))return z(t,D)+"";if(x(t))return T?T.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function A(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var et="[object AsyncFunction]",rt="[object Function]",nt="[object GeneratorFunction]",at="[object Proxy]";function E(t){if(!A(t))return!1;var e=C(t);return e==rt||e==nt||e==et||e==at}var _=p["__core-js_shared__"],w=function(){var t=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ot(t){return!!w&&w in t}var it=Function.prototype,st=it.toString;function ct(t){if(t!=null){try{return st.call(t)}catch{}try{return t+""}catch{}}return""}var lt=/[\\^$.*+?()[\]{}|]/g,ut=/^\[object .+?Constructor\]$/,ft=Function.prototype,ht=Object.prototype,pt=ft.toString,dt=ht.hasOwnProperty,gt=RegExp("^"+pt.call(dt).replace(lt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _t(t){if(!A(t)||ot(t))return!1;var e=E(t)?gt:ut;return e.test(ct(t))}function yt(t,e){return t==null?void 0:t[e]}function y(t,e){var r=yt(t,e);return _t(r)?r:void 0}function bt(t,e){return t===e||t!==t&&e!==e}var f=y(Object,"create");function vt(){this.__data__=f?f(null):{},this.size=0}function jt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var St="__lodash_hash_undefined__",mt=Object.prototype,Ot=mt.hasOwnProperty;function Tt(t){var e=this.__data__;if(f){var r=e[t];return r===St?void 0:r}return Ot.call(e,t)?e[t]:void 0}var wt=Object.prototype,Pt=wt.hasOwnProperty;function Ct(t){var e=this.__data__;return f?e[t]!==void 0:Pt.call(e,t)}var $t="__lodash_hash_undefined__";function xt(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=f&&e===void 0?$t:e,this}function i(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}i.prototype.clear=vt;i.prototype.delete=jt;i.prototype.get=Tt;i.prototype.has=Ct;i.prototype.set=xt;function zt(){this.__data__=[],this.size=0}function d(t,e){for(var r=t.length;r--;)if(bt(t[r][0],e))return r;return-1}var Ft=Array.prototype,Dt=Ft.splice;function At(t){var e=this.__data__,r=d(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Dt.call(e,r,1),--this.size,!0}function Et(t){var e=this.__data__,r=d(e,t);return r<0?void 0:e[r][1]}function Ht(t){return d(this.__data__,t)>-1}function It(t,e){var r=this.__data__,n=d(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function c(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}c.prototype.clear=zt;c.prototype.delete=At;c.prototype.get=Et;c.prototype.has=Ht;c.prototype.set=It;var Mt=y(p,"Map");function Nt(){this.size=0,this.__data__={hash:new i,map:new(Mt||c),string:new i}}function Gt(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function g(t,e){var r=t.__data__;return Gt(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Lt(t){var e=g(this,t).delete(t);return this.size-=e?1:0,e}function Rt(t){return g(this,t).get(t)}function Ut(t){return g(this,t).has(t)}function Jt(t,e){var r=g(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function l(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=Nt;l.prototype.delete=Lt;l.prototype.get=Rt;l.prototype.has=Ut;l.prototype.set=Jt;function qt(t){return t==null?"":D(t)}exports.MapCache=l;exports.arrayMap=z;exports.commonjsGlobal=U;exports.getDefaultExportFromCjs=J;exports.getNative=y;exports.isArray=F;exports.isFunction=E;exports.isObjectLike=$;exports.isSymbol=x;exports.root=p;exports.toString=qt;exports.urlJoin=R;