@opencloud-eu/web-client 8.0.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{axios-ULsDSF3p.js → axios-DRPhbClr.js} +13 -49
- package/dist/{dist-WdVfmT0d.js → dist-CHy-DaIN.js} +1 -1
- package/dist/{generated-CkfYRFme.js → generated-4nR8KA38.js} +505 -311
- package/dist/{graph-D3q1149Y.js → graph-CwVan2Jp.js} +123 -98
- package/dist/{helpers-C_9em2wB.js → helpers-Bh5xR_vg.js} +46 -37
- package/dist/{ocs-CGD-4vGl.js → ocs-Dfdjrujs.js} +271 -296
- package/dist/{ox-D1FgExd1.js → schemas-rdabTCJb.js} +1366 -1250
- package/dist/src/errors.d.ts +2 -1
- package/dist/src/graph/generated/api.d.ts +639 -24
- package/dist/src/graph/guestLinks/guestLinks.d.ts +3 -0
- package/dist/src/graph/guestLinks/index.d.ts +2 -0
- package/dist/src/graph/guestLinks/types.d.ts +13 -0
- package/dist/src/graph/index.d.ts +3 -0
- package/dist/src/graph/types.d.ts +1 -0
- package/dist/src/helpers/resource/types.d.ts +3 -2
- package/dist/src/helpers/share/types.d.ts +3 -0
- package/dist/src/helpers/space/functions.d.ts +2 -2
- package/dist/src/ocs/capabilities.d.ts +1 -0
- package/dist/src/sse/index.d.ts +12 -0
- package/dist/src/webdav/client/dav.d.ts +3 -1
- package/dist/src/webdav/client/parsers.d.ts +1 -0
- package/dist/src/webdav/constants/dav.d.ts +5 -1
- package/dist/src/webdav/index.d.ts +1 -1
- package/dist/{toString-DfgrQ1mh.js → toString-uorCN9F3.js} +1 -1
- package/dist/web-client/graph/generated.js +1 -2
- package/dist/web-client/graph.js +1 -2
- package/dist/web-client/ocs.js +1 -2
- package/dist/web-client/ox.js +49 -2
- package/dist/web-client/sse.js +57 -48
- package/dist/web-client/webdav.js +2 -2
- package/dist/web-client.js +5 -5
- package/dist/webdav-DrQsSfxZ.js +6431 -0
- package/package.json +2 -4
- package/dist/webdav-BxsiETq0.js +0 -4538
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { t as e } from "./axios-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { m as
|
|
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:
|
|
7
|
-
let
|
|
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
9
|
async getUser(e, t, n) {
|
|
10
|
-
let { data:
|
|
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
14
|
]), n);
|
|
15
|
-
return
|
|
15
|
+
return r;
|
|
16
16
|
},
|
|
17
17
|
async createUser(e, t) {
|
|
18
18
|
let { data: n } = await a.createUser(e, t);
|
|
19
19
|
return n;
|
|
20
20
|
},
|
|
21
21
|
async editUser(e, t, n) {
|
|
22
|
-
let { data:
|
|
23
|
-
return
|
|
22
|
+
let { data: r } = await i.updateUser(e, t, n);
|
|
23
|
+
return r;
|
|
24
24
|
},
|
|
25
25
|
async deleteUser(e, t, n) {
|
|
26
|
-
await
|
|
26
|
+
await i.deleteUser(e, t, n);
|
|
27
27
|
},
|
|
28
28
|
async listUsers(e, t) {
|
|
29
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 o.getOwnUser(e?.expand ? /* @__PURE__ */ new Set([...e.expand]) :
|
|
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) {
|
|
@@ -38,10 +38,10 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
|
|
|
38
38
|
return n;
|
|
39
39
|
},
|
|
40
40
|
async changeOwnPassword(e, t) {
|
|
41
|
-
await
|
|
41
|
+
await s.changeOwnPassword(e, t);
|
|
42
42
|
},
|
|
43
43
|
async exportPersonalData(e, t, n) {
|
|
44
|
-
await
|
|
44
|
+
await i.exportPersonalData(e, t, n);
|
|
45
45
|
},
|
|
46
46
|
async createUserAppRoleAssignment(e, t, n) {
|
|
47
47
|
let { data: r } = await u.userCreateAppRoleAssignments(e, t, n);
|
|
@@ -51,8 +51,8 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
|
|
|
51
51
|
await d.sendActivityNotification(e, t, n);
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
},
|
|
55
|
-
let n =
|
|
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":
|
|
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
|
-
},
|
|
84
|
-
let n =
|
|
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,28 +92,28 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
|
|
|
92
92
|
return t || [];
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
},
|
|
96
|
-
let n =
|
|
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
98
|
async getDrive(e, t, r) {
|
|
99
99
|
let { data: i } = await n.getDrive(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, r);
|
|
100
|
-
return
|
|
100
|
+
return T({
|
|
101
101
|
...i,
|
|
102
|
-
serverUrl:
|
|
102
|
+
serverUrl: W(i)
|
|
103
103
|
});
|
|
104
104
|
},
|
|
105
105
|
async createDrive(e, t) {
|
|
106
106
|
let { data: r } = await n.createDrive(e, t);
|
|
107
|
-
return
|
|
107
|
+
return T({
|
|
108
108
|
...r,
|
|
109
|
-
serverUrl:
|
|
109
|
+
serverUrl: W(r)
|
|
110
110
|
});
|
|
111
111
|
},
|
|
112
112
|
async updateDrive(e, t, r) {
|
|
113
113
|
let { data: i } = await n.updateDrive(e, t, r);
|
|
114
|
-
return
|
|
114
|
+
return T({
|
|
115
115
|
...i,
|
|
116
|
-
serverUrl:
|
|
116
|
+
serverUrl: W(i)
|
|
117
117
|
});
|
|
118
118
|
},
|
|
119
119
|
async disableDrive(e, t, r) {
|
|
@@ -130,55 +130,55 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
|
|
|
130
130
|
},
|
|
131
131
|
async listMyDrives(e, t) {
|
|
132
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) =>
|
|
133
|
+
return n.map((e) => T({
|
|
134
134
|
...e,
|
|
135
|
-
serverUrl:
|
|
135
|
+
serverUrl: W(e)
|
|
136
136
|
}));
|
|
137
137
|
},
|
|
138
138
|
async listAllDrives(e, t) {
|
|
139
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) =>
|
|
140
|
+
return n.map((e) => T({
|
|
141
141
|
...e,
|
|
142
|
-
serverUrl:
|
|
142
|
+
serverUrl: W(e)
|
|
143
143
|
}));
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
},
|
|
147
|
-
let
|
|
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
|
-
async getDriveItem(e, t,
|
|
150
|
-
let { data:
|
|
151
|
-
return
|
|
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:
|
|
155
|
-
return
|
|
154
|
+
let { data: i } = await r.createDriveItem(e, null, null, t, n);
|
|
155
|
+
return i;
|
|
156
156
|
},
|
|
157
|
-
async updateDriveItem(e, t,
|
|
158
|
-
let { data: a } = await
|
|
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,
|
|
162
|
-
await
|
|
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
|
|
165
|
+
let { data: n } = await i.followDriveItem(e, t);
|
|
166
166
|
return n;
|
|
167
167
|
},
|
|
168
168
|
async unfollowDriveItem(e, t) {
|
|
169
|
-
await
|
|
169
|
+
await i.unfollowDriveItem(e, t);
|
|
170
170
|
},
|
|
171
171
|
async listSharedByMe(e, t) {
|
|
172
|
-
let { data: n } = await
|
|
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
|
|
176
|
+
let { data: n } = await i.listSharedWithMe(e?.expand, t);
|
|
177
177
|
return n?.value || [];
|
|
178
178
|
}
|
|
179
179
|
};
|
|
180
|
-
},
|
|
181
|
-
let n =
|
|
180
|
+
}, q = ({ axiosClient: e, config: t }) => {
|
|
181
|
+
let n = i(t, t.basePath, e);
|
|
182
182
|
return {
|
|
183
183
|
async listTags(e) {
|
|
184
184
|
let { data: { value: t } } = await n.getTags(e);
|
|
@@ -191,30 +191,30 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
|
|
|
191
191
|
await n.unassignTags(e, t);
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
|
-
},
|
|
195
|
-
let n =
|
|
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
|
-
},
|
|
201
|
-
let
|
|
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
203
|
async getPermission(e, t, n, r, i) {
|
|
204
204
|
let { data: a } = await o.getPermission(e, t, n, i);
|
|
205
|
-
return a.link ?
|
|
205
|
+
return a.link ? E({
|
|
206
206
|
graphPermission: a,
|
|
207
207
|
resourceId: t
|
|
208
|
-
}) :
|
|
208
|
+
}) : D({
|
|
209
209
|
graphPermission: a,
|
|
210
210
|
resourceId: t,
|
|
211
211
|
graphRoles: r || {}
|
|
212
212
|
});
|
|
213
213
|
},
|
|
214
|
-
async listPermissions(e, t,
|
|
214
|
+
async listPermissions(e, t, n, i, a) {
|
|
215
215
|
let s;
|
|
216
216
|
if (e === t) {
|
|
217
|
-
let { data: t } = await
|
|
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
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);
|
|
@@ -222,84 +222,80 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
|
|
|
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 ?
|
|
225
|
+
shares: c.map((e) => e.link ? E({
|
|
226
226
|
graphPermission: e,
|
|
227
227
|
resourceId: t
|
|
228
|
-
}) :
|
|
228
|
+
}) : D({
|
|
229
229
|
graphPermission: e,
|
|
230
230
|
resourceId: t,
|
|
231
|
-
graphRoles:
|
|
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,
|
|
238
|
+
async updatePermission(e, t, n, i, a, s) {
|
|
239
239
|
let c;
|
|
240
240
|
if (e === t) {
|
|
241
|
-
let { data: t } = await
|
|
241
|
+
let { data: t } = await r.updatePermissionSpaceRoot(e, n, i, s);
|
|
242
242
|
c = t;
|
|
243
243
|
} else {
|
|
244
|
-
let { data:
|
|
245
|
-
c =
|
|
244
|
+
let { data: r } = await o.updatePermission(e, t, n, i, s);
|
|
245
|
+
c = r;
|
|
246
246
|
}
|
|
247
|
-
return c.link ?
|
|
247
|
+
return c.link ? E({
|
|
248
248
|
graphPermission: c,
|
|
249
249
|
resourceId: t
|
|
250
|
-
}) :
|
|
250
|
+
}) : D({
|
|
251
251
|
graphPermission: c,
|
|
252
252
|
resourceId: t,
|
|
253
253
|
graphRoles: a || {}
|
|
254
254
|
});
|
|
255
255
|
},
|
|
256
|
-
async deletePermission(e, t,
|
|
257
|
-
|
|
258
|
-
await n.deletePermissionSpaceRoot(e, r, i);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
await o.deletePermission(e, t, r, i);
|
|
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,
|
|
259
|
+
async createInvite(e, t, n, i, a) {
|
|
264
260
|
let s;
|
|
265
261
|
if (e === t) {
|
|
266
|
-
let { data: t } = await
|
|
262
|
+
let { data: t } = await r.inviteSpaceRoot(e, n, a);
|
|
267
263
|
s = t.value?.[0];
|
|
268
264
|
} else {
|
|
269
|
-
let { data:
|
|
270
|
-
s =
|
|
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
|
|
269
|
+
return D({
|
|
274
270
|
graphPermission: s,
|
|
275
271
|
resourceId: t,
|
|
276
272
|
graphRoles: i || {}
|
|
277
273
|
});
|
|
278
274
|
},
|
|
279
|
-
async createLink(e, t,
|
|
275
|
+
async createLink(e, t, n, i) {
|
|
280
276
|
let a;
|
|
281
277
|
if (e === t) {
|
|
282
|
-
let { data: t } = await
|
|
278
|
+
let { data: t } = await r.createLinkSpaceRoot(e, n, i);
|
|
283
279
|
a = t;
|
|
284
280
|
} else {
|
|
285
|
-
let { data:
|
|
286
|
-
a =
|
|
281
|
+
let { data: r } = await o.createLink(e, t, n, i);
|
|
282
|
+
a = r;
|
|
287
283
|
}
|
|
288
|
-
return
|
|
284
|
+
return E({
|
|
289
285
|
graphPermission: a,
|
|
290
286
|
resourceId: t
|
|
291
287
|
});
|
|
292
288
|
},
|
|
293
|
-
async setPermissionPassword(e, t,
|
|
289
|
+
async setPermissionPassword(e, t, n, i, a) {
|
|
294
290
|
let s;
|
|
295
291
|
if (e === t) {
|
|
296
|
-
let { data: t } = await
|
|
292
|
+
let { data: t } = await r.setPermissionPasswordSpaceRoot(e, n, i, a);
|
|
297
293
|
s = t;
|
|
298
294
|
} else {
|
|
299
|
-
let { data:
|
|
300
|
-
s =
|
|
295
|
+
let { data: r } = await o.setPermissionPassword(e, t, n, i, a);
|
|
296
|
+
s = r;
|
|
301
297
|
}
|
|
302
|
-
return
|
|
298
|
+
return E({
|
|
303
299
|
graphPermission: s,
|
|
304
300
|
resourceId: t
|
|
305
301
|
});
|
|
@@ -309,8 +305,8 @@ var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, V
|
|
|
309
305
|
return t;
|
|
310
306
|
}
|
|
311
307
|
};
|
|
312
|
-
},
|
|
313
|
-
let n =
|
|
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
|
|
356
|
+
let r = new y({ basePath: n.href });
|
|
336
357
|
return {
|
|
337
|
-
activities:
|
|
358
|
+
activities: J({
|
|
359
|
+
axiosClient: t,
|
|
360
|
+
config: r
|
|
361
|
+
}),
|
|
362
|
+
applications: U({
|
|
338
363
|
axiosClient: t,
|
|
339
364
|
config: r
|
|
340
365
|
}),
|
|
341
|
-
|
|
366
|
+
tags: q({
|
|
342
367
|
axiosClient: t,
|
|
343
368
|
config: r
|
|
344
369
|
}),
|
|
345
|
-
|
|
370
|
+
drives: G({
|
|
346
371
|
axiosClient: t,
|
|
347
372
|
config: r
|
|
348
373
|
}),
|
|
349
|
-
|
|
374
|
+
driveItems: K({
|
|
350
375
|
axiosClient: t,
|
|
351
376
|
config: r
|
|
352
377
|
}),
|
|
353
|
-
|
|
378
|
+
users: V({
|
|
354
379
|
axiosClient: t,
|
|
355
380
|
config: r
|
|
356
381
|
}),
|
|
357
|
-
|
|
382
|
+
groups: H({
|
|
358
383
|
axiosClient: t,
|
|
359
384
|
config: r
|
|
360
385
|
}),
|
|
361
|
-
|
|
386
|
+
permissions: Y({
|
|
362
387
|
axiosClient: t,
|
|
363
388
|
config: r
|
|
364
389
|
}),
|
|
365
|
-
|
|
390
|
+
photos: X({
|
|
366
391
|
axiosClient: t,
|
|
367
392
|
config: r
|
|
368
393
|
}),
|
|
369
|
-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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 (
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
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) =>
|
|
1122
|
-
let n =
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
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")
|
|
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(
|
|
1209
|
-
return this.disabled
|
|
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),
|
|
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:
|
|
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,
|
|
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:
|
|
1396
|
-
type:
|
|
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: () => !
|
|
1410
|
+
canRename: () => !a,
|
|
1402
1411
|
canDownload: () => !0,
|
|
1403
1412
|
canUpload: () => !0,
|
|
1404
1413
|
canCreate: () => !0,
|
|
1405
|
-
canBeDeleted: () => !
|
|
1414
|
+
canBeDeleted: () => !a,
|
|
1406
1415
|
canEditTags: () => !0,
|
|
1407
|
-
canListVersions: () => !
|
|
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
|
|
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;
|
|
@@ -1453,7 +1462,7 @@ function Dn({ graphPermission: e, resourceId: t, indirect: n = !1 }) {
|
|
|
1453
1462
|
};
|
|
1454
1463
|
}
|
|
1455
1464
|
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;
|
|
1465
|
+
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
1466
|
}
|
|
1458
1467
|
//#endregion
|
|
1459
1468
|
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 };
|