@sockethub/platform-caldav 1.0.0-beta.0 → 1.0.0-beta.2

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
@@ -8,9 +8,26 @@ subscription links, without a CalDAV account.
8
8
  Requests accept only public HTTPS services by default. Administrators can opt
9
9
  in to HTTP with `packageConfig.allowInsecureHttp` and private-network targets
10
10
  with `packageConfig.allowPrivateAddresses`; these are server settings and
11
- cannot be enabled by a connected client. Credentials and OAuth tokens are sent
12
- only to the configured origin. Every calendar and item target is checked
13
- against the authenticated account before it is used.
11
+ cannot be enabled by a connected client. Address checks use the shared
12
+ outbound URL guard, including IPv6 embeddings of private ranges and the
13
+ local-use NAT64 prefix `64:ff9b:1::/48`. See
14
+ [Outbound URL guard](../../docs/configuration.md#outbound-url-guard).
15
+ Credentials and OAuth tokens are sent only to the configured origin. Every
16
+ calendar and item target is checked against the authenticated account before
17
+ it is used.
18
+
19
+ ## Discovery cache
20
+
21
+ Each `query`, `create`, `update`, and `delete` needs the account's calendar list to
22
+ check the target. The platform caches that discovery result in memory for
23
+ `packageConfig.discoveryCacheTtlMs` (default `300000`, 5 minutes; `0`
24
+ disables the cache). Entries are keyed by an HMAC of the protocol, service URL,
25
+ and credentials. The HMAC uses a per-process random secret, and only
26
+ collection metadata is stored. A `fetch` always discovers fresh. Within the TTL,
27
+ a calendar added on the server is not visible to targeted actions, and a removed
28
+ one is still accepted as a target (the server then rejects the request). An
29
+ authentication, not-found, or unknown-calendar error drops the entry, so the next
30
+ request rediscovers. The cache is lost when the platform process restarts.
14
31
 
15
32
  ## Authentication
16
33
 
@@ -205,7 +222,8 @@ IANA timezone data.
205
222
  The optional `uid` field must not contain `%`, `/`, or `\`; omit it to let
206
223
  Sockethub generate a safe UID.
207
224
  Attachments can use a URL or base64 `data`. Email reminders additionally need
208
- a `recipients` array. Tasks support `due`, `status`, `completedTime`, and
225
+ a `recipients` array. Events support `status` (`tentative`, `confirmed`, or
226
+ `cancelled`). Tasks support `due`, `status`, `completedTime`, and
209
227
  `percentComplete`.
210
228
 
211
229
  ### Update and delete
package/dist/index.d.ts CHANGED
@@ -13,7 +13,10 @@ export default class CalDav implements PlatformInterface {
13
13
  private readonly log;
14
14
  private readonly fetchImpl;
15
15
  private feedDispatcher?;
16
- config: StatelessPlatformConfig;
16
+ private readonly discovery;
17
+ config: StatelessPlatformConfig & {
18
+ discoveryCacheTtlMs: number;
19
+ };
17
20
  constructor(session: PlatformSession, fetchImpl?: FeedFetch);
18
21
  get schema(): PlatformSchemaStruct;
19
22
  isInitialized(): boolean;
@@ -42,6 +45,7 @@ export default class CalDav implements PlatformInterface {
42
45
  */
43
46
  private fetchFeed;
44
47
  private feedUrl;
48
+ private discoveryKey;
45
49
  private calendar;
46
50
  private assertResource;
47
51
  private mutationResponse;