@sockethub/platform-caldav 1.0.0-beta.1 → 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 +15 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4089 -3976
- package/dist/index.js.map +10 -10
- package/dist/schema.d.ts +6 -0
- package/dist/types.d.ts +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -16,6 +16,19 @@ Credentials and OAuth tokens are sent only to the configured origin. Every
|
|
|
16
16
|
calendar and item target is checked against the authenticated account before
|
|
17
17
|
it is used.
|
|
18
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.
|
|
31
|
+
|
|
19
32
|
## Authentication
|
|
20
33
|
|
|
21
34
|
Send credentials using either a username and password (normally an app
|
|
@@ -209,7 +222,8 @@ IANA timezone data.
|
|
|
209
222
|
The optional `uid` field must not contain `%`, `/`, or `\`; omit it to let
|
|
210
223
|
Sockethub generate a safe UID.
|
|
211
224
|
Attachments can use a URL or base64 `data`. Email reminders additionally need
|
|
212
|
-
a `recipients` array.
|
|
225
|
+
a `recipients` array. Events support `status` (`tentative`, `confirmed`, or
|
|
226
|
+
`cancelled`). Tasks support `due`, `status`, `completedTime`, and
|
|
213
227
|
`percentComplete`.
|
|
214
228
|
|
|
215
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
|
-
|
|
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;
|