@opencloud-eu/web-client 7.3.0 → 8.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.
- package/dist/{axios-DvF8YTlk.js → axios-ULsDSF3p.js} +842 -626
- package/dist/dist-WdVfmT0d.js +4 -0
- package/dist/{generated-FCm3SbzB.js → generated-CkfYRFme.js} +395 -239
- package/dist/{graph-CppzmKYd.js → graph-D3q1149Y.js} +101 -97
- package/dist/{helpers-MRfkPTnV.js → helpers-C_9em2wB.js} +236 -224
- package/dist/{ocs-gQyxMolJ.js → ocs-CGD-4vGl.js} +1454 -563
- package/dist/ox-D1FgExd1.js +3849 -0
- package/dist/src/graph/generated/api.d.ts +461 -122
- package/dist/src/graph/users/types.d.ts +2 -1
- package/dist/src/helpers/resource/types.d.ts +2 -1
- package/dist/src/helpers/space/types.d.ts +6 -0
- package/dist/src/sse/index.d.ts +2 -0
- package/dist/src/webdav/client/builders.d.ts +3 -2
- package/dist/src/webdav/client/dav.d.ts +8 -2
- package/dist/src/webdav/constants/dav.d.ts +17 -1
- package/dist/src/webdav/listFiles.d.ts +10 -1
- package/dist/src/webdav/restoreFileVersion.d.ts +2 -1
- package/dist/src/webdav/setProperties.d.ts +19 -0
- package/dist/src/webdav/types.d.ts +2 -0
- package/dist/{toString-B4UEwRgf.js → toString-DfgrQ1mh.js} +2 -2
- package/dist/web-client/graph/generated.js +2 -2
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/ocs.js +1 -1
- package/dist/web-client/ox.js +1 -1
- package/dist/web-client/sse.js +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.js +6 -6
- package/dist/{webdav-BMoGCm4T.js → webdav-BxsiETq0.js} +997 -963
- package/package.json +4 -4
- package/dist/dist-CeGfU4rJ.js +0 -810
- package/dist/ox-DIaYdpxw.js +0 -3045
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as x } from "./
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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";
|
|
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";
|
|
5
|
+
//#region ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@7.2.0__supports-color@7.2.0/node_modules/axios/index.js
|
|
6
|
+
var { Axios: ee, AxiosError: D, CanceledError: O, isCancel: k, CancelToken: A, VERSION: j, all: M, Cancel: N, isAxiosError: P, spread: F, toFormData: I, AxiosHeaders: L, HttpStatusCode: R, formToJSON: z, getAdapter: B, mergeConfig: V, create: H } = e, U = ({ axiosClient: e, config: t }) => {
|
|
7
|
+
let 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
8
|
return {
|
|
8
9
|
async getUser(e, t, n) {
|
|
9
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([
|
|
@@ -14,7 +15,7 @@ var T = ({ axiosClient: t, config: n }) => {
|
|
|
14
15
|
return i;
|
|
15
16
|
},
|
|
16
17
|
async createUser(e, t) {
|
|
17
|
-
let { data: n } = await
|
|
18
|
+
let { data: n } = await a.createUser(e, t);
|
|
18
19
|
return n;
|
|
19
20
|
},
|
|
20
21
|
async editUser(e, t, n) {
|
|
@@ -25,30 +26,33 @@ var T = ({ axiosClient: t, config: n }) => {
|
|
|
25
26
|
await r.deleteUser(e, t, n);
|
|
26
27
|
},
|
|
27
28
|
async listUsers(e, t) {
|
|
28
|
-
let { data: { value: n } } = await
|
|
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
30
|
return n;
|
|
30
31
|
},
|
|
31
32
|
async getMe(e, t) {
|
|
32
|
-
let { data: n } = await
|
|
33
|
+
let { data: n } = await o.getOwnUser(e?.expand ? /* @__PURE__ */ new Set([...e.expand]) : /* @__PURE__ */ new Set(["memberOf"]), t);
|
|
33
34
|
return n;
|
|
34
35
|
},
|
|
35
36
|
async editMe(e, t) {
|
|
36
|
-
let { data: n } = await
|
|
37
|
+
let { data: n } = await o.updateOwnUser(e, t);
|
|
37
38
|
return n;
|
|
38
39
|
},
|
|
39
40
|
async changeOwnPassword(e, t) {
|
|
40
|
-
await
|
|
41
|
+
await c.changeOwnPassword(e, t);
|
|
41
42
|
},
|
|
42
43
|
async exportPersonalData(e, t, n) {
|
|
43
44
|
await r.exportPersonalData(e, t, n);
|
|
44
45
|
},
|
|
45
46
|
async createUserAppRoleAssignment(e, t, n) {
|
|
46
|
-
let { data: r } = await
|
|
47
|
+
let { data: r } = await u.userCreateAppRoleAssignments(e, t, n);
|
|
47
48
|
return r;
|
|
49
|
+
},
|
|
50
|
+
async sendActivityNotification(e, t, n) {
|
|
51
|
+
await d.sendActivityNotification(e, t, n);
|
|
48
52
|
}
|
|
49
53
|
};
|
|
50
|
-
},
|
|
51
|
-
let n =
|
|
54
|
+
}, W = ({ axiosClient: e, config: t }) => {
|
|
55
|
+
let n = x(t, t.basePath, e), r = y(t, t.basePath, e);
|
|
52
56
|
return {
|
|
53
57
|
async getGroup(e, t, r) {
|
|
54
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);
|
|
@@ -70,14 +74,14 @@ var T = ({ axiosClient: t, config: n }) => {
|
|
|
70
74
|
return n;
|
|
71
75
|
},
|
|
72
76
|
async addMember(e, r, i) {
|
|
73
|
-
await n.addMember(e, { "@odata.id":
|
|
77
|
+
await n.addMember(e, { "@odata.id": C(t.basePath, "v1.0", "users", r) }, i);
|
|
74
78
|
},
|
|
75
79
|
async deleteMember(e, t, r, i) {
|
|
76
80
|
await n.deleteMember(e, t, r, i);
|
|
77
81
|
}
|
|
78
82
|
};
|
|
79
|
-
},
|
|
80
|
-
let n =
|
|
83
|
+
}, G = ({ axiosClient: e, config: t }) => {
|
|
84
|
+
let n = f(t, t.basePath, e);
|
|
81
85
|
return {
|
|
82
86
|
async getApplication(e, t) {
|
|
83
87
|
let { data: r } = await n.getApplication(e, t);
|
|
@@ -88,28 +92,28 @@ var T = ({ axiosClient: t, config: n }) => {
|
|
|
88
92
|
return t || [];
|
|
89
93
|
}
|
|
90
94
|
};
|
|
91
|
-
},
|
|
92
|
-
let n =
|
|
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);
|
|
93
97
|
return {
|
|
94
98
|
async getDrive(e, t, r) {
|
|
95
99
|
let { data: i } = await n.getDrive(e, t?.select ? /* @__PURE__ */ new Set([...t.select]) : null, r);
|
|
96
|
-
return
|
|
100
|
+
return w({
|
|
97
101
|
...i,
|
|
98
|
-
serverUrl:
|
|
102
|
+
serverUrl: K(i)
|
|
99
103
|
});
|
|
100
104
|
},
|
|
101
105
|
async createDrive(e, t) {
|
|
102
106
|
let { data: r } = await n.createDrive(e, t);
|
|
103
|
-
return
|
|
107
|
+
return w({
|
|
104
108
|
...r,
|
|
105
|
-
serverUrl:
|
|
109
|
+
serverUrl: K(r)
|
|
106
110
|
});
|
|
107
111
|
},
|
|
108
112
|
async updateDrive(e, t, r) {
|
|
109
113
|
let { data: i } = await n.updateDrive(e, t, r);
|
|
110
|
-
return
|
|
114
|
+
return w({
|
|
111
115
|
...i,
|
|
112
|
-
serverUrl:
|
|
116
|
+
serverUrl: K(i)
|
|
113
117
|
});
|
|
114
118
|
},
|
|
115
119
|
async disableDrive(e, t, r) {
|
|
@@ -117,37 +121,37 @@ var T = ({ axiosClient: t, config: n }) => {
|
|
|
117
121
|
},
|
|
118
122
|
async deleteDrive(e, t, r) {
|
|
119
123
|
await n.deleteDrive(e, t, {
|
|
124
|
+
...r,
|
|
120
125
|
headers: {
|
|
121
|
-
...r?.headers
|
|
122
|
-
Purge: "T"
|
|
123
|
-
}
|
|
124
|
-
...r && { requestOptions: r } || {}
|
|
126
|
+
...r?.headers,
|
|
127
|
+
common: new L({ Purge: "T" })
|
|
128
|
+
}
|
|
125
129
|
});
|
|
126
130
|
},
|
|
127
131
|
async listMyDrives(e, t) {
|
|
128
|
-
let { data: { value: n } } = await
|
|
129
|
-
return n.map((e) =>
|
|
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) => w({
|
|
130
134
|
...e,
|
|
131
|
-
serverUrl:
|
|
135
|
+
serverUrl: K(e)
|
|
132
136
|
}));
|
|
133
137
|
},
|
|
134
138
|
async listAllDrives(e, t) {
|
|
135
|
-
let { data: { value: n } } = await
|
|
136
|
-
return n.map((e) =>
|
|
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) => w({
|
|
137
141
|
...e,
|
|
138
|
-
serverUrl:
|
|
142
|
+
serverUrl: K(e)
|
|
139
143
|
}));
|
|
140
144
|
}
|
|
141
145
|
};
|
|
142
|
-
},
|
|
143
|
-
let i =
|
|
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);
|
|
144
148
|
return {
|
|
145
149
|
async getDriveItem(e, t, n) {
|
|
146
150
|
let { data: r } = await i.getDriveItem(e, t, void 0, n);
|
|
147
151
|
return r;
|
|
148
152
|
},
|
|
149
153
|
async createDriveItem(e, t, n) {
|
|
150
|
-
let { data: r } = await a.createDriveItem(e, t, n);
|
|
154
|
+
let { data: r } = await a.createDriveItem(e, null, null, t, n);
|
|
151
155
|
return r;
|
|
152
156
|
},
|
|
153
157
|
async updateDriveItem(e, t, n, r) {
|
|
@@ -173,8 +177,8 @@ var T = ({ axiosClient: t, config: n }) => {
|
|
|
173
177
|
return n?.value || [];
|
|
174
178
|
}
|
|
175
179
|
};
|
|
176
|
-
},
|
|
177
|
-
let n =
|
|
180
|
+
}, Y = ({ axiosClient: e, config: t }) => {
|
|
181
|
+
let n = u(t, t.basePath, e);
|
|
178
182
|
return {
|
|
179
183
|
async listTags(e) {
|
|
180
184
|
let { data: { value: t } } = await n.getTags(e);
|
|
@@ -187,115 +191,115 @@ var T = ({ axiosClient: t, config: n }) => {
|
|
|
187
191
|
await n.unassignTags(e, t);
|
|
188
192
|
}
|
|
189
193
|
};
|
|
190
|
-
},
|
|
191
|
-
let n =
|
|
194
|
+
}, X = ({ axiosClient: e, config: t }) => {
|
|
195
|
+
let n = g(t, t.basePath, e);
|
|
192
196
|
return { async listActivities(e, t) {
|
|
193
197
|
let { data: { value: r } } = await n.getActivities(e, t);
|
|
194
198
|
return r || [];
|
|
195
199
|
} };
|
|
196
|
-
},
|
|
197
|
-
let
|
|
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);
|
|
198
202
|
return {
|
|
199
203
|
async getPermission(e, t, n, r, i) {
|
|
200
|
-
let { data:
|
|
201
|
-
return
|
|
202
|
-
graphPermission:
|
|
204
|
+
let { data: a } = await o.getPermission(e, t, n, i);
|
|
205
|
+
return a.link ? T({
|
|
206
|
+
graphPermission: a,
|
|
203
207
|
resourceId: t
|
|
204
|
-
}) :
|
|
205
|
-
graphPermission:
|
|
208
|
+
}) : E({
|
|
209
|
+
graphPermission: a,
|
|
206
210
|
resourceId: t,
|
|
207
211
|
graphRoles: r || {}
|
|
208
212
|
});
|
|
209
213
|
},
|
|
210
|
-
async listPermissions(e, t,
|
|
214
|
+
async listPermissions(e, t, r, i, a) {
|
|
211
215
|
let s;
|
|
212
216
|
if (e === t) {
|
|
213
|
-
let { data: t } = await
|
|
217
|
+
let { data: t } = await n.listPermissionsSpaceRoot(e, i?.filter, i?.select ? /* @__PURE__ */ new Set([...i.select]) : null, i?.count, i?.top || 0, a);
|
|
214
218
|
s = t;
|
|
215
219
|
} else {
|
|
216
|
-
let { data: n } = await
|
|
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);
|
|
217
221
|
s = n;
|
|
218
222
|
}
|
|
219
223
|
let c = s.value || [], l = s["@libre.graph.permissions.actions.allowedValues"], u = s["@libre.graph.permissions.roles.allowedValues"], d = s["@odata.count"];
|
|
220
224
|
return {
|
|
221
|
-
shares: c.map((e) => e.link ?
|
|
225
|
+
shares: c.map((e) => e.link ? T({
|
|
222
226
|
graphPermission: e,
|
|
223
227
|
resourceId: t
|
|
224
|
-
}) :
|
|
228
|
+
}) : E({
|
|
225
229
|
graphPermission: e,
|
|
226
230
|
resourceId: t,
|
|
227
|
-
graphRoles:
|
|
231
|
+
graphRoles: r || {}
|
|
228
232
|
})),
|
|
229
233
|
allowedActions: l,
|
|
230
234
|
allowedRoles: u,
|
|
231
235
|
count: d
|
|
232
236
|
};
|
|
233
237
|
},
|
|
234
|
-
async updatePermission(e, t,
|
|
238
|
+
async updatePermission(e, t, r, i, a, s) {
|
|
235
239
|
let c;
|
|
236
240
|
if (e === t) {
|
|
237
|
-
let { data: t } = await
|
|
241
|
+
let { data: t } = await n.updatePermissionSpaceRoot(e, r, i, s);
|
|
238
242
|
c = t;
|
|
239
243
|
} else {
|
|
240
|
-
let { data:
|
|
241
|
-
c =
|
|
244
|
+
let { data: n } = await o.updatePermission(e, t, r, i, s);
|
|
245
|
+
c = n;
|
|
242
246
|
}
|
|
243
|
-
return c.link ?
|
|
247
|
+
return c.link ? T({
|
|
244
248
|
graphPermission: c,
|
|
245
249
|
resourceId: t
|
|
246
|
-
}) :
|
|
250
|
+
}) : E({
|
|
247
251
|
graphPermission: c,
|
|
248
252
|
resourceId: t,
|
|
249
|
-
graphRoles:
|
|
253
|
+
graphRoles: a || {}
|
|
250
254
|
});
|
|
251
255
|
},
|
|
252
|
-
async deletePermission(e, t,
|
|
256
|
+
async deletePermission(e, t, r, i) {
|
|
253
257
|
if (e === t) {
|
|
254
|
-
await
|
|
258
|
+
await n.deletePermissionSpaceRoot(e, r, i);
|
|
255
259
|
return;
|
|
256
260
|
}
|
|
257
|
-
await
|
|
261
|
+
await o.deletePermission(e, t, r, i);
|
|
258
262
|
},
|
|
259
|
-
async createInvite(e, t,
|
|
263
|
+
async createInvite(e, t, r, i, a) {
|
|
260
264
|
let s;
|
|
261
265
|
if (e === t) {
|
|
262
|
-
let { data: t } = await
|
|
266
|
+
let { data: t } = await n.inviteSpaceRoot(e, r, a);
|
|
263
267
|
s = t.value?.[0];
|
|
264
268
|
} else {
|
|
265
|
-
let { data:
|
|
266
|
-
s =
|
|
269
|
+
let { data: n } = await o.invite(e, t, r, a);
|
|
270
|
+
s = n.value?.[0];
|
|
267
271
|
}
|
|
268
272
|
if (!s) throw Error("no permission returned");
|
|
269
|
-
return
|
|
273
|
+
return E({
|
|
270
274
|
graphPermission: s,
|
|
271
275
|
resourceId: t,
|
|
272
276
|
graphRoles: i || {}
|
|
273
277
|
});
|
|
274
278
|
},
|
|
275
|
-
async createLink(e, t,
|
|
276
|
-
let
|
|
279
|
+
async createLink(e, t, r, i) {
|
|
280
|
+
let a;
|
|
277
281
|
if (e === t) {
|
|
278
|
-
let { data: t } = await
|
|
279
|
-
|
|
282
|
+
let { data: t } = await n.createLinkSpaceRoot(e, r, i);
|
|
283
|
+
a = t;
|
|
280
284
|
} else {
|
|
281
|
-
let { data:
|
|
282
|
-
|
|
285
|
+
let { data: n } = await o.createLink(e, t, r, i);
|
|
286
|
+
a = n;
|
|
283
287
|
}
|
|
284
|
-
return
|
|
285
|
-
graphPermission:
|
|
288
|
+
return T({
|
|
289
|
+
graphPermission: a,
|
|
286
290
|
resourceId: t
|
|
287
291
|
});
|
|
288
292
|
},
|
|
289
|
-
async setPermissionPassword(e, t,
|
|
293
|
+
async setPermissionPassword(e, t, r, i, a) {
|
|
290
294
|
let s;
|
|
291
295
|
if (e === t) {
|
|
292
|
-
let { data: t } = await
|
|
296
|
+
let { data: t } = await n.setPermissionPasswordSpaceRoot(e, r, i, a);
|
|
293
297
|
s = t;
|
|
294
298
|
} else {
|
|
295
|
-
let { data:
|
|
296
|
-
s =
|
|
299
|
+
let { data: n } = await o.setPermissionPassword(e, t, r, i, a);
|
|
300
|
+
s = n;
|
|
297
301
|
}
|
|
298
|
-
return
|
|
302
|
+
return T({
|
|
299
303
|
graphPermission: s,
|
|
300
304
|
resourceId: t
|
|
301
305
|
});
|
|
@@ -305,8 +309,8 @@ var T = ({ axiosClient: t, config: n }) => {
|
|
|
305
309
|
return t;
|
|
306
310
|
}
|
|
307
311
|
};
|
|
308
|
-
},
|
|
309
|
-
let n =
|
|
312
|
+
}, Q = ({ axiosClient: e, config: t }) => {
|
|
313
|
+
let n = _(t, t.basePath, e), r = v(t, t.basePath, e);
|
|
310
314
|
return {
|
|
311
315
|
async getOwnUserPhoto(e) {
|
|
312
316
|
let { data: t } = await n.getOwnUserPhoto(e);
|
|
@@ -325,48 +329,48 @@ var T = ({ axiosClient: t, config: n }) => {
|
|
|
325
329
|
return n;
|
|
326
330
|
}
|
|
327
331
|
};
|
|
328
|
-
},
|
|
332
|
+
}, $ = (e, t) => {
|
|
329
333
|
let n = new URL(e);
|
|
330
334
|
n.pathname = [...n.pathname.split("/"), "graph"].filter(Boolean).join("/");
|
|
331
|
-
let r = new
|
|
335
|
+
let r = new b({ basePath: n.href });
|
|
332
336
|
return {
|
|
333
|
-
activities:
|
|
337
|
+
activities: X({
|
|
334
338
|
axiosClient: t,
|
|
335
339
|
config: r
|
|
336
340
|
}),
|
|
337
|
-
applications:
|
|
341
|
+
applications: G({
|
|
338
342
|
axiosClient: t,
|
|
339
343
|
config: r
|
|
340
344
|
}),
|
|
341
|
-
tags:
|
|
345
|
+
tags: Y({
|
|
342
346
|
axiosClient: t,
|
|
343
347
|
config: r
|
|
344
348
|
}),
|
|
345
|
-
drives:
|
|
349
|
+
drives: q({
|
|
346
350
|
axiosClient: t,
|
|
347
351
|
config: r
|
|
348
352
|
}),
|
|
349
|
-
driveItems:
|
|
353
|
+
driveItems: J({
|
|
350
354
|
axiosClient: t,
|
|
351
355
|
config: r
|
|
352
356
|
}),
|
|
353
|
-
users:
|
|
357
|
+
users: U({
|
|
354
358
|
axiosClient: t,
|
|
355
359
|
config: r
|
|
356
360
|
}),
|
|
357
|
-
groups:
|
|
361
|
+
groups: W({
|
|
358
362
|
axiosClient: t,
|
|
359
363
|
config: r
|
|
360
364
|
}),
|
|
361
|
-
permissions:
|
|
365
|
+
permissions: Z({
|
|
362
366
|
axiosClient: t,
|
|
363
367
|
config: r
|
|
364
368
|
}),
|
|
365
|
-
photos:
|
|
369
|
+
photos: Q({
|
|
366
370
|
axiosClient: t,
|
|
367
371
|
config: r
|
|
368
372
|
})
|
|
369
373
|
};
|
|
370
374
|
};
|
|
371
375
|
//#endregion
|
|
372
|
-
export {
|
|
376
|
+
export { $ as t };
|