@sockethub/platform-caldav 1.0.0-alpha.1
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/LICENSE +165 -0
- package/README.md +187 -0
- package/dist/dav.d.ts +36 -0
- package/dist/ical.d.ts +11 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +42610 -0
- package/dist/index.js.map +301 -0
- package/dist/schema.d.ts +1379 -0
- package/dist/timezone.d.ts +2 -0
- package/dist/types.d.ts +87 -0
- package/package.json +56 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export type CalendarComponent = "event" | "task";
|
|
2
|
+
export interface CalDavCredentials {
|
|
3
|
+
object: {
|
|
4
|
+
type: "credentials";
|
|
5
|
+
url: string;
|
|
6
|
+
username: string;
|
|
7
|
+
password: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: "credentials";
|
|
10
|
+
url: string;
|
|
11
|
+
token: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface CalendarDescription {
|
|
15
|
+
id: string;
|
|
16
|
+
type: "calendar";
|
|
17
|
+
name: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
components: CalendarComponent[];
|
|
20
|
+
}
|
|
21
|
+
export interface RecurrenceInput {
|
|
22
|
+
frequency: "daily" | "weekly" | "monthly" | "yearly";
|
|
23
|
+
interval?: number;
|
|
24
|
+
count?: number;
|
|
25
|
+
until?: string;
|
|
26
|
+
byDay?: string[];
|
|
27
|
+
byMonthDay?: number[];
|
|
28
|
+
}
|
|
29
|
+
export interface PersonInput {
|
|
30
|
+
email: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
role?: "chair" | "required" | "optional" | "non-participant";
|
|
33
|
+
status?: "needs-action" | "accepted" | "declined" | "tentative" | "delegated";
|
|
34
|
+
rsvp?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface ReminderInput {
|
|
37
|
+
trigger: string;
|
|
38
|
+
action?: "display" | "email";
|
|
39
|
+
description?: string;
|
|
40
|
+
recipients?: string[];
|
|
41
|
+
}
|
|
42
|
+
export interface AttachmentInput {
|
|
43
|
+
url?: string;
|
|
44
|
+
data?: string;
|
|
45
|
+
mediaType?: string;
|
|
46
|
+
filename?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface CalendarObjectInput {
|
|
49
|
+
id?: string;
|
|
50
|
+
etag?: string;
|
|
51
|
+
type: CalendarComponent;
|
|
52
|
+
uid?: string;
|
|
53
|
+
name: string;
|
|
54
|
+
content?: string;
|
|
55
|
+
location?: string;
|
|
56
|
+
url?: string;
|
|
57
|
+
startTime?: string;
|
|
58
|
+
endTime?: string;
|
|
59
|
+
due?: string;
|
|
60
|
+
allDay?: boolean;
|
|
61
|
+
timeZone?: string;
|
|
62
|
+
status?: "needs-action" | "in-process" | "completed" | "cancelled";
|
|
63
|
+
completedTime?: string;
|
|
64
|
+
percentComplete?: number;
|
|
65
|
+
sequence?: number;
|
|
66
|
+
recurrence?: RecurrenceInput;
|
|
67
|
+
organizer?: PersonInput;
|
|
68
|
+
attendees?: PersonInput[];
|
|
69
|
+
reminders?: ReminderInput[];
|
|
70
|
+
attachments?: AttachmentInput[];
|
|
71
|
+
}
|
|
72
|
+
export interface CalendarItem extends CalendarObjectInput {
|
|
73
|
+
id: string;
|
|
74
|
+
uid: string;
|
|
75
|
+
etag?: string;
|
|
76
|
+
updateSupported: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface QueryInput {
|
|
79
|
+
type?: CalendarComponent;
|
|
80
|
+
startTime?: string;
|
|
81
|
+
endTime?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface DeleteInput {
|
|
84
|
+
id: string;
|
|
85
|
+
type: CalendarComponent;
|
|
86
|
+
etag: string;
|
|
87
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sockethub/platform-caldav",
|
|
3
|
+
"description": "A Sockethub platform for synchronizing CalDAV calendars, events, and tasks",
|
|
4
|
+
"version": "1.0.0-alpha.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"license": "LGPL-3.0+",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=20"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/sockethub/sockethub.git",
|
|
28
|
+
"directory": "packages/platform-caldav"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/sockethub/sockethub/tree/master/packages/platform-caldav",
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "bun build src/index.ts --outdir dist --target node --format esm --sourcemap=external",
|
|
33
|
+
"clean": "rm -rf dist",
|
|
34
|
+
"clean:deps": "rm -rf node_modules",
|
|
35
|
+
"test": "bun test src/"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@sockethub/schemas": "^3.0.0-alpha.17",
|
|
39
|
+
"@sockethub/util": "^1.0.0-alpha.5",
|
|
40
|
+
"fast-xml-parser": "^5.10.1"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/bun": "latest",
|
|
44
|
+
"undici": "^7.19.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@sockethub/server": "^5.0.0-alpha.17"
|
|
48
|
+
},
|
|
49
|
+
"peerDependenciesMeta": {
|
|
50
|
+
"@sockethub/server": {
|
|
51
|
+
"optional": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"types": "./dist/index.d.ts",
|
|
55
|
+
"gitHead": "fdb2954a2e666f540bced1b7fd2035a43ef6077d"
|
|
56
|
+
}
|