@opencloud-eu/web-client 7.4.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.
- package/dist/{axios-CAceQWl5.js → axios-CiL7Z3dm.js} +837 -623
- package/dist/dist-p2k0FYjB.js +4 -0
- package/dist/{generated-CSkivkhn.js → generated-5SvS30Rr.js} +350 -324
- package/dist/graph-u53S3WT9.js +376 -0
- package/dist/{helpers-hr58GB0t.js → helpers-CrYtf7Ol.js} +9 -3
- package/dist/{ocs-BupRjiCI.js → ocs-CDSkdguM.js} +1282 -429
- package/dist/schemas-BlxXwTjV.js +3959 -0
- package/dist/src/graph/generated/api.d.ts +256 -152
- package/dist/src/helpers/resource/types.d.ts +3 -2
- package/dist/src/sse/index.d.ts +12 -0
- package/dist/src/webdav/constants/dav.d.ts +5 -1
- package/dist/{toString-Y_fh2BSJ.js → toString-CVetDRwx.js} +1 -1
- 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 +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-BdeuuZHv.js +6422 -0
- package/package.json +4 -4
- package/dist/dist-Ciqaw6jy.js +0 -812
- package/dist/graph-BDtqSczU.js +0 -375
- package/dist/ox-DIaYdpxw.js +0 -3045
- package/dist/webdav-BE0Z-EcD.js +0 -4538
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DavFileInfoResponse } from '@opencloud-eu/web-client/webdav';
|
|
2
|
-
import { Audio, GeoCoordinates, Identity, Image, Photo, User } from '../../graph/generated';
|
|
2
|
+
import { Audio, GeoCoordinates, Identity, Image, MotionPhoto, Photo, User } from '../../graph/generated';
|
|
3
3
|
import { MongoAbility, SubjectRawRule } from '@casl/ability';
|
|
4
4
|
import { DAVResultResponseProps, FileStat } from 'webdav';
|
|
5
5
|
export type AbilityActions = 'create' | 'create-all' | 'delete' | 'delete-all' | 'read' | 'read-all' | 'set-quota' | 'set-quota-all' | 'update' | 'update-all';
|
|
6
|
-
export type AbilitySubjects = 'Account' | 'Announcement' | 'Drive' | 'Favorite' | 'Group' | 'Language' | 'Logo' | 'PublicLink' | 'ReadOnlyPublicLinkPassword' | 'Role' | 'Setting' | 'Share';
|
|
6
|
+
export type AbilitySubjects = 'Account' | 'Announcement' | 'Drive' | 'Favorite' | 'Group' | 'GuestInvite' | 'Language' | 'Logo' | 'PublicLink' | 'ReadOnlyPublicLinkPassword' | 'Role' | 'Setting' | 'Share';
|
|
7
7
|
export type Ability = MongoAbility<[AbilityActions, AbilitySubjects]>;
|
|
8
8
|
export type AbilityRule = SubjectRawRule<AbilityActions, AbilitySubjects, any>;
|
|
9
9
|
export interface Resource {
|
|
@@ -18,6 +18,7 @@ export interface Resource {
|
|
|
18
18
|
location?: GeoCoordinates;
|
|
19
19
|
image?: Image;
|
|
20
20
|
photo?: Photo;
|
|
21
|
+
motionPhoto?: MotionPhoto;
|
|
21
22
|
path: string;
|
|
22
23
|
webDavPath?: string;
|
|
23
24
|
downloadURL?: string;
|
package/dist/src/sse/index.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { FetchEventSourceInit } from '@microsoft/fetch-event-source';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/** Payload of every file and space related SSE event. */
|
|
4
|
+
export declare const sseEventSchema: z.ZodObject<{
|
|
5
|
+
itemid: z.ZodOptional<z.ZodString>;
|
|
6
|
+
parentitemid: z.ZodOptional<z.ZodString>;
|
|
7
|
+
spaceid: z.ZodOptional<z.ZodString>;
|
|
8
|
+
initiatorid: z.ZodOptional<z.ZodString>;
|
|
9
|
+
etag: z.ZodOptional<z.ZodString>;
|
|
10
|
+
affecteduserids: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
11
|
+
sessionid: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type SseEventData = z.infer<typeof sseEventSchema>;
|
|
2
14
|
export declare enum MESSAGE_TYPE {
|
|
3
15
|
NOTIFICATION = "userlog-notification",
|
|
4
16
|
POSTPROCESSING_FINISHED = "postprocessing-finished",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Audio, GeoCoordinates, Image, Photo } from '../../graph/generated';
|
|
1
|
+
import { Audio, GeoCoordinates, Image, MotionPhoto, Photo } from '../../graph/generated';
|
|
2
2
|
export declare abstract class DavPermission {
|
|
3
3
|
static readonly Shared: string;
|
|
4
4
|
static readonly Shareable: string;
|
|
@@ -58,6 +58,10 @@ declare const DavPropertyMapping: {
|
|
|
58
58
|
readonly value: "photo";
|
|
59
59
|
readonly type: Photo;
|
|
60
60
|
};
|
|
61
|
+
readonly MotionPhoto: {
|
|
62
|
+
readonly value: "motion-photo";
|
|
63
|
+
readonly type: MotionPhoto;
|
|
64
|
+
};
|
|
61
65
|
readonly ETag: M<"getetag", string>;
|
|
62
66
|
readonly MimeType: M<"getcontenttype", string>;
|
|
63
67
|
readonly ResourceType: M<"resourcetype", string[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as e } from "./dist-p2k0FYjB.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js
|
|
3
3
|
var t = typeof e == "object" && e && e.Object === Object && e, n = typeof self == "object" && self && self.Object === Object && self, r = t || n || Function("return this")(), i = r.Symbol, a = Object.prototype, ee = a.hasOwnProperty, te = a.toString, o = i ? i.toStringTag : void 0;
|
|
4
4
|
function ne(e) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as e, $t as t, A as n, An as r, At as i, B as a,
|
|
2
|
-
export {
|
|
1
|
+
import { $ as e, $t as t, A as n, An as r, At as i, B as a, Bn as o, Bt as s, C as c, Cn as l, Ct as u, D as d, Dn as f, Dt as p, E as m, En as h, Et as g, F as _, Fn as v, Ft as y, G as b, Gt as x, H as S, Hn as C, Ht as w, I as T, In as E, It as D, J as O, Jt as k, K as A, Kt as j, L as M, Ln as N, Lt as P, M as F, Mn as I, Mt as L, N as R, Nn as z, Nt as B, O as V, On as H, Ot as U, P as W, Pn as G, Pt as K, Q as q, Qt as J, R as Y, Rn as X, Rt as Z, S as Q, Sn as $, St as ee, T as te, Tn as ne, Tt as re, U as ie, Un as ae, Ut as oe, V as se, Vn as ce, Vt as le, W as ue, Wn as de, Wt as fe, X as pe, Xt as me, Y as he, Yt as ge, Z as _e, Zt as ve, _ as ye, _n as be, _t as xe, a as Se, an as Ce, at as we, b as Te, bn as Ee, bt as De, c as Oe, cn as ke, ct as Ae, d as je, dn as Me, dt as Ne, en as Pe, et as Fe, f as Ie, fn as Le, ft as Re, g as ze, gn as Be, gt as Ve, h as He, hn as Ue, ht as We, i as Ge, in as Ke, it as qe, j as Je, jn as Ye, jt as Xe, k as Ze, kn as Qe, kt as $e, l as et, ln as tt, lt as nt, m as rt, mn as it, mt as at, n as ot, nn as st, nt as ct, o as lt, on as ut, ot as dt, p as ft, pn as pt, pt as mt, q as ht, qt as gt, r as _t, rn as vt, rt as yt, s as bt, sn as xt, st as St, t as Ct, tn as wt, tt as Tt, u as Et, un as Dt, ut as Ot, v as kt, vn as At, vt as jt, w as Mt, wn as Nt, wt as Pt, x as Ft, xn as It, xt as Lt, y as Rt, yn as zt, yt as Bt, z as Vt, zn as Ht, zt as Ut } from "../../generated-5SvS30Rr.js";
|
|
2
|
+
export { ot as ActivitiesApi, _t as ActivitiesApiAxiosParamCreator, Ge as ActivitiesApiFactory, Se as ActivitiesApiFp, lt as ApplicationsApi, bt as ApplicationsApiAxiosParamCreator, Oe as ApplicationsApiFactory, et as ApplicationsApiFp, Ct as Configuration, Et as CreateChildDriveItemAtLibreGraphConflictBehaviorEnum, je as CreateChildDriveItemAtLibreGraphMissingParentsBehaviorEnum, Ie as CreateDriveItemAtLibreGraphConflictBehaviorEnum, ft as CreateDriveItemAtLibreGraphMissingParentsBehaviorEnum, rt as DriveItemApi, He as DriveItemApiAxiosParamCreator, ze as DriveItemApiFactory, ye as DriveItemApiFp, kt as DriveItemAtLibreGraphShareTypesEnum, Rt as DrivesApi, Te as DrivesApiAxiosParamCreator, Ft as DrivesApiFactory, Q as DrivesApiFp, c as DrivesGetDrivesApi, Mt as DrivesGetDrivesApiAxiosParamCreator, te as DrivesGetDrivesApiFactory, m as DrivesGetDrivesApiFp, d as DrivesPermissionsApi, V as DrivesPermissionsApiAxiosParamCreator, Ze as DrivesPermissionsApiFactory, n as DrivesPermissionsApiFp, Je as DrivesRootApi, F as DrivesRootApiAxiosParamCreator, R as DrivesRootApiFactory, W as DrivesRootApiFp, _ as EducationClassApi, T as EducationClassApiAxiosParamCreator, M as EducationClassApiFactory, Y as EducationClassApiFp, Vt as EducationClassClassificationEnum, a as EducationClassTeachersApi, se as EducationClassTeachersApiAxiosParamCreator, S as EducationClassTeachersApiFactory, ie as EducationClassTeachersApiFp, ue as EducationSchoolApi, b as EducationSchoolApiAxiosParamCreator, A as EducationSchoolApiFactory, ht as EducationSchoolApiFp, O as EducationUserApi, he as EducationUserApiAxiosParamCreator, pe as EducationUserApiFactory, _e as EducationUserApiFp, q as GetDriveItemChildrenSelectEnum, e as GetDriveItemExpandEnum, Fe as GetDriveItemSelectEnum, Tt as GetDriveItemV1ExpandEnum, ct as GetDriveItemV1SelectEnum, yt as GetDriveSelectEnum, qe as GetEducationUserExpandEnum, we as GetGroupExpandEnum, dt as GetGroupSelectEnum, St as GetOwnUserExpandEnum, Ae as GetRootExpandEnum, nt as GetRootSelectEnum, Ot as GetUserExpandEnum, Ne as GetUserSelectEnum, Re as GroupApi, mt as GroupApiAxiosParamCreator, at as GroupApiFactory, We as GroupApiFp, Ve as GroupsApi, xe as GroupsApiAxiosParamCreator, jt as GroupsApiFactory, Bt as GroupsApiFp, De as HomeGetChildrenSelectEnum, Lt as HomeGetRootExpandEnum, ee as HomeGetRootSelectEnum, u as InvitationsApi, Pt as InvitationsApiAxiosParamCreator, re as InvitationsApiFactory, g as InvitationsApiFp, p as ListAllDrivesBetaSelectEnum, U as ListEducationUsersExpandEnum, $e as ListEducationUsersOrderbyEnum, i as ListGroupsExpandEnum, Xe as ListGroupsOrderbyEnum, L as ListGroupsSelectEnum, B as ListMyDrivesBetaSelectEnum, K as ListPermissionsSelectEnum, y as ListPermissionsSpaceRootSelectEnum, D as ListSharedByMeExpandEnum, P as ListSharedWithMeExpandEnum, Z as ListUsersExpandEnum, Ut as ListUsersOrderbyEnum, s as ListUsersSelectEnum, le as LockInfoLockTypeEnum, w as MeChangepasswordApi, oe as MeChangepasswordApiAxiosParamCreator, fe as MeChangepasswordApiFactory, x as MeChangepasswordApiFp, j as MeDriveApi, gt as MeDriveApiAxiosParamCreator, k as MeDriveApiFactory, ge as MeDriveApiFp, me as MeDriveRootApi, ve as MeDriveRootApiAxiosParamCreator, J as MeDriveRootApiFactory, t as MeDriveRootApiFp, Pe as MeDriveRootChildrenApi, wt as MeDriveRootChildrenApiAxiosParamCreator, st as MeDriveRootChildrenApiFactory, vt as MeDriveRootChildrenApiFp, Ke as MeDrivesApi, Ce as MeDrivesApiAxiosParamCreator, ut as MeDrivesApiFactory, xt as MeDrivesApiFp, ke as MePhotoApi, tt as MePhotoApiAxiosParamCreator, Dt as MePhotoApiFactory, Me as MePhotoApiFp, Le as MeUserApi, pt as MeUserApiAxiosParamCreator, it as MeUserApiFactory, Ue as MeUserApiFp, Be as RoleManagementApi, be as RoleManagementApiAxiosParamCreator, At as RoleManagementApiFactory, zt as RoleManagementApiFp, Ee as SharingLinkType, It as TagsApi, $ as TagsApiAxiosParamCreator, l as TagsApiFactory, Nt as TagsApiFp, ne as UserApi, h as UserApiAxiosParamCreator, f as UserApiFactory, H as UserApiFp, Qe as UserAppRoleAssignmentApi, r as UserAppRoleAssignmentApiAxiosParamCreator, Ye as UserAppRoleAssignmentApiFactory, I as UserAppRoleAssignmentApiFp, z as UserPhotoApi, G as UserPhotoApiAxiosParamCreator, v as UserPhotoApiFactory, E as UserPhotoApiFp, N as UserTeamworkApi, X as UserTeamworkApiAxiosParamCreator, Ht as UserTeamworkApiFactory, o as UserTeamworkApiFp, ce as UsersApi, C as UsersApiAxiosParamCreator, ae as UsersApiFactory, de as UsersApiFp };
|
package/dist/web-client/graph.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../graph-
|
|
1
|
+
import { t as e } from "../graph-u53S3WT9.js";
|
|
2
2
|
export { e as graph };
|
package/dist/web-client/ocs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { o as e, t } from "../ocs-
|
|
1
|
+
import { o as e, t } from "../ocs-CDSkdguM.js";
|
|
2
2
|
export { e as GetCapabilitiesFactory, t as ocs };
|
package/dist/web-client/ox.js
CHANGED
|
@@ -1,2 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as e } from "../urlJoin-_pUL1TUx.js";
|
|
2
|
+
import { a as t, i as n, n as r, o as i, r as a, t as o } from "../schemas-BlxXwTjV.js";
|
|
3
|
+
//#region src/ox/types.ts
|
|
4
|
+
var s = n({
|
|
5
|
+
id: t(),
|
|
6
|
+
displayName: t(),
|
|
7
|
+
email: t()
|
|
8
|
+
}), c = n({ data: r(r(i([
|
|
9
|
+
t(),
|
|
10
|
+
a(),
|
|
11
|
+
o()
|
|
12
|
+
]))) }), l = n({ data: n({ id: t() }) }), u = "1,500,555,556,557", d = (t, n) => ({
|
|
13
|
+
async autocompleteContacts({ query: i, signal: a }) {
|
|
14
|
+
let o = n();
|
|
15
|
+
if (!o) return [];
|
|
16
|
+
let { data: l } = await t.get(e(o, "addressbooks"), {
|
|
17
|
+
params: {
|
|
18
|
+
action: "autocomplete",
|
|
19
|
+
query: i,
|
|
20
|
+
columns: u,
|
|
21
|
+
email: !0
|
|
22
|
+
},
|
|
23
|
+
signal: a
|
|
24
|
+
}), { data: d } = c.parse(l), f = d.map(([e, t, n, r, i]) => ({
|
|
25
|
+
id: String(e ?? ""),
|
|
26
|
+
displayName: String(t ?? ""),
|
|
27
|
+
email: String(n || r || i || "")
|
|
28
|
+
})).filter((e) => !!e.email);
|
|
29
|
+
return r(s).parse(f);
|
|
30
|
+
},
|
|
31
|
+
async sendMail({ from: r, to: i, subject: a, htmlContent: o, signal: s }) {
|
|
32
|
+
let c = n();
|
|
33
|
+
if (!c) throw Error("Open-Xchange API url is not configured");
|
|
34
|
+
let { data: u } = await t.post(e(c, "mail", "compose"), [], {
|
|
35
|
+
params: { type: "new" },
|
|
36
|
+
signal: s
|
|
37
|
+
}), { data: d } = l.parse(u), f = [r.name ?? "", r.email], p = new FormData();
|
|
38
|
+
p.append("JSON", JSON.stringify({
|
|
39
|
+
from: f,
|
|
40
|
+
sender: f,
|
|
41
|
+
to: [[i.name ?? "", i.email]],
|
|
42
|
+
subject: a,
|
|
43
|
+
content: o,
|
|
44
|
+
contentType: "text/html"
|
|
45
|
+
})), await t.post(e(c, "mail", "compose", d.id, "send"), p, { signal: s });
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
//#endregion
|
|
49
|
+
export { s as ContactSchema, c as OxAutocompleteResponseSchema, l as OxComposeSpaceResponseSchema, d as ox };
|
package/dist/web-client/sse.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
+
import { a as e, i as t, n } from "../schemas-BlxXwTjV.js";
|
|
1
2
|
//#region ../../node_modules/.pnpm/@microsoft+fetch-event-source@2.0.1/node_modules/@microsoft/fetch-event-source/lib/esm/parse.js
|
|
2
|
-
async function
|
|
3
|
+
async function r(e, t) {
|
|
3
4
|
let n = e.getReader(), r;
|
|
4
5
|
for (; !(r = await n.read()).done;) t(r.value);
|
|
5
6
|
}
|
|
6
|
-
function
|
|
7
|
-
let t, n,
|
|
8
|
-
return function(
|
|
9
|
-
t === void 0 ? (t =
|
|
7
|
+
function i(e) {
|
|
8
|
+
let t, n, r, i = !1;
|
|
9
|
+
return function(a) {
|
|
10
|
+
t === void 0 ? (t = a, n = 0, r = -1) : t = o(t, a);
|
|
10
11
|
let s = t.length, c = 0;
|
|
11
12
|
for (; n < s;) {
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
for (; n < s &&
|
|
13
|
+
i &&= (t[n] === 10 && (c = ++n), !1);
|
|
14
|
+
let a = -1;
|
|
15
|
+
for (; n < s && a === -1; ++n) switch (t[n]) {
|
|
15
16
|
case 58:
|
|
16
|
-
|
|
17
|
+
r === -1 && (r = n - c);
|
|
17
18
|
break;
|
|
18
|
-
case 13:
|
|
19
|
-
case 10:
|
|
19
|
+
case 13: i = !0;
|
|
20
|
+
case 10: a = n;
|
|
20
21
|
}
|
|
21
|
-
if (
|
|
22
|
-
e(t.subarray(c,
|
|
22
|
+
if (a === -1) break;
|
|
23
|
+
e(t.subarray(c, a), r), c = n, r = -1;
|
|
23
24
|
}
|
|
24
25
|
c === s ? t = void 0 : c !== 0 && (t = t.subarray(c), n -= c);
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
let r =
|
|
29
|
-
return function(
|
|
30
|
-
if (
|
|
31
|
-
else if (
|
|
32
|
-
let n =
|
|
28
|
+
function a(e, t, n) {
|
|
29
|
+
let r = s(), i = new TextDecoder();
|
|
30
|
+
return function(a, o) {
|
|
31
|
+
if (a.length === 0) n?.(r), r = s();
|
|
32
|
+
else if (o > 0) {
|
|
33
|
+
let n = i.decode(a.subarray(0, o)), s = o + (a[o + 1] === 32 ? 2 : 1), c = i.decode(a.subarray(s));
|
|
33
34
|
switch (n) {
|
|
34
35
|
case "data":
|
|
35
36
|
r.data = r.data ? r.data + "\n" + c : c;
|
|
@@ -47,11 +48,11 @@ function n(e, t, n) {
|
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function o(e, t) {
|
|
51
52
|
let n = new Uint8Array(e.length + t.length);
|
|
52
53
|
return n.set(e), n.set(t, e.length), n;
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
+
function s() {
|
|
55
56
|
return {
|
|
56
57
|
data: "",
|
|
57
58
|
event: "",
|
|
@@ -61,14 +62,14 @@ function i() {
|
|
|
61
62
|
}
|
|
62
63
|
//#endregion
|
|
63
64
|
//#region ../../node_modules/.pnpm/@microsoft+fetch-event-source@2.0.1/node_modules/@microsoft/fetch-event-source/lib/esm/fetch.js
|
|
64
|
-
var
|
|
65
|
+
var c = function(e, t) {
|
|
65
66
|
var n = {};
|
|
66
67
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
67
68
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
68
69
|
return n;
|
|
69
|
-
},
|
|
70
|
-
function
|
|
71
|
-
var { signal:
|
|
70
|
+
}, l = "text/event-stream", u = 1e3, d = "last-event-id";
|
|
71
|
+
function f(e, t) {
|
|
72
|
+
var { signal: n, headers: o, onopen: s, onmessage: f, onclose: m, onerror: h, openWhenHidden: g, fetch: _ } = t, v = c(t, [
|
|
72
73
|
"signal",
|
|
73
74
|
"headers",
|
|
74
75
|
"onopen",
|
|
@@ -78,57 +79,65 @@ function l(r, i) {
|
|
|
78
79
|
"openWhenHidden",
|
|
79
80
|
"fetch"
|
|
80
81
|
]);
|
|
81
|
-
return new Promise((
|
|
82
|
-
let y = Object.assign({},
|
|
83
|
-
y.accept ||=
|
|
82
|
+
return new Promise((t, c) => {
|
|
83
|
+
let y = Object.assign({}, o);
|
|
84
|
+
y.accept ||= l;
|
|
84
85
|
let b;
|
|
85
86
|
function x() {
|
|
86
87
|
b.abort(), document.hidden || D();
|
|
87
88
|
}
|
|
88
89
|
g || document.addEventListener("visibilitychange", x);
|
|
89
|
-
let S =
|
|
90
|
+
let S = u, C = 0;
|
|
90
91
|
function w() {
|
|
91
92
|
document.removeEventListener("visibilitychange", x), window.clearTimeout(C), b.abort();
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
-
w(),
|
|
94
|
+
n?.addEventListener("abort", () => {
|
|
95
|
+
w(), t();
|
|
95
96
|
});
|
|
96
|
-
let T = _ ?? window.fetch, E =
|
|
97
|
+
let T = _ ?? window.fetch, E = s ?? p;
|
|
97
98
|
async function D() {
|
|
98
99
|
b = new AbortController();
|
|
99
100
|
try {
|
|
100
|
-
let
|
|
101
|
+
let n = await T(e, Object.assign(Object.assign({}, v), {
|
|
101
102
|
headers: y,
|
|
102
103
|
signal: b.signal
|
|
103
104
|
}));
|
|
104
|
-
await E(
|
|
105
|
-
e ? y[
|
|
105
|
+
await E(n), await r(n.body, i(a((e) => {
|
|
106
|
+
e ? y[d] = e : delete y[d];
|
|
106
107
|
}, (e) => {
|
|
107
108
|
S = e;
|
|
108
|
-
},
|
|
109
|
+
}, f))), m?.(), w(), t();
|
|
109
110
|
} catch (e) {
|
|
110
111
|
if (!b.signal.aborted) try {
|
|
111
112
|
let t = h?.(e) ?? S;
|
|
112
113
|
window.clearTimeout(C), C = window.setTimeout(D, t);
|
|
113
114
|
} catch (e) {
|
|
114
|
-
w(),
|
|
115
|
+
w(), c(e);
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
D();
|
|
119
120
|
});
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
+
function p(e) {
|
|
122
123
|
let t = e.headers.get("content-type");
|
|
123
|
-
if (!t?.startsWith("text/event-stream")) throw Error(`Expected content-type to be ${
|
|
124
|
+
if (!t?.startsWith("text/event-stream")) throw Error(`Expected content-type to be ${l}, Actual: ${t}`);
|
|
124
125
|
}
|
|
125
126
|
//#endregion
|
|
126
127
|
//#region src/sse/index.ts
|
|
127
|
-
var
|
|
128
|
+
var m = t({
|
|
129
|
+
itemid: e().optional(),
|
|
130
|
+
parentitemid: e().optional(),
|
|
131
|
+
spaceid: e().optional(),
|
|
132
|
+
initiatorid: e().optional(),
|
|
133
|
+
etag: e().optional(),
|
|
134
|
+
affecteduserids: n(e()).optional().nullable(),
|
|
135
|
+
sessionid: e().optional()
|
|
136
|
+
}), h = /* @__PURE__ */ function(e) {
|
|
128
137
|
return e.NOTIFICATION = "userlog-notification", e.POSTPROCESSING_FINISHED = "postprocessing-finished", e.FILE_LOCKED = "file-locked", e.FILE_UNLOCKED = "file-unlocked", e.FILE_TOUCHED = "file-touched", e.ITEM_RENAMED = "item-renamed", e.ITEM_TRASHED = "item-trashed", e.ITEM_RESTORED = "item-restored", e.ITEM_MOVED = "item-moved", e.ITEM_FAVORITE_ADDED = "item-favorite-added", e.ITEM_FAVORITE_REMOVED = "item-favorite-removed", e.FOLDER_CREATED = "folder-created", e.SPACE_CREATED = "space-created", e.SPACE_DISABLED = "space-disabled", e.SPACE_ENABLED = "space-enabled", e.SPACE_DELETED = "space-deleted", e.SPACE_MEMBER_ADDED = "space-member-added", e.SPACE_MEMBER_REMOVED = "space-member-removed", e.SPACE_SHARE_UPDATED = "space-share-updated", e.SHARE_CREATED = "share-created", e.SHARE_REMOVED = "share-removed", e.SHARE_UPDATED = "share-updated", e.LINK_CREATED = "link-created", e.LINK_REMOVED = "link-removed", e.LINK_UPDATED = "link-updated", e.BACKCHANNEL_LOGOUT = "backchannel-logout", e;
|
|
129
|
-
}({}),
|
|
138
|
+
}({}), g = class extends Error {
|
|
130
139
|
name = "RetriableError";
|
|
131
|
-
},
|
|
140
|
+
}, _ = 15e3, v = class {
|
|
132
141
|
url;
|
|
133
142
|
fetchOptions;
|
|
134
143
|
abortController;
|
|
@@ -145,7 +154,7 @@ var d = /* @__PURE__ */ function(e) {
|
|
|
145
154
|
this.url = e, this.fetchOptions = t, this.abortController = new AbortController(), this.eventListenerMap = {}, this.readyState = this.CONNECTING, this.connect();
|
|
146
155
|
}
|
|
147
156
|
connect() {
|
|
148
|
-
return
|
|
157
|
+
return f(this.url, {
|
|
149
158
|
openWhenHidden: !0,
|
|
150
159
|
signal: this.abortController.signal,
|
|
151
160
|
fetch: this.fetchProvider.bind(this),
|
|
@@ -160,12 +169,12 @@ var d = /* @__PURE__ */ function(e) {
|
|
|
160
169
|
this.eventListenerMap[n]?.forEach((e) => e(t));
|
|
161
170
|
},
|
|
162
171
|
onclose: () => {
|
|
163
|
-
throw this.readyState = this.CLOSED, new
|
|
172
|
+
throw this.readyState = this.CLOSED, new g();
|
|
164
173
|
},
|
|
165
174
|
onerror: (e) => {
|
|
166
175
|
console.warn("SSE connection error, reconnecting...", e);
|
|
167
176
|
let t = new CustomEvent("error", { detail: e });
|
|
168
|
-
return this.onerror?.bind(this)(t), 3e4 + Math.floor(Math.random() *
|
|
177
|
+
return this.onerror?.bind(this)(t), 3e4 + Math.floor(Math.random() * _);
|
|
169
178
|
}
|
|
170
179
|
});
|
|
171
180
|
}
|
|
@@ -194,8 +203,8 @@ var d = /* @__PURE__ */ function(e) {
|
|
|
194
203
|
updateLanguage(e) {
|
|
195
204
|
this.fetchOptions.headers["Accept-Language"] = e, this.close(), this.connect();
|
|
196
205
|
}
|
|
197
|
-
},
|
|
198
|
-
|
|
206
|
+
}, y = null, b = (e, t) => (y ||= new v(new URL("ocs/v2.php/apps/notifications/api/v1/notifications/sse", e).href, t), y), x = () => {
|
|
207
|
+
y &&= (y.close(), null);
|
|
199
208
|
};
|
|
200
209
|
//#endregion
|
|
201
|
-
export {
|
|
210
|
+
export { h as MESSAGE_TYPE, g as RetriableError, v as SSEAdapter, x as resetSSE, b as sse, m as sseEventSchema };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as e } from "../webdav-
|
|
2
|
-
import { G as t, K as n, U as r, W as i, q as a } from "../helpers-
|
|
1
|
+
import { t as e } from "../webdav-BdeuuZHv.js";
|
|
2
|
+
import { G as t, K as n, U as r, W as i, q as a } from "../helpers-CrYtf7Ol.js";
|
|
3
3
|
export { r as DavMethod, i as DavNamespaces, t as DavPermission, n as DavProperties, a as DavProperty, e as webdav };
|
package/dist/web-client.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as e } from "./graph-
|
|
2
|
-
import { i as t, n, r, t as i } from "./webdav-
|
|
1
|
+
import { t as e } from "./graph-u53S3WT9.js";
|
|
2
|
+
import { i as t, n, r, t as i } from "./webdav-BdeuuZHv.js";
|
|
3
3
|
import { t as a } from "./urlJoin-_pUL1TUx.js";
|
|
4
|
-
import { A as o, B as s, C as c, D as l, E as u, F as d, H as f, I as p, J as m, L as h, M as g, N as _, O as v, P as y, R as b, S as x, T as S, V as C, Y as w, _ as T, a as E, b as D, c as O, d as k, f as A, g as j, h as M, i as N, j as P, k as F, l as I, m as L, n as R, o as z, p as B, r as V, s as H, t as U, u as W, v as G, w as K, x as q, y as J, z as Y } from "./helpers-
|
|
5
|
-
import { t as X } from "./ocs-
|
|
6
|
-
import {
|
|
4
|
+
import { A as o, B as s, C as c, D as l, E as u, F as d, H as f, I as p, J as m, L as h, M as g, N as _, O as v, P as y, R as b, S as x, T as S, V as C, Y as w, _ as T, a as E, b as D, c as O, d as k, f as A, g as j, h as M, i as N, j as P, k as F, l as I, m as L, n as R, o as z, p as B, r as V, s as H, t as U, u as W, v as G, w as K, x as q, y as J, z as Y } from "./helpers-CrYtf7Ol.js";
|
|
5
|
+
import { t as X } from "./ocs-CDSkdguM.js";
|
|
6
|
+
import { ox as Z } from "./web-client/ox.js";
|
|
7
7
|
//#region src/helpers/call.ts
|
|
8
8
|
var Q = function* (e) {
|
|
9
9
|
return yield e;
|