@sockethub/platform-caldav 1.0.0-alpha.3 → 1.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,7 +13,10 @@ against the authenticated account before it is used.
13
13
  ## Authentication
14
14
 
15
15
  Send credentials using either a username and password (normally an app
16
- password) or an OAuth access token obtained by the application. Sockethub uses
16
+ password) or an OAuth access token obtained by the application. Username and
17
+ password credentials negotiate HTTP Digest (MD5 or SHA-256, including the
18
+ `-sess` variants) or Basic authentication from the server's challenge. Digest
19
+ supports `qop=auth`; unsupported challenge modes are rejected. Sockethub uses
17
20
  the token as an HTTP Bearer token; it does not run an OAuth authorization UI.
18
21
 
19
22
  ```json
@@ -33,6 +36,28 @@ URL can be a service root; discovery also tries `/.well-known/caldav`.
33
36
  Cross-origin redirects are rejected, so configure the provider's final CalDAV
34
37
  origin when its discovery URL redirects elsewhere.
35
38
 
39
+ ### Authentication compatibility
40
+
41
+ <!-- markdownlint-disable MD013 -->
42
+
43
+ | Method | Status | Details |
44
+ | --- | --- | --- |
45
+ | HTTP Basic | Supported | Negotiated from the server challenge. Use only over HTTPS outside a controlled test network. |
46
+ | HTTP Digest | Supported | `MD5`, `MD5-sess`, `SHA-256`, and `SHA-256-sess`, with no `qop` or with `qop=auth`. Stale nonces are refreshed once. |
47
+ | OAuth Bearer | Supported with caller-provided token | Sockethub sends the supplied token as an HTTP Bearer token. Token acquisition, refresh, scopes, and provider consent remain the application's responsibility. |
48
+ | Digest `qop=auth-int` | Not supported | CalDAV request bodies are not included in Digest authentication hashes. |
49
+ | Digest `SHA-512-256` or `userhash` | Not supported | A server offering only these modes returns `caldav:unsupported-authentication`. |
50
+ | OAuth authorization or token refresh | Not supported | There is no provider-specific OAuth flow or token store in this platform. |
51
+ | Client TLS certificates | Not supported | Credentials cannot currently select a client certificate or private key. |
52
+ | Negotiate/Kerberos, NTLM | Not supported | These connection- and deployment-specific schemes are not implemented. |
53
+
54
+ <!-- markdownlint-enable MD013 -->
55
+
56
+ When a username and password are supplied, Sockethub sends no credentials until
57
+ the server challenges it, prefers a supported Digest challenge, and otherwise
58
+ uses Basic when offered. A Bearer token is sent directly. Authentication is
59
+ never forwarded to another origin.
60
+
36
61
  ## Actions
37
62
 
38
63
  - `fetch`: discover calendars and their event/task support.
@@ -173,15 +198,57 @@ Query again, reconcile the change, and retry with the new ETag.
173
198
 
174
199
  The implementation follows WebDAV/CalDAV discovery, calendar-query REPORT,
175
200
  iCalendar content-line escaping/folding, and conditional PUT/DELETE semantics.
176
- The integration suite exercises the complete event and VTODO lifecycle against
177
- Radicale. Provider-specific OAuth authorization and token refresh remain the
178
- calling application's responsibility, because Sockethub receives credentials
179
- only after authorization.
201
+
202
+ ### Server and provider compatibility
203
+
204
+ "Supported" below means the listed configuration has been exercised. Other
205
+ standards-compliant CalDAV servers may work, but are not considered verified
206
+ until they are included in automated or repeatable manual testing.
207
+
208
+ <!-- markdownlint-disable MD013 -->
209
+
210
+ | Service | Deployment | Verification | Authentication exercised | Notes |
211
+ | --- | --- | --- | --- | --- |
212
+ | Radicale 3.7.7 | Self-hosted | Automated integration | Basic | Complete discovery and event/task create, query, update, and delete lifecycle. |
213
+ | Baïkal 0.10.1 | Self-hosted | Automated integration | Digest MD5 with `qop=auth` | Complete lifecycle through Baïkal's `dav.php/` endpoint, including its encoded ETags. |
214
+ | Nextcloud | Self-hosted or hosted | Manually verified during initial development | Basic with username and password or app password | Use the final `/remote.php/dav/` endpoint when cross-origin discovery redirects are involved. OAuth is not covered by this verification. |
215
+ | ownCloud | Self-hosted or hosted | Not yet verified | Not yet verified | Expected to work when standard discovery and a supported authentication method are enabled. |
216
+ | DAViCal | Self-hosted | Not yet verified | Not yet verified | Expected to work when standard discovery and a supported authentication method are enabled. |
217
+ | SOGo | Self-hosted | Not yet verified | Not yet verified | Expected to work when standard discovery and a supported authentication method are enabled. |
218
+ | iCloud, Google Calendar, Fastmail, and other hosted providers | Hosted | Not yet verified | Provider-dependent | Provider-specific discovery, application passwords, OAuth scopes, or account policies may require additional work. |
219
+
220
+ <!-- markdownlint-enable MD013 -->
221
+
222
+ Private-network and plain HTTP servers are rejected by default. A Sockethub
223
+ administrator must explicitly enable `allowPrivateAddresses` or
224
+ `allowInsecureHttp`; a connected application cannot weaken these policies.
225
+
226
+ ### CalDAV feature coverage
227
+
228
+ <!-- markdownlint-disable MD013 -->
229
+
230
+ | Capability | Status | Notes |
231
+ | --- | --- | --- |
232
+ | Principal and calendar-home discovery | Supported | Uses `current-user-principal`, `calendar-home-set`, and `/.well-known/caldav` fallback. Redirects must remain on the configured origin. |
233
+ | Calendar listing | Supported | Discovers accessible calendars in the user's calendar home and their advertised `VEVENT`/`VTODO` component support. |
234
+ | Events and tasks | Supported | Reads and writes `VEVENT` and `VTODO`. `VJOURNAL` and other component types are not supported. |
235
+ | Calendar queries | Supported | Supports component and UTC time-range filters. Without a range, a query returns a calendar snapshot. |
236
+ | Conditional create, update, and delete | Supported | Uses ETags with `If-None-Match` and `If-Match` to prevent accidental overwrites. |
237
+ | Recurrence | Partially supported | Common recurrence rules are parsed and generated. Resources with recurrence exceptions, exclusion dates, or multiple primary components are readable but rejected for update when rewriting could lose data. |
238
+ | Scheduling data | Partially supported | Organizer and attendee properties are represented, but CalDAV scheduling inbox/outbox delivery, invitation responses, and server-side email are not implemented. |
239
+ | Shared and delegated calendars | Read-only discovery only | Calendars returned from the user's calendar home can be queried, but creating shares, accepting invitations, proxy delegation, and ACL management are not implemented. |
240
+ | Calendar collection management | Not supported | The platform does not create, rename, or delete calendar collections. |
241
+ | Free/busy queries | Not supported | CalDAV free-busy REPORT and scheduling availability are not implemented. |
242
+ | Incremental sync | Not supported | WebDAV sync tokens (RFC 6578) are not used yet; queries return snapshots. |
243
+ | Managed attachments | Not supported | iCalendar URL and inline attachment properties are supported, but CalDAV managed attachments are not. |
244
+
245
+ <!-- markdownlint-enable MD013 -->
180
246
 
181
247
  Queries currently return calendar snapshots. CalDAV sync tokens (RFC 6578) are
182
248
  the intended follow-up for efficient incremental synchronization.
183
249
 
184
250
  Stable errors include `caldav:authentication-failed`,
251
+ `caldav:unsupported-authentication`,
185
252
  `caldav:connection-failed`, `caldav:invalid-calendar`,
186
253
  `caldav:invalid-resource`, `caldav:unsupported-component`,
187
254
  `caldav:conflict`, and `caldav:not-found`.
package/dist/dav.d.ts CHANGED
@@ -1,26 +1,8 @@
1
+ import { type DavAuthentication, DavClient, DavFailure, type DavNetworkOptions } from "@sockethub/dav";
1
2
  import type { CalendarDescription, CalendarItem, QueryInput } from "./types.js";
2
- export declare class CalDavFailure extends Error {
3
- readonly code: string;
4
- constructor(code: string, cause?: unknown);
5
- }
6
- export declare class CalDavClient {
7
- private timeoutMs;
8
- private readonly dispatcher;
9
- private readonly authorization;
10
- readonly serviceUrl: URL;
11
- constructor(url: string, authentication: {
12
- username: string;
13
- password: string;
14
- } | {
15
- token: string;
16
- }, timeoutMs?: number, networkOptions?: {
17
- allowPrivateAddresses?: boolean;
18
- allowInsecureHttp?: boolean;
19
- });
20
- close(): Promise<void>;
21
- private assertAllowed;
22
- private request;
23
- private propfind;
3
+ export declare const CalDavFailure: typeof DavFailure;
4
+ export declare class CalDavClient extends DavClient {
5
+ constructor(url: string, authentication: DavAuthentication, timeoutMs?: number, networkOptions?: DavNetworkOptions);
24
6
  discoverCalendars(): Promise<CalendarDescription[]>;
25
7
  private discoverFrom;
26
8
  create(calendar: CalendarDescription, uid: string, body: string): Promise<{