diff --git a/.editorconfig b/.editorconfig index 014fd66..5ea99c0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,3 +8,10 @@ ktlint_standard_final-newline = disabled ktlint_standard_class-naming = disabled ktlint_standard_function-naming = disabled ktlint_standard_no-wildcard-imports = disabled + +# Build output (Compose-generated resources and friends) is never committed +# and is not ktlint-formatted; this keeps bare `ktlint` runs clean. +[**/build/**] +ktlint_standard = disabled +[build/**] +ktlint_standard = disabled diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..eb75947 --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +# Android emulator / local development. Copy to .env (ignored by Git). +# Physical device: use your PC's LAN address instead of 10.0.2.2. +# Entra IDs are public identifiers; NEVER put a client secret in a mobile project. +MERGEN_API_ORIGIN=http://10.0.2.2:3001 +MERGEN_ENTRA_CLIENT_ID= +MERGEN_ENTRA_TENANT_ID= diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e56b04a..19ddaac 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,7 +12,7 @@ Closes # ## Verification -- [ ] `./gradlew :composeApp:compileDebugKotlinAndroid` -- [ ] `./gradlew :composeApp:testDebugUnitTest` -- [ ] `./gradlew :composeApp:lintDebug` +- [ ] `gradle :composeApp:compileDebugKotlinAndroid` +- [ ] `gradle :composeApp:testDebugUnitTest` +- [ ] `gradle :composeApp:lintDebug` - [ ] Screenshots or a screen recording — if the UI changed (Android and/or iOS) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f2ccdc3..62321d4 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -2,9 +2,9 @@ name: Checks on: push: - branches: ["main"] + branches: [ "main" ] pull_request: - branches: ["main"] + branches: [ "main" ] concurrency: group: checks-${{ github.ref }} @@ -20,34 +20,36 @@ jobs: steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - name: Set up JDK 21 - uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4.9.1 + # Tools come from mise.toml; android-sdk stays out so the runner's + # preinstalled Android SDK (and its ANDROID_HOME) is used. + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - distribution: temurin - java-version: "21" + install_args: java gradle - name: Set up Gradle - uses: gradle/actions/setup-gradle@748248ddd2a24f49513d8f472f81c3a07d4d50e1 # v4.4.4 - - - name: Make Gradle executable - run: chmod +x ./gradlew + uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 + with: + # v6 defaults to Gradle's proprietary cache service; keep the old + # actions/cache-based behavior. + cache-provider: basic - name: Compile - run: ./gradlew :composeApp:compileDebugKotlinAndroid + run: gradle :composeApp:compileDebugKotlinAndroid - name: Unit tests - run: ./gradlew :composeApp:testDebugUnitTest + run: gradle :composeApp:testDebugUnitTest - name: Android Lint - run: ./gradlew :composeApp:lintDebug + run: gradle :composeApp:lintDebug - name: Upload test reports if: always() - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: test-reports path: composeApp/build/reports/tests/ diff --git a/.github/workflows/closed-release.yml b/.github/workflows/closed-release.yml index 5632e10..db71cd4 100644 --- a/.github/workflows/closed-release.yml +++ b/.github/workflows/closed-release.yml @@ -7,7 +7,7 @@ on: description: Which platform to release required: true type: choice - options: [ios, android, both] + options: [ ios, android, both ] run_id: description: "Build run id (default: latest completed run that has the required artifact)" required: false @@ -39,7 +39,7 @@ jobs: steps: - name: Download Android AAB - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: mergen-android-aab path: artifacts @@ -64,23 +64,34 @@ jobs: steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Download iOS IPA - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: mergen-ios-ipa path: artifacts run-id: ${{ needs.resolve-build.outputs.run_id }} github-token: ${{ github.token }} - - name: Set up Ruby - uses: ruby/setup-ruby@e8944e80fb94b20106697132f8c20c665fab29e9 # v1.325.0 + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - ruby-version: "3.3" - bundler-cache: true + install_args: ruby + + - name: Cache gems + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile.lock') }} + restore-keys: ${{ runner.os }}-gems- + + - name: Install fastlane + run: | + bundle config set --local path vendor/bundle + bundle install --jobs 4 --retry 3 - name: Write App Store Connect API key env: diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml new file mode 100644 index 0000000..391b8b6 --- /dev/null +++ b/.github/workflows/dependency-submission.yml @@ -0,0 +1,39 @@ +name: Dependency Submission (Gradle) + +on: + push: + branches: [ "**" ] + +permissions: + contents: write + +jobs: + submit-gradle: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + # Tools come from mise.toml (source of truth). + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 + with: + install_args: java gradle + + - name: Read the mise-pinned Gradle version + id: gradle + run: echo "version=$(mise current gradle)" >> "$GITHUB_OUTPUT" + + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 + with: + # The action requires the wrapper or an explicit version; the version + # comes from mise.toml. The distribution download is cached by the + # action between runs. + gradle-version: ${{ steps.gradle.outputs.version }} + # v6 defaults to Gradle's proprietary cache service; keep the old + # actions/cache-based behavior. + cache-provider: basic diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index ec7650c..cf9f2b1 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -7,7 +7,7 @@ on: description: Which platform to release required: true type: choice - options: [ios, android, both] + options: [ ios, android, both ] run_id: description: "Build run id (default: latest completed run that has the required artifact)" required: false @@ -39,7 +39,7 @@ jobs: steps: - name: Download Android AAB - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: mergen-android-aab path: artifacts @@ -64,23 +64,34 @@ jobs: steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Download iOS IPA - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: mergen-ios-ipa path: artifacts run-id: ${{ needs.resolve-build.outputs.run_id }} github-token: ${{ github.token }} - - name: Set up Ruby - uses: ruby/setup-ruby@e8944e80fb94b20106697132f8c20c665fab29e9 # v1.325.0 + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - ruby-version: "3.3" - bundler-cache: true + install_args: ruby + + - name: Cache gems + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile.lock') }} + restore-keys: ${{ runner.os }}-gems- + + - name: Install fastlane + run: | + bundle config set --local path vendor/bundle + bundle install --jobs 4 --retry 3 - name: Write App Store Connect API key env: diff --git a/.github/workflows/developer-release.yml b/.github/workflows/developer-release.yml index 6ac0c6d..0871c22 100644 --- a/.github/workflows/developer-release.yml +++ b/.github/workflows/developer-release.yml @@ -28,21 +28,25 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up Java - uses: actions/setup-java@v4 + # Tools come from mise.toml; android-sdk stays out so the runner's + # preinstalled Android SDK (and its ANDROID_HOME) is used. + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - distribution: temurin - java-version: "21" - cache: gradle + install_args: java gradle - - name: Make Gradle executable - run: chmod +x ./gradlew + - name: Set up Gradle + uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 + with: + # v6 defaults to Gradle's proprietary cache service; keep the old + # actions/cache-based behavior. + cache-provider: basic - name: Build Android developer APK run: | - ./gradlew :composeApp:assembleDebug \ + gradle :composeApp:assembleDebug \ -PmergenVersionCode="${{ github.run_number }}" \ -PmergenVersionName="${ANDROID_VERSION_NAME}" @@ -103,7 +107,7 @@ jobs: - name: Build Google Play release AAB if: ${{ inputs.build_play_aab }} run: | - ./gradlew :composeApp:bundleRelease \ + gradle :composeApp:bundleRelease \ -PmergenVersionCode="${{ github.run_number }}" \ -PmergenVersionName="${PLAY_VERSION_NAME}" @@ -165,7 +169,7 @@ jobs: echo "OK: AAB is signed with the Play-registered upload certificate." - name: Upload Android APK artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: mergen-android-apk path: release-assets/Mergen-android-dev.apk @@ -173,7 +177,7 @@ jobs: - name: Upload Google Play AAB artifact if: ${{ inputs.build_play_aab }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: mergen-android-play-aab path: release-assets/Mergen-android-play.aab @@ -186,17 +190,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up Java - uses: actions/setup-java@v4 + # Tools come from mise.toml (java feeds jarsigner/keytool and the Gradle + # part of the iOS build); android-sdk stays out on purpose. + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - distribution: temurin - java-version: "21" - cache: gradle - - - name: Make Gradle executable - run: chmod +x ./gradlew + install_args: java gradle - name: Build iOS Simulator app run: | @@ -232,7 +233,7 @@ jobs: release-assets/Mergen-ios-simulator.zip - name: Upload iOS Simulator artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: mergen-ios-simulator path: release-assets/Mergen-ios-simulator.zip @@ -248,7 +249,7 @@ jobs: steps: - name: Download build artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: pattern: mergen-* path: release-assets diff --git a/.github/workflows/kotlin-quality-check.yml b/.github/workflows/kotlin-quality-check.yml index d78422d..64a04ad 100644 --- a/.github/workflows/kotlin-quality-check.yml +++ b/.github/workflows/kotlin-quality-check.yml @@ -12,25 +12,18 @@ permissions: jobs: lint_only: runs-on: ubuntu-latest - + steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up JDK 24 - uses: actions/setup-java@v4 + # Tools come from mise.toml (source of truth). Only java and ktlint are + # installed here; android-sdk stays out of CI because Gradle builds use + # the runner's preinstalled Android SDK. + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - java-version: '24' - distribution: 'temurin' - - - name: Download Ktlint CLI - run: | - KTLINT_VERSION="1.1.1" - echo "Downloading Ktlint CLI version $KTLINT_VERSION..." - # Download the executable jar to the current directory - curl -sSLO https://github.com/pinterest/ktlint/releases/download/$KTLINT_VERSION/ktlint - # Make the file executable - chmod +x ktlint + install_args: java ktlint - name: Execute Ktlint Check - run: ./ktlint "**/*.kt" "**/*.kts" "!composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/**" + run: ktlint "**/*.kt" "**/*.kts" "!**/build/**" "!composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/**" diff --git a/.github/workflows/open-release.yml b/.github/workflows/open-release.yml index 106a372..9ebdc52 100644 --- a/.github/workflows/open-release.yml +++ b/.github/workflows/open-release.yml @@ -7,7 +7,7 @@ on: description: Which platform to release required: true type: choice - options: [ios, android, both] + options: [ ios, android, both ] run_id: description: "Build run id (default: latest completed run that has the required artifact)" required: false @@ -39,7 +39,7 @@ jobs: steps: - name: Download Android AAB - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: mergen-android-aab path: artifacts @@ -64,23 +64,34 @@ jobs: steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Download iOS IPA - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: mergen-ios-ipa path: artifacts run-id: ${{ needs.resolve-build.outputs.run_id }} github-token: ${{ github.token }} - - name: Set up Ruby - uses: ruby/setup-ruby@e8944e80fb94b20106697132f8c20c665fab29e9 # v1.325.0 + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - ruby-version: "3.3" - bundler-cache: true + install_args: ruby + + - name: Cache gems + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile.lock') }} + restore-keys: ${{ runner.os }}-gems- + + - name: Install fastlane + run: | + bundle config set --local path vendor/bundle + bundle install --jobs 4 --retry 3 - name: Write App Store Connect API key env: diff --git a/.github/workflows/prod-release.yml b/.github/workflows/prod-release.yml index 34b65dd..7aa29c1 100644 --- a/.github/workflows/prod-release.yml +++ b/.github/workflows/prod-release.yml @@ -7,7 +7,7 @@ on: description: Which platform to release required: true type: choice - options: [ios, android, both] + options: [ ios, android, both ] run_id: description: "Build run id (default: latest completed run that has the required artifact)" required: false @@ -39,7 +39,7 @@ jobs: steps: - name: Download Android AAB - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: mergen-android-aab path: artifacts @@ -64,23 +64,34 @@ jobs: steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Download iOS IPA - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: mergen-ios-ipa path: artifacts run-id: ${{ needs.resolve-build.outputs.run_id }} github-token: ${{ github.token }} - - name: Set up Ruby - uses: ruby/setup-ruby@e8944e80fb94b20106697132f8c20c665fab29e9 # v1.325.0 + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - ruby-version: "3.3" - bundler-cache: true + install_args: ruby + + - name: Cache gems + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile.lock') }} + restore-keys: ${{ runner.os }}-gems- + + - name: Install fastlane + run: | + bundle config set --local path vendor/bundle + bundle install --jobs 4 --retry 3 - name: Write App Store Connect API key env: diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 8275785..90ed3e6 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -2,8 +2,9 @@ name: Release build on: release: - types: [published] - workflow_dispatch: # manual build; produces signed artifacts, no store upload (attaches the APK if the tag has a release) + types: [ published ] + workflow_dispatch: + # manual build; produces signed artifacts, no store upload (attaches the APK if the tag has a release) inputs: tag: description: Git tag to build (e.g. v1.2.3). @@ -28,26 +29,36 @@ jobs: steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.event.release.tag_name }} persist-credentials: false - - name: Set up Java - uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4.9.1 + # Tools come from mise.toml; android-sdk stays out so the runner's + # preinstalled Android SDK (and its ANDROID_HOME) is used. + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - distribution: temurin - java-version: "21" - cache: gradle + install_args: java gradle ruby - - name: Set up Ruby - uses: ruby/setup-ruby@e8944e80fb94b20106697132f8c20c665fab29e9 # v1.325.0 + - name: Set up Gradle + uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - ruby-version: "3.3" - bundler-cache: true + # v6 defaults to Gradle's proprietary cache service; keep the old + # actions/cache-based behavior. + cache-provider: basic - - name: Make Gradle executable - run: chmod +x ./gradlew + - name: Cache gems + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile.lock') }} + restore-keys: ${{ runner.os }}-gems- + + - name: Install fastlane + run: | + bundle config set --local path vendor/bundle + bundle install --jobs 4 --retry 3 - name: Resolve version env: @@ -75,7 +86,7 @@ jobs: bundle exec fastlane ios build - name: Upload IPA artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: mergen-ios-ipa path: artifacts/Mergen.ipa @@ -103,20 +114,24 @@ jobs: steps: - name: Checkout - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.event.release.tag_name }} persist-credentials: false - - name: Set up Java - uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4.9.1 + # Tools come from mise.toml; android-sdk stays out so the runner's + # preinstalled Android SDK (and its ANDROID_HOME) is used. + - name: Set up tools (mise) + uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5.2.0 with: - distribution: temurin - java-version: "21" - cache: gradle + install_args: java gradle - - name: Make Gradle executable - run: chmod +x ./gradlew + - name: Set up Gradle + uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 + with: + # v6 defaults to Gradle's proprietary cache service; keep the old + # actions/cache-based behavior. + cache-provider: basic - name: Resolve version env: @@ -148,7 +163,7 @@ jobs: ANDROID_UPLOAD_KEY_PASSWORD: ${{ secrets.ANDROID_UPLOAD_KEY_PASSWORD }} run: | [[ -n "$ANDROID_UPLOAD_STORE_PASSWORD" && -n "$ANDROID_UPLOAD_KEY_ALIAS" && -n "$ANDROID_UPLOAD_KEY_PASSWORD" ]] || { echo "::error::Missing Android signing secret(s)"; exit 1; } - ./gradlew :composeApp:bundleRelease :composeApp:assembleRelease \ + gradle :composeApp:bundleRelease :composeApp:assembleRelease \ -PmergenVersionCode="$VERSION_CODE" \ -PmergenVersionName="$VERSION" \ -Pandroid.injected.signing.store.file="$RUNNER_TEMP/mergen-upload.jks" \ @@ -194,14 +209,14 @@ jobs: echo "OK: AAB is signed with the Play-registered upload certificate." - name: Upload AAB artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: mergen-android-aab path: artifacts/Mergen.aab if-no-files-found: error - name: Upload APK artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: mergen-android-apk path: artifacts/Mergen.apk diff --git a/.gitignore b/.gitignore index dec6ce5..5c5da81 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,12 @@ fastlane/*.log *.keystore *.keystore.b64 +# Mergen local and CI environment settings +.env +.env.* +!.env.example +!.env.production.example +# fastlane gem bundle (vendor/bundle, configured by bundler) +.bundle/ +vendor/ diff --git a/.local-tools/ktlint-1.1.1 b/.local-tools/ktlint-1.1.1 deleted file mode 100644 index ab345f4..0000000 Binary files a/.local-tools/ktlint-1.1.1 and /dev/null differ diff --git a/DEV_DISTRIBUTION.md b/DEV_DISTRIBUTION.md deleted file mode 100644 index 591254b..0000000 --- a/DEV_DISTRIBUTION.md +++ /dev/null @@ -1,78 +0,0 @@ -# Developer distribution - -The developer distribution is built and published by **GitHub Actions**. - -There is no local Android/iOS build-and-upload pipeline anymore. - -## Recommended: run it from the browser - -Open: - -`https://github.com/filcdev/mergen/actions/workflows/developer-release.yml` - -Then: - -1. click **Run workflow** -2. select `main` -3. click the green **Run workflow** button -4. wait for the workflow to finish - -The workflow builds on GitHub-hosted runners. - -## Output - -The workflow replaces the moving prerelease: - -`https://github.com/filcdev/mergen/releases/tag/dev-latest` - -Stable Android URL: - -`https://github.com/filcdev/mergen/releases/download/dev-latest/Mergen-android-dev.apk` - -### Android - -GitHub builds: - -`Mergen-android-dev.apk` - -No local Java, Android SDK, Git Bash or Gradle build is needed to publish it. - -### iOS - -A macOS GitHub runner attempts to build: - -`Mergen-ios-simulator.zip` - -This is a **Simulator build** for developers. It is not installable on a physical -iPhone. - -For physical iPhone/iPad testing we still need one of Apple's signed -distribution paths, for example a registered-device development/ad-hoc build, -TestFlight, or later an eligible alternative distribution setup. - -## Optional command-line launchers - -The repository still contains convenience launchers: - -Windows CMD: - -```cmd -release.cmd -``` - -Git Bash/macOS/Linux: - -```bash -./release.sh -``` - -These launchers **do not build or upload anything locally**. They only ask -GitHub Actions to start the `Developer Release` workflow. - -They require GitHub CLI authentication: - -```bash -gh auth login -``` - -If GitHub CLI is not available, use the browser method instead. diff --git a/FILC_DESIGN_PORT.md b/FILC_DESIGN_PORT.md deleted file mode 100644 index e4f113a..0000000 --- a/FILC_DESIGN_PORT.md +++ /dev/null @@ -1,33 +0,0 @@ -# Legacy Filc visual design port - -This branch recreates the visual language of the archived Filc mobile app in -Mergen's Compose Multiplatform UI. - -Reference projects: - -- `filc/mobile-archive`: mobile screens, navigation, filters, panels -- `filc/naplo-archive`: color system and theme - -Ported visual rules: - -- Filc accent: `#20AC9B` -- light background: `#F4F9FF` -- light panels: `#FFFFFF` -- dark background: `#000000` -- dark panels: `#141516` -- 16 dp panel corners -- soft panel shadows in light mode -- rounded selected navigation item -- pill-shaped filters -- large 32 sp bold page headings -- greeting + profile-style top bar -- icon-first bottom navigation without text wrapping - -The original Flutter code was not dropped into the Kotlin project directly. -The UI is reimplemented in Compose Multiplatform while preserving the existing -Mergen data/auth/navigation logic. - -The old Filc project used Montserrat. This port intentionally uses the platform -font stack instead of redistributing font binaries. - -See `THIRD_PARTY_NOTICES.md` for BSD 3-Clause attribution. diff --git a/README.md b/README.md index 7e7d049..63605fc 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,17 @@ To build and run the development version of the Android app, use the run configu in your IDE’s toolbar or build it directly from the terminal: - on macOS/Linux ```shell - ./gradlew :composeApp:assembleDebug + gradle :composeApp:assembleDebug ``` - on Windows ```shell - .\gradlew.bat :composeApp:assembleDebug + gradle :composeApp:assembleDebug ``` +Both require mise (`mise install` in the repo root), which pins Java, Gradle, +Ruby, ktlint and gh from `mise.toml`. Run `mise run sdk-components` once to install the Android platform AGP +compiles against. + ### Build and Run iOS Application To build and run the development version of the iOS app, use the run configuration from the run widget diff --git a/composeApp/.openapi-generator-ignore b/composeApp/.openapi-generator-ignore index a66acd4..af7b11e 100644 --- a/composeApp/.openapi-generator-ignore +++ b/composeApp/.openapi-generator-ignore @@ -1,14 +1,12 @@ # OpenAPI Generator ignore file # This file is used to exclude certain files from being overwritten during code generation. -# Files listed here will not be modified by `./gradlew generateFilcApiClient`. +# Files listed here will not be modified by `gradle generateFilcApiClient`. # See: https://openapi-generator.tech/docs/customization/#ignore-file-format # Gradle build files managed by this project build.gradle.kts settings.gradle.kts gradle.properties -gradlew -gradlew.bat gradle/ # Documentation managed by this project diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 99e9c78..889b4a1 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -1,4 +1,10 @@ -// import org.jetbrains.compose.desktop.application.dsl.TargetFormat +import org.gradle.api.DefaultTask +import org.gradle.api.file.DirectoryProperty +import org.gradle.api.provider.Property +import org.gradle.api.provider.Provider +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.OutputDirectory +import org.gradle.api.tasks.TaskAction import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.openapitools.generator.gradle.plugin.tasks.GenerateTask @@ -14,7 +20,7 @@ plugins { // --------------------------------------------------------------------------- // OpenAPI client generation // -// Run `./gradlew generateFilcApiClient` to regenerate the API client +// Run `gradle generateFilcApiClient` to regenerate the API client // whenever openapi/filc-openapi.json is updated. The generated sources are // committed to version control so the project compiles without running the // generator first. @@ -47,6 +53,10 @@ val generateFilcApiClient by tasks.registering(GenerateTask::class) { compose.resources { publicResClass = true generateResClass = always + // The default package derives from rootProject.name ("Petrik-App"), which + // Compose sanitizes to "petrik_app..." — underscores violate ktlint's + // package-name rule whenever build output is linted locally. + packageOfResClass = "hu.petrik.filcapp.generated.resources" } kotlin { @@ -135,7 +145,12 @@ android { libs.versions.android.targetSdk .get() .toInt() - versionCode = providers.gradleProperty("mergenVersionCode").orElse("1").get().toInt() + versionCode = + providers + .gradleProperty("mergenVersionCode") + .orElse("1") + .get() + .toInt() versionName = providers.gradleProperty("mergenVersionName").orElse("1.0").get() } packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } } @@ -147,3 +162,156 @@ android { } dependencies { debugImplementation(compose.uiTooling) } + +// Mergen environment profiles: local for development, production for release. +// The mobile application contains only public Entra identifiers (never a client secret). +// Shared Kotlin source is generated from the selected profile into build/. +// An Android release task always selects production; it cannot use local .env. +abstract class GenerateMergenEnvironment : DefaultTask() { + @get:Input abstract val buildProfile: Property + + @get:Input abstract val apiOrigin: Property + + @get:Input abstract val entraClientId: Property + + @get:Input abstract val entraTenantId: Property + + @get:OutputDirectory abstract val outputDirectory: DirectoryProperty + + @TaskAction + fun generate() { + val profile = buildProfile.get() + require(profile == "local" || profile == "production") { + "Invalid -PmergenProfile value: $profile (allowed: local, production)" + } + + val origin = apiOrigin.get().trim().trimEnd('/') + val clientId = entraClientId.get().trim() + val tenantId = entraTenantId.get().trim() + require(origin.matches(Regex("https?://[^/]+"))) { + "API origin must look like https://filc.petrik.hu or http://10.0.2.2:3001" + } + if (profile == "production") { + require(origin == "https://filc.petrik.hu") { + "Production build requires https://filc.petrik.hu (not a local backend)" + } + val uuid = Regex("[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}") + require(uuid.matches(clientId) && uuid.matches(tenantId)) { + "Production Entra IDs are missing/invalid. " + + "Set MERGEN_RELEASE_ENTRA_CLIENT_ID and MERGEN_RELEASE_ENTRA_TENANT_ID " + + "in .env.production or CI environment." + } + } + + fun quoted(value: String): String = "\"" + value.replace("\\", "\\\\").replace("\"", "\\\"").replace("\n", "\\n") + "\"" + + val packageDir = outputDirectory.get().asFile.resolve("hu/petrik/filcapp/config") + packageDir.mkdirs() + packageDir.resolve("MergenEnvironment.kt").writeText( + """ + package hu.petrik.filcapp.config + + /** Generated build settings. Never edit or commit this file. */ + object MergenEnvironment { + const val API_ORIGIN = ${quoted(origin)} + const val API_BASE_URL = ${quoted("$origin/api")} + const val ENTRA_CLIENT_ID = ${quoted(clientId)} + const val ENTRA_TENANT_ID = ${quoted(tenantId)} + } + """.trimIndent() + "\n", + Charsets.UTF_8, + ) + } +} + +// Android release tasks (including bundleRelease) force the production profile. +// For iOS release builds, explicitly pass -PmergenProfile=production. +val mergenReleaseRequested = + gradle.startParameter.taskNames.any { requested -> + val task = requested.substringAfterLast(':') + task.contains("Release", ignoreCase = true) || + task in setOf("assemble", "bundle", "build", "publish") + } +val mergenProfile = + providers + .gradleProperty("mergenProfile") + .orElse(if (mergenReleaseRequested) "production" else "local") + .get() +require(mergenProfile == "local" || mergenProfile == "production") { + "Invalid -PmergenProfile=$mergenProfile (allowed: local, production)" +} +if (mergenReleaseRequested && mergenProfile != "production") { + throw GradleException("Refusing to build a release with -PmergenProfile=local") +} + +fun mergenEnvFile(fileName: String): Provider> = + providers + .fileContents(rootProject.layout.projectDirectory.file(fileName)) + .asText + .orElse("") + .map { content -> + content + .lineSequence() + .map { it.trim() } + .filter { it.isNotEmpty() && !it.startsWith("#") && it.contains('=') } + .associate { line -> + val key = line.substringBefore('=').trim() + val value = + line + .substringAfter('=') + .trim() + .removeSurrounding("\"") + .removeSurrounding("'") + key to value + } + } + +// Never read the local .env when compiling a production variant. +val mergenActiveEnv = mergenEnvFile(if (mergenProfile == "production") ".env.production" else ".env") + +fun mergenSetting( + name: String, + fallback: String, +): Provider { + val key = if (mergenProfile == "production") "MERGEN_RELEASE_$name" else "MERGEN_$name" + return providers.environmentVariable(key).orElse( + mergenActiveEnv.map { values -> values[key] ?: fallback }, + ) +} + +val generateMergenEnvironment by tasks.registering(GenerateMergenEnvironment::class) { + buildProfile.set(mergenProfile) + apiOrigin.set(mergenSetting("API_ORIGIN", "https://filc.petrik.hu")) + entraClientId.set(mergenSetting("ENTRA_CLIENT_ID", "")) + entraTenantId.set(mergenSetting("ENTRA_TENANT_ID", "")) + outputDirectory.set(layout.buildDirectory.dir("generated/mergenEnvironment/commonMain/kotlin")) +} +kotlin.sourceSets + .getByName("commonMain") + .kotlin + .srcDir(generateMergenEnvironment) + +// Safety net: a release task reached indirectly (e.g. through another task) +// must also fail rather than compile with the local profile. +val verifyMergenProductionProfile by tasks.registering { + dependsOn(generateMergenEnvironment) + doLast { + require(mergenProfile == "production") { + "A release task cannot use the local Mergen profile. Use -PmergenProfile=production." + } + } +} +tasks.matching { it.name.contains("Release", ignoreCase = true) }.configureEach { + dependsOn(verifyMergenProductionProfile) +} + +android { + buildTypes { + getByName("debug") { + manifestPlaceholders["mergenCleartext"] = "true" + } + getByName("release") { + manifestPlaceholders["mergenCleartext"] = "false" + } + } +} diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/composeApp/src/androidMain/AndroidManifest.xml index a9f3c63..4286d45 100644 --- a/composeApp/src/androidMain/AndroidManifest.xml +++ b/composeApp/src/androidMain/AndroidManifest.xml @@ -4,7 +4,7 @@ - LoadingScreen() - is AuthState.SigningIn -> SigningInScreen(current.message) - is AuthState.SignedOut -> + AuthState.Loading -> { + LoadingScreen() + } + + is AuthState.SigningIn -> { + SigningInScreen(current.message) + } + + is AuthState.SignedOut -> { LoginScreen( state = current, onSignIn = { scope.launch { Auth.signIn() } }, ) + } - is AuthState.SignedIn -> MainScreen() + is AuthState.SignedIn -> { + MainScreen() + } } } } @@ -285,8 +294,7 @@ private fun FigmaNavItem( MaterialTheme.colorScheme.surface }, shape = RoundedCornerShape(999.dp), - ) - .padding(horizontal = 10.dp, vertical = 4.dp), + ).padding(horizontal = 10.dp, vertical = 4.dp), contentAlignment = Alignment.Center, ) { CompositionLocalProvider( diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/auth/ApiKeyAuth.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/auth/ApiKeyAuth.kt index 1ac4980..a27acdf 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/auth/ApiKeyAuth.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/auth/ApiKeyAuth.kt @@ -1,6 +1,9 @@ package hu.petrik.filcapp.api.auth -class ApiKeyAuth(private val location: String, val paramName: String) : Authentication { +class ApiKeyAuth( + private val location: String, + val paramName: String, +) : Authentication { var apiKey: String? = null var apiKeyPrefix: String? = null @@ -9,15 +12,10 @@ class ApiKeyAuth(private val location: String, val paramName: String) : Authenti headers: MutableMap, ) { val key: String = apiKey ?: return - val prefix: String? = apiKeyPrefix - val value: String = if (prefix != null) "$prefix $key" else key when (location) { - "query" -> query[paramName] = listOf(value) - "header" -> headers[paramName] = value - "cookie" -> { - val existing = headers["Cookie"] - headers["Cookie"] = if (existing != null) "$existing; $paramName=$value" else "$paramName=$value" - } + "cookie" -> Unit + "query" -> query[paramName] = listOf(key) + "header" -> headers[paramName] = key } } } diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/auth/HttpBearerAuth.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/auth/HttpBearerAuth.kt index 31a06d6..2b16246 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/auth/HttpBearerAuth.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/auth/HttpBearerAuth.kt @@ -1,6 +1,8 @@ package hu.petrik.filcapp.api.auth -class HttpBearerAuth(private val scheme: String?) : Authentication { +class HttpBearerAuth( + private val scheme: String?, +) : Authentication { var bearerToken: String? = null override fun apply( @@ -11,7 +13,5 @@ class HttpBearerAuth(private val scheme: String?) : Authentication { headers["Authorization"] = (if (scheme != null) upperCaseBearer(scheme)!! + " " else "") + token } - private fun upperCaseBearer(scheme: String): String? { - return if ("bearer".equals(scheme, ignoreCase = true)) "Bearer" else scheme - } + private fun upperCaseBearer(scheme: String): String? = if ("bearer".equals(scheme, ignoreCase = true)) "Bearer" else scheme } diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/APIKeysApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/APIKeysApi.kt new file mode 100644 index 0000000..000aca5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/APIKeysApi.kt @@ -0,0 +1,158 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetAdminApiKeys200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyIdRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class APIKeysApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Revoke any user's API key + * @param keyId + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteAdminApiKeysByKeyId(keyId: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/admin/api-keys/{keyId}".replace("{" + "keyId" + "}", "$keyId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List every user's API keys + * @param limit (optional, default to 20) + * @param offset (optional, default to 0) + * @param ownerId (optional) + * @param search (optional) + * @return GetAdminApiKeys200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getAdminApiKeys( + limit: kotlin.Double? = 20.toDouble(), + offset: kotlin.Double? = 0.toDouble(), + ownerId: kotlin.String? = null, + search: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + ownerId?.apply { localVariableQuery["ownerId"] = listOf("$ownerId") } + search?.apply { localVariableQuery["search"] = listOf("$search") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/admin/api-keys", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Enable or disable any user's API key + * @param keyId + * @param patchAdminApiKeysByKeyIdRequest + * @return PatchAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun patchAdminApiKeysByKeyId( + keyId: kotlin.String, + patchAdminApiKeysByKeyIdRequest: PatchAdminApiKeysByKeyIdRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = patchAdminApiKeysByKeyIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PATCH, + "/admin/api-keys/{keyId}".replace("{" + "keyId" + "}", "$keyId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/BugReportsApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/BugReportsApi.kt new file mode 100644 index 0000000..ebc89e1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/BugReportsApi.kt @@ -0,0 +1,217 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetBugReport200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200Response +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatusRequest +import hu.petrik.filcapp.api.model.PostBugReport201Response +import hu.petrik.filcapp.api.model.PostBugReportRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class BugReportsApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete a bug report + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteBugReportById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/bug-report/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * enum for parameter status + */ + @Serializable + enum class StatusGetBugReport( + val value: kotlin.String, + ) { + @SerialName(value = "open") + `open`("open"), + + @SerialName(value = "in_progress") + in_progress("in_progress"), + + @SerialName(value = "resolved") + resolved("resolved"), + + @SerialName(value = "closed") + closed("closed"), + } + + /** + * + * List bug reports with optional filters and paging + * @param dateFrom (optional) + * @param dateTo (optional) + * @param limit (optional, default to 20) + * @param page (optional, default to 1) + * @param search (optional) + * @param status (optional) + * @return GetBugReport200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getBugReport( + dateFrom: kotlin.String? = null, + dateTo: kotlin.String? = null, + limit: kotlin.Int? = 20, + page: kotlin.Int? = 1, + search: kotlin.String? = null, + status: StatusGetBugReport? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + dateFrom?.apply { localVariableQuery["dateFrom"] = listOf("$dateFrom") } + dateTo?.apply { localVariableQuery["dateTo"] = listOf("$dateTo") } + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + page?.apply { localVariableQuery["page"] = listOf("$page") } + search?.apply { localVariableQuery["search"] = listOf("$search") } + status?.apply { localVariableQuery["status"] = listOf("${ status.value }") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/bug-report", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a bug report status + * @param id + * @param patchBugReportByIdStatusRequest + * @return PatchBugReportByIdStatus200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun patchBugReportByIdStatus( + id: kotlin.String, + patchBugReportByIdStatusRequest: PatchBugReportByIdStatusRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = patchBugReportByIdStatusRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PATCH, + "/bug-report/{id}/status".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a new bug report + * @param postBugReportRequest + * @return PostBugReport201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postBugReport(postBugReportRequest: PostBugReportRequest): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postBugReportRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/bug-report", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/ClassroomApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/ClassroomApi.kt new file mode 100644 index 0000000..a265f85 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/ClassroomApi.kt @@ -0,0 +1,118 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetNavigatorClassrooms200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class ClassroomApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Get all classrooms from the database. + * @return GetNavigatorClassrooms200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableClassroomsGetAll(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/classrooms/getAll", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get classrooms that are free for a given date, day and period. + * @param date + * @param startingDay + * @param startingPeriod + * @param timetableId (optional) + * @return GetNavigatorClassrooms200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableClassroomsGetAvailable( + date: kotlin.String, + startingDay: kotlin.String, + startingPeriod: kotlin.String, + timetableId: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + date?.apply { localVariableQuery["date"] = listOf("$date") } + startingDay?.apply { localVariableQuery["startingDay"] = listOf("$startingDay") } + startingPeriod?.apply { localVariableQuery["startingPeriod"] = listOf("$startingPeriod") } + timetableId?.apply { localVariableQuery["timetableId"] = listOf("$timetableId") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/classrooms/getAvailable", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/CohortApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/CohortApi.kt index 9a30228..3a2aebf 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/CohortApi.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/CohortApi.kt @@ -16,8 +16,8 @@ package hu.petrik.filcapp.api.client import hu.petrik.filcapp.api.infrastructure.* -import hu.petrik.filcapp.api.model.ErrorResponse -import hu.petrik.filcapp.api.model.GetCohortsForTimetable200Response +import hu.petrik.filcapp.api.model.GetCohort200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine @@ -42,13 +42,13 @@ open class CohortApi : ApiClient { ) : super(baseUrl = baseUrl, httpClient = httpClient) /** - * List all cohorts * - * @return GetCohortsForTimetable200Response + * List all cohorts + * @return GetCohort200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getCohorts(): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") + open suspend fun getCohort(): HttpResponse { + val localVariableAuthNames = listOf() val localVariableBody = io.ktor.client.utils.EmptyContent @@ -62,7 +62,39 @@ open class CohortApi : ApiClient { "/cohort", query = localVariableQuery, headers = localVariableHeaders, - requiresAuthentication = true, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get cohorts for a given timetable from the database. + * @param timetableId + * @return GetCohort200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableCohortsGetAllForTimetableByTimetableId(timetableId: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/cohorts/getAllForTimetable/{timetableId}".replace("{" + "timetableId" + "}", "$timetableId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, ) return request( diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/DashboardApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/DashboardApi.kt new file mode 100644 index 0000000..ce2d0d7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/DashboardApi.kt @@ -0,0 +1,76 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetDashboardStats200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class DashboardApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Get aggregated dashboard statistics + * @param days (optional, default to 30) + * @return GetDashboardStats200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getDashboardStats(days: kotlin.Int? = 30): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + days?.apply { localVariableQuery["days"] = listOf("$days") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/dashboard/stats", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/DoorlockApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/DoorlockApi.kt new file mode 100644 index 0000000..c9fa532 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/DoorlockApi.kt @@ -0,0 +1,722 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetDoorlockCards200Response +import hu.petrik.filcapp.api.model.GetDoorlockCardsUsers200Response +import hu.petrik.filcapp.api.model.GetDoorlockDevices200Response +import hu.petrik.filcapp.api.model.GetDoorlockDevicesByIdStats200Response +import hu.petrik.filcapp.api.model.GetDoorlockLogs200Response +import hu.petrik.filcapp.api.model.GetDoorlockStatsOverview200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PostDoorlockCards201Response +import hu.petrik.filcapp.api.model.PostDoorlockCardsRequest +import hu.petrik.filcapp.api.model.PostDoorlockDevices201Response +import hu.petrik.filcapp.api.model.PostDoorlockDevicesByIdUpdate200Response +import hu.petrik.filcapp.api.model.PostDoorlockDevicesByIdUpdateRequest +import hu.petrik.filcapp.api.model.PostDoorlockDevicesRequest +import hu.petrik.filcapp.api.model.PostDoorlockDevicesUpdate200Response +import hu.petrik.filcapp.api.model.PostDoorlockSelfCardsByIdActivate200Response +import hu.petrik.filcapp.api.model.PostDoorlockSelfCardsByIdActivateRequest +import hu.petrik.filcapp.api.model.PutDoorlockCardsByIdRequest +import hu.petrik.filcapp.api.model.PutDoorlockDevicesByIdRequest +import hu.petrik.filcapp.api.model.PutDoorlockSelfCardsByIdFrozenRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class DoorlockApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete an access card + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteDoorlockCardsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/doorlock/cards/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a doorlock device + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteDoorlockDevicesById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/doorlock/devices/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List all access cards + * @return GetDoorlockCards200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getDoorlockCards(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/doorlock/cards", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List users eligible for card ownership + * @return GetDoorlockCardsUsers200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getDoorlockCardsUsers(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/doorlock/cards/users", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List all doorlock devices + * @return GetDoorlockDevices200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getDoorlockDevices(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/doorlock/devices", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get device health statistics + * @param id + * @return GetDoorlockDevicesByIdStats200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getDoorlockDevicesByIdStats(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/doorlock/devices/{id}/stats".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * enum for parameter granted + */ + @Serializable + enum class GrantedGetDoorlockLogs( + val value: kotlin.String, + ) { + @SerialName(value = "true") + `true`("true"), + + @SerialName(value = "false") + `false`("false"), + } + + /** + * + * List audit log entries + * @param cardId (optional) + * @param deviceId (optional) + * @param from (optional) + * @param granted (optional) + * @param limit (optional, default to 500) + * @param search (optional) + * @param to (optional) + * @param userId (optional) + * @return GetDoorlockLogs200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getDoorlockLogs( + cardId: kotlin.String? = null, + deviceId: kotlin.String? = null, + from: kotlin.String? = null, + granted: GrantedGetDoorlockLogs? = null, + limit: kotlin.Int? = 500, + search: kotlin.String? = null, + to: kotlin.String? = null, + userId: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + cardId?.apply { localVariableQuery["cardId"] = listOf("$cardId") } + deviceId?.apply { localVariableQuery["deviceId"] = listOf("$deviceId") } + from?.apply { localVariableQuery["from"] = listOf("$from") } + granted?.apply { localVariableQuery["granted"] = listOf("${ granted.value }") } + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + search?.apply { localVariableQuery["search"] = listOf("$search") } + to?.apply { localVariableQuery["to"] = listOf("$to") } + userId?.apply { localVariableQuery["userId"] = listOf("$userId") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/doorlock/logs", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * enum for parameter granted + */ + @Serializable + enum class GrantedGetDoorlockLogsExport( + val value: kotlin.String, + ) { + @SerialName(value = "true") + `true`("true"), + + @SerialName(value = "false") + `false`("false"), + } + + /** + * + * Export doorlock audit log entries (attendance data) as a CSV file over an optional date range. + * @param cardId (optional) + * @param deviceId (optional) + * @param from (optional) + * @param granted (optional) + * @param search (optional) + * @param to (optional) + * @param userId (optional) + * @return kotlin.String + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getDoorlockLogsExport( + cardId: kotlin.String? = null, + deviceId: kotlin.String? = null, + from: kotlin.String? = null, + granted: GrantedGetDoorlockLogsExport? = null, + search: kotlin.String? = null, + to: kotlin.String? = null, + userId: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + cardId?.apply { localVariableQuery["cardId"] = listOf("$cardId") } + deviceId?.apply { localVariableQuery["deviceId"] = listOf("$deviceId") } + from?.apply { localVariableQuery["from"] = listOf("$from") } + granted?.apply { localVariableQuery["granted"] = listOf("${ granted.value }") } + search?.apply { localVariableQuery["search"] = listOf("$search") } + to?.apply { localVariableQuery["to"] = listOf("$to") } + userId?.apply { localVariableQuery["userId"] = listOf("$userId") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/doorlock/logs/export", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List cards owned by the authenticated user + * @return GetDoorlockCards200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getDoorlockSelfCards(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/doorlock/self/cards", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get aggregated doorlock statistics + * @return GetDoorlockStatsOverview200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getDoorlockStatsOverview(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/doorlock/stats/overview", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a new access card + * @param postDoorlockCardsRequest + * @return PostDoorlockCards201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postDoorlockCards(postDoorlockCardsRequest: PostDoorlockCardsRequest): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postDoorlockCardsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/doorlock/cards", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a new doorlock device + * @param postDoorlockDevicesRequest + * @return PostDoorlockDevices201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postDoorlockDevices( + postDoorlockDevicesRequest: PostDoorlockDevicesRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postDoorlockDevicesRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/doorlock/devices", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Trigger an OTA update on a specific device + * @param id + * @param postDoorlockDevicesByIdUpdateRequest + * @return PostDoorlockDevicesByIdUpdate200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postDoorlockDevicesByIdUpdate( + id: kotlin.String, + postDoorlockDevicesByIdUpdateRequest: PostDoorlockDevicesByIdUpdateRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postDoorlockDevicesByIdUpdateRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/doorlock/devices/{id}/update".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Trigger an OTA update on all devices + * @param postDoorlockDevicesByIdUpdateRequest + * @return PostDoorlockDevicesUpdate200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postDoorlockDevicesUpdate( + postDoorlockDevicesByIdUpdateRequest: PostDoorlockDevicesByIdUpdateRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postDoorlockDevicesByIdUpdateRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/doorlock/devices/update", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Activate an authorized device using a user-owned virtual card + * @param id + * @param postDoorlockSelfCardsByIdActivateRequest (optional) + * @return PostDoorlockSelfCardsByIdActivate200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postDoorlockSelfCardsByIdActivate( + id: kotlin.String, + postDoorlockSelfCardsByIdActivateRequest: PostDoorlockSelfCardsByIdActivateRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postDoorlockSelfCardsByIdActivateRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/doorlock/self/cards/{id}/activate".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update an access card + * @param id + * @param putDoorlockCardsByIdRequest + * @return PostDoorlockCards201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putDoorlockCardsById( + id: kotlin.String, + putDoorlockCardsByIdRequest: PutDoorlockCardsByIdRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putDoorlockCardsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/doorlock/cards/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update an existing doorlock device + * @param id + * @param putDoorlockDevicesByIdRequest + * @return PostDoorlockDevices201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putDoorlockDevicesById( + id: kotlin.String, + putDoorlockDevicesByIdRequest: PutDoorlockDevicesByIdRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putDoorlockDevicesByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/doorlock/devices/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update the frozen state of a user-owned card + * @param id + * @param putDoorlockSelfCardsByIdFrozenRequest + * @return PostDoorlockCards201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putDoorlockSelfCardsByIdFrozen( + id: kotlin.String, + putDoorlockSelfCardsByIdFrozenRequest: PutDoorlockSelfCardsByIdFrozenRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putDoorlockSelfCardsByIdFrozenRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/doorlock/self/cards/{id}/frozen".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/GroupApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/GroupApi.kt new file mode 100644 index 0000000..8e3864e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/GroupApi.kt @@ -0,0 +1,112 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetTimetableGroupsGetForCohortByCohortId200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PostTimetableGroupsSelect200Response +import hu.petrik.filcapp.api.model.PostTimetableGroupsSelectRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class GroupApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Get the groups of a cohort, marking the current user selection. + * @param cohortId + * @return GetTimetableGroupsGetForCohortByCohortId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableGroupsGetForCohortByCohortId( + cohortId: kotlin.String, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/groups/getForCohort/{cohortId}".replace("{" + "cohortId" + "}", "$cohortId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Select the group the current user belongs to for a division. Replaces any previous membership in that division. + * @param postTimetableGroupsSelectRequest + * @return PostTimetableGroupsSelect200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postTimetableGroupsSelect( + postTimetableGroupsSelectRequest: PostTimetableGroupsSelectRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postTimetableGroupsSelectRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/timetable/groups/select", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/HealthApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/HealthApi.kt new file mode 100644 index 0000000..d584ab1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/HealthApi.kt @@ -0,0 +1,74 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetHealth200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class HealthApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Readiness probe: answers 200 only when PostgreSQL is reachable. + * @return GetHealth200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getHealth(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/health", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/ImportApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/ImportApi.kt new file mode 100644 index 0000000..42510b3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/ImportApi.kt @@ -0,0 +1,77 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PostDoorlockDevicesByIdUpdate200Response +import hu.petrik.filcapp.api.model.PostTimetableImportRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class ImportApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Import a timetable from an Oman or aSc 2012 XML file. + * @param postTimetableImportRequest + * @return PostDoorlockDevicesByIdUpdate200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postTimetableImport( + postTimetableImportRequest: PostTimetableImportRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postTimetableImportRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/timetable/import", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/KioskApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/KioskApi.kt new file mode 100644 index 0000000..d1d8e3b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/KioskApi.kt @@ -0,0 +1,375 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetKiosk200Response +import hu.petrik.filcapp.api.model.GetKioskNews200Response +import hu.petrik.filcapp.api.model.GetKioskPetrikNews200Response +import hu.petrik.filcapp.api.model.GetKioskWeather200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PostKiosk201Response +import hu.petrik.filcapp.api.model.PostKioskDepartures200Response +import hu.petrik.filcapp.api.model.PostKioskDeparturesRequest +import hu.petrik.filcapp.api.model.PostKioskHeartbeat200Response +import hu.petrik.filcapp.api.model.PostKioskHeartbeatRequest +import hu.petrik.filcapp.api.model.PostKioskRequest +import hu.petrik.filcapp.api.model.PutKioskByIdRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class KioskApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete a kiosk + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteKioskById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/kiosk/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List all kiosks + * @return GetKiosk200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getKiosk(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/kiosk", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Active, titled, non-cohort-scoped announcements for the TV kiosk marquee + * @return GetKioskNews200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getKioskNews(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/kiosk/news", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * The image an announcement shows on the kiosk, as stored + * @param id + * @return kotlin.String + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getKioskNewsByIdImage(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/kiosk/news/{id}/image".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * petrik.hu news for the navigator kiosk, cached for ten minutes + * @param machine (optional) + * @return GetKioskPetrikNews200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getKioskPetrikNews(machine: kotlin.String? = null): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + machine?.apply { localVariableQuery["machine"] = listOf("$machine") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/kiosk/petrik-news", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Current weather for the TV kiosk, cached for ten minutes + * @return GetKioskWeather200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getKioskWeather(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/kiosk/weather", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Register a kiosk + * @param postKioskRequest + * @return PostKiosk201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postKiosk(postKioskRequest: PostKioskRequest): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postKioskRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/kiosk", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Next departure per configured group, trying each stop in order + * @param postKioskDeparturesRequest + * @return PostKioskDepartures200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postKioskDepartures( + postKioskDeparturesRequest: PostKioskDeparturesRequest, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = postKioskDeparturesRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/kiosk/departures", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Record a kiosk heartbeat and report whether the box is registered and enabled + * @param postKioskHeartbeatRequest + * @return PostKioskHeartbeat200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postKioskHeartbeat(postKioskHeartbeatRequest: PostKioskHeartbeatRequest): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = postKioskHeartbeatRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/kiosk/heartbeat", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a kiosk + * @param id + * @param putKioskByIdRequest (optional) + * @return PostKiosk201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putKioskById( + id: kotlin.String, + putKioskByIdRequest: PutKioskByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putKioskByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/kiosk/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/LessonApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/LessonApi.kt new file mode 100644 index 0000000..1cee6c4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/LessonApi.kt @@ -0,0 +1,259 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200Response +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForIdByLessonId200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachers200Response +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachersRequest +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetSubstitutionCandidates200Response +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetSubstitutionCandidatesRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class LessonApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Get lessons for a given cohort from the database. + * @param cohortId + * @param timetableId (optional) + * @return GetTimetableLessonsGetForCohortByCohortId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableLessonsGetForCohortByCohortId( + cohortId: kotlin.String, + timetableId: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + timetableId?.apply { localVariableQuery["timetableId"] = listOf("$timetableId") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/lessons/getForCohort/{cohortId}".replace("{" + "cohortId" + "}", "$cohortId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get a lesson by its ID from the database. + * @param lessonId + * @return GetTimetableLessonsGetForIdByLessonId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableLessonsGetForIdByLessonId( + lessonId: kotlin.String, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/lessons/getForId/{lessonId}".replace("{" + "lessonId" + "}", "$lessonId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get lessons for a given classroom from the database. + * @param classroomId + * @param timetableId (optional) + * @return GetTimetableLessonsGetForCohortByCohortId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableLessonsGetForRoomByClassroomId( + classroomId: kotlin.String, + timetableId: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + timetableId?.apply { localVariableQuery["timetableId"] = listOf("$timetableId") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/lessons/getForRoom/{classroomId}".replace("{" + "classroomId" + "}", "$classroomId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get lessons for a given teacher from the database. + * @param teacherId + * @param timetableId (optional) + * @return GetTimetableLessonsGetForCohortByCohortId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableLessonsGetForTeacherByTeacherId( + teacherId: kotlin.String, + timetableId: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + timetableId?.apply { localVariableQuery["timetableId"] = listOf("$timetableId") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/lessons/getForTeacher/{teacherId}".replace("{" + "teacherId" + "}", "$teacherId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get lessons for multiple teachers in a single request. + * @param postTimetableLessonsGetForTeachersRequest + * @return PostTimetableLessonsGetForTeachers200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postTimetableLessonsGetForTeachers( + postTimetableLessonsGetForTeachersRequest: PostTimetableLessonsGetForTeachersRequest, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = postTimetableLessonsGetForTeachersRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/timetable/lessons/getForTeachers", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get available lessons and substitute teacher candidates for substitution editing in one request. + * @param postTimetableLessonsGetSubstitutionCandidatesRequest + * @return PostTimetableLessonsGetSubstitutionCandidates200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postTimetableLessonsGetSubstitutionCandidates( + postTimetableLessonsGetSubstitutionCandidatesRequest: PostTimetableLessonsGetSubstitutionCandidatesRequest, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = postTimetableLessonsGetSubstitutionCandidatesRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/timetable/lessons/getSubstitutionCandidates", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/MovedLessonApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/MovedLessonApi.kt new file mode 100644 index 0000000..6c67bcf --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/MovedLessonApi.kt @@ -0,0 +1,314 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetTimetableMovedLessons200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PostTimetableMovedLessons200Response +import hu.petrik.filcapp.api.model.PostTimetableMovedLessonsRequest +import hu.petrik.filcapp.api.model.PutTimetableMovedLessonsByIdRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class MovedLessonApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete a moved lesson + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteTimetableMovedLessonsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/timetable/movedLessons/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get all moved lessons. + * @return GetTimetableMovedLessons200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableMovedLessons(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/movedLessons", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get all moved lessons for a cohort. + * @param cohortId + * @return GetTimetableMovedLessons200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableMovedLessonsCohortByCohortId(cohortId: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/movedLessons/cohort/{cohortId}".replace("{" + "cohortId" + "}", "$cohortId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get all relevant moved lessons for a given cohort. + * @param cohortId + * @return GetTimetableMovedLessons200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableMovedLessonsCohortByCohortIdRelevant( + cohortId: kotlin.String, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/movedLessons/cohort/{cohortId}/relevant".replace("{" + "cohortId" + "}", "$cohortId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Export moved lessons as a CSV file over an optional date range. + * @param from (optional) + * @param to (optional) + * @return kotlin.String + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableMovedLessonsExport( + from: kotlin.String? = null, + to: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + from?.apply { localVariableQuery["from"] = listOf("$from") } + to?.apply { localVariableQuery["to"] = listOf("$to") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/movedLessons/export", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get relevant moved lessons for the active timetable. + * @return GetTimetableMovedLessons200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableMovedLessonsRelevant(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/movedLessons/relevant", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a moved lesson. + * @param postTimetableMovedLessonsRequest + * @return PostTimetableMovedLessons200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postTimetableMovedLessons( + postTimetableMovedLessonsRequest: PostTimetableMovedLessonsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postTimetableMovedLessonsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/timetable/movedLessons", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a moved lesson. + * @param id + * @param putTimetableMovedLessonsByIdRequest (optional) + * @return PostTimetableMovedLessons200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putTimetableMovedLessonsById( + id: kotlin.String, + putTimetableMovedLessonsByIdRequest: PutTimetableMovedLessonsByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putTimetableMovedLessonsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/timetable/movedLessons/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NavigatorApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NavigatorApi.kt new file mode 100644 index 0000000..31a7890 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NavigatorApi.kt @@ -0,0 +1,1176 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteNavigatorBuildingsById200Response +import hu.petrik.filcapp.api.model.GetNavigatorBuildings200Response +import hu.petrik.filcapp.api.model.GetNavigatorClassroomTypes200Response +import hu.petrik.filcapp.api.model.GetNavigatorClassrooms200Response +import hu.petrik.filcapp.api.model.GetNavigatorCorridors200Response +import hu.petrik.filcapp.api.model.GetNavigatorGraph200Response +import hu.petrik.filcapp.api.model.GetNavigatorLifts200Response +import hu.petrik.filcapp.api.model.GetNavigatorLifts200ResponseItemsInner +import hu.petrik.filcapp.api.model.GetNavigatorStairs200Response +import hu.petrik.filcapp.api.model.GetNavigatorStairs200ResponseItemsInner +import hu.petrik.filcapp.api.model.GetNavigatorTranslations200Response +import hu.petrik.filcapp.api.model.GetNavigatorTranslationsAvailable200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PostNavigatorBuildings201Response +import hu.petrik.filcapp.api.model.PostNavigatorBuildingsRequest +import hu.petrik.filcapp.api.model.PostNavigatorClassroomTypes201Response +import hu.petrik.filcapp.api.model.PostNavigatorClassroomTypesRequest +import hu.petrik.filcapp.api.model.PostNavigatorClassrooms201Response +import hu.petrik.filcapp.api.model.PostNavigatorClassroomsRequest +import hu.petrik.filcapp.api.model.PostNavigatorCorridors201Response +import hu.petrik.filcapp.api.model.PostNavigatorCorridorsRequest +import hu.petrik.filcapp.api.model.PostNavigatorImport200Response +import hu.petrik.filcapp.api.model.PostNavigatorImportRequest +import hu.petrik.filcapp.api.model.PostNavigatorLiftsRequest +import hu.petrik.filcapp.api.model.PostNavigatorStairsRequest +import hu.petrik.filcapp.api.model.PostNavigatorTranslations201Response +import hu.petrik.filcapp.api.model.PostNavigatorTranslations201ResponseItemsInner +import hu.petrik.filcapp.api.model.PostNavigatorTranslationsRequest +import hu.petrik.filcapp.api.model.PutNavigatorBuildingsByIdRequest +import hu.petrik.filcapp.api.model.PutNavigatorClassroomTypesByIdRequest +import hu.petrik.filcapp.api.model.PutNavigatorClassroomsById200Response +import hu.petrik.filcapp.api.model.PutNavigatorClassroomsByIdRequest +import hu.petrik.filcapp.api.model.PutNavigatorCorridorsByIdRequest +import hu.petrik.filcapp.api.model.PutNavigatorLiftsByIdRequest +import hu.petrik.filcapp.api.model.PutNavigatorStairsByIdRequest +import hu.petrik.filcapp.api.model.PutNavigatorTranslationsByLangByKeyRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class NavigatorApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete a campus building; its corridors, lifts and stairs cascade with it, but rooms still assigned to it refuse the delete + * @param id + * @return DeleteNavigatorBuildingsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNavigatorBuildingsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/navigator/buildings/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a classroom type; types still assigned to a classroom are refused + * @param id + * @return DeleteNavigatorBuildingsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNavigatorClassroomTypesById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/navigator/classroom-types/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a classroom; rooms the timetable still uses are refused + * @param id + * @return DeleteNavigatorBuildingsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNavigatorClassroomsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/navigator/classrooms/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a corridor + * @param id + * @return DeleteNavigatorBuildingsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNavigatorCorridorsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/navigator/corridors/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a lift + * @param id + * @return DeleteNavigatorBuildingsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNavigatorLiftsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/navigator/lifts/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a staircase + * @param id + * @return DeleteNavigatorBuildingsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNavigatorStairsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/navigator/stairs/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete one codename in one language + * @param lang + * @param key + * @return DeleteNavigatorBuildingsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNavigatorTranslationsByLangByKey( + lang: kotlin.String, + key: kotlin.String, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/navigator/translations/{lang}/{key}".replace("{" + "lang" + "}", "$lang").replace("{" + "key" + "}", "$key"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List the campus buildings + * @return GetNavigatorBuildings200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorBuildings(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/buildings", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List the classroom types + * @return GetNavigatorClassroomTypes200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorClassroomTypes(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/classroom-types", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List the classrooms, including the ones the campus has not placed yet + * @return GetNavigatorClassrooms200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorClassrooms(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/classrooms", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List the corridors + * @return GetNavigatorCorridors200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorCorridors(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/corridors", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Export every navigator row (buildings, classroom types, classrooms, corridors, lifts, stairs and translations) as a versioned JSON payload. + * @return kotlin.String + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorExport(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/export", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * The whole campus graph in the upstream wire format, without a session. Only rows the campus has placed on the map appear. + * @return GetNavigatorGraph200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorGraph(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/graph", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List the lifts + * @return GetNavigatorLifts200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorLifts(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/lifts", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List the staircases + * @return GetNavigatorStairs200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorStairs(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/stairs", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List every translation row + * @return GetNavigatorTranslations200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorTranslations(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/translations", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List the languages the campus translations exist in + * @return GetNavigatorTranslationsAvailable200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorTranslationsAvailable(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/translations/available", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * One language as a flat `text_key -> text` bundle, without a session + * @param lang + * @return kotlin.collections.Map + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNavigatorTranslationsLang(lang: kotlin.String): HttpResponse> { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + lang?.apply { localVariableQuery["lang"] = listOf("$lang") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/navigator/translations/lang", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap().map { value } + } + + @Serializable(GetNavigatorTranslationsLangResponse.Companion::class) + private class GetNavigatorTranslationsLangResponse( + val value: Map, + ) { + companion object : KSerializer { + private val serializer: KSerializer> = serializer>() + override val descriptor = serializer.descriptor + + override fun serialize( + encoder: Encoder, + value: GetNavigatorTranslationsLangResponse, + ) = serializer.serialize(encoder, value.value) + + override fun deserialize(decoder: Decoder) = GetNavigatorTranslationsLangResponse(serializer.deserialize(decoder)) + } + } + + /** + * + * Create a campus building + * @param postNavigatorBuildingsRequest + * @return PostNavigatorBuildings201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNavigatorBuildings( + postNavigatorBuildingsRequest: PostNavigatorBuildingsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNavigatorBuildingsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/navigator/buildings", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a classroom type + * @param postNavigatorClassroomTypesRequest + * @return PostNavigatorClassroomTypes201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNavigatorClassroomTypes( + postNavigatorClassroomTypesRequest: PostNavigatorClassroomTypesRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNavigatorClassroomTypesRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/navigator/classroom-types", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a classroom + * @param postNavigatorClassroomsRequest + * @return PostNavigatorClassrooms201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNavigatorClassrooms( + postNavigatorClassroomsRequest: PostNavigatorClassroomsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNavigatorClassroomsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/navigator/classrooms", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a corridor + * @param postNavigatorCorridorsRequest + * @return PostNavigatorCorridors201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNavigatorCorridors( + postNavigatorCorridorsRequest: PostNavigatorCorridorsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNavigatorCorridorsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/navigator/corridors", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Insert or update every collection in a navigator export payload by its key, inside one transaction. Rows absent from the payload are never deleted. + * @param postNavigatorImportRequest + * @return PostNavigatorImport200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNavigatorImport( + postNavigatorImportRequest: PostNavigatorImportRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNavigatorImportRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/navigator/import", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a lift + * @param postNavigatorLiftsRequest + * @return GetNavigatorLifts200ResponseItemsInner + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNavigatorLifts( + postNavigatorLiftsRequest: PostNavigatorLiftsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNavigatorLiftsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/navigator/lifts", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a staircase + * @param postNavigatorStairsRequest + * @return GetNavigatorStairs200ResponseItemsInner + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNavigatorStairs( + postNavigatorStairsRequest: PostNavigatorStairsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNavigatorStairsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/navigator/stairs", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create or replace one codename across every given language + * @param postNavigatorTranslationsRequest + * @return PostNavigatorTranslations201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNavigatorTranslations( + postNavigatorTranslationsRequest: PostNavigatorTranslationsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNavigatorTranslationsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/navigator/translations", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a campus building + * @param id + * @param putNavigatorBuildingsByIdRequest (optional) + * @return PostNavigatorBuildings201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putNavigatorBuildingsById( + id: kotlin.String, + putNavigatorBuildingsByIdRequest: PutNavigatorBuildingsByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putNavigatorBuildingsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/navigator/buildings/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a classroom type + * @param id + * @param putNavigatorClassroomTypesByIdRequest (optional) + * @return PostNavigatorClassroomTypes201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putNavigatorClassroomTypesById( + id: kotlin.String, + putNavigatorClassroomTypesByIdRequest: PutNavigatorClassroomTypesByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putNavigatorClassroomTypesByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/navigator/classroom-types/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a classroom + * @param id + * @param putNavigatorClassroomsByIdRequest (optional) + * @return PutNavigatorClassroomsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putNavigatorClassroomsById( + id: kotlin.String, + putNavigatorClassroomsByIdRequest: PutNavigatorClassroomsByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putNavigatorClassroomsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/navigator/classrooms/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a corridor + * @param id + * @param putNavigatorCorridorsByIdRequest (optional) + * @return PostNavigatorCorridors201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putNavigatorCorridorsById( + id: kotlin.String, + putNavigatorCorridorsByIdRequest: PutNavigatorCorridorsByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putNavigatorCorridorsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/navigator/corridors/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a lift + * @param id + * @param putNavigatorLiftsByIdRequest (optional) + * @return GetNavigatorLifts200ResponseItemsInner + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putNavigatorLiftsById( + id: kotlin.String, + putNavigatorLiftsByIdRequest: PutNavigatorLiftsByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putNavigatorLiftsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/navigator/lifts/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a staircase + * @param id + * @param putNavigatorStairsByIdRequest (optional) + * @return GetNavigatorStairs200ResponseItemsInner + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putNavigatorStairsById( + id: kotlin.String, + putNavigatorStairsByIdRequest: PutNavigatorStairsByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putNavigatorStairsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/navigator/stairs/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Write the text of one codename in one language + * @param lang + * @param key + * @param putNavigatorTranslationsByLangByKeyRequest + * @return PostNavigatorTranslations201ResponseItemsInner + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putNavigatorTranslationsByLangByKey( + lang: kotlin.String, + key: kotlin.String, + putNavigatorTranslationsByLangByKeyRequest: PutNavigatorTranslationsByLangByKeyRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putNavigatorTranslationsByLangByKeyRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/navigator/translations/{lang}/{key}".replace("{" + "lang" + "}", "$lang").replace("{" + "key" + "}", "$key"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NewsAnnouncementsApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NewsAnnouncementsApi.kt new file mode 100644 index 0000000..4375870 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NewsAnnouncementsApi.kt @@ -0,0 +1,297 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetNewsAnnouncements200Response +import hu.petrik.filcapp.api.model.GetNewsAnnouncementsById200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchNewsAnnouncementsById200Response +import hu.petrik.filcapp.api.model.PatchNewsAnnouncementsByIdRequest +import hu.petrik.filcapp.api.model.PostNavigatorImportRequest +import hu.petrik.filcapp.api.model.PostNewsAnnouncements201Response +import hu.petrik.filcapp.api.model.PostNewsAnnouncementsRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class NewsAnnouncementsApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete an announcement + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNewsAnnouncementsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/news/announcements/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete the image attached to an announcement + * @param id + * @return PatchNewsAnnouncementsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNewsAnnouncementsByIdImage(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/news/announcements/{id}/image".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List active announcements within date range, cohort-filtered by default; includeAll=true returns everything + * @param limit (optional, default to 20) + * @param offset (optional, default to 0) + * @param includeAll (optional, default to "false") + * @param includeExpired (optional, default to "false") + * @param includeKioskOnly (optional, default to "false") + * @return GetNewsAnnouncements200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNewsAnnouncements( + limit: kotlin.Int? = 20, + offset: kotlin.Int? = 0, + includeAll: kotlin.String? = "false", + includeExpired: kotlin.String? = "false", + includeKioskOnly: kotlin.String? = "false", + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + includeAll?.apply { localVariableQuery["includeAll"] = listOf("$includeAll") } + includeExpired?.apply { localVariableQuery["includeExpired"] = listOf("$includeExpired") } + includeKioskOnly?.apply { localVariableQuery["includeKioskOnly"] = listOf("$includeKioskOnly") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/news/announcements", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get a single announcement by ID + * @param id + * @return GetNewsAnnouncementsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNewsAnnouncementsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/news/announcements/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update an existing announcement + * @param id + * @param patchNewsAnnouncementsByIdRequest (optional) + * @return PatchNewsAnnouncementsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun patchNewsAnnouncementsById( + id: kotlin.String, + patchNewsAnnouncementsByIdRequest: PatchNewsAnnouncementsByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = patchNewsAnnouncementsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PATCH, + "/news/announcements/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a new announcement + * @param postNewsAnnouncementsRequest + * @return PostNewsAnnouncements201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNewsAnnouncements( + postNewsAnnouncementsRequest: PostNewsAnnouncementsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNewsAnnouncementsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/news/announcements", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Upload the image this announcement shows on the kiosk + * @param id + * @param postNavigatorImportRequest + * @return PatchNewsAnnouncementsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNewsAnnouncementsByIdImage( + id: kotlin.String, + postNavigatorImportRequest: PostNavigatorImportRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNavigatorImportRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/news/announcements/{id}/image".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NewsBlogsApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NewsBlogsApi.kt new file mode 100644 index 0000000..a31d0bb --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NewsBlogsApi.kt @@ -0,0 +1,352 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetNewsBlogs200Response +import hu.petrik.filcapp.api.model.GetNewsBlogsBySlug200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchNewsBlogsById200Response +import hu.petrik.filcapp.api.model.PatchNewsBlogsByIdRequest +import hu.petrik.filcapp.api.model.PostNewsBlogs201Response +import hu.petrik.filcapp.api.model.PostNewsBlogsRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class NewsBlogsApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete a blog post + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNewsBlogsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/news/blogs/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List published blog posts (public, no auth required) + * @param limit (optional, default to 20) + * @param offset (optional, default to 0) + * @return GetNewsBlogs200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNewsBlogs( + limit: kotlin.Int? = 20, + offset: kotlin.Int? = 0, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/news/blogs", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get a published blog post by slug (public, no auth required) + * @param slug + * @return GetNewsBlogsBySlug200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNewsBlogsBySlug(slug: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/news/blogs/{slug}".replace("{" + "slug" + "}", "$slug"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List all blog posts including drafts (requires permission) + * @param limit (optional, default to 20) + * @param offset (optional, default to 0) + * @return GetNewsBlogs200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNewsBlogsDrafts( + limit: kotlin.Int? = 20, + offset: kotlin.Int? = 0, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/news/blogs/drafts", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get any blog post by ID including drafts (requires permission) + * @param id + * @return GetNewsBlogsBySlug200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNewsBlogsIdById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/news/blogs/id/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a blog post + * @param id + * @param patchNewsBlogsByIdRequest (optional) + * @return PatchNewsBlogsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun patchNewsBlogsById( + id: kotlin.String, + patchNewsBlogsByIdRequest: PatchNewsBlogsByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = patchNewsBlogsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PATCH, + "/news/blogs/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a new blog post (defaults to draft) + * @param postNewsBlogsRequest + * @return PostNewsBlogs201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNewsBlogs(postNewsBlogsRequest: PostNewsBlogsRequest): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNewsBlogsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/news/blogs", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Publish a blog post (draft → published) + * @param id + * @return PatchNewsBlogsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNewsBlogsByIdPublish(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/news/blogs/{id}/publish".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Unpublish a blog post (published → draft) + * @param id + * @return PatchNewsBlogsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNewsBlogsByIdUnpublish(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/news/blogs/{id}/unpublish".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NewsSystemMessagesApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NewsSystemMessagesApi.kt new file mode 100644 index 0000000..b29df33 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NewsSystemMessagesApi.kt @@ -0,0 +1,229 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetNewsSystemMessages200Response +import hu.petrik.filcapp.api.model.GetNewsSystemMessagesById200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchNewsSystemMessagesById200Response +import hu.petrik.filcapp.api.model.PatchNewsSystemMessagesByIdRequest +import hu.petrik.filcapp.api.model.PostNewsSystemMessages201Response +import hu.petrik.filcapp.api.model.PostNewsSystemMessagesRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class NewsSystemMessagesApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete a system message + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNewsSystemMessagesById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/news/system-messages/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List active system messages within date range, filtered by user cohort + * @param limit (optional, default to 20) + * @param offset (optional, default to 0) + * @param includeAll (optional, default to "false") + * @param includeExpired (optional, default to "false") + * @param includeKioskOnly (optional, default to "false") + * @return GetNewsSystemMessages200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNewsSystemMessages( + limit: kotlin.Int? = 20, + offset: kotlin.Int? = 0, + includeAll: kotlin.String? = "false", + includeExpired: kotlin.String? = "false", + includeKioskOnly: kotlin.String? = "false", + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + includeAll?.apply { localVariableQuery["includeAll"] = listOf("$includeAll") } + includeExpired?.apply { localVariableQuery["includeExpired"] = listOf("$includeExpired") } + includeKioskOnly?.apply { localVariableQuery["includeKioskOnly"] = listOf("$includeKioskOnly") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/news/system-messages", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get a single system message by ID + * @param id + * @return GetNewsSystemMessagesById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNewsSystemMessagesById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/news/system-messages/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update an existing system message + * @param id + * @param patchNewsSystemMessagesByIdRequest (optional) + * @return PatchNewsSystemMessagesById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun patchNewsSystemMessagesById( + id: kotlin.String, + patchNewsSystemMessagesByIdRequest: PatchNewsSystemMessagesByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = patchNewsSystemMessagesByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PATCH, + "/news/system-messages/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a new system message + * @param postNewsSystemMessagesRequest + * @return PostNewsSystemMessages201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNewsSystemMessages( + postNewsSystemMessagesRequest: PostNewsSystemMessagesRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNewsSystemMessagesRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/news/system-messages", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NotificationsApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NotificationsApi.kt new file mode 100644 index 0000000..57207ea --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/NotificationsApi.kt @@ -0,0 +1,437 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetNotifications200Response +import hu.petrik.filcapp.api.model.GetNotificationsSettings200Response +import hu.petrik.filcapp.api.model.GetNotificationsUnreadCount200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchNotificationsSettingsRequest +import hu.petrik.filcapp.api.model.PostDoorlockDevicesByIdUpdate200Response +import hu.petrik.filcapp.api.model.PostNotificationsByIdRead200Response +import hu.petrik.filcapp.api.model.PostNotificationsFcmTokensRequest +import hu.petrik.filcapp.api.model.PostNotificationsTestPreview200Response +import hu.petrik.filcapp.api.model.PostNotificationsTestPreviewRequest +import hu.petrik.filcapp.api.model.PostNotificationsTestSend200Response +import hu.petrik.filcapp.api.model.PostNotificationsTestSendRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class NotificationsApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Unregister a push (FCM) token + * @param token + * @return PostDoorlockDevicesByIdUpdate200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteNotificationsFcmTokensByToken(token: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/notifications/fcm-tokens/{token}".replace("{" + "token" + "}", "$token"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * enum for parameter unread + */ + @Serializable + enum class UnreadGetNotifications( + val value: kotlin.String, + ) { + @SerialName(value = "true") + `true`("true"), + + @SerialName(value = "false") + `false`("false"), + } + + /** + * + * List the signed-in user's notifications + * @param dateFrom (optional) + * @param dateTo (optional) + * @param limit (optional, default to 20) + * @param offset (optional, default to 0) + * @param type (optional) + * @param unread (optional) + * @return GetNotifications200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNotifications( + dateFrom: kotlin.String? = null, + dateTo: kotlin.String? = null, + limit: kotlin.Double? = 20.toDouble(), + offset: kotlin.Double? = 0.toDouble(), + type: kotlin.String? = null, + unread: UnreadGetNotifications? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + dateFrom?.apply { localVariableQuery["dateFrom"] = listOf("$dateFrom") } + dateTo?.apply { localVariableQuery["dateTo"] = listOf("$dateTo") } + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + type?.apply { localVariableQuery["type"] = listOf("$type") } + unread?.apply { localVariableQuery["unread"] = listOf("${ unread.value }") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/notifications", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Read the notification preferences of the signed-in user + * @return GetNotificationsSettings200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNotificationsSettings(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/notifications/settings", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Count the signed-in user's unread notifications + * @return GetNotificationsUnreadCount200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getNotificationsUnreadCount(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/notifications/unread-count", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update the notification preferences of the signed-in user + * @param patchNotificationsSettingsRequest + * @return GetNotificationsSettings200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun patchNotificationsSettings( + patchNotificationsSettingsRequest: PatchNotificationsSettingsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = patchNotificationsSettingsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PATCH, + "/notifications/settings", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Mark one notification as read + * @param id + * @return PostNotificationsByIdRead200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNotificationsByIdRead(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/notifications/{id}/read".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Register a push (FCM) token for the signed-in user + * @param postNotificationsFcmTokensRequest + * @return PostDoorlockDevicesByIdUpdate200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNotificationsFcmTokens( + postNotificationsFcmTokensRequest: PostNotificationsFcmTokensRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNotificationsFcmTokensRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/notifications/fcm-tokens", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Mark every notification of the signed-in user as read + * @return PostDoorlockDevicesByIdUpdate200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNotificationsReadAll(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/notifications/read-all", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Development helper: drop a test notification into the caller's own inbox (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS) + * @return PostNotificationsByIdRead200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNotificationsTest(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/notifications/test", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Development helper: render a notification template without sending it (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS) + * @param postNotificationsTestPreviewRequest + * @return PostNotificationsTestPreview200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNotificationsTestPreview( + postNotificationsTestPreviewRequest: PostNotificationsTestPreviewRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNotificationsTestPreviewRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/notifications/test/preview", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Development helper: send a test message over email, in-app and/or push (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS) + * @param postNotificationsTestSendRequest + * @return PostNotificationsTestSend200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postNotificationsTestSend( + postNotificationsTestSendRequest: PostNotificationsTestSendRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postNotificationsTestSendRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/notifications/test/send", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/PeriodApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/PeriodApi.kt new file mode 100644 index 0000000..3dcf24c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/PeriodApi.kt @@ -0,0 +1,76 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetTimetablePeriodsGetAll200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class PeriodApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Get all period definitions used in a given timetable, sorted by period number. + * @param timetableId (optional) + * @return GetTimetablePeriodsGetAll200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetablePeriodsGetAll(timetableId: kotlin.String? = null): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + timetableId?.apply { localVariableQuery["timetableId"] = listOf("$timetableId") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/periods/getAll", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/PingApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/PingApi.kt index ff1c6f5..a89542f 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/PingApi.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/PingApi.kt @@ -16,8 +16,9 @@ package hu.petrik.filcapp.api.client import hu.petrik.filcapp.api.infrastructure.* -import hu.petrik.filcapp.api.model.PingResponse -import hu.petrik.filcapp.api.model.UptimeResponse +import hu.petrik.filcapp.api.model.GetPing200Response +import hu.petrik.filcapp.api.model.GetPingUptime200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine @@ -42,12 +43,12 @@ open class PingApi : ApiClient { ) : super(baseUrl = baseUrl, httpClient = httpClient) /** - * Get server uptime * - * @return UptimeResponse + * Health check endpoint that returns a pong response. + * @return GetPing200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getUptime(): HttpResponse { + open suspend fun getPing(): HttpResponse { val localVariableAuthNames = listOf() val localVariableBody = @@ -59,7 +60,7 @@ open class PingApi : ApiClient { val localVariableConfig = RequestConfig( RequestMethod.GET, - "/ping/uptime", + "/ping", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -73,12 +74,12 @@ open class PingApi : ApiClient { } /** - * Health check * - * @return PingResponse + * Get the uptime. + * @return GetPingUptime200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun ping(): HttpResponse { + open suspend fun getPingUptime(): HttpResponse { val localVariableAuthNames = listOf() val localVariableBody = @@ -90,7 +91,7 @@ open class PingApi : ApiClient { val localVariableConfig = RequestConfig( RequestMethod.GET, - "/ping", + "/ping/uptime", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/RolesApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/RolesApi.kt new file mode 100644 index 0000000..5126268 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/RolesApi.kt @@ -0,0 +1,208 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetNavigatorTranslationsAvailable200Response +import hu.petrik.filcapp.api.model.GetRoles200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchRolesByNameRequest +import hu.petrik.filcapp.api.model.PostDoorlockDevicesByIdUpdate200Response +import hu.petrik.filcapp.api.model.PostRoles201Response +import hu.petrik.filcapp.api.model.PostRolesRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class RolesApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete a role + * @param name + * @return PostDoorlockDevicesByIdUpdate200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteRolesByName(name: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/roles/{name}".replace("{" + "name" + "}", "$name"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List all roles with their permissions + * @return GetRoles200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getRoles(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/roles", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List all known permissions registered by the application + * @return GetNavigatorTranslationsAvailable200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getRolesPermissions(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/roles/permissions", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update permissions for a role + * @param name + * @param patchRolesByNameRequest + * @return PostRoles201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun patchRolesByName( + name: kotlin.String, + patchRolesByNameRequest: PatchRolesByNameRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = patchRolesByNameRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PATCH, + "/roles/{name}".replace("{" + "name" + "}", "$name"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a new role + * @param postRolesRequest + * @return PostRoles201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postRoles(postRolesRequest: PostRolesRequest): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postRolesRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/roles", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/SubjectApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/SubjectApi.kt new file mode 100644 index 0000000..a3bad8b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/SubjectApi.kt @@ -0,0 +1,74 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetTimetableSubjects200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class SubjectApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Get all subjects from the database. + * @return GetTimetableSubjects200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableSubjects(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/subjects", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/SubstitutionApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/SubstitutionApi.kt new file mode 100644 index 0000000..018f614 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/SubstitutionApi.kt @@ -0,0 +1,318 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetTimetableSubstitutions200Response +import hu.petrik.filcapp.api.model.GetTimetableSubstitutionsCohortByCohortId200Response +import hu.petrik.filcapp.api.model.GetTimetableSubstitutionsRelevant200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PostTimetableSubstitutions200Response +import hu.petrik.filcapp.api.model.PostTimetableSubstitutionsManualRequest +import hu.petrik.filcapp.api.model.PostTimetableSubstitutionsRequest +import hu.petrik.filcapp.api.model.PutTimetableSubstitutionsByIdRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class SubstitutionApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete a substitution + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteTimetableSubstitutionsById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/timetable/substitutions/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get all substitutions from the database. + * @return GetTimetableSubstitutions200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableSubstitutions(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/substitutions", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get relevant substitutions for a given cohort from the database. + * @param cohortId + * @return GetTimetableSubstitutionsCohortByCohortId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableSubstitutionsCohortByCohortId( + cohortId: kotlin.String, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/substitutions/cohort/{cohortId}".replace("{" + "cohortId" + "}", "$cohortId"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Export substitutions as a CSV file over an optional date range. + * @param from (optional) + * @param to (optional) + * @return kotlin.String + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableSubstitutionsExport( + from: kotlin.String? = null, + to: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + from?.apply { localVariableQuery["from"] = listOf("$from") } + to?.apply { localVariableQuery["to"] = listOf("$to") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/substitutions/export", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get relevant substitutions from the database. + * @return GetTimetableSubstitutionsRelevant200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableSubstitutionsRelevant(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/substitutions/relevant", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a new substitution + * @param postTimetableSubstitutionsRequest + * @return PostTimetableSubstitutions200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postTimetableSubstitutions( + postTimetableSubstitutionsRequest: PostTimetableSubstitutionsRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postTimetableSubstitutionsRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/timetable/substitutions", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a substitution manually by specifying the teacher, lesson time, subject and cohort directly. + * @param postTimetableSubstitutionsManualRequest + * @return PostTimetableSubstitutions200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postTimetableSubstitutionsManual( + postTimetableSubstitutionsManualRequest: PostTimetableSubstitutionsManualRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postTimetableSubstitutionsManualRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/timetable/substitutions/manual", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a substitution + * @param id + * @param putTimetableSubstitutionsByIdRequest + * @return PostTimetableSubstitutions200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putTimetableSubstitutionsById( + id: kotlin.String, + putTimetableSubstitutionsByIdRequest: PutTimetableSubstitutionsByIdRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putTimetableSubstitutionsByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/timetable/substitutions/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/TeacherApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/TeacherApi.kt new file mode 100644 index 0000000..90ebd57 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/TeacherApi.kt @@ -0,0 +1,175 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.GetTimetableTeachers200Response +import hu.petrik.filcapp.api.model.GetTimetableTeachersGetAll200Response +import hu.petrik.filcapp.api.model.GetTimetableTeachersMe200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchTimetableTeachersById200Response +import hu.petrik.filcapp.api.model.PatchTimetableTeachersByIdRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class TeacherApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * List all teachers with their email and linked user. + * @return GetTimetableTeachers200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableTeachers(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/teachers", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get all teachers from the database. + * @return GetTimetableTeachersGetAll200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableTeachersGetAll(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/teachers/getAll", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get the signed-in user's linked teacher, if any. + * @return GetTimetableTeachersMe200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getTimetableTeachersMe(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/timetable/teachers/me", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a teacher email and/or linked user. + * @param id + * @param patchTimetableTeachersByIdRequest (optional) + * @return PatchTimetableTeachersById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun patchTimetableTeachersById( + id: kotlin.String, + patchTimetableTeachersByIdRequest: PatchTimetableTeachersByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = patchTimetableTeachersByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PATCH, + "/timetable/teachers/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/TimetableApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/TimetableApi.kt index e73eb8b..4abc0b8 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/TimetableApi.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/TimetableApi.kt @@ -16,16 +16,16 @@ package hu.petrik.filcapp.api.client import hu.petrik.filcapp.api.infrastructure.* -import hu.petrik.filcapp.api.model.ErrorResponse -import hu.petrik.filcapp.api.model.GetAllClassrooms200Response -import hu.petrik.filcapp.api.model.GetAllTeachers200Response -import hu.petrik.filcapp.api.model.GetCohortsForTimetable200Response -import hu.petrik.filcapp.api.model.GetLatestValidTimetable200Response -import hu.petrik.filcapp.api.model.GetLessonById200Response -import hu.petrik.filcapp.api.model.GetLessonsForCohort200Response -import hu.petrik.filcapp.api.model.GetMovedLessons200Response -import hu.petrik.filcapp.api.model.GetSubstitutions200Response -import hu.petrik.filcapp.api.model.GetTimetables200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.GetTimetableTimetables200Response +import hu.petrik.filcapp.api.model.GetTimetableTimetablesByIdPreviewDelete200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchTimetableTimetablesById200Response +import hu.petrik.filcapp.api.model.PatchTimetableTimetablesByIdRequest +import hu.petrik.filcapp.api.model.PostDoorlockDevicesByIdUpdate200Response +import hu.petrik.filcapp.api.model.PostTimetableImportRequest +import hu.petrik.filcapp.api.model.PostTimetableTimetablesCleanupOrphanedCohorts200Response import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine @@ -50,12 +50,13 @@ open class TimetableApi : ApiClient { ) : super(baseUrl = baseUrl, httpClient = httpClient) /** - * List all classrooms * - * @return GetAllClassrooms200Response + * Delete a timetable and all its related data, including orphaned cohorts. + * @param id + * @return DeleteAdminApiKeysByKeyId200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getAllClassrooms(): HttpResponse { + open suspend fun deleteTimetableTimetablesById(id: kotlin.String): HttpResponse { val localVariableAuthNames = listOf("sessionAuth") val localVariableBody = @@ -66,8 +67,8 @@ open class TimetableApi : ApiClient { val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/timetable/classrooms/getAll", + RequestMethod.DELETE, + "/timetable/timetables/{id}".replace("{" + "id" + "}", "$id"), query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = true, @@ -81,13 +82,13 @@ open class TimetableApi : ApiClient { } /** - * List all teachers * - * @return GetAllTeachers200Response + * Get all timetables from the database. + * @return GetTimetableTimetables200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getAllTeachers(): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") + open suspend fun getTimetableTimetables(): HttpResponse { + val localVariableAuthNames = listOf() val localVariableBody = io.ktor.client.utils.EmptyContent @@ -98,10 +99,10 @@ open class TimetableApi : ApiClient { val localVariableConfig = RequestConfig( RequestMethod.GET, - "/timetable/teachers/getAll", + "/timetable/timetables", query = localVariableQuery, headers = localVariableHeaders, - requiresAuthentication = true, + requiresAuthentication = false, ) return request( @@ -112,13 +113,15 @@ open class TimetableApi : ApiClient { } /** - * Get all cohorts for a timetable * - * @param timetableId - * @return GetCohortsForTimetable200Response + * Preview the impact of deleting a timetable. Orphaned cohorts will be deleted along with the timetable. + * @param id + * @return GetTimetableTimetablesByIdPreviewDelete200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getCohortsForTimetable(timetableId: kotlin.String): HttpResponse { + open suspend fun getTimetableTimetablesByIdPreviewDelete( + id: kotlin.String, + ): HttpResponse { val localVariableAuthNames = listOf("sessionAuth") val localVariableBody = @@ -130,7 +133,7 @@ open class TimetableApi : ApiClient { val localVariableConfig = RequestConfig( RequestMethod.GET, - "/timetable/cohorts/getAllForTimetable/{timetableId}".replace("{" + "timetableId" + "}", "$timetableId"), + "/timetable/timetables/{id}/preview-delete".replace("{" + "id" + "}", "$id"), query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = true, @@ -144,13 +147,13 @@ open class TimetableApi : ApiClient { } /** - * Get the latest valid timetable * - * @return GetLatestValidTimetable200Response + * Get the latest valid timetable. + * @return PatchTimetableTimetablesById200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getLatestValidTimetable(): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") + open suspend fun getTimetableTimetablesLatestValid(): HttpResponse { + val localVariableAuthNames = listOf() val localVariableBody = io.ktor.client.utils.EmptyContent @@ -164,229 +167,7 @@ open class TimetableApi : ApiClient { "/timetable/timetables/latestValid", query = localVariableQuery, headers = localVariableHeaders, - requiresAuthentication = true, - ) - - return request( - localVariableConfig, - localVariableBody, - localVariableAuthNames, - ).wrap() - } - - /** - * Get a specific lesson by ID - * - * @param lessonId - * @return GetLessonById200Response - */ - @Suppress("UNCHECKED_CAST") - open suspend fun getLessonById(lessonId: kotlin.String): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") - - val localVariableBody = - io.ktor.client.utils.EmptyContent - - val localVariableQuery = mutableMapOf>() - val localVariableHeaders = mutableMapOf() - - val localVariableConfig = - RequestConfig( - RequestMethod.GET, - "/timetable/lessons/getForId/{lessonId}".replace("{" + "lessonId" + "}", "$lessonId"), - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = true, - ) - - return request( - localVariableConfig, - localVariableBody, - localVariableAuthNames, - ).wrap() - } - - /** - * Get lessons for a cohort - * - * @param cohortId - * @return GetLessonsForCohort200Response - */ - @Suppress("UNCHECKED_CAST") - open suspend fun getLessonsForCohort(cohortId: kotlin.String): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") - - val localVariableBody = - io.ktor.client.utils.EmptyContent - - val localVariableQuery = mutableMapOf>() - val localVariableHeaders = mutableMapOf() - - val localVariableConfig = - RequestConfig( - RequestMethod.GET, - "/timetable/lessons/getForCohort/{cohortId}".replace("{" + "cohortId" + "}", "$cohortId"), - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = true, - ) - - return request( - localVariableConfig, - localVariableBody, - localVariableAuthNames, - ).wrap() - } - - /** - * Get lessons for a classroom - * - * @param classroomId - * @return GetLessonsForCohort200Response - */ - @Suppress("UNCHECKED_CAST") - open suspend fun getLessonsForRoom(classroomId: kotlin.String): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") - - val localVariableBody = - io.ktor.client.utils.EmptyContent - - val localVariableQuery = mutableMapOf>() - val localVariableHeaders = mutableMapOf() - - val localVariableConfig = - RequestConfig( - RequestMethod.GET, - "/timetable/lessons/getForRoom/{classroomId}".replace("{" + "classroomId" + "}", "$classroomId"), - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = true, - ) - - return request( - localVariableConfig, - localVariableBody, - localVariableAuthNames, - ).wrap() - } - - /** - * Get lessons for a teacher - * - * @param teacherId - * @return GetLessonsForCohort200Response - */ - @Suppress("UNCHECKED_CAST") - open suspend fun getLessonsForTeacher(teacherId: kotlin.String): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") - - val localVariableBody = - io.ktor.client.utils.EmptyContent - - val localVariableQuery = mutableMapOf>() - val localVariableHeaders = mutableMapOf() - - val localVariableConfig = - RequestConfig( - RequestMethod.GET, - "/timetable/lessons/getForTeacher/{teacherId}".replace("{" + "teacherId" + "}", "$teacherId"), - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = true, - ) - - return request( - localVariableConfig, - localVariableBody, - localVariableAuthNames, - ).wrap() - } - - /** - * List all moved lessons - * - * @return GetMovedLessons200Response - */ - @Suppress("UNCHECKED_CAST") - open suspend fun getMovedLessons(): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") - - val localVariableBody = - io.ktor.client.utils.EmptyContent - - val localVariableQuery = mutableMapOf>() - val localVariableHeaders = mutableMapOf() - - val localVariableConfig = - RequestConfig( - RequestMethod.GET, - "/timetable/movedLessons", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = true, - ) - - return request( - localVariableConfig, - localVariableBody, - localVariableAuthNames, - ).wrap() - } - - /** - * Get moved lessons for a cohort - * - * @param cohortId - * @return GetMovedLessons200Response - */ - @Suppress("UNCHECKED_CAST") - open suspend fun getMovedLessonsForCohort(cohortId: kotlin.String): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") - - val localVariableBody = - io.ktor.client.utils.EmptyContent - - val localVariableQuery = mutableMapOf>() - val localVariableHeaders = mutableMapOf() - - val localVariableConfig = - RequestConfig( - RequestMethod.GET, - "/timetable/movedLessons/cohort/{cohortId}".replace("{" + "cohortId" + "}", "$cohortId"), - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = true, - ) - - return request( - localVariableConfig, - localVariableBody, - localVariableAuthNames, - ).wrap() - } - - /** - * Get relevant moved lessons for the current user - * - * @return GetMovedLessons200Response - */ - @Suppress("UNCHECKED_CAST") - open suspend fun getRelevantMovedLessons(): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") - - val localVariableBody = - io.ktor.client.utils.EmptyContent - - val localVariableQuery = mutableMapOf>() - val localVariableHeaders = mutableMapOf() - - val localVariableConfig = - RequestConfig( - RequestMethod.GET, - "/timetable/movedLessons/relevant", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = true, + requiresAuthentication = false, ) return request( @@ -397,13 +178,13 @@ open class TimetableApi : ApiClient { } /** - * Get relevant substitutions for the current user * - * @return GetSubstitutions200Response + * Get all the latest valid timetables. + * @return GetTimetableTimetables200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getRelevantSubstitutions(): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") + open suspend fun getTimetableTimetablesValid(): HttpResponse { + val localVariableAuthNames = listOf() val localVariableBody = io.ktor.client.utils.EmptyContent @@ -414,41 +195,10 @@ open class TimetableApi : ApiClient { val localVariableConfig = RequestConfig( RequestMethod.GET, - "/timetable/substitutions/relevant", - query = localVariableQuery, - headers = localVariableHeaders, - requiresAuthentication = true, - ) - - return request( - localVariableConfig, - localVariableBody, - localVariableAuthNames, - ).wrap() - } - - /** - * List all substitutions - * - * @return GetSubstitutions200Response - */ - @Suppress("UNCHECKED_CAST") - open suspend fun getSubstitutions(): HttpResponse { - val localVariableAuthNames = listOf("sessionAuth") - - val localVariableBody = - io.ktor.client.utils.EmptyContent - - val localVariableQuery = mutableMapOf>() - val localVariableHeaders = mutableMapOf() - - val localVariableConfig = - RequestConfig( - RequestMethod.GET, - "/timetable/substitutions", + "/timetable/timetables/valid", query = localVariableQuery, headers = localVariableHeaders, - requiresAuthentication = true, + requiresAuthentication = false, ) return request( @@ -459,31 +209,34 @@ open class TimetableApi : ApiClient { } /** - * Get relevant substitutions for a cohort * - * @param cohortId - * @return GetSubstitutions200Response + * Update a timetable validity dates. + * @param id + * @param patchTimetableTimetablesByIdRequest (optional) + * @return PatchTimetableTimetablesById200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getSubstitutionsForCohort(cohortId: kotlin.String): HttpResponse { + open suspend fun patchTimetableTimetablesById( + id: kotlin.String, + patchTimetableTimetablesByIdRequest: PatchTimetableTimetablesByIdRequest? = null, + ): HttpResponse { val localVariableAuthNames = listOf("sessionAuth") - val localVariableBody = - io.ktor.client.utils.EmptyContent + val localVariableBody = patchTimetableTimetablesByIdRequest val localVariableQuery = mutableMapOf>() val localVariableHeaders = mutableMapOf() val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/timetable/substitutions/cohort/{cohortId}".replace("{" + "cohortId" + "}", "$cohortId"), + RequestMethod.PATCH, + "/timetable/timetables/{id}".replace("{" + "id" + "}", "$id"), query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = true, ) - return request( + return jsonRequest( localVariableConfig, localVariableBody, localVariableAuthNames, @@ -491,30 +244,32 @@ open class TimetableApi : ApiClient { } /** - * List all timetables * - * @return GetTimetables200Response + * Import a timetable from an Oman or aSc 2012 XML file. + * @param postTimetableImportRequest + * @return PostDoorlockDevicesByIdUpdate200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getTimetables(): HttpResponse { + open suspend fun postTimetableImport( + postTimetableImportRequest: PostTimetableImportRequest, + ): HttpResponse { val localVariableAuthNames = listOf("sessionAuth") - val localVariableBody = - io.ktor.client.utils.EmptyContent + val localVariableBody = postTimetableImportRequest val localVariableQuery = mutableMapOf>() val localVariableHeaders = mutableMapOf() val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/timetable/timetables", + RequestMethod.POST, + "/timetable/import", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = true, ) - return request( + return jsonRequest( localVariableConfig, localVariableBody, localVariableAuthNames, @@ -522,12 +277,14 @@ open class TimetableApi : ApiClient { } /** - * Get all valid timetables * - * @return GetTimetables200Response + * Delete all cohorts that are no longer linked to any timetable (orphaned) and all teachers that are not assigned to any lesson. Users referencing those cohorts will have their cohortId nullified. Teachers still referenced by cohorts, cohort groups, or substitutions are kept. + * @return PostTimetableTimetablesCleanupOrphanedCohorts200Response */ @Suppress("UNCHECKED_CAST") - open suspend fun getValidTimetables(): HttpResponse { + open suspend fun postTimetableTimetablesCleanupOrphanedCohorts(): HttpResponse< + PostTimetableTimetablesCleanupOrphanedCohorts200Response, + > { val localVariableAuthNames = listOf("sessionAuth") val localVariableBody = @@ -538,8 +295,8 @@ open class TimetableApi : ApiClient { val localVariableConfig = RequestConfig( - RequestMethod.GET, - "/timetable/timetables/valid", + RequestMethod.POST, + "/timetable/timetables/cleanup-orphaned-cohorts", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = true, diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/UsersApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/UsersApi.kt index beafb33..6b7a1f5 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/UsersApi.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/UsersApi.kt @@ -16,8 +16,10 @@ package hu.petrik.filcapp.api.client import hu.petrik.filcapp.api.infrastructure.* -import hu.petrik.filcapp.api.model.ErrorResponse import hu.petrik.filcapp.api.model.GetUsers200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PatchUsersById200Response +import hu.petrik.filcapp.api.model.PatchUsersByIdRequest import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine @@ -42,17 +44,19 @@ open class UsersApi : ApiClient { ) : super(baseUrl = baseUrl, httpClient = httpClient) /** - * List users with optional search and pagination * + * List users * @param limit (optional, default to 20) * @param offset (optional, default to 0) + * @param role (optional) * @param search (optional) * @return GetUsers200Response */ @Suppress("UNCHECKED_CAST") open suspend fun getUsers( - limit: kotlin.Int? = 20, - offset: kotlin.Int? = 0, + limit: kotlin.Double? = 20.toDouble(), + offset: kotlin.Double? = 0.toDouble(), + role: kotlin.String? = null, search: kotlin.String? = null, ): HttpResponse { val localVariableAuthNames = listOf("sessionAuth") @@ -63,6 +67,7 @@ open class UsersApi : ApiClient { val localVariableQuery = mutableMapOf>() limit?.apply { localVariableQuery["limit"] = listOf("$limit") } offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + role?.apply { localVariableQuery["role"] = listOf("$role") } search?.apply { localVariableQuery["search"] = listOf("$search") } val localVariableHeaders = mutableMapOf() @@ -81,4 +86,39 @@ open class UsersApi : ApiClient { localVariableAuthNames, ).wrap() } + + /** + * + * Update user + * @param id + * @param patchUsersByIdRequest (optional) + * @return PatchUsersById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun patchUsersById( + id: kotlin.String, + patchUsersByIdRequest: PatchUsersByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = patchUsersByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PATCH, + "/users/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } } diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/WiFiApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/WiFiApi.kt new file mode 100644 index 0000000..bfb46c2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/client/WiFiApi.kt @@ -0,0 +1,1066 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.client + +import hu.petrik.filcapp.api.infrastructure.* +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId200Response +import hu.petrik.filcapp.api.model.DeleteAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.DeleteNavigatorBuildingsById200Response +import hu.petrik.filcapp.api.model.GetWifiAuthLogs200Response +import hu.petrik.filcapp.api.model.GetWifiDevices200Response +import hu.petrik.filcapp.api.model.GetWifiNas200Response +import hu.petrik.filcapp.api.model.GetWifiRoleSpeedProfiles200Response +import hu.petrik.filcapp.api.model.GetWifiSelf200Response +import hu.petrik.filcapp.api.model.GetWifiSpeedProfiles200Response +import hu.petrik.filcapp.api.model.GetWifiStatsOverview200Response +import hu.petrik.filcapp.api.model.GetWifiStatus200Response +import hu.petrik.filcapp.api.model.GetWifiUsers200Response +import hu.petrik.filcapp.api.model.PatchAdminApiKeysByKeyId400Response +import hu.petrik.filcapp.api.model.PostWifiDevices201Response +import hu.petrik.filcapp.api.model.PostWifiDevicesRequest +import hu.petrik.filcapp.api.model.PostWifiNas201Response +import hu.petrik.filcapp.api.model.PostWifiNasRequest +import hu.petrik.filcapp.api.model.PostWifiRadiusAuthorize200Response +import hu.petrik.filcapp.api.model.PostWifiRadiusAuthorizeRequest +import hu.petrik.filcapp.api.model.PostWifiRoleSpeedProfiles201Response +import hu.petrik.filcapp.api.model.PostWifiRoleSpeedProfilesRequest +import hu.petrik.filcapp.api.model.PostWifiSelf201Response +import hu.petrik.filcapp.api.model.PostWifiSelf201ResponseDevicesInner +import hu.petrik.filcapp.api.model.PostWifiSelfRequest +import hu.petrik.filcapp.api.model.PostWifiSpeedProfiles201Response +import hu.petrik.filcapp.api.model.PostWifiSpeedProfilesRequest +import hu.petrik.filcapp.api.model.PostWifiUsers201Response +import hu.petrik.filcapp.api.model.PostWifiUsersRequest +import hu.petrik.filcapp.api.model.PutWifiDevicesByIdRequest +import hu.petrik.filcapp.api.model.PutWifiNasByIdRequest +import hu.petrik.filcapp.api.model.PutWifiRoleSpeedProfilesByIdRequest +import hu.petrik.filcapp.api.model.PutWifiSelfDevicesByIdRequest +import hu.petrik.filcapp.api.model.PutWifiSelfPassword200Response +import hu.petrik.filcapp.api.model.PutWifiSelfPasswordRequest +import hu.petrik.filcapp.api.model.PutWifiSpeedProfilesByIdRequest +import hu.petrik.filcapp.api.model.PutWifiUsersByIdRequest +import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig +import io.ktor.client.engine.HttpClientEngine +import io.ktor.client.request.forms.formData +import io.ktor.http.ParametersBuilder +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.Json + +open class WiFiApi : ApiClient { + constructor( + baseUrl: String = ApiClient.BASE_URL, + httpClientEngine: HttpClientEngine? = null, + httpClientConfig: ((HttpClientConfig<*>) -> Unit)? = null, + jsonSerializer: Json = ApiClient.JSON_DEFAULT, + ) : super(baseUrl = baseUrl, httpClientEngine = httpClientEngine, httpClientConfig = httpClientConfig, jsonBlock = jsonSerializer) + + constructor( + baseUrl: String, + httpClient: HttpClient, + ) : super(baseUrl = baseUrl, httpClient = httpClient) + + /** + * + * Delete a WiFi device or global MAC ban. + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteWifiDevicesById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/wifi/devices/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a WiFi NAS device. + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteWifiNasById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/wifi/nas/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a WiFi role speed-profile mapping. + * @param id + * @return DeleteNavigatorBuildingsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteWifiRoleSpeedProfilesById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/wifi/role-speed-profiles/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a UniFi WiFi speed profile. + * @param id + * @return DeleteNavigatorBuildingsById200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteWifiSpeedProfilesById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/wifi/speed-profiles/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Delete a WiFi user account. + * @param id + * @return DeleteAdminApiKeysByKeyId200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun deleteWifiUsersById(id: kotlin.String): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.DELETE, + "/wifi/users/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * enum for parameter result + */ + @Serializable + enum class ResultGetWifiAuthLogs( + val value: kotlin.String, + ) { + @SerialName(value = "true") + `true`("true"), + + @SerialName(value = "false") + `false`("false"), + } + + /** + * + * List WiFi auth logs. + * @param limit (optional, default to 10000) + * @param offset (optional, default to 0) + * @param search (optional) + * @param failureReason (optional) + * @param result (optional) + * @return GetWifiAuthLogs200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiAuthLogs( + limit: kotlin.Int? = 10000, + offset: kotlin.Int? = 0, + search: kotlin.String? = null, + failureReason: kotlin.String? = null, + result: ResultGetWifiAuthLogs? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + search?.apply { localVariableQuery["search"] = listOf("$search") } + failureReason?.apply { localVariableQuery["failureReason"] = listOf("$failureReason") } + result?.apply { localVariableQuery["result"] = listOf("${ result.value }") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/auth-logs", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List WiFi devices and global MAC bans. + * @param limit (optional, default to 10000) + * @param offset (optional, default to 0) + * @param search (optional) + * @param wifiUserId (optional) + * @return GetWifiDevices200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiDevices( + limit: kotlin.Int? = 10000, + offset: kotlin.Int? = 0, + search: kotlin.String? = null, + wifiUserId: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + search?.apply { localVariableQuery["search"] = listOf("$search") } + wifiUserId?.apply { localVariableQuery["wifiUserId"] = listOf("$wifiUserId") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/devices", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List authorized WiFi NAS devices. + * @return GetWifiNas200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiNas(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/nas", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List WiFi role speed-profile mappings. + * @return GetWifiRoleSpeedProfiles200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiRoleSpeedProfiles(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/role-speed-profiles", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get the authenticated user's WiFi account and devices. + * @return GetWifiSelf200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiSelf(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/self", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Download the CA certificate for the authenticated user's WiFi network. + * @return kotlin.String + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiSelfCertificate(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/self/certificate", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List UniFi WiFi speed profiles. + * @return GetWifiSpeedProfiles200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiSpeedProfiles(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/speed-profiles", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get WiFi account, device, active-device, and auth statistics. + * @return GetWifiStatsOverview200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiStatsOverview(): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/stats/overview", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Get the WiFi module status and configured SSID. + * @return GetWifiStatus200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiStatus(): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/status", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * List WiFi user accounts. + * @param limit (optional, default to 10000) + * @param offset (optional, default to 0) + * @param search (optional) + * @return GetWifiUsers200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun getWifiUsers( + limit: kotlin.Int? = 10000, + offset: kotlin.Int? = 0, + search: kotlin.String? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = + io.ktor.client.utils.EmptyContent + + val localVariableQuery = mutableMapOf>() + limit?.apply { localVariableQuery["limit"] = listOf("$limit") } + offset?.apply { localVariableQuery["offset"] = listOf("$offset") } + search?.apply { localVariableQuery["search"] = listOf("$search") } + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.GET, + "/wifi/users", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return request( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a WiFi device or global MAC ban. + * @param postWifiDevicesRequest + * @return PostWifiDevices201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postWifiDevices(postWifiDevicesRequest: PostWifiDevicesRequest): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postWifiDevicesRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/wifi/devices", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Register a WiFi NAS device. + * @param postWifiNasRequest + * @return PostWifiNas201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postWifiNas(postWifiNasRequest: PostWifiNasRequest): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postWifiNasRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/wifi/nas", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Authorize a WiFi client for FreeRADIUS. + * @param postWifiRadiusAuthorizeRequest + * @return PostWifiRadiusAuthorize200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postWifiRadiusAuthorize( + postWifiRadiusAuthorizeRequest: PostWifiRadiusAuthorizeRequest, + ): HttpResponse { + val localVariableAuthNames = listOf() + + val localVariableBody = postWifiRadiusAuthorizeRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/wifi/radius/authorize", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a WiFi role speed-profile mapping. + * @param postWifiRoleSpeedProfilesRequest + * @return PostWifiRoleSpeedProfiles201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postWifiRoleSpeedProfiles( + postWifiRoleSpeedProfilesRequest: PostWifiRoleSpeedProfilesRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postWifiRoleSpeedProfilesRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/wifi/role-speed-profiles", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a new WiFi account for the authenticated user. + * @param postWifiSelfRequest + * @return PostWifiSelf201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postWifiSelf(postWifiSelfRequest: PostWifiSelfRequest): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postWifiSelfRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/wifi/self", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a UniFi WiFi speed profile. + * @param postWifiSpeedProfilesRequest + * @return PostWifiSpeedProfiles201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postWifiSpeedProfiles( + postWifiSpeedProfilesRequest: PostWifiSpeedProfilesRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postWifiSpeedProfilesRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/wifi/speed-profiles", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Create a WiFi user account. + * @param postWifiUsersRequest + * @return PostWifiUsers201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun postWifiUsers(postWifiUsersRequest: PostWifiUsersRequest): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = postWifiUsersRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.POST, + "/wifi/users", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a WiFi device or global MAC ban. + * @param id + * @param putWifiDevicesByIdRequest (optional) + * @return PostWifiDevices201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putWifiDevicesById( + id: kotlin.String, + putWifiDevicesByIdRequest: PutWifiDevicesByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putWifiDevicesByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/wifi/devices/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a WiFi NAS device. + * @param id + * @param putWifiNasByIdRequest (optional) + * @return PostWifiNas201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putWifiNasById( + id: kotlin.String, + putWifiNasByIdRequest: PutWifiNasByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putWifiNasByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/wifi/nas/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a WiFi role speed-profile mapping. + * @param id + * @param putWifiRoleSpeedProfilesByIdRequest (optional) + * @return PostWifiRoleSpeedProfiles201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putWifiRoleSpeedProfilesById( + id: kotlin.String, + putWifiRoleSpeedProfilesByIdRequest: PutWifiRoleSpeedProfilesByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putWifiRoleSpeedProfilesByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/wifi/role-speed-profiles/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Rename one of the authenticated user's WiFi devices. + * @param id + * @param putWifiSelfDevicesByIdRequest + * @return PostWifiSelf201ResponseDevicesInner + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putWifiSelfDevicesById( + id: kotlin.String, + putWifiSelfDevicesByIdRequest: PutWifiSelfDevicesByIdRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putWifiSelfDevicesByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/wifi/self/devices/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Change the authenticated user's WiFi account password. + * @param putWifiSelfPasswordRequest + * @return PutWifiSelfPassword200Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putWifiSelfPassword( + putWifiSelfPasswordRequest: PutWifiSelfPasswordRequest, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putWifiSelfPasswordRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/wifi/self/password", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a UniFi WiFi speed profile. + * @param id + * @param putWifiSpeedProfilesByIdRequest (optional) + * @return PostWifiSpeedProfiles201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putWifiSpeedProfilesById( + id: kotlin.String, + putWifiSpeedProfilesByIdRequest: PutWifiSpeedProfilesByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putWifiSpeedProfilesByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/wifi/speed-profiles/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } + + /** + * + * Update a WiFi user account. + * @param id + * @param putWifiUsersByIdRequest (optional) + * @return PostWifiUsers201Response + */ + @Suppress("UNCHECKED_CAST") + open suspend fun putWifiUsersById( + id: kotlin.String, + putWifiUsersByIdRequest: PutWifiUsersByIdRequest? = null, + ): HttpResponse { + val localVariableAuthNames = listOf("sessionAuth") + + val localVariableBody = putWifiUsersByIdRequest + + val localVariableQuery = mutableMapOf>() + val localVariableHeaders = mutableMapOf() + + val localVariableConfig = + RequestConfig( + RequestMethod.PUT, + "/wifi/users/{id}".replace("{" + "id" + "}", "$id"), + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = true, + ) + + return jsonRequest( + localVariableConfig, + localVariableBody, + localVariableAuthNames, + ).wrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/ApiAbstractions.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/ApiAbstractions.kt index 6414b29..ac6a966 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/ApiAbstractions.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/ApiAbstractions.kt @@ -17,20 +17,14 @@ fun toMultiValue( items: Array, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter, -): List = - toMultiValue( - items.asIterable(), - collectionFormat, - map, - ) +): List = toMultiValue(items.asIterable(), collectionFormat, map) fun toMultiValue( items: Iterable, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter, -): List { - return when (collectionFormat) { +): List = + when (collectionFormat) { "multi" -> items.map(map) else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map)) } -} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/ApiClient.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/ApiClient.kt index 23cdd35..b6fd3f6 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/ApiClient.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/ApiClient.kt @@ -1,6 +1,7 @@ package hu.petrik.filcapp.api.infrastructure import hu.petrik.filcapp.api.auth.* +import hu.petrik.filcapp.config.MergenEnvironment import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine @@ -48,17 +49,14 @@ open class ApiClient( } private val authentications: kotlin.collections.Map by lazy { - mapOf( - "sessionAuth" to ApiKeyAuth("cookie", "filc.session_token"), - ) + mapOf("sessionAuth" to ApiKeyAuth("cookie", "filc.session_token")) } companion object { - const val BASE_URL: String = "https://filc.petrik.hu/api" + const val BASE_URL: String = MergenEnvironment.API_BASE_URL val JSON_DEFAULT: Json = Json { ignoreUnknownKeys = true - prettyPrint = true isLenient = true } protected val UNSAFE_HEADERS: List = listOf(HttpHeaders.ContentType) @@ -148,28 +146,19 @@ open class ApiClient( requestConfig: RequestConfig, body: kotlin.collections.List?, authNames: kotlin.collections.List, - ): HttpResponse { - return request(requestConfig, MultiPartFormDataContent(body ?: listOf()), authNames) - } + ): HttpResponse = request(requestConfig, MultiPartFormDataContent(body ?: listOf()), authNames) protected suspend fun urlEncodedFormRequest( requestConfig: RequestConfig, body: Parameters?, authNames: kotlin.collections.List, - ): HttpResponse { - return request(requestConfig, FormDataContent(body ?: Parameters.Empty), authNames) - } + ): HttpResponse = request(requestConfig, FormDataContent(body ?: Parameters.Empty), authNames) protected suspend fun jsonRequest( requestConfig: RequestConfig, body: Any? = null, authNames: kotlin.collections.List, - ): HttpResponse = - request( - requestConfig, - body, - authNames, - ) + ): HttpResponse = request(requestConfig, body, authNames) protected suspend fun request( requestConfig: RequestConfig, diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/Base64ByteArray.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/Base64ByteArray.kt index 9b81aa8..7f8f43d 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/Base64ByteArray.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/Base64ByteArray.kt @@ -5,7 +5,9 @@ import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* @Serializable(Base64ByteArray.Companion::class) -class Base64ByteArray(val value: ByteArray) { +class Base64ByteArray( + val value: ByteArray, +) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) @@ -24,11 +26,7 @@ class Base64ByteArray(val value: ByteArray) { return value.contentEquals(other.value) } - override fun hashCode(): Int { - return value.contentHashCode() - } + override fun hashCode(): Int = value.contentHashCode() - override fun toString(): String { - return "Base64ByteArray(${hex(value)})" - } + override fun toString(): String = "Base64ByteArray(${hex(value)})" } diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/HttpResponse.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/HttpResponse.kt index 4857524..d929cdb 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/HttpResponse.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/HttpResponse.kt @@ -5,7 +5,10 @@ import io.ktor.http.isSuccess import io.ktor.util.reflect.TypeInfo import io.ktor.util.reflect.typeInfo -open class HttpResponse(val response: io.ktor.client.statement.HttpResponse, val provider: BodyProvider) { +open class HttpResponse( + val response: io.ktor.client.statement.HttpResponse, + val provider: BodyProvider, +) { val status: Int = response.status.value val success: Boolean = response.status.isSuccess() val headers: Map> = response.headers.mapEntries() @@ -32,7 +35,9 @@ interface BodyProvider { ): V } -class TypedBodyProvider(private val type: TypeInfo) : BodyProvider { +class TypedBodyProvider( + private val type: TypeInfo, +) : BodyProvider { @Suppress("UNCHECKED_CAST") override suspend fun body(response: io.ktor.client.statement.HttpResponse): T = response.call.body(type) as T @@ -43,7 +48,10 @@ class TypedBodyProvider(private val type: TypeInfo) : BodyProvider { ): V = response.call.body(type) as V } -class MappedBodyProvider(private val provider: BodyProvider, private val block: S.() -> T) : BodyProvider { +class MappedBodyProvider( + private val provider: BodyProvider, + private val block: S.() -> T, +) : BodyProvider { override suspend fun body(response: io.ktor.client.statement.HttpResponse): T = block(provider.body(response)) override suspend fun typedBody( diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/OctetByteArray.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/OctetByteArray.kt index 22cbb97..53bfd6a 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/OctetByteArray.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/infrastructure/OctetByteArray.kt @@ -5,7 +5,9 @@ import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* @Serializable(OctetByteArray.Companion::class) -class OctetByteArray(val value: ByteArray) { +class OctetByteArray( + val value: ByteArray, +) { companion object : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) @@ -24,11 +26,7 @@ class OctetByteArray(val value: ByteArray) { return value.contentEquals(other.value) } - override fun hashCode(): Int { - return value.contentHashCode() - } + override fun hashCode(): Int = value.contentHashCode() - override fun toString(): String { - return "OctetByteArray(${hex(value)})" - } + override fun toString(): String = "OctetByteArray(${hex(value)})" } diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/DeleteAdminApiKeysByKeyId200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/DeleteAdminApiKeysByKeyId200Response.kt new file mode 100644 index 0000000..a2ac0e0 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/DeleteAdminApiKeysByKeyId200Response.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + */ +@Serializable +data class DeleteAdminApiKeysByKeyId200Response( + @SerialName(value = "id") @Required val id: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/DeleteAdminApiKeysByKeyId400Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/DeleteAdminApiKeysByKeyId400Response.kt new file mode 100644 index 0000000..388af08 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/DeleteAdminApiKeysByKeyId400Response.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param code + * @param message + * @param status + */ +@Serializable +data class DeleteAdminApiKeysByKeyId400Response( + @SerialName(value = "code") @Required val code: kotlin.String, + @SerialName(value = "message") @Required val message: kotlin.String?, + @SerialName(value = "status") @Required val status: kotlin.Int, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/DeleteNavigatorBuildingsById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/DeleteNavigatorBuildingsById200Response.kt new file mode 100644 index 0000000..c906e43 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/DeleteNavigatorBuildingsById200Response.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + */ +@Serializable +data class DeleteNavigatorBuildingsById200Response( + @SerialName(value = "id") @Required val id: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetAdminApiKeys200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetAdminApiKeys200Response.kt new file mode 100644 index 0000000..019b500 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetAdminApiKeys200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetAdminApiKeys200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetAdminApiKeys200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetAdminApiKeys200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetAdminApiKeys200ResponseItemsInner.kt new file mode 100644 index 0000000..41c94f1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetAdminApiKeys200ResponseItemsInner.kt @@ -0,0 +1,54 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param enabled + * @param expiresAt + * @param id + * @param lastRequest + * @param name + * @param ownerEmail + * @param ownerName + * @param prefix + * @param referenceId + * @param requestCount + * @param start + * @param updatedAt + */ +@Serializable +data class GetAdminApiKeys200ResponseItemsInner( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "enabled") @Required val enabled: kotlin.Boolean, + @SerialName(value = "expiresAt") @Required val expiresAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "lastRequest") @Required val lastRequest: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "ownerEmail") @Required val ownerEmail: kotlin.String, + @SerialName(value = "ownerName") @Required val ownerName: kotlin.String, + @SerialName(value = "prefix") @Required val prefix: kotlin.String?, + @SerialName(value = "referenceId") @Required val referenceId: kotlin.String, + @SerialName(value = "requestCount") @Required val requestCount: kotlin.Double, + @SerialName(value = "start") @Required val start: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200Response.kt new file mode 100644 index 0000000..135e91f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetBugReport200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetBugReport200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInner.kt new file mode 100644 index 0000000..f55d6df --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInner.kt @@ -0,0 +1,49 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetBugReport200ResponseItemsInnerMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param description + * @param id + * @param metadata + * @param page + * @param reporterEmail + * @param reporterId + * @param status + * @param subject + * @param updatedAt + */ +@Serializable +data class GetBugReport200ResponseItemsInner( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "description") @Required val description: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "metadata") @Required val metadata: GetBugReport200ResponseItemsInnerMetadata?, + @SerialName(value = "page") @Required val page: kotlin.String?, + @SerialName(value = "reporterEmail") @Required val reporterEmail: kotlin.String?, + @SerialName(value = "reporterId") @Required val reporterId: kotlin.String?, + @SerialName(value = "status") @Required val status: kotlin.String?, + @SerialName(value = "subject") @Required val subject: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInnerMetadata.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInnerMetadata.kt new file mode 100644 index 0000000..625aab3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInnerMetadata.kt @@ -0,0 +1,29 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetBugReport200ResponseItemsInnerMetadataAnyOfInner +import hu.petrik.filcapp.api.model.GetBugReport200ResponseItemsInnerMetadataAnyOfValue +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + */ +@Serializable +class GetBugReport200ResponseItemsInnerMetadata diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInnerMetadataAnyOfInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInnerMetadataAnyOfInner.kt new file mode 100644 index 0000000..e1a1460 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInnerMetadataAnyOfInner.kt @@ -0,0 +1,28 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.JsonElement + +/** + * + * + */ +@Serializable +class GetBugReport200ResponseItemsInnerMetadataAnyOfInner diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInnerMetadataAnyOfValue.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInnerMetadataAnyOfValue.kt new file mode 100644 index 0000000..e5661c0 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetBugReport200ResponseItemsInnerMetadataAnyOfValue.kt @@ -0,0 +1,28 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.JsonElement + +/** + * + * + */ +@Serializable +class GetBugReport200ResponseItemsInnerMetadataAnyOfValue diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetCohort200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetCohort200Response.kt new file mode 100644 index 0000000..e2cd4df --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetCohort200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetCohort200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetCohort200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetCohort200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetCohort200ResponseItemsInner.kt new file mode 100644 index 0000000..e45aa12 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetCohort200ResponseItemsInner.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param classroomIds + * @param id + * @param name + * @param short + * @param teacherId + * @param timetableId + */ +@Serializable +data class GetCohort200ResponseItemsInner( + @SerialName(value = "classroomIds") @Required val classroomIds: kotlin.collections.List?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "short") @Required val short: kotlin.String?, + @SerialName(value = "teacherId") @Required val teacherId: kotlin.String?, + @SerialName(value = "timetableId") @Required val timetableId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDashboardStats200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDashboardStats200Response.kt new file mode 100644 index 0000000..1da7aea --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDashboardStats200Response.kt @@ -0,0 +1,31 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDashboardStats200ResponseStats +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param stats + */ +@Serializable +data class GetDashboardStats200Response( + @SerialName(value = "stats") @Required val stats: GetDashboardStats200ResponseStats, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDashboardStats200ResponseStats.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDashboardStats200ResponseStats.kt new file mode 100644 index 0000000..cb32a35 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDashboardStats200ResponseStats.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDashboardStats200ResponseStatsChartDataInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param chartData + * @param chartTotalMovedLessons + * @param chartTotalSubstitutions + * @param totalCohorts + * @param totalMovedLessons + * @param totalRoles + * @param totalSubstitutions + * @param totalUsers + */ +@Serializable +data class GetDashboardStats200ResponseStats( + @SerialName(value = "chartData") @Required val chartData: kotlin.collections.List, + @SerialName(value = "chartTotalMovedLessons") @Required val chartTotalMovedLessons: kotlin.Int?, + @SerialName(value = "chartTotalSubstitutions") @Required val chartTotalSubstitutions: kotlin.Int?, + @SerialName(value = "totalCohorts") @Required val totalCohorts: kotlin.Int?, + @SerialName(value = "totalMovedLessons") @Required val totalMovedLessons: kotlin.Int?, + @SerialName(value = "totalRoles") @Required val totalRoles: kotlin.Int?, + @SerialName(value = "totalSubstitutions") @Required val totalSubstitutions: kotlin.Int?, + @SerialName(value = "totalUsers") @Required val totalUsers: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDashboardStats200ResponseStatsChartDataInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDashboardStats200ResponseStatsChartDataInner.kt new file mode 100644 index 0000000..eaf52f1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDashboardStats200ResponseStatsChartDataInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param date + * @param movedLessons + * @param substitutions + */ +@Serializable +data class GetDashboardStats200ResponseStatsChartDataInner( + @SerialName(value = "date") @Required val date: kotlin.String?, + @SerialName(value = "movedLessons") @Required val movedLessons: kotlin.Int, + @SerialName(value = "substitutions") @Required val substitutions: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200Response.kt new file mode 100644 index 0000000..09c21f9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockCards200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetDoorlockCards200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200ResponseItemsInner.kt new file mode 100644 index 0000000..fab8666 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200ResponseItemsInner.kt @@ -0,0 +1,51 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockCards200ResponseItemsInnerAuthorizedDevicesInner +import hu.petrik.filcapp.api.model.GetDoorlockCards200ResponseItemsInnerOwner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorizedDevices + * @param cardData + * @param createdAt + * @param enabled + * @param frozen + * @param id + * @param name + * @param updatedAt + * @param userId + * @param owner + */ +@Serializable +data class GetDoorlockCards200ResponseItemsInner( + @SerialName(value = "authorizedDevices") @Required val authorizedDevices: + kotlin.collections.List, + @SerialName(value = "cardData") @Required val cardData: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "enabled") @Required val enabled: kotlin.Boolean, + @SerialName(value = "frozen") @Required val frozen: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, + @SerialName(value = "owner") val owner: GetDoorlockCards200ResponseItemsInnerOwner? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200ResponseItemsInnerAuthorizedDevicesInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200ResponseItemsInnerAuthorizedDevicesInner.kt new file mode 100644 index 0000000..736c9ce --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200ResponseItemsInnerAuthorizedDevicesInner.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param name + */ +@Serializable +data class GetDoorlockCards200ResponseItemsInnerAuthorizedDevicesInner( + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200ResponseItemsInnerOwner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200ResponseItemsInnerOwner.kt new file mode 100644 index 0000000..d96c8fa --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCards200ResponseItemsInnerOwner.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param id + * @param name + * @param nickname + */ +@Serializable +data class GetDoorlockCards200ResponseItemsInnerOwner( + @SerialName(value = "email") @Required val email: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCardsUsers200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCardsUsers200Response.kt new file mode 100644 index 0000000..1f71969 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCardsUsers200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockCardsUsers200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetDoorlockCardsUsers200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCardsUsers200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCardsUsers200ResponseItemsInner.kt new file mode 100644 index 0000000..014efe0 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockCardsUsers200ResponseItemsInner.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param id + * @param name + * @param nickname + */ +@Serializable +data class GetDoorlockCardsUsers200ResponseItemsInner( + @SerialName(value = "email") @Required val email: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevices200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevices200Response.kt new file mode 100644 index 0000000..efe0d73 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevices200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockDevices200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetDoorlockDevices200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevices200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevices200ResponseItemsInner.kt new file mode 100644 index 0000000..2181aa4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevices200ResponseItemsInner.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param apiToken + * @param createdAt + * @param id + * @param lastResetReason + * @param location + * @param name + * @param updatedAt + */ +@Serializable +data class GetDoorlockDevices200ResponseItemsInner( + @SerialName(value = "apiToken") @Required val apiToken: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "lastResetReason") @Required val lastResetReason: kotlin.String?, + @SerialName(value = "location") @Required val location: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200Response.kt new file mode 100644 index 0000000..49d8906 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200Response.kt @@ -0,0 +1,31 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockDevicesByIdStats200ResponseStatsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param stats + */ +@Serializable +data class GetDoorlockDevicesByIdStats200Response( + @SerialName(value = "stats") @Required val stats: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInner.kt new file mode 100644 index 0000000..b630910 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInner.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMeta +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param deviceMeta + * @param id + * @param timestamp + */ +@Serializable +data class GetDoorlockDevicesByIdStats200ResponseStatsInner( + @SerialName(value = "deviceMeta") @Required val deviceMeta: GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMeta, + @SerialName(value = "id") @Required val id: kotlin.Int?, + @SerialName(value = "timestamp") @Required val timestamp: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMeta.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMeta.kt new file mode 100644 index 0000000..68f368b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMeta.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebug +import hu.petrik.filcapp.api.model.GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaStorage +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param debug + * @param fwVersion + * @param ramFree + * @param storage + * @param uptime + */ +@Serializable +data class GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMeta( + @SerialName(value = "debug") @Required val debug: GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebug, + @SerialName(value = "fwVersion") @Required val fwVersion: kotlin.String?, + @SerialName(value = "ramFree") @Required val ramFree: kotlin.Double?, + @SerialName(value = "storage") @Required val storage: GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaStorage, + @SerialName(value = "uptime") @Required val uptime: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebug.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebug.kt new file mode 100644 index 0000000..62c07b8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebug.kt @@ -0,0 +1,58 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebugErrors +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param deviceState + * @param errors + * @param lastResetReason + */ +@Serializable +data class GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebug( + @SerialName(value = "deviceState") @Required val deviceState: + GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebug.DeviceState, + @SerialName(value = "errors") @Required val errors: GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebugErrors, + @SerialName(value = "lastResetReason") @Required val lastResetReason: kotlin.String?, +) { + /** + * + * + * Values: booting,error,idle,updating + */ + @Serializable + enum class DeviceState( + val value: kotlin.String, + ) { + @SerialName(value = "booting") + booting("booting"), + + @SerialName(value = "error") + error("error"), + + @SerialName(value = "idle") + idle("idle"), + + @SerialName(value = "updating") + updating("updating"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebugErrors.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebugErrors.kt new file mode 100644 index 0000000..bc68d2e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebugErrors.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param db + * @param nfc + * @param ota + * @param sd + * @param wifi + */ +@Serializable +data class GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaDebugErrors( + @SerialName(value = "db") @Required val db: kotlin.Boolean, + @SerialName(value = "nfc") @Required val nfc: kotlin.Boolean, + @SerialName(value = "ota") @Required val ota: kotlin.Boolean, + @SerialName(value = "sd") @Required val sd: kotlin.Boolean, + @SerialName(value = "wifi") @Required val wifi: kotlin.Boolean, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaStorage.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaStorage.kt new file mode 100644 index 0000000..c4b8067 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaStorage.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param total + * @param used + */ +@Serializable +data class GetDoorlockDevicesByIdStats200ResponseStatsInnerDeviceMetaStorage( + @SerialName(value = "total") @Required val total: kotlin.Double?, + @SerialName(value = "used") @Required val used: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockLogs200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockLogs200Response.kt new file mode 100644 index 0000000..6de4d2b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockLogs200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockLogs200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetDoorlockLogs200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockLogs200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockLogs200ResponseItemsInner.kt new file mode 100644 index 0000000..bb4c661 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockLogs200ResponseItemsInner.kt @@ -0,0 +1,52 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockLogs200ResponseItemsInnerCard +import hu.petrik.filcapp.api.model.PostDoorlockCards201ResponseOwner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buttonPressed + * @param cardData + * @param cardId + * @param deviceId + * @param id + * @param result + * @param timestamp + * @param userId + * @param card + * @param device + * @param owner + */ +@Serializable +data class GetDoorlockLogs200ResponseItemsInner( + @SerialName(value = "buttonPressed") @Required val buttonPressed: kotlin.Boolean, + @SerialName(value = "cardData") @Required val cardData: kotlin.String?, + @SerialName(value = "cardId") @Required val cardId: kotlin.String?, + @SerialName(value = "deviceId") @Required val deviceId: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.Int?, + @SerialName(value = "result") @Required val result: kotlin.Boolean, + @SerialName(value = "timestamp") @Required val timestamp: kotlin.String?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, + @SerialName(value = "card") val card: GetDoorlockLogs200ResponseItemsInnerCard? = null, + @SerialName(value = "device") val device: GetDoorlockLogs200ResponseItemsInnerCard? = null, + @SerialName(value = "owner") val owner: PostDoorlockCards201ResponseOwner? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockLogs200ResponseItemsInnerCard.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockLogs200ResponseItemsInnerCard.kt new file mode 100644 index 0000000..199d8de --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockLogs200ResponseItemsInnerCard.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param name + */ +@Serializable +data class GetDoorlockLogs200ResponseItemsInnerCard( + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200Response.kt new file mode 100644 index 0000000..bf28656 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200Response.kt @@ -0,0 +1,31 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockStatsOverview200ResponseStats +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param stats + */ +@Serializable +data class GetDoorlockStatsOverview200Response( + @SerialName(value = "stats") @Required val stats: GetDoorlockStatsOverview200ResponseStats, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200ResponseStats.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200ResponseStats.kt new file mode 100644 index 0000000..8675325 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200ResponseStats.kt @@ -0,0 +1,41 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockStatsOverview200ResponseStatsDoorOpenSeriesInner +import hu.petrik.filcapp.api.model.GetDoorlockStatsOverview200ResponseStatsTopUsersInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param doorOpenSeries + * @param topUsers + * @param totalCards + * @param totalDevices + * @param totalSuccessfulOpens + */ +@Serializable +data class GetDoorlockStatsOverview200ResponseStats( + @SerialName(value = "doorOpenSeries") @Required val doorOpenSeries: + kotlin.collections.List, + @SerialName(value = "topUsers") @Required val topUsers: kotlin.collections.List, + @SerialName(value = "totalCards") @Required val totalCards: kotlin.Int?, + @SerialName(value = "totalDevices") @Required val totalDevices: kotlin.Int?, + @SerialName(value = "totalSuccessfulOpens") @Required val totalSuccessfulOpens: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200ResponseStatsDoorOpenSeriesInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200ResponseStatsDoorOpenSeriesInner.kt new file mode 100644 index 0000000..51b07c2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200ResponseStatsDoorOpenSeriesInner.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param count + * @param date + */ +@Serializable +data class GetDoorlockStatsOverview200ResponseStatsDoorOpenSeriesInner( + @SerialName(value = "count") @Required val count: kotlin.Int?, + @SerialName(value = "date") @Required val date: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200ResponseStatsTopUsersInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200ResponseStatsTopUsersInner.kt new file mode 100644 index 0000000..d383290 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetDoorlockStatsOverview200ResponseStatsTopUsersInner.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param count + * @param id + * @param name + * @param nickname + */ +@Serializable +data class GetDoorlockStatsOverview200ResponseStatsTopUsersInner( + @SerialName(value = "count") @Required val count: kotlin.Int?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetHealth200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetHealth200Response.kt new file mode 100644 index 0000000..210b607 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetHealth200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.JsonElement + +/** + * + * + * @param database + * @param status + */ +@Serializable +data class GetHealth200Response( + @SerialName(value = "database") @Required val database: JsonElement?, + @SerialName(value = "status") @Required val status: JsonElement?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKiosk200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKiosk200Response.kt new file mode 100644 index 0000000..6ddcce2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKiosk200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetKiosk200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetKiosk200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKiosk200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKiosk200ResponseItemsInner.kt new file mode 100644 index 0000000..1eaf202 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKiosk200ResponseItemsInner.kt @@ -0,0 +1,51 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param appVersion + * @param config + * @param createdAt + * @param enabled + * @param id + * @param kind + * @param lastSeenAt + * @param lastSeenIp + * @param machineId + * @param name + * @param updatedAt + */ +@Serializable +data class GetKiosk200ResponseItemsInner( + @SerialName(value = "appVersion") @Required val appVersion: kotlin.String?, + @SerialName(value = "config") @Required val config: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "enabled") @Required val enabled: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "kind") @Required val kind: kotlin.String?, + @SerialName(value = "lastSeenAt") @Required val lastSeenAt: kotlin.String?, + @SerialName(value = "lastSeenIp") @Required val lastSeenIp: kotlin.String?, + @SerialName(value = "machineId") @Required val machineId: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskNews200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskNews200Response.kt new file mode 100644 index 0000000..9c84a1c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskNews200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetKioskNews200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetKioskNews200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskNews200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskNews200ResponseItemsInner.kt new file mode 100644 index 0000000..6ccbd0e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskNews200ResponseItemsInner.kt @@ -0,0 +1,44 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param body + * @param highlighted + * @param id + * @param imageVersion + * @param kioskIds + * @param title + * @param validFrom + * @param validUntil + */ +@Serializable +data class GetKioskNews200ResponseItemsInner( + @SerialName(value = "body") @Required val body: kotlin.String?, + @SerialName(value = "highlighted") @Required val highlighted: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "imageVersion") @Required val imageVersion: kotlin.String?, + @SerialName(value = "kioskIds") @Required val kioskIds: kotlin.collections.List, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String?, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskPetrikNews200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskPetrikNews200Response.kt new file mode 100644 index 0000000..44f323d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskPetrikNews200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetKioskPetrikNews200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetKioskPetrikNews200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskPetrikNews200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskPetrikNews200ResponseItemsInner.kt new file mode 100644 index 0000000..bcce40d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskPetrikNews200ResponseItemsInner.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param body + * @param imageUrl + * @param publishedAt + * @param title + * @param url + */ +@Serializable +data class GetKioskPetrikNews200ResponseItemsInner( + @SerialName(value = "body") @Required val body: kotlin.String?, + @SerialName(value = "imageUrl") @Required val imageUrl: kotlin.String?, + @SerialName(value = "publishedAt") @Required val publishedAt: kotlin.String?, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "url") @Required val url: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskWeather200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskWeather200Response.kt new file mode 100644 index 0000000..97667bb --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetKioskWeather200Response.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param icon + * @param precipMm + * @param tempC + * @param windKph + */ +@Serializable +data class GetKioskWeather200Response( + @SerialName(value = "icon") @Required val icon: kotlin.String?, + @SerialName(value = "precipMm") @Required val precipMm: kotlin.Double?, + @SerialName(value = "tempC") @Required val tempC: kotlin.Double?, + @SerialName(value = "windKph") @Required val windKph: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorBuildings200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorBuildings200Response.kt new file mode 100644 index 0000000..edc54cf --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorBuildings200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNavigatorBuildings200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNavigatorBuildings200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorBuildings200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorBuildings200ResponseItemsInner.kt new file mode 100644 index 0000000..05099b7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorBuildings200ResponseItemsInner.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param description + * @param id + * @param mapped + * @param name + * @param x + * @param y + */ +@Serializable +data class GetNavigatorBuildings200ResponseItemsInner( + @SerialName(value = "description") @Required val description: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "mapped") @Required val mapped: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "x") @Required val x: kotlin.Double?, + @SerialName(value = "y") @Required val y: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassroomTypes200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassroomTypes200Response.kt new file mode 100644 index 0000000..db26730 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassroomTypes200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNavigatorClassroomTypes200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNavigatorClassroomTypes200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassroomTypes200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassroomTypes200ResponseItemsInner.kt new file mode 100644 index 0000000..e660996 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassroomTypes200ResponseItemsInner.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param colorhex + * @param createdAt + * @param id + * @param name + * @param updatedAt + */ +@Serializable +data class GetNavigatorClassroomTypes200ResponseItemsInner( + @SerialName(value = "colorhex") @Required val colorhex: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassrooms200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassrooms200Response.kt new file mode 100644 index 0000000..73a1c7d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassrooms200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNavigatorClassrooms200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNavigatorClassrooms200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassrooms200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassrooms200ResponseItemsInner.kt new file mode 100644 index 0000000..89b9c5a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorClassrooms200ResponseItemsInner.kt @@ -0,0 +1,58 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param capacity + * @param description + * @param id + * @param mapped + * @param name + * @param rotation + * @param short + * @param sizeX + * @param sizeY + * @param sizeZ + * @param storey + * @param typeId + * @param x + * @param y + */ +@Serializable +data class GetNavigatorClassrooms200ResponseItemsInner( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String?, + @SerialName(value = "capacity") @Required val capacity: kotlin.Int?, + @SerialName(value = "description") @Required val description: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "mapped") @Required val mapped: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "rotation") @Required val rotation: kotlin.Double?, + @SerialName(value = "short") @Required val short: kotlin.String?, + @SerialName(value = "size_x") @Required val sizeX: kotlin.Double?, + @SerialName(value = "size_y") @Required val sizeY: kotlin.Double?, + @SerialName(value = "size_z") @Required val sizeZ: kotlin.Double?, + @SerialName(value = "storey") @Required val storey: kotlin.Int?, + @SerialName(value = "type_id") @Required val typeId: kotlin.String?, + @SerialName(value = "x") @Required val x: kotlin.Double?, + @SerialName(value = "y") @Required val y: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorCorridors200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorCorridors200Response.kt new file mode 100644 index 0000000..deb3592 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorCorridors200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNavigatorCorridors200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNavigatorCorridors200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorCorridors200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorCorridors200ResponseItemsInner.kt new file mode 100644 index 0000000..20e0317 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorCorridors200ResponseItemsInner.kt @@ -0,0 +1,54 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param barrierFree + * @param buildingId + * @param createdAt + * @param id + * @param isOutdoor + * @param name + * @param storey + * @param updatedAt + * @param width + * @param x1 + * @param x2 + * @param y1 + * @param y2 + */ +@Serializable +data class GetNavigatorCorridors200ResponseItemsInner( + @SerialName(value = "barrier_free") @Required val barrierFree: kotlin.Boolean, + @SerialName(value = "building_id") @Required val buildingId: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "is_outdoor") @Required val isOutdoor: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "storey") @Required val storey: kotlin.Int?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "width") @Required val width: kotlin.Double?, + @SerialName(value = "x1") @Required val x1: kotlin.Double?, + @SerialName(value = "x2") @Required val x2: kotlin.Double?, + @SerialName(value = "y1") @Required val y1: kotlin.Double?, + @SerialName(value = "y2") @Required val y2: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorGraph200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorGraph200Response.kt new file mode 100644 index 0000000..d9dacf8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorGraph200Response.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNavigatorGraph200ResponseLiftsInner +import hu.petrik.filcapp.api.model.GetNavigatorGraph200ResponseStairsInner +import hu.petrik.filcapp.api.model.PostNavigatorBuildings201Response +import hu.petrik.filcapp.api.model.PostNavigatorClassroomTypes201Response +import hu.petrik.filcapp.api.model.PostNavigatorCorridors201Response +import hu.petrik.filcapp.api.model.PutNavigatorClassroomsById200Response +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildings + * @param classroomTypes + * @param classrooms + * @param corridors + * @param lifts + * @param stairs + */ +@Serializable +data class GetNavigatorGraph200Response( + @SerialName(value = "buildings") @Required val buildings: kotlin.collections.List, + @SerialName(value = "classroom_types") @Required val classroomTypes: kotlin.collections.List, + @SerialName(value = "classrooms") @Required val classrooms: kotlin.collections.List, + @SerialName(value = "corridors") @Required val corridors: kotlin.collections.List, + @SerialName(value = "lifts") @Required val lifts: kotlin.collections.List, + @SerialName(value = "stairs") @Required val stairs: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorGraph200ResponseLiftsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorGraph200ResponseLiftsInner.kt new file mode 100644 index 0000000..850643f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorGraph200ResponseLiftsInner.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param createdAt + * @param id + * @param maxStorey + * @param minStorey + * @param name + * @param updatedAt + * @param x + * @param y + */ +@Serializable +data class GetNavigatorGraph200ResponseLiftsInner( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "max_storey") @Required val maxStorey: kotlin.Int?, + @SerialName(value = "min_storey") @Required val minStorey: kotlin.Int?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "x") @Required val x: kotlin.Double?, + @SerialName(value = "y") @Required val y: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorGraph200ResponseStairsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorGraph200ResponseStairsInner.kt new file mode 100644 index 0000000..cd77fe2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorGraph200ResponseStairsInner.kt @@ -0,0 +1,48 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param createdAt + * @param id + * @param maxStorey + * @param minStorey + * @param name + * @param rotation + * @param updatedAt + * @param x + * @param y + */ +@Serializable +data class GetNavigatorGraph200ResponseStairsInner( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "max_storey") @Required val maxStorey: kotlin.Int?, + @SerialName(value = "min_storey") @Required val minStorey: kotlin.Int?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "rotation") @Required val rotation: kotlin.Double?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "x") @Required val x: kotlin.Double?, + @SerialName(value = "y") @Required val y: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorLifts200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorLifts200Response.kt new file mode 100644 index 0000000..211487b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorLifts200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNavigatorLifts200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNavigatorLifts200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorLifts200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorLifts200ResponseItemsInner.kt new file mode 100644 index 0000000..32991b9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorLifts200ResponseItemsInner.kt @@ -0,0 +1,46 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param createdAt + * @param id + * @param maxStorey + * @param minStorey + * @param name + * @param updatedAt + * @param x + * @param y + */ +@Serializable +data class GetNavigatorLifts200ResponseItemsInner( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "max_storey") @Required val maxStorey: kotlin.Int, + @SerialName(value = "min_storey") @Required val minStorey: kotlin.Int, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "x") @Required val x: kotlin.Double, + @SerialName(value = "y") @Required val y: kotlin.Double, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorStairs200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorStairs200Response.kt new file mode 100644 index 0000000..5852270 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorStairs200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNavigatorStairs200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNavigatorStairs200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorStairs200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorStairs200ResponseItemsInner.kt new file mode 100644 index 0000000..f0bb98f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorStairs200ResponseItemsInner.kt @@ -0,0 +1,48 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param createdAt + * @param id + * @param maxStorey + * @param minStorey + * @param name + * @param rotation + * @param updatedAt + * @param x + * @param y + */ +@Serializable +data class GetNavigatorStairs200ResponseItemsInner( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "max_storey") @Required val maxStorey: kotlin.Int, + @SerialName(value = "min_storey") @Required val minStorey: kotlin.Int, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "rotation") @Required val rotation: kotlin.Double, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "x") @Required val x: kotlin.Double, + @SerialName(value = "y") @Required val y: kotlin.Double, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorTranslations200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorTranslations200Response.kt new file mode 100644 index 0000000..40c09d6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorTranslations200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNavigatorTranslations200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNavigatorTranslations200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorTranslations200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorTranslations200ResponseItemsInner.kt new file mode 100644 index 0000000..b50fa94 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorTranslations200ResponseItemsInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param langKey + * @param text + * @param textKey + */ +@Serializable +data class GetNavigatorTranslations200ResponseItemsInner( + @SerialName(value = "lang_key") @Required val langKey: kotlin.String?, + @SerialName(value = "text") @Required val text: kotlin.String?, + @SerialName(value = "text_key") @Required val textKey: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorTranslationsAvailable200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorTranslationsAvailable200Response.kt new file mode 100644 index 0000000..5e14d73 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNavigatorTranslationsAvailable200Response.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNavigatorTranslationsAvailable200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncements200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncements200Response.kt new file mode 100644 index 0000000..e1be6df --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncements200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNewsAnnouncements200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNewsAnnouncements200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncements200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncements200ResponseItemsInner.kt new file mode 100644 index 0000000..8fd1d4b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncements200ResponseItemsInner.kt @@ -0,0 +1,64 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNewsAnnouncements200ResponseItemsInnerAuthor +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param highlighted + * @param id + * @param imageByteSize + * @param imageContentType + * @param imageKey + * @param imageUpdatedAt + * @param kioskOnly + * @param title + * @param updatedAt + * @param validFrom + * @param validUntil + * @param cohortIds + * @param kioskIds + * @param author + */ +@Serializable +data class GetNewsAnnouncements200ResponseItemsInner( + @SerialName(value = "authorId") @Required val authorId: kotlin.String?, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "highlighted") @Required val highlighted: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "imageByteSize") @Required val imageByteSize: kotlin.Double?, + @SerialName(value = "imageContentType") @Required val imageContentType: kotlin.String?, + @SerialName(value = "imageKey") @Required val imageKey: kotlin.String?, + @SerialName(value = "imageUpdatedAt") @Required val imageUpdatedAt: kotlin.String?, + @SerialName(value = "kioskOnly") @Required val kioskOnly: kotlin.Boolean, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String?, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String?, + @SerialName(value = "cohortIds") @Required val cohortIds: kotlin.collections.List, + @SerialName(value = "kioskIds") @Required val kioskIds: kotlin.collections.List, + @SerialName(value = "author") val author: GetNewsAnnouncements200ResponseItemsInnerAuthor? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncements200ResponseItemsInnerAuthor.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncements200ResponseItemsInnerAuthor.kt new file mode 100644 index 0000000..df63314 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncements200ResponseItemsInnerAuthor.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param image + * @param name + */ +@Serializable +data class GetNewsAnnouncements200ResponseItemsInnerAuthor( + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "image") @Required val image: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncementsById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncementsById200Response.kt new file mode 100644 index 0000000..1193e3d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncementsById200Response.kt @@ -0,0 +1,64 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNewsAnnouncementsById200ResponseAuthor +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param highlighted + * @param id + * @param imageByteSize + * @param imageContentType + * @param imageKey + * @param imageUpdatedAt + * @param kioskOnly + * @param title + * @param updatedAt + * @param validFrom + * @param validUntil + * @param cohortIds + * @param kioskIds + * @param author + */ +@Serializable +data class GetNewsAnnouncementsById200Response( + @SerialName(value = "authorId") @Required val authorId: kotlin.String, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "highlighted") @Required val highlighted: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "imageByteSize") @Required val imageByteSize: kotlin.Double?, + @SerialName(value = "imageContentType") @Required val imageContentType: kotlin.String?, + @SerialName(value = "imageKey") @Required val imageKey: kotlin.String?, + @SerialName(value = "imageUpdatedAt") @Required val imageUpdatedAt: kotlin.String?, + @SerialName(value = "kioskOnly") @Required val kioskOnly: kotlin.Boolean, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String, + @SerialName(value = "cohortIds") @Required val cohortIds: kotlin.collections.List, + @SerialName(value = "kioskIds") @Required val kioskIds: kotlin.collections.List, + @SerialName(value = "author") val author: GetNewsAnnouncementsById200ResponseAuthor? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncementsById200ResponseAuthor.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncementsById200ResponseAuthor.kt new file mode 100644 index 0000000..794ce32 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsAnnouncementsById200ResponseAuthor.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param image + * @param name + */ +@Serializable +data class GetNewsAnnouncementsById200ResponseAuthor( + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "image") @Required val image: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsBlogs200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsBlogs200Response.kt new file mode 100644 index 0000000..7619d75 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsBlogs200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNewsBlogs200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNewsBlogs200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsBlogs200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsBlogs200ResponseItemsInner.kt new file mode 100644 index 0000000..1be231f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsBlogs200ResponseItemsInner.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNewsAnnouncementsById200ResponseAuthor +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param id + * @param publishedAt + * @param slug + * @param status + * @param title + * @param updatedAt + * @param author + */ +@Serializable +data class GetNewsBlogs200ResponseItemsInner( + @SerialName(value = "authorId") @Required val authorId: kotlin.String?, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "publishedAt") @Required val publishedAt: kotlin.String?, + @SerialName(value = "slug") @Required val slug: kotlin.String?, + @SerialName(value = "status") @Required val status: kotlin.String?, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "author") val author: GetNewsAnnouncementsById200ResponseAuthor? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsBlogsBySlug200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsBlogsBySlug200Response.kt new file mode 100644 index 0000000..140500c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsBlogsBySlug200Response.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNewsAnnouncementsById200ResponseAuthor +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param id + * @param publishedAt + * @param slug + * @param status + * @param title + * @param updatedAt + * @param author + */ +@Serializable +data class GetNewsBlogsBySlug200Response( + @SerialName(value = "authorId") @Required val authorId: kotlin.String, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "publishedAt") @Required val publishedAt: kotlin.String?, + @SerialName(value = "slug") @Required val slug: kotlin.String, + @SerialName(value = "status") @Required val status: kotlin.String, + @SerialName(value = "title") @Required val title: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "author") val author: GetNewsAnnouncementsById200ResponseAuthor? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsSystemMessages200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsSystemMessages200Response.kt new file mode 100644 index 0000000..8406519 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsSystemMessages200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNewsSystemMessages200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNewsSystemMessages200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsSystemMessages200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsSystemMessages200ResponseItemsInner.kt new file mode 100644 index 0000000..e740a21 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsSystemMessages200ResponseItemsInner.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNewsAnnouncementsById200ResponseAuthor +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param id + * @param title + * @param updatedAt + * @param validFrom + * @param validUntil + * @param cohortIds + * @param author + */ +@Serializable +data class GetNewsSystemMessages200ResponseItemsInner( + @SerialName(value = "authorId") @Required val authorId: kotlin.String?, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String?, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String?, + @SerialName(value = "cohortIds") @Required val cohortIds: kotlin.collections.List, + @SerialName(value = "author") val author: GetNewsAnnouncementsById200ResponseAuthor? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsSystemMessagesById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsSystemMessagesById200Response.kt new file mode 100644 index 0000000..1b4eea8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNewsSystemMessagesById200Response.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNewsAnnouncementsById200ResponseAuthor +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param id + * @param title + * @param updatedAt + * @param validFrom + * @param validUntil + * @param cohortIds + * @param author + */ +@Serializable +data class GetNewsSystemMessagesById200Response( + @SerialName(value = "authorId") @Required val authorId: kotlin.String, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "title") @Required val title: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String, + @SerialName(value = "cohortIds") @Required val cohortIds: kotlin.collections.List, + @SerialName(value = "author") val author: GetNewsAnnouncementsById200ResponseAuthor? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotifications200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotifications200Response.kt new file mode 100644 index 0000000..0b5c69e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotifications200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNotifications200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetNotifications200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotifications200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotifications200ResponseItemsInner.kt new file mode 100644 index 0000000..98a2614 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotifications200ResponseItemsInner.kt @@ -0,0 +1,44 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param content + * @param createdAt + * @param id + * @param metadata + * @param read + * @param title + * @param type + * @param userId + */ +@Serializable +data class GetNotifications200ResponseItemsInner( + @SerialName(value = "content") @Required val content: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "metadata") @Required val metadata: kotlin.collections.Map?, + @SerialName(value = "read") @Required val read: kotlin.Boolean, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "type") @Required val type: kotlin.String?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotificationsSettings200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotificationsSettings200Response.kt new file mode 100644 index 0000000..9b19573 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotificationsSettings200Response.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetNotificationsSettings200ResponseNotificationPreferences +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param id + * @param language + * @param notificationPreferences + * @param theme + * @param timetableClassColors + * @param timetableGroupDisplay + * @param timetableView + * @param updatedAt + * @param userId + */ +@Serializable +data class GetNotificationsSettings200Response( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "language") @Required val language: kotlin.String?, + @SerialName(value = "notificationPreferences") @Required val notificationPreferences: + GetNotificationsSettings200ResponseNotificationPreferences, + @SerialName(value = "theme") @Required val theme: kotlin.String?, + @SerialName(value = "timetableClassColors") @Required val timetableClassColors: kotlin.collections.Map, + @SerialName(value = "timetableGroupDisplay") @Required val timetableGroupDisplay: kotlin.String?, + @SerialName(value = "timetableView") @Required val timetableView: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotificationsSettings200ResponseNotificationPreferences.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotificationsSettings200ResponseNotificationPreferences.kt new file mode 100644 index 0000000..5a3e90f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotificationsSettings200ResponseNotificationPreferences.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param announcement + * @param blogPost + * @param channelsEnabled + * @param doorlockCardUsed + * @param movedLesson + * @param substitution + * @param systemMessage + */ +@Serializable +data class GetNotificationsSettings200ResponseNotificationPreferences( + @SerialName(value = "announcement") @Required val announcement: kotlin.Boolean, + @SerialName(value = "blogPost") @Required val blogPost: kotlin.Boolean, + @SerialName(value = "channelsEnabled") @Required val channelsEnabled: kotlin.Boolean, + @SerialName(value = "doorlockCardUsed") @Required val doorlockCardUsed: kotlin.Boolean, + @SerialName(value = "movedLesson") @Required val movedLesson: kotlin.Boolean, + @SerialName(value = "substitution") @Required val substitution: kotlin.Boolean, + @SerialName(value = "systemMessage") @Required val systemMessage: kotlin.Boolean, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotificationsUnreadCount200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotificationsUnreadCount200Response.kt new file mode 100644 index 0000000..5451859 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetNotificationsUnreadCount200Response.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param count + */ +@Serializable +data class GetNotificationsUnreadCount200Response( + @SerialName(value = "count") @Required val count: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetPing200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetPing200Response.kt new file mode 100644 index 0000000..bbbba24 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetPing200Response.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param message + */ +@Serializable +data class GetPing200Response( + @SerialName(value = "message") @Required val message: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetPingUptime200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetPingUptime200Response.kt new file mode 100644 index 0000000..5e9e0b3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetPingUptime200Response.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param pretty + * @param uptimeMs + */ +@Serializable +data class GetPingUptime200Response( + @SerialName(value = "pretty") @Required val pretty: kotlin.String?, + @SerialName(value = "uptime_ms") @Required val uptimeMs: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetRoles200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetRoles200Response.kt new file mode 100644 index 0000000..b2471b9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetRoles200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetRoles200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetRoles200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetRoles200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetRoles200ResponseItemsInner.kt new file mode 100644 index 0000000..ccb8303 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetRoles200ResponseItemsInner.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param can + * @param name + */ +@Serializable +data class GetRoles200ResponseItemsInner( + @SerialName(value = "can") @Required val can: kotlin.collections.List, + @SerialName(value = "name") @Required val name: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableGroupsGetForCohortByCohortId200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableGroupsGetForCohortByCohortId200Response.kt new file mode 100644 index 0000000..d13db9e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableGroupsGetForCohortByCohortId200Response.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableGroupsGetForCohortByCohortId200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetableGroupsGetForCohortByCohortId200Response( + @SerialName(value = "items") @Required val items: + kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableGroupsGetForCohortByCohortId200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableGroupsGetForCohortByCohortId200ResponseItemsInner.kt new file mode 100644 index 0000000..a7e601d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableGroupsGetForCohortByCohortId200ResponseItemsInner.kt @@ -0,0 +1,44 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param divisionLabel + * @param divisionTag + * @param entireClass + * @param id + * @param name + * @param selected + * @param studentCount + * @param teacherId + */ +@Serializable +data class GetTimetableGroupsGetForCohortByCohortId200ResponseItemsInner( + @SerialName(value = "divisionLabel") @Required val divisionLabel: kotlin.String?, + @SerialName(value = "divisionTag") @Required val divisionTag: kotlin.String?, + @SerialName(value = "entireClass") @Required val entireClass: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "selected") @Required val selected: kotlin.Boolean, + @SerialName(value = "studentCount") @Required val studentCount: kotlin.Double?, + @SerialName(value = "teacherId") @Required val teacherId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200Response.kt new file mode 100644 index 0000000..4e9dbf9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200Response.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetableLessonsGetForCohortByCohortId200Response( + @SerialName(value = "items") @Required val items: + kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInner.kt new file mode 100644 index 0000000..e6725d0 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInner.kt @@ -0,0 +1,66 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerClassroomsInner +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerDay +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerGroupsInner +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerWeekDefinition +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param classrooms + * @param cohorts + * @param groups + * @param groupsIds + * @param id + * @param period + * @param periodsPerWeek + * @param subject + * @param teachers + * @param termDefinitionId + * @param weekDefinition + * @param weeksDefinitionId + * @param day + */ +@Serializable +data class GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInner( + @SerialName(value = "classrooms") @Required val classrooms: + kotlin.collections.List, + @SerialName(value = "cohorts") @Required val cohorts: + kotlin.collections.List, + @SerialName(value = "groups") @Required val groups: + kotlin.collections.List, + @SerialName(value = "groupsIds") @Required val groupsIds: kotlin.collections.List, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "period") @Required val period: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod?, + @SerialName(value = "periodsPerWeek") @Required val periodsPerWeek: kotlin.Double?, + @SerialName(value = "subject") @Required val subject: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject?, + @SerialName(value = "teachers") @Required val teachers: + kotlin.collections.List, + @SerialName(value = "termDefinitionId") @Required val termDefinitionId: kotlin.String?, + @SerialName(value = "weekDefinition") @Required val weekDefinition: + GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerWeekDefinition?, + @SerialName(value = "weeksDefinitionId") @Required val weeksDefinitionId: kotlin.String?, + @SerialName(value = "day") val day: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerDay? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerClassroomsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerClassroomsInner.kt new file mode 100644 index 0000000..953c504 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerClassroomsInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param name + * @param short + */ +@Serializable +data class GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerClassroomsInner( + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "short") @Required val short: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner.kt new file mode 100644 index 0000000..9e185b7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param name + * @param short + */ +@Serializable +data class GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner( + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "short") @Required val short: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerDay.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerDay.kt new file mode 100644 index 0000000..9d2bb05 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerDay.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param days + * @param id + * @param name + * @param short + * @param updatedAt + */ +@Serializable +data class GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerDay( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "days") @Required val days: kotlin.collections.List?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "short") @Required val short: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerGroupsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerGroupsInner.kt new file mode 100644 index 0000000..1ab53c9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerGroupsInner.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param divisionTag + * @param entireClass + * @param id + * @param name + */ +@Serializable +data class GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerGroupsInner( + @SerialName(value = "divisionTag") @Required val divisionTag: kotlin.String?, + @SerialName(value = "entireClass") @Required val entireClass: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod.kt new file mode 100644 index 0000000..aa2c18c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param endTime + * @param id + * @param period + * @param startTime + */ +@Serializable +data class GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod( + @SerialName(value = "endTime") @Required val endTime: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "period") @Required val period: kotlin.Double, + @SerialName(value = "startTime") @Required val startTime: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject.kt new file mode 100644 index 0000000..f58e1a4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param name + * @param short + */ +@Serializable +data class GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject( + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "short") @Required val short: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerWeekDefinition.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerWeekDefinition.kt new file mode 100644 index 0000000..fefd55b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerWeekDefinition.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param name + * @param short + * @param weeks + */ +@Serializable +data class GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerWeekDefinition( + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "short") @Required val short: kotlin.String?, + @SerialName(value = "weeks") @Required val weeks: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200Response.kt new file mode 100644 index 0000000..c4f5716 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200Response.kt @@ -0,0 +1,66 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForIdByLessonId200ResponseDay +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForIdByLessonId200ResponseGroupsInner +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForIdByLessonId200ResponseWeekDefinition +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param classrooms + * @param cohorts + * @param groups + * @param groupsIds + * @param id + * @param period + * @param periodsPerWeek + * @param subject + * @param teachers + * @param termDefinitionId + * @param weekDefinition + * @param weeksDefinitionId + * @param substitutionCohortName + * @param day + */ +@Serializable +data class GetTimetableLessonsGetForIdByLessonId200Response( + @SerialName(value = "classrooms") @Required val classrooms: + kotlin.collections.List, + @SerialName(value = "cohorts") @Required val cohorts: + kotlin.collections.List, + @SerialName(value = "groups") @Required val groups: + kotlin.collections.List, + @SerialName(value = "groupsIds") @Required val groupsIds: kotlin.collections.List, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "period") @Required val period: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod?, + @SerialName(value = "periodsPerWeek") @Required val periodsPerWeek: kotlin.Double?, + @SerialName(value = "subject") @Required val subject: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject?, + @SerialName(value = "teachers") @Required val teachers: + kotlin.collections.List, + @SerialName(value = "termDefinitionId") @Required val termDefinitionId: kotlin.String?, + @SerialName(value = "weekDefinition") @Required val weekDefinition: GetTimetableLessonsGetForIdByLessonId200ResponseWeekDefinition?, + @SerialName(value = "weeksDefinitionId") @Required val weeksDefinitionId: kotlin.String?, + @SerialName(value = "substitutionCohortName") @Required val substitutionCohortName: kotlin.String?, + @SerialName(value = "day") val day: GetTimetableLessonsGetForIdByLessonId200ResponseDay? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200ResponseDay.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200ResponseDay.kt new file mode 100644 index 0000000..9640ef6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200ResponseDay.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param days + * @param id + * @param name + * @param short + * @param updatedAt + */ +@Serializable +data class GetTimetableLessonsGetForIdByLessonId200ResponseDay( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "days") @Required val days: kotlin.collections.List?, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "short") @Required val short: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200ResponseGroupsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200ResponseGroupsInner.kt new file mode 100644 index 0000000..0459691 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200ResponseGroupsInner.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param divisionTag + * @param entireClass + * @param id + * @param name + */ +@Serializable +data class GetTimetableLessonsGetForIdByLessonId200ResponseGroupsInner( + @SerialName(value = "divisionTag") @Required val divisionTag: kotlin.String?, + @SerialName(value = "entireClass") @Required val entireClass: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200ResponseWeekDefinition.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200ResponseWeekDefinition.kt new file mode 100644 index 0000000..f33fae3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableLessonsGetForIdByLessonId200ResponseWeekDefinition.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param name + * @param short + * @param weeks + */ +@Serializable +data class GetTimetableLessonsGetForIdByLessonId200ResponseWeekDefinition( + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "short") @Required val short: kotlin.String, + @SerialName(value = "weeks") @Required val weeks: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200Response.kt new file mode 100644 index 0000000..1e062a1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableMovedLessons200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetableMovedLessons200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200ResponseItemsInner.kt new file mode 100644 index 0000000..923d83a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200ResponseItemsInner.kt @@ -0,0 +1,44 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForIdByLessonId200ResponseDay +import hu.petrik.filcapp.api.model.GetTimetableMovedLessons200ResponseItemsInnerMovedLesson +import hu.petrik.filcapp.api.model.GetTimetableMovedLessons200ResponseItemsInnerPeriod +import hu.petrik.filcapp.api.model.PostNavigatorClassrooms201Response +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param classroom + * @param dayDefinition + * @param lessons + * @param movedLesson + * @param period + */ +@Serializable +data class GetTimetableMovedLessons200ResponseItemsInner( + @SerialName(value = "classroom") @Required val classroom: PostNavigatorClassrooms201Response?, + @SerialName(value = "dayDefinition") @Required val dayDefinition: GetTimetableLessonsGetForIdByLessonId200ResponseDay?, + @SerialName(value = "lessons") @Required val lessons: + kotlin.collections.List, + @SerialName(value = "movedLesson") @Required val movedLesson: GetTimetableMovedLessons200ResponseItemsInnerMovedLesson, + @SerialName(value = "period") @Required val period: GetTimetableMovedLessons200ResponseItemsInnerPeriod?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200ResponseItemsInnerMovedLesson.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200ResponseItemsInnerMovedLesson.kt new file mode 100644 index 0000000..502e090 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200ResponseItemsInnerMovedLesson.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param comment + * @param date + * @param id + * @param room + * @param startingDay + * @param startingPeriod + */ +@Serializable +data class GetTimetableMovedLessons200ResponseItemsInnerMovedLesson( + @SerialName(value = "comment") @Required val comment: kotlin.String?, + @SerialName(value = "date") @Required val date: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "room") @Required val room: kotlin.String?, + @SerialName(value = "startingDay") @Required val startingDay: kotlin.String?, + @SerialName(value = "startingPeriod") @Required val startingPeriod: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200ResponseItemsInnerPeriod.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200ResponseItemsInnerPeriod.kt new file mode 100644 index 0000000..5eb8a9a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableMovedLessons200ResponseItemsInnerPeriod.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param endTime + * @param id + * @param period + * @param startTime + * @param updatedAt + */ +@Serializable +data class GetTimetableMovedLessons200ResponseItemsInnerPeriod( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "endTime") @Required val endTime: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "period") @Required val period: kotlin.Int?, + @SerialName(value = "startTime") @Required val startTime: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetablePeriodsGetAll200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetablePeriodsGetAll200Response.kt new file mode 100644 index 0000000..43b1d16 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetablePeriodsGetAll200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetablePeriodsGetAll200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetablePeriodsGetAll200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetablePeriodsGetAll200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetablePeriodsGetAll200ResponseItemsInner.kt new file mode 100644 index 0000000..e6c7004 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetablePeriodsGetAll200ResponseItemsInner.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param endTime + * @param id + * @param period + * @param startTime + */ +@Serializable +data class GetTimetablePeriodsGetAll200ResponseItemsInner( + @SerialName(value = "endTime") @Required val endTime: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "period") @Required val period: kotlin.Double?, + @SerialName(value = "startTime") @Required val startTime: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubjects200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubjects200Response.kt new file mode 100644 index 0000000..a9f6396 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubjects200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableSubjects200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetableSubjects200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubjects200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubjects200ResponseItemsInner.kt new file mode 100644 index 0000000..1145bd4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubjects200ResponseItemsInner.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param id + * @param name + * @param short + * @param updatedAt + */ +@Serializable +data class GetTimetableSubjects200ResponseItemsInner( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "short") @Required val short: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200Response.kt new file mode 100644 index 0000000..06c79bf --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableSubstitutions200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetableSubstitutions200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200ResponseItemsInner.kt new file mode 100644 index 0000000..7170bc5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200ResponseItemsInner.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableSubstitutions200ResponseItemsInnerSubstitution +import hu.petrik.filcapp.api.model.GetTimetableSubstitutions200ResponseItemsInnerTeacher +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param lessons + * @param substitution + * @param teacher + */ +@Serializable +data class GetTimetableSubstitutions200ResponseItemsInner( + @SerialName(value = "lessons") @Required val lessons: + kotlin.collections.List, + @SerialName(value = "substitution") @Required val substitution: GetTimetableSubstitutions200ResponseItemsInnerSubstitution, + @SerialName(value = "teacher") @Required val teacher: GetTimetableSubstitutions200ResponseItemsInnerTeacher?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200ResponseItemsInnerSubstitution.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200ResponseItemsInnerSubstitution.kt new file mode 100644 index 0000000..3e61fc6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200ResponseItemsInnerSubstitution.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param comment + * @param date + * @param id + * @param substituter + */ +@Serializable +data class GetTimetableSubstitutions200ResponseItemsInnerSubstitution( + @SerialName(value = "comment") @Required val comment: kotlin.String?, + @SerialName(value = "date") @Required val date: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "substituter") @Required val substituter: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200ResponseItemsInnerTeacher.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200ResponseItemsInnerTeacher.kt new file mode 100644 index 0000000..008e5af --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutions200ResponseItemsInnerTeacher.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param firstName + * @param gender + * @param id + * @param lastName + * @param short + * @param userId + */ +@Serializable +data class GetTimetableSubstitutions200ResponseItemsInnerTeacher( + @SerialName(value = "email") @Required val email: kotlin.String?, + @SerialName(value = "firstName") @Required val firstName: kotlin.String?, + @SerialName(value = "gender") @Required val gender: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "lastName") @Required val lastName: kotlin.String?, + @SerialName(value = "short") @Required val short: kotlin.String?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsCohortByCohortId200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsCohortByCohortId200Response.kt new file mode 100644 index 0000000..3ad0200 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsCohortByCohortId200Response.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableSubstitutionsRelevant200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param cohortId + * @param substitutions + */ +@Serializable +data class GetTimetableSubstitutionsCohortByCohortId200Response( + @SerialName(value = "cohortId") @Required val cohortId: kotlin.String?, + @SerialName(value = "substitutions") @Required val substitutions: + kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsRelevant200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsRelevant200Response.kt new file mode 100644 index 0000000..bd989d5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsRelevant200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableSubstitutionsRelevant200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetableSubstitutionsRelevant200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsRelevant200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsRelevant200ResponseItemsInner.kt new file mode 100644 index 0000000..42963c8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsRelevant200ResponseItemsInner.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableSubstitutionsRelevant200ResponseItemsInnerTeacher +import hu.petrik.filcapp.api.model.PostTimetableSubstitutions200Response +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param lessons + * @param substitution + * @param teacher + */ +@Serializable +data class GetTimetableSubstitutionsRelevant200ResponseItemsInner( + @SerialName(value = "lessons") @Required val lessons: kotlin.collections.List, + @SerialName(value = "substitution") @Required val substitution: PostTimetableSubstitutions200Response, + @SerialName(value = "teacher") @Required val teacher: GetTimetableSubstitutionsRelevant200ResponseItemsInnerTeacher?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsRelevant200ResponseItemsInnerTeacher.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsRelevant200ResponseItemsInnerTeacher.kt new file mode 100644 index 0000000..fa86604 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableSubstitutionsRelevant200ResponseItemsInnerTeacher.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param firstName + * @param gender + * @param id + * @param lastName + * @param short + * @param userId + */ +@Serializable +data class GetTimetableSubstitutionsRelevant200ResponseItemsInnerTeacher( + @SerialName(value = "email") @Required val email: kotlin.String?, + @SerialName(value = "firstName") @Required val firstName: kotlin.String, + @SerialName(value = "gender") @Required val gender: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "lastName") @Required val lastName: kotlin.String, + @SerialName(value = "short") @Required val short: kotlin.String, + @SerialName(value = "userId") @Required val userId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachers200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachers200Response.kt new file mode 100644 index 0000000..c9c2a2b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachers200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableTeachers200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetableTeachers200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachers200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachers200ResponseItemsInner.kt new file mode 100644 index 0000000..368c8da --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachers200ResponseItemsInner.kt @@ -0,0 +1,43 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableTeachers200ResponseItemsInnerUser +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param firstName + * @param id + * @param lastName + * @param short + * @param user + * @param userId + */ +@Serializable +data class GetTimetableTeachers200ResponseItemsInner( + @SerialName(value = "email") @Required val email: kotlin.String?, + @SerialName(value = "firstName") @Required val firstName: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "lastName") @Required val lastName: kotlin.String?, + @SerialName(value = "short") @Required val short: kotlin.String?, + @SerialName(value = "user") @Required val user: GetTimetableTeachers200ResponseItemsInnerUser?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachers200ResponseItemsInnerUser.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachers200ResponseItemsInnerUser.kt new file mode 100644 index 0000000..eb1fa37 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachers200ResponseItemsInnerUser.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param id + * @param name + */ +@Serializable +data class GetTimetableTeachers200ResponseItemsInnerUser( + @SerialName(value = "email") @Required val email: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachersGetAll200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachersGetAll200Response.kt new file mode 100644 index 0000000..0a6eac4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachersGetAll200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableTeachersGetAll200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetableTeachersGetAll200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachersGetAll200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachersGetAll200ResponseItemsInner.kt new file mode 100644 index 0000000..d1093aa --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachersGetAll200ResponseItemsInner.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param firstName + * @param id + * @param lastName + * @param short + */ +@Serializable +data class GetTimetableTeachersGetAll200ResponseItemsInner( + @SerialName(value = "firstName") @Required val firstName: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "lastName") @Required val lastName: kotlin.String?, + @SerialName(value = "short") @Required val short: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachersMe200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachersMe200Response.kt new file mode 100644 index 0000000..d190fc2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTeachersMe200Response.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param firstName + * @param id + * @param lastName + * @param short + */ +@Serializable +data class GetTimetableTeachersMe200Response( + @SerialName(value = "firstName") @Required val firstName: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "lastName") @Required val lastName: kotlin.String, + @SerialName(value = "short") @Required val short: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetables200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetables200Response.kt new file mode 100644 index 0000000..0decbe6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetables200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableTimetables200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetTimetableTimetables200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetables200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetables200ResponseItemsInner.kt new file mode 100644 index 0000000..5cd964d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetables200ResponseItemsInner.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param id + * @param name + * @param updatedAt + * @param validFrom + * @param validTo + */ +@Serializable +data class GetTimetableTimetables200ResponseItemsInner( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String?, + @SerialName(value = "validTo") @Required val validTo: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetablesByIdPreviewDelete200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetablesByIdPreviewDelete200Response.kt new file mode 100644 index 0000000..d4ad0d9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetablesByIdPreviewDelete200Response.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetDoorlockLogs200ResponseItemsInnerCard +import hu.petrik.filcapp.api.model.GetTimetableTimetablesByIdPreviewDelete200ResponseCohortsInner +import hu.petrik.filcapp.api.model.GetTimetableTimetablesByIdPreviewDelete200ResponseTotals +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param cohorts + * @param isCurrentTimetable + * @param targetTimetable + * @param totals + */ +@Serializable +data class GetTimetableTimetablesByIdPreviewDelete200Response( + @SerialName(value = "cohorts") @Required val cohorts: + kotlin.collections.List, + @SerialName(value = "isCurrentTimetable") @Required val isCurrentTimetable: kotlin.Boolean, + @SerialName(value = "targetTimetable") @Required val targetTimetable: GetDoorlockLogs200ResponseItemsInnerCard?, + @SerialName(value = "totals") @Required val totals: GetTimetableTimetablesByIdPreviewDelete200ResponseTotals, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetablesByIdPreviewDelete200ResponseCohortsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetablesByIdPreviewDelete200ResponseCohortsInner.kt new file mode 100644 index 0000000..e9295af --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetablesByIdPreviewDelete200ResponseCohortsInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param becomesOrphaned + * @param id + * @param name + */ +@Serializable +data class GetTimetableTimetablesByIdPreviewDelete200ResponseCohortsInner( + @SerialName(value = "becomesOrphaned") @Required val becomesOrphaned: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetablesByIdPreviewDelete200ResponseTotals.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetablesByIdPreviewDelete200ResponseTotals.kt new file mode 100644 index 0000000..cf4ed15 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetTimetableTimetablesByIdPreviewDelete200ResponseTotals.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param danglingUsersCleaned + * @param lessonsDeleted + * @param movedLessonsDeleted + * @param orphanedCohorts + * @param substitutionsDeleted + * @param survivingCohorts + */ +@Serializable +data class GetTimetableTimetablesByIdPreviewDelete200ResponseTotals( + @SerialName(value = "danglingUsersCleaned") @Required val danglingUsersCleaned: kotlin.Double?, + @SerialName(value = "lessonsDeleted") @Required val lessonsDeleted: kotlin.Double?, + @SerialName(value = "movedLessonsDeleted") @Required val movedLessonsDeleted: kotlin.Double?, + @SerialName(value = "orphanedCohorts") @Required val orphanedCohorts: kotlin.Double?, + @SerialName(value = "substitutionsDeleted") @Required val substitutionsDeleted: kotlin.Double?, + @SerialName(value = "survivingCohorts") @Required val survivingCohorts: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetUsers200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetUsers200Response.kt index 64aa396..8697051 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetUsers200Response.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetUsers200Response.kt @@ -15,7 +15,7 @@ package hu.petrik.filcapp.api.model -import hu.petrik.filcapp.api.model.GetUsers200ResponseAllOfData +import hu.petrik.filcapp.api.model.GetUsers200ResponseItemsInner import kotlinx.serialization.* import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* @@ -23,11 +23,11 @@ import kotlinx.serialization.encoding.* /** * * - * @param success - * @param `data` + * @param items + * @param total */ @Serializable data class GetUsers200Response( - @SerialName(value = "success") @Required val success: kotlin.Boolean, - @SerialName(value = "data") val `data`: GetUsers200ResponseAllOfData? = null, + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, ) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetUsers200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetUsers200ResponseItemsInner.kt new file mode 100644 index 0000000..dcfbe76 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetUsers200ResponseItemsInner.kt @@ -0,0 +1,52 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param cohortId + * @param createdAt + * @param email + * @param emailVerified + * @param id + * @param image + * @param name + * @param nickname + * @param roles + * @param updatedAt + * @param displayName + * @param permissions + */ +@Serializable +data class GetUsers200ResponseItemsInner( + @SerialName(value = "cohortId") @Required val cohortId: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "email") @Required val email: kotlin.String?, + @SerialName(value = "emailVerified") @Required val emailVerified: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "image") @Required val image: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, + @SerialName(value = "roles") @Required val roles: kotlin.collections.List, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "displayName") @Required val displayName: kotlin.String?, + @SerialName(value = "permissions") @Required val permissions: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiAuthLogs200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiAuthLogs200Response.kt new file mode 100644 index 0000000..cd0af22 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiAuthLogs200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiAuthLogs200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetWifiAuthLogs200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiAuthLogs200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiAuthLogs200ResponseItemsInner.kt new file mode 100644 index 0000000..3903ebd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiAuthLogs200ResponseItemsInner.kt @@ -0,0 +1,54 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param deviceNickname + * @param deviceReportedHostname + * @param failureReason + * @param id + * @param macAddress + * @param nasComment + * @param nasIpAddress + * @param nasMacAddress + * @param result + * @param timestamp + * @param userComment + * @param username + * @param wifiUserId + */ +@Serializable +data class GetWifiAuthLogs200ResponseItemsInner( + @SerialName(value = "deviceNickname") @Required val deviceNickname: kotlin.String?, + @SerialName(value = "deviceReportedHostname") @Required val deviceReportedHostname: kotlin.String?, + @SerialName(value = "failureReason") @Required val failureReason: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.Double?, + @SerialName(value = "macAddress") @Required val macAddress: kotlin.String?, + @SerialName(value = "nasComment") @Required val nasComment: kotlin.String?, + @SerialName(value = "nasIpAddress") @Required val nasIpAddress: kotlin.String?, + @SerialName(value = "nasMacAddress") @Required val nasMacAddress: kotlin.String?, + @SerialName(value = "result") @Required val result: kotlin.Boolean, + @SerialName(value = "timestamp") @Required val timestamp: kotlin.String?, + @SerialName(value = "userComment") @Required val userComment: kotlin.String?, + @SerialName(value = "username") @Required val username: kotlin.String?, + @SerialName(value = "wifiUserId") @Required val wifiUserId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiDevices200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiDevices200Response.kt new file mode 100644 index 0000000..a456275 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiDevices200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiDevices200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetWifiDevices200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiDevices200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiDevices200ResponseItemsInner.kt new file mode 100644 index 0000000..e128305 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiDevices200ResponseItemsInner.kt @@ -0,0 +1,48 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param adminNotes + * @param banned + * @param createdAt + * @param id + * @param lastActiveAt + * @param macAddress + * @param nickname + * @param reportedHostname + * @param updatedAt + * @param wifiUserId + */ +@Serializable +data class GetWifiDevices200ResponseItemsInner( + @SerialName(value = "adminNotes") @Required val adminNotes: kotlin.String?, + @SerialName(value = "banned") @Required val banned: kotlin.Boolean, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "lastActiveAt") @Required val lastActiveAt: kotlin.String?, + @SerialName(value = "macAddress") @Required val macAddress: kotlin.String, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, + @SerialName(value = "reportedHostname") @Required val reportedHostname: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "wifiUserId") @Required val wifiUserId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiNas200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiNas200Response.kt new file mode 100644 index 0000000..018edf4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiNas200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiNas200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetWifiNas200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiNas200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiNas200ResponseItemsInner.kt new file mode 100644 index 0000000..4aa2a7a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiNas200ResponseItemsInner.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param comment + * @param createdAt + * @param id + * @param ipAddress + * @param macAddress + * @param updatedAt + */ +@Serializable +data class GetWifiNas200ResponseItemsInner( + @SerialName(value = "comment") @Required val comment: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "ipAddress") @Required val ipAddress: kotlin.String?, + @SerialName(value = "macAddress") @Required val macAddress: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiRoleSpeedProfiles200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiRoleSpeedProfiles200Response.kt new file mode 100644 index 0000000..5ce62f9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiRoleSpeedProfiles200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiRoleSpeedProfiles200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetWifiRoleSpeedProfiles200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiRoleSpeedProfiles200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiRoleSpeedProfiles200ResponseItemsInner.kt new file mode 100644 index 0000000..2af9685 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiRoleSpeedProfiles200ResponseItemsInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param priority + * @param roleName + * @param speedProfileId + */ +@Serializable +data class GetWifiRoleSpeedProfiles200ResponseItemsInner( + @SerialName(value = "priority") @Required val priority: kotlin.Int?, + @SerialName(value = "roleName") @Required val roleName: kotlin.String?, + @SerialName(value = "speedProfileId") @Required val speedProfileId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSelf200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSelf200Response.kt new file mode 100644 index 0000000..71fea35 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSelf200Response.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiSelf200ResponseDevicesInner +import hu.petrik.filcapp.api.model.GetWifiSelf200ResponseSpeedLimit +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param banned + * @param devices + * @param speedLimit + * @param username + */ +@Serializable +data class GetWifiSelf200Response( + @SerialName(value = "banned") @Required val banned: kotlin.Boolean, + @SerialName(value = "devices") @Required val devices: kotlin.collections.List, + @SerialName(value = "speedLimit") @Required val speedLimit: GetWifiSelf200ResponseSpeedLimit, + @SerialName(value = "username") @Required val username: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSelf200ResponseDevicesInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSelf200ResponseDevicesInner.kt new file mode 100644 index 0000000..4087ab9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSelf200ResponseDevicesInner.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param banned + * @param id + * @param lastActiveAt + * @param macAddress + * @param nickname + * @param reportedHostname + */ +@Serializable +data class GetWifiSelf200ResponseDevicesInner( + @SerialName(value = "banned") @Required val banned: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "lastActiveAt") @Required val lastActiveAt: kotlin.String?, + @SerialName(value = "macAddress") @Required val macAddress: kotlin.String?, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, + @SerialName(value = "reportedHostname") @Required val reportedHostname: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSelf200ResponseSpeedLimit.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSelf200ResponseSpeedLimit.kt new file mode 100644 index 0000000..6385ce7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSelf200ResponseSpeedLimit.kt @@ -0,0 +1,57 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param downloadSpeedMbps + * @param roleName + * @param source + * @param speedProfileId + * @param uploadSpeedMbps + */ +@Serializable +data class GetWifiSelf200ResponseSpeedLimit( + @SerialName(value = "downloadSpeedMbps") @Required val downloadSpeedMbps: kotlin.Int?, + @SerialName(value = "roleName") @Required val roleName: kotlin.String?, + @SerialName(value = "source") @Required val source: GetWifiSelf200ResponseSpeedLimit.Source, + @SerialName(value = "speedProfileId") @Required val speedProfileId: kotlin.String?, + @SerialName(value = "uploadSpeedMbps") @Required val uploadSpeedMbps: kotlin.Int?, +) { + /** + * + * + * Values: `override`,role,wlan_default + */ + @Serializable + enum class Source( + val value: kotlin.String, + ) { + @SerialName(value = "override") + `override`("override"), + + @SerialName(value = "role") + role("role"), + + @SerialName(value = "wlan_default") + wlan_default("wlan_default"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSpeedProfiles200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSpeedProfiles200Response.kt new file mode 100644 index 0000000..6c68803 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSpeedProfiles200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiSpeedProfiles200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetWifiSpeedProfiles200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSpeedProfiles200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSpeedProfiles200ResponseItemsInner.kt new file mode 100644 index 0000000..d8de420 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiSpeedProfiles200ResponseItemsInner.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param downloadSpeedMbps + * @param id + * @param isWlanDefault + * @param name + * @param uploadSpeedMbps + */ +@Serializable +data class GetWifiSpeedProfiles200ResponseItemsInner( + @SerialName(value = "downloadSpeedMbps") @Required val downloadSpeedMbps: kotlin.Int?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "isWlanDefault") @Required val isWlanDefault: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "uploadSpeedMbps") @Required val uploadSpeedMbps: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatsOverview200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatsOverview200Response.kt new file mode 100644 index 0000000..111e0eb --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatsOverview200Response.kt @@ -0,0 +1,31 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiStatsOverview200ResponseStats +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param stats + */ +@Serializable +data class GetWifiStatsOverview200Response( + @SerialName(value = "stats") @Required val stats: GetWifiStatsOverview200ResponseStats, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatsOverview200ResponseStats.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatsOverview200ResponseStats.kt new file mode 100644 index 0000000..1a380f0 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatsOverview200ResponseStats.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiStatsOverview200ResponseStatsAuthSeriesInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param activeDevices + * @param authSeries + * @param totalDevices + * @param totalUsers + */ +@Serializable +data class GetWifiStatsOverview200ResponseStats( + @SerialName(value = "activeDevices") @Required val activeDevices: kotlin.Int?, + @SerialName(value = "authSeries") @Required val authSeries: + kotlin.collections.List, + @SerialName(value = "totalDevices") @Required val totalDevices: kotlin.Int?, + @SerialName(value = "totalUsers") @Required val totalUsers: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatsOverview200ResponseStatsAuthSeriesInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatsOverview200ResponseStatsAuthSeriesInner.kt new file mode 100644 index 0000000..b235b5c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatsOverview200ResponseStatsAuthSeriesInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param accepted + * @param date + * @param rejected + */ +@Serializable +data class GetWifiStatsOverview200ResponseStatsAuthSeriesInner( + @SerialName(value = "accepted") @Required val accepted: kotlin.Int?, + @SerialName(value = "date") @Required val date: kotlin.String?, + @SerialName(value = "rejected") @Required val rejected: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatus200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatus200Response.kt new file mode 100644 index 0000000..b112a4e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiStatus200Response.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param enabled + * @param ssid + */ +@Serializable +data class GetWifiStatus200Response( + @SerialName(value = "enabled") @Required val enabled: kotlin.Boolean, + @SerialName(value = "ssid") @Required val ssid: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiUsers200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiUsers200Response.kt new file mode 100644 index 0000000..7e838f3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiUsers200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiUsers200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class GetWifiUsers200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiUsers200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiUsers200ResponseItemsInner.kt new file mode 100644 index 0000000..575b9b4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/GetWifiUsers200ResponseItemsInner.kt @@ -0,0 +1,52 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param allowedMacAddresses + * @param banned + * @param comment + * @param createdAt + * @param createdBy + * @param creatorName + * @param id + * @param lastActiveAt + * @param speedProfileId + * @param updatedAt + * @param userId + * @param username + */ +@Serializable +data class GetWifiUsers200ResponseItemsInner( + @SerialName(value = "allowedMacAddresses") @Required val allowedMacAddresses: kotlin.collections.List?, + @SerialName(value = "banned") @Required val banned: kotlin.Boolean, + @SerialName(value = "comment") @Required val comment: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "createdBy") @Required val createdBy: kotlin.String?, + @SerialName(value = "creatorName") @Required val creatorName: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "lastActiveAt") @Required val lastActiveAt: kotlin.String?, + @SerialName(value = "speedProfileId") @Required val speedProfileId: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, + @SerialName(value = "username") @Required val username: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchAdminApiKeysByKeyId200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchAdminApiKeysByKeyId200Response.kt new file mode 100644 index 0000000..fa88a81 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchAdminApiKeysByKeyId200Response.kt @@ -0,0 +1,54 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param enabled + * @param expiresAt + * @param id + * @param lastRequest + * @param name + * @param ownerEmail + * @param ownerName + * @param prefix + * @param referenceId + * @param requestCount + * @param start + * @param updatedAt + */ +@Serializable +data class PatchAdminApiKeysByKeyId200Response( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "enabled") @Required val enabled: kotlin.Boolean, + @SerialName(value = "expiresAt") @Required val expiresAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "lastRequest") @Required val lastRequest: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "ownerEmail") @Required val ownerEmail: kotlin.String?, + @SerialName(value = "ownerName") @Required val ownerName: kotlin.String?, + @SerialName(value = "prefix") @Required val prefix: kotlin.String?, + @SerialName(value = "referenceId") @Required val referenceId: kotlin.String?, + @SerialName(value = "requestCount") @Required val requestCount: kotlin.Double, + @SerialName(value = "start") @Required val start: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchAdminApiKeysByKeyId400Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchAdminApiKeysByKeyId400Response.kt new file mode 100644 index 0000000..81267d4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchAdminApiKeysByKeyId400Response.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param code + * @param message + * @param status + */ +@Serializable +data class PatchAdminApiKeysByKeyId400Response( + @SerialName(value = "code") @Required val code: kotlin.String, + @SerialName(value = "message") @Required val message: kotlin.String, + @SerialName(value = "status") @Required val status: kotlin.Int, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchAdminApiKeysByKeyIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchAdminApiKeysByKeyIdRequest.kt new file mode 100644 index 0000000..744bc29 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchAdminApiKeysByKeyIdRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param enabled + */ +@Serializable +data class PatchAdminApiKeysByKeyIdRequest( + @SerialName(value = "enabled") @Required val enabled: kotlin.Boolean, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchBugReportByIdStatus200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchBugReportByIdStatus200Response.kt new file mode 100644 index 0000000..55e27dd --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchBugReportByIdStatus200Response.kt @@ -0,0 +1,49 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param description + * @param id + * @param metadata + * @param page + * @param reporterEmail + * @param reporterId + * @param status + * @param subject + * @param updatedAt + */ +@Serializable +data class PatchBugReportByIdStatus200Response( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "description") @Required val description: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "metadata") @Required val metadata: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "page") @Required val page: kotlin.String?, + @SerialName(value = "reporterEmail") @Required val reporterEmail: kotlin.String?, + @SerialName(value = "reporterId") @Required val reporterId: kotlin.String?, + @SerialName(value = "status") @Required val status: kotlin.String, + @SerialName(value = "subject") @Required val subject: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchBugReportByIdStatus200ResponseMetadata.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchBugReportByIdStatus200ResponseMetadata.kt new file mode 100644 index 0000000..3412855 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchBugReportByIdStatus200ResponseMetadata.kt @@ -0,0 +1,28 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetBugReport200ResponseItemsInnerMetadataAnyOfValue +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + */ +@Serializable +class PatchBugReportByIdStatus200ResponseMetadata diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchBugReportByIdStatusRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchBugReportByIdStatusRequest.kt new file mode 100644 index 0000000..8f77eb3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchBugReportByIdStatusRequest.kt @@ -0,0 +1,52 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param status + */ +@Serializable +data class PatchBugReportByIdStatusRequest( + @SerialName(value = "status") @Required val status: PatchBugReportByIdStatusRequest.Status, +) { + /** + * + * + * Values: `open`,in_progress,resolved,closed + */ + @Serializable + enum class Status( + val value: kotlin.String, + ) { + @SerialName(value = "open") + `open`("open"), + + @SerialName(value = "in_progress") + in_progress("in_progress"), + + @SerialName(value = "resolved") + resolved("resolved"), + + @SerialName(value = "closed") + closed("closed"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsAnnouncementsById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsAnnouncementsById200Response.kt new file mode 100644 index 0000000..eaa4e58 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsAnnouncementsById200Response.kt @@ -0,0 +1,61 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param highlighted + * @param id + * @param imageByteSize + * @param imageContentType + * @param imageKey + * @param imageUpdatedAt + * @param kioskOnly + * @param title + * @param updatedAt + * @param validFrom + * @param validUntil + * @param cohortIds + * @param kioskIds + */ +@Serializable +data class PatchNewsAnnouncementsById200Response( + @SerialName(value = "authorId") @Required val authorId: kotlin.String, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "highlighted") @Required val highlighted: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "imageByteSize") @Required val imageByteSize: kotlin.Double?, + @SerialName(value = "imageContentType") @Required val imageContentType: kotlin.String?, + @SerialName(value = "imageKey") @Required val imageKey: kotlin.String?, + @SerialName(value = "imageUpdatedAt") @Required val imageUpdatedAt: kotlin.String?, + @SerialName(value = "kioskOnly") @Required val kioskOnly: kotlin.Boolean, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String, + @SerialName(value = "cohortIds") @Required val cohortIds: kotlin.collections.List, + @SerialName(value = "kioskIds") @Required val kioskIds: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsAnnouncementsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsAnnouncementsByIdRequest.kt new file mode 100644 index 0000000..fa502ae --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsAnnouncementsByIdRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchNewsAnnouncementsByIdRequestContentInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param cohortIds + * @param content + * @param highlighted + * @param kioskIds + * @param kioskOnly + * @param title + * @param validFrom + * @param validUntil + */ +@Serializable +data class PatchNewsAnnouncementsByIdRequest( + @SerialName(value = "cohortIds") val cohortIds: kotlin.collections.List? = null, + @SerialName(value = "content") val content: kotlin.collections.List? = null, + @SerialName(value = "highlighted") val highlighted: kotlin.Boolean? = null, + @SerialName(value = "kioskIds") val kioskIds: kotlin.collections.List? = null, + @SerialName(value = "kioskOnly") val kioskOnly: kotlin.Boolean? = null, + @SerialName(value = "title") val title: kotlin.String? = null, + @SerialName(value = "validFrom") val validFrom: kotlin.String? = null, + @SerialName(value = "validUntil") val validUntil: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsAnnouncementsByIdRequestContentInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsAnnouncementsByIdRequestContentInner.kt new file mode 100644 index 0000000..d2d3311 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsAnnouncementsByIdRequestContentInner.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskRequestConfig +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param content + * @param type + */ +@Serializable +data class PatchNewsAnnouncementsByIdRequestContentInner( + @SerialName(value = "content") @Required val content: PostKioskRequestConfig?, + @SerialName(value = "type") @Required val type: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsBlogsById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsBlogsById200Response.kt new file mode 100644 index 0000000..a4e2bf8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsBlogsById200Response.kt @@ -0,0 +1,47 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param id + * @param publishedAt + * @param slug + * @param status + * @param title + * @param updatedAt + */ +@Serializable +data class PatchNewsBlogsById200Response( + @SerialName(value = "authorId") @Required val authorId: kotlin.String, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "publishedAt") @Required val publishedAt: kotlin.String?, + @SerialName(value = "slug") @Required val slug: kotlin.String, + @SerialName(value = "status") @Required val status: kotlin.String, + @SerialName(value = "title") @Required val title: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsBlogsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsBlogsByIdRequest.kt new file mode 100644 index 0000000..bdd802e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsBlogsByIdRequest.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchNewsAnnouncementsByIdRequestContentInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param content + * @param slug + * @param title + */ +@Serializable +data class PatchNewsBlogsByIdRequest( + @SerialName(value = "content") val content: kotlin.collections.List? = null, + @SerialName(value = "slug") val slug: kotlin.String? = null, + @SerialName(value = "title") val title: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsSystemMessagesById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsSystemMessagesById200Response.kt new file mode 100644 index 0000000..d4ccdf2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsSystemMessagesById200Response.kt @@ -0,0 +1,47 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param id + * @param title + * @param updatedAt + * @param validFrom + * @param validUntil + * @param cohortIds + */ +@Serializable +data class PatchNewsSystemMessagesById200Response( + @SerialName(value = "authorId") @Required val authorId: kotlin.String, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "title") @Required val title: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String, + @SerialName(value = "cohortIds") @Required val cohortIds: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsSystemMessagesByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsSystemMessagesByIdRequest.kt new file mode 100644 index 0000000..4c8c384 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNewsSystemMessagesByIdRequest.kt @@ -0,0 +1,39 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchNewsAnnouncementsByIdRequestContentInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param cohortIds + * @param content + * @param title + * @param validFrom + * @param validUntil + */ +@Serializable +data class PatchNewsSystemMessagesByIdRequest( + @SerialName(value = "cohortIds") val cohortIds: kotlin.collections.List? = null, + @SerialName(value = "content") val content: kotlin.collections.List? = null, + @SerialName(value = "title") val title: kotlin.String? = null, + @SerialName(value = "validFrom") val validFrom: kotlin.String? = null, + @SerialName(value = "validUntil") val validUntil: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNotificationsSettingsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNotificationsSettingsRequest.kt new file mode 100644 index 0000000..f2ce5c4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNotificationsSettingsRequest.kt @@ -0,0 +1,59 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchNotificationsSettingsRequestNotificationPreferences +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param language + * @param notificationPreferences + * @param theme + * @param timetableClassColors + * @param timetableGroupDisplay + * @param timetableView + */ +@Serializable +data class PatchNotificationsSettingsRequest( + @SerialName(value = "language") val language: kotlin.String? = null, + @SerialName( + value = "notificationPreferences", + ) val notificationPreferences: PatchNotificationsSettingsRequestNotificationPreferences? = null, + @SerialName(value = "theme") val theme: kotlin.String? = null, + @SerialName(value = "timetableClassColors") val timetableClassColors: kotlin.collections.Map? = null, + @SerialName(value = "timetableGroupDisplay") val timetableGroupDisplay: PatchNotificationsSettingsRequest.TimetableGroupDisplay? = null, + @SerialName(value = "timetableView") val timetableView: kotlin.String? = null, +) { + /** + * + * + * Values: highlight,hide + */ + @Serializable + enum class TimetableGroupDisplay( + val value: kotlin.String, + ) { + @SerialName(value = "highlight") + highlight("highlight"), + + @SerialName(value = "hide") + hide("hide"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNotificationsSettingsRequestNotificationPreferences.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNotificationsSettingsRequestNotificationPreferences.kt new file mode 100644 index 0000000..6374531 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchNotificationsSettingsRequestNotificationPreferences.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param announcement + * @param blogPost + * @param channelsEnabled + * @param doorlockCardUsed + * @param movedLesson + * @param substitution + * @param systemMessage + */ +@Serializable +data class PatchNotificationsSettingsRequestNotificationPreferences( + @SerialName(value = "announcement") val announcement: kotlin.Boolean? = null, + @SerialName(value = "blogPost") val blogPost: kotlin.Boolean? = null, + @SerialName(value = "channelsEnabled") val channelsEnabled: kotlin.Boolean? = null, + @SerialName(value = "doorlockCardUsed") val doorlockCardUsed: kotlin.Boolean? = null, + @SerialName(value = "movedLesson") val movedLesson: kotlin.Boolean? = null, + @SerialName(value = "substitution") val substitution: kotlin.Boolean? = null, + @SerialName(value = "systemMessage") val systemMessage: kotlin.Boolean? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchRolesByNameRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchRolesByNameRequest.kt new file mode 100644 index 0000000..c209aa2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchRolesByNameRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param permissions + */ +@Serializable +data class PatchRolesByNameRequest( + @SerialName(value = "permissions") @Required val permissions: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTeachersById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTeachersById200Response.kt new file mode 100644 index 0000000..4c79b58 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTeachersById200Response.kt @@ -0,0 +1,43 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchTimetableTeachersById200ResponseUser +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param firstName + * @param id + * @param lastName + * @param short + * @param user + * @param userId + */ +@Serializable +data class PatchTimetableTeachersById200Response( + @SerialName(value = "email") @Required val email: kotlin.String?, + @SerialName(value = "firstName") @Required val firstName: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "lastName") @Required val lastName: kotlin.String, + @SerialName(value = "short") @Required val short: kotlin.String, + @SerialName(value = "user") @Required val user: PatchTimetableTeachersById200ResponseUser?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTeachersById200ResponseUser.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTeachersById200ResponseUser.kt new file mode 100644 index 0000000..40f8506 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTeachersById200ResponseUser.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param id + * @param name + */ +@Serializable +data class PatchTimetableTeachersById200ResponseUser( + @SerialName(value = "email") @Required val email: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTeachersByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTeachersByIdRequest.kt new file mode 100644 index 0000000..30db2a0 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTeachersByIdRequest.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param userId + */ +@Serializable +data class PatchTimetableTeachersByIdRequest( + @SerialName(value = "email") val email: kotlin.String? = null, + @SerialName(value = "userId") val userId: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTimetablesById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTimetablesById200Response.kt new file mode 100644 index 0000000..c92dd81 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTimetablesById200Response.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param id + * @param name + * @param updatedAt + * @param validFrom + * @param validTo + */ +@Serializable +data class PatchTimetableTimetablesById200Response( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String?, + @SerialName(value = "validTo") @Required val validTo: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTimetablesByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTimetablesByIdRequest.kt new file mode 100644 index 0000000..ced4205 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchTimetableTimetablesByIdRequest.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param name + * @param validFrom + * @param validTo + */ +@Serializable +data class PatchTimetableTimetablesByIdRequest( + @SerialName(value = "name") val name: kotlin.String? = null, + @SerialName(value = "validFrom") val validFrom: kotlin.String? = null, + @SerialName(value = "validTo") val validTo: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchUsersById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchUsersById200Response.kt new file mode 100644 index 0000000..79ad537 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchUsersById200Response.kt @@ -0,0 +1,52 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param cohortId + * @param createdAt + * @param email + * @param emailVerified + * @param id + * @param image + * @param name + * @param nickname + * @param roles + * @param updatedAt + * @param displayName + * @param permissions + */ +@Serializable +data class PatchUsersById200Response( + @SerialName(value = "cohortId") @Required val cohortId: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "email") @Required val email: kotlin.String, + @SerialName(value = "emailVerified") @Required val emailVerified: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "image") @Required val image: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, + @SerialName(value = "roles") @Required val roles: kotlin.collections.List, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "displayName") @Required val displayName: kotlin.String, + @SerialName(value = "permissions") @Required val permissions: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchUsersByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchUsersByIdRequest.kt new file mode 100644 index 0000000..fe72916 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PatchUsersByIdRequest.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param cohortId + * @param nickname + * @param roles + */ +@Serializable +data class PatchUsersByIdRequest( + @SerialName(value = "cohortId") val cohortId: kotlin.String? = null, + @SerialName(value = "nickname") val nickname: kotlin.String? = null, + @SerialName(value = "roles") val roles: kotlin.collections.List? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReport201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReport201Response.kt new file mode 100644 index 0000000..93b5db6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReport201Response.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + */ +@Serializable +data class PostBugReport201Response( + @SerialName(value = "id") @Required val id: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequest.kt new file mode 100644 index 0000000..afded31 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequest.kt @@ -0,0 +1,37 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostBugReportRequestMetadataValue +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param description + * @param subject + * @param metadata + * @param page + */ +@Serializable +data class PostBugReportRequest( + @SerialName(value = "description") @Required val description: kotlin.String, + @SerialName(value = "subject") @Required val subject: kotlin.String, + @SerialName(value = "metadata") val metadata: kotlin.collections.Map? = null, + @SerialName(value = "page") val page: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequestMetadataValue.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequestMetadataValue.kt new file mode 100644 index 0000000..0ec6d8d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequestMetadataValue.kt @@ -0,0 +1,29 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostBugReportRequestMetadataValueAnyOfInner +import hu.petrik.filcapp.api.model.PostBugReportRequestMetadataValueAnyOfValue +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + */ +@Serializable +class PostBugReportRequestMetadataValue diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequestMetadataValueAnyOfInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequestMetadataValueAnyOfInner.kt new file mode 100644 index 0000000..0d0a563 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequestMetadataValueAnyOfInner.kt @@ -0,0 +1,27 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + */ +@Serializable +class PostBugReportRequestMetadataValueAnyOfInner diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequestMetadataValueAnyOfValue.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequestMetadataValueAnyOfValue.kt new file mode 100644 index 0000000..1880187 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostBugReportRequestMetadataValueAnyOfValue.kt @@ -0,0 +1,27 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + */ +@Serializable +class PostBugReportRequestMetadataValueAnyOfValue diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCards201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCards201Response.kt new file mode 100644 index 0000000..6721912 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCards201Response.kt @@ -0,0 +1,51 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostDoorlockCards201ResponseAuthorizedDevicesInner +import hu.petrik.filcapp.api.model.PostDoorlockCards201ResponseOwner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorizedDevices + * @param cardData + * @param createdAt + * @param enabled + * @param frozen + * @param id + * @param name + * @param updatedAt + * @param userId + * @param owner + */ +@Serializable +data class PostDoorlockCards201Response( + @SerialName(value = "authorizedDevices") @Required val authorizedDevices: + kotlin.collections.List, + @SerialName(value = "cardData") @Required val cardData: kotlin.String, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "enabled") @Required val enabled: kotlin.Boolean, + @SerialName(value = "frozen") @Required val frozen: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "userId") @Required val userId: kotlin.String?, + @SerialName(value = "owner") val owner: PostDoorlockCards201ResponseOwner? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCards201ResponseAuthorizedDevicesInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCards201ResponseAuthorizedDevicesInner.kt new file mode 100644 index 0000000..8293bc5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCards201ResponseAuthorizedDevicesInner.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param name + */ +@Serializable +data class PostDoorlockCards201ResponseAuthorizedDevicesInner( + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCards201ResponseOwner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCards201ResponseOwner.kt new file mode 100644 index 0000000..58fa792 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCards201ResponseOwner.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param id + * @param name + * @param nickname + */ +@Serializable +data class PostDoorlockCards201ResponseOwner( + @SerialName(value = "email") @Required val email: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCardsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCardsRequest.kt new file mode 100644 index 0000000..9375555 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockCardsRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param name + * @param cardData + * @param userId + * @param authorizedDeviceIds + * @param enabled + * @param frozen + */ +@Serializable +data class PostDoorlockCardsRequest( + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "cardData") @Required val cardData: kotlin.String?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, + @SerialName(value = "authorizedDeviceIds") val authorizedDeviceIds: kotlin.collections.List? = arrayListOf(), + @SerialName(value = "enabled") val enabled: kotlin.Boolean? = true, + @SerialName(value = "frozen") val frozen: kotlin.Boolean? = false, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevices201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevices201Response.kt new file mode 100644 index 0000000..07f3f91 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevices201Response.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param apiToken + * @param createdAt + * @param id + * @param lastResetReason + * @param location + * @param name + * @param updatedAt + */ +@Serializable +data class PostDoorlockDevices201Response( + @SerialName(value = "apiToken") @Required val apiToken: kotlin.String, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "lastResetReason") @Required val lastResetReason: kotlin.String?, + @SerialName(value = "location") @Required val location: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesByIdUpdate200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesByIdUpdate200Response.kt new file mode 100644 index 0000000..7a1b2b9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesByIdUpdate200Response.kt @@ -0,0 +1,31 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.JsonElement + +/** + * + * + * @param ok + */ +@Serializable +data class PostDoorlockDevicesByIdUpdate200Response( + @SerialName(value = "ok") @Required val ok: JsonElement?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesByIdUpdateRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesByIdUpdateRequest.kt new file mode 100644 index 0000000..d28771f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesByIdUpdateRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param url + */ +@Serializable +data class PostDoorlockDevicesByIdUpdateRequest( + @SerialName(value = "url") @Required val url: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesRequest.kt new file mode 100644 index 0000000..43acda1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesRequest.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param apiToken + * @param name + * @param lastResetReason + * @param location + */ +@Serializable +data class PostDoorlockDevicesRequest( + @SerialName(value = "apiToken") @Required val apiToken: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "lastResetReason") val lastResetReason: kotlin.String? = null, + @SerialName(value = "location") val location: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesUpdate200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesUpdate200Response.kt new file mode 100644 index 0000000..c9a35b1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockDevicesUpdate200Response.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param count + */ +@Serializable +data class PostDoorlockDevicesUpdate200Response( + @SerialName(value = "count") @Required val count: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockSelfCardsByIdActivate200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockSelfCardsByIdActivate200Response.kt new file mode 100644 index 0000000..0442c08 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockSelfCardsByIdActivate200Response.kt @@ -0,0 +1,44 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buttonPressed + * @param cardData + * @param cardId + * @param deviceId + * @param id + * @param result + * @param timestamp + * @param userId + */ +@Serializable +data class PostDoorlockSelfCardsByIdActivate200Response( + @SerialName(value = "buttonPressed") @Required val buttonPressed: kotlin.Boolean, + @SerialName(value = "cardData") @Required val cardData: kotlin.String?, + @SerialName(value = "cardId") @Required val cardId: kotlin.String?, + @SerialName(value = "deviceId") @Required val deviceId: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.Int?, + @SerialName(value = "result") @Required val result: kotlin.Boolean, + @SerialName(value = "timestamp") @Required val timestamp: kotlin.String?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockSelfCardsByIdActivateRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockSelfCardsByIdActivateRequest.kt new file mode 100644 index 0000000..e9559f4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostDoorlockSelfCardsByIdActivateRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param deviceId + */ +@Serializable +data class PostDoorlockSelfCardsByIdActivateRequest( + @SerialName(value = "deviceId") val deviceId: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKiosk201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKiosk201Response.kt new file mode 100644 index 0000000..4ef9b56 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKiosk201Response.kt @@ -0,0 +1,51 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param appVersion + * @param config + * @param createdAt + * @param enabled + * @param id + * @param kind + * @param lastSeenAt + * @param lastSeenIp + * @param machineId + * @param name + * @param updatedAt + */ +@Serializable +data class PostKiosk201Response( + @SerialName(value = "appVersion") @Required val appVersion: kotlin.String?, + @SerialName(value = "config") @Required val config: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "enabled") @Required val enabled: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "kind") @Required val kind: kotlin.String, + @SerialName(value = "lastSeenAt") @Required val lastSeenAt: kotlin.String?, + @SerialName(value = "lastSeenIp") @Required val lastSeenIp: kotlin.String?, + @SerialName(value = "machineId") @Required val machineId: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDepartures200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDepartures200Response.kt new file mode 100644 index 0000000..a008905 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDepartures200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskDepartures200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class PostKioskDepartures200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDepartures200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDepartures200ResponseItemsInner.kt new file mode 100644 index 0000000..986f655 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDepartures200ResponseItemsInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param label + * @param predictedDepartureTime + * @param routeShortDesc + */ +@Serializable +data class PostKioskDepartures200ResponseItemsInner( + @SerialName(value = "label") @Required val label: kotlin.String?, + @SerialName(value = "predictedDepartureTime") @Required val predictedDepartureTime: kotlin.Double?, + @SerialName(value = "routeShortDesc") @Required val routeShortDesc: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDeparturesRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDeparturesRequest.kt new file mode 100644 index 0000000..0e88707 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDeparturesRequest.kt @@ -0,0 +1,31 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskDeparturesRequestGroupsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param groups + */ +@Serializable +data class PostKioskDeparturesRequest( + @SerialName(value = "groups") @Required val groups: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDeparturesRequestGroupsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDeparturesRequestGroupsInner.kt new file mode 100644 index 0000000..e4abf4b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDeparturesRequestGroupsInner.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskDeparturesRequestGroupsInnerStopsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param label + * @param stops + */ +@Serializable +data class PostKioskDeparturesRequestGroupsInner( + @SerialName(value = "label") @Required val label: kotlin.String?, + @SerialName(value = "stops") @Required val stops: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDeparturesRequestGroupsInnerStopsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDeparturesRequestGroupsInnerStopsInner.kt new file mode 100644 index 0000000..c5dd0ef --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskDeparturesRequestGroupsInnerStopsInner.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param stopId + * @param routeFilter + */ +@Serializable +data class PostKioskDeparturesRequestGroupsInnerStopsInner( + @SerialName(value = "stopId") @Required val stopId: kotlin.String?, + @SerialName(value = "routeFilter") val routeFilter: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200Response.kt new file mode 100644 index 0000000..56daa71 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200Response.kt @@ -0,0 +1,39 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskHeartbeat200ResponseAnyOf +import hu.petrik.filcapp.api.model.PostKioskHeartbeat200ResponseAnyOf1 +import hu.petrik.filcapp.api.model.PostKioskHeartbeat200ResponseAnyOf2 +import hu.petrik.filcapp.api.model.PostKioskHeartbeat200ResponseAnyOf2Kiosk +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.JsonElement + +/** + * + * + * @param registered + * @param enabled + * @param kiosk + */ +@Serializable +data class PostKioskHeartbeat200Response( + @SerialName(value = "registered") @Required val registered: JsonElement?, + @SerialName(value = "enabled") @Required val enabled: JsonElement?, + @SerialName(value = "kiosk") @Required val kiosk: PostKioskHeartbeat200ResponseAnyOf2Kiosk, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf.kt new file mode 100644 index 0000000..0c2bdb2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf.kt @@ -0,0 +1,31 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.JsonElement + +/** + * + * + * @param registered + */ +@Serializable +data class PostKioskHeartbeat200ResponseAnyOf( + @SerialName(value = "registered") @Required val registered: JsonElement?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf1.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf1.kt new file mode 100644 index 0000000..6d86e06 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf1.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskHeartbeat200ResponseAnyOf1Kiosk +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.JsonElement + +/** + * + * + * @param enabled + * @param kiosk + * @param registered + */ +@Serializable +data class PostKioskHeartbeat200ResponseAnyOf1( + @SerialName(value = "enabled") @Required val enabled: JsonElement?, + @SerialName(value = "kiosk") @Required val kiosk: PostKioskHeartbeat200ResponseAnyOf1Kiosk, + @SerialName(value = "registered") @Required val registered: JsonElement?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf1Kiosk.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf1Kiosk.kt new file mode 100644 index 0000000..a6cbb34 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf1Kiosk.kt @@ -0,0 +1,50 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param kind + * @param name + */ +@Serializable +data class PostKioskHeartbeat200ResponseAnyOf1Kiosk( + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "kind") @Required val kind: PostKioskHeartbeat200ResponseAnyOf1Kiosk.Kind, + @SerialName(value = "name") @Required val name: kotlin.String?, +) { + /** + * + * + * Values: tv,navigator + */ + @Serializable + enum class Kind( + val value: kotlin.String, + ) { + @SerialName(value = "tv") + tv("tv"), + + @SerialName(value = "navigator") + navigator("navigator"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf2.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf2.kt new file mode 100644 index 0000000..3684de6 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf2.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskHeartbeat200ResponseAnyOf2Kiosk +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* +import kotlinx.serialization.json.JsonElement + +/** + * + * + * @param enabled + * @param kiosk + * @param registered + */ +@Serializable +data class PostKioskHeartbeat200ResponseAnyOf2( + @SerialName(value = "enabled") @Required val enabled: JsonElement?, + @SerialName(value = "kiosk") @Required val kiosk: PostKioskHeartbeat200ResponseAnyOf2Kiosk, + @SerialName(value = "registered") @Required val registered: JsonElement?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf2Kiosk.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf2Kiosk.kt new file mode 100644 index 0000000..55fa53f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeat200ResponseAnyOf2Kiosk.kt @@ -0,0 +1,53 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param id + * @param kind + * @param name + * @param config + */ +@Serializable +data class PostKioskHeartbeat200ResponseAnyOf2Kiosk( + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "kind") @Required val kind: PostKioskHeartbeat200ResponseAnyOf2Kiosk.Kind, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "config") @Required val config: PatchBugReportByIdStatus200ResponseMetadata?, +) { + /** + * + * + * Values: tv,navigator + */ + @Serializable + enum class Kind( + val value: kotlin.String, + ) { + @SerialName(value = "tv") + tv("tv"), + + @SerialName(value = "navigator") + navigator("navigator"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeatRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeatRequest.kt new file mode 100644 index 0000000..1de0632 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskHeartbeatRequest.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param appVersion + * @param machineId + */ +@Serializable +data class PostKioskHeartbeatRequest( + @SerialName(value = "appVersion") @Required val appVersion: kotlin.String, + @SerialName(value = "machineId") @Required val machineId: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskRequest.kt new file mode 100644 index 0000000..1673501 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskRequest.kt @@ -0,0 +1,55 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskRequestConfig +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param kind + * @param machineId + * @param name + * @param config + * @param enabled + */ +@Serializable +data class PostKioskRequest( + @SerialName(value = "kind") @Required val kind: PostKioskRequest.Kind, + @SerialName(value = "machineId") @Required val machineId: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "config") val config: PostKioskRequestConfig? = null, + @SerialName(value = "enabled") val enabled: kotlin.Boolean? = null, +) { + /** + * + * + * Values: tv,navigator + */ + @Serializable + enum class Kind( + val value: kotlin.String, + ) { + @SerialName(value = "tv") + tv("tv"), + + @SerialName(value = "navigator") + navigator("navigator"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskRequestConfig.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskRequestConfig.kt new file mode 100644 index 0000000..b9fb5d4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostKioskRequestConfig.kt @@ -0,0 +1,28 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostBugReportRequestMetadataValueAnyOfValue +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + */ +@Serializable +class PostKioskRequestConfig diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorBuildings201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorBuildings201Response.kt new file mode 100644 index 0000000..78d605b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorBuildings201Response.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param description + * @param id + * @param mapped + * @param name + * @param x + * @param y + */ +@Serializable +data class PostNavigatorBuildings201Response( + @SerialName(value = "description") @Required val description: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "mapped") @Required val mapped: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "x") @Required val x: kotlin.Double, + @SerialName(value = "y") @Required val y: kotlin.Double, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorBuildingsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorBuildingsRequest.kt new file mode 100644 index 0000000..5db920a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorBuildingsRequest.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param description + * @param name + * @param x + * @param y + */ +@Serializable +data class PostNavigatorBuildingsRequest( + @SerialName(value = "description") @Required val description: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "x") @Required val x: kotlin.Double?, + @SerialName(value = "y") @Required val y: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassroomTypes201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassroomTypes201Response.kt new file mode 100644 index 0000000..8173082 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassroomTypes201Response.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param colorhex + * @param createdAt + * @param id + * @param name + * @param updatedAt + */ +@Serializable +data class PostNavigatorClassroomTypes201Response( + @SerialName(value = "colorhex") @Required val colorhex: kotlin.String, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassroomTypesRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassroomTypesRequest.kt new file mode 100644 index 0000000..61c9029 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassroomTypesRequest.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param colorhex + * @param name + */ +@Serializable +data class PostNavigatorClassroomTypesRequest( + @SerialName(value = "colorhex") @Required val colorhex: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassrooms201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassrooms201Response.kt new file mode 100644 index 0000000..6bdb58c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassrooms201Response.kt @@ -0,0 +1,58 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param capacity + * @param description + * @param id + * @param mapped + * @param name + * @param rotation + * @param short + * @param sizeX + * @param sizeY + * @param sizeZ + * @param storey + * @param typeId + * @param x + * @param y + */ +@Serializable +data class PostNavigatorClassrooms201Response( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String, + @SerialName(value = "capacity") @Required val capacity: kotlin.Int?, + @SerialName(value = "description") @Required val description: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "mapped") @Required val mapped: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "rotation") @Required val rotation: kotlin.Double, + @SerialName(value = "short") @Required val short: kotlin.String, + @SerialName(value = "size_x") @Required val sizeX: kotlin.Double, + @SerialName(value = "size_y") @Required val sizeY: kotlin.Double, + @SerialName(value = "size_z") @Required val sizeZ: kotlin.Double, + @SerialName(value = "storey") @Required val storey: kotlin.Int, + @SerialName(value = "type_id") @Required val typeId: kotlin.String?, + @SerialName(value = "x") @Required val x: kotlin.Double, + @SerialName(value = "y") @Required val y: kotlin.Double, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassroomsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassroomsRequest.kt new file mode 100644 index 0000000..2c92881 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorClassroomsRequest.kt @@ -0,0 +1,54 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param capacity + * @param description + * @param name + * @param rotation + * @param short + * @param sizeX + * @param sizeY + * @param sizeZ + * @param storey + * @param typeId + * @param x + * @param y + */ +@Serializable +data class PostNavigatorClassroomsRequest( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String?, + @SerialName(value = "capacity") @Required val capacity: kotlin.Int?, + @SerialName(value = "description") @Required val description: kotlin.String?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "rotation") @Required val rotation: kotlin.Double?, + @SerialName(value = "short") @Required val short: kotlin.String?, + @SerialName(value = "size_x") @Required val sizeX: kotlin.Double?, + @SerialName(value = "size_y") @Required val sizeY: kotlin.Double?, + @SerialName(value = "size_z") @Required val sizeZ: kotlin.Double?, + @SerialName(value = "storey") @Required val storey: kotlin.Int?, + @SerialName(value = "type_id") @Required val typeId: kotlin.String?, + @SerialName(value = "x") @Required val x: kotlin.Double?, + @SerialName(value = "y") @Required val y: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorCorridors201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorCorridors201Response.kt new file mode 100644 index 0000000..c4418e1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorCorridors201Response.kt @@ -0,0 +1,54 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param barrierFree + * @param buildingId + * @param createdAt + * @param id + * @param isOutdoor + * @param name + * @param storey + * @param updatedAt + * @param width + * @param x1 + * @param x2 + * @param y1 + * @param y2 + */ +@Serializable +data class PostNavigatorCorridors201Response( + @SerialName(value = "barrier_free") @Required val barrierFree: kotlin.Boolean, + @SerialName(value = "building_id") @Required val buildingId: kotlin.String, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "is_outdoor") @Required val isOutdoor: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "storey") @Required val storey: kotlin.Int, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "width") @Required val width: kotlin.Double, + @SerialName(value = "x1") @Required val x1: kotlin.Double, + @SerialName(value = "x2") @Required val x2: kotlin.Double, + @SerialName(value = "y1") @Required val y1: kotlin.Double, + @SerialName(value = "y2") @Required val y2: kotlin.Double, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorCorridorsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorCorridorsRequest.kt new file mode 100644 index 0000000..085f6af --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorCorridorsRequest.kt @@ -0,0 +1,48 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param barrierFree + * @param buildingId + * @param isOutdoor + * @param name + * @param storey + * @param width + * @param x1 + * @param x2 + * @param y1 + * @param y2 + */ +@Serializable +data class PostNavigatorCorridorsRequest( + @SerialName(value = "barrier_free") @Required val barrierFree: kotlin.Boolean, + @SerialName(value = "building_id") @Required val buildingId: kotlin.String?, + @SerialName(value = "is_outdoor") @Required val isOutdoor: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "storey") @Required val storey: kotlin.Int?, + @SerialName(value = "width") @Required val width: kotlin.Double?, + @SerialName(value = "x1") @Required val x1: kotlin.Double?, + @SerialName(value = "x2") @Required val x2: kotlin.Double?, + @SerialName(value = "y1") @Required val y1: kotlin.Double?, + @SerialName(value = "y2") @Required val y2: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorImport200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorImport200Response.kt new file mode 100644 index 0000000..936d0db --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorImport200Response.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildings + * @param classrooms + * @param classroomTypes + * @param corridors + * @param lifts + * @param stairs + * @param translations + */ +@Serializable +data class PostNavigatorImport200Response( + @SerialName(value = "buildings") @Required val buildings: kotlin.Int?, + @SerialName(value = "classrooms") @Required val classrooms: kotlin.Int?, + @SerialName(value = "classroomTypes") @Required val classroomTypes: kotlin.Int?, + @SerialName(value = "corridors") @Required val corridors: kotlin.Int?, + @SerialName(value = "lifts") @Required val lifts: kotlin.Int?, + @SerialName(value = "stairs") @Required val stairs: kotlin.Int?, + @SerialName(value = "translations") @Required val translations: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorImportRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorImportRequest.kt new file mode 100644 index 0000000..86f6c27 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorImportRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param file + */ +@Serializable +data class PostNavigatorImportRequest( + @SerialName(value = "file") @Required val file: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorLiftsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorLiftsRequest.kt new file mode 100644 index 0000000..e333b5f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorLiftsRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param maxStorey + * @param minStorey + * @param name + * @param x + * @param y + */ +@Serializable +data class PostNavigatorLiftsRequest( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String?, + @SerialName(value = "max_storey") @Required val maxStorey: kotlin.Int?, + @SerialName(value = "min_storey") @Required val minStorey: kotlin.Int?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "x") @Required val x: kotlin.Double?, + @SerialName(value = "y") @Required val y: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorStairsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorStairsRequest.kt new file mode 100644 index 0000000..754011e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorStairsRequest.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param maxStorey + * @param minStorey + * @param name + * @param rotation + * @param x + * @param y + */ +@Serializable +data class PostNavigatorStairsRequest( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String?, + @SerialName(value = "max_storey") @Required val maxStorey: kotlin.Int?, + @SerialName(value = "min_storey") @Required val minStorey: kotlin.Int?, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "rotation") @Required val rotation: kotlin.Double?, + @SerialName(value = "x") @Required val x: kotlin.Double?, + @SerialName(value = "y") @Required val y: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorTranslations201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorTranslations201Response.kt new file mode 100644 index 0000000..454c8b1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorTranslations201Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostNavigatorTranslations201ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class PostNavigatorTranslations201Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorTranslations201ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorTranslations201ResponseItemsInner.kt new file mode 100644 index 0000000..3cfde68 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorTranslations201ResponseItemsInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param langKey + * @param text + * @param textKey + */ +@Serializable +data class PostNavigatorTranslations201ResponseItemsInner( + @SerialName(value = "lang_key") @Required val langKey: kotlin.String, + @SerialName(value = "text") @Required val text: kotlin.String, + @SerialName(value = "text_key") @Required val textKey: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorTranslationsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorTranslationsRequest.kt new file mode 100644 index 0000000..8a67d42 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNavigatorTranslationsRequest.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param textKey + * @param translations + */ +@Serializable +data class PostNavigatorTranslationsRequest( + @SerialName(value = "text_key") @Required val textKey: kotlin.String?, + @SerialName(value = "translations") @Required val translations: kotlin.collections.Map, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsAnnouncements201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsAnnouncements201Response.kt new file mode 100644 index 0000000..925b135 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsAnnouncements201Response.kt @@ -0,0 +1,61 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param highlighted + * @param id + * @param imageByteSize + * @param imageContentType + * @param imageKey + * @param imageUpdatedAt + * @param kioskOnly + * @param title + * @param updatedAt + * @param validFrom + * @param validUntil + * @param cohortIds + * @param kioskIds + */ +@Serializable +data class PostNewsAnnouncements201Response( + @SerialName(value = "authorId") @Required val authorId: kotlin.String?, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "highlighted") @Required val highlighted: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "imageByteSize") @Required val imageByteSize: kotlin.Double?, + @SerialName(value = "imageContentType") @Required val imageContentType: kotlin.String?, + @SerialName(value = "imageKey") @Required val imageKey: kotlin.String?, + @SerialName(value = "imageUpdatedAt") @Required val imageUpdatedAt: kotlin.String?, + @SerialName(value = "kioskOnly") @Required val kioskOnly: kotlin.Boolean, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String?, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String?, + @SerialName(value = "cohortIds") @Required val cohortIds: kotlin.collections.List, + @SerialName(value = "kioskIds") @Required val kioskIds: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsAnnouncementsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsAnnouncementsRequest.kt new file mode 100644 index 0000000..5219eb7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsAnnouncementsRequest.kt @@ -0,0 +1,45 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostNewsAnnouncementsRequestContentInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param content + * @param validFrom + * @param validUntil + * @param cohortIds + * @param highlighted + * @param kioskIds + * @param kioskOnly + * @param title + */ +@Serializable +data class PostNewsAnnouncementsRequest( + @SerialName(value = "content") @Required val content: kotlin.collections.List, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String?, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String?, + @SerialName(value = "cohortIds") val cohortIds: kotlin.collections.List? = null, + @SerialName(value = "highlighted") val highlighted: kotlin.Boolean? = null, + @SerialName(value = "kioskIds") val kioskIds: kotlin.collections.List? = null, + @SerialName(value = "kioskOnly") val kioskOnly: kotlin.Boolean? = null, + @SerialName(value = "title") val title: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsAnnouncementsRequestContentInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsAnnouncementsRequestContentInner.kt new file mode 100644 index 0000000..cd18e90 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsAnnouncementsRequestContentInner.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskRequestConfig +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param content + * @param type + */ +@Serializable +data class PostNewsAnnouncementsRequestContentInner( + @SerialName(value = "content") @Required val content: PostKioskRequestConfig?, + @SerialName(value = "type") @Required val type: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsBlogs201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsBlogs201Response.kt new file mode 100644 index 0000000..94fe5fe --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsBlogs201Response.kt @@ -0,0 +1,47 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param id + * @param publishedAt + * @param slug + * @param status + * @param title + * @param updatedAt + */ +@Serializable +data class PostNewsBlogs201Response( + @SerialName(value = "authorId") @Required val authorId: kotlin.String?, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "publishedAt") @Required val publishedAt: kotlin.String?, + @SerialName(value = "slug") @Required val slug: kotlin.String?, + @SerialName(value = "status") @Required val status: kotlin.String?, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsBlogsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsBlogsRequest.kt new file mode 100644 index 0000000..bfc7d9c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsBlogsRequest.kt @@ -0,0 +1,53 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchNewsAnnouncementsByIdRequestContentInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param content + * @param title + * @param slug + * @param status + */ +@Serializable +data class PostNewsBlogsRequest( + @SerialName(value = "content") @Required val content: kotlin.collections.List, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "slug") val slug: kotlin.String? = null, + @SerialName(value = "status") val status: PostNewsBlogsRequest.Status? = Status.draft, +) { + /** + * + * + * Values: draft,published + */ + @Serializable + enum class Status( + val value: kotlin.String, + ) { + @SerialName(value = "draft") + draft("draft"), + + @SerialName(value = "published") + published("published"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsSystemMessages201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsSystemMessages201Response.kt new file mode 100644 index 0000000..b6e3831 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsSystemMessages201Response.kt @@ -0,0 +1,47 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchBugReportByIdStatus200ResponseMetadata +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param authorId + * @param content + * @param createdAt + * @param id + * @param title + * @param updatedAt + * @param validFrom + * @param validUntil + * @param cohortIds + */ +@Serializable +data class PostNewsSystemMessages201Response( + @SerialName(value = "authorId") @Required val authorId: kotlin.String?, + @SerialName(value = "content") @Required val content: PatchBugReportByIdStatus200ResponseMetadata?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String?, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String?, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String?, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String?, + @SerialName(value = "cohortIds") @Required val cohortIds: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsSystemMessagesRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsSystemMessagesRequest.kt new file mode 100644 index 0000000..1c7e2c4 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNewsSystemMessagesRequest.kt @@ -0,0 +1,39 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PatchNewsAnnouncementsByIdRequestContentInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param content + * @param title + * @param validFrom + * @param validUntil + * @param cohortIds + */ +@Serializable +data class PostNewsSystemMessagesRequest( + @SerialName(value = "content") @Required val content: kotlin.collections.List, + @SerialName(value = "title") @Required val title: kotlin.String?, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String?, + @SerialName(value = "validUntil") @Required val validUntil: kotlin.String?, + @SerialName(value = "cohortIds") val cohortIds: kotlin.collections.List? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsByIdRead200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsByIdRead200Response.kt new file mode 100644 index 0000000..c03e303 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsByIdRead200Response.kt @@ -0,0 +1,44 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param content + * @param createdAt + * @param id + * @param metadata + * @param read + * @param title + * @param type + * @param userId + */ +@Serializable +data class PostNotificationsByIdRead200Response( + @SerialName(value = "content") @Required val content: kotlin.String, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "metadata") @Required val metadata: kotlin.collections.Map?, + @SerialName(value = "read") @Required val read: kotlin.Boolean, + @SerialName(value = "title") @Required val title: kotlin.String, + @SerialName(value = "type") @Required val type: kotlin.String, + @SerialName(value = "userId") @Required val userId: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsFcmTokensRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsFcmTokensRequest.kt new file mode 100644 index 0000000..f01070e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsFcmTokensRequest.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param token + * @param deviceInfo + */ +@Serializable +data class PostNotificationsFcmTokensRequest( + @SerialName(value = "token") @Required val token: kotlin.String?, + @SerialName(value = "deviceInfo") val deviceInfo: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestPreview200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestPreview200Response.kt new file mode 100644 index 0000000..ac47972 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestPreview200Response.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param html + */ +@Serializable +data class PostNotificationsTestPreview200Response( + @SerialName(value = "html") @Required val html: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestPreviewRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestPreviewRequest.kt new file mode 100644 index 0000000..bb21c40 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestPreviewRequest.kt @@ -0,0 +1,89 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param type + * @param content + * @param language + * @param subject + */ +@Serializable +data class PostNotificationsTestPreviewRequest( + @SerialName(value = "type") @Required val type: PostNotificationsTestPreviewRequest.Type, + @SerialName(value = "content") val content: kotlin.String? = null, + @SerialName(value = "language") val language: PostNotificationsTestPreviewRequest.Language? = null, + @SerialName(value = "subject") val subject: kotlin.String? = null, +) { + /** + * + * + * Values: substitution,substitution_teacher,moved_lesson,announcement,system_message,blog_post,doorlock_card_used,cohort_reselection_required,test + */ + @Serializable + enum class Type( + val value: kotlin.String, + ) { + @SerialName(value = "substitution") + substitution("substitution"), + + @SerialName(value = "substitution_teacher") + substitution_teacher("substitution_teacher"), + + @SerialName(value = "moved_lesson") + moved_lesson("moved_lesson"), + + @SerialName(value = "announcement") + announcement("announcement"), + + @SerialName(value = "system_message") + system_message("system_message"), + + @SerialName(value = "blog_post") + blog_post("blog_post"), + + @SerialName(value = "doorlock_card_used") + doorlock_card_used("doorlock_card_used"), + + @SerialName(value = "cohort_reselection_required") + cohort_reselection_required("cohort_reselection_required"), + + @SerialName(value = "test") + test("test"), + } + + /** + * + * + * Values: en,hu + */ + @Serializable + enum class Language( + val value: kotlin.String, + ) { + @SerialName(value = "en") + en("en"), + + @SerialName(value = "hu") + hu("hu"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestSend200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestSend200Response.kt new file mode 100644 index 0000000..630e8e7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestSend200Response.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param inApp + * @param push + */ +@Serializable +data class PostNotificationsTestSend200Response( + @SerialName(value = "email") @Required val email: kotlin.Boolean, + @SerialName(value = "inApp") @Required val inApp: kotlin.Boolean, + @SerialName(value = "push") @Required val push: kotlin.Boolean, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestSendRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestSendRequest.kt new file mode 100644 index 0000000..cb796b9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestSendRequest.kt @@ -0,0 +1,94 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostNotificationsTestSendRequestChannels +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param channels + * @param type + * @param content + * @param email + * @param language + * @param subject + */ +@Serializable +data class PostNotificationsTestSendRequest( + @SerialName(value = "channels") @Required val channels: PostNotificationsTestSendRequestChannels, + @SerialName(value = "type") @Required val type: PostNotificationsTestSendRequest.Type, + @SerialName(value = "content") val content: kotlin.String? = null, + @SerialName(value = "email") val email: kotlin.String? = null, + @SerialName(value = "language") val language: PostNotificationsTestSendRequest.Language? = null, + @SerialName(value = "subject") val subject: kotlin.String? = null, +) { + /** + * + * + * Values: substitution,substitution_teacher,moved_lesson,announcement,system_message,blog_post,doorlock_card_used,cohort_reselection_required,test + */ + @Serializable + enum class Type( + val value: kotlin.String, + ) { + @SerialName(value = "substitution") + substitution("substitution"), + + @SerialName(value = "substitution_teacher") + substitution_teacher("substitution_teacher"), + + @SerialName(value = "moved_lesson") + moved_lesson("moved_lesson"), + + @SerialName(value = "announcement") + announcement("announcement"), + + @SerialName(value = "system_message") + system_message("system_message"), + + @SerialName(value = "blog_post") + blog_post("blog_post"), + + @SerialName(value = "doorlock_card_used") + doorlock_card_used("doorlock_card_used"), + + @SerialName(value = "cohort_reselection_required") + cohort_reselection_required("cohort_reselection_required"), + + @SerialName(value = "test") + test("test"), + } + + /** + * + * + * Values: en,hu + */ + @Serializable + enum class Language( + val value: kotlin.String, + ) { + @SerialName(value = "en") + en("en"), + + @SerialName(value = "hu") + hu("hu"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestSendRequestChannels.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestSendRequestChannels.kt new file mode 100644 index 0000000..7c10863 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostNotificationsTestSendRequestChannels.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param email + * @param inApp + * @param push + */ +@Serializable +data class PostNotificationsTestSendRequestChannels( + @SerialName(value = "email") val email: kotlin.Boolean? = false, + @SerialName(value = "inApp") val inApp: kotlin.Boolean? = false, + @SerialName(value = "push") val push: kotlin.Boolean? = false, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostRoles201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostRoles201Response.kt new file mode 100644 index 0000000..f16e106 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostRoles201Response.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param can + * @param name + */ +@Serializable +data class PostRoles201Response( + @SerialName(value = "can") @Required val can: kotlin.collections.List, + @SerialName(value = "name") @Required val name: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostRolesRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostRolesRequest.kt new file mode 100644 index 0000000..ba43063 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostRolesRequest.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param name + * @param permissions + */ +@Serializable +data class PostRolesRequest( + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "permissions") val permissions: kotlin.collections.List? = arrayListOf(), +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableGroupsSelect200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableGroupsSelect200Response.kt new file mode 100644 index 0000000..f75602c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableGroupsSelect200Response.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param divisionTag + * @param selectedGroupId + */ +@Serializable +data class PostTimetableGroupsSelect200Response( + @SerialName(value = "divisionTag") @Required val divisionTag: kotlin.String?, + @SerialName(value = "selectedGroupId") @Required val selectedGroupId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableGroupsSelectRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableGroupsSelectRequest.kt new file mode 100644 index 0000000..1df4f10 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableGroupsSelectRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param groupId + */ +@Serializable +data class PostTimetableGroupsSelectRequest( + @SerialName(value = "groupId") @Required val groupId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableImportRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableImportRequest.kt new file mode 100644 index 0000000..21a63ba --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableImportRequest.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param file + * @param name + * @param validFrom + * @param validTo + */ +@Serializable +data class PostTimetableImportRequest( + @SerialName(value = "file") @Required val file: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "validFrom") @Required val validFrom: kotlin.String, + @SerialName(value = "validTo") val validTo: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200Response.kt new file mode 100644 index 0000000..747a3f7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200Response.kt @@ -0,0 +1,33 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachers200ResponseItemsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param items + * @param total + */ +@Serializable +data class PostTimetableLessonsGetForTeachers200Response( + @SerialName(value = "items") @Required val items: kotlin.collections.List, + @SerialName(value = "total") @Required val total: kotlin.Double?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200ResponseItemsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200ResponseItemsInner.kt new file mode 100644 index 0000000..7e9ee6f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200ResponseItemsInner.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param lessons + * @param teacherId + */ +@Serializable +data class PostTimetableLessonsGetForTeachers200ResponseItemsInner( + @SerialName(value = "lessons") @Required val lessons: + kotlin.collections.List, + @SerialName(value = "teacherId") @Required val teacherId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInner.kt new file mode 100644 index 0000000..02b6973 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInner.kt @@ -0,0 +1,64 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForIdByLessonId200ResponseGroupsInner +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForIdByLessonId200ResponseWeekDefinition +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInnerDay +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param classrooms + * @param cohorts + * @param groups + * @param groupsIds + * @param id + * @param period + * @param periodsPerWeek + * @param subject + * @param teachers + * @param termDefinitionId + * @param weekDefinition + * @param weeksDefinitionId + * @param day + */ +@Serializable +data class PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInner( + @SerialName(value = "classrooms") @Required val classrooms: + kotlin.collections.List, + @SerialName(value = "cohorts") @Required val cohorts: + kotlin.collections.List, + @SerialName(value = "groups") @Required val groups: + kotlin.collections.List, + @SerialName(value = "groupsIds") @Required val groupsIds: kotlin.collections.List, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "period") @Required val period: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod?, + @SerialName(value = "periodsPerWeek") @Required val periodsPerWeek: kotlin.Double, + @SerialName(value = "subject") @Required val subject: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject?, + @SerialName(value = "teachers") @Required val teachers: + kotlin.collections.List, + @SerialName(value = "termDefinitionId") @Required val termDefinitionId: kotlin.String?, + @SerialName(value = "weekDefinition") @Required val weekDefinition: GetTimetableLessonsGetForIdByLessonId200ResponseWeekDefinition?, + @SerialName(value = "weeksDefinitionId") @Required val weeksDefinitionId: kotlin.String, + @SerialName(value = "day") val day: PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInnerDay? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInnerDay.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInnerDay.kt new file mode 100644 index 0000000..b51941d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInnerDay.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param createdAt + * @param days + * @param id + * @param name + * @param short + * @param updatedAt + */ +@Serializable +data class PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInnerDay( + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "days") @Required val days: kotlin.collections.List?, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "short") @Required val short: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachersRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachersRequest.kt new file mode 100644 index 0000000..c441796 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetForTeachersRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param teacherIds + */ +@Serializable +data class PostTimetableLessonsGetForTeachersRequest( + @SerialName(value = "teacherIds") @Required val teacherIds: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetSubstitutionCandidates200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetSubstitutionCandidates200Response.kt new file mode 100644 index 0000000..b5648bb --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetSubstitutionCandidates200Response.kt @@ -0,0 +1,39 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetForTeachers200ResponseItemsInnerLessonsInner +import hu.petrik.filcapp.api.model.PostTimetableLessonsGetSubstitutionCandidates200ResponseSubstituteCandidatesInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param availableLessons + * @param parallelLessons + * @param substituteCandidates + */ +@Serializable +data class PostTimetableLessonsGetSubstitutionCandidates200Response( + @SerialName(value = "availableLessons") @Required val availableLessons: + kotlin.collections.List, + @SerialName(value = "parallelLessons") @Required val parallelLessons: + kotlin.collections.List, + @SerialName(value = "substituteCandidates") @Required val substituteCandidates: + kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetSubstitutionCandidates200ResponseSubstituteCandidatesInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetSubstitutionCandidates200ResponseSubstituteCandidatesInner.kt new file mode 100644 index 0000000..1a8563b --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetSubstitutionCandidates200ResponseSubstituteCandidatesInner.kt @@ -0,0 +1,35 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetTimetableTeachersMe200Response +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param hasH1 + * @param hasH2 + * @param teacher + */ +@Serializable +data class PostTimetableLessonsGetSubstitutionCandidates200ResponseSubstituteCandidatesInner( + @SerialName(value = "hasH1") @Required val hasH1: kotlin.Boolean, + @SerialName(value = "hasH2") @Required val hasH2: kotlin.Boolean, + @SerialName(value = "teacher") @Required val teacher: GetTimetableTeachersMe200Response?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetSubstitutionCandidatesRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetSubstitutionCandidatesRequest.kt new file mode 100644 index 0000000..33fff1e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableLessonsGetSubstitutionCandidatesRequest.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param date + * @param missingTeacherId + * @param teacherIds + * @param selectedLessonIds + */ +@Serializable +data class PostTimetableLessonsGetSubstitutionCandidatesRequest( + @SerialName(value = "date") @Required val date: kotlin.String?, + @SerialName(value = "missingTeacherId") @Required val missingTeacherId: kotlin.String?, + @SerialName(value = "teacherIds") @Required val teacherIds: kotlin.collections.List, + @SerialName(value = "selectedLessonIds") val selectedLessonIds: kotlin.collections.List? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableMovedLessons200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableMovedLessons200Response.kt new file mode 100644 index 0000000..98e6b60 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableMovedLessons200Response.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param comment + * @param date + * @param id + * @param room + * @param startingDay + * @param startingPeriod + */ +@Serializable +data class PostTimetableMovedLessons200Response( + @SerialName(value = "comment") @Required val comment: kotlin.String?, + @SerialName(value = "date") @Required val date: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "room") @Required val room: kotlin.String?, + @SerialName(value = "startingDay") @Required val startingDay: kotlin.String?, + @SerialName(value = "startingPeriod") @Required val startingPeriod: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableMovedLessonsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableMovedLessonsRequest.kt new file mode 100644 index 0000000..1791e17 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableMovedLessonsRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param date + * @param lessonIds + * @param comment + * @param room + * @param startingDay + * @param startingPeriod + */ +@Serializable +data class PostTimetableMovedLessonsRequest( + @SerialName(value = "date") @Required val date: kotlin.String?, + @SerialName(value = "lessonIds") @Required val lessonIds: kotlin.collections.List, + @SerialName(value = "comment") val comment: kotlin.String? = null, + @SerialName(value = "room") val room: kotlin.String? = null, + @SerialName(value = "startingDay") val startingDay: kotlin.String? = null, + @SerialName(value = "startingPeriod") val startingPeriod: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableSubstitutions200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableSubstitutions200Response.kt new file mode 100644 index 0000000..4dd3059 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableSubstitutions200Response.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param comment + * @param date + * @param id + * @param substituter + */ +@Serializable +data class PostTimetableSubstitutions200Response( + @SerialName(value = "comment") @Required val comment: kotlin.String?, + @SerialName(value = "date") @Required val date: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "substituter") @Required val substituter: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableSubstitutionsManualRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableSubstitutionsManualRequest.kt new file mode 100644 index 0000000..f053b36 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableSubstitutionsManualRequest.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param cohortId + * @param date + * @param periodId + * @param subjectId + * @param substituter + * @param teacherId + * @param comment + */ +@Serializable +data class PostTimetableSubstitutionsManualRequest( + @SerialName(value = "cohortId") @Required val cohortId: kotlin.String?, + @SerialName(value = "date") @Required val date: kotlin.String?, + @SerialName(value = "periodId") @Required val periodId: kotlin.String?, + @SerialName(value = "subjectId") @Required val subjectId: kotlin.String?, + @SerialName(value = "substituter") @Required val substituter: kotlin.String?, + @SerialName(value = "teacherId") @Required val teacherId: kotlin.String?, + @SerialName(value = "comment") val comment: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableSubstitutionsRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableSubstitutionsRequest.kt new file mode 100644 index 0000000..79294c1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableSubstitutionsRequest.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param date + * @param lessonIds + * @param comment + * @param substituter + */ +@Serializable +data class PostTimetableSubstitutionsRequest( + @SerialName(value = "date") @Required val date: kotlin.String?, + @SerialName(value = "lessonIds") @Required val lessonIds: kotlin.collections.List, + @SerialName(value = "comment") val comment: kotlin.String? = null, + @SerialName(value = "substituter") val substituter: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableTimetablesCleanupOrphanedCohorts200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableTimetablesCleanupOrphanedCohorts200Response.kt new file mode 100644 index 0000000..57673c8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostTimetableTimetablesCleanupOrphanedCohorts200Response.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param affectedUserCount + * @param deletedCohortIds + * @param deletedTeacherIds + */ +@Serializable +data class PostTimetableTimetablesCleanupOrphanedCohorts200Response( + @SerialName(value = "affectedUserCount") @Required val affectedUserCount: kotlin.Double?, + @SerialName(value = "deletedCohortIds") @Required val deletedCohortIds: kotlin.collections.List, + @SerialName(value = "deletedTeacherIds") @Required val deletedTeacherIds: kotlin.collections.List, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiDevices201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiDevices201Response.kt new file mode 100644 index 0000000..2502137 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiDevices201Response.kt @@ -0,0 +1,48 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param adminNotes + * @param banned + * @param createdAt + * @param id + * @param lastActiveAt + * @param macAddress + * @param nickname + * @param reportedHostname + * @param updatedAt + * @param wifiUserId + */ +@Serializable +data class PostWifiDevices201Response( + @SerialName(value = "adminNotes") @Required val adminNotes: kotlin.String?, + @SerialName(value = "banned") @Required val banned: kotlin.Boolean, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "lastActiveAt") @Required val lastActiveAt: kotlin.String?, + @SerialName(value = "macAddress") @Required val macAddress: kotlin.String, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, + @SerialName(value = "reportedHostname") @Required val reportedHostname: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "wifiUserId") @Required val wifiUserId: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiDevicesRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiDevicesRequest.kt new file mode 100644 index 0000000..10809e5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiDevicesRequest.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param macAddress + * @param adminNotes + * @param banned + * @param nickname + * @param wifiUserId + */ +@Serializable +data class PostWifiDevicesRequest( + @SerialName(value = "macAddress") @Required val macAddress: kotlin.String, + @SerialName(value = "adminNotes") val adminNotes: kotlin.String? = null, + @SerialName(value = "banned") val banned: kotlin.Boolean? = null, + @SerialName(value = "nickname") val nickname: kotlin.String? = null, + @SerialName(value = "wifiUserId") val wifiUserId: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiNas201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiNas201Response.kt new file mode 100644 index 0000000..83be6e1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiNas201Response.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param comment + * @param createdAt + * @param id + * @param ipAddress + * @param macAddress + * @param updatedAt + */ +@Serializable +data class PostWifiNas201Response( + @SerialName(value = "comment") @Required val comment: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "ipAddress") @Required val ipAddress: kotlin.String, + @SerialName(value = "macAddress") @Required val macAddress: kotlin.String, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiNasRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiNasRequest.kt new file mode 100644 index 0000000..bcaec7e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiNasRequest.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param ipAddress + * @param macAddress + * @param comment + */ +@Serializable +data class PostWifiNasRequest( + @SerialName(value = "ipAddress") @Required val ipAddress: kotlin.String?, + @SerialName(value = "macAddress") @Required val macAddress: kotlin.String, + @SerialName(value = "comment") val comment: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRadiusAuthorize200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRadiusAuthorize200Response.kt new file mode 100644 index 0000000..bc3ad4a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRadiusAuthorize200Response.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param cleartextPassword + * @param controlCleartextPassword + * @param sessionTimeout + */ +@Serializable +data class PostWifiRadiusAuthorize200Response( + @SerialName(value = "Cleartext-Password") @Required val cleartextPassword: kotlin.String?, + @SerialName(value = "control:Cleartext-Password") @Required val controlCleartextPassword: kotlin.String?, + @SerialName(value = "Session-Timeout") @Required val sessionTimeout: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRadiusAuthorizeRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRadiusAuthorizeRequest.kt new file mode 100644 index 0000000..1b8f32f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRadiusAuthorizeRequest.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param source + * @param username + * @param destination + * @param IP + * @param NAS + * @param password + * @param sharedSecret + */ +@Serializable +data class PostWifiRadiusAuthorizeRequest( + @SerialName(value = "source") @Required val source: kotlin.String?, + @SerialName(value = "username") @Required val username: kotlin.String?, + @SerialName(value = "destination") val destination: kotlin.String? = null, + @SerialName(value = "IP") val IP: kotlin.String? = null, + @SerialName(value = "NAS") val NAS: kotlin.String? = null, + @SerialName(value = "password") val password: kotlin.String? = null, + @SerialName(value = "sharedSecret") val sharedSecret: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRoleSpeedProfiles201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRoleSpeedProfiles201Response.kt new file mode 100644 index 0000000..293a80a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRoleSpeedProfiles201Response.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param priority + * @param roleName + * @param speedProfileId + */ +@Serializable +data class PostWifiRoleSpeedProfiles201Response( + @SerialName(value = "priority") @Required val priority: kotlin.Int, + @SerialName(value = "roleName") @Required val roleName: kotlin.String, + @SerialName(value = "speedProfileId") @Required val speedProfileId: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRoleSpeedProfilesRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRoleSpeedProfilesRequest.kt new file mode 100644 index 0000000..51f10f7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiRoleSpeedProfilesRequest.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param roleName + * @param speedProfileId + * @param priority + */ +@Serializable +data class PostWifiRoleSpeedProfilesRequest( + @SerialName(value = "roleName") @Required val roleName: kotlin.String?, + @SerialName(value = "speedProfileId") @Required val speedProfileId: kotlin.String?, + @SerialName(value = "priority") val priority: kotlin.Int? = 0, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSelf201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSelf201Response.kt new file mode 100644 index 0000000..b01b2f3 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSelf201Response.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.GetWifiSelf200ResponseSpeedLimit +import hu.petrik.filcapp.api.model.PostWifiSelf201ResponseDevicesInner +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param banned + * @param devices + * @param speedLimit + * @param username + */ +@Serializable +data class PostWifiSelf201Response( + @SerialName(value = "banned") @Required val banned: kotlin.Boolean, + @SerialName(value = "devices") @Required val devices: kotlin.collections.List, + @SerialName(value = "speedLimit") @Required val speedLimit: GetWifiSelf200ResponseSpeedLimit, + @SerialName(value = "username") @Required val username: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSelf201ResponseDevicesInner.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSelf201ResponseDevicesInner.kt new file mode 100644 index 0000000..bad5c68 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSelf201ResponseDevicesInner.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param banned + * @param id + * @param lastActiveAt + * @param macAddress + * @param nickname + * @param reportedHostname + */ +@Serializable +data class PostWifiSelf201ResponseDevicesInner( + @SerialName(value = "banned") @Required val banned: kotlin.Boolean, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "lastActiveAt") @Required val lastActiveAt: kotlin.String?, + @SerialName(value = "macAddress") @Required val macAddress: kotlin.String, + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, + @SerialName(value = "reportedHostname") @Required val reportedHostname: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSelfRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSelfRequest.kt new file mode 100644 index 0000000..3287042 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSelfRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param password + */ +@Serializable +data class PostWifiSelfRequest( + @SerialName(value = "password") @Required val password: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSpeedProfiles201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSpeedProfiles201Response.kt new file mode 100644 index 0000000..6c8fa71 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSpeedProfiles201Response.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param downloadSpeedMbps + * @param id + * @param isWlanDefault + * @param name + * @param uploadSpeedMbps + */ +@Serializable +data class PostWifiSpeedProfiles201Response( + @SerialName(value = "downloadSpeedMbps") @Required val downloadSpeedMbps: kotlin.Int?, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "isWlanDefault") @Required val isWlanDefault: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "uploadSpeedMbps") @Required val uploadSpeedMbps: kotlin.Int?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSpeedProfilesRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSpeedProfilesRequest.kt new file mode 100644 index 0000000..64f6d84 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiSpeedProfilesRequest.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param name + * @param downloadSpeedMbps + * @param uploadSpeedMbps + */ +@Serializable +data class PostWifiSpeedProfilesRequest( + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "downloadSpeedMbps") val downloadSpeedMbps: kotlin.Int? = -1, + @SerialName(value = "uploadSpeedMbps") val uploadSpeedMbps: kotlin.Int? = -1, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiUsers201Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiUsers201Response.kt new file mode 100644 index 0000000..768cfd8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiUsers201Response.kt @@ -0,0 +1,52 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param allowedMacAddresses + * @param banned + * @param comment + * @param createdAt + * @param createdBy + * @param creatorName + * @param id + * @param lastActiveAt + * @param speedProfileId + * @param updatedAt + * @param userId + * @param username + */ +@Serializable +data class PostWifiUsers201Response( + @SerialName(value = "allowedMacAddresses") @Required val allowedMacAddresses: kotlin.collections.List?, + @SerialName(value = "banned") @Required val banned: kotlin.Boolean, + @SerialName(value = "comment") @Required val comment: kotlin.String?, + @SerialName(value = "createdAt") @Required val createdAt: kotlin.String, + @SerialName(value = "createdBy") @Required val createdBy: kotlin.String?, + @SerialName(value = "creatorName") @Required val creatorName: kotlin.String?, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "lastActiveAt") @Required val lastActiveAt: kotlin.String?, + @SerialName(value = "speedProfileId") @Required val speedProfileId: kotlin.String?, + @SerialName(value = "updatedAt") @Required val updatedAt: kotlin.String, + @SerialName(value = "userId") @Required val userId: kotlin.String?, + @SerialName(value = "username") @Required val username: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiUsersRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiUsersRequest.kt new file mode 100644 index 0000000..2fe989f --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PostWifiUsersRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param password + * @param username + * @param allowedMacAddresses + * @param comment + * @param speedProfileId + * @param userId + */ +@Serializable +data class PostWifiUsersRequest( + @SerialName(value = "password") @Required val password: kotlin.String?, + @SerialName(value = "username") @Required val username: kotlin.String?, + @SerialName(value = "allowedMacAddresses") val allowedMacAddresses: kotlin.collections.List? = null, + @SerialName(value = "comment") val comment: kotlin.String? = null, + @SerialName(value = "speedProfileId") val speedProfileId: kotlin.String? = null, + @SerialName(value = "userId") val userId: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutDoorlockCardsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutDoorlockCardsByIdRequest.kt new file mode 100644 index 0000000..bb4aa6e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutDoorlockCardsByIdRequest.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param name + * @param userId + * @param authorizedDeviceIds + * @param enabled + * @param frozen + */ +@Serializable +data class PutDoorlockCardsByIdRequest( + @SerialName(value = "name") @Required val name: kotlin.String?, + @SerialName(value = "userId") @Required val userId: kotlin.String?, + @SerialName(value = "authorizedDeviceIds") val authorizedDeviceIds: kotlin.collections.List? = null, + @SerialName(value = "enabled") val enabled: kotlin.Boolean? = true, + @SerialName(value = "frozen") val frozen: kotlin.Boolean? = false, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutDoorlockDevicesByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutDoorlockDevicesByIdRequest.kt new file mode 100644 index 0000000..0eea39e --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutDoorlockDevicesByIdRequest.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param apiToken + * @param name + * @param lastResetReason + * @param location + */ +@Serializable +data class PutDoorlockDevicesByIdRequest( + @SerialName(value = "apiToken") @Required val apiToken: kotlin.String, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "lastResetReason") val lastResetReason: kotlin.String? = null, + @SerialName(value = "location") val location: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutDoorlockSelfCardsByIdFrozenRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutDoorlockSelfCardsByIdFrozenRequest.kt new file mode 100644 index 0000000..88ac129 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutDoorlockSelfCardsByIdFrozenRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param frozen + */ +@Serializable +data class PutDoorlockSelfCardsByIdFrozenRequest( + @SerialName(value = "frozen") @Required val frozen: kotlin.Boolean, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutKioskByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutKioskByIdRequest.kt new file mode 100644 index 0000000..25794a8 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutKioskByIdRequest.kt @@ -0,0 +1,53 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import hu.petrik.filcapp.api.model.PostKioskRequestConfig +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param config + * @param enabled + * @param kind + * @param name + */ +@Serializable +data class PutKioskByIdRequest( + @SerialName(value = "config") val config: PostKioskRequestConfig? = null, + @SerialName(value = "enabled") val enabled: kotlin.Boolean? = null, + @SerialName(value = "kind") val kind: PutKioskByIdRequest.Kind? = null, + @SerialName(value = "name") val name: kotlin.String? = null, +) { + /** + * + * + * Values: tv,navigator + */ + @Serializable + enum class Kind( + val value: kotlin.String, + ) { + @SerialName(value = "tv") + tv("tv"), + + @SerialName(value = "navigator") + navigator("navigator"), + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorBuildingsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorBuildingsByIdRequest.kt new file mode 100644 index 0000000..afdcf10 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorBuildingsByIdRequest.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param description + * @param name + * @param x + * @param y + */ +@Serializable +data class PutNavigatorBuildingsByIdRequest( + @SerialName(value = "description") val description: kotlin.String? = null, + @SerialName(value = "name") val name: kotlin.String? = null, + @SerialName(value = "x") val x: kotlin.Double? = null, + @SerialName(value = "y") val y: kotlin.Double? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorClassroomTypesByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorClassroomTypesByIdRequest.kt new file mode 100644 index 0000000..06d67ab --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorClassroomTypesByIdRequest.kt @@ -0,0 +1,32 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param colorhex + * @param name + */ +@Serializable +data class PutNavigatorClassroomTypesByIdRequest( + @SerialName(value = "colorhex") val colorhex: kotlin.String? = null, + @SerialName(value = "name") val name: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorClassroomsById200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorClassroomsById200Response.kt new file mode 100644 index 0000000..2aee7b5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorClassroomsById200Response.kt @@ -0,0 +1,58 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param capacity + * @param description + * @param id + * @param mapped + * @param name + * @param rotation + * @param short + * @param sizeX + * @param sizeY + * @param sizeZ + * @param storey + * @param typeId + * @param x + * @param y + */ +@Serializable +data class PutNavigatorClassroomsById200Response( + @SerialName(value = "building_id") @Required val buildingId: kotlin.String, + @SerialName(value = "capacity") @Required val capacity: kotlin.Int?, + @SerialName(value = "description") @Required val description: kotlin.String, + @SerialName(value = "id") @Required val id: kotlin.String, + @SerialName(value = "mapped") @Required val mapped: kotlin.Boolean, + @SerialName(value = "name") @Required val name: kotlin.String, + @SerialName(value = "rotation") @Required val rotation: kotlin.Double, + @SerialName(value = "short") @Required val short: kotlin.String, + @SerialName(value = "size_x") @Required val sizeX: kotlin.Double, + @SerialName(value = "size_y") @Required val sizeY: kotlin.Double, + @SerialName(value = "size_z") @Required val sizeZ: kotlin.Double, + @SerialName(value = "storey") @Required val storey: kotlin.Int, + @SerialName(value = "type_id") @Required val typeId: kotlin.String?, + @SerialName(value = "x") @Required val x: kotlin.Double, + @SerialName(value = "y") @Required val y: kotlin.Double, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorClassroomsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorClassroomsByIdRequest.kt new file mode 100644 index 0000000..d78e4e9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorClassroomsByIdRequest.kt @@ -0,0 +1,54 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param capacity + * @param description + * @param name + * @param rotation + * @param short + * @param sizeX + * @param sizeY + * @param sizeZ + * @param storey + * @param typeId + * @param x + * @param y + */ +@Serializable +data class PutNavigatorClassroomsByIdRequest( + @SerialName(value = "building_id") val buildingId: kotlin.String? = null, + @SerialName(value = "capacity") val capacity: kotlin.Int? = null, + @SerialName(value = "description") val description: kotlin.String? = null, + @SerialName(value = "name") val name: kotlin.String? = null, + @SerialName(value = "rotation") val rotation: kotlin.Double? = null, + @SerialName(value = "short") val short: kotlin.String? = null, + @SerialName(value = "size_x") val sizeX: kotlin.Double? = null, + @SerialName(value = "size_y") val sizeY: kotlin.Double? = null, + @SerialName(value = "size_z") val sizeZ: kotlin.Double? = null, + @SerialName(value = "storey") val storey: kotlin.Int? = null, + @SerialName(value = "type_id") val typeId: kotlin.String? = null, + @SerialName(value = "x") val x: kotlin.Double? = null, + @SerialName(value = "y") val y: kotlin.Double? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorCorridorsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorCorridorsByIdRequest.kt new file mode 100644 index 0000000..e660914 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorCorridorsByIdRequest.kt @@ -0,0 +1,48 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param barrierFree + * @param buildingId + * @param isOutdoor + * @param name + * @param storey + * @param width + * @param x1 + * @param x2 + * @param y1 + * @param y2 + */ +@Serializable +data class PutNavigatorCorridorsByIdRequest( + @SerialName(value = "barrier_free") val barrierFree: kotlin.Boolean? = null, + @SerialName(value = "building_id") val buildingId: kotlin.String? = null, + @SerialName(value = "is_outdoor") val isOutdoor: kotlin.Boolean? = null, + @SerialName(value = "name") val name: kotlin.String? = null, + @SerialName(value = "storey") val storey: kotlin.Int? = null, + @SerialName(value = "width") val width: kotlin.Double? = null, + @SerialName(value = "x1") val x1: kotlin.Double? = null, + @SerialName(value = "x2") val x2: kotlin.Double? = null, + @SerialName(value = "y1") val y1: kotlin.Double? = null, + @SerialName(value = "y2") val y2: kotlin.Double? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorLiftsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorLiftsByIdRequest.kt new file mode 100644 index 0000000..b137739 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorLiftsByIdRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param maxStorey + * @param minStorey + * @param name + * @param x + * @param y + */ +@Serializable +data class PutNavigatorLiftsByIdRequest( + @SerialName(value = "building_id") val buildingId: kotlin.String? = null, + @SerialName(value = "max_storey") val maxStorey: kotlin.Int? = null, + @SerialName(value = "min_storey") val minStorey: kotlin.Int? = null, + @SerialName(value = "name") val name: kotlin.String? = null, + @SerialName(value = "x") val x: kotlin.Double? = null, + @SerialName(value = "y") val y: kotlin.Double? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorStairsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorStairsByIdRequest.kt new file mode 100644 index 0000000..2b17cd2 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorStairsByIdRequest.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param buildingId + * @param maxStorey + * @param minStorey + * @param name + * @param rotation + * @param x + * @param y + */ +@Serializable +data class PutNavigatorStairsByIdRequest( + @SerialName(value = "building_id") val buildingId: kotlin.String? = null, + @SerialName(value = "max_storey") val maxStorey: kotlin.Int? = null, + @SerialName(value = "min_storey") val minStorey: kotlin.Int? = null, + @SerialName(value = "name") val name: kotlin.String? = null, + @SerialName(value = "rotation") val rotation: kotlin.Double? = null, + @SerialName(value = "x") val x: kotlin.Double? = null, + @SerialName(value = "y") val y: kotlin.Double? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorTranslationsByLangByKeyRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorTranslationsByLangByKeyRequest.kt new file mode 100644 index 0000000..3ae990d --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutNavigatorTranslationsByLangByKeyRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param text + */ +@Serializable +data class PutNavigatorTranslationsByLangByKeyRequest( + @SerialName(value = "text") @Required val text: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutTimetableMovedLessonsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutTimetableMovedLessonsByIdRequest.kt new file mode 100644 index 0000000..0699cea --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutTimetableMovedLessonsByIdRequest.kt @@ -0,0 +1,40 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param comment + * @param date + * @param lessonIds + * @param room + * @param startingDay + * @param startingPeriod + */ +@Serializable +data class PutTimetableMovedLessonsByIdRequest( + @SerialName(value = "comment") val comment: kotlin.String? = null, + @SerialName(value = "date") val date: kotlin.String? = null, + @SerialName(value = "lessonIds") val lessonIds: kotlin.collections.List? = null, + @SerialName(value = "room") val room: kotlin.String? = null, + @SerialName(value = "startingDay") val startingDay: kotlin.String? = null, + @SerialName(value = "startingPeriod") val startingPeriod: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutTimetableSubstitutionsByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutTimetableSubstitutionsByIdRequest.kt new file mode 100644 index 0000000..8aeb3d9 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutTimetableSubstitutionsByIdRequest.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param lessonIds + * @param comment + * @param date + * @param substituter + */ +@Serializable +data class PutTimetableSubstitutionsByIdRequest( + @SerialName(value = "lessonIds") @Required val lessonIds: kotlin.collections.List?, + @SerialName(value = "comment") val comment: kotlin.String? = null, + @SerialName(value = "date") val date: kotlin.String? = null, + @SerialName(value = "substituter") val substituter: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiDevicesByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiDevicesByIdRequest.kt new file mode 100644 index 0000000..8dede6c --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiDevicesByIdRequest.kt @@ -0,0 +1,38 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param adminNotes + * @param banned + * @param macAddress + * @param nickname + * @param wifiUserId + */ +@Serializable +data class PutWifiDevicesByIdRequest( + @SerialName(value = "adminNotes") val adminNotes: kotlin.String? = null, + @SerialName(value = "banned") val banned: kotlin.Boolean? = null, + @SerialName(value = "macAddress") val macAddress: kotlin.String? = null, + @SerialName(value = "nickname") val nickname: kotlin.String? = null, + @SerialName(value = "wifiUserId") val wifiUserId: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiNasByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiNasByIdRequest.kt new file mode 100644 index 0000000..ea812b1 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiNasByIdRequest.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param comment + * @param ipAddress + * @param macAddress + */ +@Serializable +data class PutWifiNasByIdRequest( + @SerialName(value = "comment") val comment: kotlin.String? = null, + @SerialName(value = "ipAddress") val ipAddress: kotlin.String? = null, + @SerialName(value = "macAddress") val macAddress: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiRoleSpeedProfilesByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiRoleSpeedProfilesByIdRequest.kt new file mode 100644 index 0000000..af99e70 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiRoleSpeedProfilesByIdRequest.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param priority + * @param roleName + * @param speedProfileId + */ +@Serializable +data class PutWifiRoleSpeedProfilesByIdRequest( + @SerialName(value = "priority") val priority: kotlin.Int? = 0, + @SerialName(value = "roleName") val roleName: kotlin.String? = null, + @SerialName(value = "speedProfileId") val speedProfileId: kotlin.String? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSelfDevicesByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSelfDevicesByIdRequest.kt new file mode 100644 index 0000000..45ebeb7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSelfDevicesByIdRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param nickname + */ +@Serializable +data class PutWifiSelfDevicesByIdRequest( + @SerialName(value = "nickname") @Required val nickname: kotlin.String?, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSelfPassword200Response.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSelfPassword200Response.kt new file mode 100644 index 0000000..ff22c65 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSelfPassword200Response.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param success + */ +@Serializable +data class PutWifiSelfPassword200Response( + @SerialName(value = "success") @Required val success: kotlin.Boolean, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSelfPasswordRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSelfPasswordRequest.kt new file mode 100644 index 0000000..89f3ce7 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSelfPasswordRequest.kt @@ -0,0 +1,30 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param newPassword + */ +@Serializable +data class PutWifiSelfPasswordRequest( + @SerialName(value = "newPassword") @Required val newPassword: kotlin.String, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSpeedProfilesByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSpeedProfilesByIdRequest.kt new file mode 100644 index 0000000..6dcf3f5 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiSpeedProfilesByIdRequest.kt @@ -0,0 +1,34 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param downloadSpeedMbps + * @param name + * @param uploadSpeedMbps + */ +@Serializable +data class PutWifiSpeedProfilesByIdRequest( + @SerialName(value = "downloadSpeedMbps") val downloadSpeedMbps: kotlin.Int? = -1, + @SerialName(value = "name") val name: kotlin.String? = null, + @SerialName(value = "uploadSpeedMbps") val uploadSpeedMbps: kotlin.Int? = -1, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiUsersByIdRequest.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiUsersByIdRequest.kt new file mode 100644 index 0000000..5083011 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/PutWifiUsersByIdRequest.kt @@ -0,0 +1,42 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport", +) + +package hu.petrik.filcapp.api.model + +import kotlinx.serialization.* +import kotlinx.serialization.descriptors.* +import kotlinx.serialization.encoding.* + +/** + * + * + * @param allowedMacAddresses + * @param comment + * @param password + * @param speedProfileId + * @param userId + * @param username + * @param banned + */ +@Serializable +data class PutWifiUsersByIdRequest( + @SerialName(value = "allowedMacAddresses") val allowedMacAddresses: kotlin.collections.List? = null, + @SerialName(value = "comment") val comment: kotlin.String? = null, + @SerialName(value = "password") val password: kotlin.String? = null, + @SerialName(value = "speedProfileId") val speedProfileId: kotlin.String? = null, + @SerialName(value = "userId") val userId: kotlin.String? = null, + @SerialName(value = "username") val username: kotlin.String? = null, + @SerialName(value = "banned") val banned: kotlin.Boolean? = null, +) diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/Substitution.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/Substitution.kt index e8b6b7e..f5e4e11 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/Substitution.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/Substitution.kt @@ -57,7 +57,9 @@ data class Substitution( * Values: substitution,cancellation,roomChange */ @Serializable - enum class Type(val value: kotlin.String) { + enum class Type( + val value: kotlin.String, + ) { @SerialName(value = "substitution") substitution("substitution"), diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/SystemMessage.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/SystemMessage.kt index 8727064..66d4177 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/SystemMessage.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/api/model/SystemMessage.kt @@ -42,7 +42,9 @@ data class SystemMessage( * Values: info,warning,error */ @Serializable - enum class Severity(val value: kotlin.String) { + enum class Severity( + val value: kotlin.String, + ) { @SerialName(value = "info") info("info"), diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthCompatibility.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthCompatibility.kt index 47c96c4..9308f63 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthCompatibility.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthCompatibility.kt @@ -4,10 +4,10 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue -import hu.petrik.filcapp.network.CohortDto -import hu.petrik.filcapp.network.FilcPublicApi -import hu.petrik.filcapp.network.GroupDto -import hu.petrik.filcapp.network.TeacherDto +import hu.petrik.filcapp.data.ChronosApi +import hu.petrik.filcapp.data.CohortDto +import hu.petrik.filcapp.data.GroupDto +import hu.petrik.filcapp.data.TeacherDto data class SchoolProfileDto( val cohort: CohortDto? = null, @@ -32,7 +32,7 @@ object SchoolProfileState { suspend fun refresh(user: AuthUser) { val teacher = runCatching { - FilcPublicApi.getMyTeacher() + ChronosApi.getMyTeacher() }.getOrNull() val cohortId = user.cohortId @@ -41,7 +41,7 @@ object SchoolProfileState { emptyList() } else { runCatching { - FilcPublicApi + ChronosApi .getGroupsForCohort(cohortId) .filter { it.selected } }.getOrDefault(emptyList()) @@ -52,8 +52,8 @@ object SchoolProfileState { null } else { runCatching { - val latest = FilcPublicApi.getLatestValidTimetable() - FilcPublicApi + val latest = ChronosApi.getLatestValidTimetable() + ChronosApi .getCohorts(latest.id) .firstOrNull { it.id == cohortId } }.getOrNull() ?: CohortDto( @@ -111,7 +111,7 @@ object AuthManager { } suspend fun selectGroup(groupId: String) { - FilcPublicApi.selectGroup(groupId) + ChronosApi.selectGroup(groupId) AuthState.user?.let { SchoolProfileState.refresh(it) } } @@ -120,7 +120,7 @@ object AuthManager { return } runCatching { - FilcPublicApi.updateLanguage(language.lowercase()) + ChronosApi.updateLanguage(language.lowercase()) } } } diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthConfig.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthConfig.kt index 464d756..4c93d57 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthConfig.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthConfig.kt @@ -1,5 +1,7 @@ package hu.petrik.filcapp.auth +import hu.petrik.filcapp.config.MergenEnvironment + /** * Entra ID / OpenID Connect settings for the native sign-in flow. * @@ -19,10 +21,11 @@ object AuthConfig { * `aud` is a different client id, so this must match the backend - the mobile app shares the * deployment's app registration (its `filcapp://auth` redirect is registered there). */ - const val ENTRA_CLIENT_ID = "97d7a0db-2afc-4c0b-af6f-c9ca8357d68d" + const val ENTRA_CLIENT_ID = + MergenEnvironment.ENTRA_CLIENT_ID /** Must equal `CHRONOS_ENTRA_TENANT_ID` (tenant GUID or verified domain). */ - const val ENTRA_TENANT_ID = "6701f6a4-b306-4be9-93be-7b9809225222" + const val ENTRA_TENANT_ID = MergenEnvironment.ENTRA_TENANT_ID const val AUTHORITY = "https://login.microsoftonline.com" @@ -38,7 +41,7 @@ object AuthConfig { * Chronos API root. Kept separate from the generated client's `ApiClient.BASE_URL`: the * checked-in OpenAPI document still points at the retired `filc.space` domain. */ - const val API_BASE_URL = "https://filc.petrik.hu/api" + const val API_BASE_URL = MergenEnvironment.API_BASE_URL const val AUTH_BASE_URL = "$API_BASE_URL/auth" @@ -47,7 +50,7 @@ object AuthConfig { * carry a session cookie, so state-changing `/auth` calls (sign-out) need one the deployment * trusts - which is its own base URL. */ - const val TRUSTED_ORIGIN = "https://filc.petrik.hu" + const val TRUSTED_ORIGIN = MergenEnvironment.API_ORIGIN val authorizationEndpoint: String get() = "$AUTHORITY/$ENTRA_TENANT_ID/oauth2/v2.0/authorize" diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthModels.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthModels.kt index f71c9bd..c0bda5f 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthModels.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/AuthModels.kt @@ -28,11 +28,17 @@ data class AuthUser( sealed interface AuthState { data object Loading : AuthState - data class SigningIn(val message: String? = null) : AuthState + data class SigningIn( + val message: String? = null, + ) : AuthState - data class SignedOut(val message: String? = null) : AuthState + data class SignedOut( + val message: String? = null, + ) : AuthState - data class SignedIn(val user: AuthUser) : AuthState + data class SignedIn( + val user: AuthUser, + ) : AuthState /** * Compatibility accessors used by the timetable/settings feature branch. diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/CookieStorage.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/CookieStorage.kt index b701752..f20ab08 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/CookieStorage.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/CookieStorage.kt @@ -81,7 +81,8 @@ internal class PersistentCookieStorage( if (live.size != stored.size) { write(live) } - live.map { it.toCookie() } + live + .map { it.toCookie() } .filter { it.fillDefaults(requestUrl).matches(requestUrl) } } @@ -97,7 +98,8 @@ internal class PersistentCookieStorage( } private fun read(): List = - store.getString(COOKIES_KEY) + store + .getString(COOKIES_KEY) ?.let { stored -> runCatching { json.decodeFromString>(stored) }.getOrNull() } .orEmpty() diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/OidcClient.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/OidcClient.kt index 000cba0..dfffe98 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/OidcClient.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/auth/OidcClient.kt @@ -17,7 +17,9 @@ import kotlin.time.ExperimentalTime * Entra ID public-client (PKCE) calls. Nothing is validated on the device: Chronos checks the * ID token's signature, audience, tenant and age, so the app only has to obtain one. */ -internal class OidcClient(private val http: HttpClient) { +internal class OidcClient( + private val http: HttpClient, +) { fun newPendingFlow(): PendingFlow = PendingFlow( state = randomBytes(16).toBase64Url(), @@ -99,7 +101,11 @@ internal class OidcClient(private val http: HttpClient) { internal fun nowMillis(): Long = Clock.System.now().toEpochMilliseconds() /** Parameter the browser handed back to the app. */ -internal data class RedirectResult(val code: String?, val state: String?, val error: String?) { +internal data class RedirectResult( + val code: String?, + val state: String?, + val error: String?, +) { val isSuccess: Boolean get() = code != null && error == null } diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/calendar/SchoolCalendarApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/calendar/SchoolCalendarApi.kt index e19f543..ad206cb 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/calendar/SchoolCalendarApi.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/calendar/SchoolCalendarApi.kt @@ -57,8 +57,7 @@ object SchoolCalendarApi { "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + "AppleWebKit/537.36 Chrome/140.0.0.0 Safari/537.36", ) - } - .bodyAsText() + }.bodyAsText() check(payload.contains("BEGIN:VCALENDAR")) { "Outlook did not return an ICS calendar. Response: ${payload.take(200)}" @@ -121,13 +120,11 @@ private object OutlookIcsParser { masters.flatMap { event -> expand(event, horizonStart, horizonEnd, overriddenStarts) } + overrides.filterNot { it.cancelled }.map { it.toPublicEvent() } - } - .filterNot { it.title.isBlank() } + }.filterNot { it.title.isBlank() } .filter { event -> (event.end?.date ?: event.start.date) >= horizonStart && event.start.date <= horizonEnd - } - .distinctBy { event -> "${event.id}|${event.start}|${event.title}" } + }.distinctBy { event -> "${event.id}|${event.start}|${event.title}" } .sortedWith(compareBy { it.start }.thenBy { it.title }) } @@ -152,12 +149,18 @@ private object OutlookIcsParser { lines.forEach { line -> when (line.trim().uppercase()) { - "BEGIN:VEVENT" -> current = mutableListOf() + "BEGIN:VEVENT" -> { + current = mutableListOf() + } + "END:VEVENT" -> { current?.let { parseEvent(it)?.let(result::add) } current = null } - else -> current?.add(line) + + else -> { + current?.add(line) + } } } @@ -169,8 +172,18 @@ private object OutlookIcsParser { val startProperty = properties.firstOrNull { it.name == "DTSTART" } ?: return null val start = parseDateTime(startProperty) ?: return null val end = properties.firstOrNull { it.name == "DTEND" }?.let(::parseDateTime)?.value - val id = properties.firstOrNull { it.name == "UID" }?.value?.trim().orEmpty() - val title = properties.firstOrNull { it.name == "SUMMARY" }?.value?.decodeIcsText().orEmpty() + val id = + properties + .firstOrNull { it.name == "UID" } + ?.value + ?.trim() + .orEmpty() + val title = + properties + .firstOrNull { it.name == "SUMMARY" } + ?.value + ?.decodeIcsText() + .orEmpty() val location = properties .firstOrNull { it.name == "LOCATION" } @@ -185,7 +198,12 @@ private object OutlookIcsParser { ?.decodeIcsText() ?.trim() ?.takeIf { it.isNotBlank() } - val status = properties.firstOrNull { it.name == "STATUS" }?.value?.trim()?.uppercase() + val status = + properties + .firstOrNull { it.name == "STATUS" } + ?.value + ?.trim() + ?.uppercase() val recurrenceRule = properties.firstOrNull { it.name == "RRULE" }?.value?.trim() val recurrenceId = properties.firstOrNull { it.name == "RECURRENCE-ID" }?.let(::parseDateTime)?.value @@ -262,6 +280,7 @@ private object OutlookIcsParser { inQuotes = !inQuotes current.append(char) } + ';' -> { if (inQuotes) { current.append(char) @@ -270,7 +289,10 @@ private object OutlookIcsParser { current.clear() } } - else -> current.append(char) + + else -> { + current.append(char) + } } } @@ -310,10 +332,11 @@ private object OutlookIcsParser { val converted = when { - raw.endsWith("Z", ignoreCase = true) -> + raw.endsWith("Z", ignoreCase = true) -> { runCatching { local.toInstant(TimeZone.UTC).toLocalDateTime(petrikTimeZone) }.getOrDefault(local) + } property.params["TZID"] != null -> { val sourceZone = resolveTimeZone(property.params.getValue("TZID")) @@ -322,7 +345,9 @@ private object OutlookIcsParser { }.getOrDefault(local) } - else -> local + else -> { + local + } } return ParsedDateTime(value = converted, allDay = false) @@ -377,7 +402,8 @@ private object OutlookIcsParser { if (raw.isNullOrBlank()) return null val values = - raw.split(';') + raw + .split(';') .mapNotNull { part -> val equals = part.indexOf('=') if (equals <= 0) return@mapNotNull null @@ -645,12 +671,18 @@ private object OutlookIcsParser { private fun previousDay(date: LocalDate): LocalDate = when { - date.day > 1 -> LocalDate(date.year, date.monthNumber, date.day - 1) + date.day > 1 -> { + LocalDate(date.year, date.monthNumber, date.day - 1) + } + date.monthNumber > 1 -> { val month = date.monthNumber - 1 LocalDate(date.year, month, daysInMonth(date.year, month)) } - else -> LocalDate(date.year - 1, 12, 31) + + else -> { + LocalDate(date.year - 1, 12, 31) + } } private fun daysBetween( diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/SchoolCalendarUi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/SchoolCalendarUi.kt index 6c09d3a..ac9f617 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/SchoolCalendarUi.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/SchoolCalendarUi.kt @@ -63,7 +63,13 @@ fun SchoolCalendarCard( onOpenCalendar: () -> Unit, modifier: Modifier = Modifier, ) { - val today = remember { Clock.System.now().toLocalDateTime(PETRIK_TIME_ZONE).date } + val today = + remember { + Clock.System + .now() + .toLocalDateTime(PETRIK_TIME_ZONE) + .date + } var weekStart by remember { mutableStateOf(startOfWeek(today)) } var selectedDate by remember { mutableStateOf(today) } @@ -128,8 +134,14 @@ fun SchoolCalendarCard( ) when { - loading -> CalendarLoading() - error != null && events.isEmpty() -> CalendarError(error, onRetry) + loading -> { + CalendarLoading() + } + + error != null && events.isEmpty() -> { + CalendarError(error, onRetry) + } + else -> { val selectedEvents = remember(events, selectedDate) { @@ -179,7 +191,13 @@ fun SchoolCalendarScreen( onBack: () -> Unit, modifier: Modifier = Modifier, ) { - val today = remember { Clock.System.now().toLocalDateTime(PETRIK_TIME_ZONE).date } + val today = + remember { + Clock.System + .now() + .toLocalDateTime(PETRIK_TIME_ZONE) + .date + } var month by remember { mutableStateOf(MonthCursor(today.year, today.monthNumber)) } var selectedDate by remember { mutableStateOf(today) } @@ -240,8 +258,14 @@ fun SchoolCalendarScreen( } when { - loading -> CalendarLoading() - error != null && events.isEmpty() -> CalendarError(error, onRetry) + loading -> { + CalendarLoading() + } + + error != null && events.isEmpty() -> { + CalendarError(error, onRetry) + } + else -> { val selectedEvents = remember(events, selectedDate) { @@ -776,12 +800,18 @@ private fun nextDay(date: LocalDate): LocalDate { private fun previousDay(date: LocalDate): LocalDate = when { - date.day > 1 -> LocalDate(date.year, date.monthNumber, date.day - 1) + date.day > 1 -> { + LocalDate(date.year, date.monthNumber, date.day - 1) + } + date.monthNumber > 1 -> { val month = date.monthNumber - 1 LocalDate(date.year, month, daysInMonth(date.year, month)) } - else -> LocalDate(date.year - 1, 12, 31) + + else -> { + LocalDate(date.year - 1, 12, 31) + } } private fun daysInMonth( diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/SchoolCalendarUi.kt.bak b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/SchoolCalendarUi.kt.bak deleted file mode 100644 index 5d72633..0000000 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/SchoolCalendarUi.kt.bak +++ /dev/null @@ -1,797 +0,0 @@ -package hu.petrik.filcapp.components - -import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.shape.CircleShape -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack -import androidx.compose.material.icons.filled.CalendarMonth -import androidx.compose.material.icons.filled.ChevronLeft -import androidx.compose.material.icons.filled.ChevronRight -import androidx.compose.material.icons.filled.Event -import androidx.compose.material.icons.filled.LocationOn -import androidx.compose.material.icons.filled.Refresh -import androidx.compose.material3.Button -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text -import androidx.compose.material3.TextButton -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.style.TextOverflow -import androidx.compose.ui.unit.dp -import hu.petrik.filcapp.calendar.SchoolCalendarEvent -import hu.petrik.filcapp.settings.tr -import kotlinx.datetime.DayOfWeek -import kotlinx.datetime.LocalDate -import kotlinx.datetime.TimeZone -import kotlinx.datetime.toLocalDateTime -import kotlin.time.Clock -import kotlin.time.ExperimentalTime - -@OptIn(ExperimentalTime::class) -@Composable -fun SchoolCalendarCard( - events: List, - loading: Boolean, - error: String?, - onRetry: () -> Unit, - onOpenCalendar: () -> Unit, - modifier: Modifier = Modifier, -) { - val today = remember { Clock.System.now().toLocalDateTime(PETRIK_TIME_ZONE).date } - var weekStart by remember { mutableStateOf(startOfWeek(today)) } - var selectedDate by remember { mutableStateOf(today) } - - Column(modifier = modifier, verticalArrangement = Arrangement.spacedBy(8.dp)) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - Row( - modifier = Modifier.padding(start = 14.dp), - horizontalArrangement = Arrangement.spacedBy(8.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Icon( - imageVector = Icons.Default.CalendarMonth, - contentDescription = null, - tint = MaterialTheme.colorScheme.primary, - ) - Text( - text = tr("Iskolai naptár", "School calendar"), - style = MaterialTheme.typography.titleMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - fontWeight = FontWeight.SemiBold, - ) - } - - TextButton(onClick = onOpenCalendar) { - Text(tr("Összes", "All")) - Icon(Icons.Default.ChevronRight, contentDescription = null) - } - } - - Surface( - modifier = Modifier.fillMaxWidth(), - shape = RoundedCornerShape(16.dp), - color = MaterialTheme.colorScheme.surface, - shadowElevation = 7.dp, - ) { - Column( - modifier = Modifier.fillMaxWidth().padding(14.dp), - verticalArrangement = Arrangement.spacedBy(12.dp), - ) { - WeekNavigation( - weekStart = weekStart, - onPrevious = { - weekStart = addDays(weekStart, -7) - selectedDate = weekStart - }, - onNext = { - weekStart = addDays(weekStart, 7) - selectedDate = weekStart - }, - ) - - WeekStrip( - weekStart = weekStart, - selectedDate = selectedDate, - today = today, - events = events, - onSelect = { selectedDate = it }, - ) - - when { - loading -> CalendarLoading() - error != null && events.isEmpty() -> CalendarError(error, onRetry) - else -> { - val selectedEvents = - remember(events, selectedDate) { - events - .filter { it.occursOn(selectedDate) } - .sortedBy { it.start } - } - - Text( - text = formatSelectedDate(selectedDate), - style = MaterialTheme.typography.labelLarge, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - - if (selectedEvents.isEmpty()) { - EmptyDayMessage(events = events, selectedDate = selectedDate) - } else { - selectedEvents.take(3).forEach { event -> - CalendarEventRow(event = event, compact = true) - } - - if (selectedEvents.size > 3) { - TextButton(onClick = onOpenCalendar) { - Text( - tr( - "+${selectedEvents.size - 3} további esemény", - "+${selectedEvents.size - 3} more events", - ), - ) - } - } - } - } - } - } - } - } -} - -@OptIn(ExperimentalTime::class) -@Composable -fun SchoolCalendarScreen( - events: List, - loading: Boolean, - error: String?, - onRetry: () -> Unit, - onBack: () -> Unit, - modifier: Modifier = Modifier, -) { - val today = remember { Clock.System.now().toLocalDateTime(PETRIK_TIME_ZONE).date } - var month by remember { mutableStateOf(MonthCursor(today.year, today.monthNumber)) } - var selectedDate by remember { mutableStateOf(today) } - - Column( - modifier = - modifier - .fillMaxSize() - .verticalScroll(rememberScrollState()) - .padding(horizontal = 20.dp, vertical = 12.dp), - verticalArrangement = Arrangement.spacedBy(16.dp), - ) { - Row( - modifier = Modifier.fillMaxWidth(), - verticalAlignment = Alignment.CenterVertically, - ) { - IconButton(onClick = onBack) { - Icon(Icons.Default.ArrowBack, contentDescription = tr("Vissza", "Back")) - } - Column { - Text( - text = tr("Iskolai naptár", "School calendar"), - style = MaterialTheme.typography.headlineSmall, - fontWeight = FontWeight.Bold, - ) - Text( - text = tr("Petrik események", "Petrik events"), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - - FilcPanel(modifier = Modifier.fillMaxWidth()) { - MonthNavigation( - cursor = month, - onPrevious = { - month = month.previous() - selectedDate = LocalDate(month.year, month.month, 1) - }, - onNext = { - month = month.next() - selectedDate = LocalDate(month.year, month.month, 1) - }, - ) - - MonthGrid( - cursor = month, - selectedDate = selectedDate, - today = today, - events = events, - onSelect = { selectedDate = it }, - ) - } - - when { - loading -> CalendarLoading() - error != null && events.isEmpty() -> CalendarError(error, onRetry) - else -> { - val selectedEvents = - remember(events, selectedDate) { - events - .filter { it.occursOn(selectedDate) } - .sortedBy { it.start } - } - - FilcPanel( - modifier = Modifier.fillMaxWidth(), - title = formatSelectedDate(selectedDate), - ) { - if (selectedEvents.isEmpty()) { - EmptyDayMessage(events = events, selectedDate = selectedDate) - } else { - selectedEvents.forEach { event -> - CalendarEventRow(event = event, compact = false) - } - } - } - } - } - - Spacer(Modifier.height(8.dp)) - } -} - -@Composable -private fun WeekNavigation( - weekStart: LocalDate, - onPrevious: () -> Unit, - onNext: () -> Unit, -) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - IconButton(onClick = onPrevious) { - Icon(Icons.Default.ChevronLeft, contentDescription = tr("Előző hét", "Previous week")) - } - - Text( - text = weekRangeLabel(weekStart), - style = MaterialTheme.typography.titleSmall, - fontWeight = FontWeight.SemiBold, - ) - - IconButton(onClick = onNext) { - Icon(Icons.Default.ChevronRight, contentDescription = tr("Következő hét", "Next week")) - } - } -} - -@Composable -private fun WeekStrip( - weekStart: LocalDate, - selectedDate: LocalDate, - today: LocalDate, - events: List, - onSelect: (LocalDate) -> Unit, -) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.spacedBy(4.dp), - ) { - repeat(7) { offset -> - val date = addDays(weekStart, offset) - val selected = date == selectedDate - val hasEvent = events.any { it.occursOn(date) } - - Column( - modifier = - Modifier - .weight(1f) - .background( - color = - if (selected) { - MaterialTheme.colorScheme.primary.copy(alpha = 0.18f) - } else { - MaterialTheme.colorScheme.surface - }, - shape = RoundedCornerShape(12.dp), - ).clickable { onSelect(date) } - .padding(vertical = 8.dp), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.spacedBy(3.dp), - ) { - Text( - text = shortWeekday(date.dayOfWeek), - style = MaterialTheme.typography.labelSmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - Text( - text = date.day.toString(), - style = MaterialTheme.typography.titleSmall, - fontWeight = if (date == today || selected) FontWeight.Bold else FontWeight.Normal, - color = - if (date == today || selected) { - MaterialTheme.colorScheme.primary - } else { - MaterialTheme.colorScheme.onSurface - }, - ) - Box( - modifier = - Modifier - .size(5.dp) - .background( - color = - if (hasEvent) { - MaterialTheme.colorScheme.primary - } else { - MaterialTheme.colorScheme.surface - }, - shape = CircleShape, - ), - ) - } - } - } -} - -@Composable -private fun MonthNavigation( - cursor: MonthCursor, - onPrevious: () -> Unit, - onNext: () -> Unit, -) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - IconButton(onClick = onPrevious) { - Icon(Icons.Default.ChevronLeft, contentDescription = tr("Előző hónap", "Previous month")) - } - Text( - text = "${cursor.year}. ${monthName(cursor.month)}", - style = MaterialTheme.typography.titleMedium, - fontWeight = FontWeight.Bold, - ) - IconButton(onClick = onNext) { - Icon(Icons.Default.ChevronRight, contentDescription = tr("Következő hónap", "Next month")) - } - } -} - -@Composable -private fun MonthGrid( - cursor: MonthCursor, - selectedDate: LocalDate, - today: LocalDate, - events: List, - onSelect: (LocalDate) -> Unit, -) { - Row(modifier = Modifier.fillMaxWidth()) { - listOf( - DayOfWeek.MONDAY, - DayOfWeek.TUESDAY, - DayOfWeek.WEDNESDAY, - DayOfWeek.THURSDAY, - DayOfWeek.FRIDAY, - DayOfWeek.SATURDAY, - DayOfWeek.SUNDAY, - ).forEach { day -> - Text( - text = shortWeekday(day), - modifier = Modifier.weight(1f), - style = MaterialTheme.typography.labelSmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - textAlign = androidx.compose.ui.text.style.TextAlign.Center, - ) - } - } - - val first = LocalDate(cursor.year, cursor.month, 1) - val leading = weekdayIndex(first.dayOfWeek) - val days = daysInMonth(cursor.year, cursor.month) - val cellCount = ((leading + days + 6) / 7) * 7 - - repeat(cellCount / 7) { week -> - Row(modifier = Modifier.fillMaxWidth()) { - repeat(7) { column -> - val index = week * 7 + column - val day = index - leading + 1 - if (day !in 1..days) { - Spacer(modifier = Modifier.weight(1f).height(52.dp)) - } else { - val date = LocalDate(cursor.year, cursor.month, day) - MonthDayCell( - date = date, - selected = date == selectedDate, - today = date == today, - hasEvent = events.any { it.occursOn(date) }, - onClick = { onSelect(date) }, - modifier = Modifier.weight(1f), - ) - } - } - } - } -} - -@Composable -private fun MonthDayCell( - date: LocalDate, - selected: Boolean, - today: Boolean, - hasEvent: Boolean, - onClick: () -> Unit, - modifier: Modifier = Modifier, -) { - Column( - modifier = - modifier - .height(52.dp) - .padding(2.dp) - .background( - color = - if (selected) { - MaterialTheme.colorScheme.primary.copy(alpha = 0.18f) - } else { - MaterialTheme.colorScheme.surface - }, - shape = RoundedCornerShape(10.dp), - ).clickable(onClick = onClick) - .padding(vertical = 6.dp), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.spacedBy(3.dp), - ) { - Text( - text = date.day.toString(), - style = MaterialTheme.typography.bodyMedium, - fontWeight = if (today || selected) FontWeight.Bold else FontWeight.Normal, - color = - if (today || selected) { - MaterialTheme.colorScheme.primary - } else { - MaterialTheme.colorScheme.onSurface - }, - ) - Box( - modifier = - Modifier - .size(5.dp) - .background( - color = - if (hasEvent) { - MaterialTheme.colorScheme.primary - } else { - MaterialTheme.colorScheme.surface - }, - shape = CircleShape, - ), - ) - } -} - -@Composable -private fun CalendarEventRow( - event: SchoolCalendarEvent, - compact: Boolean, -) { - Surface( - modifier = Modifier.fillMaxWidth(), - shape = RoundedCornerShape(12.dp), - color = MaterialTheme.colorScheme.primary.copy(alpha = 0.08f), - ) { - Row( - modifier = Modifier.fillMaxWidth().padding(12.dp), - horizontalArrangement = Arrangement.spacedBy(12.dp), - verticalAlignment = Alignment.Top, - ) { - Column( - modifier = Modifier.width(64.dp), - horizontalAlignment = Alignment.CenterHorizontally, - ) { - Icon( - imageVector = Icons.Default.Event, - contentDescription = null, - tint = MaterialTheme.colorScheme.primary, - modifier = Modifier.size(20.dp), - ) - Text( - text = eventTimeLabel(event), - style = MaterialTheme.typography.labelSmall, - color = MaterialTheme.colorScheme.primary, - fontWeight = FontWeight.SemiBold, - ) - } - - Column( - modifier = Modifier.weight(1f), - verticalArrangement = Arrangement.spacedBy(4.dp), - ) { - Text( - text = event.title, - style = MaterialTheme.typography.titleSmall, - fontWeight = FontWeight.SemiBold, - maxLines = if (compact) 2 else 4, - overflow = TextOverflow.Ellipsis, - ) - - event.location?.takeIf { it.isNotBlank() }?.let { location -> - Row( - horizontalArrangement = Arrangement.spacedBy(4.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Icon( - imageVector = Icons.Default.LocationOn, - contentDescription = null, - modifier = Modifier.size(15.dp), - tint = MaterialTheme.colorScheme.onSurfaceVariant, - ) - Text( - text = location, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 2, - overflow = TextOverflow.Ellipsis, - ) - } - } - - if (!compact) { - event.description?.takeIf { it.isNotBlank() }?.let { description -> - Text( - text = description, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 5, - overflow = TextOverflow.Ellipsis, - ) - } - } - } - } - } -} - -@Composable -private fun EmptyDayMessage( - events: List, - selectedDate: LocalDate, -) { - val nextEvent = - remember(events, selectedDate) { - events.firstOrNull { it.start.date > selectedDate } - } - - Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { - Text( - text = tr("Erre a napra nincs esemény.", "There are no events on this day."), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - - nextEvent?.let { event -> - Text( - text = - tr( - "Következő: ${formatShortDate(event.start.date)} – ${event.title}", - "Next: ${formatShortDate(event.start.date)} – ${event.title}", - ), - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 2, - overflow = TextOverflow.Ellipsis, - ) - } - } -} - -@Composable -private fun CalendarLoading() { - Row( - horizontalArrangement = Arrangement.spacedBy(12.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - CircularProgressIndicator(modifier = Modifier.size(24.dp)) - Text( - text = tr("Naptár betöltése…", "Loading calendar…"), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } -} - -@Composable -private fun CalendarError( - message: String, - onRetry: () -> Unit, -) { - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - Text( - text = tr("A naptár most nem tölthető be.", "The calendar could not be loaded."), - style = MaterialTheme.typography.titleSmall, - ) - Text( - text = message, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 3, - overflow = TextOverflow.Ellipsis, - ) - Button(onClick = onRetry) { - Icon(Icons.Default.Refresh, contentDescription = null) - Text(tr(" Újra", " Retry")) - } - } -} - -@Composable -private fun eventTimeLabel(event: SchoolCalendarEvent): String { - if (event.allDay) return tr("Egész nap", "All day") - - val start = "${event.start.hour.twoDigits()}:${event.start.minute.twoDigits()}" - val end = event.end - if (end == null || end.date != event.start.date) return start - - return "$start–${end.hour.twoDigits()}:${end.minute.twoDigits()}" -} - -@Composable -private fun formatSelectedDate(date: LocalDate): String = - tr( - "${date.year}. ${monthName(date.monthNumber)} ${date.day}. (${longWeekday(date.dayOfWeek)})", - "${longWeekday(date.dayOfWeek)}, ${monthName(date.monthNumber)} ${date.day}, ${date.year}", - ) - -@Composable -private fun weekRangeLabel(weekStart: LocalDate): String { - val weekEnd = addDays(weekStart, 6) - return if (weekStart.monthNumber == weekEnd.monthNumber) { - "${monthName(weekStart.monthNumber)} ${weekStart.day}–${weekEnd.day}." - } else { - "${monthName(weekStart.monthNumber)} ${weekStart.day}. – ${monthName(weekEnd.monthNumber)} ${weekEnd.day}." - } -} - -@Composable -private fun monthName(month: Int): String = - when (month) { - 1 -> tr("január", "January") - 2 -> tr("február", "February") - 3 -> tr("március", "March") - 4 -> tr("április", "April") - 5 -> tr("május", "May") - 6 -> tr("június", "June") - 7 -> tr("július", "July") - 8 -> tr("augusztus", "August") - 9 -> tr("szeptember", "September") - 10 -> tr("október", "October") - 11 -> tr("november", "November") - 12 -> tr("december", "December") - else -> "" - } - -@Composable -private fun shortWeekday(day: DayOfWeek): String = - when (day) { - DayOfWeek.MONDAY -> tr("H", "M") - DayOfWeek.TUESDAY -> tr("K", "T") - DayOfWeek.WEDNESDAY -> tr("Sze", "W") - DayOfWeek.THURSDAY -> tr("Cs", "T") - DayOfWeek.FRIDAY -> tr("P", "F") - DayOfWeek.SATURDAY -> tr("Szo", "S") - DayOfWeek.SUNDAY -> tr("V", "S") - } - -@Composable -private fun longWeekday(day: DayOfWeek): String = - when (day) { - DayOfWeek.MONDAY -> tr("hétfő", "Monday") - DayOfWeek.TUESDAY -> tr("kedd", "Tuesday") - DayOfWeek.WEDNESDAY -> tr("szerda", "Wednesday") - DayOfWeek.THURSDAY -> tr("csütörtök", "Thursday") - DayOfWeek.FRIDAY -> tr("péntek", "Friday") - DayOfWeek.SATURDAY -> tr("szombat", "Saturday") - DayOfWeek.SUNDAY -> tr("vasárnap", "Sunday") - } - -private data class MonthCursor( - val year: Int, - val month: Int, -) { - fun previous(): MonthCursor = - if (month == 1) MonthCursor(year - 1, 12) else MonthCursor(year, month - 1) - - fun next(): MonthCursor = - if (month == 12) MonthCursor(year + 1, 1) else MonthCursor(year, month + 1) -} - -private fun formatShortDate(date: LocalDate): String = - "${date.year}.${date.monthNumber.twoDigits()}.${date.day.twoDigits()}." - -private fun Int.twoDigits(): String = toString().padStart(2, '0') - -private fun startOfWeek(date: LocalDate): LocalDate = addDays(date, -weekdayIndex(date.dayOfWeek)) - -private fun weekdayIndex(day: DayOfWeek): Int = - when (day) { - DayOfWeek.MONDAY -> 0 - DayOfWeek.TUESDAY -> 1 - DayOfWeek.WEDNESDAY -> 2 - DayOfWeek.THURSDAY -> 3 - DayOfWeek.FRIDAY -> 4 - DayOfWeek.SATURDAY -> 5 - DayOfWeek.SUNDAY -> 6 - } - -private fun addDays( - source: LocalDate, - amount: Int, -): LocalDate { - var result = source - if (amount >= 0) { - repeat(amount) { result = nextDay(result) } - } else { - repeat(-amount) { result = previousDay(result) } - } - return result -} - -private fun nextDay(date: LocalDate): LocalDate { - val lastDay = daysInMonth(date.year, date.monthNumber) - return when { - date.day < lastDay -> LocalDate(date.year, date.monthNumber, date.day + 1) - date.monthNumber < 12 -> LocalDate(date.year, date.monthNumber + 1, 1) - else -> LocalDate(date.year + 1, 1, 1) - } -} - -private fun previousDay(date: LocalDate): LocalDate = - when { - date.day > 1 -> LocalDate(date.year, date.monthNumber, date.day - 1) - date.monthNumber > 1 -> { - val month = date.monthNumber - 1 - LocalDate(date.year, month, daysInMonth(date.year, month)) - } - else -> LocalDate(date.year - 1, 12, 31) - } - -private fun daysInMonth( - year: Int, - month: Int, -): Int = - when (month) { - 1, 3, 5, 7, 8, 10, 12 -> 31 - 4, 6, 9, 11 -> 30 - 2 -> if (isLeapYear(year)) 29 else 28 - else -> 30 - } - -private fun isLeapYear(year: Int): Boolean = - year % 400 == 0 || (year % 4 == 0 && year % 100 != 0) - -private val PETRIK_TIME_ZONE = TimeZone.of("Europe/Budapest") diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/TimetableFilters.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/TimetableFilters.kt index 35d50b3..972e10b 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/TimetableFilters.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/TimetableFilters.kt @@ -29,7 +29,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import hu.petrik.filcapp.network.TimetableFilter +import hu.petrik.filcapp.data.TimetableFilter import hu.petrik.filcapp.settings.tr @Composable diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/TopBar.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/TopBar.kt index fae34b7..b315526 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/TopBar.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/components/TopBar.kt @@ -118,8 +118,7 @@ fun TopBar(onProfileClick: () -> Unit = {}) { width = 2.dp, color = MaterialTheme.colorScheme.primary.copy(alpha = 0.30f), shape = CircleShape, - ) - .clip(CircleShape) + ).clip(CircleShape) .background(MaterialTheme.colorScheme.surface), contentAlignment = Alignment.Center, ) { diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/data/ChronosApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/data/ChronosApi.kt new file mode 100644 index 0000000..181430a --- /dev/null +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/data/ChronosApi.kt @@ -0,0 +1,504 @@ +package hu.petrik.filcapp.data + +import hu.petrik.filcapp.api.client.ClassroomApi +import hu.petrik.filcapp.api.client.CohortApi +import hu.petrik.filcapp.api.client.GroupApi +import hu.petrik.filcapp.api.client.LessonApi +import hu.petrik.filcapp.api.client.MovedLessonApi +import hu.petrik.filcapp.api.client.NewsAnnouncementsApi +import hu.petrik.filcapp.api.client.NotificationsApi +import hu.petrik.filcapp.api.client.SubstitutionApi +import hu.petrik.filcapp.api.client.TeacherApi +import hu.petrik.filcapp.api.client.TimetableApi +import hu.petrik.filcapp.api.infrastructure.ApiClient +import hu.petrik.filcapp.api.infrastructure.HttpResponse +import hu.petrik.filcapp.api.model.GetCohort200ResponseItemsInner +import hu.petrik.filcapp.api.model.GetNewsAnnouncements200ResponseItemsInner +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerClassroomsInner +import hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner +import hu.petrik.filcapp.api.model.GetTimetableMovedLessons200ResponseItemsInner +import hu.petrik.filcapp.api.model.GetTimetableSubstitutions200ResponseItemsInner +import hu.petrik.filcapp.api.model.GetTimetableTeachersGetAll200ResponseItemsInner +import hu.petrik.filcapp.api.model.GetTimetableTimetables200ResponseItemsInner +import hu.petrik.filcapp.auth.Auth +import kotlinx.serialization.Serializable + +private class ApiException( + val status: Int, + message: String, +) : RuntimeException("$status $message") + +private suspend fun HttpResponse.unwrap(): T { + if (!success) throw ApiException(status, "request failed") + return body() +} + +@Serializable +data class TimetableDto( + val id: String, + val name: String = "", + val validFrom: String? = null, + val validTo: String? = null, +) + +@Serializable +data class CohortDto( + val id: String, + val name: String, + val short: String = "", +) + +@Serializable +data class TeacherDto( + val id: String, + val firstName: String = "", + val lastName: String = "", + val short: String = "", +) { + val displayName: String + get() = "$firstName $lastName".trim().ifBlank { short } +} + +@Serializable +data class NamedRefDto( + val id: String, + val name: String, + val short: String = "", +) + +@Serializable +data class GroupDto( + val id: String, + val name: String, + val cohortId: String? = null, + val divisionTag: String? = null, + val divisionLabel: String? = null, + val entireClass: Boolean = false, + val selected: Boolean = false, +) + +@Serializable +data class DayDefinitionDto( + val id: String = "", + val name: String = "", + val short: String = "", +) + +@Serializable +data class PeriodDto( + val id: String = "", + val period: Int = 0, + val startTime: String = "", + val endTime: String = "", +) + +@Serializable +data class SubjectDto( + val id: String = "", + val name: String = "", + val short: String = "", +) + +@Serializable +data class WeekDefinitionDto( + val id: String = "", + val name: String = "", + val short: String = "", + val weeks: List = emptyList(), +) + +@Serializable +data class LessonDto( + val id: String, + val classrooms: List = emptyList(), + val cohorts: List = emptyList(), + val day: DayDefinitionDto? = null, + val groups: List = emptyList(), + val period: PeriodDto? = null, + val subject: SubjectDto? = null, + val teachers: List = emptyList(), + val weekDefinition: WeekDefinitionDto? = null, +) + +@Serializable +data class SubstitutionDto( + val id: String, + val date: String, + val comment: String? = null, + val substituter: String? = null, +) + +@Serializable +data class SubstitutionLessonDto( + val id: String, + val classrooms: List = emptyList(), + val cohorts: List = emptyList(), + val day: DayDefinitionDto? = null, + val period: PeriodDto? = null, + val subject: SubjectDto? = null, + val teachers: List = emptyList(), +) + +@Serializable +data class SubstitutionItemDto( + val lessons: List = emptyList(), + val substitution: SubstitutionDto, + val teacher: TeacherDto? = null, +) + +@Serializable +data class MovedLessonDto( + val id: String, + val date: String, +) + +@Serializable +data class MovedLessonItemDto( + val classroom: NamedRefDto? = null, + val dayDefinition: DayDefinitionDto? = null, + val lessons: List = emptyList(), + val movedLesson: MovedLessonDto, + val period: PeriodDto? = null, +) + +@Serializable +data class AnnouncementDto( + val id: String, + val title: String? = null, + val contentText: String = "", + val validFrom: String, + val validUntil: String, + val authorName: String? = null, + val highlighted: Boolean = false, +) + +enum class TimetableFilter { + COHORT, + TEACHER, + CLASSROOM, +} + +// --- mappers: generated models -> screen DTOs --- + +private fun refNamed(ref: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner): NamedRefDto = + NamedRefDto( + id = ref.id.orEmpty(), + name = ref.name.orEmpty(), + short = ref.short.orEmpty(), + ) + +private fun refCohort(ref: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerCohortsInner): CohortDto = + CohortDto( + id = ref.id.orEmpty(), + name = ref.name.orEmpty(), + short = ref.short.orEmpty(), + ) + +private fun refNamed(ref: GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerClassroomsInner): NamedRefDto = + NamedRefDto( + id = ref.id.orEmpty(), + name = ref.name.orEmpty(), + short = ref.short.orEmpty(), + ) + +private fun subject(ref: hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerSubject?): SubjectDto? = + ref?.let { + SubjectDto( + id = it.id.orEmpty(), + name = it.name.orEmpty(), + short = it.short.orEmpty(), + ) + } + +private fun period(ref: hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerPeriod?): PeriodDto? = + ref?.let { + PeriodDto( + id = it.id, + period = it.period.toInt(), + startTime = it.startTime, + endTime = it.endTime, + ) + } + +private fun weekDefinition( + ref: hu.petrik.filcapp.api.model.GetTimetableLessonsGetForCohortByCohortId200ResponseItemsInnerWeekDefinition?, +): WeekDefinitionDto? = + ref?.let { + WeekDefinitionDto( + id = it.id.orEmpty(), + name = it.name.orEmpty(), + short = it.short.orEmpty(), + weeks = it.weeks, + ) + } + +private fun weekDefinition( + ref: hu.petrik.filcapp.api.model.GetTimetableLessonsGetForIdByLessonId200ResponseWeekDefinition?, +): WeekDefinitionDto? = + ref?.let { + WeekDefinitionDto( + id = it.id, + name = it.name, + short = it.short, + weeks = it.weeks, + ) + } + +private fun timetable(ref: GetTimetableTimetables200ResponseItemsInner): TimetableDto = + TimetableDto( + id = ref.id, + name = ref.name, + validFrom = ref.validFrom, + validTo = ref.validTo, + ) + +private fun cohort(ref: GetCohort200ResponseItemsInner): CohortDto = + CohortDto( + id = ref.id.orEmpty(), + name = ref.name.orEmpty(), + short = ref.short.orEmpty(), + ) + +private fun teacher(ref: GetTimetableTeachersGetAll200ResponseItemsInner): TeacherDto = + TeacherDto( + id = ref.id.orEmpty(), + firstName = ref.firstName.orEmpty(), + lastName = ref.lastName.orEmpty(), + short = ref.short.orEmpty(), + ) + +private fun group(ref: hu.petrik.filcapp.api.model.GetTimetableGroupsGetForCohortByCohortId200ResponseItemsInner): GroupDto = + GroupDto( + id = ref.id.orEmpty(), + name = ref.name.orEmpty(), + divisionTag = ref.divisionTag, + divisionLabel = ref.divisionLabel, + entireClass = ref.entireClass, + selected = ref.selected, + ) + +private fun substitutionItem(ref: GetTimetableSubstitutions200ResponseItemsInner): SubstitutionItemDto = + SubstitutionItemDto( + lessons = + ref.lessons.map { lesson -> + SubstitutionLessonDto( + id = lesson.id, + classrooms = lesson.classrooms.map(::refNamed), + cohorts = lesson.cohorts.map(::refCohort), + period = period(lesson.period), + subject = subject(lesson.subject), + teachers = lesson.teachers.map(::refNamed), + ) + }, + substitution = + hu.petrik.filcapp.data.SubstitutionDto( + id = ref.substitution.id.orEmpty(), + date = ref.substitution.date.orEmpty(), + comment = ref.substitution.comment, + substituter = ref.substitution.substituter, + ), + teacher = + ref.teacher?.let { + TeacherDto( + id = it.id.orEmpty(), + firstName = it.firstName.orEmpty(), + lastName = it.lastName.orEmpty(), + short = it.short.orEmpty(), + ) + }, + ) + +private fun movedLessonItem(ref: GetTimetableMovedLessons200ResponseItemsInner): MovedLessonItemDto = + MovedLessonItemDto( + classroom = ref.classroom?.let { NamedRefDto(id = it.id, name = it.name, short = it.short) }, + dayDefinition = null, + lessons = + ref.lessons.map { lesson -> + LessonDto( + id = lesson.id, + classrooms = lesson.classrooms.map(::refNamed), + cohorts = lesson.cohorts.map(::refCohort), + period = period(lesson.period), + subject = subject(lesson.subject), + teachers = lesson.teachers.map(::refNamed), + ) + }, + movedLesson = + hu.petrik.filcapp.data.MovedLessonDto( + id = ref.movedLesson.id.orEmpty(), + date = ref.movedLesson.date.orEmpty(), + ), + period = + ref.period?.let { + PeriodDto( + id = it.id.orEmpty(), + period = it.period ?: 0, + startTime = it.startTime.orEmpty(), + endTime = it.endTime.orEmpty(), + ) + }, + ) + +private fun announcement(ref: GetNewsAnnouncements200ResponseItemsInner): AnnouncementDto { + // `content` is a recursive anyOf (string/number/bool/array/object) the generator models as an + // opaque serializable object; pull the text out differently per runtime using its toString. + val contentText = + ref.content + ?.let { node -> + when { + node.toString().startsWith("\"") -> node.toString().trim('"') + else -> node.toString() + } + }.orEmpty() + return AnnouncementDto( + id = ref.id.orEmpty(), + title = ref.title, + contentText = contentText, + validFrom = ref.validFrom.orEmpty(), + validUntil = ref.validUntil.orEmpty(), + authorName = ref.author?.name, + highlighted = ref.highlighted, + ) +} + +/** Chronos API facade: the generated oRPC-OpenAPI client, mapped onto the screen DTOs. */ +object ChronosApi { + private val timetable = TimetableApi(ApiClient.BASE_URL, Auth.httpClient) + private val cohort = CohortApi(ApiClient.BASE_URL, Auth.httpClient) + private val teacher = TeacherApi(ApiClient.BASE_URL, Auth.httpClient) + private val classroom = ClassroomApi(ApiClient.BASE_URL, Auth.httpClient) + private val lessonApi = LessonApi(ApiClient.BASE_URL, Auth.httpClient) + private val substitution = SubstitutionApi(ApiClient.BASE_URL, Auth.httpClient) + private val movedLesson = MovedLessonApi(ApiClient.BASE_URL, Auth.httpClient) + private val news = NewsAnnouncementsApi(ApiClient.BASE_URL, Auth.httpClient) + private val group = GroupApi(ApiClient.BASE_URL, Auth.httpClient) + private val notifications = NotificationsApi(ApiClient.BASE_URL, Auth.httpClient) + + suspend fun getLatestValidTimetable(): TimetableDto = + timetable.getTimetableTimetablesLatestValid().unwrap().let { + TimetableDto(id = it.id.orEmpty(), name = it.name.orEmpty(), validFrom = it.validFrom, validTo = it.validTo) + } + + suspend fun getTimetables(): List = + timetable + .getTimetableTimetables() + .unwrap() + .items + .orEmpty() + .map(::timetable) + + suspend fun getCohorts(timetableId: String): List = + cohort + .getTimetableCohortsGetAllForTimetableByTimetableId(timetableId) + .unwrap() + .items + .orEmpty() + .map(::cohort) + + suspend fun getTeachers(): List = + teacher + .getTimetableTeachersGetAll() + .unwrap() + .items + .orEmpty() + .map(::teacher) + + suspend fun getMyTeacher(): TeacherDto? = + teacher.getTimetableTeachersMe().unwrap().let { + TeacherDto(id = it.id, firstName = it.firstName, lastName = it.lastName, short = it.short) + } + + suspend fun getClassrooms(): List = + classroom.getTimetableClassroomsGetAll().unwrap().items.orEmpty().map { + NamedRefDto(id = it.id.orEmpty(), name = it.name.orEmpty(), short = it.short.orEmpty()) + } + + suspend fun getLessons( + filter: TimetableFilter, + selectionId: String, + timetableId: String, + ): List { + val response = + when (filter) { + TimetableFilter.COHORT -> { + lessonApi.getTimetableLessonsGetForCohortByCohortId(cohortId = selectionId, timetableId = timetableId) + } + + TimetableFilter.TEACHER -> { + lessonApi.getTimetableLessonsGetForTeacherByTeacherId(teacherId = selectionId, timetableId = timetableId) + } + + TimetableFilter.CLASSROOM -> { + lessonApi.getTimetableLessonsGetForRoomByClassroomId(classroomId = selectionId, timetableId = timetableId) + } + } + + return response.unwrap().items.orEmpty().map { lesson -> + LessonDto( + id = lesson.id.orEmpty(), + classrooms = lesson.classrooms.map(::refNamed), + cohorts = lesson.cohorts.map(::refCohort), + day = + lesson.day?.let { day -> + DayDefinitionDto(id = day.id.orEmpty(), name = day.name.orEmpty(), short = day.short.orEmpty()) + }, + groups = + lesson.groups.map { group -> + NamedRefDto(id = group.id.orEmpty(), name = group.name.orEmpty(), short = "") + }, + period = period(lesson.period), + subject = subject(lesson.subject), + teachers = lesson.teachers.map(::refNamed), + weekDefinition = weekDefinition(lesson.weekDefinition), + ) + } + } + + suspend fun getSubstitutions(): List = + substitution + .getTimetableSubstitutions() + .unwrap() + .items + .orEmpty() + .map(::substitutionItem) + + suspend fun getMovedLessons(): List = + movedLesson + .getTimetableMovedLessons() + .unwrap() + .items + .orEmpty() + .map(::movedLessonItem) + + suspend fun getAnnouncements(): List = + news + .getNewsAnnouncements(limit = 50, includeKioskOnly = "false") + .unwrap() + .items + .orEmpty() + .map(::announcement) + + suspend fun getGroupsForCohort(cohortId: String): List = + group + .getTimetableGroupsGetForCohortByCohortId(cohortId) + .unwrap() + .items + .orEmpty() + .map(::group) + + suspend fun selectGroup(groupId: String) { + group + .postTimetableGroupsSelect( + hu.petrik.filcapp.api.model + .PostTimetableGroupsSelectRequest(groupId = groupId), + ).unwrap() + } + + suspend fun updateLanguage(language: String) { + notifications + .patchNotificationsSettings( + hu.petrik.filcapp.api.model + .PatchNotificationsSettingsRequest(language = language), + ).unwrap() + } +} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/data/ChronosPublicApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/data/ChronosPublicApi.kt deleted file mode 100644 index 1ec9bb0..0000000 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/data/ChronosPublicApi.kt +++ /dev/null @@ -1,202 +0,0 @@ -package hu.petrik.filcapp.data - -import io.ktor.client.HttpClient -import io.ktor.client.call.body -import io.ktor.client.plugins.contentnegotiation.ContentNegotiation -import io.ktor.client.request.get -import io.ktor.client.request.parameter -import io.ktor.serialization.kotlinx.json.json -import kotlinx.serialization.Serializable -import kotlinx.serialization.json.Json - -private const val BASE_URL = "https://filc.petrik.hu/api" - -@Serializable -data class ApiEnvelope( - val success: Boolean, - val data: T, -) - -@Serializable -data class TimetableDto( - val id: String, - val name: String = "", - val validFrom: String? = null, - val validTo: String? = null, -) - -@Serializable -data class CohortDto( - val id: String, - val name: String, - val short: String = "", -) - -@Serializable -data class TeacherDto( - val id: String, - val firstName: String = "", - val lastName: String = "", - val short: String = "", -) { - val displayName: String - get() = "$firstName $lastName".trim().ifBlank { short } -} - -@Serializable -data class NamedRefDto( - val id: String, - val name: String, - val short: String = "", -) - -@Serializable -data class DayDefinitionDto( - val id: String = "", - val name: String = "", - val short: String = "", -) - -@Serializable -data class PeriodDto( - val id: String = "", - val period: Int = 0, - val startTime: String = "", - val endTime: String = "", -) - -@Serializable -data class SubjectDto( - val id: String = "", - val name: String = "", - val short: String = "", -) - -@Serializable -data class LessonDto( - val id: String, - val classrooms: List = emptyList(), - val cohorts: List = emptyList(), - val day: DayDefinitionDto? = null, - val period: PeriodDto? = null, - val subject: SubjectDto? = null, - val teachers: List = emptyList(), -) - -@Serializable -data class SubstitutionDto( - val id: String, - val date: String, - val comment: String? = null, - val substituter: String? = null, -) - -@Serializable -data class SubstitutionLessonDto( - val id: String, - val classrooms: List = emptyList(), - val cohorts: List = emptyList(), - val day: DayDefinitionDto? = null, - val period: PeriodDto? = null, - val subject: SubjectDto? = null, - val teachers: List = emptyList(), -) - -@Serializable -data class SubstitutionItemDto( - val lessons: List = emptyList(), - val substitution: SubstitutionDto, - val teacher: TeacherDto? = null, -) - -@Serializable -data class MovedLessonDto( - val id: String, - val date: String, -) - -@Serializable -data class MovedLessonItemDto( - val classroom: NamedRefDto? = null, - val dayDefinition: DayDefinitionDto? = null, - val lessonNames: List = emptyList(), - val lessons: List = emptyList(), - val movedLesson: MovedLessonDto, - val period: PeriodDto? = null, -) - -enum class TimetableFilter { - COHORT, - TEACHER, - CLASSROOM, -} - -object ChronosPublicApi { - private val client = - HttpClient { - expectSuccess = true - install(ContentNegotiation) { - json( - Json { - ignoreUnknownKeys = true - isLenient = true - }, - ) - } - } - - suspend fun getLatestValidTimetable(): TimetableDto = - client - .get("$BASE_URL/timetable/timetables/latestValid") - .body>() - .data - - suspend fun getCohorts(timetableId: String): List = - client - .get("$BASE_URL/timetable/cohorts/getAllForTimetable/$timetableId") - .body>>() - .data - - suspend fun getTeachers(): List = - client - .get("$BASE_URL/timetable/teachers/getAll") - .body>>() - .data - - suspend fun getClassrooms(): List = - client - .get("$BASE_URL/timetable/classrooms/getAll") - .body>>() - .data - - suspend fun getLessons( - filter: TimetableFilter, - selectionId: String, - timetableId: String, - ): List { - val path = - when (filter) { - TimetableFilter.COHORT -> "getForCohort/$selectionId" - TimetableFilter.TEACHER -> "getForTeacher/$selectionId" - TimetableFilter.CLASSROOM -> "getForRoom/$selectionId" - } - - return client - .get("$BASE_URL/timetable/lessons/$path") { - parameter("timetableId", timetableId) - }.body>>() - .data - } - - suspend fun getSubstitutions(): List = - client - .get("$BASE_URL/timetable/substitutions") - .body>>() - .data - - suspend fun getMovedLessons(): List = - client - .get("$BASE_URL/timetable/movedLessons") - .body>>() - .data -} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/network/FilcPublicApi.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/network/FilcPublicApi.kt deleted file mode 100644 index ac29baa..0000000 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/network/FilcPublicApi.kt +++ /dev/null @@ -1,284 +0,0 @@ -package hu.petrik.filcapp.network - -import hu.petrik.filcapp.auth.Auth -import io.ktor.client.call.body -import io.ktor.client.request.get -import io.ktor.client.request.parameter -import io.ktor.client.request.patch -import io.ktor.client.request.post -import io.ktor.client.request.setBody -import io.ktor.client.statement.bodyAsText -import io.ktor.http.ContentType -import io.ktor.http.contentType -import io.ktor.http.isSuccess -import kotlinx.serialization.Serializable -import kotlinx.serialization.json.JsonElement -import kotlinx.serialization.json.JsonNull - -private const val BASE_URL = "https://filc.petrik.hu/api" - -@Serializable -data class ApiEnvelope( - val success: Boolean = true, - val data: T, -) - -@Serializable -data class TimetableDto( - val id: String, - val name: String = "", - val validFrom: String? = null, - val validTo: String? = null, -) - -@Serializable -data class CohortDto( - val id: String, - val name: String, - val short: String = "", -) - -@Serializable -data class TeacherDto( - val id: String, - val firstName: String = "", - val lastName: String = "", - val short: String = "", -) { - val displayName: String - get() = "$firstName $lastName".trim().ifBlank { short } -} - -@Serializable -data class NamedRefDto( - val id: String, - val name: String, - val short: String = "", -) - -@Serializable -data class GroupDto( - val id: String, - val name: String, - val cohortId: String? = null, - val divisionTag: String? = null, - val divisionLabel: String? = null, - val entireClass: Boolean = false, - val selected: Boolean = false, -) - -@Serializable -data class DayDefinitionDto( - val id: String = "", - val name: String = "", - val short: String = "", -) - -@Serializable -data class PeriodDto( - val id: String = "", - val period: Int = 0, - val startTime: String = "", - val endTime: String = "", -) - -@Serializable -data class SubjectDto( - val id: String = "", - val name: String = "", - val short: String = "", -) - -@Serializable -data class WeekDefinitionDto( - val id: String = "", - val name: String = "", - val short: String = "", - val weeks: List = emptyList(), -) - -@Serializable -data class LessonDto( - val id: String, - val classrooms: List = emptyList(), - val cohorts: List = emptyList(), - val day: DayDefinitionDto? = null, - val groups: List = emptyList(), - val period: PeriodDto? = null, - val subject: SubjectDto? = null, - val teachers: List = emptyList(), - val weekDefinition: WeekDefinitionDto? = null, -) - -@Serializable -data class SubstitutionDto( - val id: String, - val date: String, - val comment: String? = null, - val substituter: String? = null, -) - -@Serializable -data class SubstitutionLessonDto( - val id: String, - val classrooms: List = emptyList(), - val cohorts: List = emptyList(), - val day: DayDefinitionDto? = null, - val period: PeriodDto? = null, - val subject: SubjectDto? = null, - val teachers: List = emptyList(), -) - -@Serializable -data class SubstitutionItemDto( - val lessons: List = emptyList(), - val substitution: SubstitutionDto, - val teacher: TeacherDto? = null, -) - -@Serializable -data class MovedLessonDto( - val id: String, - val date: String, -) - -@Serializable -data class MovedLessonItemDto( - val classroom: NamedRefDto? = null, - val dayDefinition: DayDefinitionDto? = null, - val lessonNames: List = emptyList(), - val lessons: List = emptyList(), - val movedLesson: MovedLessonDto, - val period: PeriodDto? = null, -) - -@Serializable -data class AnnouncementDto( - val id: String, - val title: String? = null, - val content: JsonElement = JsonNull, - val validFrom: String, - val validUntil: String, -) - -@Serializable -private data class SelectGroupRequest( - val groupId: String, -) - -@Serializable -private data class LanguageUpdateRequest( - val language: String, -) - -enum class TimetableFilter { - COHORT, - TEACHER, - CLASSROOM, -} - -object FilcPublicApi { - private val client - get() = Auth.httpClient - - suspend fun getTimetables(): List = - client - .get("$BASE_URL/timetable/timetables") - .body>>() - .data - - suspend fun getLatestValidTimetable(): TimetableDto = - client - .get("$BASE_URL/timetable/timetables/latestValid") - .body>() - .data - - suspend fun getCohorts(timetableId: String): List = - client - .get("$BASE_URL/timetable/cohorts/getAllForTimetable/$timetableId") - .body>>() - .data - - suspend fun getTeachers(): List = - client - .get("$BASE_URL/timetable/teachers/getAll") - .body>>() - .data - - suspend fun getMyTeacher(): TeacherDto? = - client - .get("$BASE_URL/timetable/teachers/me") - .body>() - .data - - suspend fun getClassrooms(): List = - client - .get("$BASE_URL/timetable/classrooms/getAll") - .body>>() - .data - - suspend fun getLessons( - filter: TimetableFilter, - selectionId: String, - timetableId: String, - ): List { - val path = - when (filter) { - TimetableFilter.COHORT -> "getForCohort/$selectionId" - TimetableFilter.TEACHER -> "getForTeacher/$selectionId" - TimetableFilter.CLASSROOM -> "getForRoom/$selectionId" - } - - return client - .get("$BASE_URL/timetable/lessons/$path") { - parameter("timetableId", timetableId) - }.body>>() - .data - } - - suspend fun getSubstitutions(): List = - client - .get("$BASE_URL/timetable/substitutions") - .body>>() - .data - - suspend fun getMovedLessons(): List = - client - .get("$BASE_URL/timetable/movedLessons") - .body>>() - .data - - suspend fun getAnnouncements(): List = - client - .get("$BASE_URL/news/announcements") - .body>>() - .data - - suspend fun getGroupsForCohort(cohortId: String): List = - client - .get("$BASE_URL/timetable/groups/getForCohort/$cohortId") - .body>>() - .data - - suspend fun selectGroup(groupId: String) { - val response = - client.post("$BASE_URL/timetable/groups/select") { - contentType(ContentType.Application.Json) - setBody(SelectGroupRequest(groupId)) - } - if (!response.status.isSuccess()) { - error("Group selection failed: ${response.bodyAsText()}") - } - } - - suspend fun updateLanguage(language: String) { - val response = - client.patch("$BASE_URL/notifications/settings") { - contentType(ContentType.Application.Json) - setBody(LanguageUpdateRequest(language)) - } - if (!response.status.isSuccess()) { - error("Language update failed: ${response.bodyAsText()}") - } - } -} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/HomeScreen.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/HomeScreen.kt index ab8e479..b11b74a 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/HomeScreen.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/HomeScreen.kt @@ -155,7 +155,12 @@ fun HomeScreen() { ?.nickname ?.takeIf { it.isNotBlank() } ?: AuthState.user?.preferredName.orEmpty() - val firstName = userName.trim().split(" ").lastOrNull().orEmpty() + val firstName = + userName + .trim() + .split(" ") + .lastOrNull() + .orEmpty() val greeting = when { now.hour >= 18 -> tr("Jó estét", "Good evening") @@ -204,7 +209,10 @@ fun HomeScreen() { } when { - calendarLoading -> HeroLoadingCard() + calendarLoading -> { + HeroLoadingCard() + } + nextEvent != null -> { UpcomingEventHero( event = nextEvent, @@ -224,7 +232,10 @@ fun HomeScreen() { LatestAnnouncementHeader() when { - loading -> AnnouncementLoadingCard() + loading -> { + AnnouncementLoadingCard() + } + news.isNotEmpty() -> { AnnouncementCard( item = news.first(), diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/HomeScreen.kt.bak b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/HomeScreen.kt.bak deleted file mode 100644 index 46336f4..0000000 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/HomeScreen.kt.bak +++ /dev/null @@ -1,402 +0,0 @@ -package hu.petrik.filcapp.screens - -import androidx.compose.foundation.clickable -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Home -import androidx.compose.material.icons.filled.Language -import androidx.compose.material.icons.filled.Newspaper -import androidx.compose.material.icons.filled.OpenInNew -import androidx.compose.material.icons.filled.PhotoCamera -import androidx.compose.material.icons.filled.Refresh -import androidx.compose.material3.Button -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.OutlinedButton -import androidx.compose.material3.Surface -import androidx.compose.material3.Text -import androidx.compose.material3.TextButton -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableIntStateOf -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.vector.rememberVectorPainter -import androidx.compose.ui.platform.LocalUriHandler -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.style.TextOverflow -import androidx.compose.ui.unit.dp -import cafe.adriel.voyager.navigator.tab.Tab -import cafe.adriel.voyager.navigator.tab.TabOptions -import hu.petrik.filcapp.calendar.SchoolCalendarApi -import hu.petrik.filcapp.calendar.SchoolCalendarEvent -import hu.petrik.filcapp.components.DateView -import hu.petrik.filcapp.components.FilcPanel -import hu.petrik.filcapp.components.SchoolCalendarCard -import hu.petrik.filcapp.components.SchoolCalendarScreen -import hu.petrik.filcapp.news.PetrikNewsApi -import hu.petrik.filcapp.news.PetrikNewsItem -import hu.petrik.filcapp.settings.tr -import kotlinx.datetime.LocalDate - -private const val PETRIK_HOME_URL = "https://petrik.hu/" -private const val PETRIK_INSTAGRAM_URL = "https://www.instagram.com/PetrikInsta/" - -@Composable -fun HomeScreen() { - val uriHandler = LocalUriHandler.current - var news by remember { mutableStateOf>(emptyList()) } - var loading by remember { mutableStateOf(true) } - var error by remember { mutableStateOf(null) } - var reloadKey by remember { mutableIntStateOf(0) } - - var calendarEvents by remember { mutableStateOf>(emptyList()) } - var calendarLoading by remember { mutableStateOf(true) } - var calendarError by remember { mutableStateOf(null) } - var calendarReloadKey by remember { mutableIntStateOf(0) } - var showFullCalendar by remember { mutableStateOf(false) } - - LaunchedEffect(reloadKey) { - loading = true - error = null - - runCatching { - PetrikNewsApi.latest(limit = 3) - }.onSuccess { items -> - news = items - }.onFailure { throwable -> - error = - throwable.message - ?: tr( - "Nem sikerült betölteni a Petrik híreit.", - "Could not load Petrik news.", - ) - } - - loading = false - } - - LaunchedEffect(calendarReloadKey) { - calendarLoading = true - calendarError = null - - runCatching { - SchoolCalendarApi.getEvents() - }.onSuccess { items -> - calendarEvents = items - }.onFailure { throwable -> - calendarError = - throwable.message - ?: tr( - "Nem sikerült betölteni az iskolai naptárt.", - "Could not load the school calendar.", - ) - } - - calendarLoading = false - } - - if (showFullCalendar) { - SchoolCalendarScreen( - events = calendarEvents, - loading = calendarLoading, - error = calendarError, - onRetry = { calendarReloadKey++ }, - onBack = { showFullCalendar = false }, - ) - return - } - - Column( - modifier = - Modifier - .fillMaxSize() - .verticalScroll(rememberScrollState()) - .padding(horizontal = 24.dp, vertical = 12.dp), - verticalArrangement = Arrangement.spacedBy(18.dp), - ) { - DateView() - - SchoolCalendarCard( - events = calendarEvents, - loading = calendarLoading, - error = calendarError, - onRetry = { calendarReloadKey++ }, - onOpenCalendar = { showFullCalendar = true }, - ) - - SectionHeader( - title = tr("Friss hírek", "Latest news"), - actionLabel = "petrik.hu", - onAction = { uriHandler.openUri(PETRIK_HOME_URL) }, - ) - - when { - loading -> NewsLoadingPanel() - news.isNotEmpty() -> { - news.forEach { item -> - NewsPanel( - item = item, - onOpen = { uriHandler.openUri(item.link) }, - ) - } - } - - else -> { - NewsErrorPanel( - message = - error - ?: tr( - "Most nem érhetők el a hírek.", - "News is currently unavailable.", - ), - onRetry = { reloadKey++ }, - onOpenWebsite = { uriHandler.openUri(PETRIK_HOME_URL) }, - ) - } - } - - InstagramPanel( - onOpen = { uriHandler.openUri(PETRIK_INSTAGRAM_URL) }, - ) - - Spacer(Modifier.height(8.dp)) - } -} - -@Composable -private fun SectionHeader( - title: String, - actionLabel: String, - onAction: () -> Unit, -) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - Text( - text = title, - modifier = Modifier.padding(start = 14.dp), - style = MaterialTheme.typography.titleMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - - TextButton(onClick = onAction) { - Icon(Icons.Default.Language, contentDescription = null) - Text(" $actionLabel") - } - } -} - -@Composable -private fun NewsPanel( - item: PetrikNewsItem, - onOpen: () -> Unit, -) { - Surface( - modifier = Modifier.fillMaxWidth().clickable(onClick = onOpen), - shape = RoundedCornerShape(16.dp), - color = MaterialTheme.colorScheme.surface, - shadowElevation = if (isSystemInDarkTheme()) 0.dp else 7.dp, - ) { - Column( - modifier = Modifier.fillMaxWidth().padding(16.dp), - verticalArrangement = Arrangement.spacedBy(8.dp), - ) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Surface( - shape = RoundedCornerShape(12.dp), - color = MaterialTheme.colorScheme.primary.copy(alpha = 0.18f), - ) { - Icon( - imageVector = Icons.Default.Newspaper, - contentDescription = null, - modifier = Modifier.padding(9.dp), - tint = MaterialTheme.colorScheme.primary, - ) - } - - Column(modifier = Modifier.weight(1f)) { - Text( - text = item.title, - style = MaterialTheme.typography.titleMedium, - fontWeight = FontWeight.SemiBold, - maxLines = 2, - overflow = TextOverflow.Ellipsis, - ) - Text( - text = formatPostDate(item.date), - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - - Icon( - imageVector = Icons.Default.OpenInNew, - contentDescription = null, - tint = MaterialTheme.colorScheme.primary, - ) - } - - if (item.excerpt.isNotBlank()) { - Text( - text = item.excerpt, - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 3, - overflow = TextOverflow.Ellipsis, - ) - } - } - } -} - -@Composable -private fun NewsLoadingPanel() { - FilcPanel(modifier = Modifier.fillMaxWidth()) { - Row( - horizontalArrangement = Arrangement.spacedBy(14.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - CircularProgressIndicator() - Column { - Text( - text = tr("Hírek betöltése…", "Loading news…"), - style = MaterialTheme.typography.titleSmall, - ) - Text( - text = tr("Kapcsolódás a petrik.hu-hoz", "Connecting to petrik.hu"), - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - } -} - -@Composable -private fun NewsErrorPanel( - message: String, - onRetry: () -> Unit, - onOpenWebsite: () -> Unit, -) { - FilcPanel(modifier = Modifier.fillMaxWidth()) { - Text( - text = tr("A hírek most nem tölthetők be", "News could not be loaded"), - style = MaterialTheme.typography.titleMedium, - ) - Text( - text = message, - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { - Button(onClick = onRetry) { - Icon(Icons.Default.Refresh, contentDescription = null) - Text(tr(" Újra", " Retry")) - } - OutlinedButton(onClick = onOpenWebsite) { - Icon(Icons.Default.OpenInNew, contentDescription = null) - Text(" petrik.hu") - } - } - } -} - -@Composable -private fun InstagramPanel(onOpen: () -> Unit) { - FilcPanel( - modifier = Modifier.fillMaxWidth(), - title = tr("Közösség", "Community"), - ) { - Row( - horizontalArrangement = Arrangement.spacedBy(12.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Surface( - shape = RoundedCornerShape(12.dp), - color = MaterialTheme.colorScheme.primary.copy(alpha = 0.18f), - ) { - Icon( - imageVector = Icons.Default.PhotoCamera, - contentDescription = null, - modifier = Modifier.padding(11.dp), - tint = MaterialTheme.colorScheme.primary, - ) - } - Column(modifier = Modifier.weight(1f)) { - Text( - text = tr("Petrik az Instagramon", "Petrik on Instagram"), - style = MaterialTheme.typography.titleMedium, - fontWeight = FontWeight.Bold, - ) - Text( - text = "@PetrikInsta", - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - - Text( - text = - tr( - "Képek, iskolai programok, projektek és a Petrik mindennapjai.", - "Photos, school events, projects and everyday life at Petrik.", - ), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - - Button(onClick = onOpen) { - Icon(Icons.Default.OpenInNew, contentDescription = null) - Text(tr(" Instagram megnyitása", " Open Instagram")) - } - } -} - -private fun formatPostDate(rawDate: String): String { - val isoDate = rawDate.substringBefore('T') - val date = runCatching { LocalDate.parse(isoDate) }.getOrNull() ?: return isoDate - val month = date.monthNumber.toString().padStart(2, '0') - val day = date.day.toString().padStart(2, '0') - return "${date.year}.$month.$day." -} - -object HomeTab : Tab { - override val options: TabOptions - @Composable - get() { - val title = tr("Kezdőlap", "Home") - val icon = rememberVectorPainter(Icons.Default.Home) - return remember(title) { - TabOptions(index = 0u, title = title, icon = icon) - } - } - - @Composable - override fun Content() { - HomeScreen() - } -} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/NewsScreen.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/NewsScreen.kt index bf11992..4000982 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/NewsScreen.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/NewsScreen.kt @@ -38,18 +38,14 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import cafe.adriel.voyager.navigator.tab.Tab import cafe.adriel.voyager.navigator.tab.TabOptions -import hu.petrik.filcapp.network.AnnouncementDto -import hu.petrik.filcapp.network.FilcPublicApi +import hu.petrik.filcapp.data.AnnouncementDto +import hu.petrik.filcapp.data.ChronosApi import hu.petrik.filcapp.settings.AppLanguage import hu.petrik.filcapp.settings.AppSettings import hu.petrik.filcapp.settings.tr import kotlinx.datetime.LocalDate import kotlinx.datetime.TimeZone import kotlinx.datetime.todayIn -import kotlinx.serialization.json.JsonArray -import kotlinx.serialization.json.JsonElement -import kotlinx.serialization.json.JsonObject -import kotlinx.serialization.json.JsonPrimitive import kotlin.time.Clock import kotlin.time.ExperimentalTime @@ -76,7 +72,7 @@ fun NewsScreen() { try { announcements = - FilcPublicApi + ChronosApi .getAnnouncements() .filter(::isRelevantAnnouncement) .sortedByDescending { normalizeDate(it.validFrom) } @@ -106,9 +102,18 @@ fun NewsScreen() { NewsOverviewHeader(announcementCount = announcements.size) when { - loading -> NewsLoadingBlock() - error -> NewsErrorBlock(onRetry = { reloadKey++ }) - announcements.isEmpty() -> NewsEmptyBlock() + loading -> { + NewsLoadingBlock() + } + + error -> { + NewsErrorBlock(onRetry = { reloadKey++ }) + } + + announcements.isEmpty() -> { + NewsEmptyBlock() + } + else -> { announcements.forEach { announcement -> AnnouncementCard(announcement) @@ -191,7 +196,7 @@ private fun NewsOverviewHeader(announcementCount: Int) { @Composable private fun AnnouncementCard(item: AnnouncementDto) { - val content = renderContent(item.content).trim() + val content = item.contentText.trim() val from = formatDate(item.validFrom) val until = formatDate(item.validUntil) val dateLabel = if (from == until) from else "$from – $until" @@ -375,21 +380,6 @@ private fun NewsEmptyBlock() { } } -private fun renderContent(element: JsonElement): String = - when (element) { - is JsonPrimitive -> element.content - is JsonArray -> - element - .map(::renderContent) - .filter { it.isNotBlank() } - .joinToString("\n") - - is JsonObject -> - element["text"]?.let(::renderContent) - ?: element["content"]?.let(::renderContent) - ?: "" - } - @OptIn(ExperimentalTime::class) private fun isRelevantAnnouncement(item: AnnouncementDto): Boolean = runCatching { diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/NewsScreen.kt.bak b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/NewsScreen.kt.bak deleted file mode 100644 index 1929e5d..0000000 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/NewsScreen.kt.bak +++ /dev/null @@ -1,249 +0,0 @@ -package hu.petrik.filcapp.screens - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Campaign -import androidx.compose.material.icons.filled.Newspaper -import androidx.compose.material3.Button -import androidx.compose.material3.Card -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.vector.rememberVectorPainter -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.dp -import cafe.adriel.voyager.navigator.tab.Tab -import cafe.adriel.voyager.navigator.tab.TabOptions -import hu.petrik.filcapp.network.AnnouncementDto -import hu.petrik.filcapp.network.FilcPublicApi -import hu.petrik.filcapp.settings.tr -import kotlinx.datetime.LocalDate -import kotlinx.datetime.TimeZone -import kotlinx.datetime.todayIn -import kotlinx.serialization.json.JsonArray -import kotlinx.serialization.json.JsonElement -import kotlinx.serialization.json.JsonObject -import kotlinx.serialization.json.JsonPrimitive -import kotlin.time.Clock -import kotlin.time.ExperimentalTime - -@Composable -fun NewsScreen() { - var announcements by remember { mutableStateOf>(emptyList()) } - var loading by remember { mutableStateOf(true) } - var error by remember { mutableStateOf(null) } - var reloadKey by remember { mutableStateOf(0) } - - LaunchedEffect(reloadKey) { - loading = true - error = null - try { - announcements = FilcPublicApi.getAnnouncements().filter(::isRelevantAnnouncement) - } catch (throwable: Throwable) { - error = throwable.message ?: tr("Nem sikerült betölteni a híreket.", "Could not load news.") - } finally { - loading = false - } - } - - Column( - modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(16.dp), - verticalArrangement = Arrangement.spacedBy(14.dp), - ) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { - Text(tr("Hírek", "News"), style = MaterialTheme.typography.headlineSmall) - Text( - tr( - "A Filc aktuális közleményei egy helyen.", - "Current Filc announcements in one place.", - ), - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - if (!loading && announcements.isNotEmpty()) { - Surface( - shape = MaterialTheme.shapes.extraLarge, - color = MaterialTheme.colorScheme.primaryContainer, - ) { - Text( - announcements.size.toString(), - modifier = Modifier.padding(horizontal = 12.dp, vertical = 6.dp), - color = MaterialTheme.colorScheme.onPrimaryContainer, - fontWeight = FontWeight.Bold, - ) - } - } - } - - when { - loading -> { - Box( - modifier = Modifier.fillMaxWidth().padding(32.dp), - contentAlignment = Alignment.Center, - ) { - CircularProgressIndicator() - } - } - - error != null -> { - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(16.dp), - verticalArrangement = Arrangement.spacedBy(10.dp), - ) { - Text(tr("Hiba történt", "Something went wrong"), style = MaterialTheme.typography.titleMedium) - Text(error.orEmpty()) - Button(onClick = { reloadKey++ }) { - Text(tr("Újrapróbálás", "Retry")) - } - } - } - } - - announcements.isEmpty() -> { - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(20.dp), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.spacedBy(8.dp), - ) { - Icon(Icons.Default.Newspaper, null) - Text(tr("Nincs aktuális hír", "No current news"), style = MaterialTheme.typography.titleMedium) - Text( - tr( - "Jelenleg nincs a következő 14 napra érvényes közlemény.", - "There are no announcements relevant for the next 14 days.", - ), - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - } - - else -> { - announcements - .sortedBy { normalizeDate(it.validFrom) } - .forEach { announcement -> AnnouncementCard(announcement) } - } - } - } -} - -@Composable -private fun AnnouncementCard(item: AnnouncementDto) { - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(16.dp), - verticalArrangement = Arrangement.spacedBy(10.dp), - ) { - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Surface( - shape = MaterialTheme.shapes.medium, - color = MaterialTheme.colorScheme.secondaryContainer, - ) { - Icon( - Icons.Default.Campaign, - contentDescription = null, - modifier = Modifier.padding(8.dp), - tint = MaterialTheme.colorScheme.onSecondaryContainer, - ) - } - Text( - item.title?.takeIf { it.isNotBlank() } ?: tr("Közlemény", "Announcement"), - style = MaterialTheme.typography.titleMedium, - fontWeight = FontWeight.SemiBold, - ) - } - - renderContent(item.content).takeIf { it.isNotBlank() }?.let { content -> - Text(content, style = MaterialTheme.typography.bodyMedium) - } - - val from = formatDate(item.validFrom) - val until = formatDate(item.validUntil) - Text( - if (from == until) from else "$from – $until", - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } -} - -private fun renderContent(element: JsonElement): String = - when (element) { - is JsonPrimitive -> element.content - is JsonArray -> element.joinToString(" ") { renderContent(it) }.trim() - is JsonObject -> { - element["content"]?.let(::renderContent) - ?: element.values.joinToString(" ") { renderContent(it) }.trim() - } - } - -@OptIn(ExperimentalTime::class) -private fun isRelevantAnnouncement(item: AnnouncementDto): Boolean = - runCatching { - val today = Clock.System.todayIn(TimeZone.currentSystemDefault()) - val end = LocalDate.fromEpochDays(today.toEpochDays() + 14) - val from = LocalDate.parse(normalizeDate(item.validFrom)) - val until = LocalDate.parse(normalizeDate(item.validUntil)) - from <= end && until >= today - }.getOrDefault(true) - -private fun normalizeDate(value: String): String = value.take(10) - -private fun formatDate(value: String): String { - val normalized = normalizeDate(value) - val parts = normalized.split("-") - if (parts.size != 3) { - return normalized - } - return if (hu.petrik.filcapp.settings.AppSettings.language.value == hu.petrik.filcapp.settings.AppLanguage.HU) { - "${parts[0]}. ${parts[1]}. ${parts[2]}." - } else { - "${parts[0]}-${parts[1]}-${parts[2]}" - } -} - -object NewsTab : Tab { - override val options: TabOptions - @Composable - get() { - val title = tr("Hírek", "News") - val icon = rememberVectorPainter(Icons.Default.Campaign) - return remember(title) { - TabOptions(index = 3u, title = title, icon = icon) - } - } - - @Composable - override fun Content() { - NewsScreen() - } -} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SettingsScreen.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SettingsScreen.kt index 7815a83..d4e6825 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SettingsScreen.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SettingsScreen.kt @@ -72,9 +72,9 @@ import hu.petrik.filcapp.appVersionLabel import hu.petrik.filcapp.auth.AuthManager import hu.petrik.filcapp.auth.AuthState import hu.petrik.filcapp.components.SearchableSelection -import hu.petrik.filcapp.network.CohortDto -import hu.petrik.filcapp.network.FilcPublicApi -import hu.petrik.filcapp.network.GroupDto +import hu.petrik.filcapp.data.ChronosApi +import hu.petrik.filcapp.data.CohortDto +import hu.petrik.filcapp.data.GroupDto import hu.petrik.filcapp.settings.AppLanguage import hu.petrik.filcapp.settings.AppSettings import hu.petrik.filcapp.settings.AppThemeMode @@ -159,8 +159,8 @@ fun SettingsScreen() { profileLoading = true runCatching { - val latest = FilcPublicApi.getLatestValidTimetable() - FilcPublicApi.getCohorts(latest.id).sortedBy { it.name } + val latest = ChronosApi.getLatestValidTimetable() + ChronosApi.getCohorts(latest.id).sortedBy { it.name } }.onSuccess { loaded -> cohorts = loaded SettingsSessionCache.userId = userId @@ -200,7 +200,7 @@ fun SettingsScreen() { groups = runCatching { - FilcPublicApi.getGroupsForCohort(cohortId) + ChronosApi.getGroupsForCohort(cohortId) }.getOrDefault(emptyList()) SettingsSessionCache.userId = userId @@ -411,8 +411,7 @@ private fun ProfileSettingsCard( width = 2.dp, color = MaterialTheme.colorScheme.primary.copy(alpha = 0.55f), shape = CircleShape, - ) - .clip(CircleShape) + ).clip(CircleShape) .background(MaterialTheme.colorScheme.surfaceVariant), contentAlignment = Alignment.Center, ) { @@ -913,8 +912,7 @@ private fun PrimaryColorCard() { MaterialTheme.colorScheme.outline.copy(alpha = 0.45f) }, shape = CircleShape, - ) - .clickable { + ).clickable { val presetHsv = colorToHsv(presetColor) updatePrimary( newHue = presetHsv.hue, diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SettingsScreen.kt.bak b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SettingsScreen.kt.bak deleted file mode 100644 index 7dd38a1..0000000 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SettingsScreen.kt.bak +++ /dev/null @@ -1,455 +0,0 @@ -package hu.petrik.filcapp.screens - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.AccountCircle -import androidx.compose.material.icons.filled.BrightnessAuto -import androidx.compose.material.icons.filled.DarkMode -import androidx.compose.material.icons.filled.Language -import androidx.compose.material.icons.filled.LightMode -import androidx.compose.material.icons.filled.Login -import androidx.compose.material.icons.filled.Logout -import androidx.compose.material.icons.filled.Settings -import androidx.compose.material3.Button -import androidx.compose.material3.Card -import androidx.compose.material3.CardDefaults -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.FilterChip -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.OutlinedButton -import androidx.compose.material3.OutlinedTextField -import androidx.compose.material3.RadioButton -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.rememberCoroutineScope -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.graphics.vector.rememberVectorPainter -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.dp -import cafe.adriel.voyager.navigator.tab.Tab -import cafe.adriel.voyager.navigator.tab.TabOptions -import hu.petrik.filcapp.auth.AuthManager -import hu.petrik.filcapp.auth.AuthState -import hu.petrik.filcapp.components.SearchableSelection -import hu.petrik.filcapp.network.CohortDto -import hu.petrik.filcapp.network.FilcPublicApi -import hu.petrik.filcapp.network.GroupDto -import hu.petrik.filcapp.settings.AppLanguage -import hu.petrik.filcapp.settings.AppSettings -import hu.petrik.filcapp.settings.AppThemeMode -import hu.petrik.filcapp.settings.tr -import kotlinx.coroutines.launch - -@Composable -fun SettingsScreen() { - val scope = rememberCoroutineScope() - var cohorts by remember { mutableStateOf>(emptyList()) } - var groups by remember { mutableStateOf>(emptyList()) } - var nickname by remember(AuthState.user?.id, AuthState.user?.nickname) { - mutableStateOf(AuthState.user?.nickname.orEmpty()) - } - var profileLoading by remember { mutableStateOf(false) } - - LaunchedEffect(AuthState.user?.id) { - if (AuthState.user != null) { - profileLoading = true - runCatching { - val latest = FilcPublicApi.getLatestValidTimetable() - cohorts = FilcPublicApi.getCohorts(latest.id).sortedBy { it.name } - } - profileLoading = false - } else { - cohorts = emptyList() - groups = emptyList() - } - } - - LaunchedEffect(AuthState.profile, AuthState.callbackVersion) { - val cohortId = AuthState.profile?.cohort?.id - groups = - if (cohortId == null) { - emptyList() - } else { - runCatching { FilcPublicApi.getGroupsForCohort(cohortId) }.getOrDefault(emptyList()) - } - } - - Column( - modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(16.dp), - verticalArrangement = Arrangement.spacedBy(16.dp), - ) { - Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { - Text(tr("Beállítások", "Settings"), style = MaterialTheme.typography.headlineSmall) - Text( - tr( - "Fiók, saját osztály/csoport és alkalmazásbeállítások.", - "Account, class/group and application settings.", - ), - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - - AccountSettingsCard( - nickname = nickname, - onNicknameChange = { nickname = it }, - cohorts = cohorts, - groups = groups, - loading = profileLoading, - onSignIn = { scope.launch { AuthManager.signInWithMicrosoft() } }, - onSignOut = { scope.launch { AuthManager.signOut() } }, - onSaveNickname = { - scope.launch { - AuthManager.updateUser( - nickname = nickname.trim().ifBlank { null }, - cohortId = AuthState.user?.cohortId, - ) - } - }, - onCohortSelected = { cohortId -> - scope.launch { - AuthManager.updateUser( - nickname = AuthState.user?.nickname, - cohortId = cohortId, - ) - } - }, - onGroupSelected = { groupId -> scope.launch { AuthManager.selectGroup(groupId) } }, - ) - - AuthState.error?.let { message -> - Card(modifier = Modifier.fillMaxWidth()) { - Text( - message, - modifier = Modifier.padding(16.dp), - color = MaterialTheme.colorScheme.error, - ) - } - } - - AppearanceSettingsCard() - - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(16.dp), - verticalArrangement = Arrangement.spacedBy(12.dp), - ) { - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Icon(Icons.Default.Language, null) - Column { - Text(tr("Nyelv", "Language"), style = MaterialTheme.typography.titleMedium) - Text( - tr("A módosítás azonnal életbe lép.", "Changes apply immediately."), - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - - LanguageOption( - title = "Magyar", - selected = AppSettings.language.value == AppLanguage.HU, - onClick = { - AppSettings.setLanguage(AppLanguage.HU) - scope.launch { AuthManager.syncLanguage("hu") } - }, - ) - LanguageOption( - title = "English", - selected = AppSettings.language.value == AppLanguage.EN, - onClick = { - AppSettings.setLanguage(AppLanguage.EN) - scope.launch { AuthManager.syncLanguage("en") } - }, - ) - } - } - } -} - -@Composable -private fun AppearanceSettingsCard() { - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(16.dp), - verticalArrangement = Arrangement.spacedBy(12.dp), - ) { - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Icon( - imageVector = Icons.Default.DarkMode, - contentDescription = null, - tint = MaterialTheme.colorScheme.primary, - ) - Column { - Text( - tr("Megjelenés", "Appearance"), - style = MaterialTheme.typography.titleMedium, - ) - Text( - tr( - "A téma azonnal vált, és megjegyezzük a választásodat.", - "The theme changes immediately and your choice is remembered.", - ), - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - - ThemeModeOption( - icon = Icons.Default.BrightnessAuto, - title = tr("Rendszer szerint", "Use system setting"), - subtitle = - tr( - "A telefon világos vagy sötét módját követi.", - "Follows your phone's light or dark appearance.", - ), - selected = AppSettings.themeMode.value == AppThemeMode.SYSTEM, - onClick = { AppSettings.setThemeMode(AppThemeMode.SYSTEM) }, - ) - - ThemeModeOption( - icon = Icons.Default.LightMode, - title = tr("Világos", "Light"), - subtitle = - tr( - "Mindig a világos Filc témát használja.", - "Always use the light Filc theme.", - ), - selected = AppSettings.themeMode.value == AppThemeMode.LIGHT, - onClick = { AppSettings.setThemeMode(AppThemeMode.LIGHT) }, - ) - - ThemeModeOption( - icon = Icons.Default.DarkMode, - title = tr("Sötét", "Dark"), - subtitle = - tr( - "Mindig a sötét Filc témát használja.", - "Always use the dark Filc theme.", - ), - selected = AppSettings.themeMode.value == AppThemeMode.DARK, - onClick = { AppSettings.setThemeMode(AppThemeMode.DARK) }, - ) - } - } -} - -@Composable -private fun ThemeModeOption( - icon: ImageVector, - title: String, - subtitle: String, - selected: Boolean, - onClick: () -> Unit, -) { - Card( - modifier = Modifier.fillMaxWidth(), - onClick = onClick, - colors = - CardDefaults.cardColors( - containerColor = - if (selected) { - MaterialTheme.colorScheme.primaryContainer - } else { - MaterialTheme.colorScheme.surfaceVariant - }, - ), - ) { - Row( - modifier = Modifier.fillMaxWidth().padding(horizontal = 12.dp, vertical = 10.dp), - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Icon( - imageVector = icon, - contentDescription = null, - tint = - if (selected) { - MaterialTheme.colorScheme.primary - } else { - MaterialTheme.colorScheme.onSurfaceVariant - }, - ) - - Column(modifier = Modifier.weight(1f)) { - Text( - text = title, - style = MaterialTheme.typography.bodyLarge, - fontWeight = FontWeight.SemiBold, - ) - Text( - text = subtitle, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - - RadioButton( - selected = selected, - onClick = onClick, - ) - } - } -} - -@Composable -private fun AccountSettingsCard( - nickname: String, - onNicknameChange: (String) -> Unit, - cohorts: List, - groups: List, - loading: Boolean, - onSignIn: () -> Unit, - onSignOut: () -> Unit, - onSaveNickname: () -> Unit, - onCohortSelected: (String) -> Unit, - onGroupSelected: (String) -> Unit, -) { - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(16.dp), - verticalArrangement = Arrangement.spacedBy(12.dp), - ) { - Row( - horizontalArrangement = Arrangement.spacedBy(10.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Icon(Icons.Default.AccountCircle, null) - Text(tr("Microsoft-fiók", "Microsoft account"), style = MaterialTheme.typography.titleMedium) - } - - if (!AuthState.signedIn) { - Text( - tr( - "Jelentkezz be a petrikes Microsoft-fiókoddal. A bejelentkezés natív OIDC + PKCE folyamattal történik.", - "Sign in with your Petrik Microsoft account. Sign-in uses a native OIDC + PKCE flow.", - ), - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - Button(onClick = onSignIn, enabled = !AuthState.loading) { - Icon(Icons.Default.Login, null) - Text( - tr(" Bejelentkezés Microsofttal", " Sign in with Microsoft"), - ) - } - if (AuthState.loading) CircularProgressIndicator() - return@Column - } - - val user = AuthState.user ?: return@Column - Text(user.preferredName, style = MaterialTheme.typography.titleLarge, fontWeight = FontWeight.SemiBold) - Text(user.email, color = MaterialTheme.colorScheme.onSurfaceVariant) - AuthState.profile?.teacher?.let { teacher -> - Text( - tr("Tanári profil: ${teacher.displayName}", "Teacher profile: ${teacher.displayName}"), - style = MaterialTheme.typography.bodyMedium, - ) - } - - OutlinedTextField( - value = nickname, - onValueChange = onNicknameChange, - modifier = Modifier.fillMaxWidth(), - label = { Text(tr("Megjelenő név", "Preferred name")) }, - singleLine = true, - ) - OutlinedButton(onClick = onSaveNickname) { - Text(tr("Név mentése", "Save name")) - } - - if (loading) { - CircularProgressIndicator() - } else { - SearchableSelection( - options = cohorts.map { it.id to it.name }, - selectedId = AuthState.profile?.cohort?.id, - label = tr("Saját osztály", "My class"), - placeholder = tr("Válassz osztályt", "Select class"), - onSelected = { it?.let(onCohortSelected) }, - ) - } - - val selectableGroups = groups.filter { !it.entireClass && it.divisionTag != null } - if (selectableGroups.isNotEmpty()) { - Text(tr("Saját csoportok", "My groups"), style = MaterialTheme.typography.titleSmall) - selectableGroups - .groupBy { it.divisionLabel ?: it.divisionTag ?: tr("Csoport", "Group") } - .forEach { (division, divisionGroups) -> - Text(division, style = MaterialTheme.typography.labelLarge) - Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { - divisionGroups.forEach { group -> - FilterChip( - selected = group.selected, - onClick = { onGroupSelected(group.id) }, - label = { Text(group.name) }, - ) - } - } - } - } - - OutlinedButton(onClick = onSignOut) { - Icon(Icons.Default.Logout, null) - Text(tr(" Kijelentkezés", " Sign out")) - } - } - } -} - -@Composable -private fun LanguageOption( - title: String, - selected: Boolean, - onClick: () -> Unit, -) { - Card( - modifier = Modifier.fillMaxWidth(), - onClick = onClick, - ) { - Row( - modifier = Modifier.fillMaxWidth().padding(horizontal = 12.dp, vertical = 8.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - RadioButton(selected = selected, onClick = onClick) - Text(title, style = MaterialTheme.typography.bodyLarge) - } - } -} - -object SettingsTab : Tab { - override val options: TabOptions - @Composable - get() { - val title = tr("Beállítások", "Settings") - val icon = rememberVectorPainter(Icons.Default.Settings) - return remember(title) { - TabOptions(index = 4u, title = title, icon = icon) - } - } - - @Composable - override fun Content() { - SettingsScreen() - } -} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SubstitutionScreen.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SubstitutionScreen.kt index 838e5e4..97f4eb0 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SubstitutionScreen.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SubstitutionScreen.kt @@ -40,14 +40,14 @@ import cafe.adriel.voyager.navigator.tab.TabOptions import hu.petrik.filcapp.auth.AuthState import hu.petrik.filcapp.components.SearchableSelection import hu.petrik.filcapp.components.TimetableFilterChips -import hu.petrik.filcapp.network.CohortDto -import hu.petrik.filcapp.network.FilcPublicApi -import hu.petrik.filcapp.network.MovedLessonItemDto -import hu.petrik.filcapp.network.NamedRefDto -import hu.petrik.filcapp.network.SubstitutionItemDto -import hu.petrik.filcapp.network.SubstitutionLessonDto -import hu.petrik.filcapp.network.TeacherDto -import hu.petrik.filcapp.network.TimetableFilter +import hu.petrik.filcapp.data.ChronosApi +import hu.petrik.filcapp.data.CohortDto +import hu.petrik.filcapp.data.MovedLessonItemDto +import hu.petrik.filcapp.data.NamedRefDto +import hu.petrik.filcapp.data.SubstitutionItemDto +import hu.petrik.filcapp.data.SubstitutionLessonDto +import hu.petrik.filcapp.data.TeacherDto +import hu.petrik.filcapp.data.TimetableFilter import hu.petrik.filcapp.settings.tr import kotlinx.datetime.LocalDate import kotlinx.datetime.TimeZone @@ -87,12 +87,12 @@ fun SubstitutionScreen() { loading = true error = null try { - val latest = FilcPublicApi.getLatestValidTimetable() - cohorts = FilcPublicApi.getCohorts(latest.id).sortedBy { it.name } - teachers = FilcPublicApi.getTeachers().sortedBy { it.displayName } - classrooms = FilcPublicApi.getClassrooms().sortedBy { it.name } - substitutions = FilcPublicApi.getSubstitutions().filter { isTodayOrFuture(it.substitution.date) } - movedLessons = FilcPublicApi.getMovedLessons().filter { isTodayOrFuture(it.movedLesson.date) } + val latest = ChronosApi.getLatestValidTimetable() + cohorts = ChronosApi.getCohorts(latest.id).sortedBy { it.name } + teachers = ChronosApi.getTeachers().sortedBy { it.displayName } + classrooms = ChronosApi.getClassrooms().sortedBy { it.name } + substitutions = ChronosApi.getSubstitutions().filter { isTodayOrFuture(it.substitution.date) } + movedLessons = ChronosApi.getMovedLessons().filter { isTodayOrFuture(it.movedLesson.date) } SubstitutionSessionCache.cohorts = cohorts SubstitutionSessionCache.teachers = teachers SubstitutionSessionCache.classrooms = classrooms @@ -122,6 +122,7 @@ fun SubstitutionScreen() { selectedId = teacherId personalizedUserId = userId } + cohortId != null && cohorts.any { it.id == cohortId } -> { filter = TimetableFilter.COHORT selectedId = cohortId @@ -240,8 +241,7 @@ fun SubstitutionScreen() { ( filteredSubstitutions.map { normalizeDate(it.substitution.date) } + filteredMovedLessons.map { normalizeDate(it.movedLesson.date) } - ) - .distinct() + ).distinct() .sorted() dates.forEach { date -> @@ -521,11 +521,7 @@ private fun MovedLessonCard(item: MovedLessonItemDto) { .mapNotNull { lesson -> lesson.subject?.name ?: lesson.subject?.short } .distinct() .joinToString(", ") - .ifBlank { - item.lessonNames - .joinToString(", ") - .ifBlank { tr("Áthelyezett óra", "Moved lesson") } - } + .ifBlank { tr("Áthelyezett óra", "Moved lesson") } val room = item.classroom?.let(::displayName).orEmpty() Surface( @@ -545,7 +541,11 @@ private fun MovedLessonCard(item: MovedLessonItemDto) { ) { Box(contentAlignment = Alignment.Center) { Text( - text = item.period?.period?.takeIf { it > 0 }?.let { "$it." } ?: "↕", + text = + item.period + ?.period + ?.takeIf { it > 0 } + ?.let { "$it." } ?: "↕", style = MaterialTheme.typography.titleLarge, color = MaterialTheme.colorScheme.primary, fontWeight = FontWeight.ExtraBold, @@ -621,7 +621,7 @@ private fun filterSubstitutions( } item.lessons.any { lesson -> when (filter) { - TimetableFilter.COHORT -> cohortName != null && lesson.cohorts.contains(cohortName) + TimetableFilter.COHORT -> cohortName != null && lesson.cohorts.any { it.name == cohortName || it.short == cohortName } TimetableFilter.TEACHER -> lesson.teachers.any { it.id == selectionId } TimetableFilter.CLASSROOM -> lesson.classrooms.any { it.id == selectionId } } @@ -643,22 +643,25 @@ private fun filterMovedLessons( return data.filter { item -> when (filter) { - TimetableFilter.COHORT -> + TimetableFilter.COHORT -> { cohortName != null && item.lessons.any { lesson -> - lesson.cohorts.contains(cohortName) + lesson.cohorts.any { it.name == cohortName || it.short == cohortName } } + } - TimetableFilter.TEACHER -> + TimetableFilter.TEACHER -> { item.lessons.any { lesson -> lesson.teachers.any { it.id == selectionId } } + } - TimetableFilter.CLASSROOM -> + TimetableFilter.CLASSROOM -> { item.classroom?.id == selectionId || item.lessons.any { lesson -> lesson.classrooms.any { it.id == selectionId } } + } } } } diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SubstitutionScreen.kt.bak b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SubstitutionScreen.kt.bak deleted file mode 100644 index 3d75bd6..0000000 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/SubstitutionScreen.kt.bak +++ /dev/null @@ -1,482 +0,0 @@ -package hu.petrik.filcapp.screens - -import androidx.compose.foundation.horizontalScroll -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Cancel -import androidx.compose.material.icons.filled.MoveUp -import androidx.compose.material.icons.filled.SwapCalls -import androidx.compose.material3.Button -import androidx.compose.material3.Card -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.ElevatedCard -import androidx.compose.material3.FilterChip -import androidx.compose.material3.HorizontalDivider -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.vector.rememberVectorPainter -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.dp -import cafe.adriel.voyager.navigator.tab.Tab -import cafe.adriel.voyager.navigator.tab.TabOptions -import hu.petrik.filcapp.auth.AuthState -import hu.petrik.filcapp.components.SearchableSelection -import hu.petrik.filcapp.components.TimetableFilterChips -import hu.petrik.filcapp.network.CohortDto -import hu.petrik.filcapp.network.FilcPublicApi -import hu.petrik.filcapp.network.MovedLessonItemDto -import hu.petrik.filcapp.network.NamedRefDto -import hu.petrik.filcapp.network.SubstitutionItemDto -import hu.petrik.filcapp.network.SubstitutionLessonDto -import hu.petrik.filcapp.network.TeacherDto -import hu.petrik.filcapp.network.TimetableFilter -import hu.petrik.filcapp.settings.tr -import kotlinx.datetime.LocalDate -import kotlinx.datetime.TimeZone -import kotlinx.datetime.todayIn -import kotlin.time.Clock -import kotlin.time.ExperimentalTime - -@Composable -fun SubstitutionScreen() { - var substitutions by remember { mutableStateOf>(emptyList()) } - var movedLessons by remember { mutableStateOf>(emptyList()) } - var cohorts by remember { mutableStateOf>(emptyList()) } - var teachers by remember { mutableStateOf>(emptyList()) } - var classrooms by remember { mutableStateOf>(emptyList()) } - var filter by remember { mutableStateOf(TimetableFilter.COHORT) } - var selectedId by remember { mutableStateOf(null) } - var loading by remember { mutableStateOf(true) } - var error by remember { mutableStateOf(null) } - var reloadKey by remember { mutableStateOf(0) } - var personalizedUserId by remember { mutableStateOf(null) } - - LaunchedEffect(reloadKey) { - loading = true - error = null - try { - val latest = FilcPublicApi.getLatestValidTimetable() - cohorts = FilcPublicApi.getCohorts(latest.id).sortedBy { it.name } - teachers = FilcPublicApi.getTeachers().sortedBy { it.displayName } - classrooms = FilcPublicApi.getClassrooms().sortedBy { it.name } - substitutions = FilcPublicApi.getSubstitutions().filter { isTodayOrFuture(it.substitution.date) } - movedLessons = FilcPublicApi.getMovedLessons().filter { isTodayOrFuture(it.movedLesson.date) } - } catch (throwable: Throwable) { - error = throwable.message ?: tr("Nem sikerült betölteni a helyettesítéseket.", "Could not load substitutions.") - } finally { - loading = false - } - } - - LaunchedEffect(AuthState.user?.id, AuthState.profile, cohorts, teachers) { - val userId = AuthState.user?.id - if (userId == null) { - personalizedUserId = null - } else if (personalizedUserId != userId) { - val profile = AuthState.profile - val teacherId = profile?.teacher?.id - val cohortId = profile?.cohort?.id - when { - teacherId != null && teachers.any { it.id == teacherId } -> { - filter = TimetableFilter.TEACHER - selectedId = teacherId - personalizedUserId = userId - } - cohortId != null && cohorts.any { it.id == cohortId } -> { - filter = TimetableFilter.COHORT - selectedId = cohortId - personalizedUserId = userId - } - } - } - } - - val filterOptions = - when (filter) { - TimetableFilter.COHORT -> cohorts.map { it.id to it.name } - TimetableFilter.TEACHER -> teachers.map { it.id to it.displayName } - TimetableFilter.CLASSROOM -> classrooms.map { it.id to displayName(it) } - } - - val filteredSubstitutions = filterSubstitutions(substitutions, filter, selectedId, cohorts) - val filteredMovedLessons = filterMovedLessons(movedLessons, filter, selectedId, cohorts) - - Column( - modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(16.dp), - verticalArrangement = Arrangement.spacedBy(14.dp), - ) { - Column( - modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp), - verticalArrangement = Arrangement.spacedBy(4.dp), - ) { - Text( - tr("Helyettesítések", "Substitutions"), - style = MaterialTheme.typography.headlineSmall, - fontWeight = FontWeight.Bold, - color = MaterialTheme.colorScheme.onBackground, - ) - Text( - tr( - "Aktuális helyettesítések, elmaradó és áthelyezett órák.", - "Current substitutions, cancelled and moved lessons.", - ), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - - if (loading) { - Box( - modifier = Modifier.fillMaxWidth().padding(28.dp), - contentAlignment = Alignment.Center, - ) { - CircularProgressIndicator() - } - return@Column - } - - error?.let { message -> - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(16.dp), - verticalArrangement = Arrangement.spacedBy(8.dp), - ) { - Text(tr("Hiba történt", "Something went wrong"), style = MaterialTheme.typography.titleMedium) - Text(message) - Button(onClick = { reloadKey++ }) { - Text(tr("Újrapróbálás", "Retry")) - } - } - } - } - - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(14.dp), - verticalArrangement = Arrangement.spacedBy(12.dp), - ) { - TimetableFilterChips( - selected = filter, - onSelected = { newFilter -> - filter = newFilter - selectedId = null - }, - ) - SearchableSelection( - options = filterOptions, - selectedId = selectedId, - label = filterLabel(filter), - placeholder = tr("Szűrés nélkül minden látszik", "Without a filter everything is shown"), - onSelected = { selectedId = it }, - allowClear = true, - ) - } - } - - if (selectedId != null) { - Row( - modifier = Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()), - horizontalArrangement = Arrangement.spacedBy(8.dp), - ) { - FilterChip( - selected = true, - onClick = { selectedId = null }, - label = { Text(tr("Szűrés aktív – törlés", "Filter active – clear")) }, - ) - } - } - - if (error == null && filteredSubstitutions.isEmpty() && filteredMovedLessons.isEmpty()) { - Card(modifier = Modifier.fillMaxWidth()) { - Text( - tr( - "Nincs aktuális vagy közelgő helyettesítés ehhez a szűréshez.", - "No current or upcoming substitutions for this filter.", - ), - modifier = Modifier.padding(18.dp), - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - - val dates = - ( - filteredSubstitutions.map { normalizeDate(it.substitution.date) } + - filteredMovedLessons.map { normalizeDate(it.movedLesson.date) } - ) - .distinct() - .sorted() - - dates.forEach { date -> - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - Text(formatDate(date), style = MaterialTheme.typography.titleLarge, fontWeight = FontWeight.SemiBold) - - filteredSubstitutions - .filter { normalizeDate(it.substitution.date) == date } - .forEach { substitution -> SubstitutionCard(substitution) } - - filteredMovedLessons - .filter { normalizeDate(it.movedLesson.date) == date } - .forEach { movedLesson -> MovedLessonCard(movedLesson) } - } - } - } -} - -@Composable -private fun SubstitutionCard(item: SubstitutionItemDto) { - val substitute = item.teacher?.displayName.orEmpty() - val isCancelled = item.substitution.substituter == null || substitute.isBlank() - - ElevatedCard(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(14.dp), - verticalArrangement = Arrangement.spacedBy(10.dp), - ) { - Row( - horizontalArrangement = Arrangement.spacedBy(8.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Icon( - if (isCancelled) Icons.Default.Cancel else Icons.Default.SwapCalls, - contentDescription = null, - tint = if (isCancelled) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.primary, - ) - Column { - Text( - if (isCancelled) tr("Elmaradó óra", "Cancelled lesson") else tr("Helyettesítés", "Substitution"), - style = MaterialTheme.typography.titleMedium, - fontWeight = FontWeight.Bold, - ) - if (!isCancelled) { - Text( - tr("Helyettesítő: $substitute", "Substitute: $substitute"), - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - } - - item.lessons.forEachIndexed { index, lesson -> - SubstitutionLessonDetails(lesson) - if (index != item.lessons.lastIndex) { - HorizontalDivider() - } - } - - item.substitution.comment?.takeIf { it.isNotBlank() }?.let { comment -> - Surface( - shape = MaterialTheme.shapes.medium, - color = MaterialTheme.colorScheme.surfaceVariant, - ) { - Text( - tr("Megjegyzés: $comment", "Note: $comment"), - modifier = Modifier.fillMaxWidth().padding(10.dp), - style = MaterialTheme.typography.bodySmall, - ) - } - } - } - } -} - -@Composable -private fun SubstitutionLessonDetails(lesson: SubstitutionLessonDto) { - val subject = lesson.subject?.name ?: lesson.subject?.short ?: tr("Ismeretlen tantárgy", "Unknown subject") - val originalTeachers = lesson.teachers.joinToString(", ") { displayName(it) } - val classrooms = lesson.classrooms.joinToString(", ") { displayName(it) } - val cohorts = lesson.cohorts.joinToString(", ") - val period = lesson.period - - Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - ) { - Text(subject, style = MaterialTheme.typography.titleSmall, fontWeight = FontWeight.SemiBold) - period?.let { Text("${it.period}.", style = MaterialTheme.typography.labelLarge) } - } - period?.let { - Text( - "${formatTime(it.startTime)}–${formatTime(it.endTime)}", - color = MaterialTheme.colorScheme.primary, - fontWeight = FontWeight.Medium, - ) - } - if (cohorts.isNotBlank()) DetailLine(tr("Osztály", "Class"), cohorts) - if (classrooms.isNotBlank()) DetailLine(tr("Terem", "Classroom"), classrooms) - if (originalTeachers.isNotBlank()) DetailLine(tr("Eredeti tanár", "Original teacher"), originalTeachers) - } -} - -@Composable -private fun MovedLessonCard(item: MovedLessonItemDto) { - val subjects = - item.lessons - .mapNotNull { lesson -> lesson.subject?.name ?: lesson.subject?.short } - .distinct() - .joinToString(", ") - .ifBlank { - item.lessonNames - .joinToString(", ") - .ifBlank { tr("Áthelyezett óra", "Moved lesson") } - } - val room = item.classroom?.let(::displayName).orEmpty() - - ElevatedCard(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(14.dp), - verticalArrangement = Arrangement.spacedBy(6.dp), - ) { - Row( - horizontalArrangement = Arrangement.spacedBy(8.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Icon(Icons.Default.MoveUp, null, tint = MaterialTheme.colorScheme.tertiary) - Text(tr("Áthelyezett óra", "Moved lesson"), style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Bold) - } - Text(subjects, style = MaterialTheme.typography.titleSmall) - item.dayDefinition?.name?.takeIf { it.isNotBlank() }?.let { - DetailLine(tr("Nap", "Day"), it) - } - item.period?.let { - DetailLine( - tr("Időpont", "Time"), - "${it.period}. • ${formatTime(it.startTime)}–${formatTime(it.endTime)}", - ) - } - if (room.isNotBlank()) DetailLine(tr("Terem", "Classroom"), room) - } - } -} - -@Composable -private fun DetailLine( - label: String, - value: String, -) { - Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) { - Text("$label:", fontWeight = FontWeight.Medium) - Text(value, color = MaterialTheme.colorScheme.onSurfaceVariant) - } -} - -private fun filterSubstitutions( - data: List, - filter: TimetableFilter, - selectionId: String?, - cohorts: List, -): List { - if (selectionId == null) { - return data - } - - val cohortName = cohorts.firstOrNull { it.id == selectionId }?.name - return data.filter { item -> - if (filter == TimetableFilter.TEACHER && item.teacher?.id == selectionId) { - return@filter true - } - item.lessons.any { lesson -> - when (filter) { - TimetableFilter.COHORT -> cohortName != null && lesson.cohorts.contains(cohortName) - TimetableFilter.TEACHER -> lesson.teachers.any { it.id == selectionId } - TimetableFilter.CLASSROOM -> lesson.classrooms.any { it.id == selectionId } - } - } - } -} - -private fun filterMovedLessons( - data: List, - filter: TimetableFilter, - selectionId: String?, - cohorts: List, -): List { - if (selectionId == null) { - return data - } - - val cohortName = cohorts.firstOrNull { it.id == selectionId }?.name - - return data.filter { item -> - when (filter) { - TimetableFilter.COHORT -> - cohortName != null && - item.lessons.any { lesson -> - lesson.cohorts.contains(cohortName) - } - - TimetableFilter.TEACHER -> - item.lessons.any { lesson -> - lesson.teachers.any { it.id == selectionId } - } - - TimetableFilter.CLASSROOM -> - item.classroom?.id == selectionId || - item.lessons.any { lesson -> - lesson.classrooms.any { it.id == selectionId } - } - } - } -} - -private fun filterLabel(filter: TimetableFilter): String = - when (filter) { - TimetableFilter.COHORT -> tr("Osztály szűrése", "Filter by class") - TimetableFilter.TEACHER -> tr("Tanár szűrése", "Filter by teacher") - TimetableFilter.CLASSROOM -> tr("Terem szűrése", "Filter by classroom") - } - -private fun normalizeDate(value: String): String = value.take(10) - -private fun formatDate(value: String): String { - val parts = normalizeDate(value).split("-") - return if (parts.size == 3) "${parts[0]}. ${parts[1]}. ${parts[2]}." else value -} - -@OptIn(ExperimentalTime::class) -private fun isTodayOrFuture(value: String): Boolean = - runCatching { - val date = LocalDate.parse(normalizeDate(value)) - val today = Clock.System.todayIn(TimeZone.currentSystemDefault()) - date >= today - }.getOrDefault(true) - -private fun formatTime(value: String): String = value.take(5) - -private fun displayName(item: NamedRefDto): String = item.short.ifBlank { item.name } - -object SubstitutionTab : Tab { - override val options: TabOptions - @Composable - get() { - val title = tr("Helyettesítés", "Substitutions") - val icon = rememberVectorPainter(Icons.Default.SwapCalls) - return remember(title) { - TabOptions(index = 2u, title = title, icon = icon) - } - } - - @Composable - override fun Content() { - SubstitutionScreen() - } -} diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/TimetableScreen.kt b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/TimetableScreen.kt index 1ed34ed..a7024c1 100644 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/TimetableScreen.kt +++ b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/TimetableScreen.kt @@ -53,14 +53,14 @@ import cafe.adriel.voyager.navigator.tab.TabOptions import hu.petrik.filcapp.auth.AuthState import hu.petrik.filcapp.components.SearchableSelection import hu.petrik.filcapp.components.TimetableFilterChips -import hu.petrik.filcapp.network.CohortDto -import hu.petrik.filcapp.network.FilcPublicApi -import hu.petrik.filcapp.network.LessonDto -import hu.petrik.filcapp.network.NamedRefDto -import hu.petrik.filcapp.network.TeacherDto -import hu.petrik.filcapp.network.TimetableDto -import hu.petrik.filcapp.network.TimetableFilter -import hu.petrik.filcapp.network.WeekDefinitionDto +import hu.petrik.filcapp.data.ChronosApi +import hu.petrik.filcapp.data.CohortDto +import hu.petrik.filcapp.data.LessonDto +import hu.petrik.filcapp.data.NamedRefDto +import hu.petrik.filcapp.data.TeacherDto +import hu.petrik.filcapp.data.TimetableDto +import hu.petrik.filcapp.data.TimetableFilter +import hu.petrik.filcapp.data.WeekDefinitionDto import hu.petrik.filcapp.settings.tr import kotlinx.datetime.DayOfWeek import kotlinx.datetime.LocalDate @@ -131,10 +131,10 @@ fun TimetableScreen() { error = null try { - val latest = FilcPublicApi.getLatestValidTimetable() - val allTimetables = FilcPublicApi.getTimetables().filter(::isVisibleTimetable) - val loadedTeachers = FilcPublicApi.getTeachers() - val loadedClassrooms = FilcPublicApi.getClassrooms() + val latest = ChronosApi.getLatestValidTimetable() + val allTimetables = ChronosApi.getTimetables().filter(::isVisibleTimetable) + val loadedTeachers = ChronosApi.getTeachers() + val loadedClassrooms = ChronosApi.getClassrooms() timetables = (allTimetables + latest) @@ -187,7 +187,7 @@ fun TimetableScreen() { } try { - cohorts = FilcPublicApi.getCohorts(timetableId).sortedBy { it.name } + cohorts = ChronosApi.getCohorts(timetableId).sortedBy { it.name } TimetableSessionCache.cohortsByTimetableId[timetableId] = cohorts if (filter == TimetableFilter.COHORT && selectedId == null) { @@ -257,7 +257,7 @@ fun TimetableScreen() { try { lessons = - FilcPublicApi.getLessons( + ChronosApi.getLessons( filter = filter, selectionId = selectionId, timetableId = timetableId, @@ -312,7 +312,12 @@ fun TimetableScreen() { ), ) - val ownGroupIds = AuthState.profile?.groups?.map { it.id }?.toSet().orEmpty() + val ownGroupIds = + AuthState.profile + ?.groups + ?.map { it.id } + ?.toSet() + .orEmpty() val filterOptions = when (filter) { @@ -330,20 +335,23 @@ fun TimetableScreen() { val selectedTimetableLabel = when (filter) { - TimetableFilter.COHORT -> + TimetableFilter.COHORT -> { cohorts .firstOrNull { it.id == selectedId } ?.let { it.short.ifBlank { it.name } } + } - TimetableFilter.TEACHER -> + TimetableFilter.TEACHER -> { teachers .firstOrNull { it.id == selectedId } ?.displayName + } - TimetableFilter.CLASSROOM -> + TimetableFilter.CLASSROOM -> { classrooms .firstOrNull { it.id == selectedId } ?.let(::displayName) + } } ?: tr("Válassz órarendet", "Select timetable") fun moveWeek(delta: Int) { @@ -418,7 +426,9 @@ fun TimetableScreen() { } when { - loadingLessons -> LoadingBlock() + loadingLessons -> { + LoadingBlock() + } selectedId != null && selectedDayLessons.isEmpty() && error == null -> { EmptyDayBlock() diff --git a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/TimetableScreen.kt.bak b/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/TimetableScreen.kt.bak deleted file mode 100644 index aae27c7..0000000 --- a/composeApp/src/commonMain/kotlin/hu/petrik/filcapp/screens/TimetableScreen.kt.bak +++ /dev/null @@ -1,633 +0,0 @@ -package hu.petrik.filcapp.screens - -import androidx.compose.foundation.horizontalScroll -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.CalendarMonth -import androidx.compose.material.icons.filled.TableRows -import androidx.compose.material.icons.filled.ViewWeek -import androidx.compose.material3.Button -import androidx.compose.material3.Card -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.ElevatedCard -import androidx.compose.material3.FilterChip -import androidx.compose.material3.HorizontalDivider -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.vector.rememberVectorPainter -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.dp -import cafe.adriel.voyager.navigator.tab.Tab -import cafe.adriel.voyager.navigator.tab.TabOptions -import hu.petrik.filcapp.auth.AuthState -import hu.petrik.filcapp.components.SearchableSelection -import hu.petrik.filcapp.components.TimetableFilterChips -import hu.petrik.filcapp.network.CohortDto -import hu.petrik.filcapp.network.FilcPublicApi -import hu.petrik.filcapp.network.LessonDto -import hu.petrik.filcapp.network.NamedRefDto -import hu.petrik.filcapp.network.TeacherDto -import hu.petrik.filcapp.network.TimetableDto -import hu.petrik.filcapp.network.TimetableFilter -import hu.petrik.filcapp.network.WeekDefinitionDto -import hu.petrik.filcapp.settings.tr -import kotlinx.datetime.LocalDate -import kotlinx.datetime.TimeZone -import kotlinx.datetime.todayIn -import kotlin.time.Clock -import kotlin.time.ExperimentalTime - -private enum class TimetableViewMode { - LIST, - WEEK, -} - -@Composable -fun TimetableScreen() { - var timetables by remember { mutableStateOf>(emptyList()) } - var selectedTimetableId by remember { mutableStateOf(null) } - var cohorts by remember { mutableStateOf>(emptyList()) } - var teachers by remember { mutableStateOf>(emptyList()) } - var classrooms by remember { mutableStateOf>(emptyList()) } - var filter by remember { mutableStateOf(TimetableFilter.COHORT) } - var selectedId by remember { mutableStateOf(null) } - var lessons by remember { mutableStateOf>(emptyList()) } - var selectedWeekId by remember { mutableStateOf(null) } - var viewMode by remember { mutableStateOf(TimetableViewMode.LIST) } - var loadingReferenceData by remember { mutableStateOf(true) } - var loadingLessons by remember { mutableStateOf(false) } - var error by remember { mutableStateOf(null) } - var reloadKey by remember { mutableStateOf(0) } - var personalizedUserId by remember { mutableStateOf(null) } - - LaunchedEffect(reloadKey) { - loadingReferenceData = true - error = null - try { - val latest = FilcPublicApi.getLatestValidTimetable() - val allTimetables = FilcPublicApi.getTimetables().filter(::isVisibleTimetable) - val loadedTeachers = FilcPublicApi.getTeachers() - val loadedClassrooms = FilcPublicApi.getClassrooms() - - timetables = - (allTimetables + latest) - .distinctBy { it.id } - .sortedBy { it.validFrom.orEmpty() } - teachers = loadedTeachers.sortedBy { it.displayName } - classrooms = loadedClassrooms.sortedBy { it.name } - selectedTimetableId = latest.id - } catch (throwable: Throwable) { - error = throwable.message ?: tr("Nem sikerült betölteni az órarendet.", "Could not load timetable.") - } finally { - loadingReferenceData = false - } - } - - LaunchedEffect(selectedTimetableId, reloadKey) { - val timetableId = selectedTimetableId ?: return@LaunchedEffect - try { - cohorts = FilcPublicApi.getCohorts(timetableId).sortedBy { it.name } - if (filter == TimetableFilter.COHORT) { - selectedId = cohorts.firstOrNull()?.id - } - selectedWeekId = null - } catch (throwable: Throwable) { - error = throwable.message ?: tr("Nem sikerült betölteni az osztályokat.", "Could not load classes.") - } - } - - LaunchedEffect(AuthState.user?.id, AuthState.profile, cohorts, teachers) { - val userId = AuthState.user?.id - if (userId == null) { - personalizedUserId = null - } else if (personalizedUserId != userId) { - val profile = AuthState.profile - val teacherId = profile?.teacher?.id - val cohortId = profile?.cohort?.id - when { - teacherId != null && teachers.any { it.id == teacherId } -> { - filter = TimetableFilter.TEACHER - selectedId = teacherId - personalizedUserId = userId - } - cohortId != null && cohorts.any { it.id == cohortId } -> { - filter = TimetableFilter.COHORT - selectedId = cohortId - personalizedUserId = userId - } - } - } - } - - LaunchedEffect(filter, selectedId, selectedTimetableId, reloadKey) { - val timetableId = selectedTimetableId ?: return@LaunchedEffect - val selectionId = selectedId ?: return@LaunchedEffect - - loadingLessons = true - error = null - try { - lessons = - FilcPublicApi.getLessons( - filter = filter, - selectionId = selectionId, - timetableId = timetableId, - ) - val availableWeekIds = lessons.mapNotNull { it.weekDefinition?.id }.toSet() - if (selectedWeekId != null && selectedWeekId !in availableWeekIds) { - selectedWeekId = null - } - } catch (throwable: Throwable) { - lessons = emptyList() - error = throwable.message ?: tr("Nem sikerült betölteni az órákat.", "Could not load lessons.") - } finally { - loadingLessons = false - } - } - - val activeTimetable = timetables.firstOrNull { it.id == selectedTimetableId } - val filterOptions = - when (filter) { - TimetableFilter.COHORT -> cohorts.map { it.id to it.name } - TimetableFilter.TEACHER -> teachers.map { it.id to it.displayName } - TimetableFilter.CLASSROOM -> classrooms.map { it.id to displayName(it) } - } - val weekDefinitions = lessons.mapNotNull { it.weekDefinition }.distinctBy { it.id }.sortedBy { it.name } - val visibleLessons = - selectedWeekId?.let { weekId -> lessons.filter { it.weekDefinition?.id == weekId } } ?: lessons - val ownGroupIds = AuthState.profile?.groups?.map { it.id }?.toSet().orEmpty() - - Column( - modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(16.dp), - verticalArrangement = Arrangement.spacedBy(14.dp), - ) { - TimetableHeader(activeTimetable) - - if (loadingReferenceData) { - LoadingBlock() - return@Column - } - - error?.let { message -> - ErrorBlock(message = message, onRetry = { reloadKey++ }) - } - - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(14.dp), - verticalArrangement = Arrangement.spacedBy(12.dp), - ) { - TimetableFilterChips( - selected = filter, - onSelected = { newFilter -> - filter = newFilter - selectedWeekId = null - selectedId = - when (newFilter) { - TimetableFilter.COHORT -> cohorts.firstOrNull()?.id - TimetableFilter.TEACHER -> teachers.firstOrNull()?.id - TimetableFilter.CLASSROOM -> classrooms.firstOrNull()?.id - } - }, - ) - - SearchableSelection( - options = filterOptions, - selectedId = selectedId, - label = filterLabel(filter), - placeholder = tr("Kezdj el gépelni a kereséshez...", "Type to search..."), - onSelected = { selectedId = it }, - ) - - if (timetables.size > 1) { - SearchableSelection( - options = timetables.map { it.id to timetableLabel(it) }, - selectedId = selectedTimetableId, - label = tr("Órarend verzió", "Timetable version"), - placeholder = tr("Válassz órarendet", "Select timetable"), - onSelected = { id -> if (id != null) selectedTimetableId = id }, - ) - } - } - } - - if (weekDefinitions.size > 1) { - WeekSelector( - weeks = weekDefinitions, - selectedWeekId = selectedWeekId, - onSelected = { selectedWeekId = it }, - ) - } - - Row( - modifier = Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()), - horizontalArrangement = Arrangement.spacedBy(8.dp), - ) { - FilterChip( - selected = viewMode == TimetableViewMode.LIST, - onClick = { viewMode = TimetableViewMode.LIST }, - leadingIcon = { Icon(Icons.Default.TableRows, null) }, - label = { Text(tr("Lista", "List")) }, - ) - FilterChip( - selected = viewMode == TimetableViewMode.WEEK, - onClick = { viewMode = TimetableViewMode.WEEK }, - leadingIcon = { Icon(Icons.Default.ViewWeek, null) }, - label = { Text(tr("Heti nézet", "Week view")) }, - ) - } - - when { - loadingLessons -> LoadingBlock() - selectedId != null && visibleLessons.isEmpty() && error == null -> { - EmptyTimetableBlock() - } - - viewMode == TimetableViewMode.WEEK -> TimetableWeekView(visibleLessons, ownGroupIds) - else -> TimetableListView(visibleLessons, ownGroupIds) - } - } -} - -@Composable -private fun TimetableHeader(timetable: TimetableDto?) { - Column( - modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp), - verticalArrangement = Arrangement.spacedBy(4.dp), - ) { - Text( - tr("Órarend", "Timetable"), - style = MaterialTheme.typography.headlineSmall, - fontWeight = FontWeight.Bold, - color = MaterialTheme.colorScheme.onBackground, - ) - timetable?.let { - Text( - it.name.ifBlank { tr("Aktív órarend", "Active timetable") }, - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - timetableValidity(it)?.let { validity -> - Text( - validity, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - } -} - -@Composable -private fun WeekSelector( - weeks: List, - selectedWeekId: String?, - onSelected: (String?) -> Unit, -) { - Row( - modifier = Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()), - horizontalArrangement = Arrangement.spacedBy(8.dp), - ) { - FilterChip( - selected = selectedWeekId == null, - onClick = { onSelected(null) }, - label = { Text(tr("Minden hét", "All weeks")) }, - ) - weeks.forEach { week -> - FilterChip( - selected = selectedWeekId == week.id, - onClick = { onSelected(week.id) }, - label = { Text(week.short.ifBlank { week.name }) }, - ) - } - } -} - -@Composable -private fun TimetableListView( - lessons: List, - ownGroupIds: Set, -) { - val grouped = sortedLessons(lessons).groupBy { localizedDayName(it.day?.name.orEmpty()) } - - grouped.forEach { (day, dayLessons) -> - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - Text(day, style = MaterialTheme.typography.titleLarge, fontWeight = FontWeight.SemiBold) - dayLessons.forEach { lesson -> LessonCard(lesson, ownGroupIds) } - } - Spacer(Modifier.height(4.dp)) - } -} - -@Composable -private fun TimetableWeekView( - lessons: List, - ownGroupIds: Set, -) { - val grouped = sortedLessons(lessons).groupBy { localizedDayName(it.day?.name.orEmpty()) } - - if (grouped.isEmpty()) { - EmptyTimetableBlock() - return - } - - Row( - modifier = Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()), - horizontalArrangement = Arrangement.spacedBy(12.dp), - ) { - grouped.forEach { (day, dayLessons) -> - Card(modifier = Modifier.width(240.dp)) { - Column( - modifier = Modifier.fillMaxWidth().padding(12.dp), - verticalArrangement = Arrangement.spacedBy(8.dp), - ) { - Text(day, style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Bold) - HorizontalDivider() - dayLessons.forEach { lesson -> CompactLessonCard(lesson, ownGroupIds) } - } - } - } - } -} - -@Composable -private fun LessonCard( - lesson: LessonDto, - ownGroupIds: Set, -) { - val period = lesson.period - val subjectName = lesson.subject?.name ?: lesson.subject?.short ?: tr("Ismeretlen tantárgy", "Unknown subject") - val teachers = lesson.teachers.joinToString(", ") { displayName(it) } - val classrooms = lesson.classrooms.joinToString(", ") { displayName(it) } - val cohorts = lesson.cohorts.joinToString(", ") { it.short.ifBlank { it.name } } - val isOwnGroup = lesson.groups.any { it.id in ownGroupIds } - - ElevatedCard(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(14.dp), - verticalArrangement = Arrangement.spacedBy(6.dp), - ) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - Text(subjectName, style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.SemiBold) - period?.let { PeriodBadge(it.period) } - } - period?.let { - Text( - "${formatTime(it.startTime)}–${formatTime(it.endTime)}", - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.primary, - fontWeight = FontWeight.Medium, - ) - } - if (teachers.isNotBlank()) DetailLine(tr("Tanár", "Teacher"), teachers) - if (classrooms.isNotBlank()) DetailLine(tr("Terem", "Classroom"), classrooms) - if (cohorts.isNotBlank()) DetailLine(tr("Osztály", "Class"), cohorts) - if (isOwnGroup) { - Text( - tr("Saját csoport", "My group"), - style = MaterialTheme.typography.labelMedium, - color = MaterialTheme.colorScheme.primary, - fontWeight = FontWeight.Bold, - ) - } - lesson.weekDefinition?.let { week -> - if (week.short.isNotBlank() || week.name.isNotBlank()) { - Text( - week.short.ifBlank { week.name }, - style = MaterialTheme.typography.labelSmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } - } - } - } -} - -@Composable -private fun CompactLessonCard( - lesson: LessonDto, - ownGroupIds: Set, -) { - Surface( - shape = MaterialTheme.shapes.medium, - color = MaterialTheme.colorScheme.surfaceVariant, - ) { - Column( - modifier = Modifier.fillMaxWidth().padding(10.dp), - verticalArrangement = Arrangement.spacedBy(3.dp), - ) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - ) { - Text( - lesson.subject?.short?.ifBlank { lesson.subject?.name.orEmpty() } - ?: tr("Óra", "Lesson"), - style = MaterialTheme.typography.titleSmall, - fontWeight = FontWeight.SemiBold, - ) - lesson.period?.let { Text("${it.period}.", style = MaterialTheme.typography.labelMedium) } - } - lesson.period?.let { - Text( - "${formatTime(it.startTime)}–${formatTime(it.endTime)}", - style = MaterialTheme.typography.bodySmall, - ) - } - val room = lesson.classrooms.joinToString(", ") { displayName(it) } - if (lesson.groups.any { it.id in ownGroupIds }) { - Text( - tr("Saját csoport", "My group"), - style = MaterialTheme.typography.labelSmall, - color = MaterialTheme.colorScheme.primary, - ) - } - if (room.isNotBlank()) { - Text(room, style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant) - } - } - } -} - -@Composable -private fun PeriodBadge(period: Int) { - Surface( - shape = MaterialTheme.shapes.extraLarge, - color = MaterialTheme.colorScheme.secondaryContainer, - ) { - Text( - if (period > 0) "$period." else "–", - modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp), - color = MaterialTheme.colorScheme.onSecondaryContainer, - fontWeight = FontWeight.Bold, - ) - } -} - -@Composable -private fun DetailLine( - label: String, - value: String, -) { - Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) { - Text("$label:", style = MaterialTheme.typography.bodyMedium, fontWeight = FontWeight.Medium) - Text(value, style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant) - } -} - -@Composable -private fun EmptyTimetableBlock() { - Card(modifier = Modifier.fillMaxWidth()) { - Text( - tr("Ehhez a kiválasztáshoz nincs megjeleníthető óra.", "No lessons for this selection."), - modifier = Modifier.padding(18.dp), - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) - } -} - -@Composable -private fun LoadingBlock() { - Box( - modifier = Modifier.fillMaxWidth().padding(28.dp), - contentAlignment = Alignment.Center, - ) { - CircularProgressIndicator() - } -} - -@Composable -private fun ErrorBlock( - message: String, - onRetry: () -> Unit, -) { - Card(modifier = Modifier.fillMaxWidth()) { - Column( - modifier = Modifier.fillMaxWidth().padding(16.dp), - verticalArrangement = Arrangement.spacedBy(8.dp), - ) { - Text(tr("Hiba történt", "Something went wrong"), style = MaterialTheme.typography.titleMedium) - Text(message) - Button(onClick = onRetry) { - Text(tr("Újrapróbálás", "Retry")) - } - } - } -} - -private fun sortedLessons(lessons: List): List = - lessons.sortedWith( - compareBy( - { dayOrder(it.day?.name.orEmpty()) }, - { it.period?.period ?: Int.MAX_VALUE }, - { it.period?.startTime.orEmpty() }, - ), - ) - -private fun filterLabel(filter: TimetableFilter): String = - when (filter) { - TimetableFilter.COHORT -> tr("Osztály keresése", "Find class") - TimetableFilter.TEACHER -> tr("Tanár keresése", "Find teacher") - TimetableFilter.CLASSROOM -> tr("Terem keresése", "Find classroom") - } - -private fun timetableLabel(timetable: TimetableDto): String = - timetable.name.ifBlank { - timetable.validFrom?.let { tr("Órarend – ${formatDate(it)}", "Timetable – ${formatDate(it)}") } - ?: tr("Órarend", "Timetable") - } - -private fun timetableValidity(timetable: TimetableDto): String? { - val from = timetable.validFrom?.let(::formatDate) - val to = timetable.validTo?.let(::formatDate) - return when { - from != null && to != null -> "$from – $to" - from != null -> tr("Érvényes ettől: $from", "Valid from: $from") - to != null -> tr("Érvényes eddig: $to", "Valid until: $to") - else -> null - } -} - -private fun localizedDayName(day: String): String = - when (dayOrder(day)) { - 1 -> tr("Hétfő", "Monday") - 2 -> tr("Kedd", "Tuesday") - 3 -> tr("Szerda", "Wednesday") - 4 -> tr("Csütörtök", "Thursday") - 5 -> tr("Péntek", "Friday") - 6 -> tr("Szombat", "Saturday") - 7 -> tr("Vasárnap", "Sunday") - else -> day.ifBlank { tr("Egyéb", "Other") } - } - -private fun dayOrder(day: String): Int { - val normalized = day.lowercase() - return when { - normalized.contains("hétf") || normalized.contains("hetf") || normalized.contains("monday") -> 1 - normalized.contains("kedd") || normalized.contains("tuesday") -> 2 - normalized.contains("szerda") || normalized.contains("wednesday") -> 3 - normalized.contains("csüt") || normalized.contains("csut") || normalized.contains("thursday") -> 4 - normalized.contains("pént") || normalized.contains("pent") || normalized.contains("friday") -> 5 - normalized.contains("szomb") || normalized.contains("saturday") -> 6 - normalized.contains("vasár") || normalized.contains("vasar") || normalized.contains("sunday") -> 7 - else -> 99 - } -} - -@OptIn(ExperimentalTime::class) -private fun isVisibleTimetable(timetable: TimetableDto): Boolean = - runCatching { - val today = Clock.System.todayIn(TimeZone.currentSystemDefault()) - val validTo = timetable.validTo?.let { LocalDate.parse(it.take(10)) } - validTo == null || validTo >= today - }.getOrDefault(true) - -private fun formatDate(value: String): String { - val parts = value.take(10).split("-") - return if (parts.size == 3) "${parts[0]}. ${parts[1]}. ${parts[2]}." else value.take(10) -} - -private fun formatTime(value: String): String = value.take(5) - -private fun displayName(item: NamedRefDto): String = item.short.ifBlank { item.name } - -object TimetableTab : Tab { - override val options: TabOptions - @Composable - get() { - val title = tr("Órarend", "Timetable") - val icon = rememberVectorPainter(Icons.Default.CalendarMonth) - return remember(title) { - TabOptions(index = 1u, title = title, icon = icon) - } - } - - @Composable - override fun Content() { - TimetableScreen() - } -} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 4fb85b8..526ac3b 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,7 +18,7 @@ platform :ios do # * There is no `.xcworkspace`, so `gym` uses `project:` (not `workspace:`). # * The Kotlin framework is compiled and embedded by the Xcode "Compile # Kotlin Framework" Run Script phase (which calls - # `./gradlew :composeApp:embedAndSignAppleFrameworkForXcode`), so there is + # `gradle :composeApp:embedAndSignAppleFrameworkForXcode`), so there is # no separate Gradle step here. # * Versions are injected via build settings (MARKETING_VERSION / # CURRENT_PROJECT_VERSION) rather than mutating the project with diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 1b33c55..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index d4081da..0000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew deleted file mode 100755 index 23d15a9..0000000 --- a/gradlew +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH="\\\"\\\"" - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index db3a6ac..0000000 --- a/gradlew.bat +++ /dev/null @@ -1,94 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH= - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index 162034e..38ea886 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -152,7 +152,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/..\"\n./gradlew :composeApp:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/..\"\ngradle :composeApp:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..1e52889 --- /dev/null +++ b/mise.toml @@ -0,0 +1,22 @@ +[tools] +java = "21" +gradle = "8.14.3" +android-sdk = "23.0" + +# Release scripts (release.sh / release.cmd) +github-cli = "2.102.0" + +# Match CI kotlin-quality-check.yml exactly; ktlint ships breaking style +# changes between minors. +ktlint = "1.1.1" + +# fastlane (Gemfile) — CI installs this via mise too; the gem bundle is +# cached per Gemfile.lock in the workflows. +ruby = "3.3" + +# mise's android-sdk only provides the SDK base; CI runners come with a +# full preinstalled SDK, so local contributors run this once. Build-tools +# are auto-fetched by AGP. +[tasks.sdk-components] +description = "Install the Android platform AGP compiles against" +run = "android sdk install 'platforms;android-36'" diff --git a/openapi/filc-openapi.json b/openapi/filc-openapi.json index d179278..104f8d4 100644 --- a/openapi/filc-openapi.json +++ b/openapi/filc-openapi.json @@ -1,1149 +1,59127 @@ { - "openapi": "3.0.0", + "components": { + "securitySchemes": { + "sessionAuth": { + "in": "cookie", + "name": "filc.session_token", + "type": "apiKey" + } + } + }, "info": { - "title": "Chronos Backend API", - "version": "0.0.1", - "description": "The Filc school management backend API" + "description": "API for consumption by the Filc app family.", + "title": "Chronos backend API", + "version": "0.0.1" }, "servers": [ { - "url": "https://filc.petrik.hu/api", - "description": "Production server" + "description": "chronos", + "url": "https://filc.petrik.hu/api" }, { - "url": "http://localhost:3000/api", - "description": "Local development server" + "description": "Local Server", + "url": "http://localhost:3000/api" } ], + "openapi": "3.1.1", "paths": { - "/ping": { - "get": { - "operationId": "ping", - "summary": "Health check", - "tags": ["ping"], + "/admin/api-keys/{keyId}": { + "delete": { + "operationId": "deleteAdminApiKeysByKeyId", + "description": "Revoke any user's API key", + "tags": [ + "API keys" + ], + "parameters": [ + { + "name": "keyId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "responses": { "200": { - "description": "Server is alive", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PingResponse" + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] } } } - } - } - } - }, - "/ping/uptime": { - "get": { - "operationId": "getUptime", - "summary": "Get server uptime", - "tags": ["ping"], - "responses": { - "200": { - "description": "Server uptime information", + }, + "400": { + "description": "400", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UptimeResponse" + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } - } - } - } - }, - "/timetable/timetables": { - "get": { - "operationId": "getTimetables", - "summary": "List all timetables", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "List of timetables", + }, + "401": { + "description": "401", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Timetable"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/timetables/latestValid": { - "get": { - "operationId": "getLatestValidTimetable", - "summary": "Get the latest valid timetable", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "Latest valid timetable", + "403": { + "description": "403", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": {"$ref": "#/components/schemas/Timetable"} - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/timetables/valid": { - "get": { - "operationId": "getValidTimetables", - "summary": "Get all valid timetables", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "All valid timetables", + "404": { + "description": "404", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Timetable"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/lessons/getForCohort/{cohortId}": { - "get": { - "operationId": "getLessonsForCohort", - "summary": "Get lessons for a cohort", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "parameters": [ - { - "name": "cohortId", - "in": "path", - "required": true, - "schema": {"type": "string"} - } - ], - "responses": { - "200": { - "description": "Lessons for the cohort", + "409": { + "description": "409", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Lesson"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/lessons/getForTeacher/{teacherId}": { - "get": { - "operationId": "getLessonsForTeacher", - "summary": "Get lessons for a teacher", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "parameters": [ - { - "name": "teacherId", - "in": "path", - "required": true, - "schema": {"type": "string"} - } - ], - "responses": { - "200": { - "description": "Lessons for the teacher", + "429": { + "description": "429", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Lesson"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/lessons/getForRoom/{classroomId}": { - "get": { - "operationId": "getLessonsForRoom", - "summary": "Get lessons for a classroom", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "patch": { + "operationId": "patchAdminApiKeysByKeyId", + "description": "Enable or disable any user's API key", + "tags": [ + "API keys" + ], "parameters": [ { - "name": "classroomId", + "name": "keyId", "in": "path", "required": true, - "schema": {"type": "string"} + "schema": { + "type": "string", + "format": "uuid" + } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + } + } + } + }, "responses": { "200": { - "description": "Lessons for the classroom", + "description": "OK", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Lesson"} + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "expiresAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" } - } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastRequest": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "ownerEmail": { + "type": "string" + }, + "ownerName": { + "type": "string" + }, + "prefix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "referenceId": { + "type": "string" + }, + "requestCount": { + "type": "number" + }, + "start": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" } + }, + "required": [ + "createdAt", + "enabled", + "expiresAt", + "id", + "lastRequest", + "name", + "ownerEmail", + "ownerName", + "prefix", + "referenceId", + "requestCount", + "start", + "updatedAt" ] } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/lessons/getForId/{lessonId}": { - "get": { - "operationId": "getLessonById", - "summary": "Get a specific lesson by ID", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "parameters": [ - { - "name": "lessonId", - "in": "path", - "required": true, - "schema": {"type": "string"} - } - ], - "responses": { - "200": { - "description": "Lesson details", + "400": { + "description": "400", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": {"$ref": "#/components/schemas/Lesson"} - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"}, - "404": {"$ref": "#/components/responses/NotFound"} - } - } - }, - "/timetable/substitutions": { - "get": { - "operationId": "getSubstitutions", - "summary": "List all substitutions", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "List of substitutions", + "401": { + "description": "401", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Substitution"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/substitutions/relevant": { - "get": { - "operationId": "getRelevantSubstitutions", - "summary": "Get relevant substitutions for the current user", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "Relevant substitutions", + "403": { + "description": "403", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Substitution"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/substitutions/cohort/{cohortId}": { - "get": { - "operationId": "getSubstitutionsForCohort", - "summary": "Get relevant substitutions for a cohort", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "parameters": [ - { - "name": "cohortId", - "in": "path", - "required": true, - "schema": {"type": "string"} - } - ], - "responses": { - "200": { - "description": "Substitutions for the cohort", + "404": { + "description": "404", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Substitution"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/movedLessons": { - "get": { - "operationId": "getMovedLessons", - "summary": "List all moved lessons", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "List of moved lessons", + "409": { + "description": "409", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/MovedLesson"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/movedLessons/relevant": { - "get": { - "operationId": "getRelevantMovedLessons", - "summary": "Get relevant moved lessons for the current user", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "Relevant moved lessons", + "429": { + "description": "429", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/MovedLesson"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/movedLessons/cohort/{cohortId}": { - "get": { - "operationId": "getMovedLessonsForCohort", - "summary": "Get moved lessons for a cohort", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "parameters": [ - { - "name": "cohortId", - "in": "path", - "required": true, - "schema": {"type": "string"} - } - ], - "responses": { - "200": { - "description": "Moved lessons for the cohort", + "500": { + "description": "500", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/MovedLesson"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } - }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] } }, - "/timetable/cohorts/getAllForTimetable/{timetableId}": { + "/admin/api-keys": { "get": { - "operationId": "getCohortsForTimetable", - "summary": "Get all cohorts for a timetable", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], + "operationId": "getAdminApiKeys", + "description": "List every user's API keys", + "tags": [ + "API keys" + ], "parameters": [ { - "name": "timetableId", - "in": "path", - "required": true, - "schema": {"type": "string"} + "name": "limit", + "in": "query", + "schema": { + "type": "number", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "number", + "minimum": 0, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "ownerId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true } ], "responses": { "200": { - "description": "Cohorts for the timetable", + "description": "OK", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Cohort"} - } + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "expiresAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastRequest": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "ownerEmail": { + "type": "string" + }, + "ownerName": { + "type": "string" + }, + "prefix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "referenceId": { + "type": "string" + }, + "requestCount": { + "type": "number" + }, + "start": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "enabled", + "expiresAt", + "id", + "lastRequest", + "name", + "ownerEmail", + "ownerName", + "prefix", + "referenceId", + "requestCount", + "start", + "updatedAt" + ] } + }, + "total": { + "type": "number" } + }, + "required": [ + "items", + "total" ] } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/teachers/getAll": { - "get": { - "operationId": "getAllTeachers", - "summary": "List all teachers", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "List of teachers", + "400": { + "description": "400", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Teacher"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/timetable/classrooms/getAll": { - "get": { - "operationId": "getAllClassrooms", - "summary": "List all classrooms", - "tags": ["timetable"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "List of classrooms", + "401": { + "description": "401", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Classroom"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/cohort": { - "get": { - "operationId": "getCohorts", - "summary": "List all cohorts", - "tags": ["cohort"], - "security": [{"sessionAuth": []}], - "responses": { - "200": { - "description": "List of cohorts", + "403": { + "description": "403", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Cohort"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"} - } - } - }, - "/news/announcements": { - "get": { - "operationId": "getAnnouncements", - "summary": "List all announcements", - "tags": ["news"], - "responses": { - "200": { - "description": "List of announcements", + "404": { + "description": "404", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Announcement"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } - } - } - } - }, - "/news/announcements/{id}": { - "get": { - "operationId": "getAnnouncementById", - "summary": "Get a specific announcement", - "tags": ["news"], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": {"type": "string"} - } - ], - "responses": { - "200": { - "description": "Announcement details", + }, + "409": { + "description": "409", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": {"$ref": "#/components/schemas/Announcement"} - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "404": {"$ref": "#/components/responses/NotFound"} - } - } - }, - "/news/system-messages": { - "get": { - "operationId": "getSystemMessages", - "summary": "List all system messages", - "tags": ["news"], - "responses": { - "200": { - "description": "List of system messages", + "429": { + "description": "429", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/SystemMessage"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } } - } - } - }, - "/news/system-messages/{id}": { - "get": { - "operationId": "getSystemMessageById", - "summary": "Get a specific system message", - "tags": ["news"], - "parameters": [ + }, + "security": [ { - "name": "id", - "in": "path", - "required": true, - "schema": {"type": "string"} + "sessionAuth": [] } + ] + } + }, + "/bug-report": { + "post": { + "operationId": "postBugReport", + "description": "Create a new bug report", + "tags": [ + "Bug Reports" ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "minLength": 10, + "maxLength": 5000 + }, + "metadata": { + "type": "object", + "propertyNames": { + "type": "string", + "maxLength": 64 + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + } + }, + "page": { + "type": "string", + "maxLength": 255 + }, + "subject": { + "type": "string", + "minLength": 3, + "maxLength": 200 + } + }, + "required": [ + "description", + "subject" + ] + } + } + } + }, "responses": { - "200": { - "description": "System message details", + "201": { + "description": "OK", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": {"$ref": "#/components/schemas/SystemMessage"} - } + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" } + }, + "required": [ + "id" ] } } } }, - "404": {"$ref": "#/components/responses/NotFound"} - } - } - }, - "/news/blogs": { - "get": { - "operationId": "getBlogs", - "summary": "List published blog posts", - "tags": ["news"], - "responses": { - "200": { - "description": "List of published blog posts", + "400": { + "description": "400", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "array", - "items": {"$ref": "#/components/schemas/Blog"} - } - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } - } - } - } - }, - "/news/blogs/id/{id}": { - "get": { - "operationId": "getBlogById", - "summary": "Get a blog post by ID", - "tags": ["news"], - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": {"type": "string"} - } - ], - "responses": { - "200": { - "description": "Blog post details", + }, + "401": { + "description": "401", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": {"$ref": "#/components/schemas/Blog"} - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "404": {"$ref": "#/components/responses/NotFound"} - } - } - }, - "/news/blogs/{slug}": { - "get": { - "operationId": "getBlogBySlug", - "summary": "Get a blog post by slug", - "tags": ["news"], - "parameters": [ - { - "name": "slug", - "in": "path", - "required": true, - "schema": {"type": "string"} - } - ], - "responses": { - "200": { - "description": "Blog post details", + "403": { + "description": "403", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": {"$ref": "#/components/schemas/Blog"} - } + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" } - ] + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" } } } }, - "404": {"$ref": "#/components/responses/NotFound"} - } - } - }, - "/users": { + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, "get": { - "operationId": "getUsers", - "summary": "List users with optional search and pagination", - "tags": ["users"], - "security": [{"sessionAuth": []}], + "operationId": "getBugReport", + "description": "List bug reports with optional filters and paging", + "tags": [ + "Bug Reports" + ], "parameters": [ + { + "name": "dateFrom", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "dateTo", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "allowEmptyValue": true, + "allowReserved": true + }, { "name": "limit", "in": "query", - "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20} + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "allowEmptyValue": true, + "allowReserved": true }, { - "name": "offset", + "name": "page", "in": "query", - "schema": {"type": "integer", "minimum": 0, "default": 0} + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 9007199254740991, + "default": 1 + }, + "allowEmptyValue": true, + "allowReserved": true }, { "name": "search", "in": "query", - "schema": {"type": "string"} + "schema": { + "type": "string", + "maxLength": 200 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "status", + "in": "query", + "schema": { + "enum": [ + "open", + "in_progress", + "resolved", + "closed" + ], + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true } ], "responses": { "200": { - "description": "Paginated list of users", + "description": "OK", "content": { "application/json": { "schema": { - "allOf": [ - {"$ref": "#/components/schemas/SuccessResponse"}, - { - "properties": { - "data": { - "type": "object", - "properties": { - "users": { - "type": "array", - "items": {"$ref": "#/components/schemas/User"} - }, - "total": {"type": "integer"} + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "description": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "metadata": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + { + "type": "null" + } + ] + }, + "page": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reporterEmail": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reporterId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" } - } + }, + "required": [ + "createdAt", + "description", + "id", + "metadata", + "page", + "reporterEmail", + "reporterId", + "status", + "subject", + "updatedAt" + ] } + }, + "total": { + "type": "number" } + }, + "required": [ + "items", + "total" ] } } } }, - "401": {"$ref": "#/components/responses/Unauthorized"}, - "403": {"$ref": "#/components/responses/Forbidden"} - } - } - } - }, - "components": { - "securitySchemes": { - "sessionAuth": { - "type": "apiKey", - "in": "cookie", - "name": "filc.session_token" - } - }, - "responses": { - "Unauthorized": { - "description": "Authentication required", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/ErrorResponse"} + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/bug-report/{id}": { + "delete": { + "operationId": "deleteBugReportById", + "description": "Delete a bug report", + "tags": [ + "Bug Reports" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/bug-report/{id}/status": { + "patch": { + "operationId": "patchBugReportByIdStatus", + "description": "Update a bug report status", + "tags": [ + "Bug Reports" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "enum": [ + "open", + "in_progress", + "resolved", + "closed" + ], + "type": "string" + } + }, + "required": [ + "status" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "description": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "metadata": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + { + "type": "null" + } + ] + }, + "page": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reporterEmail": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reporterId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "description", + "id", + "metadata", + "page", + "reporterEmail", + "reporterId", + "status", + "subject", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/cohort": { + "get": { + "operationId": "getCohort", + "description": "List all cohorts", + "tags": [ + "Cohort" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classroomIds": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "teacherId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "timetableId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "classroomIds", + "id", + "name", + "short", + "teacherId", + "timetableId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/dashboard/stats": { + "get": { + "operationId": "getDashboardStats", + "description": "Get aggregated dashboard statistics", + "tags": [ + "Dashboard" + ], + "parameters": [ + { + "name": "days", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 365, + "default": 30 + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "chartData": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string" + }, + "movedLessons": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "substitutions": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "date", + "movedLessons", + "substitutions" + ] + } + }, + "chartTotalMovedLessons": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "chartTotalSubstitutions": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalCohorts": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalMovedLessons": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalRoles": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalSubstitutions": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalUsers": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "chartData", + "chartTotalMovedLessons", + "chartTotalSubstitutions", + "totalCohorts", + "totalMovedLessons", + "totalRoles", + "totalSubstitutions", + "totalUsers" + ] + } + }, + "required": [ + "stats" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/doorlock/cards": { + "post": { + "operationId": "postDoorlockCards", + "description": "Create a new access card", + "tags": [ + "Doorlock" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorizedDeviceIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "default": [] + }, + "enabled": { + "type": "boolean", + "default": true + }, + "frozen": { + "type": "boolean", + "default": false + }, + "name": { + "type": "string", + "minLength": 1 + }, + "cardData": { + "type": "string", + "minLength": 1 + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "name", + "cardData", + "userId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorizedDevices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "cardData": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "frozen": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "owner": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "id", + "name", + "nickname" + ] + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorizedDevices", + "cardData", + "createdAt", + "enabled", + "frozen", + "id", + "name", + "updatedAt", + "userId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getDoorlockCards", + "description": "List all access cards", + "tags": [ + "Doorlock" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "authorizedDevices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "cardData": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "frozen": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "owner": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "id", + "name", + "nickname" + ] + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorizedDevices", + "cardData", + "createdAt", + "enabled", + "frozen", + "id", + "name", + "updatedAt", + "userId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/cards/{id}": { + "delete": { + "operationId": "deleteDoorlockCardsById", + "description": "Delete an access card", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putDoorlockCardsById", + "description": "Update an access card", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorizedDeviceIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "default": [] + }, + "enabled": { + "type": "boolean", + "default": true + }, + "frozen": { + "type": "boolean", + "default": false + }, + "name": { + "type": "string", + "minLength": 1 + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "name", + "userId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorizedDevices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "cardData": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "frozen": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "owner": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "id", + "name", + "nickname" + ] + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorizedDevices", + "cardData", + "createdAt", + "enabled", + "frozen", + "id", + "name", + "updatedAt", + "userId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/cards/users": { + "get": { + "operationId": "getDoorlockCardsUsers", + "description": "List users eligible for card ownership", + "tags": [ + "Doorlock" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "id", + "name", + "nickname" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/devices": { + "post": { + "operationId": "postDoorlockDevices", + "description": "Create a new doorlock device", + "tags": [ + "Doorlock" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "apiToken": { + "type": "string", + "minLength": 32, + "maxLength": 128 + }, + "lastResetReason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "location": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "apiToken", + "name" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "apiToken": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastResetReason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "location": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "apiToken", + "createdAt", + "id", + "lastResetReason", + "location", + "name", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getDoorlockDevices", + "description": "List all doorlock devices", + "tags": [ + "Doorlock" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "apiToken": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastResetReason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "location": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "apiToken", + "createdAt", + "id", + "lastResetReason", + "location", + "name", + "updatedAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/devices/{id}": { + "delete": { + "operationId": "deleteDoorlockDevicesById", + "description": "Delete a doorlock device", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putDoorlockDevicesById", + "description": "Update an existing doorlock device", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "apiToken": { + "type": "string", + "minLength": 32, + "maxLength": 128 + }, + "lastResetReason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "location": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "apiToken", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "apiToken": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastResetReason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "location": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "apiToken", + "createdAt", + "id", + "lastResetReason", + "location", + "name", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/devices/{id}/stats": { + "get": { + "operationId": "getDoorlockDevicesByIdStats", + "description": "Get device health statistics", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stats": { + "type": "array", + "items": { + "type": "object", + "properties": { + "deviceMeta": { + "type": "object", + "properties": { + "debug": { + "type": "object", + "properties": { + "deviceState": { + "enum": [ + "booting", + "error", + "idle", + "updating" + ], + "type": "string" + }, + "errors": { + "type": "object", + "properties": { + "db": { + "type": "boolean" + }, + "nfc": { + "type": "boolean" + }, + "ota": { + "type": "boolean" + }, + "sd": { + "type": "boolean" + }, + "wifi": { + "type": "boolean" + } + }, + "required": [ + "db", + "nfc", + "ota", + "sd", + "wifi" + ] + }, + "lastResetReason": { + "type": "string" + } + }, + "required": [ + "deviceState", + "errors", + "lastResetReason" + ] + }, + "fwVersion": { + "type": "string" + }, + "ramFree": { + "type": "number" + }, + "storage": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "used": { + "type": "number" + } + }, + "required": [ + "total", + "used" + ] + }, + "uptime": { + "type": "number" + } + }, + "required": [ + "debug", + "fwVersion", + "ramFree", + "storage", + "uptime" + ] + }, + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timestamp": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "deviceMeta", + "id", + "timestamp" + ] + } + } + }, + "required": [ + "stats" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/devices/{id}/update": { + "post": { + "operationId": "postDoorlockDevicesByIdUpdate", + "description": "Trigger an OTA update on a specific device", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "pattern": "^https:\\/\\/" + } + }, + "required": [ + "url" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "const": true + } + }, + "required": [ + "ok" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/devices/update": { + "post": { + "operationId": "postDoorlockDevicesUpdate", + "description": "Trigger an OTA update on all devices", + "tags": [ + "Doorlock" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "pattern": "^https:\\/\\/" + } + }, + "required": [ + "url" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "count" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/logs/export": { + "get": { + "operationId": "getDoorlockLogsExport", + "description": "Export doorlock audit log entries (attendance data) as a CSV file over an optional date range.", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "cardId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "deviceId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "granted", + "in": "query", + "schema": { + "enum": [ + "true", + "false" + ], + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string", + "contentMediaType": "*/*" + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/logs": { + "get": { + "operationId": "getDoorlockLogs", + "description": "List audit log entries", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "cardId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "deviceId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "granted", + "in": "query", + "schema": { + "enum": [ + "true", + "false" + ], + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "buttonPressed": { + "type": "boolean" + }, + "cardData": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "cardId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "deviceId": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "result": { + "type": "boolean" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "card": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + { + "type": "null" + } + ] + }, + "device": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + { + "type": "null" + } + ] + }, + "owner": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "id", + "name", + "nickname" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "buttonPressed", + "cardData", + "cardId", + "deviceId", + "id", + "result", + "timestamp", + "userId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/self/cards/{id}/activate": { + "post": { + "operationId": "postDoorlockSelfCardsByIdActivate", + "description": "Activate an authorized device using a user-owned virtual card", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deviceId": { + "type": "string", + "format": "uuid" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "buttonPressed": { + "type": "boolean" + }, + "cardData": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "cardId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "deviceId": { + "type": "string", + "format": "uuid" + }, + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "result": { + "type": "boolean" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "buttonPressed", + "cardData", + "cardId", + "deviceId", + "id", + "result", + "timestamp", + "userId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/self/cards": { + "get": { + "operationId": "getDoorlockSelfCards", + "description": "List cards owned by the authenticated user", + "tags": [ + "Doorlock" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "authorizedDevices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "cardData": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "frozen": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "owner": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "id", + "name", + "nickname" + ] + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorizedDevices", + "cardData", + "createdAt", + "enabled", + "frozen", + "id", + "name", + "updatedAt", + "userId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/self/cards/{id}/frozen": { + "put": { + "operationId": "putDoorlockSelfCardsByIdFrozen", + "description": "Update the frozen state of a user-owned card", + "tags": [ + "Doorlock" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "frozen": { + "type": "boolean" + } + }, + "required": [ + "frozen" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorizedDevices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "cardData": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "frozen": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "owner": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "id", + "name", + "nickname" + ] + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorizedDevices", + "cardData", + "createdAt", + "enabled", + "frozen", + "id", + "name", + "updatedAt", + "userId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/doorlock/stats/overview": { + "get": { + "operationId": "getDoorlockStatsOverview", + "description": "Get aggregated doorlock statistics", + "tags": [ + "Doorlock" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "doorOpenSeries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "date": { + "type": "string" + } + }, + "required": [ + "count", + "date" + ] + } + }, + "topUsers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "count", + "id", + "name", + "nickname" + ] + } + }, + "totalCards": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalDevices": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalSuccessfulOpens": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "doorOpenSeries", + "topUsers", + "totalCards", + "totalDevices", + "totalSuccessfulOpens" + ] + } + }, + "required": [ + "stats" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/health": { + "get": { + "operationId": "getHealth", + "description": "Readiness probe: answers 200 only when PostgreSQL is reachable.", + "tags": [ + "Health" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "database": { + "const": "up" + }, + "status": { + "const": "ok" + } + }, + "required": [ + "database", + "status" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/kiosk": { + "post": { + "operationId": "postKiosk", + "description": "Register a kiosk", + "tags": [ + "Kiosk" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "config": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "enabled": { + "type": "boolean" + }, + "kind": { + "enum": [ + "tv", + "navigator" + ], + "type": "string" + }, + "machineId": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "kind", + "machineId", + "name" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "appVersion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "config": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "kind": { + "type": "string" + }, + "lastSeenAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "lastSeenIp": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "machineId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "appVersion", + "config", + "createdAt", + "enabled", + "id", + "kind", + "lastSeenAt", + "lastSeenIp", + "machineId", + "name", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getKiosk", + "description": "List all kiosks", + "tags": [ + "Kiosk" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "appVersion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "config": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "kind": { + "type": "string" + }, + "lastSeenAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "lastSeenIp": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "machineId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "appVersion", + "config", + "createdAt", + "enabled", + "id", + "kind", + "lastSeenAt", + "lastSeenIp", + "machineId", + "name", + "updatedAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/kiosk/{id}": { + "delete": { + "operationId": "deleteKioskById", + "description": "Delete a kiosk", + "tags": [ + "Kiosk" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putKioskById", + "description": "Update a kiosk", + "tags": [ + "Kiosk" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "config": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "enabled": { + "type": "boolean" + }, + "kind": { + "enum": [ + "tv", + "navigator" + ], + "type": "string" + }, + "name": { + "type": "string", + "minLength": 1 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "appVersion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "config": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "enabled": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "kind": { + "type": "string" + }, + "lastSeenAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "lastSeenIp": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "machineId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "appVersion", + "config", + "createdAt", + "enabled", + "id", + "kind", + "lastSeenAt", + "lastSeenIp", + "machineId", + "name", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/kiosk/departures": { + "post": { + "operationId": "postKioskDepartures", + "description": "Next departure per configured group, trying each stop in order", + "tags": [ + "Kiosk" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string", + "minLength": 1 + }, + "stops": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "routeFilter": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ], + "default": null + }, + "stopId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "stopId" + ] + } + } + }, + "required": [ + "label", + "stops" + ] + } + } + }, + "required": [ + "groups" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "predictedDepartureTime": { + "type": "number" + }, + "routeShortDesc": { + "type": "string" + } + }, + "required": [ + "label", + "predictedDepartureTime", + "routeShortDesc" + ] + }, + { + "type": "null" + } + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/kiosk/heartbeat": { + "post": { + "operationId": "postKioskHeartbeat", + "description": "Record a kiosk heartbeat and report whether the box is registered and enabled", + "tags": [ + "Kiosk" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "appVersion": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "machineId": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + "required": [ + "appVersion", + "machineId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "properties": { + "registered": { + "const": false + } + }, + "required": [ + "registered" + ] + }, + { + "type": "object", + "properties": { + "enabled": { + "const": false + }, + "kiosk": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "kind": { + "enum": [ + "tv", + "navigator" + ], + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "kind", + "name" + ] + }, + "registered": { + "const": true + } + }, + "required": [ + "enabled", + "kiosk", + "registered" + ] + }, + { + "type": "object", + "properties": { + "enabled": { + "const": true + }, + "kiosk": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "kind": { + "enum": [ + "tv", + "navigator" + ], + "type": "string" + }, + "name": { + "type": "string" + }, + "config": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + } + }, + "required": [ + "id", + "kind", + "name", + "config" + ] + }, + "registered": { + "const": true + } + }, + "required": [ + "enabled", + "kiosk", + "registered" + ] + } + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/kiosk/news/{id}/image": { + "get": { + "operationId": "getKioskNewsByIdImage", + "description": "The image an announcement shows on the kiosk, as stored", + "tags": [ + "Kiosk" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string", + "contentMediaType": "*/*" + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/kiosk/news": { + "get": { + "operationId": "getKioskNews", + "description": "Active, titled, non-cohort-scoped announcements for the TV kiosk marquee", + "tags": [ + "Kiosk" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "highlighted": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "imageVersion": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "kioskIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "title": { + "type": "string" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "body", + "highlighted", + "id", + "imageVersion", + "kioskIds", + "title", + "validFrom", + "validUntil" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/kiosk/petrik-news": { + "get": { + "operationId": "getKioskPetrikNews", + "description": "petrik.hu news for the navigator kiosk, cached for ten minutes", + "tags": [ + "Kiosk" + ], + "parameters": [ + { + "name": "machine", + "in": "query", + "schema": { + "type": "string", + "minLength": 1 + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "imageUrl": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "publishedAt": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "body", + "imageUrl", + "publishedAt", + "title", + "url" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/kiosk/weather": { + "get": { + "operationId": "getKioskWeather", + "description": "Current weather for the TV kiosk, cached for ten minutes", + "tags": [ + "Kiosk" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "icon": { + "type": "string" + }, + "precipMm": { + "type": "number" + }, + "tempC": { + "type": "number" + }, + "windKph": { + "type": "number" + } + }, + "required": [ + "icon", + "precipMm", + "tempC", + "windKph" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/navigator/buildings": { + "post": { + "operationId": "postNavigatorBuildings", + "description": "Create a campus building", + "tags": [ + "Navigator" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "description", + "name", + "x", + "y" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "description", + "id", + "mapped", + "name", + "x", + "y" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNavigatorBuildings", + "description": "List the campus buildings", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "description", + "id", + "mapped", + "name", + "x", + "y" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/navigator/buildings/{id}": { + "delete": { + "operationId": "deleteNavigatorBuildingsById", + "description": "Delete a campus building; its corridors, lifts and stairs cascade with it, but rooms still assigned to it refuse the delete", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putNavigatorBuildingsById", + "description": "Update a campus building", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "description", + "id", + "mapped", + "name", + "x", + "y" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/classrooms": { + "post": { + "operationId": "postNavigatorClassrooms", + "description": "Create a classroom", + "tags": [ + "Navigator" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string", + "minLength": 1 + }, + "capacity": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "description": { + "type": "string" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "type": "string", + "minLength": 1 + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNavigatorClassrooms", + "description": "List the classrooms, including the ones the campus has not placed yet", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/navigator/classrooms/{id}": { + "delete": { + "operationId": "deleteNavigatorClassroomsById", + "description": "Delete a classroom; rooms the timetable still uses are refused", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putNavigatorClassroomsById", + "description": "Update a classroom", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string", + "minLength": 1 + }, + "capacity": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "description": { + "type": "string" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "type": "string", + "minLength": 1 + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/classroom-types": { + "post": { + "operationId": "postNavigatorClassroomTypes", + "description": "Create a classroom type", + "tags": [ + "Navigator" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "colorhex": { + "type": "string", + "pattern": "^#[0-9a-fA-F]{6}(?:[0-9a-fA-F]{2})?$" + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "colorhex", + "name" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "colorhex": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "colorhex", + "createdAt", + "id", + "name", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNavigatorClassroomTypes", + "description": "List the classroom types", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "colorhex": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "colorhex", + "createdAt", + "id", + "name", + "updatedAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/navigator/classroom-types/{id}": { + "delete": { + "operationId": "deleteNavigatorClassroomTypesById", + "description": "Delete a classroom type; types still assigned to a classroom are refused", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putNavigatorClassroomTypesById", + "description": "Update a classroom type", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "colorhex": { + "type": "string", + "pattern": "^#[0-9a-fA-F]{6}(?:[0-9a-fA-F]{2})?$" + }, + "name": { + "type": "string", + "minLength": 1 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "colorhex": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "colorhex", + "createdAt", + "id", + "name", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/corridors": { + "post": { + "operationId": "postNavigatorCorridors", + "description": "Create a corridor", + "tags": [ + "Navigator" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "barrier_free": { + "type": "boolean" + }, + "building_id": { + "type": "string", + "minLength": 1 + }, + "is_outdoor": { + "type": "boolean" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "width": { + "type": "number" + }, + "x1": { + "type": "number" + }, + "x2": { + "type": "number" + }, + "y1": { + "type": "number" + }, + "y2": { + "type": "number" + } + }, + "required": [ + "barrier_free", + "building_id", + "is_outdoor", + "name", + "storey", + "width", + "x1", + "x2", + "y1", + "y2" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "barrier_free": { + "type": "boolean" + }, + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "is_outdoor": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "width": { + "type": "number" + }, + "x1": { + "type": "number" + }, + "x2": { + "type": "number" + }, + "y1": { + "type": "number" + }, + "y2": { + "type": "number" + } + }, + "required": [ + "barrier_free", + "building_id", + "createdAt", + "id", + "is_outdoor", + "name", + "storey", + "updatedAt", + "width", + "x1", + "x2", + "y1", + "y2" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNavigatorCorridors", + "description": "List the corridors", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "barrier_free": { + "type": "boolean" + }, + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "is_outdoor": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "width": { + "type": "number" + }, + "x1": { + "type": "number" + }, + "x2": { + "type": "number" + }, + "y1": { + "type": "number" + }, + "y2": { + "type": "number" + } + }, + "required": [ + "barrier_free", + "building_id", + "createdAt", + "id", + "is_outdoor", + "name", + "storey", + "updatedAt", + "width", + "x1", + "x2", + "y1", + "y2" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/navigator/corridors/{id}": { + "delete": { + "operationId": "deleteNavigatorCorridorsById", + "description": "Delete a corridor", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putNavigatorCorridorsById", + "description": "Update a corridor", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "barrier_free": { + "type": "boolean" + }, + "building_id": { + "type": "string", + "minLength": 1 + }, + "is_outdoor": { + "type": "boolean" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "width": { + "type": "number" + }, + "x1": { + "type": "number" + }, + "x2": { + "type": "number" + }, + "y1": { + "type": "number" + }, + "y2": { + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "barrier_free": { + "type": "boolean" + }, + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "is_outdoor": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "width": { + "type": "number" + }, + "x1": { + "type": "number" + }, + "x2": { + "type": "number" + }, + "y1": { + "type": "number" + }, + "y2": { + "type": "number" + } + }, + "required": [ + "barrier_free", + "building_id", + "createdAt", + "id", + "is_outdoor", + "name", + "storey", + "updatedAt", + "width", + "x1", + "x2", + "y1", + "y2" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/export": { + "get": { + "operationId": "getNavigatorExport", + "description": "Export every navigator row (buildings, classroom types, classrooms, corridors, lifts, stairs and translations) as a versioned JSON payload.", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string", + "contentMediaType": "*/*" + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/graph": { + "get": { + "operationId": "getNavigatorGraph", + "description": "The whole campus graph in the upstream wire format, without a session. Only rows the campus has placed on the map appear.", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "buildings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "description", + "id", + "mapped", + "name", + "x", + "y" + ] + } + }, + "classroom_types": { + "type": "array", + "items": { + "type": "object", + "properties": { + "colorhex": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "colorhex", + "createdAt", + "id", + "name", + "updatedAt" + ] + } + }, + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + } + }, + "corridors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "barrier_free": { + "type": "boolean" + }, + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "is_outdoor": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "width": { + "type": "number" + }, + "x1": { + "type": "number" + }, + "x2": { + "type": "number" + }, + "y1": { + "type": "number" + }, + "y2": { + "type": "number" + } + }, + "required": [ + "barrier_free", + "building_id", + "createdAt", + "id", + "is_outdoor", + "name", + "storey", + "updatedAt", + "width", + "x1", + "x2", + "y1", + "y2" + ] + } + }, + "lifts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "createdAt", + "id", + "max_storey", + "min_storey", + "name", + "updatedAt", + "x", + "y" + ] + } + }, + "stairs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "createdAt", + "id", + "max_storey", + "min_storey", + "name", + "rotation", + "updatedAt", + "x", + "y" + ] + } + } + }, + "required": [ + "buildings", + "classroom_types", + "classrooms", + "corridors", + "lifts", + "stairs" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/navigator/import": { + "post": { + "operationId": "postNavigatorImport", + "description": "Insert or update every collection in a navigator export payload by its key, inside one transaction. Rows absent from the payload are never deleted.", + "tags": [ + "Navigator" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "*/*" + } + }, + "required": [ + "file" + ] + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "*/*" + } + }, + "required": [ + "file" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "buildings": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classrooms": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classroomTypes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "corridors": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "lifts": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stairs": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "translations": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "buildings", + "classrooms", + "classroomTypes", + "corridors", + "lifts", + "stairs", + "translations" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/lifts": { + "post": { + "operationId": "postNavigatorLifts", + "description": "Create a lift", + "tags": [ + "Navigator" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string", + "minLength": 1 + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "max_storey", + "min_storey", + "name", + "x", + "y" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "createdAt", + "id", + "max_storey", + "min_storey", + "name", + "updatedAt", + "x", + "y" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNavigatorLifts", + "description": "List the lifts", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "createdAt", + "id", + "max_storey", + "min_storey", + "name", + "updatedAt", + "x", + "y" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/navigator/lifts/{id}": { + "delete": { + "operationId": "deleteNavigatorLiftsById", + "description": "Delete a lift", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putNavigatorLiftsById", + "description": "Update a lift", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string", + "minLength": 1 + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "createdAt", + "id", + "max_storey", + "min_storey", + "name", + "updatedAt", + "x", + "y" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/stairs": { + "post": { + "operationId": "postNavigatorStairs", + "description": "Create a staircase", + "tags": [ + "Navigator" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string", + "minLength": 1 + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "rotation": { + "type": "number" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "max_storey", + "min_storey", + "name", + "rotation", + "x", + "y" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "createdAt", + "id", + "max_storey", + "min_storey", + "name", + "rotation", + "updatedAt", + "x", + "y" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNavigatorStairs", + "description": "List the staircases", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "createdAt", + "id", + "max_storey", + "min_storey", + "name", + "rotation", + "updatedAt", + "x", + "y" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/navigator/stairs/{id}": { + "delete": { + "operationId": "deleteNavigatorStairsById", + "description": "Delete a staircase", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putNavigatorStairsById", + "description": "Update a staircase", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string", + "minLength": 1 + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "rotation": { + "type": "number" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string" + }, + "max_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "min_storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "createdAt", + "id", + "max_storey", + "min_storey", + "name", + "rotation", + "updatedAt", + "x", + "y" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/translations/available": { + "get": { + "operationId": "getNavigatorTranslationsAvailable", + "description": "List the languages the campus translations exist in", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/navigator/translations": { + "post": { + "operationId": "postNavigatorTranslations", + "description": "Create or replace one codename across every given language", + "tags": [ + "Navigator" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "text_key": { + "type": "string", + "minLength": 1 + }, + "translations": { + "type": "object", + "propertyNames": { + "type": "string", + "minLength": 2, + "maxLength": 10 + }, + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "text_key", + "translations" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lang_key": { + "type": "string" + }, + "text": { + "type": "string" + }, + "text_key": { + "type": "string" + } + }, + "required": [ + "lang_key", + "text", + "text_key" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNavigatorTranslations", + "description": "List every translation row", + "tags": [ + "Navigator" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lang_key": { + "type": "string" + }, + "text": { + "type": "string" + }, + "text_key": { + "type": "string" + } + }, + "required": [ + "lang_key", + "text", + "text_key" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/translations/{lang}/{key}": { + "delete": { + "operationId": "deleteNavigatorTranslationsByLangByKey", + "description": "Delete one codename in one language", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "lang", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 2, + "maxLength": 10 + } + }, + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putNavigatorTranslationsByLangByKey", + "description": "Write the text of one codename in one language", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "lang", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 2, + "maxLength": 10 + } + }, + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": [ + "text" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lang_key": { + "type": "string" + }, + "text": { + "type": "string" + }, + "text_key": { + "type": "string" + } + }, + "required": [ + "lang_key", + "text", + "text_key" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/navigator/translations/lang": { + "get": { + "operationId": "getNavigatorTranslationsLang", + "description": "One language as a flat `text_key -> text` bundle, without a session", + "tags": [ + "Navigator" + ], + "parameters": [ + { + "name": "lang", + "in": "query", + "required": true, + "schema": { + "type": "string", + "minLength": 2, + "maxLength": 10 + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/news/announcements": { + "post": { + "operationId": "postNewsAnnouncements", + "description": "Create a new announcement", + "tags": [ + "News / Announcements" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "type": { + "type": "string" + } + }, + "required": [ + "content", + "type" + ] + } + }, + "highlighted": { + "type": "boolean" + }, + "kioskIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "kioskOnly": { + "type": "boolean" + }, + "title": { + "type": "string", + "minLength": 1 + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "content", + "validFrom", + "validUntil" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "highlighted": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "imageByteSize": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "imageContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageUpdatedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "kioskOnly": { + "type": "boolean" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "kioskIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "highlighted", + "id", + "imageByteSize", + "imageContentType", + "imageKey", + "imageUpdatedAt", + "kioskOnly", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds", + "kioskIds" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNewsAnnouncements", + "description": "List active announcements within date range, cohort-filtered by default; includeAll=true returns everything", + "tags": [ + "News / Announcements" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "includeAll", + "in": "query", + "schema": { + "type": "string", + "default": false + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "includeExpired", + "in": "query", + "schema": { + "type": "string", + "default": false + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "includeKioskOnly", + "in": "query", + "schema": { + "type": "string", + "default": false + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "highlighted": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "imageByteSize": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "imageContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageUpdatedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "kioskOnly": { + "type": "boolean" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "kioskIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "image", + "name" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "highlighted", + "id", + "imageByteSize", + "imageContentType", + "imageKey", + "imageUpdatedAt", + "kioskOnly", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds", + "kioskIds" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/news/announcements/{id}": { + "delete": { + "operationId": "deleteNewsAnnouncementsById", + "description": "Delete an announcement", + "tags": [ + "News / Announcements" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNewsAnnouncementsById", + "description": "Get a single announcement by ID", + "tags": [ + "News / Announcements" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "highlighted": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "imageByteSize": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "imageContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageUpdatedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "kioskOnly": { + "type": "boolean" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "kioskIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "image", + "name" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "highlighted", + "id", + "imageByteSize", + "imageContentType", + "imageKey", + "imageUpdatedAt", + "kioskOnly", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds", + "kioskIds" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "patch": { + "operationId": "patchNewsAnnouncementsById", + "description": "Update an existing announcement", + "tags": [ + "News / Announcements" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "type": { + "type": "string" + } + }, + "required": [ + "content", + "type" + ] + } + }, + "highlighted": { + "type": "boolean" + }, + "kioskIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "kioskOnly": { + "type": "boolean" + }, + "title": { + "type": "string", + "minLength": 1 + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "highlighted": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "imageByteSize": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "imageContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageUpdatedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "kioskOnly": { + "type": "boolean" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "kioskIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "highlighted", + "id", + "imageByteSize", + "imageContentType", + "imageKey", + "imageUpdatedAt", + "kioskOnly", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds", + "kioskIds" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/news/announcements/{id}/image": { + "delete": { + "operationId": "deleteNewsAnnouncementsByIdImage", + "description": "Delete the image attached to an announcement", + "tags": [ + "News / Announcements" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "highlighted": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "imageByteSize": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "imageContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageUpdatedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "kioskOnly": { + "type": "boolean" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "kioskIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "highlighted", + "id", + "imageByteSize", + "imageContentType", + "imageKey", + "imageUpdatedAt", + "kioskOnly", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds", + "kioskIds" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "post": { + "operationId": "postNewsAnnouncementsByIdImage", + "description": "Upload the image this announcement shows on the kiosk", + "tags": [ + "News / Announcements" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "*/*" + } + }, + "required": [ + "file" + ] + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "*/*" + } + }, + "required": [ + "file" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "highlighted": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "imageByteSize": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "imageContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageKey": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "imageUpdatedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "kioskOnly": { + "type": "boolean" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "kioskIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "highlighted", + "id", + "imageByteSize", + "imageContentType", + "imageKey", + "imageUpdatedAt", + "kioskOnly", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds", + "kioskIds" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/news/blogs": { + "post": { + "operationId": "postNewsBlogs", + "description": "Create a new blog post (defaults to draft)", + "tags": [ + "News / Blogs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "type": { + "type": "string" + } + }, + "required": [ + "content", + "type" + ] + } + }, + "slug": { + "type": "string", + "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "status": { + "enum": [ + "draft", + "published" + ], + "type": "string", + "default": "draft" + }, + "title": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "content", + "title" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "publishedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "publishedAt", + "slug", + "status", + "title", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNewsBlogs", + "description": "List published blog posts (public, no auth required)", + "tags": [ + "News / Blogs" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "publishedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "image", + "name" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "publishedAt", + "slug", + "status", + "title", + "updatedAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/news/blogs/{id}": { + "delete": { + "operationId": "deleteNewsBlogsById", + "description": "Delete a blog post", + "tags": [ + "News / Blogs" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "patch": { + "operationId": "patchNewsBlogsById", + "description": "Update a blog post", + "tags": [ + "News / Blogs" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "type": { + "type": "string" + } + }, + "required": [ + "content", + "type" + ] + } + }, + "slug": { + "type": "string", + "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "title": { + "type": "string", + "minLength": 1 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "publishedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "publishedAt", + "slug", + "status", + "title", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/news/blogs/drafts": { + "get": { + "operationId": "getNewsBlogsDrafts", + "description": "List all blog posts including drafts (requires permission)", + "tags": [ + "News / Blogs" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "publishedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "image", + "name" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "publishedAt", + "slug", + "status", + "title", + "updatedAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/news/blogs/{slug}": { + "get": { + "operationId": "getNewsBlogsBySlug", + "description": "Get a published blog post by slug (public, no auth required)", + "tags": [ + "News / Blogs" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "publishedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "image", + "name" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "publishedAt", + "slug", + "status", + "title", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/news/blogs/id/{id}": { + "get": { + "operationId": "getNewsBlogsIdById", + "description": "Get any blog post by ID including drafts (requires permission)", + "tags": [ + "News / Blogs" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "publishedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "image", + "name" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "publishedAt", + "slug", + "status", + "title", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/news/blogs/{id}/publish": { + "post": { + "operationId": "postNewsBlogsByIdPublish", + "description": "Publish a blog post (draft → published)", + "tags": [ + "News / Blogs" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "publishedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "publishedAt", + "slug", + "status", + "title", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/news/blogs/{id}/unpublish": { + "post": { + "operationId": "postNewsBlogsByIdUnpublish", + "description": "Unpublish a blog post (published → draft)", + "tags": [ + "News / Blogs" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "publishedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "slug": { + "type": "string" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "publishedAt", + "slug", + "status", + "title", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/news/system-messages": { + "post": { + "operationId": "postNewsSystemMessages", + "description": "Create a new system message", + "tags": [ + "News / System Messages" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "type": { + "type": "string" + } + }, + "required": [ + "content", + "type" + ] + } + }, + "title": { + "type": "string", + "minLength": 1 + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "content", + "title", + "validFrom", + "validUntil" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNewsSystemMessages", + "description": "List active system messages within date range, filtered by user cohort", + "tags": [ + "News / System Messages" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "includeAll", + "in": "query", + "schema": { + "type": "string", + "default": false + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "includeExpired", + "in": "query", + "schema": { + "type": "string", + "default": false + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "includeKioskOnly", + "in": "query", + "schema": { + "type": "string", + "default": false + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "image", + "name" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/news/system-messages/{id}": { + "delete": { + "operationId": "deleteNewsSystemMessagesById", + "description": "Delete a system message", + "tags": [ + "News / System Messages" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getNewsSystemMessagesById", + "description": "Get a single system message by ID", + "tags": [ + "News / System Messages" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "author": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "image", + "name" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + }, + "patch": { + "operationId": "patchNewsSystemMessagesById", + "description": "Update an existing system message", + "tags": [ + "News / System Messages" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "type": { + "type": "string" + } + }, + "required": [ + "content", + "type" + ] + } + }, + "title": { + "type": "string", + "minLength": 1 + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "format": "uuid" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + ] + } + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "title": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validUntil": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "cohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "authorId", + "content", + "createdAt", + "id", + "title", + "updatedAt", + "validFrom", + "validUntil", + "cohortIds" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications/fcm-tokens": { + "post": { + "operationId": "postNotificationsFcmTokens", + "description": "Register a push (FCM) token for the signed-in user", + "tags": [ + "Notifications" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deviceInfo": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "required": [ + "token" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "const": true + } + }, + "required": [ + "ok" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications/fcm-tokens/{token}": { + "delete": { + "operationId": "deleteNotificationsFcmTokensByToken", + "description": "Unregister a push (FCM) token", + "tags": [ + "Notifications" + ], + "parameters": [ + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "const": true + } + }, + "required": [ + "ok" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications": { + "get": { + "operationId": "getNotifications", + "description": "List the signed-in user's notifications", + "tags": [ + "Notifications" + ], + "parameters": [ + { + "name": "dateFrom", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "dateTo", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "number", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "number", + "minimum": 0, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "unread", + "in": "query", + "schema": { + "enum": [ + "true", + "false" + ], + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "metadata": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + { + "type": "null" + } + ] + }, + "read": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "userId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "content", + "createdAt", + "id", + "metadata", + "read", + "title", + "type", + "userId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications/read-all": { + "post": { + "operationId": "postNotificationsReadAll", + "description": "Mark every notification of the signed-in user as read", + "tags": [ + "Notifications" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "const": true + } + }, + "required": [ + "ok" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications/{id}/read": { + "post": { + "operationId": "postNotificationsByIdRead", + "description": "Mark one notification as read", + "tags": [ + "Notifications" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "metadata": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + { + "type": "null" + } + ] + }, + "read": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "userId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "content", + "createdAt", + "id", + "metadata", + "read", + "title", + "type", + "userId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications/test/preview": { + "post": { + "operationId": "postNotificationsTestPreview", + "description": "Development helper: render a notification template without sending it (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS)", + "tags": [ + "Notifications" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "language": { + "enum": [ + "en", + "hu" + ], + "type": "string" + }, + "subject": { + "type": "string" + }, + "type": { + "enum": [ + "substitution", + "substitution_teacher", + "moved_lesson", + "announcement", + "system_message", + "blog_post", + "doorlock_card_used", + "cohort_reselection_required", + "test" + ], + "type": "string" + } + }, + "required": [ + "type" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "html": { + "type": "string" + } + }, + "required": [ + "html" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications/test/send": { + "post": { + "operationId": "postNotificationsTestSend", + "description": "Development helper: send a test message over email, in-app and/or push (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS)", + "tags": [ + "Notifications" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "channels": { + "type": "object", + "properties": { + "email": { + "type": "boolean", + "default": false + }, + "inApp": { + "type": "boolean", + "default": false + }, + "push": { + "type": "boolean", + "default": false + } + } + }, + "content": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "language": { + "enum": [ + "en", + "hu" + ], + "type": "string" + }, + "subject": { + "type": "string" + }, + "type": { + "enum": [ + "substitution", + "substitution_teacher", + "moved_lesson", + "announcement", + "system_message", + "blog_post", + "doorlock_card_used", + "cohort_reselection_required", + "test" + ], + "type": "string" + } + }, + "required": [ + "channels", + "type" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "boolean" + }, + "inApp": { + "type": "boolean" + }, + "push": { + "type": "boolean" + } + }, + "required": [ + "email", + "inApp", + "push" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications/settings": { + "get": { + "operationId": "getNotificationsSettings", + "description": "Read the notification preferences of the signed-in user", + "tags": [ + "Notifications" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "language": { + "type": "string" + }, + "notificationPreferences": { + "type": "object", + "properties": { + "announcement": { + "type": "boolean" + }, + "blogPost": { + "type": "boolean" + }, + "channelsEnabled": { + "type": "boolean" + }, + "doorlockCardUsed": { + "type": "boolean" + }, + "movedLesson": { + "type": "boolean" + }, + "substitution": { + "type": "boolean" + }, + "systemMessage": { + "type": "boolean" + } + }, + "required": [ + "announcement", + "blogPost", + "channelsEnabled", + "doorlockCardUsed", + "movedLesson", + "substitution", + "systemMessage" + ] + }, + "theme": { + "type": "string" + }, + "timetableClassColors": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "number" + } + }, + "timetableGroupDisplay": { + "type": "string" + }, + "timetableView": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "createdAt", + "id", + "language", + "notificationPreferences", + "theme", + "timetableClassColors", + "timetableGroupDisplay", + "timetableView", + "updatedAt", + "userId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "patch": { + "operationId": "patchNotificationsSettings", + "description": "Update the notification preferences of the signed-in user", + "tags": [ + "Notifications" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "notificationPreferences": { + "type": "object", + "properties": { + "announcement": { + "type": "boolean" + }, + "blogPost": { + "type": "boolean" + }, + "channelsEnabled": { + "type": "boolean" + }, + "doorlockCardUsed": { + "type": "boolean" + }, + "movedLesson": { + "type": "boolean" + }, + "substitution": { + "type": "boolean" + }, + "systemMessage": { + "type": "boolean" + } + } + }, + "theme": { + "type": "string" + }, + "timetableClassColors": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "number" + } + }, + "timetableGroupDisplay": { + "enum": [ + "highlight", + "hide" + ], + "type": "string" + }, + "timetableView": { + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "language": { + "type": "string" + }, + "notificationPreferences": { + "type": "object", + "properties": { + "announcement": { + "type": "boolean" + }, + "blogPost": { + "type": "boolean" + }, + "channelsEnabled": { + "type": "boolean" + }, + "doorlockCardUsed": { + "type": "boolean" + }, + "movedLesson": { + "type": "boolean" + }, + "substitution": { + "type": "boolean" + }, + "systemMessage": { + "type": "boolean" + } + }, + "required": [ + "announcement", + "blogPost", + "channelsEnabled", + "doorlockCardUsed", + "movedLesson", + "substitution", + "systemMessage" + ] + }, + "theme": { + "type": "string" + }, + "timetableClassColors": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "number" + } + }, + "timetableGroupDisplay": { + "type": "string" + }, + "timetableView": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "createdAt", + "id", + "language", + "notificationPreferences", + "theme", + "timetableClassColors", + "timetableGroupDisplay", + "timetableView", + "updatedAt", + "userId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications/test": { + "post": { + "operationId": "postNotificationsTest", + "description": "Development helper: drop a test notification into the caller's own inbox (needs CHRONOS_ENABLE_TEST_NOTIFICATIONS)", + "tags": [ + "Notifications" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "metadata": { + "anyOf": [ + { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + { + "type": "null" + } + ] + }, + "read": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "userId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "content", + "createdAt", + "id", + "metadata", + "read", + "title", + "type", + "userId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/notifications/unread-count": { + "get": { + "operationId": "getNotificationsUnreadCount", + "description": "Count the signed-in user's unread notifications", + "tags": [ + "Notifications" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/ping": { + "get": { + "operationId": "getPing", + "description": "Health check endpoint that returns a pong response.", + "tags": [ + "Ping" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/ping/uptime": { + "get": { + "operationId": "getPingUptime", + "description": "Get the uptime.", + "tags": [ + "Ping" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pretty": { + "type": "string" + }, + "uptime_ms": { + "type": "number" + } + }, + "required": [ + "pretty", + "uptime_ms" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/roles": { + "post": { + "operationId": "postRoles", + "description": "Create a new role", + "tags": [ + "Roles" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "maxLength": 50, + "pattern": "^[a-z0-9_-]+$" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "can": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + } + }, + "required": [ + "can", + "name" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getRoles", + "description": "List all roles with their permissions", + "tags": [ + "Roles" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "can": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + } + }, + "required": [ + "can", + "name" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/roles/{name}": { + "delete": { + "operationId": "deleteRolesByName", + "description": "Delete a role", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "const": true + } + }, + "required": [ + "ok" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "patch": { + "operationId": "patchRolesByName", + "description": "Update permissions for a role", + "tags": [ + "Roles" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "permissions" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "can": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + } + }, + "required": [ + "can", + "name" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/roles/permissions": { + "get": { + "operationId": "getRolesPermissions", + "description": "List all known permissions registered by the application", + "tags": [ + "Roles" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/timetables/cleanup-orphaned-cohorts": { + "post": { + "operationId": "postTimetableTimetablesCleanupOrphanedCohorts", + "description": "Delete all cohorts that are no longer linked to any timetable (orphaned) and all teachers that are not assigned to any lesson. Users referencing those cohorts will have their cohortId nullified. Teachers still referenced by cohorts, cohort groups, or substitutions are kept.", + "tags": [ + "Timetable" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "affectedUserCount": { + "type": "number" + }, + "deletedCohortIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "deletedTeacherIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "affectedUserCount", + "deletedCohortIds", + "deletedTeacherIds" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/timetables/{id}": { + "delete": { + "operationId": "deleteTimetableTimetablesById", + "description": "Delete a timetable and all its related data, including orphaned cohorts.", + "tags": [ + "Timetable" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "patch": { + "operationId": "patchTimetableTimetablesById", + "description": "Update a timetable validity dates.", + "tags": [ + "Timetable" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "validFrom": { + "type": "string" + }, + "validTo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "validTo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "createdAt", + "id", + "name", + "updatedAt", + "validFrom", + "validTo" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/timetables/latestValid": { + "get": { + "operationId": "getTimetableTimetablesLatestValid", + "description": "Get the latest valid timetable.", + "tags": [ + "Timetable" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "validTo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "createdAt", + "id", + "name", + "updatedAt", + "validFrom", + "validTo" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/timetables": { + "get": { + "operationId": "getTimetableTimetables", + "description": "Get all timetables from the database.", + "tags": [ + "Timetable" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "validTo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "createdAt", + "id", + "name", + "updatedAt", + "validFrom", + "validTo" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/timetables/{id}/preview-delete": { + "get": { + "operationId": "getTimetableTimetablesByIdPreviewDelete", + "description": "Preview the impact of deleting a timetable. Orphaned cohorts will be deleted along with the timetable.", + "tags": [ + "Timetable" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "becomesOrphaned": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "becomesOrphaned", + "id", + "name" + ] + } + }, + "isCurrentTimetable": { + "type": "boolean" + }, + "targetTimetable": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + { + "type": "null" + } + ] + }, + "totals": { + "type": "object", + "properties": { + "danglingUsersCleaned": { + "type": "number" + }, + "lessonsDeleted": { + "type": "number" + }, + "movedLessonsDeleted": { + "type": "number" + }, + "orphanedCohorts": { + "type": "number" + }, + "substitutionsDeleted": { + "type": "number" + }, + "survivingCohorts": { + "type": "number" + } + }, + "required": [ + "danglingUsersCleaned", + "lessonsDeleted", + "movedLessonsDeleted", + "orphanedCohorts", + "substitutionsDeleted", + "survivingCohorts" + ] + } + }, + "required": [ + "cohorts", + "isCurrentTimetable", + "targetTimetable", + "totals" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/timetables/valid": { + "get": { + "operationId": "getTimetableTimetablesValid", + "description": "Get all the latest valid timetables.", + "tags": [ + "Timetable" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "validFrom": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "validTo": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "createdAt", + "id", + "name", + "updatedAt", + "validFrom", + "validTo" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/import": { + "post": { + "operationId": "postTimetableImport", + "description": "Import a timetable from an Oman or aSc 2012 XML file.", + "tags": [ + "Timetable", + "Import" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "*/*" + }, + "name": { + "type": "string" + }, + "validFrom": { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}$" + }, + "validTo": { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}$" + } + }, + "required": [ + "file", + "name", + "validFrom" + ] + } + }, + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "contentMediaType": "*/*" + }, + "name": { + "type": "string" + }, + "validFrom": { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}$" + }, + "validTo": { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}$" + } + }, + "required": [ + "file", + "name", + "validFrom" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ok": { + "const": true + } + }, + "required": [ + "ok" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/classrooms/getAll": { + "get": { + "operationId": "getTimetableClassroomsGetAll", + "description": "Get all classrooms from the database.", + "tags": [ + "Classroom" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "building_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/classrooms/getAvailable": { + "get": { + "operationId": "getTimetableClassroomsGetAvailable", + "description": "Get classrooms that are free for a given date, day and period.", + "tags": [ + "Classroom" + ], + "parameters": [ + { + "name": "date", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "startingDay", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "startingPeriod", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "timetableId", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "building_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/cohorts/getAllForTimetable/{timetableId}": { + "get": { + "operationId": "getTimetableCohortsGetAllForTimetableByTimetableId", + "description": "Get cohorts for a given timetable from the database.", + "tags": [ + "Cohort" + ], + "parameters": [ + { + "name": "timetableId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classroomIds": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "teacherId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "timetableId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "classroomIds", + "id", + "name", + "short", + "teacherId", + "timetableId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/groups/getForCohort/{cohortId}": { + "get": { + "operationId": "getTimetableGroupsGetForCohortByCohortId", + "description": "Get the groups of a cohort, marking the current user selection.", + "tags": [ + "Group" + ], + "parameters": [ + { + "name": "cohortId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionLabel": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "selected": { + "type": "boolean" + }, + "studentCount": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "teacherId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "divisionLabel", + "divisionTag", + "entireClass", + "id", + "name", + "selected", + "studentCount", + "teacherId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/groups/select": { + "post": { + "operationId": "postTimetableGroupsSelect", + "description": "Select the group the current user belongs to for a division. Replaces any previous membership in that division.", + "tags": [ + "Group" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "groupId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "groupId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "selectedGroupId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "divisionTag", + "selectedGroupId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/periods/getAll": { + "get": { + "operationId": "getTimetablePeriodsGetAll", + "description": "Get all period definitions used in a given timetable, sorted by period number.", + "tags": [ + "Period" + ], + "parameters": [ + { + "name": "timetableId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/subjects": { + "get": { + "operationId": "getTimetableSubjects", + "description": "Get all subjects from the database.", + "tags": [ + "Subject" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "id", + "name", + "short", + "updatedAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/teachers/getAll": { + "get": { + "operationId": "getTimetableTeachersGetAll", + "description": "Get all teachers from the database.", + "tags": [ + "Teacher" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastName": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "firstName", + "id", + "lastName", + "short" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/teachers": { + "get": { + "operationId": "getTimetableTeachers", + "description": "List all teachers with their email and linked user.", + "tags": [ + "Teacher" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email": { + "anyOf": [ + { + "type": "string", + "format": "email" + }, + { + "type": "null" + } + ] + }, + "firstName": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastName": { + "type": "string" + }, + "short": { + "type": "string" + }, + "user": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "email", + "id", + "name" + ] + }, + { + "type": "null" + } + ] + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "firstName", + "id", + "lastName", + "short", + "user", + "userId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/teachers/me": { + "get": { + "operationId": "getTimetableTeachersMe", + "description": "Get the signed-in user's linked teacher, if any.", + "tags": [ + "Teacher" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastName": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "firstName", + "id", + "lastName", + "short" + ] + }, + { + "type": "null" + } + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/teachers/{id}": { + "patch": { + "operationId": "patchTimetableTeachersById", + "description": "Update a teacher email and/or linked user.", + "tags": [ + "Teacher" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "anyOf": [ + { + "type": "string", + "format": "email" + }, + { + "type": "null" + } + ] + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "anyOf": [ + { + "type": "string", + "format": "email" + }, + { + "type": "null" + } + ] + }, + "firstName": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastName": { + "type": "string" + }, + "short": { + "type": "string" + }, + "user": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "email", + "id", + "name" + ] + }, + { + "type": "null" + } + ] + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "firstName", + "id", + "lastName", + "short", + "user", + "userId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/lessons/getForCohort/{cohortId}": { + "get": { + "operationId": "getTimetableLessonsGetForCohortByCohortId", + "description": "Get lessons for a given cohort from the database.", + "tags": [ + "Lesson" + ], + "parameters": [ + { + "name": "cohortId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "timetableId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/lessons/getForId/{lessonId}": { + "get": { + "operationId": "getTimetableLessonsGetForIdByLessonId", + "description": "Get a lesson by its ID from the database.", + "tags": [ + "Lesson" + ], + "parameters": [ + { + "name": "lessonId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + }, + "substitutionCohortName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId", + "substitutionCohortName" + ] + }, + { + "type": "null" + } + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/lessons/getForRoom/{classroomId}": { + "get": { + "operationId": "getTimetableLessonsGetForRoomByClassroomId", + "description": "Get lessons for a given classroom from the database.", + "tags": [ + "Lesson" + ], + "parameters": [ + { + "name": "classroomId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "timetableId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/lessons/getForTeacher/{teacherId}": { + "get": { + "operationId": "getTimetableLessonsGetForTeacherByTeacherId", + "description": "Get lessons for a given teacher from the database.", + "tags": [ + "Lesson" + ], + "parameters": [ + { + "name": "teacherId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "timetableId", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/lessons/getForTeachers": { + "post": { + "operationId": "postTimetableLessonsGetForTeachers", + "description": "Get lessons for multiple teachers in a single request.", + "tags": [ + "Lesson" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "teacherIds": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "teacherIds" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "teacherId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "lessons", + "teacherId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/lessons/getSubstitutionCandidates": { + "post": { + "operationId": "postTimetableLessonsGetSubstitutionCandidates", + "description": "Get available lessons and substitute teacher candidates for substitution editing in one request.", + "tags": [ + "Lesson" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "missingTeacherId": { + "type": "string", + "format": "uuid" + }, + "selectedLessonIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "default": [] + }, + "teacherIds": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "date", + "missingTeacherId", + "teacherIds" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "availableLessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "parallelLessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "substituteCandidates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hasH1": { + "type": "boolean" + }, + "hasH2": { + "type": "boolean" + }, + "teacher": { + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastName": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "firstName", + "id", + "lastName", + "short" + ] + } + }, + "required": [ + "hasH1", + "hasH2", + "teacher" + ] + } + } + }, + "required": [ + "availableLessons", + "parallelLessons", + "substituteCandidates" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/substitutions": { + "post": { + "operationId": "postTimetableSubstitutions", + "description": "Create a new substitution", + "tags": [ + "Substitution" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "lessonIds": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + }, + "substituter": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "date", + "lessonIds" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "substituter": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "substituter" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getTimetableSubstitutions", + "description": "Get all substitutions from the database.", + "tags": [ + "Substitution" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "substitution": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "substituter": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "substituter" + ] + }, + "teacher": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "firstName": { + "type": "string" + }, + "gender": { + "anyOf": [ + { + "type": "string", + "maxLength": 1, + "pattern": "^[01]+$" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastName": { + "type": "string" + }, + "short": { + "type": "string" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "firstName", + "gender", + "id", + "lastName", + "short", + "userId" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "lessons", + "substitution", + "teacher" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/substitutions/{id}": { + "delete": { + "operationId": "deleteTimetableSubstitutionsById", + "description": "Delete a substitution", + "tags": [ + "Substitution" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putTimetableSubstitutionsById", + "description": "Update a substitution", + "tags": [ + "Substitution" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "lessonIds": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + { + "type": "null" + } + ] + }, + "substituter": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "lessonIds" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "substituter": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "substituter" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/substitutions/export": { + "get": { + "operationId": "getTimetableSubstitutionsExport", + "description": "Export substitutions as a CSV file over an optional date range.", + "tags": [ + "Substitution" + ], + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "format": "date" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "format": "date" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string", + "contentMediaType": "*/*" + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/substitutions/manual": { + "post": { + "operationId": "postTimetableSubstitutionsManual", + "description": "Create a substitution manually by specifying the teacher, lesson time, subject and cohort directly.", + "tags": [ + "Substitution" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cohortId": { + "type": "string", + "format": "uuid" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "periodId": { + "type": "string", + "format": "uuid" + }, + "subjectId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "substituter": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "teacherId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "cohortId", + "date", + "periodId", + "subjectId", + "substituter", + "teacherId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "substituter": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "substituter" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/substitutions/relevant": { + "get": { + "operationId": "getTimetableSubstitutionsRelevant", + "description": "Get relevant substitutions from the database.", + "tags": [ + "Substitution" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lessons": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "substitution": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "substituter": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "substituter" + ] + }, + "teacher": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "firstName": { + "type": "string" + }, + "gender": { + "anyOf": [ + { + "type": "string", + "maxLength": 1, + "pattern": "^[01]+$" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastName": { + "type": "string" + }, + "short": { + "type": "string" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "firstName", + "gender", + "id", + "lastName", + "short", + "userId" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "lessons", + "substitution", + "teacher" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/substitutions/cohort/{cohortId}": { + "get": { + "operationId": "getTimetableSubstitutionsCohortByCohortId", + "description": "Get relevant substitutions for a given cohort from the database.", + "tags": [ + "Substitution" + ], + "parameters": [ + { + "name": "cohortId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cohortId": { + "type": "string", + "format": "uuid" + }, + "substitutions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lessons": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "substitution": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "substituter": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "substituter" + ] + }, + "teacher": { + "anyOf": [ + { + "type": "object", + "properties": { + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "firstName": { + "type": "string" + }, + "gender": { + "anyOf": [ + { + "type": "string", + "maxLength": 1, + "pattern": "^[01]+$" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastName": { + "type": "string" + }, + "short": { + "type": "string" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "email", + "firstName", + "gender", + "id", + "lastName", + "short", + "userId" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "lessons", + "substitution", + "teacher" + ] + } + } + }, + "required": [ + "cohortId", + "substitutions" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/movedLessons": { + "post": { + "operationId": "postTimetableMovedLessons", + "description": "Create a moved lesson.", + "tags": [ + "Moved Lesson" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "lessonIds": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + }, + "room": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "startingDay": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "startingPeriod": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "date", + "lessonIds" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "room": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "startingDay": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "startingPeriod": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "room", + "startingDay", + "startingPeriod" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getTimetableMovedLessons", + "description": "Get all moved lessons.", + "tags": [ + "Moved Lesson" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classroom": { + "anyOf": [ + { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + }, + { + "type": "null" + } + ] + }, + "dayDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + { + "type": "null" + } + ] + }, + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "movedLesson": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "room": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "startingDay": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "startingPeriod": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "room", + "startingDay", + "startingPeriod" + ] + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startTime": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "endTime", + "id", + "period", + "startTime", + "updatedAt" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "classroom", + "dayDefinition", + "lessons", + "movedLesson", + "period" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/movedLessons/{id}": { + "delete": { + "operationId": "deleteTimetableMovedLessonsById", + "description": "Delete a moved lesson", + "tags": [ + "Moved Lesson" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putTimetableMovedLessonsById", + "description": "Update a moved lesson.", + "tags": [ + "Moved Lesson" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "lessonIds": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "format": "uuid" + } + }, + "room": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "startingDay": { + "type": "string", + "format": "uuid" + }, + "startingPeriod": { + "type": "string", + "format": "uuid" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "room": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "startingDay": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "startingPeriod": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "room", + "startingDay", + "startingPeriod" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/movedLessons/export": { + "get": { + "operationId": "getTimetableMovedLessonsExport", + "description": "Export moved lessons as a CSV file over an optional date range.", + "tags": [ + "Moved Lesson" + ], + "parameters": [ + { + "name": "from", + "in": "query", + "schema": { + "type": "string", + "format": "date" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "to", + "in": "query", + "schema": { + "type": "string", + "format": "date" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string", + "contentMediaType": "*/*" + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/timetable/movedLessons/cohort/{cohortId}": { + "get": { + "operationId": "getTimetableMovedLessonsCohortByCohortId", + "description": "Get all moved lessons for a cohort.", + "tags": [ + "Moved Lesson" + ], + "parameters": [ + { + "name": "cohortId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classroom": { + "anyOf": [ + { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + }, + { + "type": "null" + } + ] + }, + "dayDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + { + "type": "null" + } + ] + }, + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "movedLesson": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "room": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "startingDay": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "startingPeriod": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "room", + "startingDay", + "startingPeriod" + ] + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startTime": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "endTime", + "id", + "period", + "startTime", + "updatedAt" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "classroom", + "dayDefinition", + "lessons", + "movedLesson", + "period" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/movedLessons/relevant": { + "get": { + "operationId": "getTimetableMovedLessonsRelevant", + "description": "Get relevant moved lessons for the active timetable.", + "tags": [ + "Moved Lesson" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classroom": { + "anyOf": [ + { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + }, + { + "type": "null" + } + ] + }, + "dayDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + { + "type": "null" + } + ] + }, + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "movedLesson": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "room": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "startingDay": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "startingPeriod": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "room", + "startingDay", + "startingPeriod" + ] + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startTime": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "endTime", + "id", + "period", + "startTime", + "updatedAt" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "classroom", + "dayDefinition", + "lessons", + "movedLesson", + "period" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/timetable/movedLessons/cohort/{cohortId}/relevant": { + "get": { + "operationId": "getTimetableMovedLessonsCohortByCohortIdRelevant", + "description": "Get all relevant moved lessons for a given cohort.", + "tags": [ + "Moved Lesson" + ], + "parameters": [ + { + "name": "cohortId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classroom": { + "anyOf": [ + { + "type": "object", + "properties": { + "building_id": { + "type": "string" + }, + "capacity": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "mapped": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "rotation": { + "type": "number" + }, + "short": { + "type": "string" + }, + "size_x": { + "type": "number" + }, + "size_y": { + "type": "number" + }, + "size_z": { + "type": "number" + }, + "storey": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "type_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "building_id", + "capacity", + "description", + "id", + "mapped", + "name", + "rotation", + "short", + "size_x", + "size_y", + "size_z", + "storey", + "type_id", + "x", + "y" + ] + }, + { + "type": "null" + } + ] + }, + "dayDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + { + "type": "null" + } + ] + }, + "lessons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "classrooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "cohorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "day": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "days": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "days", + "id", + "name", + "short", + "updatedAt" + ] + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "divisionTag": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "entireClass": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + } + }, + "required": [ + "divisionTag", + "entireClass", + "id", + "name" + ] + } + }, + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "number" + }, + "startTime": { + "type": "string" + } + }, + "required": [ + "endTime", + "id", + "period", + "startTime" + ] + }, + { + "type": "null" + } + ] + }, + "periodsPerWeek": { + "type": "number" + }, + "subject": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + }, + { + "type": "null" + } + ] + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "short" + ] + } + }, + "termDefinitionId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "weekDefinition": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "short": { + "type": "string" + }, + "weeks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "name", + "short", + "weeks" + ] + }, + { + "type": "null" + } + ] + }, + "weeksDefinitionId": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "classrooms", + "cohorts", + "groups", + "groupsIds", + "id", + "period", + "periodsPerWeek", + "subject", + "teachers", + "termDefinitionId", + "weekDefinition", + "weeksDefinitionId" + ] + } + }, + "movedLesson": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "date": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "room": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "startingDay": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "startingPeriod": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "comment", + "date", + "id", + "room", + "startingDay", + "startingPeriod" + ] + }, + "period": { + "anyOf": [ + { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "endTime": { + "type": "string" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "period": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startTime": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "createdAt", + "endTime", + "id", + "period", + "startTime", + "updatedAt" + ] + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "classroom", + "dayDefinition", + "lessons", + "movedLesson", + "period" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/users": { + "get": { + "operationId": "getUsers", + "description": "List users", + "tags": [ + "Users" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "number", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "number", + "minimum": 0, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "role", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cohortId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "email": { + "type": "string" + }, + "emailVerified": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "displayName": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "cohortId", + "createdAt", + "email", + "emailVerified", + "id", + "image", + "name", + "nickname", + "roles", + "updatedAt", + "displayName", + "permissions" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/users/{id}": { + "patch": { + "operationId": "patchUsersById", + "description": "Update user", + "tags": [ + "Users" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cohortId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "nickname": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cohortId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "email": { + "type": "string" + }, + "emailVerified": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "displayName": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "cohortId", + "createdAt", + "email", + "emailVerified", + "id", + "image", + "name", + "nickname", + "roles", + "updatedAt", + "displayName", + "permissions" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/auth-logs": { + "get": { + "operationId": "getWifiAuthLogs", + "description": "List WiFi auth logs.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 10000, + "default": 10000 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "failureReason", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "result", + "in": "query", + "schema": { + "enum": [ + "true", + "false" + ], + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "deviceNickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "deviceReportedHostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "failureReason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "number" + }, + "macAddress": { + "type": "string" + }, + "nasComment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "nasIpAddress": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "nasMacAddress": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "result": { + "type": "boolean" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userComment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "username": { + "type": "string" + }, + "wifiUserId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "deviceNickname", + "deviceReportedHostname", + "failureReason", + "id", + "macAddress", + "nasComment", + "nasIpAddress", + "nasMacAddress", + "result", + "timestamp", + "userComment", + "username", + "wifiUserId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/devices": { + "post": { + "operationId": "postWifiDevices", + "description": "Create a WiFi device or global MAC ban.", + "tags": [ + "WiFi" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "adminNotes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "banned": { + "type": "boolean" + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "wifiUserId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "macAddress" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "adminNotes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "banned": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastActiveAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reportedHostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "wifiUserId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "adminNotes", + "banned", + "createdAt", + "id", + "lastActiveAt", + "macAddress", + "nickname", + "reportedHostname", + "updatedAt", + "wifiUserId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getWifiDevices", + "description": "List WiFi devices and global MAC bans.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 10000, + "default": 10000 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "wifiUserId", + "in": "query", + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "const": "" + }, + { + "const": "null" + }, + { + "type": "null" + } + ] + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "adminNotes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "banned": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastActiveAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reportedHostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "wifiUserId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "adminNotes", + "banned", + "createdAt", + "id", + "lastActiveAt", + "macAddress", + "nickname", + "reportedHostname", + "updatedAt", + "wifiUserId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/devices/{id}": { + "delete": { + "operationId": "deleteWifiDevicesById", + "description": "Delete a WiFi device or global MAC ban.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putWifiDevicesById", + "description": "Update a WiFi device or global MAC ban.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "adminNotes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "banned": { + "type": "boolean" + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "wifiUserId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "adminNotes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "banned": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastActiveAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reportedHostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "wifiUserId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "adminNotes", + "banned", + "createdAt", + "id", + "lastActiveAt", + "macAddress", + "nickname", + "reportedHostname", + "updatedAt", + "wifiUserId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/nas": { + "post": { + "operationId": "postWifiNas", + "description": "Register a WiFi NAS device.", + "tags": [ + "WiFi" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "ipAddress": { + "type": "string" + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + } + }, + "required": [ + "ipAddress", + "macAddress" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "ipAddress": { + "type": "string" + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "comment", + "createdAt", + "id", + "ipAddress", + "macAddress", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getWifiNas", + "description": "List authorized WiFi NAS devices.", + "tags": [ + "WiFi" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "ipAddress": { + "type": "string" + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "comment", + "createdAt", + "id", + "ipAddress", + "macAddress", + "updatedAt" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/nas/{id}": { + "delete": { + "operationId": "deleteWifiNasById", + "description": "Delete a WiFi NAS device.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putWifiNasById", + "description": "Update a WiFi NAS device.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "ipAddress": { + "type": "string" + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "ipAddress": { + "type": "string" + }, + "macAddress": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + } + }, + "required": [ + "comment", + "createdAt", + "id", + "ipAddress", + "macAddress", + "updatedAt" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/radius/authorize": { + "post": { + "operationId": "postWifiRadiusAuthorize", + "description": "Authorize a WiFi client for FreeRADIUS.", + "tags": [ + "WiFi" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "destination": { + "type": "string" + }, + "IP": { + "type": "string" + }, + "NAS": { + "type": "string" + }, + "password": { + "type": "string" + }, + "sharedSecret": { + "type": "string" + }, + "source": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "required": [ + "source", + "username" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Cleartext-Password": { + "type": "string" + }, + "control:Cleartext-Password": { + "type": "string" + }, + "Session-Timeout": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "Cleartext-Password", + "control:Cleartext-Password", + "Session-Timeout" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + } + } + }, + "/wifi/role-speed-profiles": { + "post": { + "operationId": "postWifiRoleSpeedProfiles", + "description": "Create a WiFi role speed-profile mapping.", + "tags": [ + "WiFi" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "priority": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "default": 0 + }, + "roleName": { + "type": "string", + "minLength": 1 + }, + "speedProfileId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "roleName", + "speedProfileId" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "priority": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roleName": { + "type": "string" + }, + "speedProfileId": { + "type": "string" + } + }, + "required": [ + "priority", + "roleName", + "speedProfileId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getWifiRoleSpeedProfiles", + "description": "List WiFi role speed-profile mappings.", + "tags": [ + "WiFi" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "priority": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roleName": { + "type": "string" + }, + "speedProfileId": { + "type": "string" + } + }, + "required": [ + "priority", + "roleName", + "speedProfileId" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/role-speed-profiles/{id}": { + "delete": { + "operationId": "deleteWifiRoleSpeedProfilesById", + "description": "Delete a WiFi role speed-profile mapping.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putWifiRoleSpeedProfilesById", + "description": "Update a WiFi role speed-profile mapping.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "priority": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "default": 0 + }, + "roleName": { + "type": "string", + "minLength": 1 + }, + "speedProfileId": { + "type": "string", + "minLength": 1 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "priority": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roleName": { + "type": "string" + }, + "speedProfileId": { + "type": "string" + } + }, + "required": [ + "priority", + "roleName", + "speedProfileId" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/self/certificate": { + "get": { + "operationId": "getWifiSelfCertificate", + "description": "Download the CA certificate for the authenticated user's WiFi network.", + "tags": [ + "WiFi" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string", + "contentMediaType": "*/*" + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/self/password": { + "put": { + "operationId": "putWifiSelfPassword", + "description": "Change the authenticated user's WiFi account password.", + "tags": [ + "WiFi" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "newPassword": { + "type": "string", + "minLength": 8, + "maxLength": 256 + } + }, + "required": [ + "newPassword" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/self": { + "post": { + "operationId": "postWifiSelf", + "description": "Create a new WiFi account for the authenticated user.", + "tags": [ + "WiFi" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "minLength": 8, + "maxLength": 256 + } + }, + "required": [ + "password" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "banned": { + "type": "boolean" + }, + "devices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "banned": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastActiveAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "macAddress": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reportedHostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "banned", + "id", + "lastActiveAt", + "macAddress", + "nickname", + "reportedHostname" + ] + } + }, + "speedLimit": { + "type": "object", + "properties": { + "downloadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "roleName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "source": { + "enum": [ + "override", + "role", + "wlan_default" + ], + "type": "string" + }, + "speedProfileId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "uploadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "downloadSpeedMbps", + "roleName", + "source", + "speedProfileId", + "uploadSpeedMbps" + ] + }, + "username": { + "type": "string" + } + }, + "required": [ + "banned", + "devices", + "speedLimit", + "username" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getWifiSelf", + "description": "Get the authenticated user's WiFi account and devices.", + "tags": [ + "WiFi" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "banned": { + "type": "boolean" + }, + "devices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "banned": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastActiveAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "macAddress": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reportedHostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "banned", + "id", + "lastActiveAt", + "macAddress", + "nickname", + "reportedHostname" + ] + } + }, + "speedLimit": { + "type": "object", + "properties": { + "downloadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "roleName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "source": { + "enum": [ + "override", + "role", + "wlan_default" + ], + "type": "string" + }, + "speedProfileId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "uploadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "downloadSpeedMbps", + "roleName", + "source", + "speedProfileId", + "uploadSpeedMbps" + ] + }, + "username": { + "type": "string" + } + }, + "required": [ + "banned", + "devices", + "speedLimit", + "username" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/self/devices/{id}": { + "put": { + "operationId": "putWifiSelfDevicesById", + "description": "Rename one of the authenticated user's WiFi devices.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "nickname": { + "anyOf": [ + { + "type": "string", + "maxLength": 100 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "nickname" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "banned": { + "type": "boolean" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastActiveAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "macAddress": { + "type": "string" + }, + "nickname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "reportedHostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "banned", + "id", + "lastActiveAt", + "macAddress", + "nickname", + "reportedHostname" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/speed-profiles": { + "post": { + "operationId": "postWifiSpeedProfiles", + "description": "Create a UniFi WiFi speed profile.", + "tags": [ + "WiFi" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "downloadSpeedMbps": { + "type": "integer", + "minimum": -1, + "maximum": 9007199254740991, + "default": -1 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "uploadSpeedMbps": { + "type": "integer", + "minimum": -1, + "maximum": 9007199254740991, + "default": -1 + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "downloadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" + }, + "isWlanDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "uploadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "downloadSpeedMbps", + "id", + "isWlanDefault", + "name", + "uploadSpeedMbps" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "get": { + "operationId": "getWifiSpeedProfiles", + "description": "List UniFi WiFi speed profiles.", + "tags": [ + "WiFi" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "downloadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" + }, + "isWlanDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "uploadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "downloadSpeedMbps", + "id", + "isWlanDefault", + "name", + "uploadSpeedMbps" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/speed-profiles/{id}": { + "delete": { + "operationId": "deleteWifiSpeedProfilesById", + "description": "Delete a UniFi WiFi speed profile.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + }, + "put": { + "operationId": "putWifiSpeedProfilesById", + "description": "Update a UniFi WiFi speed profile.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "downloadSpeedMbps": { + "type": "integer", + "minimum": -1, + "maximum": 9007199254740991, + "default": -1 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "uploadSpeedMbps": { + "type": "integer", + "minimum": -1, + "maximum": 9007199254740991, + "default": -1 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "downloadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" + }, + "isWlanDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "uploadSpeedMbps": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "downloadSpeedMbps", + "id", + "isWlanDefault", + "name", + "uploadSpeedMbps" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/stats/overview": { + "get": { + "operationId": "getWifiStatsOverview", + "description": "Get WiFi account, device, active-device, and auth statistics.", + "tags": [ + "WiFi" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stats": { + "type": "object", + "properties": { + "activeDevices": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "authSeries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "accepted": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "date": { + "type": "string" + }, + "rejected": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "accepted", + "date", + "rejected" + ] + } + }, + "totalDevices": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalUsers": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "activeDevices", + "authSeries", + "totalDevices", + "totalUsers" + ] + } + }, + "required": [ + "stats" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] + } + }, + "/wifi/status": { + "get": { + "operationId": "getWifiStatus", + "description": "Get the WiFi module status and configured SSID.", + "tags": [ + "WiFi" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "ssid": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "enabled", + "ssid" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } } } + } + }, + "/wifi/users": { + "post": { + "operationId": "postWifiUsers", + "description": "Create a WiFi user account.", + "tags": [ + "WiFi" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allowedMacAddresses": { + "type": "array", + "items": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + } + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "password": { + "type": "string", + "minLength": 8, + "maxLength": 256 + }, + "speedProfileId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "username": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "password", + "username" + ] + } + } + } + }, + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allowedMacAddresses": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + } + }, + { + "type": "null" + } + ] + }, + "banned": { + "type": "boolean" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "createdBy": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "creatorName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastActiveAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "speedProfileId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "username": { + "type": "string" + } + }, + "required": [ + "allowedMacAddresses", + "banned", + "comment", + "createdAt", + "createdBy", + "creatorName", + "id", + "lastActiveAt", + "speedProfileId", + "updatedAt", + "userId", + "username" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] }, - "Forbidden": { - "description": "Insufficient permissions", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/ErrorResponse"} + "get": { + "operationId": "getWifiUsers", + "description": "List WiFi user accounts.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 10000, + "default": 10000 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "offset", + "in": "query", + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "default": 0 + }, + "allowEmptyValue": true, + "allowReserved": true + }, + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + }, + "allowEmptyValue": true, + "allowReserved": true + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "allowedMacAddresses": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + } + }, + { + "type": "null" + } + ] + }, + "banned": { + "type": "boolean" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "createdBy": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "creatorName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastActiveAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "speedProfileId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "username": { + "type": "string" + } + }, + "required": [ + "allowedMacAddresses", + "banned", + "comment", + "createdAt", + "createdBy", + "creatorName", + "id", + "lastActiveAt", + "speedProfileId", + "updatedAt", + "userId", + "username" + ] + } + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } } - } - }, - "NotFound": { - "description": "Resource not found", - "content": { - "application/json": { - "schema": {"$ref": "#/components/schemas/ErrorResponse"} + }, + "security": [ + { + "sessionAuth": [] } - } + ] } }, - "schemas": { - "SuccessResponse": { - "type": "object", - "required": ["success"], - "properties": { - "success": { - "type": "boolean", - "example": true + "/wifi/users/{id}": { + "delete": { + "operationId": "deleteWifiUsersById", + "description": "Delete a WiFi user account.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } } - } - }, - "ErrorResponse": { - "type": "object", - "required": ["success", "error"], - "properties": { - "success": { - "type": "boolean", - "example": false + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } }, - "error": { - "type": "string" + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } } - } + }, + "security": [ + { + "sessionAuth": [] + } + ] }, - "PingResponse": { - "type": "object", - "required": ["success", "data"], - "properties": { - "success": {"type": "boolean"}, - "data": { - "type": "object", - "required": ["message"], - "properties": { - "message": {"type": "string", "example": "pong"} + "put": { + "operationId": "putWifiUsersById", + "description": "Update a WiFi user account.", + "tags": [ + "WiFi" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } } - } - }, - "UptimeResponse": { - "type": "object", - "required": ["success", "data"], - "properties": { - "success": {"type": "boolean"}, - "data": { - "type": "object", - "required": ["uptime_ms", "pretty"], - "properties": { - "uptime_ms": {"type": "integer"}, - "pretty": {"type": "string"} + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allowedMacAddresses": { + "type": "array", + "items": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + } + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "password": { + "anyOf": [ + { + "type": "string", + "minLength": 8, + "maxLength": 256 + }, + { + "const": "" + } + ] + }, + "speedProfileId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "username": { + "type": "string", + "minLength": 1 + }, + "banned": { + "type": "boolean" + } + } + } } } - } - }, - "Timetable": { - "type": "object", - "required": ["id", "validFrom"], - "properties": { - "id": {"type": "string"}, - "validFrom": {"type": "string", "format": "date"}, - "validTo": {"type": "string", "format": "date", "nullable": true}, - "createdAt": {"type": "string", "format": "date-time"} - } - }, - "Cohort": { - "type": "object", - "required": ["id", "name"], - "properties": { - "id": {"type": "string"}, - "name": {"type": "string"}, - "timetableId": {"type": "string", "nullable": true} - } - }, - "Teacher": { - "type": "object", - "required": ["id", "name"], - "properties": { - "id": {"type": "string"}, - "name": {"type": "string"}, - "shortName": {"type": "string", "nullable": true} - } - }, - "Classroom": { - "type": "object", - "required": ["id", "name"], - "properties": { - "id": {"type": "string"}, - "name": {"type": "string"} - } - }, - "Lesson": { - "type": "object", - "required": ["id", "subject", "startTime", "endTime"], - "properties": { - "id": {"type": "string"}, - "subject": {"type": "string"}, - "startTime": {"type": "string"}, - "endTime": {"type": "string"}, - "day": {"type": "integer"}, - "period": {"type": "integer"}, - "timetableId": {"type": "string", "nullable": true}, - "cohortId": {"type": "string", "nullable": true}, - "teacherId": {"type": "string", "nullable": true}, - "classroomId": {"type": "string", "nullable": true}, - "teacher": {"$ref": "#/components/schemas/Teacher"}, - "classroom": {"$ref": "#/components/schemas/Classroom"}, - "cohort": {"$ref": "#/components/schemas/Cohort"} - } - }, - "Substitution": { - "type": "object", - "required": ["id", "date"], - "properties": { - "id": {"type": "string"}, - "date": {"type": "string", "format": "date"}, - "subject": {"type": "string", "nullable": true}, - "lessonId": {"type": "string", "nullable": true}, - "substituteTeacherId": {"type": "string", "nullable": true}, - "classroomId": {"type": "string", "nullable": true}, - "cohortId": {"type": "string", "nullable": true}, - "type": { - "type": "string", - "enum": ["substitution", "cancellation", "roomChange"] - }, - "lesson": {"$ref": "#/components/schemas/Lesson"}, - "substituteTeacher": {"$ref": "#/components/schemas/Teacher"}, - "classroom": {"$ref": "#/components/schemas/Classroom"} - } - }, - "MovedLesson": { - "type": "object", - "required": ["id", "originalDate", "newDate"], - "properties": { - "id": {"type": "string"}, - "originalDate": {"type": "string", "format": "date"}, - "newDate": {"type": "string", "format": "date"}, - "lessonId": {"type": "string", "nullable": true}, - "lesson": {"$ref": "#/components/schemas/Lesson"} - } - }, - "Announcement": { - "type": "object", - "required": ["id", "title", "content", "createdAt"], - "properties": { - "id": {"type": "string"}, - "title": {"type": "string"}, - "content": {"type": "string"}, - "createdAt": {"type": "string", "format": "date-time"}, - "updatedAt": {"type": "string", "format": "date-time", "nullable": true}, - "authorId": {"type": "string", "nullable": true} - } - }, - "SystemMessage": { - "type": "object", - "required": ["id", "message", "createdAt"], - "properties": { - "id": {"type": "string"}, - "message": {"type": "string"}, - "severity": { - "type": "string", - "enum": ["info", "warning", "error"] - }, - "createdAt": {"type": "string", "format": "date-time"}, - "expiresAt": {"type": "string", "format": "date-time", "nullable": true} - } - }, - "Blog": { - "type": "object", - "required": ["id", "title", "slug", "content", "publishedAt"], - "properties": { - "id": {"type": "string"}, - "title": {"type": "string"}, - "slug": {"type": "string"}, - "content": {"type": "string"}, - "excerpt": {"type": "string", "nullable": true}, - "publishedAt": {"type": "string", "format": "date-time", "nullable": true}, - "createdAt": {"type": "string", "format": "date-time"}, - "updatedAt": {"type": "string", "format": "date-time", "nullable": true}, - "authorId": {"type": "string", "nullable": true} - } - }, - "User": { - "type": "object", - "required": ["id", "name", "email"], - "properties": { - "id": {"type": "string"}, - "name": {"type": "string"}, - "email": {"type": "string", "format": "email"}, - "nickname": {"type": "string", "nullable": true}, - "roles": { - "type": "array", - "items": {"type": "string"} - }, - "cohortId": {"type": "string", "nullable": true}, - "createdAt": {"type": "string", "format": "date-time"} - } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "allowedMacAddresses": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "pattern": "^(?:[0-9a-fA-F]{12}|(?:[0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2})$" + } + }, + { + "type": "null" + } + ] + }, + "banned": { + "type": "boolean" + }, + "comment": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "createdBy": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "creatorName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "lastActiveAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + { + "type": "null" + } + ] + }, + "speedProfileId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "x-native-type": "date" + }, + "userId": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] + }, + "username": { + "type": "string" + } + }, + "required": [ + "allowedMacAddresses", + "banned", + "comment", + "createdAt", + "createdBy", + "creatorName", + "id", + "lastActiveAt", + "speedProfileId", + "updatedAt", + "userId", + "username" + ] + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "401", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "409": { + "description": "409", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "429": { + "description": "429", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "code", + "message", + "status" + ], + "type": "object" + } + } + } + } + }, + "security": [ + { + "sessionAuth": [] + } + ] } } }