diff options
author | metamuffin <yvchraiqi@protonmail.com> | 2022-06-10 10:47:16 +0200 |
---|---|---|
committer | metamuffin <yvchraiqi@protonmail.com> | 2022-06-10 10:47:16 +0200 |
commit | 3238f8517097745032e19b3e26f57f0465a00b28 (patch) | |
tree | 2c712d2ab45276bed2981dbc32b7a4adeadbc878 /protocol.d.ts | |
parent | 829f0dc5ac68ee8a030894ce26c83b1c4eb02104 (diff) | |
download | karlender-3238f8517097745032e19b3e26f57f0465a00b28.tar karlender-3238f8517097745032e19b3e26f57f0465a00b28.tar.bz2 karlender-3238f8517097745032e19b3e26f57f0465a00b28.tar.zst |
move to workspace
Diffstat (limited to 'protocol.d.ts')
-rw-r--r-- | protocol.d.ts | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/protocol.d.ts b/protocol.d.ts deleted file mode 100644 index 79949b8..0000000 --- a/protocol.d.ts +++ /dev/null @@ -1,63 +0,0 @@ - -// { type: "handshake", version: "10"} -// { type: "handshake", data: {version: "10"}} -//! { "handshake": {version: "10"}} - -export type ServerboundPacket = Download -export type ClientboundPacket = Handshake | DownloadResponse - -interface Handshake { - type: "handshake" - data: { version: string } -} - -interface Download { - type: "download", - data: null -} -interface DownloadResponse { - type: "download_response", - data: { tasks: Task[] } -} - -interface Task { - name: string, - description: string, - - tags: string[], - priority: number, - - completed?: number, - scheduled?: number, - - occurence?: Condition, - deadline?: Condition, -} - -/* - 11:00 - 12:00 every first monday of the month - - and: [ - range: {prop: "hour", min: 11, max: 12}, - equal: {prop: "dayofweek", value: 0}, - equal: {prop: "weekofmonth", value: 0}, - ] -*/ - -// should only have one property -export type Condition = { from?: Condition } - | { or?: Condition[] } - | { and?: Condition[] } - | { equal?: { prop: Thing, value: number, mod?: number } } - | { range?: { prop: Thing, min: number, max: number, mod?: number } } - -type Thing = "year" - | "monthofyear" - | "weekofmonth" - | "dayofyear" - | "dayofmonth" - | "dayofweek" - | "hour" - | "minute" - | "second" - | "unix"
\ No newline at end of file |