[API] Added events / schedule api

This commit is contained in:
Ferdinand Thiessen 2021-05-26 21:16:46 +02:00
parent 4082f64e78
commit dbdbeb3a4d
3 changed files with 57 additions and 6 deletions

13
README.md Normal file
View File

@ -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).

View File

@ -1,9 +1,8 @@
{
"private": true,
"license": "MIT",
"version": "1.0.0-alpha.1",
"name": "@flaschengeist/schedule",
"author": "Ferdinand <rpm@fthiessen.de>",
"author": "Ferdinand Thiessen <rpm@fthiessen.de>",
"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"
}
}

40
src/api.d.ts vendored Normal file
View File

@ -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<Job>;
}
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<Service>;
required_services: number;
}
interface JobType {
id: number;
name: string;
}
interface Service {
userid: string;
is_backup: boolean;
value: number;
}
}