mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +00:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0415664ff3 | ||
|
|
677e0082fa | ||
|
|
a387885b0a | ||
|
|
990b953055 | ||
|
|
36b47a645d | ||
|
|
aa02d11f58 | ||
|
|
1c31323512 | ||
|
|
03ae492483 | ||
|
|
0c48507f0c | ||
|
|
829d4a4385 | ||
|
|
4fe28c5b0f | ||
|
|
529f36ad99 | ||
|
|
ca5891314c | ||
|
|
e653c68cae | ||
|
|
26941c621b | ||
|
|
86ab6ef75e | ||
|
|
0669d4e683 | ||
|
|
0c432d70f9 | ||
|
|
54997ef865 | ||
|
|
1a1deeb5a2 | ||
|
|
87899738f6 | ||
|
|
ab90e5129c | ||
|
|
a9cb397f57 | ||
|
|
35e78bfb44 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1,2 +1,3 @@
|
|||||||
# Otherwise GitHub thinks this is an HTML project
|
# Otherwise GitHub thinks this is an HTML project
|
||||||
crates/frontend/public/assets/licenses.html linguist-detectable=false
|
crates/frontend/public/assets/licenses.html linguist-detectable=false
|
||||||
|
crates/frontend/public/assets/js/* linguist-detectable=false
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -12,3 +12,7 @@ principals.toml
|
|||||||
.env
|
.env
|
||||||
|
|
||||||
site
|
site
|
||||||
|
|
||||||
|
# Frontend
|
||||||
|
**/node_modules
|
||||||
|
**/.vite
|
||||||
|
|||||||
12
.sqlx/query-0195268daddd2d171577c93d1bae1b8937405bcefffa8f1f9b9c9f7f2084088f.json
generated
Normal file
12
.sqlx/query-0195268daddd2d171577c93d1bae1b8937405bcefffa8f1f9b9c9f7f2084088f.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "DELETE FROM app_tokens WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "0195268daddd2d171577c93d1bae1b8937405bcefffa8f1f9b9c9f7f2084088f"
|
||||||
|
}
|
||||||
12
.sqlx/query-02a9260d0ff496a6bf226fc8238ae332f8eb18dddbd80d31989c074804f31dee.json
generated
Normal file
12
.sqlx/query-02a9260d0ff496a6bf226fc8238ae332f8eb18dddbd80d31989c074804f31dee.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE calendars SET deleted_at = NULL WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "02a9260d0ff496a6bf226fc8238ae332f8eb18dddbd80d31989c074804f31dee"
|
||||||
|
}
|
||||||
12
.sqlx/query-0fd3167a58cbfb4ee44249dbc346d2d9077adfa04c35c8c6f2a1e24720baf753.json
generated
Normal file
12
.sqlx/query-0fd3167a58cbfb4ee44249dbc346d2d9077adfa04c35c8c6f2a1e24720baf753.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO app_tokens\n (id, principal, token, displayname)\n VALUES (?, ?, ?, ?)\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "0fd3167a58cbfb4ee44249dbc346d2d9077adfa04c35c8c6f2a1e24720baf753"
|
||||||
|
}
|
||||||
12
.sqlx/query-10325688a6601f6205cde9d9e2d582ca87a46607a1d889af155debc3073d78e1.json
generated
Normal file
12
.sqlx/query-10325688a6601f6205cde9d9e2d582ca87a46607a1d889af155debc3073d78e1.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE calendarobjects SET deleted_at = NULL, updated_at = datetime() WHERE (principal, cal_id, id) = (?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 3
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "10325688a6601f6205cde9d9e2d582ca87a46607a1d889af155debc3073d78e1"
|
||||||
|
}
|
||||||
56
.sqlx/query-130986d03d4d78ceeb15aff6f4d6304f0be0100e4bffad9cc3f6c1a2c6c4b297.json
generated
Normal file
56
.sqlx/query-130986d03d4d78ceeb15aff6f4d6304f0be0100e4bffad9cc3f6c1a2c6c4b297.json
generated
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT principal, id, synctoken, displayname, description, deleted_at, push_topic\n FROM addressbooks\n WHERE (principal, id) = (?, ?)\n AND ((deleted_at IS NULL) OR ?) ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "principal",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "synctoken",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "displayname",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "description",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "deleted_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "push_topic",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 3
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "130986d03d4d78ceeb15aff6f4d6304f0be0100e4bffad9cc3f6c1a2c6c4b297"
|
||||||
|
}
|
||||||
12
.sqlx/query-16a7e0cb4527060339c168ee2528416036e401f75a03100b6bfbee687b978520.json
generated
Normal file
12
.sqlx/query-16a7e0cb4527060339c168ee2528416036e401f75a03100b6bfbee687b978520.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE addressbooks SET principal = ?, id = ?, displayname = ?, description = ?, push_topic = ?\n WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 7
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "16a7e0cb4527060339c168ee2528416036e401f75a03100b6bfbee687b978520"
|
||||||
|
}
|
||||||
38
.sqlx/query-1ebaf3fd99bee2382abc931a1eeb29badc3aabcf6b8fd58e4cf92721588a9966.json
generated
Normal file
38
.sqlx/query-1ebaf3fd99bee2382abc931a1eeb29badc3aabcf6b8fd58e4cf92721588a9966.json
generated
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT id, displayname AS name, token, created_at AS \"created_at: _\" FROM app_tokens WHERE principal = ?",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "token",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "created_at: _",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "1ebaf3fd99bee2382abc931a1eeb29badc3aabcf6b8fd58e4cf92721588a9966"
|
||||||
|
}
|
||||||
44
.sqlx/query-23a07f4a732f95ff7483cd1cfe3b74af4fe6b97546a631bc96d03bdc3d764ed0.json
generated
Normal file
44
.sqlx/query-23a07f4a732f95ff7483cd1cfe3b74af4fe6b97546a631bc96d03bdc3d764ed0.json
generated
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT id, displayname, principal_type, password_hash, json_group_array(member_of) AS \"memberships: Json<Vec<Option<String>>>\"\n FROM principals\n LEFT JOIN memberships ON principals.id == memberships.principal\n GROUP BY principals.id\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "displayname",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "principal_type",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "password_hash",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "memberships: Json<Vec<Option<String>>>",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 0
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "23a07f4a732f95ff7483cd1cfe3b74af4fe6b97546a631bc96d03bdc3d764ed0"
|
||||||
|
}
|
||||||
26
.sqlx/query-246ec675667992c1297c29348d46496a884c59adb8b64b569d36f4ce10f88f47.json
generated
Normal file
26
.sqlx/query-246ec675667992c1297c29348d46496a884c59adb8b64b569d36f4ce10f88f47.json
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT id, vcf FROM addressobjects WHERE (principal, addressbook_id, id) = (?, ?, ?) AND ((deleted_at IS NULL) OR ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcf",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "246ec675667992c1297c29348d46496a884c59adb8b64b569d36f4ce10f88f47"
|
||||||
|
}
|
||||||
12
.sqlx/query-2834e16e6a7acb58141a2433f7735d5e2bf913c30f9f3e7bd9fecc7d4376be0f.json
generated
Normal file
12
.sqlx/query-2834e16e6a7acb58141a2433f7735d5e2bf913c30f9f3e7bd9fecc7d4376be0f.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "DELETE FROM calendars WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "2834e16e6a7acb58141a2433f7735d5e2bf913c30f9f3e7bd9fecc7d4376be0f"
|
||||||
|
}
|
||||||
12
.sqlx/query-2b145d094188fab69371d98520a034c69c0b61583d4e245388d3879d290619d0.json
generated
Normal file
12
.sqlx/query-2b145d094188fab69371d98520a034c69c0b61583d4e245388d3879d290619d0.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE addressobjects SET deleted_at = NULL, updated_at = datetime() WHERE (principal, addressbook_id, id) = (?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 3
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "2b145d094188fab69371d98520a034c69c0b61583d4e245388d3879d290619d0"
|
||||||
|
}
|
||||||
12
.sqlx/query-2f043f62a7c0eae1023e319f0bc8f35dfdcf6a8247e03b1de3e2cabb2d3ab8ae.json
generated
Normal file
12
.sqlx/query-2f043f62a7c0eae1023e319f0bc8f35dfdcf6a8247e03b1de3e2cabb2d3ab8ae.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n REPLACE INTO principals\n (id, displayname, principal_type, password_hash)\n VALUES (?, ?, ?, ?)\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "2f043f62a7c0eae1023e319f0bc8f35dfdcf6a8247e03b1de3e2cabb2d3ab8ae"
|
||||||
|
}
|
||||||
12
.sqlx/query-3885219f7e132876fa8bdfd31c0761d54fbcfe2846ffd8e4e94feb40547205be.json
generated
Normal file
12
.sqlx/query-3885219f7e132876fa8bdfd31c0761d54fbcfe2846ffd8e4e94feb40547205be.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "DELETE FROM addressbooks WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "3885219f7e132876fa8bdfd31c0761d54fbcfe2846ffd8e4e94feb40547205be"
|
||||||
|
}
|
||||||
12
.sqlx/query-3a1dbfbe9d22a62f1830d004548b7e805bcb9fdd24b49c8c9efa93df149b1002.json
generated
Normal file
12
.sqlx/query-3a1dbfbe9d22a62f1830d004548b7e805bcb9fdd24b49c8c9efa93df149b1002.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "DELETE FROM principals WHERE id = ?",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "3a1dbfbe9d22a62f1830d004548b7e805bcb9fdd24b49c8c9efa93df149b1002"
|
||||||
|
}
|
||||||
20
.sqlx/query-3b00b59f047e534a7f7f654984dc880f4aa9281aae5974722d2f22ec6d15cb32.json
generated
Normal file
20
.sqlx/query-3b00b59f047e534a7f7f654984dc880f4aa9281aae5974722d2f22ec6d15cb32.json
generated
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT principal FROM memberships WHERE member_of = ?",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "principal",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "3b00b59f047e534a7f7f654984dc880f4aa9281aae5974722d2f22ec6d15cb32"
|
||||||
|
}
|
||||||
12
.sqlx/query-3e1cca532372e891ab3e604ecb79311d8cd64108d4f238db4c79e9467a3b6d2e.json
generated
Normal file
12
.sqlx/query-3e1cca532372e891ab3e604ecb79311d8cd64108d4f238db4c79e9467a3b6d2e.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "REPLACE INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, date(?), date(?), ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 8
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "3e1cca532372e891ab3e604ecb79311d8cd64108d4f238db4c79e9467a3b6d2e"
|
||||||
|
}
|
||||||
26
.sqlx/query-41b415bfb07113cab4dc5d556d39d1d040025c33dfc24e276eb0b2a27ea1799f.json
generated
Normal file
26
.sqlx/query-41b415bfb07113cab4dc5d556d39d1d040025c33dfc24e276eb0b2a27ea1799f.json
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT DISTINCT object_id, max(0, synctoken) as \"synctoken!: i64\" from addressobjectchangelog\n WHERE synctoken > ?\n ORDER BY synctoken ASC\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "object_id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "synctoken!: i64",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "41b415bfb07113cab4dc5d556d39d1d040025c33dfc24e276eb0b2a27ea1799f"
|
||||||
|
}
|
||||||
12
.sqlx/query-508adcac37e0d6751924f65e9aed24c0185ce3b1bc39fd0eab7426f581aafe02.json
generated
Normal file
12
.sqlx/query-508adcac37e0d6751924f65e9aed24c0185ce3b1bc39fd0eab7426f581aafe02.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "INSERT INTO addressbooks (principal, id, displayname, description, push_topic)\n VALUES (?, ?, ?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 5
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "508adcac37e0d6751924f65e9aed24c0185ce3b1bc39fd0eab7426f581aafe02"
|
||||||
|
}
|
||||||
12
.sqlx/query-5132ee8198f155242aa332a10019c48ec334884bcf7841c8aa03fd5eb11351d9.json
generated
Normal file
12
.sqlx/query-5132ee8198f155242aa332a10019c48ec334884bcf7841c8aa03fd5eb11351d9.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "INSERT INTO calendars (principal, id, displayname, description, \"order\", color, subscription_url, timezone, timezone_id, push_topic, comp_event, comp_todo, comp_journal)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 13
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "5132ee8198f155242aa332a10019c48ec334884bcf7841c8aa03fd5eb11351d9"
|
||||||
|
}
|
||||||
12
.sqlx/query-526c4a9326db7f026eee15cca358943b0546fe56fc09204f1dfe90e2614f99b9.json
generated
Normal file
12
.sqlx/query-526c4a9326db7f026eee15cca358943b0546fe56fc09204f1dfe90e2614f99b9.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO addressobjectchangelog (principal, addressbook_id, object_id, \"operation\", synctoken)\n VALUES (?1, ?2, ?3, ?4, (\n SELECT synctoken FROM addressbooks WHERE (principal, id) = (?1, ?2)\n ))",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "526c4a9326db7f026eee15cca358943b0546fe56fc09204f1dfe90e2614f99b9"
|
||||||
|
}
|
||||||
26
.sqlx/query-543838c030550cb09d1af08adfeade8b7ce3575d92fddbc6e9582d141bc9e49d.json
generated
Normal file
26
.sqlx/query-543838c030550cb09d1af08adfeade8b7ce3575d92fddbc6e9582d141bc9e49d.json
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT id, ics FROM calendarobjects WHERE (principal, cal_id, id) = (?, ?, ?) AND ((deleted_at IS NULL) OR ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ics",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "543838c030550cb09d1af08adfeade8b7ce3575d92fddbc6e9582d141bc9e49d"
|
||||||
|
}
|
||||||
26
.sqlx/query-54c9c0e36a52e6963f11c6aa27f13aafb4204b8aa34b664fd825bd447db80e86.json
generated
Normal file
26
.sqlx/query-54c9c0e36a52e6963f11c6aa27f13aafb4204b8aa34b664fd825bd447db80e86.json
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT id, ics FROM calendarobjects WHERE principal = ? AND cal_id = ? AND deleted_at IS NULL",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ics",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "54c9c0e36a52e6963f11c6aa27f13aafb4204b8aa34b664fd825bd447db80e86"
|
||||||
|
}
|
||||||
26
.sqlx/query-557344035d762f2d385e505c15288ab9c89c1572f06e7fb61073e335a801b9db.json
generated
Normal file
26
.sqlx/query-557344035d762f2d385e505c15288ab9c89c1572f06e7fb61073e335a801b9db.json
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT id, vcf FROM addressobjects WHERE principal = ? AND addressbook_id = ? AND deleted_at IS NULL",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcf",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "557344035d762f2d385e505c15288ab9c89c1572f06e7fb61073e335a801b9db"
|
||||||
|
}
|
||||||
12
.sqlx/query-6327bee90e5df01536a0ddb15adcc37af3027f6902aa3786365c5ab2fbf06bda.json
generated
Normal file
12
.sqlx/query-6327bee90e5df01536a0ddb15adcc37af3027f6902aa3786365c5ab2fbf06bda.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "INSERT INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, date(?), date(?), ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 8
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "6327bee90e5df01536a0ddb15adcc37af3027f6902aa3786365c5ab2fbf06bda"
|
||||||
|
}
|
||||||
20
.sqlx/query-69b92e393e55b0d49d1671abf53d06551452846dd94d54ed67d85eb3ace6b568.json
generated
Normal file
20
.sqlx/query-69b92e393e55b0d49d1671abf53d06551452846dd94d54ed67d85eb3ace6b568.json
generated
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE calendars\n SET synctoken = synctoken + 1\n WHERE (principal, id) = (?1, ?2)\n RETURNING synctoken",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "synctoken",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Integer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "69b92e393e55b0d49d1671abf53d06551452846dd94d54ed67d85eb3ace6b568"
|
||||||
|
}
|
||||||
12
.sqlx/query-6d08d3a014743da9b445ab012437ec11f81fd86d3b02fc1df07a036c6b47ace2.json
generated
Normal file
12
.sqlx/query-6d08d3a014743da9b445ab012437ec11f81fd86d3b02fc1df07a036c6b47ace2.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "INSERT OR REPLACE INTO davpush_subscriptions (id, topic, expiration, push_resource, public_key, public_key_type, auth_secret) VALUES (?, ?, ?, ?, ?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 7
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "6d08d3a014743da9b445ab012437ec11f81fd86d3b02fc1df07a036c6b47ace2"
|
||||||
|
}
|
||||||
12
.sqlx/query-77ad562b6d78115ebb726d58cf1e4de69df169c1872cb452488ff8c43ed983a9.json
generated
Normal file
12
.sqlx/query-77ad562b6d78115ebb726d58cf1e4de69df169c1872cb452488ff8c43ed983a9.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO calendarobjectchangelog (principal, cal_id, object_id, \"operation\", synctoken)\n VALUES (?1, ?2, ?3, ?4, (\n SELECT synctoken FROM calendars WHERE (principal, id) = (?1, ?2)\n ))",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "77ad562b6d78115ebb726d58cf1e4de69df169c1872cb452488ff8c43ed983a9"
|
||||||
|
}
|
||||||
12
.sqlx/query-7d4348f04ea5ac82e0f362240fb677740288c963c24b85de11bad011ec5da4bc.json
generated
Normal file
12
.sqlx/query-7d4348f04ea5ac82e0f362240fb677740288c963c24b85de11bad011ec5da4bc.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "DELETE FROM addressobjects WHERE addressbook_id = ? AND id = ?",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "7d4348f04ea5ac82e0f362240fb677740288c963c24b85de11bad011ec5da4bc"
|
||||||
|
}
|
||||||
12
.sqlx/query-7e874304170bef19ceb6f96b3d9803ce6d4553cc2bd57b05d1e546e857f995cf.json
generated
Normal file
12
.sqlx/query-7e874304170bef19ceb6f96b3d9803ce6d4553cc2bd57b05d1e546e857f995cf.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE calendarobjects SET deleted_at = datetime(), updated_at = datetime() WHERE (principal, cal_id, id) = (?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 3
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "7e874304170bef19ceb6f96b3d9803ce6d4553cc2bd57b05d1e546e857f995cf"
|
||||||
|
}
|
||||||
56
.sqlx/query-809600b79c012e77c5efabe5d355a8b188f23826a723030807dedc96fd24fdcc.json
generated
Normal file
56
.sqlx/query-809600b79c012e77c5efabe5d355a8b188f23826a723030807dedc96fd24fdcc.json
generated
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT id, topic, expiration, push_resource, public_key, public_key_type, auth_secret\n FROM davpush_subscriptions\n WHERE (topic) = (?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topic",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "expiration",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "push_resource",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "public_key",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "public_key_type",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auth_secret",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "809600b79c012e77c5efabe5d355a8b188f23826a723030807dedc96fd24fdcc"
|
||||||
|
}
|
||||||
12
.sqlx/query-879e2717335db3b04884fc91173c8507272f1804b27b6a7f61cbe1fbb01265cd.json
generated
Normal file
12
.sqlx/query-879e2717335db3b04884fc91173c8507272f1804b27b6a7f61cbe1fbb01265cd.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "DELETE FROM memberships WHERE (principal, member_of) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "879e2717335db3b04884fc91173c8507272f1804b27b6a7f61cbe1fbb01265cd"
|
||||||
|
}
|
||||||
44
.sqlx/query-95dce97b2e3224c327690c36777e3ece84a9529551696198b745dd8c743c8a38.json
generated
Normal file
44
.sqlx/query-95dce97b2e3224c327690c36777e3ece84a9529551696198b745dd8c743c8a38.json
generated
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT id, displayname, principal_type, password_hash, json_group_array(member_of) AS \"memberships: Json<Vec<Option<String>>>\"\n FROM (SELECT * FROM principals WHERE id = ?) AS principals\n LEFT JOIN memberships ON principals.id == memberships.principal\n GROUP BY principals.id\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "displayname",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "principal_type",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "password_hash",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "memberships: Json<Vec<Option<String>>>",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "95dce97b2e3224c327690c36777e3ece84a9529551696198b745dd8c743c8a38"
|
||||||
|
}
|
||||||
12
.sqlx/query-98dba6ddce38d166ef325bbce6055d83fb0092619262c281a271bdc783a0aed9.json
generated
Normal file
12
.sqlx/query-98dba6ddce38d166ef325bbce6055d83fb0092619262c281a271bdc783a0aed9.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "REPLACE INTO addressobjects (principal, addressbook_id, id, vcf) VALUES (?, ?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "98dba6ddce38d166ef325bbce6055d83fb0092619262c281a271bdc783a0aed9"
|
||||||
|
}
|
||||||
56
.sqlx/query-9be5d6df7d30a9a85aece59be810bbbb203bab874860aa05eb311259e4baaf05.json
generated
Normal file
56
.sqlx/query-9be5d6df7d30a9a85aece59be810bbbb203bab874860aa05eb311259e4baaf05.json
generated
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT principal, id, synctoken, displayname, description, deleted_at, push_topic\n FROM addressbooks\n WHERE principal = ? AND deleted_at IS NULL",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "principal",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "synctoken",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "displayname",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "description",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "deleted_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "push_topic",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "9be5d6df7d30a9a85aece59be810bbbb203bab874860aa05eb311259e4baaf05"
|
||||||
|
}
|
||||||
104
.sqlx/query-9f930775043a6d4571a8ffd5a981cadf7c51f3f11a189f8461505abec31076e6.json
generated
Normal file
104
.sqlx/query-9f930775043a6d4571a8ffd5a981cadf7c51f3f11a189f8461505abec31076e6.json
generated
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT *\n FROM calendars\n WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "principal",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "synctoken",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "displayname",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "description",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "order",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "color",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "timezone",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "timezone_id",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "deleted_at",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscription_url",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "push_topic",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comp_event",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comp_todo",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comp_journal",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Bool"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "9f930775043a6d4571a8ffd5a981cadf7c51f3f11a189f8461505abec31076e6"
|
||||||
|
}
|
||||||
12
.sqlx/query-a4371f228f94afd8e6f4ac4b0f7d95b6bf86268b64e714fa7ca587eae9e5df15.json
generated
Normal file
12
.sqlx/query-a4371f228f94afd8e6f4ac4b0f7d95b6bf86268b64e714fa7ca587eae9e5df15.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE calendars SET deleted_at = datetime() WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "a4371f228f94afd8e6f4ac4b0f7d95b6bf86268b64e714fa7ca587eae9e5df15"
|
||||||
|
}
|
||||||
12
.sqlx/query-a8b4258868d238d9c226c44aec8c3c4d90d8e3ca526d4d60b340e868bbfd9ddb.json
generated
Normal file
12
.sqlx/query-a8b4258868d238d9c226c44aec8c3c4d90d8e3ca526d4d60b340e868bbfd9ddb.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "INSERT INTO addressobjects (principal, addressbook_id, id, vcf) VALUES (?, ?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "a8b4258868d238d9c226c44aec8c3c4d90d8e3ca526d4d60b340e868bbfd9ddb"
|
||||||
|
}
|
||||||
12
.sqlx/query-ac0f9e29ea8079c6900ffb0ebde699309fe8db1ac9f95c58bc9ce051b7d70299.json
generated
Normal file
12
.sqlx/query-ac0f9e29ea8079c6900ffb0ebde699309fe8db1ac9f95c58bc9ce051b7d70299.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE addressobjects SET deleted_at = datetime(), updated_at = datetime() WHERE (principal, addressbook_id, id) = (?, ?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 3
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "ac0f9e29ea8079c6900ffb0ebde699309fe8db1ac9f95c58bc9ce051b7d70299"
|
||||||
|
}
|
||||||
20
.sqlx/query-b89be55d6f76591f68520bbdf0ebb6d688b01ee63ae36936692cf1b4f434c7ee.json
generated
Normal file
20
.sqlx/query-b89be55d6f76591f68520bbdf0ebb6d688b01ee63ae36936692cf1b4f434c7ee.json
generated
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n UPDATE addressbooks\n SET synctoken = synctoken + 1\n WHERE (principal, id) = (?1, ?2)\n RETURNING synctoken",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "synctoken",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Integer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "b89be55d6f76591f68520bbdf0ebb6d688b01ee63ae36936692cf1b4f434c7ee"
|
||||||
|
}
|
||||||
26
.sqlx/query-c550dbf3d5ce7069f28d767ea9045e477ef8d29d6186851760757a06dec42339.json
generated
Normal file
26
.sqlx/query-c550dbf3d5ce7069f28d767ea9045e477ef8d29d6186851760757a06dec42339.json
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT id, ics FROM calendarobjects\n WHERE principal = ? AND cal_id = ? AND deleted_at IS NULL\n AND (last_occurence IS NULL OR ? IS NULL OR last_occurence >= date(?))\n AND (first_occurence IS NULL OR ? IS NULL OR first_occurence <= date(?))\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ics",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 6
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "c550dbf3d5ce7069f28d767ea9045e477ef8d29d6186851760757a06dec42339"
|
||||||
|
}
|
||||||
26
.sqlx/query-cbe4be47b2ca1eba485de258f522dec14540a6a9bf383fcde294e8fe14160f22.json
generated
Normal file
26
.sqlx/query-cbe4be47b2ca1eba485de258f522dec14540a6a9bf383fcde294e8fe14160f22.json
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n SELECT DISTINCT object_id, max(0, synctoken) as \"synctoken!: i64\" from calendarobjectchangelog\n WHERE synctoken > ?\n ORDER BY synctoken ASC\n ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "object_id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "synctoken!: i64",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "cbe4be47b2ca1eba485de258f522dec14540a6a9bf383fcde294e8fe14160f22"
|
||||||
|
}
|
||||||
104
.sqlx/query-cce62f7829bd688cd8c7928b587bc31f0e50865c214b1df113350bea2c254237.json
generated
Normal file
104
.sqlx/query-cce62f7829bd688cd8c7928b587bc31f0e50865c214b1df113350bea2c254237.json
generated
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT *\n FROM calendars\n WHERE principal = ? AND deleted_at IS NOT NULL",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "principal",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "synctoken",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "displayname",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "description",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "order",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "color",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "timezone",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "timezone_id",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "deleted_at",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscription_url",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "push_topic",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comp_event",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comp_todo",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comp_journal",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Bool"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "cce62f7829bd688cd8c7928b587bc31f0e50865c214b1df113350bea2c254237"
|
||||||
|
}
|
||||||
104
.sqlx/query-cedfb82b38fdd0c7681b9873b1008abee4a2f4ca16abad1b837f256d0bf416b1.json
generated
Normal file
104
.sqlx/query-cedfb82b38fdd0c7681b9873b1008abee4a2f4ca16abad1b837f256d0bf416b1.json
generated
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT *\n FROM calendars\n WHERE principal = ? AND deleted_at IS NULL",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "principal",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "synctoken",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "displayname",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "description",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "order",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "color",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "timezone",
|
||||||
|
"ordinal": 7,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "timezone_id",
|
||||||
|
"ordinal": 8,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "deleted_at",
|
||||||
|
"ordinal": 9,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subscription_url",
|
||||||
|
"ordinal": 10,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "push_topic",
|
||||||
|
"ordinal": 11,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comp_event",
|
||||||
|
"ordinal": 12,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comp_todo",
|
||||||
|
"ordinal": 13,
|
||||||
|
"type_info": "Bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comp_journal",
|
||||||
|
"ordinal": 14,
|
||||||
|
"type_info": "Bool"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "cedfb82b38fdd0c7681b9873b1008abee4a2f4ca16abad1b837f256d0bf416b1"
|
||||||
|
}
|
||||||
12
.sqlx/query-d65c9c40606e59dd816a51b9b9ac60fd2ff81aaa358fcc038134e9a68ba45ad7.json
generated
Normal file
12
.sqlx/query-d65c9c40606e59dd816a51b9b9ac60fd2ff81aaa358fcc038134e9a68ba45ad7.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE calendars SET principal = ?, id = ?, displayname = ?, description = ?, \"order\" = ?, color = ?, timezone = ?, timezone_id = ?, push_topic = ?, comp_event = ?, comp_todo = ?, comp_journal = ?\n WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 14
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "d65c9c40606e59dd816a51b9b9ac60fd2ff81aaa358fcc038134e9a68ba45ad7"
|
||||||
|
}
|
||||||
12
.sqlx/query-e5cf59ade11c09d90899cc9f87754a78a0ca9f7781fd252ebdaf4d2180fca3ba.json
generated
Normal file
12
.sqlx/query-e5cf59ade11c09d90899cc9f87754a78a0ca9f7781fd252ebdaf4d2180fca3ba.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "DELETE FROM calendarobjects WHERE cal_id = ? AND id = ?",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "e5cf59ade11c09d90899cc9f87754a78a0ca9f7781fd252ebdaf4d2180fca3ba"
|
||||||
|
}
|
||||||
56
.sqlx/query-e5ded4814aae1fc033bb90d27c745f76d3799958d929e8e8d16aa3ceff98e72d.json
generated
Normal file
56
.sqlx/query-e5ded4814aae1fc033bb90d27c745f76d3799958d929e8e8d16aa3ceff98e72d.json
generated
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT principal, id, synctoken, displayname, description, deleted_at, push_topic\n FROM addressbooks\n WHERE principal = ? AND deleted_at IS NOT NULL",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "principal",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "synctoken",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "displayname",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "description",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "deleted_at",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "push_topic",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "e5ded4814aae1fc033bb90d27c745f76d3799958d929e8e8d16aa3ceff98e72d"
|
||||||
|
}
|
||||||
12
.sqlx/query-e912be3352702bbf035b3ee6e9f239bf75a1ffef20211f1b1e895a67a2310960.json
generated
Normal file
12
.sqlx/query-e912be3352702bbf035b3ee6e9f239bf75a1ffef20211f1b1e895a67a2310960.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "DELETE FROM davpush_subscriptions WHERE id = ? ",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "e912be3352702bbf035b3ee6e9f239bf75a1ffef20211f1b1e895a67a2310960"
|
||||||
|
}
|
||||||
12
.sqlx/query-e947709ba03b108765082d1c4cff3dd8cb485fba5819ac914e20cb8e97037da9.json
generated
Normal file
12
.sqlx/query-e947709ba03b108765082d1c4cff3dd8cb485fba5819ac914e20cb8e97037da9.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "REPLACE INTO memberships (principal, member_of) VALUES (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "e947709ba03b108765082d1c4cff3dd8cb485fba5819ac914e20cb8e97037da9"
|
||||||
|
}
|
||||||
56
.sqlx/query-ef6cf801df2237b82b55754f1b0a5da51089810fe7a0feb0d68ea801b4e2721c.json
generated
Normal file
56
.sqlx/query-ef6cf801df2237b82b55754f1b0a5da51089810fe7a0feb0d68ea801b4e2721c.json
generated
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "SELECT id, topic, expiration, push_resource, public_key, public_key_type, auth_secret\n FROM davpush_subscriptions\n WHERE (id) = (?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": "id",
|
||||||
|
"ordinal": 0,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topic",
|
||||||
|
"ordinal": 1,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "expiration",
|
||||||
|
"ordinal": 2,
|
||||||
|
"type_info": "Datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "push_resource",
|
||||||
|
"ordinal": 3,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "public_key",
|
||||||
|
"ordinal": 4,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "public_key_type",
|
||||||
|
"ordinal": 5,
|
||||||
|
"type_info": "Text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auth_secret",
|
||||||
|
"ordinal": 6,
|
||||||
|
"type_info": "Text"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": [
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"hash": "ef6cf801df2237b82b55754f1b0a5da51089810fe7a0feb0d68ea801b4e2721c"
|
||||||
|
}
|
||||||
12
.sqlx/query-fbd776efdbacf6ce039b5d9760b0de181a6f4e066c52bcac4c106118f5435fe7.json
generated
Normal file
12
.sqlx/query-fbd776efdbacf6ce039b5d9760b0de181a6f4e066c52bcac4c106118f5435fe7.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE addressbooks SET deleted_at = datetime() WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "fbd776efdbacf6ce039b5d9760b0de181a6f4e066c52bcac4c106118f5435fe7"
|
||||||
|
}
|
||||||
12
.sqlx/query-fcc493f5e491abdac2c2d7d5f636c770e449daf8f5ab4873950ab126edfcce7b.json
generated
Normal file
12
.sqlx/query-fcc493f5e491abdac2c2d7d5f636c770e449daf8f5ab4873950ab126edfcce7b.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE addressbooks SET deleted_at = NULL WHERE (principal, id) = (?, ?)",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 2
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "fcc493f5e491abdac2c2d7d5f636c770e449daf8f5ab4873950ab126edfcce7b"
|
||||||
|
}
|
||||||
137
Cargo.lock
generated
137
Cargo.lock
generated
@@ -759,6 +759,23 @@ dependencies = [
|
|||||||
"spki",
|
"spki",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ece"
|
||||||
|
version = "2.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c2ea1d2f2cc974957a4e2575d8e5bb494549bab66338d6320c2789abcfff5746"
|
||||||
|
dependencies = [
|
||||||
|
"base64 0.21.7",
|
||||||
|
"byteorder",
|
||||||
|
"hex",
|
||||||
|
"hkdf",
|
||||||
|
"lazy_static",
|
||||||
|
"once_cell",
|
||||||
|
"openssl",
|
||||||
|
"sha2",
|
||||||
|
"thiserror 1.0.69",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ed25519"
|
name = "ed25519"
|
||||||
version = "2.2.3"
|
version = "2.2.3"
|
||||||
@@ -903,6 +920,21 @@ version = "0.1.5"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "foreign-types"
|
||||||
|
version = "0.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
|
||||||
|
dependencies = [
|
||||||
|
"foreign-types-shared",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "foreign-types-shared"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "form_urlencoded"
|
name = "form_urlencoded"
|
||||||
version = "1.2.1"
|
version = "1.2.1"
|
||||||
@@ -1222,6 +1254,12 @@ dependencies = [
|
|||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "http-range-header"
|
||||||
|
version = "0.4.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "httparse"
|
name = "httparse"
|
||||||
version = "1.10.1"
|
version = "1.10.1"
|
||||||
@@ -1616,6 +1654,18 @@ version = "0.8.4"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
|
checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "matchit-serde"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://github.com/lennart-k/matchit-serde?rev=f0591d13#f0591d139ea1c88fa4ee397f3fcb4225fad4c6dc"
|
||||||
|
dependencies = [
|
||||||
|
"derive_more",
|
||||||
|
"matchit",
|
||||||
|
"percent-encoding",
|
||||||
|
"serde",
|
||||||
|
"thiserror 2.0.12",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "md-5"
|
name = "md-5"
|
||||||
version = "0.10.6"
|
version = "0.10.6"
|
||||||
@@ -1803,6 +1853,54 @@ dependencies = [
|
|||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "openssl"
|
||||||
|
version = "0.10.73"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags",
|
||||||
|
"cfg-if",
|
||||||
|
"foreign-types",
|
||||||
|
"libc",
|
||||||
|
"once_cell",
|
||||||
|
"openssl-macros",
|
||||||
|
"openssl-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "openssl-macros"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "openssl-src"
|
||||||
|
version = "300.5.0+3.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e8ce546f549326b0e6052b649198487d91320875da901e7bd11a06d1ee3f9c2f"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "openssl-sys"
|
||||||
|
version = "0.9.109"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"libc",
|
||||||
|
"openssl-src",
|
||||||
|
"pkg-config",
|
||||||
|
"vcpkg",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "opentelemetry"
|
name = "opentelemetry"
|
||||||
version = "0.30.0"
|
version = "0.30.0"
|
||||||
@@ -2638,7 +2736,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical"
|
name = "rustical"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"argon2",
|
"argon2",
|
||||||
@@ -2681,7 +2779,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_caldav"
|
name = "rustical_caldav"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"axum",
|
"axum",
|
||||||
@@ -2716,7 +2814,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_carddav"
|
name = "rustical_carddav"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"axum",
|
"axum",
|
||||||
@@ -2748,7 +2846,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_dav"
|
name = "rustical_dav"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"axum",
|
"axum",
|
||||||
@@ -2759,6 +2857,8 @@ dependencies = [
|
|||||||
"http",
|
"http",
|
||||||
"itertools 0.14.0",
|
"itertools 0.14.0",
|
||||||
"log",
|
"log",
|
||||||
|
"matchit",
|
||||||
|
"matchit-serde",
|
||||||
"quick-xml",
|
"quick-xml",
|
||||||
"rustical_xml",
|
"rustical_xml",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -2771,15 +2871,21 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_dav_push"
|
name = "rustical_dav_push"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
"axum",
|
||||||
|
"base64 0.22.1",
|
||||||
"derive_more",
|
"derive_more",
|
||||||
|
"ece",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"http",
|
"http",
|
||||||
"itertools 0.14.0",
|
"itertools 0.14.0",
|
||||||
"log",
|
"log",
|
||||||
|
"openssl",
|
||||||
|
"p256",
|
||||||
"quick-xml",
|
"quick-xml",
|
||||||
|
"rand 0.9.1",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"rustical_dav",
|
"rustical_dav",
|
||||||
"rustical_store",
|
"rustical_store",
|
||||||
@@ -2792,7 +2898,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_frontend"
|
name = "rustical_frontend"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"askama",
|
"askama",
|
||||||
"askama_web",
|
"askama_web",
|
||||||
@@ -2816,6 +2922,7 @@ dependencies = [
|
|||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tower",
|
"tower",
|
||||||
|
"tower-http",
|
||||||
"tower-sessions",
|
"tower-sessions",
|
||||||
"tracing",
|
"tracing",
|
||||||
"url",
|
"url",
|
||||||
@@ -2824,7 +2931,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_ical"
|
name = "rustical_ical"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -2842,7 +2949,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_oidc"
|
name = "rustical_oidc"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"axum",
|
"axum",
|
||||||
@@ -2857,7 +2964,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_store"
|
name = "rustical_store"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -2891,7 +2998,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_store_sqlite"
|
name = "rustical_store_sqlite"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -2911,7 +3018,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustical_xml"
|
name = "rustical_xml"
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quick-xml",
|
"quick-xml",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
@@ -3776,12 +3883,20 @@ checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
"futures-core",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"http",
|
"http",
|
||||||
"http-body",
|
"http-body",
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
|
"http-range-header",
|
||||||
|
"httpdate",
|
||||||
"iri-string",
|
"iri-string",
|
||||||
|
"mime",
|
||||||
|
"mime_guess",
|
||||||
|
"percent-encoding",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
|
"tokio",
|
||||||
|
"tokio-util",
|
||||||
"tower",
|
"tower",
|
||||||
"tower-layer",
|
"tower-layer",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
|
|||||||
10
Cargo.toml
10
Cargo.toml
@@ -2,7 +2,7 @@
|
|||||||
members = ["crates/*"]
|
members = ["crates/*"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.1.0"
|
version = "0.3.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "A CalDAV server"
|
description = "A CalDAV server"
|
||||||
repository = "https://github.com/lennart-k/rustical"
|
repository = "https://github.com/lennart-k/rustical"
|
||||||
@@ -20,6 +20,7 @@ publish = false
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
debug = ["opentelemetry"]
|
debug = ["opentelemetry"]
|
||||||
|
frontend-dev = ["rustical_frontend/dev"]
|
||||||
opentelemetry = [
|
opentelemetry = [
|
||||||
"dep:opentelemetry",
|
"dep:opentelemetry",
|
||||||
"dep:opentelemetry-otlp",
|
"dep:opentelemetry-otlp",
|
||||||
@@ -33,6 +34,7 @@ opentelemetry = [
|
|||||||
debug = 0
|
debug = 0
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
matchit = "0.8"
|
||||||
uuid = { version = "1.11", features = ["v4", "fast-rng"] }
|
uuid = { version = "1.11", features = ["v4", "fast-rng"] }
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
axum = "0.8"
|
axum = "0.8"
|
||||||
@@ -132,6 +134,12 @@ reqwest = { version = "0.12", features = [
|
|||||||
], default-features = false }
|
], default-features = false }
|
||||||
openidconnect = "4.0"
|
openidconnect = "4.0"
|
||||||
clap = { version = "4.5", features = ["derive", "env"] }
|
clap = { version = "4.5", features = ["derive", "env"] }
|
||||||
|
matchit-serde = { git = "https://github.com/lennart-k/matchit-serde", rev = "f0591d13" }
|
||||||
|
ece = { version = "2.3", default-features = false, features = [
|
||||||
|
"backend-openssl",
|
||||||
|
] }
|
||||||
|
openssl = { version = "0.10", features = ["vendored"] }
|
||||||
|
p256 = { version = "0.13", features = ["ecdh"] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rustical_store = { workspace = true }
|
rustical_store = { workspace = true }
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ RUN case $TARGETPLATFORM in \
|
|||||||
*) echo "Unsupported platform ${TARGETPLATFORM}"; exit 1;; \
|
*) echo "Unsupported platform ${TARGETPLATFORM}"; exit 1;; \
|
||||||
esac
|
esac
|
||||||
|
|
||||||
RUN apk add --no-cache musl-dev llvm19 clang \
|
RUN apk add --no-cache musl-dev llvm19 clang perl pkgconf make \
|
||||||
&& rustup target add "$(cat /tmp/rust_target)" \
|
&& rustup target add "$(cat /tmp/rust_target)" \
|
||||||
&& cargo install cargo-chef --locked \
|
&& cargo install cargo-chef --locked \
|
||||||
&& rm -rf "$CARGO_HOME/registry"
|
&& rm -rf "$CARGO_HOME/registry"
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ a CalDAV/CardDAV server
|
|||||||
RustiCal is **not production-ready!**
|
RustiCal is **not production-ready!**
|
||||||
While I've started migrating to RustiCal and becoming more confident,
|
While I've started migrating to RustiCal and becoming more confident,
|
||||||
please know that bugs and rough edges will still occur.
|
please know that bugs and rough edges will still occur.
|
||||||
Concretely, if you are using Apple Calendar you will want to stay away from assigning groups to users.
|
|
||||||
If you still want to play around with it in its current state, absolutely feel free to do so and to open up an issue if something is not working. :)
|
If you still want to play around with it in its current state, absolutely feel free to do so and to open up an issue if something is not working. :)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- easy to backup, everything saved in one SQLite database
|
- easy to backup, everything saved in one SQLite database
|
||||||
- ~~[WebDAV Push](https://github.com/bitfireAT/webdav-push/) support, so near-instant synchronisation to DAVx5~~ (currently broken)
|
- also export feature in the frontend
|
||||||
|
- [WebDAV Push](https://github.com/bitfireAT/webdav-push/) support, so near-instant synchronisation to DAVx5
|
||||||
- lightweight (the container image contains only one binary)
|
- lightweight (the container image contains only one binary)
|
||||||
- adequately fast (I'd love to say blazingly fast™ :fire: but I don't have any benchmarks)
|
- adequately fast (I'd love to say blazingly fast™ :fire: but I don't have any benchmarks)
|
||||||
- deleted calendars are recoverable
|
- deleted calendars are recoverable
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ accepted = [
|
|||||||
"CDLA-Permissive-2.0",
|
"CDLA-Permissive-2.0",
|
||||||
"Zlib",
|
"Zlib",
|
||||||
"AGPL-3.0",
|
"AGPL-3.0",
|
||||||
|
"MPL-2.0",
|
||||||
]
|
]
|
||||||
workarounds = ["ring", "chrono", "rustls"]
|
workarounds = ["ring", "chrono", "rustls"]
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ use crate::calendar::prop::SupportedCalendarComponentSet;
|
|||||||
use axum::extract::{Path, State};
|
use axum::extract::{Path, State};
|
||||||
use axum::response::{IntoResponse, Response};
|
use axum::response::{IntoResponse, Response};
|
||||||
use http::{Method, StatusCode};
|
use http::{Method, StatusCode};
|
||||||
|
use rustical_dav::xml::HrefElement;
|
||||||
use rustical_ical::CalendarObjectType;
|
use rustical_ical::CalendarObjectType;
|
||||||
use rustical_store::auth::User;
|
use rustical_store::auth::User;
|
||||||
use rustical_store::{Calendar, CalendarStore, SubscriptionStore};
|
use rustical_store::{Calendar, CalendarStore, SubscriptionStore};
|
||||||
@@ -29,6 +30,8 @@ pub struct MkcolCalendarProp {
|
|||||||
resourcetype: Option<Unparsed>,
|
resourcetype: Option<Unparsed>,
|
||||||
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
||||||
supported_calendar_component_set: Option<SupportedCalendarComponentSet>,
|
supported_calendar_component_set: Option<SupportedCalendarComponentSet>,
|
||||||
|
#[xml(ns = "rustical_dav::namespace::NS_CALENDARSERVER")]
|
||||||
|
source: Option<HrefElement>,
|
||||||
// Ignore that property, we don't support it but also don't want to throw an error
|
// Ignore that property, we don't support it but also don't want to throw an error
|
||||||
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
#[xml(ns = "rustical_dav::namespace::NS_CALDAV")]
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
@@ -69,12 +72,16 @@ pub async fn route_mkcalendar<C: CalendarStore, S: SubscriptionStore>(
|
|||||||
return Err(Error::Unauthorized);
|
return Err(Error::Unauthorized);
|
||||||
}
|
}
|
||||||
|
|
||||||
let request = match method.as_str() {
|
let mut request = match method.as_str() {
|
||||||
"MKCALENDAR" => MkcalendarRequest::parse_str(&body)?.set.prop,
|
"MKCALENDAR" => MkcalendarRequest::parse_str(&body)?.set.prop,
|
||||||
"MKCOL" => MkcolRequest::parse_str(&body)?.set.prop,
|
"MKCOL" => MkcolRequest::parse_str(&body)?.set.prop,
|
||||||
_ => unreachable!("We never call with another method"),
|
_ => unreachable!("We never call with another method"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if let Some("") = request.displayname.as_deref() {
|
||||||
|
request.displayname = None
|
||||||
|
}
|
||||||
|
|
||||||
let calendar = Calendar {
|
let calendar = Calendar {
|
||||||
id: cal_id.to_owned(),
|
id: cal_id.to_owned(),
|
||||||
principal: principal.to_owned(),
|
principal: principal.to_owned(),
|
||||||
@@ -86,7 +93,7 @@ pub async fn route_mkcalendar<C: CalendarStore, S: SubscriptionStore>(
|
|||||||
description: request.calendar_description,
|
description: request.calendar_description,
|
||||||
deleted_at: None,
|
deleted_at: None,
|
||||||
synctoken: 0,
|
synctoken: 0,
|
||||||
subscription_url: None,
|
subscription_url: request.source.map(|href| href.href),
|
||||||
push_topic: uuid::Uuid::new_v4().to_string(),
|
push_topic: uuid::Uuid::new_v4().to_string(),
|
||||||
components: request
|
components: request
|
||||||
.supported_calendar_component_set
|
.supported_calendar_component_set
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
pub mod mkcalendar;
|
|
||||||
// pub mod post;
|
|
||||||
pub mod get;
|
pub mod get;
|
||||||
|
pub mod mkcalendar;
|
||||||
|
pub mod post;
|
||||||
pub mod report;
|
pub mod report;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
use crate::Error;
|
use crate::Error;
|
||||||
use crate::calendar::resource::{CalendarResource, CalendarResourceService};
|
use crate::calendar::CalendarResourceService;
|
||||||
|
use crate::calendar::resource::CalendarResource;
|
||||||
use axum::extract::{Path, State};
|
use axum::extract::{Path, State};
|
||||||
use axum::response::{IntoResponse, Response};
|
use axum::response::{IntoResponse, Response};
|
||||||
use http::{HeaderMap, StatusCode, header};
|
use http::{HeaderMap, HeaderValue, StatusCode, header};
|
||||||
use rustical_dav::privileges::UserPrivilege;
|
use rustical_dav::privileges::UserPrivilege;
|
||||||
use rustical_dav::resource::Resource;
|
use rustical_dav::resource::Resource;
|
||||||
use rustical_dav_push::register::PushRegister;
|
use rustical_dav_push::register::PushRegister;
|
||||||
@@ -73,20 +74,17 @@ pub async fn route_post<C: CalendarStore, S: SubscriptionStore>(
|
|||||||
.upsert_subscription(subscription)
|
.upsert_subscription(subscription)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
// let location = req
|
// TODO: make nicer
|
||||||
// .resource_map()
|
let location = format!("/push_subscription/{sub_id}");
|
||||||
// .url_for(&req, "subscription", &[sub_id])
|
|
||||||
// .unwrap();
|
|
||||||
//
|
|
||||||
let location = "asd";
|
|
||||||
Ok((
|
Ok((
|
||||||
StatusCode::CREATED,
|
StatusCode::CREATED,
|
||||||
HeaderMap::from_iter([(header::LOCATION, location)]),
|
HeaderMap::from_iter([
|
||||||
|
(header::LOCATION, HeaderValue::from_str(&location).unwrap()),
|
||||||
|
(
|
||||||
|
header::EXPIRES,
|
||||||
|
HeaderValue::from_str(&expires.to_rfc2822()).unwrap(),
|
||||||
|
),
|
||||||
|
]),
|
||||||
)
|
)
|
||||||
.into_response());
|
.into_response())
|
||||||
|
|
||||||
Ok(HttpResponse::Created()
|
|
||||||
.append_header((header::LOCATION, location.to_string()))
|
|
||||||
.append_header((header::EXPIRES, expires.to_rfc2822()))
|
|
||||||
.finish())
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ pub async fn get_objects_calendar_multiget<C: CalendarStore>(
|
|||||||
if let Some(filename) = href.strip_prefix(path) {
|
if let Some(filename) = href.strip_prefix(path) {
|
||||||
let filename = filename.trim_start_matches("/");
|
let filename = filename.trim_start_matches("/");
|
||||||
if let Some(object_id) = filename.strip_suffix(".ics") {
|
if let Some(object_id) = filename.strip_suffix(".ics") {
|
||||||
match store.get_object(principal, cal_id, object_id).await {
|
match store.get_object(principal, cal_id, object_id, false).await {
|
||||||
Ok(object) => result.push(object),
|
Ok(object) => result.push(object),
|
||||||
Err(rustical_store::Error::NotFound) => not_found.push(href.to_owned()),
|
Err(rustical_store::Error::NotFound) => not_found.push(href.to_owned()),
|
||||||
Err(err) => return Err(err.into()),
|
Err(err) => return Err(err.into()),
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use rustical_dav::extensions::{
|
|||||||
use rustical_dav::privileges::UserPrivilegeSet;
|
use rustical_dav::privileges::UserPrivilegeSet;
|
||||||
use rustical_dav::resource::{PrincipalUri, Resource, ResourceName};
|
use rustical_dav::resource::{PrincipalUri, Resource, ResourceName};
|
||||||
use rustical_dav::xml::{HrefElement, Resourcetype, ResourcetypeInner, SupportedReportSet};
|
use rustical_dav::xml::{HrefElement, Resourcetype, ResourcetypeInner, SupportedReportSet};
|
||||||
use rustical_dav_push::DavPushExtension;
|
use rustical_dav_push::{DavPushExtension, DavPushExtensionProp};
|
||||||
use rustical_ical::CalDateTime;
|
use rustical_ical::CalDateTime;
|
||||||
use rustical_store::Calendar;
|
use rustical_store::Calendar;
|
||||||
use rustical_store::auth::User;
|
use rustical_store::auth::User;
|
||||||
@@ -58,7 +58,7 @@ pub enum CalendarProp {
|
|||||||
pub enum CalendarPropWrapper {
|
pub enum CalendarPropWrapper {
|
||||||
Calendar(CalendarProp),
|
Calendar(CalendarProp),
|
||||||
SyncToken(SyncTokenExtensionProp),
|
SyncToken(SyncTokenExtensionProp),
|
||||||
// DavPush(DavPushExtensionProp),
|
DavPush(DavPushExtensionProp),
|
||||||
Common(CommonPropertiesProp),
|
Common(CommonPropertiesProp),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,9 @@ impl Resource for CalendarResource {
|
|||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Principal = User;
|
type Principal = User;
|
||||||
|
|
||||||
const IS_COLLECTION: bool = true;
|
fn is_collection(&self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn get_resourcetype(&self) -> Resourcetype {
|
fn get_resourcetype(&self) -> Resourcetype {
|
||||||
if self.cal.subscription_url.is_none() {
|
if self.cal.subscription_url.is_none() {
|
||||||
@@ -166,9 +168,9 @@ impl Resource for CalendarResource {
|
|||||||
CalendarPropWrapperName::SyncToken(prop) => {
|
CalendarPropWrapperName::SyncToken(prop) => {
|
||||||
CalendarPropWrapper::SyncToken(SyncTokenExtension::get_prop(self, prop)?)
|
CalendarPropWrapper::SyncToken(SyncTokenExtension::get_prop(self, prop)?)
|
||||||
}
|
}
|
||||||
// CalendarPropWrapperName::DavPush(prop) => {
|
CalendarPropWrapperName::DavPush(prop) => {
|
||||||
// CalendarPropWrapper::DavPush(DavPushExtension::get_prop(self, prop)?)
|
CalendarPropWrapper::DavPush(DavPushExtension::get_prop(self, prop)?)
|
||||||
// }
|
}
|
||||||
CalendarPropWrapperName::Common(prop) => CalendarPropWrapper::Common(
|
CalendarPropWrapperName::Common(prop) => CalendarPropWrapper::Common(
|
||||||
CommonPropertiesExtension::get_prop(self, puri, user, prop)?,
|
CommonPropertiesExtension::get_prop(self, puri, user, prop)?,
|
||||||
),
|
),
|
||||||
@@ -226,7 +228,7 @@ impl Resource for CalendarResource {
|
|||||||
CalendarProp::MaxDateTime(_) => Err(rustical_dav::Error::PropReadOnly),
|
CalendarProp::MaxDateTime(_) => Err(rustical_dav::Error::PropReadOnly),
|
||||||
},
|
},
|
||||||
CalendarPropWrapper::SyncToken(prop) => SyncTokenExtension::set_prop(self, prop),
|
CalendarPropWrapper::SyncToken(prop) => SyncTokenExtension::set_prop(self, prop),
|
||||||
// CalendarPropWrapper::DavPush(prop) => DavPushExtension::set_prop(self, prop),
|
CalendarPropWrapper::DavPush(prop) => DavPushExtension::set_prop(self, prop),
|
||||||
CalendarPropWrapper::Common(prop) => CommonPropertiesExtension::set_prop(self, prop),
|
CalendarPropWrapper::Common(prop) => CommonPropertiesExtension::set_prop(self, prop),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -270,7 +272,7 @@ impl Resource for CalendarResource {
|
|||||||
CalendarPropName::MaxDateTime => Err(rustical_dav::Error::PropReadOnly),
|
CalendarPropName::MaxDateTime => Err(rustical_dav::Error::PropReadOnly),
|
||||||
},
|
},
|
||||||
CalendarPropWrapperName::SyncToken(prop) => SyncTokenExtension::remove_prop(self, prop),
|
CalendarPropWrapperName::SyncToken(prop) => SyncTokenExtension::remove_prop(self, prop),
|
||||||
// CalendarPropWrapperName::DavPush(prop) => DavPushExtension::remove_prop(self, prop),
|
CalendarPropWrapperName::DavPush(prop) => DavPushExtension::remove_prop(self, prop),
|
||||||
CalendarPropWrapperName::Common(prop) => {
|
CalendarPropWrapperName::Common(prop) => {
|
||||||
CommonPropertiesExtension::remove_prop(self, prop)
|
CommonPropertiesExtension::remove_prop(self, prop)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
use crate::calendar::methods::get::route_get;
|
use crate::calendar::methods::get::route_get;
|
||||||
use crate::calendar::methods::mkcalendar::route_mkcalendar;
|
use crate::calendar::methods::mkcalendar::route_mkcalendar;
|
||||||
|
use crate::calendar::methods::post::route_post;
|
||||||
use crate::calendar::methods::report::route_report_calendar;
|
use crate::calendar::methods::report::route_report_calendar;
|
||||||
use crate::calendar::resource::CalendarResource;
|
use crate::calendar::resource::CalendarResource;
|
||||||
use crate::calendar_object::CalendarObjectResourceService;
|
use crate::calendar_object::CalendarObjectResourceService;
|
||||||
@@ -50,7 +51,7 @@ impl<C: CalendarStore, S: SubscriptionStore> ResourceService for CalendarResourc
|
|||||||
type Principal = User;
|
type Principal = User;
|
||||||
type PrincipalUri = CalDavPrincipalUri;
|
type PrincipalUri = CalDavPrincipalUri;
|
||||||
|
|
||||||
const DAV_HEADER: &str = "1, 3, access-control, calendar-access, calendar-proxy";
|
const DAV_HEADER: &str = "1, 3, access-control, calendar-access, calendar-proxy, webdav-push";
|
||||||
|
|
||||||
async fn get_resource(
|
async fn get_resource(
|
||||||
&self,
|
&self,
|
||||||
@@ -126,6 +127,13 @@ impl<C: CalendarStore, S: SubscriptionStore> AxumMethods for CalendarResourceSer
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn post() -> Option<fn(Self, Request) -> BoxFuture<'static, Result<Response, Infallible>>> {
|
||||||
|
Some(|state, req| {
|
||||||
|
let mut service = Handler::with_state(route_post::<C, S>, state);
|
||||||
|
Box::pin(Service::call(&mut service, req))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
fn mkcalendar() -> Option<fn(Self, Request) -> BoxFuture<'static, Result<Response, Infallible>>>
|
fn mkcalendar() -> Option<fn(Self, Request) -> BoxFuture<'static, Result<Response, Infallible>>>
|
||||||
{
|
{
|
||||||
Some(|state, req| {
|
Some(|state, req| {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ pub async fn get_event<C: CalendarStore>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
let event = cal_store
|
let event = cal_store
|
||||||
.get_object(&principal, &calendar_id, &object_id)
|
.get_object(&principal, &calendar_id, &object_id, false)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let mut resp = Response::builder().status(StatusCode::OK);
|
let mut resp = Response::builder().status(StatusCode::OK);
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ impl Resource for CalendarObjectResource {
|
|||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Principal = User;
|
type Principal = User;
|
||||||
|
|
||||||
const IS_COLLECTION: bool = false;
|
fn is_collection(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
fn get_resourcetype(&self) -> Resourcetype {
|
fn get_resourcetype(&self) -> Resourcetype {
|
||||||
Resourcetype(&[])
|
Resourcetype(&[])
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ impl<C: CalendarStore> ResourceService for CalendarObjectResourceService<C> {
|
|||||||
) -> Result<Self::Resource, Self::Error> {
|
) -> Result<Self::Resource, Self::Error> {
|
||||||
let object = self
|
let object = self
|
||||||
.cal_store
|
.cal_store
|
||||||
.get_object(principal, calendar_id, object_id)
|
.get_object(principal, calendar_id, object_id, false)
|
||||||
.await?;
|
.await?;
|
||||||
Ok(CalendarObjectResource {
|
Ok(CalendarObjectResource {
|
||||||
object,
|
object,
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ pub mod calendar;
|
|||||||
pub mod calendar_object;
|
pub mod calendar_object;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod principal;
|
pub mod principal;
|
||||||
// mod subscription;
|
|
||||||
|
|
||||||
pub use error::Error;
|
pub use error::Error;
|
||||||
|
|
||||||
|
|||||||
@@ -29,17 +29,19 @@ impl Resource for PrincipalResource {
|
|||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Principal = User;
|
type Principal = User;
|
||||||
|
|
||||||
const IS_COLLECTION: bool = true;
|
fn is_collection(&self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn get_resourcetype(&self) -> Resourcetype {
|
fn get_resourcetype(&self) -> Resourcetype {
|
||||||
Resourcetype(&[
|
Resourcetype(&[
|
||||||
ResourcetypeInner(Some(rustical_dav::namespace::NS_DAV), "collection"),
|
ResourcetypeInner(Some(rustical_dav::namespace::NS_DAV), "collection"),
|
||||||
ResourcetypeInner(Some(rustical_dav::namespace::NS_DAV), "principal"),
|
ResourcetypeInner(Some(rustical_dav::namespace::NS_DAV), "principal"),
|
||||||
// https://github.com/apple/ccs-calendarserver/blob/13c706b985fb728b9aab42dc0fef85aae21921c3/doc/Extensions/caldav-proxy.txt
|
// https://github.com/apple/ccs-calendarserver/blob/13c706b985fb728b9aab42dc0fef85aae21921c3/doc/Extensions/caldav-proxy.txt
|
||||||
ResourcetypeInner(
|
// ResourcetypeInner(
|
||||||
Some(rustical_dav::namespace::NS_CALENDARSERVER),
|
// Some(rustical_dav::namespace::NS_CALENDARSERVER),
|
||||||
"calendar-proxy-write",
|
// "calendar-proxy-write",
|
||||||
),
|
// ),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
use actix_web::{
|
|
||||||
HttpResponse,
|
|
||||||
web::{self, Data, Path},
|
|
||||||
};
|
|
||||||
use rustical_dav::xml::multistatus::PropstatElement;
|
|
||||||
use rustical_store::SubscriptionStore;
|
|
||||||
use rustical_xml::{XmlRootTag, XmlSerialize};
|
|
||||||
|
|
||||||
use crate::calendar::resource::CalendarProp;
|
|
||||||
|
|
||||||
async fn handle_delete<S: SubscriptionStore>(
|
|
||||||
store: Data<S>,
|
|
||||||
path: Path<String>,
|
|
||||||
) -> Result<HttpResponse, rustical_store::Error> {
|
|
||||||
let id = path.into_inner();
|
|
||||||
store.delete_subscription(&id).await?;
|
|
||||||
Ok(HttpResponse::NoContent().body("Unregistered"))
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn subscription_resource<S: SubscriptionStore>(sub_store: Arc<S>) -> actix_web::Resource {
|
|
||||||
web::resource("/subscription/{id}")
|
|
||||||
.app_data(Data::from(sub_store))
|
|
||||||
.name("subscription")
|
|
||||||
.delete(handle_delete::<S>)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(XmlSerialize, XmlRootTag)]
|
|
||||||
#[xml(root = b"push-message", ns = "rustical_dav::namespace::NS_DAVPUSH")]
|
|
||||||
pub struct PushMessage {
|
|
||||||
propstat: PropstatElement<CalendarProp>,
|
|
||||||
}
|
|
||||||
@@ -32,7 +32,9 @@ impl Resource for AddressObjectResource {
|
|||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Principal = User;
|
type Principal = User;
|
||||||
|
|
||||||
const IS_COLLECTION: bool = false;
|
fn is_collection(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
fn get_resourcetype(&self) -> Resourcetype {
|
fn get_resourcetype(&self) -> Resourcetype {
|
||||||
Resourcetype(&[])
|
Resourcetype(&[])
|
||||||
|
|||||||
@@ -52,8 +52,10 @@ pub async fn route_mkcol<AS: AddressbookStore, S: SubscriptionStore>(
|
|||||||
return Err(Error::Unauthorized);
|
return Err(Error::Unauthorized);
|
||||||
}
|
}
|
||||||
|
|
||||||
let request = MkcolRequest::parse_str(&body)?;
|
let mut request = MkcolRequest::parse_str(&body)?.set.prop;
|
||||||
let request = request.set.prop;
|
if let Some("") = request.displayname.as_deref() {
|
||||||
|
request.displayname = None
|
||||||
|
}
|
||||||
|
|
||||||
let addressbook = Addressbook {
|
let addressbook = Addressbook {
|
||||||
id: addressbook_id.to_owned(),
|
id: addressbook_id.to_owned(),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
pub mod mkcol;
|
|
||||||
// pub mod post;
|
|
||||||
pub mod get;
|
pub mod get;
|
||||||
|
pub mod mkcol;
|
||||||
|
pub mod post;
|
||||||
pub mod put;
|
pub mod put;
|
||||||
pub mod report;
|
pub mod report;
|
||||||
|
|||||||
@@ -1,33 +1,40 @@
|
|||||||
use crate::Error;
|
use crate::Error;
|
||||||
use crate::addressbook::resource::AddressbookResourceService;
|
use crate::addressbook::AddressbookResourceService;
|
||||||
use actix_web::http::header;
|
use crate::addressbook::resource::AddressbookResource;
|
||||||
use actix_web::web::{Data, Path};
|
use axum::extract::{Path, State};
|
||||||
use actix_web::{HttpRequest, HttpResponse};
|
use axum::response::{IntoResponse, Response};
|
||||||
|
use http::{HeaderMap, HeaderValue, StatusCode, header};
|
||||||
|
use rustical_dav::privileges::UserPrivilege;
|
||||||
|
use rustical_dav::resource::Resource;
|
||||||
use rustical_dav_push::register::PushRegister;
|
use rustical_dav_push::register::PushRegister;
|
||||||
use rustical_store::auth::User;
|
use rustical_store::auth::User;
|
||||||
use rustical_store::{AddressbookStore, Subscription, SubscriptionStore};
|
use rustical_store::{AddressbookStore, Subscription, SubscriptionStore};
|
||||||
use rustical_xml::XmlDocument;
|
use rustical_xml::XmlDocument;
|
||||||
use tracing::instrument;
|
use tracing::instrument;
|
||||||
use tracing_actix_web::RootSpan;
|
|
||||||
|
|
||||||
#[instrument(parent = root_span.id(), skip(resource_service, root_span, req))]
|
#[instrument(skip(resource_service))]
|
||||||
pub async fn route_post<A: AddressbookStore, S: SubscriptionStore>(
|
pub async fn route_post<AS: AddressbookStore, S: SubscriptionStore>(
|
||||||
path: Path<(String, String)>,
|
Path((principal, addr_id)): Path<(String, String)>,
|
||||||
body: String,
|
|
||||||
user: User,
|
user: User,
|
||||||
resource_service: Data<AddressbookResourceService<A, S>>,
|
State(resource_service): State<AddressbookResourceService<AS, S>>,
|
||||||
root_span: RootSpan,
|
body: String,
|
||||||
req: HttpRequest,
|
) -> Result<Response, Error> {
|
||||||
) -> Result<HttpResponse, Error> {
|
|
||||||
let (principal, addressbook_id) = path.into_inner();
|
|
||||||
if !user.is_principal(&principal) {
|
if !user.is_principal(&principal) {
|
||||||
return Err(Error::Unauthorized);
|
return Err(Error::Unauthorized);
|
||||||
}
|
}
|
||||||
|
|
||||||
let addressbook = resource_service
|
let addressbook = resource_service
|
||||||
.addr_store
|
.addr_store
|
||||||
.get_addressbook(&principal, &addressbook_id, false)
|
.get_addressbook(&principal, &addr_id, false)
|
||||||
.await?;
|
.await?;
|
||||||
|
let addressbook_resource = AddressbookResource(addressbook);
|
||||||
|
if !addressbook_resource
|
||||||
|
.get_user_privileges(&user)?
|
||||||
|
.has(&UserPrivilege::Read)
|
||||||
|
{
|
||||||
|
return Err(Error::Unauthorized);
|
||||||
|
}
|
||||||
|
|
||||||
let request = PushRegister::parse_str(&body)?;
|
let request = PushRegister::parse_str(&body)?;
|
||||||
let sub_id = uuid::Uuid::new_v4().to_string();
|
let sub_id = uuid::Uuid::new_v4().to_string();
|
||||||
|
|
||||||
@@ -44,7 +51,7 @@ pub async fn route_post<A: AddressbookStore, S: SubscriptionStore>(
|
|||||||
.web_push_subscription
|
.web_push_subscription
|
||||||
.push_resource
|
.push_resource
|
||||||
.to_owned(),
|
.to_owned(),
|
||||||
topic: addressbook.push_topic,
|
topic: addressbook_resource.0.push_topic,
|
||||||
expiration: expires.naive_local(),
|
expiration: expires.naive_local(),
|
||||||
public_key: request
|
public_key: request
|
||||||
.subscription
|
.subscription
|
||||||
@@ -63,13 +70,17 @@ pub async fn route_post<A: AddressbookStore, S: SubscriptionStore>(
|
|||||||
.upsert_subscription(subscription)
|
.upsert_subscription(subscription)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let location = req
|
// TODO: make nicer
|
||||||
.resource_map()
|
let location = format!("/push_subscription/{sub_id}");
|
||||||
.url_for(&req, "subscription", &[sub_id])
|
Ok((
|
||||||
.unwrap();
|
StatusCode::CREATED,
|
||||||
|
HeaderMap::from_iter([
|
||||||
Ok(HttpResponse::Created()
|
(header::LOCATION, HeaderValue::from_str(&location).unwrap()),
|
||||||
.append_header((header::LOCATION, location.to_string()))
|
(
|
||||||
.append_header((header::EXPIRES, expires.to_rfc2822()))
|
header::EXPIRES,
|
||||||
.finish())
|
HeaderValue::from_str(&expires.to_rfc2822()).unwrap(),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
)
|
||||||
|
.into_response())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ impl Resource for AddressbookResource {
|
|||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Principal = User;
|
type Principal = User;
|
||||||
|
|
||||||
const IS_COLLECTION: bool = true;
|
fn is_collection(&self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn get_resourcetype(&self) -> Resourcetype {
|
fn get_resourcetype(&self) -> Resourcetype {
|
||||||
Resourcetype(&[
|
Resourcetype(&[
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ use super::methods::report::route_report_addressbook;
|
|||||||
use crate::address_object::AddressObjectResourceService;
|
use crate::address_object::AddressObjectResourceService;
|
||||||
use crate::address_object::resource::AddressObjectResource;
|
use crate::address_object::resource::AddressObjectResource;
|
||||||
use crate::addressbook::methods::get::route_get;
|
use crate::addressbook::methods::get::route_get;
|
||||||
|
use crate::addressbook::methods::post::route_post;
|
||||||
use crate::addressbook::methods::put::route_put;
|
use crate::addressbook::methods::put::route_put;
|
||||||
use crate::addressbook::resource::AddressbookResource;
|
use crate::addressbook::resource::AddressbookResource;
|
||||||
use crate::{CardDavPrincipalUri, Error};
|
use crate::{CardDavPrincipalUri, Error};
|
||||||
@@ -53,7 +54,7 @@ impl<AS: AddressbookStore, S: SubscriptionStore> ResourceService
|
|||||||
type Principal = User;
|
type Principal = User;
|
||||||
type PrincipalUri = CardDavPrincipalUri;
|
type PrincipalUri = CardDavPrincipalUri;
|
||||||
|
|
||||||
const DAV_HEADER: &str = "1, 3, access-control, addressbook";
|
const DAV_HEADER: &str = "1, 3, access-control, addressbook, webdav-push";
|
||||||
|
|
||||||
async fn get_resource(
|
async fn get_resource(
|
||||||
&self,
|
&self,
|
||||||
@@ -130,6 +131,13 @@ impl<AS: AddressbookStore, S: SubscriptionStore> AxumMethods for AddressbookReso
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn post() -> Option<fn(Self, Request) -> BoxFuture<'static, Result<Response, Infallible>>> {
|
||||||
|
Some(|state, req| {
|
||||||
|
let mut service = Handler::with_state(route_post::<AS, S>, state);
|
||||||
|
Box::pin(Service::call(&mut service, req))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
fn put() -> Option<fn(Self, Request) -> BoxFuture<'static, Result<Response, Infallible>>> {
|
fn put() -> Option<fn(Self, Request) -> BoxFuture<'static, Result<Response, Infallible>>> {
|
||||||
Some(|state, req| {
|
Some(|state, req| {
|
||||||
let mut service = Handler::with_state(route_put::<AS, S>, state);
|
let mut service = Handler::with_state(route_put::<AS, S>, state);
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ impl Resource for PrincipalResource {
|
|||||||
type Error = Error;
|
type Error = Error;
|
||||||
type Principal = User;
|
type Principal = User;
|
||||||
|
|
||||||
const IS_COLLECTION: bool = true;
|
fn is_collection(&self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn get_resourcetype(&self) -> Resourcetype {
|
fn get_resourcetype(&self) -> Resourcetype {
|
||||||
Resourcetype(&[
|
Resourcetype(&[
|
||||||
|
|||||||
@@ -26,3 +26,5 @@ tokio.workspace = true
|
|||||||
http.workspace = true
|
http.workspace = true
|
||||||
headers.workspace = true
|
headers.workspace = true
|
||||||
strum.workspace = true
|
strum.workspace = true
|
||||||
|
matchit.workspace = true
|
||||||
|
matchit-serde.workspace = true
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ pub enum Error {
|
|||||||
|
|
||||||
#[error("Precondition Failed")]
|
#[error("Precondition Failed")]
|
||||||
PreconditionFailed,
|
PreconditionFailed,
|
||||||
|
|
||||||
|
#[error("Forbidden")]
|
||||||
|
Forbidden,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Error {
|
impl Error {
|
||||||
@@ -49,6 +52,7 @@ impl Error {
|
|||||||
Error::PropReadOnly => StatusCode::CONFLICT,
|
Error::PropReadOnly => StatusCode::CONFLICT,
|
||||||
Error::PreconditionFailed => StatusCode::PRECONDITION_FAILED,
|
Error::PreconditionFailed => StatusCode::PRECONDITION_FAILED,
|
||||||
Self::IOError(_) => StatusCode::INTERNAL_SERVER_ERROR,
|
Self::IOError(_) => StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
|
Self::Forbidden => StatusCode::FORBIDDEN,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,54 @@
|
|||||||
use axum::{
|
|
||||||
extract::{Path, State},
|
|
||||||
response::{IntoResponse, Response},
|
|
||||||
};
|
|
||||||
use http::StatusCode;
|
|
||||||
use tracing::instrument;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
header::{Depth, Overwrite},
|
header::{Depth, Overwrite},
|
||||||
resource::ResourceService,
|
resource::ResourceService,
|
||||||
};
|
};
|
||||||
|
use axum::{
|
||||||
|
extract::{MatchedPath, Path, State},
|
||||||
|
response::{IntoResponse, Response},
|
||||||
|
};
|
||||||
|
use http::{HeaderMap, StatusCode, Uri};
|
||||||
|
use matchit_serde::ParamsDeserializer;
|
||||||
|
use serde::Deserialize;
|
||||||
|
use tracing::instrument;
|
||||||
|
|
||||||
#[instrument(skip(_path, _resource_service,))]
|
#[instrument(skip(path, resource_service,))]
|
||||||
pub(crate) async fn axum_route_copy<R: ResourceService>(
|
pub(crate) async fn axum_route_copy<R: ResourceService>(
|
||||||
Path(_path): Path<R::PathComponents>,
|
Path(path): Path<R::PathComponents>,
|
||||||
State(_resource_service): State<R>,
|
State(resource_service): State<R>,
|
||||||
depth: Option<Depth>,
|
depth: Option<Depth>,
|
||||||
principal: R::Principal,
|
principal: R::Principal,
|
||||||
overwrite: Overwrite,
|
overwrite: Overwrite,
|
||||||
|
matched_path: MatchedPath,
|
||||||
|
header_map: HeaderMap,
|
||||||
) -> Result<Response, R::Error> {
|
) -> Result<Response, R::Error> {
|
||||||
// TODO: Actually implement, but to be WebDAV-compliant we must at least support this route but
|
let destination = header_map
|
||||||
// can return a 403 error
|
.get("Destination")
|
||||||
let _depth = depth.unwrap_or(Depth::Infinity);
|
.ok_or(crate::Error::Forbidden)?
|
||||||
|
.to_str()
|
||||||
|
.map_err(|_| crate::Error::Forbidden)?;
|
||||||
|
let destination_uri: Uri = destination.parse().map_err(|_| crate::Error::Forbidden)?;
|
||||||
|
// TODO: Check that host also matches
|
||||||
|
let destination = destination_uri.path();
|
||||||
|
|
||||||
|
let mut router = matchit::Router::new();
|
||||||
|
router.insert(matched_path.as_str(), ()).unwrap();
|
||||||
|
if let Ok(matchit::Match { params, .. }) = router.at(destination) {
|
||||||
|
let params =
|
||||||
|
matchit_serde::Params::try_from(¶ms).map_err(|_| crate::Error::Forbidden)?;
|
||||||
|
let dest_path = R::PathComponents::deserialize(&ParamsDeserializer::new(params))
|
||||||
|
.map_err(|_| crate::Error::Forbidden)?;
|
||||||
|
|
||||||
|
if resource_service
|
||||||
|
.copy_resource(&path, &dest_path, &principal, overwrite.is_true())
|
||||||
|
.await?
|
||||||
|
{
|
||||||
|
// Overwritten
|
||||||
|
Ok(StatusCode::NO_CONTENT.into_response())
|
||||||
|
} else {
|
||||||
|
// Not overwritten
|
||||||
|
Ok(StatusCode::CREATED.into_response())
|
||||||
|
}
|
||||||
|
} else {
|
||||||
Ok(StatusCode::FORBIDDEN.into_response())
|
Ok(StatusCode::FORBIDDEN.into_response())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,25 +1,54 @@
|
|||||||
use axum::{
|
|
||||||
extract::{Path, State},
|
|
||||||
response::{IntoResponse, Response},
|
|
||||||
};
|
|
||||||
use http::StatusCode;
|
|
||||||
use tracing::instrument;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
header::{Depth, Overwrite},
|
header::{Depth, Overwrite},
|
||||||
resource::ResourceService,
|
resource::ResourceService,
|
||||||
};
|
};
|
||||||
|
use axum::{
|
||||||
|
extract::{MatchedPath, Path, State},
|
||||||
|
response::{IntoResponse, Response},
|
||||||
|
};
|
||||||
|
use http::{HeaderMap, StatusCode, Uri};
|
||||||
|
use matchit_serde::ParamsDeserializer;
|
||||||
|
use serde::Deserialize;
|
||||||
|
use tracing::instrument;
|
||||||
|
|
||||||
#[instrument(skip(_path, _resource_service,))]
|
#[instrument(skip(path, resource_service,))]
|
||||||
pub(crate) async fn axum_route_move<R: ResourceService>(
|
pub(crate) async fn axum_route_move<R: ResourceService>(
|
||||||
Path(_path): Path<R::PathComponents>,
|
Path(path): Path<R::PathComponents>,
|
||||||
State(_resource_service): State<R>,
|
State(resource_service): State<R>,
|
||||||
depth: Option<Depth>,
|
depth: Option<Depth>,
|
||||||
principal: R::Principal,
|
principal: R::Principal,
|
||||||
overwrite: Overwrite,
|
overwrite: Overwrite,
|
||||||
|
matched_path: MatchedPath,
|
||||||
|
header_map: HeaderMap,
|
||||||
) -> Result<Response, R::Error> {
|
) -> Result<Response, R::Error> {
|
||||||
// TODO: Actually implement, but to be WebDAV-compliant we must at least support this route but
|
let destination = header_map
|
||||||
// can return a 403 error
|
.get("Destination")
|
||||||
let _depth = depth.unwrap_or(Depth::Infinity);
|
.ok_or(crate::Error::Forbidden)?
|
||||||
|
.to_str()
|
||||||
|
.map_err(|_| crate::Error::Forbidden)?;
|
||||||
|
let destination_uri: Uri = destination.parse().map_err(|_| crate::Error::Forbidden)?;
|
||||||
|
// TODO: Check that host also matches
|
||||||
|
let destination = destination_uri.path();
|
||||||
|
|
||||||
|
let mut router = matchit::Router::new();
|
||||||
|
router.insert(matched_path.as_str(), ()).unwrap();
|
||||||
|
if let Ok(matchit::Match { params, .. }) = router.at(destination) {
|
||||||
|
let params =
|
||||||
|
matchit_serde::Params::try_from(¶ms).map_err(|_| crate::Error::Forbidden)?;
|
||||||
|
let dest_path = R::PathComponents::deserialize(&ParamsDeserializer::new(params))
|
||||||
|
.map_err(|_| crate::Error::Forbidden)?;
|
||||||
|
|
||||||
|
if resource_service
|
||||||
|
.copy_resource(&path, &dest_path, &principal, overwrite.is_true())
|
||||||
|
.await?
|
||||||
|
{
|
||||||
|
// Overwritten
|
||||||
|
Ok(StatusCode::NO_CONTENT.into_response())
|
||||||
|
} else {
|
||||||
|
// Not overwritten
|
||||||
|
Ok(StatusCode::CREATED.into_response())
|
||||||
|
}
|
||||||
|
} else {
|
||||||
Ok(StatusCode::FORBIDDEN.into_response())
|
Ok(StatusCode::FORBIDDEN.into_response())
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ mod methods;
|
|||||||
mod principal_uri;
|
mod principal_uri;
|
||||||
mod resource_service;
|
mod resource_service;
|
||||||
|
|
||||||
pub use axum_methods::AxumMethods;
|
pub use axum_methods::{AxumMethods, MethodFunction};
|
||||||
pub use axum_service::AxumService;
|
pub use axum_service::AxumService;
|
||||||
pub use principal_uri::PrincipalUri;
|
pub use principal_uri::PrincipalUri;
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ pub trait Resource: Clone + Send + 'static {
|
|||||||
type Error: From<crate::Error>;
|
type Error: From<crate::Error>;
|
||||||
type Principal: Principal;
|
type Principal: Principal;
|
||||||
|
|
||||||
const IS_COLLECTION: bool;
|
fn is_collection(&self) -> bool;
|
||||||
|
|
||||||
fn get_resourcetype(&self) -> Resourcetype;
|
fn get_resourcetype(&self) -> Resourcetype;
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ pub trait Resource: Clone + Send + 'static {
|
|||||||
) -> Result<ResponseElement<Self::Prop>, Self::Error> {
|
) -> Result<ResponseElement<Self::Prop>, Self::Error> {
|
||||||
// Collections have a trailing slash
|
// Collections have a trailing slash
|
||||||
let mut path = path.to_string();
|
let mut path = path.to_string();
|
||||||
if Self::IS_COLLECTION && !path.ends_with('/') {
|
if self.is_collection() && !path.ends_with('/') {
|
||||||
path.push('/');
|
path.push('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,13 @@ use serde::Deserialize;
|
|||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
pub trait ResourceService: Clone + Sized + Send + Sync + AxumMethods + 'static {
|
pub trait ResourceService: Clone + Sized + Send + Sync + AxumMethods + 'static {
|
||||||
type PathComponents: for<'de> Deserialize<'de> + Sized + Send + Sync + Clone + 'static; // defines how the resource URI maps to parameters, i.e. /{principal}/{calendar} -> (String, String)
|
type PathComponents: std::fmt::Debug
|
||||||
|
+ for<'de> Deserialize<'de>
|
||||||
|
+ Sized
|
||||||
|
+ Send
|
||||||
|
+ Sync
|
||||||
|
+ Clone
|
||||||
|
+ 'static; // defines how the resource URI maps to parameters, i.e. /{principal}/{calendar} -> (String, String)
|
||||||
type MemberType: Resource<Error = Self::Error, Principal = Self::Principal>
|
type MemberType: Resource<Error = Self::Error, Principal = Self::Principal>
|
||||||
+ super::ResourceName;
|
+ super::ResourceName;
|
||||||
type Resource: Resource<Error = Self::Error, Principal = Self::Principal>;
|
type Resource: Resource<Error = Self::Error, Principal = Self::Principal>;
|
||||||
@@ -47,6 +53,28 @@ pub trait ResourceService: Clone + Sized + Send + Sync + AxumMethods + 'static {
|
|||||||
Err(crate::Error::Unauthorized.into())
|
Err(crate::Error::Unauthorized.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns whether an existing resource was overwritten
|
||||||
|
async fn copy_resource(
|
||||||
|
&self,
|
||||||
|
_path: &Self::PathComponents,
|
||||||
|
_destination: &Self::PathComponents,
|
||||||
|
_user: &Self::Principal,
|
||||||
|
_overwrite: bool,
|
||||||
|
) -> Result<bool, Self::Error> {
|
||||||
|
Err(crate::Error::Forbidden.into())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns whether an existing resource was overwritten
|
||||||
|
async fn move_resource(
|
||||||
|
&self,
|
||||||
|
_path: &Self::PathComponents,
|
||||||
|
_destination: &Self::PathComponents,
|
||||||
|
_user: &Self::Principal,
|
||||||
|
_overwrite: bool,
|
||||||
|
) -> Result<bool, Self::Error> {
|
||||||
|
Err(crate::Error::Forbidden.into())
|
||||||
|
}
|
||||||
|
|
||||||
fn axum_service(self) -> AxumService<Self>
|
fn axum_service(self) -> AxumService<Self>
|
||||||
where
|
where
|
||||||
Self: AxumMethods,
|
Self: AxumMethods,
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ impl<PR: Resource, P: Principal> Resource for RootResource<PR, P> {
|
|||||||
type Error = PR::Error;
|
type Error = PR::Error;
|
||||||
type Principal = P;
|
type Principal = P;
|
||||||
|
|
||||||
const IS_COLLECTION: bool = true;
|
fn is_collection(&self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn get_resourcetype(&self) -> Resourcetype {
|
fn get_resourcetype(&self) -> Resourcetype {
|
||||||
Resourcetype(&[ResourcetypeInner(
|
Resourcetype(&[ResourcetypeInner(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
use crate::xml::TagList;
|
use crate::xml::TagList;
|
||||||
|
use headers::{CacheControl, ContentType, HeaderMapExt};
|
||||||
use http::StatusCode;
|
use http::StatusCode;
|
||||||
use quick_xml::name::Namespace;
|
use quick_xml::name::Namespace;
|
||||||
use rustical_xml::{XmlRootTag, XmlSerialize, XmlSerializeRoot};
|
use rustical_xml::{XmlRootTag, XmlSerialize, XmlSerializeRoot};
|
||||||
@@ -109,7 +110,6 @@ impl<T1: XmlSerialize, T2: XmlSerialize> axum::response::IntoResponse
|
|||||||
{
|
{
|
||||||
fn into_response(self) -> axum::response::Response {
|
fn into_response(self) -> axum::response::Response {
|
||||||
use axum::body::Body;
|
use axum::body::Body;
|
||||||
use http::header;
|
|
||||||
|
|
||||||
let mut output: Vec<_> = b"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".into();
|
let mut output: Vec<_> = b"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".into();
|
||||||
let mut writer = quick_xml::Writer::new_with_indent(&mut output, b' ', 4);
|
let mut writer = quick_xml::Writer::new_with_indent(&mut output, b' ', 4);
|
||||||
@@ -118,9 +118,9 @@ impl<T1: XmlSerialize, T2: XmlSerialize> axum::response::IntoResponse
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut resp = axum::response::Response::builder().status(StatusCode::MULTI_STATUS);
|
let mut resp = axum::response::Response::builder().status(StatusCode::MULTI_STATUS);
|
||||||
resp.headers_mut()
|
let hdrs = resp.headers_mut().unwrap();
|
||||||
.unwrap()
|
hdrs.typed_insert(ContentType::xml());
|
||||||
.insert(header::CONTENT_TYPE, "application/xml".try_into().unwrap());
|
hdrs.typed_insert(CacheControl::new().with_no_cache());
|
||||||
resp.body(Body::from(output)).unwrap()
|
resp.body(Body::from(output)).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,3 +23,9 @@ tokio.workspace = true
|
|||||||
rustical_dav.workspace = true
|
rustical_dav.workspace = true
|
||||||
rustical_store.workspace = true
|
rustical_store.workspace = true
|
||||||
http.workspace = true
|
http.workspace = true
|
||||||
|
base64.workspace = true
|
||||||
|
p256.workspace = true
|
||||||
|
rand.workspace = true
|
||||||
|
ece.workspace = true
|
||||||
|
axum.workspace = true
|
||||||
|
openssl.workspace = true
|
||||||
|
|||||||
23
crates/dav_push/src/endpoints.rs
Normal file
23
crates/dav_push/src/endpoints.rs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
use axum::{
|
||||||
|
Router,
|
||||||
|
extract::{Path, State},
|
||||||
|
response::{IntoResponse, Response},
|
||||||
|
routing::delete,
|
||||||
|
};
|
||||||
|
use http::StatusCode;
|
||||||
|
use rustical_store::SubscriptionStore;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
async fn handle_delete<S: SubscriptionStore>(
|
||||||
|
State(store): State<Arc<S>>,
|
||||||
|
Path(id): Path<String>,
|
||||||
|
) -> Result<Response, rustical_store::Error> {
|
||||||
|
store.delete_subscription(&id).await?;
|
||||||
|
Ok((StatusCode::NO_CONTENT, "Unregistered").into_response())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn subscription_service<S: SubscriptionStore>(sub_store: Arc<S>) -> Router {
|
||||||
|
Router::new()
|
||||||
|
.route("/push_subscription/{id}", delete(handle_delete::<S>))
|
||||||
|
.with_state(sub_store)
|
||||||
|
}
|
||||||
@@ -1,14 +1,41 @@
|
|||||||
mod extension;
|
mod extension;
|
||||||
pub mod notifier;
|
|
||||||
mod prop;
|
mod prop;
|
||||||
pub mod register;
|
pub mod register;
|
||||||
|
use base64::Engine;
|
||||||
use derive_more::Constructor;
|
use derive_more::Constructor;
|
||||||
pub use extension::*;
|
pub use extension::*;
|
||||||
|
use http::{HeaderValue, Method, header};
|
||||||
pub use prop::*;
|
pub use prop::*;
|
||||||
use rustical_store::{CollectionOperation, SubscriptionStore};
|
use reqwest::{Body, Url};
|
||||||
use std::sync::Arc;
|
use rustical_store::{
|
||||||
|
CollectionOperation, CollectionOperationInfo, Subscription, SubscriptionStore,
|
||||||
|
};
|
||||||
|
use rustical_xml::{XmlRootTag, XmlSerialize, XmlSerializeRoot};
|
||||||
|
use std::{collections::HashMap, sync::Arc, time::Duration};
|
||||||
use tokio::sync::mpsc::Receiver;
|
use tokio::sync::mpsc::Receiver;
|
||||||
use tracing::error;
|
use tracing::{error, warn};
|
||||||
|
|
||||||
|
mod endpoints;
|
||||||
|
pub use endpoints::subscription_service;
|
||||||
|
|
||||||
|
#[derive(XmlSerialize, Debug)]
|
||||||
|
pub struct ContentUpdate {
|
||||||
|
#[xml(ns = "rustical_dav::namespace::NS_DAV")]
|
||||||
|
sync_token: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(XmlSerialize, XmlRootTag, Debug)]
|
||||||
|
#[xml(root = b"push-message", ns = "rustical_dav::namespace::NS_DAVPUSH")]
|
||||||
|
#[xml(ns_prefix(
|
||||||
|
rustical_dav::namespace::NS_DAVPUSH = b"",
|
||||||
|
rustical_dav::namespace::NS_DAV = b"D",
|
||||||
|
))]
|
||||||
|
struct PushMessage {
|
||||||
|
#[xml(ns = "rustical_dav::namespace::NS_DAVPUSH")]
|
||||||
|
topic: String,
|
||||||
|
#[xml(ns = "rustical_dav::namespace::NS_DAVPUSH")]
|
||||||
|
content_update: Option<ContentUpdate>,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Constructor)]
|
#[derive(Debug, Constructor)]
|
||||||
pub struct DavPushController<S: SubscriptionStore> {
|
pub struct DavPushController<S: SubscriptionStore> {
|
||||||
@@ -18,14 +45,176 @@ pub struct DavPushController<S: SubscriptionStore> {
|
|||||||
|
|
||||||
impl<S: SubscriptionStore> DavPushController<S> {
|
impl<S: SubscriptionStore> DavPushController<S> {
|
||||||
pub async fn notifier(&self, mut recv: Receiver<CollectionOperation>) {
|
pub async fn notifier(&self, mut recv: Receiver<CollectionOperation>) {
|
||||||
while let Some(message) = recv.recv().await {
|
loop {
|
||||||
let subscribers = match self.sub_store.get_subscriptions(&message.topic).await {
|
// Make sure we don't flood the subscribers
|
||||||
|
tokio::time::sleep(Duration::from_secs(10)).await;
|
||||||
|
let mut messages = vec![];
|
||||||
|
recv.recv_many(&mut messages, 100).await;
|
||||||
|
|
||||||
|
// Right now we just have to show the latest content update by topic
|
||||||
|
// This might become more complicated in the future depending on what kind of updates
|
||||||
|
// we add
|
||||||
|
let mut latest_messages = HashMap::new();
|
||||||
|
for message in messages {
|
||||||
|
if matches!(message.data, CollectionOperationInfo::Content { .. }) {
|
||||||
|
latest_messages.insert(message.topic.to_string(), message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let messages = latest_messages.into_values();
|
||||||
|
|
||||||
|
for message in messages {
|
||||||
|
self.send_message(message).await;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn send_message(&self, message: CollectionOperation) {
|
||||||
|
let subscriptions = match self.sub_store.get_subscriptions(&message.topic).await {
|
||||||
Ok(subs) => subs,
|
Ok(subs) => subs,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
error!("{err}");
|
error!("{err}");
|
||||||
continue;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if subscriptions.is_empty() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if matches!(message.data, CollectionOperationInfo::Delete) {
|
||||||
|
// Collection has been deleted, but we cannot handle that
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let content_update = if let CollectionOperationInfo::Content { sync_token } = message.data {
|
||||||
|
Some(ContentUpdate {
|
||||||
|
sync_token: Some(sync_token),
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
|
let push_message = PushMessage {
|
||||||
|
topic: message.topic,
|
||||||
|
content_update,
|
||||||
|
};
|
||||||
|
|
||||||
|
let mut output: Vec<_> = b"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".into();
|
||||||
|
let mut writer = quick_xml::Writer::new_with_indent(&mut output, b' ', 4);
|
||||||
|
if let Err(err) = push_message.serialize_root(&mut writer) {
|
||||||
|
error!("Could not serialize push message: {}", err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let payload = String::from_utf8(output).unwrap();
|
||||||
|
|
||||||
|
for subsciption in subscriptions {
|
||||||
|
if let Some(allowed_push_servers) = &self.allowed_push_servers {
|
||||||
|
if let Ok(url) = Url::parse(&subsciption.push_resource) {
|
||||||
|
let origin = url.origin().unicode_serialization();
|
||||||
|
if !allowed_push_servers.contains(&origin) {
|
||||||
|
warn!(
|
||||||
|
"Deleting subscription {} on topic {} because the endpoint is not in the list of allowed push servers",
|
||||||
|
subsciption.id, subsciption.topic
|
||||||
|
);
|
||||||
|
self.try_delete_subscription(&subsciption.id).await;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
warn!(
|
||||||
|
"Deleting subscription {} on topic {} because of invalid URL",
|
||||||
|
subsciption.id, subsciption.topic
|
||||||
|
);
|
||||||
|
self.try_delete_subscription(&subsciption.id).await;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if let Err(err) = self.send_payload(&payload, &subsciption).await {
|
||||||
|
error!("An error occured sending out a push notification: {err}");
|
||||||
|
if err.is_permament_error() {
|
||||||
|
warn!(
|
||||||
|
"Deleting subscription {} on topic {}",
|
||||||
|
subsciption.id, subsciption.topic
|
||||||
|
);
|
||||||
|
self.try_delete_subscription(&subsciption.id).await;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn try_delete_subscription(&self, sub_id: &str) {
|
||||||
|
if let Err(err) = self.sub_store.delete_subscription(sub_id).await {
|
||||||
|
error!("Error deleting subsciption: {err}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn send_payload(
|
||||||
|
&self,
|
||||||
|
payload: &str,
|
||||||
|
subsciption: &Subscription,
|
||||||
|
) -> Result<(), NotifierError> {
|
||||||
|
if subsciption.public_key_type != "p256dh" {
|
||||||
|
return Err(NotifierError::InvalidPublicKeyType(
|
||||||
|
subsciption.public_key_type.to_string(),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
let endpoint = subsciption.push_resource.parse().map_err(|_| {
|
||||||
|
NotifierError::InvalidEndpointUrl(subsciption.push_resource.to_string())
|
||||||
|
})?;
|
||||||
|
let ua_public = base64::engine::general_purpose::URL_SAFE_NO_PAD
|
||||||
|
.decode(&subsciption.public_key)
|
||||||
|
.map_err(|_| NotifierError::InvalidKeyEncoding)?;
|
||||||
|
let auth_secret = base64::engine::general_purpose::URL_SAFE_NO_PAD
|
||||||
|
.decode(&subsciption.auth_secret)
|
||||||
|
.map_err(|_| NotifierError::InvalidKeyEncoding)?;
|
||||||
|
|
||||||
|
let client = reqwest::ClientBuilder::new()
|
||||||
|
.build()
|
||||||
|
.map_err(NotifierError::from)?;
|
||||||
|
|
||||||
|
let payload = ece::encrypt(&ua_public, &auth_secret, payload.as_bytes())?;
|
||||||
|
|
||||||
|
let mut request = reqwest::Request::new(Method::POST, endpoint);
|
||||||
|
*request.body_mut() = Some(Body::from(payload));
|
||||||
|
let hdrs = request.headers_mut();
|
||||||
|
hdrs.insert(
|
||||||
|
header::CONTENT_ENCODING,
|
||||||
|
HeaderValue::from_static("aes128gcm"),
|
||||||
|
);
|
||||||
|
hdrs.insert(
|
||||||
|
header::CONTENT_TYPE,
|
||||||
|
HeaderValue::from_static("application/octet-stream"),
|
||||||
|
);
|
||||||
|
client.execute(request).await?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, thiserror::Error)]
|
||||||
|
enum NotifierError {
|
||||||
|
#[error("Invalid public key type: {0}")]
|
||||||
|
InvalidPublicKeyType(String),
|
||||||
|
#[error("Invalid endpoint URL: {0}")]
|
||||||
|
InvalidEndpointUrl(String),
|
||||||
|
#[error("Invalid key encoding")]
|
||||||
|
InvalidKeyEncoding,
|
||||||
|
#[error(transparent)]
|
||||||
|
EceError(#[from] ece::Error),
|
||||||
|
#[error(transparent)]
|
||||||
|
ReqwestError(#[from] reqwest::Error),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl NotifierError {
|
||||||
|
// Decide whether the error should cause the subscription to be removed
|
||||||
|
pub fn is_permament_error(&self) -> bool {
|
||||||
|
match self {
|
||||||
|
Self::InvalidPublicKeyType(_)
|
||||||
|
| Self::InvalidEndpointUrl(_)
|
||||||
|
| Self::InvalidKeyEncoding => true,
|
||||||
|
Self::EceError(err) => matches!(
|
||||||
|
err,
|
||||||
|
ece::Error::InvalidAuthSecret | ece::Error::InvalidKeyLength
|
||||||
|
),
|
||||||
|
Self::ReqwestError(_) => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,147 +0,0 @@
|
|||||||
use http::StatusCode;
|
|
||||||
use reqwest::{
|
|
||||||
Method, Request,
|
|
||||||
header::{self, HeaderName, HeaderValue},
|
|
||||||
};
|
|
||||||
use rustical_dav::xml::multistatus::PropstatElement;
|
|
||||||
use rustical_store::{CollectionOperation, CollectionOperationType, SubscriptionStore};
|
|
||||||
use rustical_xml::{XmlRootTag, XmlSerialize, XmlSerializeRoot};
|
|
||||||
use std::{str::FromStr, sync::Arc};
|
|
||||||
use tokio::sync::mpsc::Receiver;
|
|
||||||
use tracing::{error, info, warn};
|
|
||||||
// use web_push::{SubscriptionInfo, WebPushMessage, WebPushMessageBuilder};
|
|
||||||
|
|
||||||
#[derive(XmlSerialize, Debug)]
|
|
||||||
struct PushMessageProp {
|
|
||||||
#[xml(ns = "rustical_dav::namespace::NS_DAV")]
|
|
||||||
topic: String,
|
|
||||||
#[xml(ns = "rustical_dav::namespace::NS_DAV")]
|
|
||||||
sync_token: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(XmlSerialize, XmlRootTag, Debug)]
|
|
||||||
#[xml(root = b"push-message", ns = "rustical_dav::namespace::NS_DAVPUSH")]
|
|
||||||
#[xml(ns_prefix(
|
|
||||||
rustical_dav::namespace::NS_DAVPUSH = b"",
|
|
||||||
rustical_dav::namespace::NS_DAV = b"D",
|
|
||||||
))]
|
|
||||||
struct PushMessage {
|
|
||||||
#[xml(ns = "rustical_dav::namespace::NS_DAV")]
|
|
||||||
propstat: PropstatElement<PushMessageProp>,
|
|
||||||
}
|
|
||||||
|
|
||||||
// pub fn build_request(message: WebPushMessage) -> Request {
|
|
||||||
// // A little janky :)
|
|
||||||
// let url = reqwest::Url::from_str(&message.endpoint.to_string()).unwrap();
|
|
||||||
// let mut builder = Request::new(Method::POST, url);
|
|
||||||
//
|
|
||||||
// if let Some(topic) = message.topic {
|
|
||||||
// builder
|
|
||||||
// .headers_mut()
|
|
||||||
// .insert("Topic", HeaderValue::from_str(topic.as_str()).unwrap());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if let Some(payload) = message.payload {
|
|
||||||
// builder.headers_mut().insert(
|
|
||||||
// header::CONTENT_ENCODING,
|
|
||||||
// HeaderValue::from_static(payload.content_encoding.to_str()),
|
|
||||||
// );
|
|
||||||
// builder.headers_mut().insert(
|
|
||||||
// header::CONTENT_TYPE,
|
|
||||||
// HeaderValue::from_static("application/octet-stream"),
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// for (k, v) in payload.crypto_headers.into_iter() {
|
|
||||||
// let v: &str = v.as_ref();
|
|
||||||
// builder.headers_mut().insert(
|
|
||||||
// HeaderName::from_static(k),
|
|
||||||
// HeaderValue::from_str(&v).unwrap(),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// *builder.body_mut() = Some(reqwest::Body::from(payload.content));
|
|
||||||
// }
|
|
||||||
// builder
|
|
||||||
// }
|
|
||||||
|
|
||||||
pub async fn push_notifier(
|
|
||||||
allowed_push_servers: Option<Vec<String>>,
|
|
||||||
mut recv: Receiver<CollectionOperation>,
|
|
||||||
sub_store: Arc<impl SubscriptionStore>,
|
|
||||||
) {
|
|
||||||
let client = reqwest::Client::new();
|
|
||||||
|
|
||||||
while let Some(message) = recv.recv().await {
|
|
||||||
let subscribers = match sub_store.get_subscriptions(&message.topic).await {
|
|
||||||
Ok(subs) => subs,
|
|
||||||
Err(err) => {
|
|
||||||
error!("{err}");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let status = match message.r#type {
|
|
||||||
CollectionOperationType::Object => StatusCode::OK,
|
|
||||||
CollectionOperationType::Delete => StatusCode::NOT_FOUND,
|
|
||||||
};
|
|
||||||
|
|
||||||
let push_message = PushMessage {
|
|
||||||
propstat: PropstatElement {
|
|
||||||
prop: PushMessageProp {
|
|
||||||
topic: message.topic,
|
|
||||||
sync_token: message.sync_token,
|
|
||||||
},
|
|
||||||
status,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
let mut output: Vec<_> = b"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".into();
|
|
||||||
let mut writer = quick_xml::Writer::new_with_indent(&mut output, b' ', 4);
|
|
||||||
if let Err(err) = push_message.serialize_root(&mut writer) {
|
|
||||||
error!("Could not serialize push message: {}", err);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let payload = String::from_utf8(output).unwrap();
|
|
||||||
// for subscriber in subscribers {
|
|
||||||
// let push_resource = subscriber.push_resource;
|
|
||||||
//
|
|
||||||
// let sub_info = SubscriptionInfo {
|
|
||||||
// endpoint: push_resource.to_owned(),
|
|
||||||
// keys: web_push::SubscriptionKeys {
|
|
||||||
// p256dh: subscriber.public_key,
|
|
||||||
// auth: subscriber.auth_secret,
|
|
||||||
// },
|
|
||||||
// };
|
|
||||||
// let mut builder = WebPushMessageBuilder::new(&sub_info);
|
|
||||||
// builder.set_payload(web_push::ContentEncoding::Aes128Gcm, payload.as_bytes());
|
|
||||||
// let push_message = builder.build().unwrap();
|
|
||||||
// let request = build_request(push_message);
|
|
||||||
//
|
|
||||||
// let allowed = if let Some(allowed_push_servers) = &allowed_push_servers {
|
|
||||||
// if let Ok(resource_url) = reqwest::Url::parse(&push_resource) {
|
|
||||||
// let origin = resource_url.origin().ascii_serialization();
|
|
||||||
// allowed_push_servers
|
|
||||||
// .iter()
|
|
||||||
// .any(|allowed_push_server| allowed_push_server == &origin)
|
|
||||||
// } else {
|
|
||||||
// warn!("Invalid push url: {push_resource}");
|
|
||||||
// false
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// true
|
|
||||||
// };
|
|
||||||
//
|
|
||||||
// if allowed {
|
|
||||||
// info!("Sending a push message to {}: {}", push_resource, payload);
|
|
||||||
// if let Err(err) = client.execute(request).await {
|
|
||||||
// error!("{err}");
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// warn!(
|
|
||||||
// "Not sending a push notification to {} since it's not allowed in dav_push::allowed_push_servers",
|
|
||||||
// push_resource
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,6 +7,10 @@ repository.workspace = true
|
|||||||
license.workspace = true
|
license.workspace = true
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = []
|
||||||
|
dev = ["tower-http/fs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tower.workspace = true
|
tower.workspace = true
|
||||||
http.workspace = true
|
http.workspace = true
|
||||||
@@ -34,3 +38,4 @@ axum-extra.workspace = true
|
|||||||
headers.workspace = true
|
headers.workspace = true
|
||||||
tower-sessions.workspace = true
|
tower-sessions.workspace = true
|
||||||
percent-encoding.workspace = true
|
percent-encoding.workspace = true
|
||||||
|
tower-http = { workspace = true, optional = true }
|
||||||
|
|||||||
19
crates/frontend/js-components/deno.json
Normal file
19
crates/frontend/js-components/deno.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"tasks": {
|
||||||
|
"dev": "deno run -A --node-modules-dir npm:vite build --emptyOutDir --watch",
|
||||||
|
"build": "deno run -A --node-modules-dir npm:vite build --emptyOutDir"
|
||||||
|
},
|
||||||
|
"compilerOptions": {
|
||||||
|
"lib": [
|
||||||
|
"ES2020",
|
||||||
|
"DOM",
|
||||||
|
"DOM.Iterable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"imports": {
|
||||||
|
"@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
|
||||||
|
"lit": "npm:lit@^3.2.1",
|
||||||
|
"vite": "npm:vite@^6.1.1",
|
||||||
|
"webdav": "npm:webdav@^5.8.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
436
crates/frontend/js-components/deno.lock
generated
Normal file
436
crates/frontend/js-components/deno.lock
generated
Normal file
@@ -0,0 +1,436 @@
|
|||||||
|
{
|
||||||
|
"version": "4",
|
||||||
|
"specifiers": {
|
||||||
|
"npm:@deno/vite-plugin@^1.0.4": "1.0.4_vite@6.3.5__picomatch@4.0.2",
|
||||||
|
"npm:lit@^3.2.1": "3.3.0",
|
||||||
|
"npm:vite@*": "6.3.5_picomatch@4.0.2",
|
||||||
|
"npm:vite@^6.1.1": "6.3.5_picomatch@4.0.2",
|
||||||
|
"npm:webdav@^5.8.0": "5.8.0"
|
||||||
|
},
|
||||||
|
"npm": {
|
||||||
|
"@buttercup/fetch@0.2.1": {
|
||||||
|
"integrity": "sha512-sCgECOx8wiqY8NN1xN22BqqKzXYIG2AicNLlakOAI4f0WgyLVUbAigMf8CZhBtJxdudTcB1gD5lciqi44jwJvg==",
|
||||||
|
"dependencies": [
|
||||||
|
"node-fetch"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"@deno/vite-plugin@1.0.4_vite@6.3.5__picomatch@4.0.2": {
|
||||||
|
"integrity": "sha512-xg8YT8Wn2sGXSnJgiGTpBGX1Dov0c6fd1rAp8VsfrCUtyBRRWzwVMAnd3fQ4yq8h7LSVvJUxEFN4U421k/DQLA==",
|
||||||
|
"dependencies": [
|
||||||
|
"vite"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"@esbuild/aix-ppc64@0.25.5": {
|
||||||
|
"integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA=="
|
||||||
|
},
|
||||||
|
"@esbuild/android-arm64@0.25.5": {
|
||||||
|
"integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg=="
|
||||||
|
},
|
||||||
|
"@esbuild/android-arm@0.25.5": {
|
||||||
|
"integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA=="
|
||||||
|
},
|
||||||
|
"@esbuild/android-x64@0.25.5": {
|
||||||
|
"integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw=="
|
||||||
|
},
|
||||||
|
"@esbuild/darwin-arm64@0.25.5": {
|
||||||
|
"integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ=="
|
||||||
|
},
|
||||||
|
"@esbuild/darwin-x64@0.25.5": {
|
||||||
|
"integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ=="
|
||||||
|
},
|
||||||
|
"@esbuild/freebsd-arm64@0.25.5": {
|
||||||
|
"integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw=="
|
||||||
|
},
|
||||||
|
"@esbuild/freebsd-x64@0.25.5": {
|
||||||
|
"integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw=="
|
||||||
|
},
|
||||||
|
"@esbuild/linux-arm64@0.25.5": {
|
||||||
|
"integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg=="
|
||||||
|
},
|
||||||
|
"@esbuild/linux-arm@0.25.5": {
|
||||||
|
"integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw=="
|
||||||
|
},
|
||||||
|
"@esbuild/linux-ia32@0.25.5": {
|
||||||
|
"integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA=="
|
||||||
|
},
|
||||||
|
"@esbuild/linux-loong64@0.25.5": {
|
||||||
|
"integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg=="
|
||||||
|
},
|
||||||
|
"@esbuild/linux-mips64el@0.25.5": {
|
||||||
|
"integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg=="
|
||||||
|
},
|
||||||
|
"@esbuild/linux-ppc64@0.25.5": {
|
||||||
|
"integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ=="
|
||||||
|
},
|
||||||
|
"@esbuild/linux-riscv64@0.25.5": {
|
||||||
|
"integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA=="
|
||||||
|
},
|
||||||
|
"@esbuild/linux-s390x@0.25.5": {
|
||||||
|
"integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ=="
|
||||||
|
},
|
||||||
|
"@esbuild/linux-x64@0.25.5": {
|
||||||
|
"integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw=="
|
||||||
|
},
|
||||||
|
"@esbuild/netbsd-arm64@0.25.5": {
|
||||||
|
"integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw=="
|
||||||
|
},
|
||||||
|
"@esbuild/netbsd-x64@0.25.5": {
|
||||||
|
"integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ=="
|
||||||
|
},
|
||||||
|
"@esbuild/openbsd-arm64@0.25.5": {
|
||||||
|
"integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw=="
|
||||||
|
},
|
||||||
|
"@esbuild/openbsd-x64@0.25.5": {
|
||||||
|
"integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg=="
|
||||||
|
},
|
||||||
|
"@esbuild/sunos-x64@0.25.5": {
|
||||||
|
"integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA=="
|
||||||
|
},
|
||||||
|
"@esbuild/win32-arm64@0.25.5": {
|
||||||
|
"integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw=="
|
||||||
|
},
|
||||||
|
"@esbuild/win32-ia32@0.25.5": {
|
||||||
|
"integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ=="
|
||||||
|
},
|
||||||
|
"@esbuild/win32-x64@0.25.5": {
|
||||||
|
"integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g=="
|
||||||
|
},
|
||||||
|
"@lit-labs/ssr-dom-shim@1.3.0": {
|
||||||
|
"integrity": "sha512-nQIWonJ6eFAvUUrSlwyHDm/aE8PBDu5kRpL0vHMg6K8fK3Diq1xdPjTnsJSwxABhaZ+5eBi1btQB5ShUTKo4nQ=="
|
||||||
|
},
|
||||||
|
"@lit/reactive-element@2.1.0": {
|
||||||
|
"integrity": "sha512-L2qyoZSQClcBmq0qajBVbhYEcG6iK0XfLn66ifLe/RfC0/ihpc+pl0Wdn8bJ8o+hj38cG0fGXRgSS20MuXn7qA==",
|
||||||
|
"dependencies": [
|
||||||
|
"@lit-labs/ssr-dom-shim"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"@rollup/rollup-android-arm-eabi@4.43.0": {
|
||||||
|
"integrity": "sha512-Krjy9awJl6rKbruhQDgivNbD1WuLb8xAclM4IR4cN5pHGAs2oIMMQJEiC3IC/9TZJ+QZkmZhlMO/6MBGxPidpw=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-android-arm64@4.43.0": {
|
||||||
|
"integrity": "sha512-ss4YJwRt5I63454Rpj+mXCXicakdFmKnUNxr1dLK+5rv5FJgAxnN7s31a5VchRYxCFWdmnDWKd0wbAdTr0J5EA=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-darwin-arm64@4.43.0": {
|
||||||
|
"integrity": "sha512-eKoL8ykZ7zz8MjgBenEF2OoTNFAPFz1/lyJ5UmmFSz5jW+7XbH1+MAgCVHy72aG59rbuQLcJeiMrP8qP5d/N0A=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-darwin-x64@4.43.0": {
|
||||||
|
"integrity": "sha512-SYwXJgaBYW33Wi/q4ubN+ldWC4DzQY62S4Ll2dgfr/dbPoF50dlQwEaEHSKrQdSjC6oIe1WgzosoaNoHCdNuMg=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-freebsd-arm64@4.43.0": {
|
||||||
|
"integrity": "sha512-SV+U5sSo0yujrjzBF7/YidieK2iF6E7MdF6EbYxNz94lA+R0wKl3SiixGyG/9Klab6uNBIqsN7j4Y/Fya7wAjQ=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-freebsd-x64@4.43.0": {
|
||||||
|
"integrity": "sha512-J7uCsiV13L/VOeHJBo5SjasKiGxJ0g+nQTrBkAsmQBIdil3KhPnSE9GnRon4ejX1XDdsmK/l30IYLiAaQEO0Cg=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-arm-gnueabihf@4.43.0": {
|
||||||
|
"integrity": "sha512-gTJ/JnnjCMc15uwB10TTATBEhK9meBIY+gXP4s0sHD1zHOaIh4Dmy1X9wup18IiY9tTNk5gJc4yx9ctj/fjrIw=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-arm-musleabihf@4.43.0": {
|
||||||
|
"integrity": "sha512-ZJ3gZynL1LDSIvRfz0qXtTNs56n5DI2Mq+WACWZ7yGHFUEirHBRt7fyIk0NsCKhmRhn7WAcjgSkSVVxKlPNFFw=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-arm64-gnu@4.43.0": {
|
||||||
|
"integrity": "sha512-8FnkipasmOOSSlfucGYEu58U8cxEdhziKjPD2FIa0ONVMxvl/hmONtX/7y4vGjdUhjcTHlKlDhw3H9t98fPvyA=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-arm64-musl@4.43.0": {
|
||||||
|
"integrity": "sha512-KPPyAdlcIZ6S9C3S2cndXDkV0Bb1OSMsX0Eelr2Bay4EsF9yi9u9uzc9RniK3mcUGCLhWY9oLr6er80P5DE6XA=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-loongarch64-gnu@4.43.0": {
|
||||||
|
"integrity": "sha512-HPGDIH0/ZzAZjvtlXj6g+KDQ9ZMHfSP553za7o2Odegb/BEfwJcR0Sw0RLNpQ9nC6Gy8s+3mSS9xjZ0n3rhcYg=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-powerpc64le-gnu@4.43.0": {
|
||||||
|
"integrity": "sha512-gEmwbOws4U4GLAJDhhtSPWPXUzDfMRedT3hFMyRAvM9Mrnj+dJIFIeL7otsv2WF3D7GrV0GIewW0y28dOYWkmw=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-riscv64-gnu@4.43.0": {
|
||||||
|
"integrity": "sha512-XXKvo2e+wFtXZF/9xoWohHg+MuRnvO29TI5Hqe9xwN5uN8NKUYy7tXUG3EZAlfchufNCTHNGjEx7uN78KsBo0g=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-riscv64-musl@4.43.0": {
|
||||||
|
"integrity": "sha512-ruf3hPWhjw6uDFsOAzmbNIvlXFXlBQ4nk57Sec8E8rUxs/AI4HD6xmiiasOOx/3QxS2f5eQMKTAwk7KHwpzr/Q=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-s390x-gnu@4.43.0": {
|
||||||
|
"integrity": "sha512-QmNIAqDiEMEvFV15rsSnjoSmO0+eJLoKRD9EAa9rrYNwO/XRCtOGM3A5A0X+wmG+XRrw9Fxdsw+LnyYiZWWcVw=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-x64-gnu@4.43.0": {
|
||||||
|
"integrity": "sha512-jAHr/S0iiBtFyzjhOkAics/2SrXE092qyqEg96e90L3t9Op8OTzS6+IX0Fy5wCt2+KqeHAkti+eitV0wvblEoQ=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-linux-x64-musl@4.43.0": {
|
||||||
|
"integrity": "sha512-3yATWgdeXyuHtBhrLt98w+5fKurdqvs8B53LaoKD7P7H7FKOONLsBVMNl9ghPQZQuYcceV5CDyPfyfGpMWD9mQ=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-win32-arm64-msvc@4.43.0": {
|
||||||
|
"integrity": "sha512-wVzXp2qDSCOpcBCT5WRWLmpJRIzv23valvcTwMHEobkjippNf+C3ys/+wf07poPkeNix0paTNemB2XrHr2TnGw=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-win32-ia32-msvc@4.43.0": {
|
||||||
|
"integrity": "sha512-fYCTEyzf8d+7diCw8b+asvWDCLMjsCEA8alvtAutqJOJp/wL5hs1rWSqJ1vkjgW0L2NB4bsYJrpKkiIPRR9dvw=="
|
||||||
|
},
|
||||||
|
"@rollup/rollup-win32-x64-msvc@4.43.0": {
|
||||||
|
"integrity": "sha512-SnGhLiE5rlK0ofq8kzuDkM0g7FN1s5VYY+YSMTibP7CqShxCQvqtNxTARS4xX4PFJfHjG0ZQYX9iGzI3FQh5Aw=="
|
||||||
|
},
|
||||||
|
"@types/estree@1.0.7": {
|
||||||
|
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ=="
|
||||||
|
},
|
||||||
|
"@types/trusted-types@2.0.7": {
|
||||||
|
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="
|
||||||
|
},
|
||||||
|
"balanced-match@1.0.2": {
|
||||||
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||||
|
},
|
||||||
|
"base-64@1.0.0": {
|
||||||
|
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
|
||||||
|
},
|
||||||
|
"brace-expansion@2.0.2": {
|
||||||
|
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
||||||
|
"dependencies": [
|
||||||
|
"balanced-match"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"byte-length@1.0.2": {
|
||||||
|
"integrity": "sha512-ovBpjmsgd/teRmgcPh23d4gJvxDoXtAzEL9xTfMU8Yc2kqCDb7L9jAG0XHl1nzuGl+h3ebCIF1i62UFyA9V/2Q=="
|
||||||
|
},
|
||||||
|
"charenc@0.0.2": {
|
||||||
|
"integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA=="
|
||||||
|
},
|
||||||
|
"crypt@0.0.2": {
|
||||||
|
"integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow=="
|
||||||
|
},
|
||||||
|
"data-uri-to-buffer@4.0.1": {
|
||||||
|
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="
|
||||||
|
},
|
||||||
|
"entities@6.0.1": {
|
||||||
|
"integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="
|
||||||
|
},
|
||||||
|
"esbuild@0.25.5": {
|
||||||
|
"integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==",
|
||||||
|
"dependencies": [
|
||||||
|
"@esbuild/aix-ppc64",
|
||||||
|
"@esbuild/android-arm",
|
||||||
|
"@esbuild/android-arm64",
|
||||||
|
"@esbuild/android-x64",
|
||||||
|
"@esbuild/darwin-arm64",
|
||||||
|
"@esbuild/darwin-x64",
|
||||||
|
"@esbuild/freebsd-arm64",
|
||||||
|
"@esbuild/freebsd-x64",
|
||||||
|
"@esbuild/linux-arm",
|
||||||
|
"@esbuild/linux-arm64",
|
||||||
|
"@esbuild/linux-ia32",
|
||||||
|
"@esbuild/linux-loong64",
|
||||||
|
"@esbuild/linux-mips64el",
|
||||||
|
"@esbuild/linux-ppc64",
|
||||||
|
"@esbuild/linux-riscv64",
|
||||||
|
"@esbuild/linux-s390x",
|
||||||
|
"@esbuild/linux-x64",
|
||||||
|
"@esbuild/netbsd-arm64",
|
||||||
|
"@esbuild/netbsd-x64",
|
||||||
|
"@esbuild/openbsd-arm64",
|
||||||
|
"@esbuild/openbsd-x64",
|
||||||
|
"@esbuild/sunos-x64",
|
||||||
|
"@esbuild/win32-arm64",
|
||||||
|
"@esbuild/win32-ia32",
|
||||||
|
"@esbuild/win32-x64"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fast-xml-parser@4.5.3": {
|
||||||
|
"integrity": "sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig==",
|
||||||
|
"dependencies": [
|
||||||
|
"strnum"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fdir@6.4.6_picomatch@4.0.2": {
|
||||||
|
"integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
|
||||||
|
"dependencies": [
|
||||||
|
"picomatch"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fetch-blob@3.2.0": {
|
||||||
|
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
|
||||||
|
"dependencies": [
|
||||||
|
"node-domexception",
|
||||||
|
"web-streams-polyfill"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"formdata-polyfill@4.0.10": {
|
||||||
|
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
|
||||||
|
"dependencies": [
|
||||||
|
"fetch-blob"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fsevents@2.3.3": {
|
||||||
|
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="
|
||||||
|
},
|
||||||
|
"hot-patcher@2.0.1": {
|
||||||
|
"integrity": "sha512-ECg1JFG0YzehicQaogenlcs2qg6WsXQsxtnbr1i696u5tLUjtJdQAh0u2g0Q5YV45f263Ta1GnUJsc8WIfJf4Q=="
|
||||||
|
},
|
||||||
|
"is-buffer@1.1.6": {
|
||||||
|
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||||
|
},
|
||||||
|
"layerr@3.0.0": {
|
||||||
|
"integrity": "sha512-tv754Ki2dXpPVApOrjTyRo4/QegVb9eVFq4mjqp4+NM5NaX7syQvN5BBNfV/ZpAHCEHV24XdUVrBAoka4jt3pA=="
|
||||||
|
},
|
||||||
|
"lit-element@4.2.0": {
|
||||||
|
"integrity": "sha512-MGrXJVAI5x+Bfth/pU9Kst1iWID6GHDLEzFEnyULB/sFiRLgkd8NPK/PeeXxktA3T6EIIaq8U3KcbTU5XFcP2Q==",
|
||||||
|
"dependencies": [
|
||||||
|
"@lit-labs/ssr-dom-shim",
|
||||||
|
"@lit/reactive-element",
|
||||||
|
"lit-html"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lit-html@3.3.0": {
|
||||||
|
"integrity": "sha512-RHoswrFAxY2d8Cf2mm4OZ1DgzCoBKUKSPvA1fhtSELxUERq2aQQ2h05pO9j81gS1o7RIRJ+CePLogfyahwmynw==",
|
||||||
|
"dependencies": [
|
||||||
|
"@types/trusted-types"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lit@3.3.0": {
|
||||||
|
"integrity": "sha512-DGVsqsOIHBww2DqnuZzW7QsuCdahp50ojuDaBPC7jUDRpYoH0z7kHBBYZewRzer75FwtrkmkKk7iOAwSaWdBmw==",
|
||||||
|
"dependencies": [
|
||||||
|
"@lit/reactive-element",
|
||||||
|
"lit-element",
|
||||||
|
"lit-html"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"md5@2.3.0": {
|
||||||
|
"integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
|
||||||
|
"dependencies": [
|
||||||
|
"charenc",
|
||||||
|
"crypt",
|
||||||
|
"is-buffer"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"minimatch@9.0.5": {
|
||||||
|
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
|
||||||
|
"dependencies": [
|
||||||
|
"brace-expansion"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"nanoid@3.3.11": {
|
||||||
|
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="
|
||||||
|
},
|
||||||
|
"nested-property@4.0.0": {
|
||||||
|
"integrity": "sha512-yFehXNWRs4cM0+dz7QxCd06hTbWbSkV0ISsqBfkntU6TOY4Qm3Q88fRRLOddkGh2Qq6dZvnKVAahfhjcUvLnyA=="
|
||||||
|
},
|
||||||
|
"node-domexception@1.0.0": {
|
||||||
|
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="
|
||||||
|
},
|
||||||
|
"node-fetch@3.3.2": {
|
||||||
|
"integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
|
||||||
|
"dependencies": [
|
||||||
|
"data-uri-to-buffer",
|
||||||
|
"fetch-blob",
|
||||||
|
"formdata-polyfill"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"path-posix@1.0.0": {
|
||||||
|
"integrity": "sha512-1gJ0WpNIiYcQydgg3Ed8KzvIqTsDpNwq+cjBCssvBtuTWjEqY1AW+i+OepiEMqDCzyro9B2sLAe4RBPajMYFiA=="
|
||||||
|
},
|
||||||
|
"picocolors@1.1.1": {
|
||||||
|
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="
|
||||||
|
},
|
||||||
|
"picomatch@4.0.2": {
|
||||||
|
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="
|
||||||
|
},
|
||||||
|
"postcss@8.5.5": {
|
||||||
|
"integrity": "sha512-d/jtm+rdNT8tpXuHY5MMtcbJFBkhXE6593XVR9UoGCH8jSFGci7jGvMGH5RYd5PBJW+00NZQt6gf7CbagJCrhg==",
|
||||||
|
"dependencies": [
|
||||||
|
"nanoid",
|
||||||
|
"picocolors",
|
||||||
|
"source-map-js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"querystringify@2.2.0": {
|
||||||
|
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
|
||||||
|
},
|
||||||
|
"requires-port@1.0.0": {
|
||||||
|
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
|
||||||
|
},
|
||||||
|
"rollup@4.43.0": {
|
||||||
|
"integrity": "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==",
|
||||||
|
"dependencies": [
|
||||||
|
"@rollup/rollup-android-arm-eabi",
|
||||||
|
"@rollup/rollup-android-arm64",
|
||||||
|
"@rollup/rollup-darwin-arm64",
|
||||||
|
"@rollup/rollup-darwin-x64",
|
||||||
|
"@rollup/rollup-freebsd-arm64",
|
||||||
|
"@rollup/rollup-freebsd-x64",
|
||||||
|
"@rollup/rollup-linux-arm-gnueabihf",
|
||||||
|
"@rollup/rollup-linux-arm-musleabihf",
|
||||||
|
"@rollup/rollup-linux-arm64-gnu",
|
||||||
|
"@rollup/rollup-linux-arm64-musl",
|
||||||
|
"@rollup/rollup-linux-loongarch64-gnu",
|
||||||
|
"@rollup/rollup-linux-powerpc64le-gnu",
|
||||||
|
"@rollup/rollup-linux-riscv64-gnu",
|
||||||
|
"@rollup/rollup-linux-riscv64-musl",
|
||||||
|
"@rollup/rollup-linux-s390x-gnu",
|
||||||
|
"@rollup/rollup-linux-x64-gnu",
|
||||||
|
"@rollup/rollup-linux-x64-musl",
|
||||||
|
"@rollup/rollup-win32-arm64-msvc",
|
||||||
|
"@rollup/rollup-win32-ia32-msvc",
|
||||||
|
"@rollup/rollup-win32-x64-msvc",
|
||||||
|
"@types/estree",
|
||||||
|
"fsevents"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"source-map-js@1.2.1": {
|
||||||
|
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="
|
||||||
|
},
|
||||||
|
"strnum@1.1.2": {
|
||||||
|
"integrity": "sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA=="
|
||||||
|
},
|
||||||
|
"tinyglobby@0.2.14_picomatch@4.0.2": {
|
||||||
|
"integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
|
||||||
|
"dependencies": [
|
||||||
|
"fdir",
|
||||||
|
"picomatch"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"url-join@5.0.0": {
|
||||||
|
"integrity": "sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA=="
|
||||||
|
},
|
||||||
|
"url-parse@1.5.10": {
|
||||||
|
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
|
||||||
|
"dependencies": [
|
||||||
|
"querystringify",
|
||||||
|
"requires-port"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"vite@6.3.5_picomatch@4.0.2": {
|
||||||
|
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
|
||||||
|
"dependencies": [
|
||||||
|
"esbuild",
|
||||||
|
"fdir",
|
||||||
|
"fsevents",
|
||||||
|
"picomatch",
|
||||||
|
"postcss",
|
||||||
|
"rollup",
|
||||||
|
"tinyglobby"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"web-streams-polyfill@3.3.3": {
|
||||||
|
"integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="
|
||||||
|
},
|
||||||
|
"webdav@5.8.0": {
|
||||||
|
"integrity": "sha512-iuFG7NamJ41Oshg4930iQgfIpRrUiatPWIekeznYgEf2EOraTRcDPTjy7gIOMtkdpKTaqPk1E68NO5PAGtJahA==",
|
||||||
|
"dependencies": [
|
||||||
|
"@buttercup/fetch",
|
||||||
|
"base-64",
|
||||||
|
"byte-length",
|
||||||
|
"entities",
|
||||||
|
"fast-xml-parser",
|
||||||
|
"hot-patcher",
|
||||||
|
"layerr",
|
||||||
|
"md5",
|
||||||
|
"minimatch",
|
||||||
|
"nested-property",
|
||||||
|
"node-fetch",
|
||||||
|
"path-posix",
|
||||||
|
"url-join",
|
||||||
|
"url-parse"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"workspace": {
|
||||||
|
"dependencies": [
|
||||||
|
"npm:@deno/vite-plugin@^1.0.4",
|
||||||
|
"npm:lit@^3.2.1",
|
||||||
|
"npm:vite@^6.1.1",
|
||||||
|
"npm:webdav@^5.8.0"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
16
crates/frontend/js-components/index.html
Normal file
16
crates/frontend/js-components/index.html
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Vite + Lit</title>
|
||||||
|
<link rel="stylesheet" href="./src/index.css" />
|
||||||
|
<script type="module" src="/src/my-element.ts"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<my-element>
|
||||||
|
<h1>Vite + Lit</h1>
|
||||||
|
</my-element>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
87
crates/frontend/js-components/lib/create-addressbook-form.ts
Normal file
87
crates/frontend/js-components/lib/create-addressbook-form.ts
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
import { html, LitElement } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
import { createClient } from "webdav";
|
||||||
|
|
||||||
|
@customElement("create-addressbook-form")
|
||||||
|
export class CreateAddressbookForm extends LitElement {
|
||||||
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override createRenderRoot() {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
client = createClient("/carddav")
|
||||||
|
|
||||||
|
@property()
|
||||||
|
user: String = ''
|
||||||
|
@property()
|
||||||
|
id: String = ''
|
||||||
|
@property()
|
||||||
|
displayname: String = ''
|
||||||
|
@property()
|
||||||
|
description: String = ''
|
||||||
|
|
||||||
|
|
||||||
|
override render() {
|
||||||
|
return html`
|
||||||
|
<section>
|
||||||
|
<h3>Create calendar</h3>
|
||||||
|
<form @submit=${this.submit}>
|
||||||
|
<label>
|
||||||
|
id
|
||||||
|
<input type="text" name="id" @change=${e => this.id = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<label>
|
||||||
|
Displayname
|
||||||
|
<input type="text" name="displayname" value=${this.displayname} @change=${e => this.displayname = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<label>
|
||||||
|
Description
|
||||||
|
<input type="text" name="description" @change=${e => this.description = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<button type="submit">Create</button>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
|
||||||
|
async submit(e: SubmitEvent) {
|
||||||
|
console.log(this.displayname)
|
||||||
|
e.preventDefault()
|
||||||
|
if (!this.id) {
|
||||||
|
alert("Empty id")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.displayname) {
|
||||||
|
alert("Empty displayname")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// TODO: Escape user input: There's not really a security risk here but would be nicer
|
||||||
|
await this.client.createDirectory(`/principal/${this.user}/${this.id}`, {
|
||||||
|
data: `
|
||||||
|
<mkcol xmlns="DAV:" xmlns:CARD="urn:ietf:params:xml:ns:carddav">
|
||||||
|
<set>
|
||||||
|
<prop>
|
||||||
|
<displayname>${this.displayname}</displayname>
|
||||||
|
${this.description ? `<CARD:addressbook-description>${this.description}</CARD:addressbook-description>` : ''}
|
||||||
|
</prop>
|
||||||
|
</set>
|
||||||
|
</mkcol>
|
||||||
|
`
|
||||||
|
})
|
||||||
|
window.location.reload()
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'create-addressbook-form': CreateAddressbookForm
|
||||||
|
}
|
||||||
|
}
|
||||||
118
crates/frontend/js-components/lib/create-calendar-form.ts
Normal file
118
crates/frontend/js-components/lib/create-calendar-form.ts
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
import { html, LitElement } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
import { createClient } from "webdav";
|
||||||
|
|
||||||
|
@customElement("create-calendar-form")
|
||||||
|
export class CreateCalendarForm extends LitElement {
|
||||||
|
constructor() {
|
||||||
|
super()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override createRenderRoot() {
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
client = createClient("/caldav")
|
||||||
|
|
||||||
|
@property()
|
||||||
|
user: String = ''
|
||||||
|
@property()
|
||||||
|
id: String = ''
|
||||||
|
@property()
|
||||||
|
displayname: String = ''
|
||||||
|
@property()
|
||||||
|
description: String = ''
|
||||||
|
@property()
|
||||||
|
color: String = ''
|
||||||
|
@property()
|
||||||
|
subscriptionUrl: String = ''
|
||||||
|
@property()
|
||||||
|
components: Set<"VEVENT" | "VTODO" | "VJOURNAL"> = new Set()
|
||||||
|
|
||||||
|
|
||||||
|
override render() {
|
||||||
|
return html`
|
||||||
|
<section>
|
||||||
|
<h3>Create calendar</h3>
|
||||||
|
<form @submit=${this.submit}>
|
||||||
|
<label>
|
||||||
|
id
|
||||||
|
<input type="text" name="id" @change=${e => this.id = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<label>
|
||||||
|
Displayname
|
||||||
|
<input type="text" name="displayname" value=${this.displayname} @change=${e => this.displayname = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<label>
|
||||||
|
Description
|
||||||
|
<input type="text" name="description" @change=${e => this.description = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<label>
|
||||||
|
Color
|
||||||
|
<input type="color" name="color" @change=${e => this.color = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<label>
|
||||||
|
Subscription URL
|
||||||
|
<input type="text" name="subscription_url" @change=${e => this.subscriptionUrl = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
${["VEVENT", "VTODO", "VJOURNAL"].map(comp => html`
|
||||||
|
<label>
|
||||||
|
Support ${comp}
|
||||||
|
<input type="checkbox" value=${comp} @change=${e => e.target.checked ? this.components.add(e.target.value) : this.components.delete(e.target.value)} />
|
||||||
|
</label>
|
||||||
|
`)}
|
||||||
|
<br>
|
||||||
|
<button type="submit">Create</button>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
|
||||||
|
async submit(e: SubmitEvent) {
|
||||||
|
console.log(this.displayname)
|
||||||
|
e.preventDefault()
|
||||||
|
if (!this.id) {
|
||||||
|
alert("Empty id")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.displayname) {
|
||||||
|
alert("Empty displayname")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.components.size) {
|
||||||
|
alert("No calendar components selected")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await this.client.createDirectory(`/principal/${this.user}/${this.id}`, {
|
||||||
|
data: `
|
||||||
|
<mkcol xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/" xmlns:ICAL="http://apple.com/ns/ical/">
|
||||||
|
<set>
|
||||||
|
<prop>
|
||||||
|
<displayname>${this.displayname}</displayname>
|
||||||
|
${this.description ? `<CAL:calendar-description>${this.description}</CAL:calendar-description>` : ''}
|
||||||
|
${this.color ? `<ICAL:calendar-color>${this.color}</ICAL:calendar-color>` : ''}
|
||||||
|
${this.subscriptionUrl ? `<CS:source>${this.subscriptionUrl}</CS:source>` : ''}
|
||||||
|
<CAL:supported-calendar-component-set>
|
||||||
|
${Array.from(this.components.keys()).map(comp => `<CAL:comp name="${comp}" />`).join('\n')}
|
||||||
|
</CAL:supported-calendar-component-set>
|
||||||
|
</prop>
|
||||||
|
</set>
|
||||||
|
</mkcol>
|
||||||
|
`
|
||||||
|
})
|
||||||
|
window.location.reload()
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'create-calendar-form': CreateCalendarForm
|
||||||
|
}
|
||||||
|
}
|
||||||
0
crates/frontend/js-components/lib/index.ts
Normal file
0
crates/frontend/js-components/lib/index.ts
Normal file
1
crates/frontend/js-components/lib/vite-env.d.ts
vendored
Normal file
1
crates/frontend/js-components/lib/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/// <reference types="vite/client" />
|
||||||
12
crates/frontend/js-components/tsconfig.json
Normal file
12
crates/frontend/js-components/tsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"module": "nodenext",
|
||||||
|
"moduleResolution": "nodenext",
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es2020",
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"useDefineForClassFields": false
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"lib/**/*.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
29
crates/frontend/js-components/vite.config.ts
Normal file
29
crates/frontend/js-components/vite.config.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import { defineConfig } from 'vite'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
optimizeDeps: {
|
||||||
|
// include: ["lit"]
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
copyPublicDir: false,
|
||||||
|
lib: {
|
||||||
|
entry: 'lib/index.ts',
|
||||||
|
formats: ['es'],
|
||||||
|
},
|
||||||
|
|
||||||
|
rollupOptions: {
|
||||||
|
input: [
|
||||||
|
"lib/create-calendar-form.ts",
|
||||||
|
"lib/create-addressbook-form.ts",
|
||||||
|
],
|
||||||
|
output: {
|
||||||
|
dir: "../public/assets/js/",
|
||||||
|
format: "es",
|
||||||
|
manualChunks: {
|
||||||
|
lit: ["lit"],
|
||||||
|
webdav: ["webdav"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
81
crates/frontend/public/assets/js/create-addressbook-form.mjs
Normal file
81
crates/frontend/public/assets/js/create-addressbook-form.mjs
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
import { i as d, x as m } from "./lit-Dq9MfRDi.mjs";
|
||||||
|
import { n, t as c } from "./property-DwhV4xIV.mjs";
|
||||||
|
import { a as u } from "./webdav-Bz4I5vNH.mjs";
|
||||||
|
var h = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (e, a, o, s) => {
|
||||||
|
for (var t = s > 1 ? void 0 : s ? y(a, o) : a, p = e.length - 1, l; p >= 0; p--)
|
||||||
|
(l = e[p]) && (t = (s ? l(a, o, t) : l(t)) || t);
|
||||||
|
return s && t && h(a, o, t), t;
|
||||||
|
};
|
||||||
|
let i = class extends d {
|
||||||
|
constructor() {
|
||||||
|
super(), this.client = u("/carddav"), this.user = "", this.id = "", this.displayname = "", this.description = "";
|
||||||
|
}
|
||||||
|
createRenderRoot() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
render() {
|
||||||
|
return m`
|
||||||
|
<section>
|
||||||
|
<h3>Create calendar</h3>
|
||||||
|
<form @submit=${this.submit}>
|
||||||
|
<label>
|
||||||
|
id
|
||||||
|
<input type="text" name="id" @change=${(e) => this.id = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<label>
|
||||||
|
Displayname
|
||||||
|
<input type="text" name="displayname" value=${this.displayname} @change=${(e) => this.displayname = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<label>
|
||||||
|
Description
|
||||||
|
<input type="text" name="description" @change=${(e) => this.description = e.target.value} />
|
||||||
|
</label>
|
||||||
|
<br>
|
||||||
|
<button type="submit">Create</button>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
async submit(e) {
|
||||||
|
if (console.log(this.displayname), e.preventDefault(), !this.id) {
|
||||||
|
alert("Empty id");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.displayname) {
|
||||||
|
alert("Empty displayname");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return await this.client.createDirectory(`/principal/${this.user}/${this.id}`, {
|
||||||
|
data: `
|
||||||
|
<mkcol xmlns="DAV:" xmlns:CARD="urn:ietf:params:xml:ns:carddav">
|
||||||
|
<set>
|
||||||
|
<prop>
|
||||||
|
<displayname>${this.displayname}</displayname>
|
||||||
|
${this.description ? `<CARD:addressbook-description>${this.description}</CARD:addressbook-description>` : ""}
|
||||||
|
</prop>
|
||||||
|
</set>
|
||||||
|
</mkcol>
|
||||||
|
`
|
||||||
|
}), window.location.reload(), null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
r([
|
||||||
|
n()
|
||||||
|
], i.prototype, "user", 2);
|
||||||
|
r([
|
||||||
|
n()
|
||||||
|
], i.prototype, "id", 2);
|
||||||
|
r([
|
||||||
|
n()
|
||||||
|
], i.prototype, "displayname", 2);
|
||||||
|
r([
|
||||||
|
n()
|
||||||
|
], i.prototype, "description", 2);
|
||||||
|
i = r([
|
||||||
|
c("create-addressbook-form")
|
||||||
|
], i);
|
||||||
|
export {
|
||||||
|
i as CreateAddressbookForm
|
||||||
|
};
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user