@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.
Files changed (34) hide show
  1. package/dist/{axios-ULsDSF3p.js → axios-DRPhbClr.js} +13 -49
  2. package/dist/{dist-WdVfmT0d.js → dist-CHy-DaIN.js} +1 -1
  3. package/dist/{generated-CkfYRFme.js → generated-4nR8KA38.js} +505 -311
  4. package/dist/{graph-D3q1149Y.js → graph-CwVan2Jp.js} +123 -98
  5. package/dist/{helpers-C_9em2wB.js → helpers-Bh5xR_vg.js} +46 -37
  6. package/dist/{ocs-CGD-4vGl.js → ocs-Dfdjrujs.js} +271 -296
  7. package/dist/{ox-D1FgExd1.js → schemas-rdabTCJb.js} +1366 -1250
  8. package/dist/src/errors.d.ts +2 -1
  9. package/dist/src/graph/generated/api.d.ts +639 -24
  10. package/dist/src/graph/guestLinks/guestLinks.d.ts +3 -0
  11. package/dist/src/graph/guestLinks/index.d.ts +2 -0
  12. package/dist/src/graph/guestLinks/types.d.ts +13 -0
  13. package/dist/src/graph/index.d.ts +3 -0
  14. package/dist/src/graph/types.d.ts +1 -0
  15. package/dist/src/helpers/resource/types.d.ts +3 -2
  16. package/dist/src/helpers/share/types.d.ts +3 -0
  17. package/dist/src/helpers/space/functions.d.ts +2 -2
  18. package/dist/src/ocs/capabilities.d.ts +1 -0
  19. package/dist/src/sse/index.d.ts +12 -0
  20. package/dist/src/webdav/client/dav.d.ts +3 -1
  21. package/dist/src/webdav/client/parsers.d.ts +1 -0
  22. package/dist/src/webdav/constants/dav.d.ts +5 -1
  23. package/dist/src/webdav/index.d.ts +1 -1
  24. package/dist/{toString-DfgrQ1mh.js → toString-uorCN9F3.js} +1 -1
  25. package/dist/web-client/graph/generated.js +1 -2
  26. package/dist/web-client/graph.js +1 -2
  27. package/dist/web-client/ocs.js +1 -2
  28. package/dist/web-client/ox.js +49 -2
  29. package/dist/web-client/sse.js +57 -48
  30. package/dist/web-client/webdav.js +2 -2
  31. package/dist/web-client.js +5 -5
  32. package/dist/webdav-DrQsSfxZ.js +6431 -0
  33. package/package.json +2 -4
  34. package/dist/webdav-BxsiETq0.js +0 -4538
@@ -0,0 +1,3 @@
1
+ import type { GraphFactoryOptions } from './../types';
2
+ import type { GraphGuestLinks } from './types';
3
+ export declare const GuestLinksFactory: ({ axiosClient, config }: GraphFactoryOptions) => GraphGuestLinks;
@@ -0,0 +1,2 @@
1
+ export * from './guestLinks';
2
+ export * from './types';
@@ -0,0 +1,13 @@
1
+ import type { GraphRequestOptions } from '../types';
2
+ import type { GuestLinkSessionResponse } from '../generated';
3
+ export interface GuestLinkSession extends GuestLinkSessionResponse {
4
+ serverDateTime?: string;
5
+ }
6
+ export interface GraphGuestLinks {
7
+ verifyGuestLinkToken: (token: string, requestOptions?: GraphRequestOptions) => Promise<GuestLinkSession>;
8
+ verifyGuestLinkPin: (data: {
9
+ pin: string;
10
+ permissionId: string;
11
+ }, requestOptions?: GraphRequestOptions) => Promise<GuestLinkSession>;
12
+ renewGuestLink: (permissionId: string, requestOptions?: GraphRequestOptions) => Promise<void>;
13
+ }
@@ -8,6 +8,8 @@ import { GraphTags } from './tags';
8
8
  import { GraphActivities } from './activities';
9
9
  import { GraphPermissions } from './permissions';
10
10
  import { GraphPhotos } from './photos';
11
+ import { GraphGuestLinks } from './guestLinks';
12
+ export type { GuestLinkSession } from './guestLinks';
11
13
  export interface Graph {
12
14
  activities: GraphActivities;
13
15
  applications: GraphApplications;
@@ -18,5 +20,6 @@ export interface Graph {
18
20
  groups: GraphGroups;
19
21
  permissions: GraphPermissions;
20
22
  photos: GraphPhotos;
23
+ guestLinks: GraphGuestLinks;
21
24
  }
22
25
  export declare const graph: (baseURI: string, axiosClient: AxiosInstance) => Graph;
@@ -9,4 +9,5 @@ export interface GraphRequestOptions {
9
9
  params?: Record<string, string>;
10
10
  signal?: AbortSignal;
11
11
  responseType?: ResponseType;
12
+ withCredentials?: boolean;
12
13
  }
@@ -1,9 +1,9 @@
1
1
  import { DavFileInfoResponse } from '@opencloud-eu/web-client/webdav';
2
- import { Audio, GeoCoordinates, Identity, Image, MotionPhoto, Photo, User } from '../../graph/generated';
2
+ import { Audio, GeoCoordinates, Identity, Image, LivePhoto, 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 {
@@ -19,6 +19,7 @@ export interface Resource {
19
19
  image?: Image;
20
20
  photo?: Photo;
21
21
  motionPhoto?: MotionPhoto;
22
+ livePhoto?: LivePhoto;
22
23
  path: string;
23
24
  webDavPath?: string;
24
25
  downloadURL?: string;
@@ -1,5 +1,6 @@
1
1
  import { Identity, ObjectIdentity, SharingLinkType, UnifiedRoleDefinition } from '../../graph/generated';
2
2
  import { Resource } from '../resource';
3
+ import type { SpaceResource } from '../space/types';
3
4
  export declare enum GraphSharePermission {
4
5
  createUpload = "libre.graph/driveItem/upload/create",
5
6
  createPermissions = "libre.graph/driveItem/permissions/create",
@@ -31,6 +32,8 @@ export interface ShareResource extends Resource {
31
32
  }
32
33
  export interface OutgoingShareResource extends ShareResource {
33
34
  }
35
+ export interface LinkSharedSpaceResource extends SpaceResource, Pick<ShareResource, 'sdate'> {
36
+ }
34
37
  export interface IncomingShareResource extends ShareResource {
35
38
  hidden: boolean;
36
39
  syncEnabled: boolean;
@@ -1,12 +1,12 @@
1
1
  import { Resource } from '../resource';
2
2
  import { PublicSpaceResource, ShareSpaceResource, SpaceResource } from './types';
3
- import { Drive } from '@opencloud-eu/web-client/graph/generated';
3
+ import { Drive, Permission } from '@opencloud-eu/web-client/graph/generated';
4
4
  import { CollaboratorShare, GraphSharePermission, ShareRole } from '../share';
5
5
  export declare function buildWebDavSpacesPath(storageId: string, path?: string): string;
6
6
  export declare function buildWebDavSpacesTrashPath(storageId: string, path?: string): string;
7
7
  export declare function getRelativeSpecialFolderSpacePath(space: SpaceResource, type: 'image' | 'readme'): string;
8
8
  export declare function isManager(share: CollaboratorShare): boolean;
9
- export declare const getSpaceManagers: (space: SpaceResource, graphRoles: Record<string, ShareRole>) => import("../../graph/generated").Permission[];
9
+ export declare const getSpaceManagers: (space: SpaceResource, graphRoles: Record<string, ShareRole>) => Permission[];
10
10
  export type PublicLinkType = 'ocm' | 'public-link';
11
11
  export declare function buildPublicSpaceResource(data: any & {
12
12
  publicLinkType: PublicLinkType;
@@ -153,6 +153,7 @@ export interface Capabilities {
153
153
  spaces?: {
154
154
  enabled?: boolean;
155
155
  max_quota?: number;
156
+ default_quota?: number;
156
157
  projects?: boolean;
157
158
  version?: string;
158
159
  };
@@ -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",
@@ -5,6 +5,7 @@ import { WebDavResponseResource } from '../../helpers';
5
5
  export interface DAVOptions {
6
6
  baseUrl: string;
7
7
  headers?: () => Headers;
8
+ withCredentials?: () => boolean;
8
9
  }
9
10
  export interface DavResult {
10
11
  body: WebDavResponseResource[] | undefined;
@@ -19,8 +20,9 @@ export declare class DAV {
19
20
  private client;
20
21
  private davPath;
21
22
  private headers;
23
+ private withCredentials;
22
24
  extraProps: string[];
23
- constructor({ baseUrl, headers }: DAVOptions);
25
+ constructor({ baseUrl, headers, withCredentials }: DAVOptions);
24
26
  mkcol(path: string, opts?: DAVRequestOptions): Promise<DavResult>;
25
27
  propfind(path: string, { depth, properties, extraProps, headers, ...opts }?: {
26
28
  depth?: number;
@@ -5,4 +5,5 @@ export declare const parseMultiStatus: (xmlBody: string) => Promise<WebDavRespon
5
5
  export declare const parseError: (xmlBody: string) => {
6
6
  message: string;
7
7
  errorCode: DavErrorCode;
8
+ errorType: string | undefined;
8
9
  };
@@ -1,4 +1,4 @@
1
- import { Audio, GeoCoordinates, Image, MotionPhoto, Photo } from '../../graph/generated';
1
+ import { Audio, GeoCoordinates, Image, LivePhoto, MotionPhoto, Photo } from '../../graph/generated';
2
2
  export declare abstract class DavPermission {
3
3
  static readonly Shared: string;
4
4
  static readonly Shareable: string;
@@ -62,6 +62,10 @@ declare const DavPropertyMapping: {
62
62
  readonly value: "motion-photo";
63
63
  readonly type: MotionPhoto;
64
64
  };
65
+ readonly LivePhoto: {
66
+ readonly value: "live-photo";
67
+ readonly type: LivePhoto;
68
+ };
65
69
  readonly ETag: M<"getetag", string>;
66
70
  readonly MimeType: M<"getcontenttype", string>;
67
71
  readonly ResourceType: M<"resourcetype", string[]>;
@@ -4,4 +4,4 @@ export * from './constants';
4
4
  export * from './types';
5
5
  export type { ListFilesOptions, ListFilesResult } from './listFiles';
6
6
  export type { GetFileContentsResponse } from './getFileContents';
7
- export declare const webdav: (baseURI: string, headers?: () => Headers) => WebDAV;
7
+ export declare const webdav: (baseURI: string, headers?: () => Headers, withCredentials?: () => boolean) => WebDAV;
@@ -1,4 +1,4 @@
1
- import { t as e } from "./dist-WdVfmT0d.js";
1
+ import { t as e } from "./dist-CHy-DaIN.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 @@
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-CkfYRFme.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 CreateChildDriveItemAtLibreGraphConflictBehaviorEnum, Ee as CreateChildDriveItemAtLibreGraphMissingParentsBehaviorEnum, je as CreateDriveItemAtLibreGraphConflictBehaviorEnum, st as CreateDriveItemAtLibreGraphMissingParentsBehaviorEnum, 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
+ export { n as ActivitiesApi, r as ActivitiesApiAxiosParamCreator, i as ActivitiesApiFactory, a as ActivitiesApiFp, o as ApplicationsApi, s as ApplicationsApiAxiosParamCreator, c as ApplicationsApiFactory, l as ApplicationsApiFp, u as BucketDefinitionSortByEnum, t as Configuration, d as CreateChildDriveItemAtLibreGraphConflictBehaviorEnum, f as CreateChildDriveItemAtLibreGraphMissingParentsBehaviorEnum, p as CreateDriveItemAtLibreGraphConflictBehaviorEnum, m as CreateDriveItemAtLibreGraphMissingParentsBehaviorEnum, h as DriveItemApi, g as DriveItemApiAxiosParamCreator, _ as DriveItemApiFactory, v as DriveItemApiFp, y as DriveItemAtLibreGraphShareTypesEnum, b as DrivesApi, x as DrivesApiAxiosParamCreator, S as DrivesApiFactory, C as DrivesApiFp, w as DrivesGetDrivesApi, T as DrivesGetDrivesApiAxiosParamCreator, E as DrivesGetDrivesApiFactory, D as DrivesGetDrivesApiFp, O as DrivesPermissionsApi, k as DrivesPermissionsApiAxiosParamCreator, A as DrivesPermissionsApiFactory, j as DrivesPermissionsApiFp, M as DrivesRootApi, N as DrivesRootApiAxiosParamCreator, P as DrivesRootApiFactory, F as DrivesRootApiFp, I as EducationClassApi, L as EducationClassApiAxiosParamCreator, R as EducationClassApiFactory, z as EducationClassApiFp, B as EducationClassClassificationEnum, V as EducationClassTeachersApi, H as EducationClassTeachersApiAxiosParamCreator, U as EducationClassTeachersApiFactory, W as EducationClassTeachersApiFp, G as EducationSchoolApi, K as EducationSchoolApiAxiosParamCreator, q as EducationSchoolApiFactory, J as EducationSchoolApiFp, Y as EducationUserApi, X as EducationUserApiAxiosParamCreator, Z as EducationUserApiFactory, Q as EducationUserApiFp, $ as GetDriveItemChildrenSelectEnum, et as GetDriveItemExpandEnum, tt as GetDriveItemSelectEnum, nt as GetDriveItemV1ExpandEnum, rt as GetDriveItemV1SelectEnum, it as GetDriveSelectEnum, at as GetEducationUserExpandEnum, ot as GetGroupExpandEnum, st as GetGroupSelectEnum, ct as GetOwnUserExpandEnum, lt as GetRootExpandEnum, ut as GetRootSelectEnum, dt as GetUserExpandEnum, ft as GetUserSelectEnum, pt as GroupApi, mt as GroupApiAxiosParamCreator, ht as GroupApiFactory, gt as GroupApiFp, _t as GroupsApi, vt as GroupsApiAxiosParamCreator, yt as GroupsApiFactory, bt as GroupsApiFp, xt as GuestLinkErrorErrorTypeEnum, St as GuestLinksApi, Ct as GuestLinksApiAxiosParamCreator, wt as GuestLinksApiFactory, Tt as GuestLinksApiFp, Et as HomeGetChildrenSelectEnum, Dt as HomeGetRootExpandEnum, Ot as HomeGetRootSelectEnum, kt as InvitationsApi, At as InvitationsApiAxiosParamCreator, jt as InvitationsApiFactory, Mt as InvitationsApiFp, Nt as ListAllDrivesBetaSelectEnum, Pt as ListEducationUsersExpandEnum, Ft as ListEducationUsersOrderbyEnum, It as ListGroupsExpandEnum, Lt as ListGroupsOrderbyEnum, Rt as ListGroupsSelectEnum, zt as ListMyDrivesBetaSelectEnum, Bt as ListPermissionsSelectEnum, Vt as ListPermissionsSpaceRootSelectEnum, Ht as ListSharedByMeExpandEnum, Ut as ListSharedWithMeExpandEnum, Wt as ListUsersExpandEnum, Gt as ListUsersOrderbyEnum, Kt as ListUsersSelectEnum, qt as LockInfoLockTypeEnum, Jt as MeChangepasswordApi, Yt as MeChangepasswordApiAxiosParamCreator, Xt as MeChangepasswordApiFactory, Zt as MeChangepasswordApiFp, Qt as MeDriveApi, $t as MeDriveApiAxiosParamCreator, en as MeDriveApiFactory, tn as MeDriveApiFp, nn as MeDriveRootApi, rn as MeDriveRootApiAxiosParamCreator, in as MeDriveRootApiFactory, an as MeDriveRootApiFp, on as MeDriveRootChildrenApi, sn as MeDriveRootChildrenApiAxiosParamCreator, cn as MeDriveRootChildrenApiFactory, ln as MeDriveRootChildrenApiFp, un as MeDrivesApi, dn as MeDrivesApiAxiosParamCreator, fn as MeDrivesApiFactory, pn as MeDrivesApiFp, mn as MePhotoApi, hn as MePhotoApiAxiosParamCreator, gn as MePhotoApiFactory, _n as MePhotoApiFp, vn as MeUserApi, yn as MeUserApiAxiosParamCreator, bn as MeUserApiFactory, xn as MeUserApiFp, Sn as MetricDefinitionKindEnum, Cn as RoleManagementApi, wn as RoleManagementApiAxiosParamCreator, Tn as RoleManagementApiFactory, En as RoleManagementApiFp, Dn as SearchApi, On as SearchApiAxiosParamCreator, kn as SearchApiFactory, An as SearchApiFp, jn as SearchMetricKindEnum, Mn as SearchQueryExpandEnum, Nn as SearchRequestEntityTypesEnum, Pn as SharingLinkType, Fn as TagsApi, In as TagsApiAxiosParamCreator, Ln as TagsApiFactory, Rn as TagsApiFp, zn as UserApi, Bn as UserApiAxiosParamCreator, Vn as UserApiFactory, Hn as UserApiFp, Un as UserAppRoleAssignmentApi, Wn as UserAppRoleAssignmentApiAxiosParamCreator, Gn as UserAppRoleAssignmentApiFactory, Kn as UserAppRoleAssignmentApiFp, qn as UserPhotoApi, Jn as UserPhotoApiAxiosParamCreator, Yn as UserPhotoApiFactory, Xn as UserPhotoApiFp, Zn as UserTeamworkApi, Qn as UserTeamworkApiAxiosParamCreator, $n as UserTeamworkApiFactory, er as UserTeamworkApiFp, tr as UsersApi, nr as UsersApiAxiosParamCreator, rr as UsersApiFactory, ir as UsersApiFp } from "../../generated-4nR8KA38.js";
@@ -1,2 +1 @@
1
- import { t as e } from "../graph-D3q1149Y.js";
2
- export { e as graph };
1
+ export { t as graph } from "../graph-CwVan2Jp.js";
@@ -1,2 +1 @@
1
- import { o as e, t } from "../ocs-CGD-4vGl.js";
2
- export { e as GetCapabilitiesFactory, t as ocs };
1
+ export { o as GetCapabilitiesFactory, t as ocs } from "../ocs-Dfdjrujs.js";
@@ -1,2 +1,49 @@
1
- import { i as e, n as t, r as n, t as r } from "../ox-D1FgExd1.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-rdabTCJb.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-rdabTCJb.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-BxsiETq0.js";
2
- import { G as t, K as n, U as r, W as i, q as a } from "../helpers-C_9em2wB.js";
1
+ import { t as e } from "../webdav-DrQsSfxZ.js";
2
+ import { G as t, K as n, U as r, W as i, q as a } from "../helpers-Bh5xR_vg.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-D3q1149Y.js";
2
- import { i as t, n, r, t as i } from "./webdav-BxsiETq0.js";
1
+ import { t as e } from "./graph-CwVan2Jp.js";
2
+ import { i as t, n, r, t as i } from "./webdav-DrQsSfxZ.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-C_9em2wB.js";
5
- import { t as X } from "./ocs-CGD-4vGl.js";
6
- import { t as Z } from "./ox-D1FgExd1.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-Bh5xR_vg.js";
5
+ import { t as X } from "./ocs-Dfdjrujs.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;