import { ElementCompact } from 'xml-js'; import * as xml_js_types from 'xml-js/types'; type DAVDepth = '0' | '1' | 'infinity'; type DAVMethods = 'COPY' | 'LOCK' | 'MKCOL' | 'MOVE' | 'PROPFIND' | 'PROPPATCH' | 'UNLOCK' | 'REPORT' | 'SEARCH' | 'MKCALENDAR'; type HTTPMethods = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'; type DAVResponse = { raw?: any; href?: string; status: number; statusText: string; ok: boolean; error?: { [key: string]: any; }; responsedescription?: string; props?: { [key: string]: { status: number; statusText: string; ok: boolean; value: any; } | any; }; }; type DAVRequest = { headers?: Record; method: DAVMethods | HTTPMethods; body: any; namespace?: string; attributes?: Record; }; type DAVTokens = { access_token?: string; refresh_token?: string; expires_in?: number; id_token?: string; token_type?: string; scope?: string; }; type DAVCollection = { objects?: DAVObject[]; ctag?: string; description?: string; displayName?: string | Record; reports?: any; resourcetype?: any; syncToken?: string; url: string; fetchOptions?: RequestInit; fetchObjects?: ((params?: { collection: DAVCalendar; headers?: Record; fetchOptions?: RequestInit; }) => Promise) | ((params?: { collection: DAVAddressBook; headers?: Record; fetchOptions?: RequestInit; }) => Promise); objectMultiGet?: (params: { url: string; props: ElementCompact; objectUrls: string[]; filters?: ElementCompact; timezone?: string; depth: DAVDepth; fetchOptions?: RequestInit; headers?: Record; }) => Promise; }; type DAVObject = { data?: any; etag?: string; url: string; }; type DAVCredentials = { username?: string; password?: string; clientId?: string; clientSecret?: string; authorizationCode?: string; redirectUrl?: string; tokenUrl?: string; accessToken?: string; refreshToken?: string; expiration?: number; digestString?: string; customData?: Record; }; type DAVAccount = { accountType: 'caldav' | 'carddav'; serverUrl: string; credentials?: DAVCredentials; rootUrl?: string; principalUrl?: string; homeUrl?: string; calendars?: DAVCalendar[]; addressBooks?: DAVAddressBook[]; }; type DAVVCard = DAVObject; type DAVCalendarObject = DAVObject; type DAVAddressBook = DAVCollection; type DAVCalendar = { components?: string[]; timezone?: string; projectedProps?: Record; calendarColor?: string; } & DAVCollection; interface SmartCollectionSync { (param: { collection: T; method?: 'basic' | 'webdav'; headers?: Record; fetchOptions?: RequestInit; account?: DAVAccount; detailedResult: true; }): Promise & { objects: { created: DAVObject[]; updated: DAVObject[]; deleted: DAVObject[]; }; }>; (param: { collection: T; method?: 'basic' | 'webdav'; headers?: Record; fetchOptions?: RequestInit; account?: DAVAccount; detailedResult?: false; }): Promise; } interface SyncCalendars { (params: { oldCalendars: DAVCalendar[]; headers?: Record; fetchOptions?: RequestInit; account?: DAVAccount; detailedResult: true; }): Promise<{ created: DAVCalendar[]; updated: DAVCalendar[]; deleted: DAVCalendar[]; }>; (params: { oldCalendars: DAVCalendar[]; headers?: Record; fetchOptions?: RequestInit; account?: DAVAccount; detailedResult?: false; }): Promise; } type Optional = Pick, K> & Omit; type NoUndefinedField = { [P in keyof T]-?: NoUndefinedField>; }; declare enum DAVNamespace { CALENDAR_SERVER = "http://calendarserver.org/ns/", CALDAV_APPLE = "http://apple.com/ns/ical/", CALDAV = "urn:ietf:params:xml:ns:caldav", CARDDAV = "urn:ietf:params:xml:ns:carddav", DAV = "DAV:" } declare const DAVAttributeMap: { "urn:ietf:params:xml:ns:caldav": string; "urn:ietf:params:xml:ns:carddav": string; "http://calendarserver.org/ns/": string; "http://apple.com/ns/ical/": string; "DAV:": string; }; declare enum DAVNamespaceShort { CALDAV = "c", CARDDAV = "card", CALENDAR_SERVER = "cs", CALDAV_APPLE = "ca", DAV = "d" } declare const addressBookQuery: (params: { url: string; props: ElementCompact; filters?: ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const addressBookMultiGet: (params: { url: string; props: ElementCompact; objectUrls: string[]; depth: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const fetchAddressBooks: (params?: { account?: DAVAccount; props?: ElementCompact; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const fetchVCards: (params: { addressBook: DAVAddressBook; headers?: Record; objectUrls?: string[]; urlFilter?: (url: string) => boolean; useMultiGet?: boolean; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const createVCard: (params: { addressBook: DAVAddressBook; vCardString: string; filename: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const updateVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const deleteVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const fetchCalendarUserAddresses: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const calendarQuery: (params: { url: string; props: ElementCompact; filters?: ElementCompact; timezone?: string; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const calendarMultiGet: (params: { url: string; props: ElementCompact; objectUrls?: string[]; timezone?: string; depth: DAVDepth; filters?: ElementCompact; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const makeCalendar: (params: { url: string; props: ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const fetchCalendars: (params?: { account?: DAVAccount; props?: ElementCompact; projectedProps?: Record; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const fetchCalendarObjects: (params: { calendar: DAVCalendar; objectUrls?: string[]; filters?: ElementCompact; timeRange?: { start: string; end: string; }; expand?: boolean; urlFilter?: (url: string) => boolean; headers?: Record; headersToExclude?: string[]; useMultiGet?: boolean; fetchOptions?: RequestInit; }) => Promise; declare const createCalendarObject: (params: { calendar: DAVCalendar; iCalString: string; filename: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const updateCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const deleteCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; /** * Sync remote calendars to local */ declare const syncCalendars: SyncCalendars; declare const freeBusyQuery: (params: { url: string; timeRange: { start: string; end: string; }; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const collectionQuery: (params: { url: string; body: any; depth?: DAVDepth; defaultNamespace?: DAVNamespaceShort; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const makeCollection: (params: { url: string; props?: ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const supportedReportSet: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const isCollectionDirty: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise<{ isDirty: boolean; newCtag: string; }>; /** * This is for webdav sync-collection only */ declare const syncCollection: (params: { url: string; props: ElementCompact; headers?: Record; headersToExclude?: string[]; syncLevel?: number; syncToken?: string; fetchOptions?: RequestInit; }) => Promise; /** remote collection to local */ declare const smartCollectionSync: SmartCollectionSync; declare const davRequest: (params: { url: string; init: DAVRequest; convertIncoming?: boolean; parseOutgoing?: boolean; fetchOptions?: RequestInit; }) => Promise; declare const propfind: (params: { url: string; props: ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const createObject: (params: { url: string; data: BodyInit; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const updateObject: (params: { url: string; data: BodyInit; etag?: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const deleteObject: (params: { url: string; etag?: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; declare const createDAVClient: (params: { serverUrl: string; credentials: DAVCredentials; authMethod?: "Basic" | "Oauth" | "Digest" | "Custom"; authFunction?: (credentials: DAVCredentials) => Promise>; defaultAccountType?: DAVAccount["accountType"] | undefined; }) => Promise<{ davRequest: (params0: { url: string; init: DAVRequest; convertIncoming?: boolean; parseOutgoing?: boolean; }) => Promise; propfind: (params: { url: string; props: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; createAccount: (params0: { account: Optional; headers?: Record; loadCollections?: boolean; loadObjects?: boolean; }) => Promise; createObject: (params: { url: string; data: BodyInit; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; updateObject: (params: { url: string; data: BodyInit; etag?: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; deleteObject: (params: { url: string; etag?: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; calendarQuery: (params: { url: string; props: xml_js_types.ElementCompact; filters?: xml_js_types.ElementCompact; timezone?: string; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; addressBookQuery: (params: { url: string; props: xml_js_types.ElementCompact; filters?: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; collectionQuery: (params: { url: string; body: any; depth?: DAVDepth; defaultNamespace?: DAVNamespaceShort; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; makeCollection: (params: { url: string; props?: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; calendarMultiGet: (params: { url: string; props: xml_js_types.ElementCompact; objectUrls?: string[]; timezone?: string; depth: DAVDepth; filters?: xml_js_types.ElementCompact; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; makeCalendar: (params: { url: string; props: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; syncCollection: (params: { url: string; props: xml_js_types.ElementCompact; headers?: Record; headersToExclude?: string[]; syncLevel?: number; syncToken?: string; fetchOptions?: RequestInit; }) => Promise; supportedReportSet: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; isCollectionDirty: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise<{ isDirty: boolean; newCtag: string; }>; smartCollectionSync: SmartCollectionSync; fetchCalendars: (params?: { account?: DAVAccount; props?: xml_js_types.ElementCompact; projectedProps?: Record; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; } | undefined) => Promise; fetchCalendarUserAddresses: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchCalendarObjects: (params: { calendar: DAVCalendar; objectUrls?: string[]; filters?: xml_js_types.ElementCompact; timeRange?: { start: string; end: string; }; expand?: boolean; urlFilter?: (url: string) => boolean; headers?: Record; headersToExclude?: string[]; useMultiGet?: boolean; fetchOptions?: RequestInit; }) => Promise; createCalendarObject: (params: { calendar: DAVCalendar; iCalString: string; filename: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; updateCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; deleteCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; syncCalendars: SyncCalendars; fetchAddressBooks: (params?: { account?: DAVAccount; props?: xml_js_types.ElementCompact; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; } | undefined) => Promise; addressBookMultiGet: (params: { url: string; props: xml_js_types.ElementCompact; objectUrls: string[]; depth: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchVCards: (params: { addressBook: DAVAddressBook; headers?: Record; objectUrls?: string[]; urlFilter?: (url: string) => boolean; useMultiGet?: boolean; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; createVCard: (params: { addressBook: DAVAddressBook; vCardString: string; filename: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; updateVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; deleteVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; }>; declare class DAVClient { serverUrl: string; credentials: DAVCredentials; authMethod: 'Basic' | 'Oauth' | 'Digest' | 'Custom'; accountType: DAVAccount['accountType']; authHeaders?: Record; account?: DAVAccount; fetchOptions?: RequestInit; authFunction?: (credentials: DAVCredentials) => Promise>; constructor(params: { serverUrl: string; credentials: DAVCredentials; authMethod?: 'Basic' | 'Oauth' | 'Digest' | 'Custom'; authFunction?: (credentials: DAVCredentials) => Promise>; defaultAccountType?: DAVAccount['accountType'] | undefined; fetchOptions?: RequestInit; }); login(): Promise; davRequest(params0: { url: string; init: DAVRequest; convertIncoming?: boolean; parseOutgoing?: boolean; fetchOptions?: RequestInit; }): Promise; createObject(...params: Parameters): Promise; updateObject(...params: Parameters): Promise; deleteObject(...params: Parameters): Promise; propfind(...params: Parameters): Promise; createAccount(params0: { account: Optional; headers?: Record; loadCollections?: boolean; loadObjects?: boolean; fetchOptions?: RequestInit; }): Promise; collectionQuery(...params: Parameters): Promise; makeCollection(...params: Parameters): Promise; syncCollection(...params: Parameters): Promise; supportedReportSet(...params: Parameters): Promise; isCollectionDirty(...params: Parameters): Promise<{ isDirty: boolean; newCtag: string; }>; smartCollectionSync(param: { collection: T; method?: 'basic' | 'webdav'; headers?: Record; fetchOptions?: RequestInit; account?: DAVAccount; detailedResult?: false; }): Promise; smartCollectionSync(param: { collection: T; method?: 'basic' | 'webdav'; headers?: Record; fetchOptions?: RequestInit; account?: DAVAccount; detailedResult: true; }): Promise & { objects: { created: DAVObject[]; updated: DAVObject[]; deleted: DAVObject[]; }; }>; calendarQuery(...params: Parameters): Promise; makeCalendar(...params: Parameters): Promise; calendarMultiGet(...params: Parameters): Promise; fetchCalendars(...params: Parameters): Promise; fetchCalendarUserAddresses(...params: Parameters): Promise; fetchCalendarObjects(...params: Parameters): Promise; createCalendarObject(...params: Parameters): Promise; updateCalendarObject(...params: Parameters): Promise; deleteCalendarObject(...params: Parameters): Promise; syncCalendars(...params: Parameters): Promise>; addressBookQuery(...params: Parameters): Promise; addressBookMultiGet(...params: Parameters): Promise; fetchAddressBooks(...params: Parameters): Promise; fetchVCards(...params: Parameters): Promise; createVCard(...params: Parameters): Promise; updateVCard(...params: Parameters): Promise; deleteVCard(...params: Parameters): Promise; } declare const createAccount: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; loadCollections?: boolean; loadObjects?: boolean; fetchOptions?: RequestInit; }) => Promise; declare const getBasicAuthHeaders: (credentials: DAVCredentials) => { authorization?: string; }; declare const fetchOauthTokens: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise; declare const refreshAccessToken: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise<{ access_token?: string; expires_in?: number; }>; declare const getOauthHeaders: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise<{ tokens: DAVTokens; headers: { authorization?: string; }; }>; declare const urlEquals: (urlA?: string, urlB?: string) => boolean; declare const urlContains: (urlA?: string, urlB?: string) => boolean; declare const getDAVAttribute: (nsArr: DAVNamespace[]) => { [key: string]: DAVNamespace; }; declare const cleanupFalsy: (obj: T) => NoUndefinedField; declare const _default: { urlEquals: (urlA?: string, urlB?: string) => boolean; urlContains: (urlA?: string, urlB?: string) => boolean; getDAVAttribute: (nsArr: DAVNamespace[]) => { [key: string]: DAVNamespace; }; cleanupFalsy: (obj: T) => NoUndefinedField; conditionalParam: (key: string, param: T) => { [key: string]: T; }; excludeHeaders: (headers: Record | undefined, headersToExclude: string[] | undefined) => Record; defaultParam: any>(fn: F, params: Partial[0]>) => (...args: Parameters) => ReturnType; getBasicAuthHeaders: (credentials: DAVCredentials) => { authorization?: string; }; fetchOauthTokens: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise; refreshAccessToken: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise<{ access_token?: string; expires_in?: number; }>; getOauthHeaders: (credentials: DAVCredentials, fetchOptions?: RequestInit) => Promise<{ tokens: DAVTokens; headers: { authorization?: string; }; }>; fetchCalendarUserAddresses: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; calendarQuery: (params: { url: string; props: xml_js_types.ElementCompact; filters?: xml_js_types.ElementCompact; timezone?: string; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; calendarMultiGet: (params: { url: string; props: xml_js_types.ElementCompact; objectUrls?: string[]; timezone?: string; depth: DAVDepth; filters?: xml_js_types.ElementCompact; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; makeCalendar: (params: { url: string; props: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchCalendars: (params?: { account?: DAVAccount; props?: xml_js_types.ElementCompact; projectedProps?: Record; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchCalendarObjects: (params: { calendar: DAVCalendar; objectUrls?: string[]; filters?: xml_js_types.ElementCompact; timeRange?: { start: string; end: string; }; expand?: boolean; urlFilter?: (url: string) => boolean; headers?: Record; headersToExclude?: string[]; useMultiGet?: boolean; fetchOptions?: RequestInit; }) => Promise; createCalendarObject: (params: { calendar: DAVCalendar; iCalString: string; filename: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; updateCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; deleteCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; syncCalendars: SyncCalendars; freeBusyQuery: (params: { url: string; timeRange: { start: string; end: string; }; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; addressBookQuery: (params: { url: string; props: xml_js_types.ElementCompact; filters?: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; addressBookMultiGet: (params: { url: string; props: xml_js_types.ElementCompact; objectUrls: string[]; depth: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchAddressBooks: (params?: { account?: DAVAccount; props?: xml_js_types.ElementCompact; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchVCards: (params: { addressBook: DAVAddressBook; headers?: Record; objectUrls?: string[]; urlFilter?: (url: string) => boolean; useMultiGet?: boolean; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; createVCard: (params: { addressBook: DAVAddressBook; vCardString: string; filename: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; updateVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; deleteVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; serviceDiscovery: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchPrincipalUrl: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchHomeUrl: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; createAccount: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; loadCollections?: boolean; loadObjects?: boolean; fetchOptions?: RequestInit; }) => Promise; collectionQuery: (params: { url: string; body: any; depth?: DAVDepth; defaultNamespace?: DAVNamespaceShort; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; makeCollection: (params: { url: string; props?: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; supportedReportSet: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; isCollectionDirty: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise<{ isDirty: boolean; newCtag: string; }>; syncCollection: (params: { url: string; props: xml_js_types.ElementCompact; headers?: Record; headersToExclude?: string[]; syncLevel?: number; syncToken?: string; fetchOptions?: RequestInit; }) => Promise; smartCollectionSync: SmartCollectionSync; davRequest: (params: { url: string; init: DAVRequest; convertIncoming?: boolean; parseOutgoing?: boolean; fetchOptions?: RequestInit; }) => Promise; propfind: (params: { url: string; props: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; createObject: (params: { url: string; data: BodyInit; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; updateObject: (params: { url: string; data: BodyInit; etag?: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; deleteObject: (params: { url: string; etag?: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; createDAVClient: (params: { serverUrl: string; credentials: DAVCredentials; authMethod?: "Basic" | "Oauth" | "Digest" | "Custom"; authFunction?: (credentials: DAVCredentials) => Promise>; defaultAccountType?: DAVAccount["accountType"] | undefined; }) => Promise<{ davRequest: (params0: { url: string; init: DAVRequest; convertIncoming?: boolean; parseOutgoing?: boolean; }) => Promise; propfind: (params: { url: string; props: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; createAccount: (params0: { account: Optional; headers?: Record; loadCollections?: boolean; loadObjects?: boolean; }) => Promise; createObject: (params: { url: string; data: BodyInit; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; updateObject: (params: { url: string; data: BodyInit; etag?: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; deleteObject: (params: { url: string; etag?: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; calendarQuery: (params: { url: string; props: xml_js_types.ElementCompact; filters?: xml_js_types.ElementCompact; timezone?: string; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; addressBookQuery: (params: { url: string; props: xml_js_types.ElementCompact; filters?: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; collectionQuery: (params: { url: string; body: any; depth?: DAVDepth; defaultNamespace?: DAVNamespaceShort; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; makeCollection: (params: { url: string; props?: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; calendarMultiGet: (params: { url: string; props: xml_js_types.ElementCompact; objectUrls?: string[]; timezone?: string; depth: DAVDepth; filters?: xml_js_types.ElementCompact; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; makeCalendar: (params: { url: string; props: xml_js_types.ElementCompact; depth?: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; syncCollection: (params: { url: string; props: xml_js_types.ElementCompact; headers?: Record; headersToExclude?: string[]; syncLevel?: number; syncToken?: string; fetchOptions?: RequestInit; }) => Promise; supportedReportSet: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; isCollectionDirty: (params: { collection: DAVCollection; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise<{ isDirty: boolean; newCtag: string; }>; smartCollectionSync: SmartCollectionSync; fetchCalendars: (params?: { account?: DAVAccount; props?: xml_js_types.ElementCompact; projectedProps?: Record; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; } | undefined) => Promise; fetchCalendarUserAddresses: (params: { account: DAVAccount; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchCalendarObjects: (params: { calendar: DAVCalendar; objectUrls?: string[]; filters?: xml_js_types.ElementCompact; timeRange?: { start: string; end: string; }; expand?: boolean; urlFilter?: (url: string) => boolean; headers?: Record; headersToExclude?: string[]; useMultiGet?: boolean; fetchOptions?: RequestInit; }) => Promise; createCalendarObject: (params: { calendar: DAVCalendar; iCalString: string; filename: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; updateCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; deleteCalendarObject: (params: { calendarObject: DAVCalendarObject; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; syncCalendars: SyncCalendars; fetchAddressBooks: (params?: { account?: DAVAccount; props?: xml_js_types.ElementCompact; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; } | undefined) => Promise; addressBookMultiGet: (params: { url: string; props: xml_js_types.ElementCompact; objectUrls: string[]; depth: DAVDepth; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; fetchVCards: (params: { addressBook: DAVAddressBook; headers?: Record; objectUrls?: string[]; urlFilter?: (url: string) => boolean; useMultiGet?: boolean; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; createVCard: (params: { addressBook: DAVAddressBook; vCardString: string; filename: string; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; updateVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; deleteVCard: (params: { vCard: DAVVCard; headers?: Record; headersToExclude?: string[]; fetchOptions?: RequestInit; }) => Promise; }>; DAVClient: typeof DAVClient; DAVNamespace: typeof DAVNamespace; DAVNamespaceShort: typeof DAVNamespaceShort; DAVAttributeMap: { "urn:ietf:params:xml:ns:caldav": string; "urn:ietf:params:xml:ns:carddav": string; "http://calendarserver.org/ns/": string; "http://apple.com/ns/ical/": string; "DAV:": string; }; }; export { DAVAttributeMap, DAVClient, DAVNamespace, DAVNamespaceShort, addressBookMultiGet, addressBookQuery, calendarMultiGet, calendarQuery, cleanupFalsy, collectionQuery, createAccount, createCalendarObject, createDAVClient, createObject, createVCard, davRequest, _default as default, deleteCalendarObject, deleteObject, deleteVCard, fetchAddressBooks, fetchCalendarObjects, fetchCalendarUserAddresses, fetchCalendars, fetchOauthTokens, fetchVCards, freeBusyQuery, getBasicAuthHeaders, getDAVAttribute, getOauthHeaders, isCollectionDirty, makeCalendar, propfind, refreshAccessToken, smartCollectionSync, supportedReportSet, syncCalendars, syncCollection, updateCalendarObject, updateObject, updateVCard, urlContains, urlEquals }; export type { DAVAccount, DAVAddressBook, DAVCalendar, DAVCalendarObject, DAVCollection, DAVCredentials, DAVDepth, DAVMethods, DAVObject, DAVRequest, DAVResponse, DAVTokens, DAVVCard };