@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.
@@ -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;
@@ -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 { n as e } from "./dist-Ciqaw6jy.js";
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, Bt as o, C as s, Cn as c, Ct as l, D as u, Dn as d, Dt as f, E as p, En as m, Et as h, F as g, Fn as _, Ft as v, G as y, Gt as b, H as x, Ht as S, I as C, In as w, It as T, J as E, Jt as D, K as O, Kt as k, L as A, Ln as j, Lt as M, M as N, Mn as P, Mt as F, N as I, Nn as L, Nt as R, O as z, On as B, Ot as V, P as H, Pn as U, Pt as W, Q as G, Qt as K, R as q, Rn as J, Rt as Y, S as X, Sn as Z, St as Q, T as $, Tn as ee, Tt as te, U as ne, Ut as re, V as ie, Vt as ae, W as oe, Wt as se, X as ce, Xt as le, Y as ue, Yt as de, Z as fe, Zt as pe, _ as me, _n as he, _t as ge, a as _e, an as ve, at as ye, b as be, bn as xe, bt as Se, c as Ce, cn as we, ct as Te, d as Ee, dn as De, dt as Oe, en as ke, et as Ae, f as je, fn as Me, ft as Ne, g as Pe, gn as Fe, gt as Ie, h as Le, hn as Re, ht as ze, i as Be, in as Ve, it as He, j as Ue, jn as We, jt as Ge, k as Ke, kn as qe, kt as Je, l as Ye, ln as Xe, lt as Ze, m as Qe, mn as $e, mt as et, n as tt, nn as nt, nt as rt, o as it, on as at, ot, p as st, pn as ct, pt as lt, q as ut, qt as dt, r as ft, rn as pt, rt as mt, s as ht, sn as gt, st as _t, t as vt, tn as yt, tt as bt, u as xt, un as St, ut as Ct, v as wt, vn as Tt, vt as Et, w as Dt, wn as Ot, wt as kt, x as At, xn as jt, xt as Mt, y as Nt, yn as Pt, yt as Ft, z as It, zt as Lt } from "../../generated-CSkivkhn.js";
2
- export { tt as ActivitiesApi, ft as ActivitiesApiAxiosParamCreator, Be as ActivitiesApiFactory, _e as ActivitiesApiFp, it as ApplicationsApi, ht as ApplicationsApiAxiosParamCreator, Ce as ApplicationsApiFactory, Ye as ApplicationsApiFp, vt as Configuration, xt as CreateChildDriveItemLibreGraphConflictBehaviorEnum, Ee as CreateChildDriveItemLibreGraphMissingParentsBehaviorEnum, je as CreateDriveItemLibreGraphConflictBehaviorEnum, st as CreateDriveItemLibreGraphMissingParentsBehaviorEnum, Qe as DriveItemApi, Le as DriveItemApiAxiosParamCreator, Pe as DriveItemApiFactory, me as DriveItemApiFp, wt as DrivesApi, Nt as DrivesApiAxiosParamCreator, be as DrivesApiFactory, At as DrivesApiFp, X as DrivesGetDrivesApi, s as DrivesGetDrivesApiAxiosParamCreator, Dt as DrivesGetDrivesApiFactory, $ as DrivesGetDrivesApiFp, p as DrivesPermissionsApi, u as DrivesPermissionsApiAxiosParamCreator, z as DrivesPermissionsApiFactory, Ke as DrivesPermissionsApiFp, n as DrivesRootApi, Ue as DrivesRootApiAxiosParamCreator, N as DrivesRootApiFactory, I as DrivesRootApiFp, H as EducationClassApi, g as EducationClassApiAxiosParamCreator, C as EducationClassApiFactory, A as EducationClassApiFp, q as EducationClassClassificationEnum, It as EducationClassTeachersApi, a as EducationClassTeachersApiAxiosParamCreator, ie as EducationClassTeachersApiFactory, x as EducationClassTeachersApiFp, ne as EducationSchoolApi, oe as EducationSchoolApiAxiosParamCreator, y as EducationSchoolApiFactory, O as EducationSchoolApiFp, ut as EducationUserApi, E as EducationUserApiAxiosParamCreator, ue as EducationUserApiFactory, ce as EducationUserApiFp, fe as GetDriveItemChildrenSelectEnum, G as GetDriveItemSelectEnum, e as GetDriveItemV1SelectEnum, Ae as GetDriveSelectEnum, bt as GetEducationUserExpandEnum, rt as GetGroupExpandEnum, mt as GetGroupSelectEnum, He as GetOwnUserExpandEnum, ye as GetRootSelectEnum, ot as GetUserExpandEnum, _t as GetUserSelectEnum, Te as GroupApi, Ze as GroupApiAxiosParamCreator, Ct as GroupApiFactory, Oe as GroupApiFp, Ne as GroupsApi, lt as GroupsApiAxiosParamCreator, et as GroupsApiFactory, ze as GroupsApiFp, Ie as HomeGetChildrenSelectEnum, ge as HomeGetRootSelectEnum, Et as InvitationsApi, Ft as InvitationsApiAxiosParamCreator, Se as InvitationsApiFactory, Mt as InvitationsApiFp, Q as ListAllDrivesBetaSelectEnum, l as ListEducationUsersExpandEnum, kt as ListEducationUsersOrderbyEnum, te as ListGroupsExpandEnum, h as ListGroupsOrderbyEnum, f as ListGroupsSelectEnum, V as ListMyDrivesBetaSelectEnum, Je as ListPermissionsSelectEnum, i as ListPermissionsSpaceRootSelectEnum, Ge as ListSharedByMeExpandEnum, F as ListSharedWithMeExpandEnum, R as ListUsersExpandEnum, W as ListUsersOrderbyEnum, v as ListUsersSelectEnum, T as MeChangepasswordApi, M as MeChangepasswordApiAxiosParamCreator, Y as MeChangepasswordApiFactory, Lt as MeChangepasswordApiFp, o as MeDriveApi, ae as MeDriveApiAxiosParamCreator, S as MeDriveApiFactory, re as MeDriveApiFp, se as MeDriveRootApi, b as MeDriveRootApiAxiosParamCreator, k as MeDriveRootApiFactory, dt as MeDriveRootApiFp, D as MeDriveRootChildrenApi, de as MeDriveRootChildrenApiAxiosParamCreator, le as MeDriveRootChildrenApiFactory, pe as MeDriveRootChildrenApiFp, K as MeDrivesApi, t as MeDrivesApiAxiosParamCreator, ke as MeDrivesApiFactory, yt as MeDrivesApiFp, nt as MePhotoApi, pt as MePhotoApiAxiosParamCreator, Ve as MePhotoApiFactory, ve as MePhotoApiFp, at as MeUserApi, gt as MeUserApiAxiosParamCreator, we as MeUserApiFactory, Xe as MeUserApiFp, St as RoleManagementApi, De as RoleManagementApiAxiosParamCreator, Me as RoleManagementApiFactory, ct as RoleManagementApiFp, $e as SharingLinkType, Re as TagsApi, Fe as TagsApiAxiosParamCreator, he as TagsApiFactory, Tt as TagsApiFp, Pt as UserApi, xe as UserApiAxiosParamCreator, jt as UserApiFactory, Z as UserApiFp, c as UserAppRoleAssignmentApi, Ot as UserAppRoleAssignmentApiAxiosParamCreator, ee as UserAppRoleAssignmentApiFactory, m as UserAppRoleAssignmentApiFp, d as UserPhotoApi, B as UserPhotoApiAxiosParamCreator, qe as UserPhotoApiFactory, r as UserPhotoApiFp, We as UserTeamworkApi, P as UserTeamworkApiAxiosParamCreator, L as UserTeamworkApiFactory, U as UserTeamworkApiFp, _ as UsersApi, w as UsersApiAxiosParamCreator, j as UsersApiFactory, J as UsersApiFp };
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 };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../graph-BDtqSczU.js";
1
+ import { t as e } from "../graph-u53S3WT9.js";
2
2
  export { e as graph };
@@ -1,2 +1,2 @@
1
- import { o as e, t } from "../ocs-BupRjiCI.js";
1
+ import { o as e, t } from "../ocs-CDSkdguM.js";
2
2
  export { e as GetCapabilitiesFactory, t as ocs };
@@ -1,2 +1,49 @@
1
- import { i as e, n as t, r as n, t as r } from "../ox-DIaYdpxw.js";
2
- export { t as ContactSchema, n as OxAutocompleteResponseSchema, e as OxComposeSpaceResponseSchema, r as ox };
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 };
@@ -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 e(e, t) {
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 t(e) {
7
- let t, n, i, a = !1;
8
- return function(o) {
9
- t === void 0 ? (t = o, n = 0, i = -1) : t = r(t, o);
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
- a &&= (t[n] === 10 && (c = ++n), !1);
13
- let r = -1;
14
- for (; n < s && r === -1; ++n) switch (t[n]) {
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
- i === -1 && (i = n - c);
17
+ r === -1 && (r = n - c);
17
18
  break;
18
- case 13: a = !0;
19
- case 10: r = n;
19
+ case 13: i = !0;
20
+ case 10: a = n;
20
21
  }
21
- if (r === -1) break;
22
- e(t.subarray(c, r), i), c = n, i = -1;
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 n(e, t, n) {
28
- let r = i(), a = new TextDecoder();
29
- return function(o, s) {
30
- if (o.length === 0) n?.(r), r = i();
31
- else if (s > 0) {
32
- let n = a.decode(o.subarray(0, s)), i = s + (o[s + 1] === 32 ? 2 : 1), c = a.decode(o.subarray(i));
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 r(e, t) {
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 i() {
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 a = function(e, t) {
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
- }, o = "text/event-stream", s = 1e3, c = "last-event-id";
70
- function l(r, i) {
71
- var { signal: l, headers: d, onopen: f, onmessage: p, onclose: m, onerror: h, openWhenHidden: g, fetch: _ } = i, v = a(i, [
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((i, a) => {
82
- let y = Object.assign({}, d);
83
- y.accept ||= o;
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 = s, C = 0;
90
+ let S = u, C = 0;
90
91
  function w() {
91
92
  document.removeEventListener("visibilitychange", x), window.clearTimeout(C), b.abort();
92
93
  }
93
- l?.addEventListener("abort", () => {
94
- w(), i();
94
+ n?.addEventListener("abort", () => {
95
+ w(), t();
95
96
  });
96
- let T = _ ?? window.fetch, E = f ?? u;
97
+ let T = _ ?? window.fetch, E = s ?? p;
97
98
  async function D() {
98
99
  b = new AbortController();
99
100
  try {
100
- let a = await T(r, Object.assign(Object.assign({}, v), {
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(a), await e(a.body, t(n((e) => {
105
- e ? y[c] = e : delete y[c];
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
- }, p))), m?.(), w(), i();
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(), a(e);
115
+ w(), c(e);
115
116
  }
116
117
  }
117
118
  }
118
119
  D();
119
120
  });
120
121
  }
121
- function u(e) {
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 ${o}, Actual: ${t}`);
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 d = /* @__PURE__ */ function(e) {
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
- }({}), f = class extends Error {
138
+ }({}), g = class extends Error {
130
139
  name = "RetriableError";
131
- }, p = 15e3, m = class {
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 l(this.url, {
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 f();
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() * p);
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
- }, h = null, g = (e, t) => (h ||= new m(new URL("ocs/v2.php/apps/notifications/api/v1/notifications/sse", e).href, t), h), _ = () => {
198
- h &&= (h.close(), null);
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 { d as MESSAGE_TYPE, f as RetriableError, m as SSEAdapter, _ as resetSSE, g as sse };
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-BE0Z-EcD.js";
2
- import { G as t, K as n, U as r, W as i, q as a } from "../helpers-hr58GB0t.js";
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 };
@@ -1,9 +1,9 @@
1
- import { t as e } from "./graph-BDtqSczU.js";
2
- import { i as t, n, r, t as i } from "./webdav-BE0Z-EcD.js";
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-hr58GB0t.js";
5
- import { t as X } from "./ocs-BupRjiCI.js";
6
- import { t as Z } from "./ox-DIaYdpxw.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-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;