import { OcsConnection } from './ocs/ocs-connection'; import { WebDavClient } from './webdav'; import { OcsShareType, OcsSharePermissions, type OcsEditUserField, type OcsGroupfolder, type OcsActivity, type OcsNewUser, type OcsShare, type OcsUser } from './ocs/types'; import { Optional } from 'lonad'; export * from './ocs/types'; export type AsyncFunction = (...parameters: any[]) => Promise; export declare class NextcloudClientProperties { webdavConnection: Optional; ocsConnection: OcsConnection; username: string; url: string; } export interface NextcloudClientInterface extends NextcloudClientProperties { as(username: string, password: string): NextcloudClientInterface; get: WebDavClient['get']; put: WebDavClient['put']; move: WebDavClient['move']; remove: WebDavClient['remove']; exists: WebDavClient['exists']; rename: WebDavClient['rename']; getFiles: WebDavClient['getFiles']; getPathInfo: WebDavClient['getPathInfo']; touchFolder: WebDavClient['touchFolder']; getReadStream: WebDavClient['getReadStream']; getWriteStream: WebDavClient['getWriteStream']; uploadFromStream: WebDavClient['uploadFromStream']; downloadToStream: WebDavClient['downloadToStream']; checkConnectivity: WebDavClient['checkConnectivity']; getFolderProperties: WebDavClient['getFolderProperties']; getFolderFileDetails: WebDavClient['getFolderFileDetails']; createFolderHierarchy: WebDavClient['createFolderHierarchy']; getCreatorByFileId(fileId: number | string): Promise; getCreatorByPath(path: string): Promise; activities: { get: (fileId: number | string, sort?: 'asc' | 'desc', limit?: number, sinceActivityId?: number) => Promise; }; users: { removeSubAdminFromGroup: (userId: string, groupId: string) => Promise; addSubAdminToGroup: (userId: string, groupId: string) => Promise; resendWelcomeEmail: (userId: string) => Promise; getSubAdminGroups: (userId: string) => Promise; removeFromGroup: (userId: string, groupId: string) => Promise; setEnabled: (userId: string, isEnabled: boolean) => Promise; addToGroup: (userId: string, groupId: string) => Promise; getGroups: (userId: string) => Promise; delete: (userId: string) => Promise; edit: (userId: string, field: OcsEditUserField, value: string) => Promise; list: (search?: string, limit?: number, offset?: number) => Promise; add: (user: OcsNewUser) => Promise; get: (userId: string) => Promise; }; groups: { getSubAdmins: (groupId: string) => Promise; getUsers: (groupId: string) => Promise; delete: (groupId: string) => Promise; list: (search?: string, limit?: number, offset?: number) => Promise; add: (groupId: string) => Promise; }; shares: { delete: (shareId: string | number) => Promise; edit: { permissions: (shareId: string | number, permissions: OcsSharePermissions) => Promise; password: (shareId: string | number, password: string) => Promise; publicUpload: (shareId: string | number, isPublicUpload: boolean) => Promise; expireDate: (shareId: string | number, expireDate: string) => Promise; note: (shareId: string | number, note: string) => Promise; }; list: (path?: string, includeReshares?: boolean, showForSubFiles?: boolean) => Promise; add: (path: string, shareType: OcsShareType, shareWith?: string, permissions?: OcsSharePermissions, password?: string, publicUpload?: boolean) => Promise; get: (shareId: string | number) => Promise; }; groupfolders: { getFolders: () => Promise; getFolder: (fid: number) => Promise; addFolder: (mountpoint: string) => Promise; removeFolder: (fid: number) => Promise; addGroup: (fid: number, gid: string) => Promise; removeGroup: (fid: number, gid: string) => Promise; setPermissions: (fid: number, gid: string, permissions: number) => Promise; enableACL: (fid: number, enable: boolean) => Promise; setManageACL: (fid: number, type: 'group' | 'user', id: string, manageACL: boolean) => Promise; setQuota: (fid: number, quota: number) => Promise; renameFolder: (fid: number, mountpoint: string) => Promise; }; } export interface ConnectionOptions { url: string; username?: string; password?: string; } //# sourceMappingURL=types.d.ts.map