From dbdbeb3a4d7dc104ac14cfdb92e9a766c58bc98f Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 26 May 2021 21:16:46 +0200 Subject: [PATCH] [API] Added events / schedule api --- README.md | 13 +++++++++++++ package.json | 10 ++++------ src/api.d.ts | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 README.md create mode 100644 src/api.d.ts diff --git a/README.md b/README.md new file mode 100644 index 0000000..8f3f723 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Flaschengeist `schedule` fontend-plugin + +This package provides the [Flaschengeist](https://flaschengeist.dev/Flaschengeist/flaschengeist) frontend for the schedule plugin (event and schedule management). + +## License + +Licensed under the MIT license, see [LICENSE](./LICENSE) for more details. + +## Development + +Feel free to report bugs, issues and feature requests using the [Issues function](https://flaschengeist.dev/Flaschengeist/flaschengeist-schedule/issues). + +Please follow our [general development guide](https://flaschengeist.dev/Flaschengeist/flaschengeist/wiki/Development#general-development). diff --git a/package.json b/package.json index ac786c5..37abf69 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,8 @@ { - "private": true, "license": "MIT", "version": "1.0.0-alpha.1", "name": "@flaschengeist/schedule", - "author": "Ferdinand ", + "author": "Ferdinand Thiessen ", "homepage": "https://flaschengeist.dev/Flaschengeist", "description": "Flaschengeist schedule plugin", "bugs": { @@ -14,8 +13,8 @@ "url": "https://flaschengeist.dev/Flaschengeist/flaschengeist-schedule" }, "main": "src/index.ts", + "types": "src/api.d.ts", "scripts": { - "valid": "tsc --noEmit", "pretty": "prettier --config ./package.json --write '{,!(node_modules)/**/}*.ts'", "lint": "eslint --ext .js,.ts,.vue ./src" }, @@ -23,8 +22,7 @@ "@quasar/quasar-ui-qcalendar": "^4.0.0-alpha.8" }, "devDependencies": { - "@flaschengeist/api": "file:../flaschengeist-frontend/api", - "@flaschengeist/types": "git+https://flaschengeist.dev/ferfissimo/flaschengeist-types.git#develop", + "@flaschengeist/types": "^1.0.0-alpha.1", "@quasar/app": "^3.0.0-beta.26", "quasar": "^2.0.0-beta.18", "axios": "^0.21.1", @@ -44,7 +42,7 @@ "prettier": { "singleQuote": true, "semi": true, - "printWidth": 100, + "printWidth": 120, "arrowParens": "always" } } diff --git a/src/api.d.ts b/src/api.d.ts new file mode 100644 index 0000000..4584a27 --- /dev/null +++ b/src/api.d.ts @@ -0,0 +1,40 @@ +declare namespace FG { + interface Event { + id: number; + start: Date; + end?: Date; + name?: string; + description?: string; + type: EventType | number; + is_template: boolean; + jobs: Array; + } + interface EventType { + id: number; + name: string; + } + interface Invite { + id: number; + job_id: number; + invitee_id: string; + sender_id: string; + } + interface Job { + id: number; + start: Date; + end?: Date; + type: JobType | number; + comment?: string; + services: Array; + required_services: number; + } + interface JobType { + id: number; + name: string; + } + interface Service { + userid: string; + is_backup: boolean; + value: number; + } +}